[PYTHON] How doi may be useful when asking how to write code?

It seems to be useful when you are writing code and it works for the time being but you do not know how to write it neatly

install pip install howdoi

Various will be installed

requirements Pygments==1.5 argparse==1.2.1 cssselect==0.7.1 lxml==3.2.4 pyquery==1.2.6 requests==2.0.1 requests-cache==0.4.4

HOWTO

% howdoi format dict python
geopoint = {'latitude':41.123,'longitude':71.091}
print('{latitude} {longitude}'.format(**geopoint))

%howdoi install homebrew
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"

%howdoi print golang
return fmt.Sprintf("at %v, %s", e.When, e.What)

%howdoi print lisp
CL-USER> (format t "~{~{~A ~}~%~}"
                 '((X X X) (X X X X X X) (X X X X X X X X X)))
X X X 
X X X X X X 
X X X X X X X X X

It seems that if you apply it like English grammar, it will come back as it is

cf. https://github.com/gleitz/howdoi

Recommended Posts

How doi may be useful when asking how to write code?
Qiita (1) How to write a code name
How to write faster when using numpy like deque
How to check when python-memcached server could not be connected
XPath Basics (2) -How to write XPath
Note links that may be useful when using Python, Selenium2
How to write code to access python dashDB on Bluemix or local
How to set Jupytext nicely when managing code as a team
How to write a Python class
How to write soberly in pandas
Flask reuse How to write html
Visual Studio Code may be good
How to add sudo when debugging
How to write Docker base image
How to write Django1.9 environment-independent wsgi.py
How to run TensorFlow 1.0 code in 2.0
Notes on how to write requirements.txt
How to write a string when there are multiple lines in python
How to get IP when Tornado + nginx
Isn't it okay to write test code?
How to remove end-of-line code (CR) [^ M]
Python 3.9 dict merge (`|`) seems to be useful
Be careful when adding an array to an array
How to write this process in Perl?
How to write Ruby to_s in Python
Summary of how to write AWS Lambda
How to write pydoc and multi-line comments
How to write files that you should be careful about in all languages