Skip to content

Instantly share code, notes, and snippets.

@jtviegas
Last active April 25, 2021 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtviegas/000326aeee55c5300feab9265f4034ac to your computer and use it in GitHub Desktop.
Save jtviegas/000326aeee55c5300feab9265f4034ac to your computer and use it in GitHub Desktop.
### get notebook tokens
> ipython
[1] : system("jupyter" "notebook" "list")
Out[1]:
['Currently running servers:','http://localhost:8895/token=067470c5ddsadc54153ghfjd817d15b5d5f5341e56b0dsad78a :: /u/user/dir']
### istall on untrusted server
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org <package_name>
### special methods
__del__ invoked by the interpreter when the instance is about to be destroyed, used to release external resources
import weakref
weakref.finalize(obj,func) object destroy callback registration
### commands
create wheel python setup.py sdist bdist_wheel
check dist before upload to pypi twine check dist/*
upload dist to pypi twine upload dist/*
#### conda
create a conda environment conda create -p ./.env/python38 python=3.8
activate the conda environment conda activate .env/python38
deactivate the conda environment (<...>/.env/python38)) $ conda deactivate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment