Skip to content

Instantly share code, notes, and snippets.

Avatar
🙄

endolith

🙄
View GitHub Profile
@endolith
endolith / FIR_filter_NN.py
Last active May 14, 2022
Neural network learning FIR filter
View FIR_filter_NN.py
"""
Train a neural network to learn an FIR filter.
Created on Fri Aug 3 15:00:40 2018
"""
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense
from tensorflow.keras.callbacks import Callback
import numpy as np
from scipy import signal
@endolith
endolith / pinned
Created Jan 18, 2022
Windows 7 conda "pinned" file
View pinned
python 3.8.*
scikit-learn ==0.24.1
@endolith
endolith / zfft.py
Created Aug 14, 2021 — forked from aluchies/zfft.py
Zoom FFT functionality. Includes implementation of chirpz transform.
View zfft.py
""" Zoom FFT function"""
import numpy as np
from time import time
from scipy.fftpack import fft, ifft
from numpy import swapaxes
def chirpz(x, A=None, W=None, M=None):
"""chirpz(x, A, W, M) - Chirp z-transform of variable x
@endolith
endolith / Weber 1977 all transcriptions.md
Last active Feb 23, 2021
Some quotes from Weber (1978) "Comparison of Public Choice Systems"
View Weber 1977 all transcriptions.md

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 Feb 28, 2022
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 Jan 30, 2022
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 24, 2022
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 Sep 8, 2021
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