Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
pipx install --include-deps -f ruff black isort mypy bandit pylint autopep8 pyflakes yapf python-lsp-server[all] pylsp-rope pre-commit pre-commit-hooks
@westurner
westurner / forgot_to_check_out_with_recurse_submodules.md
Created September 12, 2023 19:54 — forked from cnlohr/forgot_to_check_out_with_recurse_submodules.md
Git forgot to clone recursively (forgot to check out with recurse submodules)
@westurner
westurner / savings_interest_and_future_value.ipynb
Last active July 13, 2023 23:15
savings_interest_and_future_value.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

From "Options for giving math talks and lectures online" https://news.ycombinator.com/item?id=22539537 :

One option: screencast development of a Jupyter notebook.

Jupyter Notebook supports LaTeX (MathTeX) and inline charts. You can create graded notebooks with nbgrader and/or with CoCalc (which records all (optionally multi-user) input such that you can replay it with a time slider).

Jupyter notebooks can be saved to HTML slides with reveal.js, but if you want to execute code cells within a slide, you'll need to install RISE: https://rise.readthedocs.io/en/stable/

Here are the docs for CoCalc Course Management; Handouts, Assignments, nbgrader: https://doc.cocalc.com/teaching-course-management.html

@westurner
westurner / build_sphinx_docs_with_readthedocs_container.Dockerfile
Last active September 22, 2021 09:47
Build Sphinx docs locally with the ReadTheDocs Docker container
FROM readthedocs/build:latest
## Install system packages
#RUN pip install -U pip
## Install latest pip
#RUN curl -SL https://bootstrap.pypa.io/get-pip.py > get-pip.py
#RUN python ./get-pip.py
## Install dotfiles
ARG uid=1000
ARG user="app"

Keybase proof

I hereby claim:

  • I am westurner on github.
  • I am westurner (https://keybase.io/westurner) on keybase.
  • I have a public key ASAy7kaQRXpchVfKf1DVN9rRrRQCVYJ_EnHxEyvj1b5fmwo

To claim this, I am signing this object:

@westurner
westurner / 010-variables.ipynb
Last active June 4, 2018 00:17
Python variables, references, aliases, garbage collection, scope
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@westurner
westurner / site_discover.py
Created November 16, 2017 11:34
find all python*.exe and pip*.exe binaries on os.environ['PATH']
#!/usr/bin/env python
"""
Something like this as e.g site.discover
(for use as ``python -m site.discover``)
could be helpful for explaining and diagnosing multiple pythons and pips
"""
import os
import re
from distutils.spawn import find_executable