pip3 install cython
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
Remove photo EXIF metadata with `exiftool` | |
```bash | |
exiftool -EXIF= <filename> | |
``` |
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
# this is a simple example of how to parse an Aranet4 CO2 sensor and plot the data using Julia | |
using Dates | |
using DataFrames | |
using CSV | |
using Plots | |
plotly() | |
fname = "Aranet4 017E9_2020-12-10T05_04_41.csv" |
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
# example of using xargs to find files and sending files to a shell command with complicated file parsing | |
ls *mp4 | xargs -I{} sh -c 'base=$(basename $1 .mp4) ; ffmpeg -i "$1" -vcodec copy -an "${base}"_noaudio.mp4' -- {} |
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
[adsbx] | |
api_key = | |
[search] | |
lat = | |
lon = | |
dist = |
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
import numpy as np | |
from matplotlib.pylab import plt | |
plt.ion() | |
def to_cplx( r ): | |
c = ( r[0::2]-127.5 ) + ( r[1::2]-127.5 )*1.0J | |
return c | |
d = np.fromfile( 'file2019-11-17-21', dtype=np.uint8, count = 2**32 ) |
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 multiprocessing as mp | |
SENTINEL = None | |
dat = range(10) | |
rets = [] | |
def function( *args ): |
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
""" | |
Permeabilities can be found here: | |
https://www.engineeringtoolbox.com/permeability-d_1923.html | |
Resistivity can be found here: | |
http://hyperphysics.phy-astr.gsu.edu/hbase/Tables/rstiv.html | |
""" | |
import numpy as np |
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
# this is a python version of the wideband ambiguity function. A matlab version that it was ported from is below. | |
# https://dsp.stackexchange.com/questions/51372/how-to-calculate-the-ambiguity-function | |
import numpy as np | |
from scipy.interpolate import interp1d | |
from matplotlib import pylab as plt | |
tb = -1 | |
tend = 1 | |
dilation = 0.8 |
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
# Example code for parsing sensor log files from Andriod apps | |
import pandas as pd | |
# SensorDataLogger | |
# https://play.google.com/store/apps/details?id=es.terrik.SensorLogger | |
# 'a' and 'b' are empty colums | |
date_parser = lambda x: pd.datetime.strptime( x, "%Y-%m-%d_%H-%M-%S.%f" ) |
NewerOlder