Skip to content

Instantly share code, notes, and snippets.

@loiseaujc
loiseaujc / LQE.ipynb
Last active January 31, 2024 09:07
Notebook for the control class on the Kalman filter
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@schacon
schacon / better-git-branch.sh
Created January 13, 2024 18:41
Better Git Branch output
#!/bin/bash
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
NO_COLOR='\033[0m'
BLUE='\033[0;34m'
YELLOW='\033[0;33m'
NO_COLOR='\033[0m'
@abul4fia
abul4fia / latex_items.py
Last active August 2, 2023 09:07
Latex items environment
"""
This module implements class LatexItems which is useful as an alternative
to manim's BulletedList.
Unless BulletedList, LatexItems uses standard latex itemize environment to
typeset the text and the bullets. The width of the paragraphs can be customized
as well as the kind of environment (itemize, enumerate, or description)
"""
from manim import Tex, TexTemplate
@abul4fia
abul4fia / ligth_theme.py
Last active November 13, 2023 18:50
Light theme for manim
# Put this file in the same folder than your manim script
# and start your script with:
#
# import light_theme
from manim import *
config.background_color = WHITE
# Those are objects which are WHITE by default
{"ISO 693-3":"aaa","Language Name":"Ghotuo","Language Family":"Niger-Congo","Subgrouping":"Atlantic-Congo","ASR":false,"TTS":false,"LID":true,"":"https://www.ethnologue.com/language/aaa"}
{"ISO 693-3":"aab","Language Name":"Arum","Language Family":"Niger-Congo","Subgrouping":"Atlantic-Congo","ASR":false,"TTS":false,"LID":true,"":"https://www.ethnologue.com/language/aab"}
{"ISO 693-3":"aac","Language Name":"Ari","Language Family":"Trans-New Guinea","Subgrouping":"Gogodala-Suki","ASR":false,"TTS":false,"LID":true,"":"https://www.ethnologue.com/language/aac"}
{"ISO 693-3":"aad","Language Name":"Amal","Language Family":"Sepik","Subgrouping":"Iwam","ASR":false,"TTS":false,"LID":true,"":"https://www.ethnologue.com/language/aad"}
{"ISO 693-3":"aaf","Language Name":"Aranadan","Language Family":"Dravidian","Subgrouping":"Southern","ASR":false,"TTS":false,"LID":true,"":"https://www.ethnologue.com/language/aaf"}
{"ISO 693-3":"aai","Language Name":"Miniafia Oyan","Language Family":"Austronesian","Subgrouping":"Malayo-Pol
@camriddell
camriddell / collect_univariates.py
Last active March 8, 2024 20:56
A collection of univariate plots
from functools import partial
from textwrap import fill
from scipy.stats import norm, uniform, skewnorm, gaussian_kde, triang
from numpy import (
array, linspace, quantile, histogram, atleast_2d, mean, std, add
)
from numpy.lib.stride_tricks import sliding_window_view
from matplotlib.pyplot import subplots, show, rc
@camriddell
camriddell / Python Plotting - Working With Long Labels
Last active October 25, 2022 18:19
Summary of some of the ways one can work with long labels in both matplotlib & bokeh. Based on an example created in ggplot2 (R) https://www.andrewheiss.com/blog/2022/06/23/long-labels-ggplot/
We couldn’t find that file to show.
#!/usr/bin/env bash
###
# NB: You probably don't want this gist any more.
# Instead, use this version from `fastsetup`:
# https://github.com/fastai/fastsetup/blob/master/setup-conda.sh
###
set -e
cd
@onlurking
onlurking / programming-as-theory-building.md
Last active April 16, 2024 20:57
Programming as Theory Building - Peter Naur

Programming as Theory Building

Peter Naur

Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct

@mjnaderi
mjnaderi / AnkiCardTemplate.md
Last active May 3, 2022 10:00
Anki Card Template
  • Install "Syntax Highlighting for Code" plugin: https://ankiweb.net/shared/info/1463041493

  • In the plugin's options (Tools > Syntax Highlighting Options), set:

    • Line numbers
    • Center code fragments
    • Use CSS classes
  • Enter following HTML and CSS templates in Tools > Manage Note Types > Cards