Skip to content

Instantly share code, notes, and snippets.

View geoffroy-noel-ddh's full-sized avatar

Geoffroy Noël geoffroy-noel-ddh

View GitHub Profile
# content of local_settings.py in digipal_project/
BANNER_LOGO_HTML = '''
<span id="logo">
<span class="logo-brand logo-brand-digi">SCRIBA</span>
<span class="logo-separator hidden-sm hidden-xs">&nbsp;</span>
<span class="logo-sub hidden-sm hidden-xs">
Anar a cal notari
<br>
a la Catalunya medieva
@geoffroy-noel-ddh
geoffroy-noel-ddh / Profiling python
Created February 10, 2019 12:39
Profiling python
# 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
@geoffroy-noel-ddh
geoffroy-noel-ddh / npm-to-pipenv.md
Last active August 1, 2020 01:55
npm to pipenv
# 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"