Skip to content

Instantly share code, notes, and snippets.

🙄

endolith

🙄
View GitHub Profile
@endolith
endolith / harris_sivian.py
Last active Jun 26, 2020
Brownian noise of air
View harris_sivian.py
"""
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 Jun 3, 2020
How to extract images from PDF files recursively in folders in fish shell
View readme.md

Dependencies

sudo apt install poppler-utils imagemagick

To extract all the images:

for file in **.pdf
    pdfimages -all "$file" "$file"
end
View WAV output.asc
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)
View spaces.md

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

@endolith
endolith / WAV interpretation.md
Last active May 18, 2020
Interpretation of WAV file sample data and asymmetry
View WAV interpretation.md

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 Mar 11, 2020
Joshua Tree rock formation coordinates
View Jtree.csv
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 Feb 10, 2020 — forked from tartakynov/fourex.py
Fourier Extrapolation in Python
View fourex.py
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 Nov 6, 2019 — forked from kjordahl/bootstrap.ipynb
Gaussian process bootstrap plots in iPython notebook
View bootstrap.ipynb
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 Nov 5, 2019
Heartbeat waveform plotter for SpO2 Assistant
View heart_wave_plotter.py
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:]
@endolith
endolith / window_properties.py
Last active Nov 19, 2019
Window function property testing
View window_properties.py
"""
Created on Wed Aug 03 11:56:41 2016
"""
from scipy.signal.windows import (boxcar, hann, hamming, bartlett, bohman,
blackman, parzen, blackmanharris, cosine,
kaiser, tukey, gaussian)
from scipy.fftpack import fft
import numpy as np
import matplotlib.pyplot as plt
You can’t perform that action at this time.