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.
#!/usr/bin/env python
from __future__ import print_function, division
"""
avgs.py
various implementations of 'streaming' simple "cumulative" / "momentary" mean
"""
import sys
try:
@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"
@westurner
westurner / i3t.py
Last active April 26, 2021 15:59
i3wm <alt><tab> alternative
#!/usr/bin/env python
"""
i3t.py -- list i3wm windows, get next window id, wrap/loop around
Configuration (``.i3/config``)::
set $i3t_alt_tab ~/-dotfiles/src/i3t/i3t.py n
set $i3t_alt_shift_tab ~/-dotfiles/src/i3t/i3t.py p
bindsym Mod1+Tab exec exec $i3t_alt_tab
bindsym Mod1+Shift+Tab exec $i3t_alt_shift_tab
@westurner
westurner / cinst_workstation_minimal.ps1
Last active March 2, 2021 11:08
PowerShell script to install a minimal Workstation with Chocolatey
### PowerShell script to install a minimal Workstation with Chocolatey
# https://chocolatey.org
## To Run This Script:
# 1. Download this PowerShell script
# * Right-click <> ("View Raw") and "Save As" to %USERPROFILE% (/Users/<username>)
# * If Cocolatey is not already installed, see
# "Uncomment to install Chocolatey"
# * If you would like to also install Anaconda
# (Python, IPython, lots of great libraries)

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

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: