# initialise new project package environment
npm init
PIPENV_VENV_IN_PROJECT=1 pipenv install
# install major version of package P (and dependencies)
npm i P@1
pipenv install --selective-upgrade "P<2"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Setup | |
# see https://jiffyclub.github.io/snakeviz/ | |
pip install snakeviz | |
# run your script and generate profiling info | |
python -m cProfile -o program.prof myscrypt.py myargument | |
# visualise the results in your browser | |
snakeviz program.prof |