import this
secret = "Tbbq Wbo! abj tb fvta hc sbe gur znvyvat yvfg bire ng vclguba.bet"
Josh mentioned that there are two range commands, range
and xrange
.
Run the code below to see which one is faster, and then read the documentation for the two to see why this is the case.
timeit?
%timeit range(100)
%timeit xrange(100)
Create the stub default profile (if you haven't already)
$ ipython profile create
This will create the stubs for the default profile
now you can change these defaults.
To find where your profile is stored:
In [1]: import IPython
In [2]: IPython.utils.path.locate_profile()
Example:if you want the _
and __
methods to show up by default when doing tab-completion
c.IPCompleter.omit__names
Another example: you can add your own startup message (or execute your desired commands at startup) like I have:
.../profile_default/startup/README
import IPython
IPython.utils.path.locate_profile()
u'/home/pi/.ipython/profile_default'
IPython.utils.path.locate_profile()+'/startup/README'
u'/home/pi/.ipython/profile_default/startup/README'
cat IPython.utils.path.locate_profile()+'/startup/README'