Skip to content

Instantly share code, notes, and snippets.

View endolith's full-sized avatar
😑

endolith

😑
View GitHub Profile
@endolith
endolith / Weber 1977 all transcriptions.md
Last active February 21, 2023 15:26
Some quotes from Weber (1978) "Comparison of Public Choice Systems"

Weber (1978). "Comparison of Public Choice Systems".

I can't find any online OCRed copy of this content, so I'm transcribing a bunch of stuff.

Citation:

Actually this contains three previous unpublished papers, which is why it's sometimes listed as "1977". Example citations for the individual papers:

@endolith
endolith / harris_sivian.py
Last active February 28, 2022 17:30
Brownian noise of air
"""
Created on Wed Nov 04 11:34:53 2015
"""
from numpy import logspace, log10, sqrt, pi
import matplotlib.pyplot as plt
from audio_electronics_shortcuts import dB
import pint
u = pint.UnitRegistry()
@endolith
endolith / readme.md
Last active January 30, 2022 01:40
How to extract images from PDF files recursively in folders in fish shell

Dependencies

sudo apt install poppler-utils imagemagick

To extract all the images:

for file in **.pdf
    pdfimages -all "$file" "$file"
end
Version 4
SHEET 1 880 680
FLAG 64 144 0
FLAG 64 64 signal
IOPIN 64 64 Out
SYMBOL voltage 64 48 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value SINE(0 1 2000)

----------| hyphens
++++++++++| plus
−−−−−−−−−−| minus
| space
          | figure space
          | en space
          | em space

@endolith
endolith / WAV interpretation.md
Last active August 3, 2023 23:45
Interpretation of WAV file sample data and asymmetry

How to handle asymmetry of WAV data?

WAV files can store PCM audio (WAVE_FORMAT_PCM). The WAV file format specification says:

The data format and maximum and minimums values for PCM waveform samples of various sizes are as follows:

Sample Size Data Format Maximum Value Minimum Value
One to eight bits Unsigned integer 255 (0xFF) 0
Nine or more bits Signed integer i Largest positive value of i Most negative value of i
@endolith
endolith / JTree.csv
Last active January 17, 2023 16:24
Joshua Tree rock formation coordinates
ID Name Easting Northing In wild Bolts Target Class Latitude Longitude
402 41-Minute Dome 582177 3769485 yes 0 3 34.0646353 -116.1103329
567 Abbey Rock 587885 3762572 no 34.0018313 -116.0491799
15 AFPA Rock 574435 3766650 no 34.0396500 -116.1944655
664 Africa Face 577147 3772947 no 34.0962388 -116.1645301
709 Afro Awareness Week 577860 3771589 yes 0 3 34.0839397 -116.1569227
376 Afro Blues Wall 579567 3766028 no 34.0336627 -116.1389294
447 Agent Orange Rock 579329 3761185 yes 7 2 33.9900073 -116.1419470
771 Al's Crag 576433 3770207 0 3 34.0715825 -116.1725102
287 Alice In Wonderland Area 579307 3763657 no 34.0123011 -116.1419609
@endolith
endolith / fourex.py
Last active December 2, 2022 00:48 — forked from tartakynov/fourex.py
Fourier Extrapolation in Python
import numpy as np
import pylab as pl
from numpy import fft
def fourierExtrapolation(x, n_predict):
n = x.size
n_harm = 10 # number of harmonics in model
t = np.arange(0, n)
p = np.polyfit(t, x, 1) # find linear trend in x
@endolith
endolith / bootstrap.ipynb
Created November 6, 2019 18:01 — forked from kjordahl/bootstrap.ipynb
Gaussian process bootstrap plots in iPython notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@endolith
endolith / heart_wave_plotter.py
Last active November 5, 2019 02:48
Heartbeat waveform plotter for SpO2 Assistant
from pandas import read_csv
import matplotlib.pyplot as plt
import numpy as np
filename = '20181113000029_wave.csv'
offset = 0 # In samples, the point at which you want the plotting to start
data = read_csv(filename)
data = data[offset:]