mirror of
https://github.com/chubin/cheat.sheets
synced 2024-11-15 06:12:59 +00:00
0adbf03348
* sheets/MegaCli * sheets/az * sheets/azure * sheets/blktrace * sheets/emacs * sheets/exim * sheets/go * sheets/ipython * sheets/jq * sheets/nmap * sheets/perl * sheets/psql * sheets/redis * sheets/sed * sheets/smartctl * sheets/solidity * sheets/yq_v4
66 lines
1.5 KiB
Plaintext
66 lines
1.5 KiB
Plaintext
# Create a ipython profile
|
|
ipython profile create profile_name
|
|
|
|
# Use specified profile
|
|
ipython --profile=${profile_name}
|
|
|
|
# List objects, functions, etc. that have been added in the current namespace,
|
|
# as well as modules that have been imported
|
|
%who
|
|
|
|
# Assign a name to a set of input commands,
|
|
# so that they can be executed all together using the assigned name
|
|
%macro
|
|
|
|
# This will open an editor (whatever the shell variable EDITOR is set to,
|
|
# see above, or vi/vim if no variable is set)
|
|
# containing the specified material, based on what arguments are provided,
|
|
# and will execute that code once the editor is exited
|
|
%edit
|
|
|
|
# This lists all ipython magic commands
|
|
%lsmagic
|
|
|
|
# Store variables, functions, etc. that you've defined in .ipython/ipythonrc
|
|
# for use in future sessions
|
|
%store
|
|
|
|
# Configure ipython to automatically open the python debugger pdb
|
|
# when an error occurs
|
|
%pdb
|
|
|
|
# Timing functions to see how long expressions take to execute
|
|
%time
|
|
%timeit
|
|
|
|
# Log ipython input and/or output to files
|
|
%logstart
|
|
%logon
|
|
%logoff
|
|
%logstate
|
|
|
|
# Change directories, manipulate directory stacks, create directory "bookmarks"
|
|
%cd
|
|
%pushd
|
|
%popd
|
|
%bookmark
|
|
|
|
# Resets the interactive environment
|
|
%reset
|
|
|
|
# Allows you to see any part of your input history
|
|
%hist
|
|
|
|
# Search ("grep") through your history by typing
|
|
%hist -g somestring
|
|
|
|
# List objects, functions, etc. that have been added in the current
|
|
# namespace, as well as modules that have been imported
|
|
%who
|
|
|
|
# Show internal IPython aliases
|
|
%alias
|
|
|
|
# Embed ipython in python code
|
|
from IPython import embed; embed()
|