You want to plot graphs in the console?
$ pip install bashplotlib
You can have graphs in the console.
$ pip install bashplotlib
You can have graphs in the console.
from geopy import GoogleV3
place = "221b Baker Street, London"
location = GoogleV3().geocode(place)
print(location.address)
print(location.location)
place = "221b Baker Street, London"
location = GoogleV3().geocode(place)
print(location.address)
print(location.location)
$ pip install howdoi
Ask it whatever question you have, and it’ll do its best to return an answer.
$ howdoi vertical align css
$ howdoi for loop in java
$ howdoi undo commits in git
Be aware though — it scrapes code from top answers from StackOverflow. It might not always give the most helpful information…
Ask it whatever question you have, and it’ll do its best to return an answer.
$ howdoi vertical align css
$ howdoi for loop in java
$ howdoi undo commits in git
Be aware though — it scrapes code from top answers from StackOverflow. It might not always give the most helpful information…
$ python -m http.server 8888
It opens simple http server on localhost:8888 in current folder.
It might be useful when you need a really quick development server rather than apache.
It opens simple http server on localhost:8888 in current folder.
It might be useful when you need a really quick development server rather than apache.
- No semicolon in Python!
- Wrong!
You can use semicolon to execute more than 1 statements in one line.
import pdb; pdb.set_trace()
equivalent to:
import pdb
pdb.set_trace()
- Wrong!
You can use semicolon to execute more than 1 statements in one line.
import pdb; pdb.set_trace()
equivalent to:
import pdb
pdb.set_trace()
Why is it called python programming language?
It is due to the fact that the creator, Guido Van Rossum really liked “Monty Python’s Flying Circus”.
Actually it was a popular comedy in 1970s.
It is due to the fact that the creator, Guido Van Rossum really liked “Monty Python’s Flying Circus”.
Actually it was a popular comedy in 1970s.
there is no bigger number than float('Inf')
> 2**42 > float('Inf')
False
# and negative infinity is float('-Inf')
> 2**42 > float('Inf')
False
# and negative infinity is float('-Inf')
#PrettyPrint
To see data with visual indentation, use pprint instead of print
from pprint import pprint
pprint(data)
To see data with visual indentation, use pprint instead of print
from pprint import pprint
pprint(data)
Have you ever forgotten to reference to a variable in Interactive Shell?
ignored returns are referenced to _
> from requests import get
> get('http://example.com')
# Oh no, forgot to reference
> response = _
> response
<Response [200]>
ignored returns are referenced to _
> from requests import get
> get('http://example.com')
# Oh no, forgot to reference
> response = _
> response
<Response [200]>