This file contains hidden or 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
#!/usr/bin/env python3 | |
from heapq import heappush, heappop | |
median = None | |
heap_lower = [] | |
heap_upper = [] | |
len_lower = 0 |
This file contains hidden or 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
#!/usr/bin/env python3 | |
# Or python2 | |
import itertools | |
import collections | |
# @profile | |
def get_primes(nMax): | |
"""Return a set of prime numbers under nMax |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import math | |
import numpy as np | |
import matplotlib.pyplot as plt | |
# def string_shannon(data): | |
# '''Performs a Shannon entropy analysis on a given block of data. |
This file contains hidden or 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
#!/usr/bin/env bash | |
worklog_dir="worklog" | |
editor="subl" | |
show_usage () { | |
cat <<-EOF | |
Create a diary text file by week in the $worklog_dir subdirectory | |
by the year and month. Automagically adds a heading to the file | |
and opens the file with $editor to the current* date. |
This file contains hidden or 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
#!/bin/bash | |
cachedir="${XDG_CACHE_HOME:-$HOME/.cache}" | |
synclient ClickFinger3=2 | |
synclient TapButton3=2 | |
synclient EmulateMidButtonTime=50 | |
pkill syndaemon | |
syndaemon -d -t -K -i 1.0 |
This file contains hidden or 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
# Dockerfile for Kurso de Esperanto | |
# !!!!!!!!! NOT WORKING !!!!!!!! | |
# `WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded` | |
# Sound fails to play through the container | |
FROM ubuntu:16.04 | |
RUN apt-get update && apt-get update \ | |
&& apt-get install -y \ | |
liboss4-salsa-asound2 \ |
This file contains hidden or 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
#!/usr/bin/env python3 | |
# export PYTHONSTARTUP="$HOME/.pythonrc" | |
# Allow you to quit from python/IPython with a `q` statement | |
# instead of just `quit` or `exit()` | |
import sys | |
from functools import wraps |
This file contains hidden or 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
#!/usr/bin/env bash | |
# Blink out text using the Pi's built-in status LED | |
# Example usage: ./morse_echo.sh hello world | |
# Requires root for the Raspberry Pi | |
DIT_SPACE="0.2" | |
INTER_CHARACTER_SPACE="0.4" # 2xDIT_SPACE for normal timing (3 total) | |
INTER_WORD_SPACE="0.8" # 4xDIT_SPACE for normal timing (7 total) | |
# Increase INTER_WORD_SPACE and INTER_CHARACTER_SPACE more than "normal" for Farnsworth timing |
This file contains hidden or 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
/* | |
Make Better Choices | |
Single-board/panel Eurorack module | |
1 audio/cv input | |
1 audio/cv output | |
1 gate/trigger input or output | |
1 potentiometer | |
2 RGB LEDs |
This file contains hidden or 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
#!/usr/bin/env python3 | |
""" | |
Notices your logging, OwO what's this? | |
""" | |
import logging | |