sudo apt install ffmpeg sudo apt install libgtk-3-dev sudo apt install libv4l-dev sudo apt install libtiff-dev sudo apt install libwebp-dev
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
from numpy import * | |
from scipy.signal import cubic | |
def cspline1d_eval(cj, newx, dx=1.0, x0=0): | |
"""Evaluate a spline at the new set of points. | |
`dx` is the old sample-spacing while `x0` was the old origin. In | |
other-words the old-sample points (knot-points) for which the `cj` | |
represent spline coefficients were at equally-spaced points of: |
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 matplotlib.pylab as plt | |
import seaborn as sns | |
import pandas as pd | |
nosoi = pd.read_csv('roc3.txt', names = ['file','name','score'],na_values = ['None','no_persons_found'] ) | |
nosoi.assign(truth=False) # create a column of "false" | |
soi = pd.read_csv('roc_known.txt', names = ['file','name','score'], na_values = ['None','no_persons_found'] ) | |
soi.assign(truth=True) # create a column of Truth = True |
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
from __future__ import print_function | |
from ofxparse import OfxParser | |
import os | |
import re | |
import sys | |
if len(sys.argv) != 1: | |
print ('This utility does not take command-line arguments') | |
exit() |
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
try: | |
# python 3 | |
from io import StringIO | |
except: | |
# python 2 | |
from StringIO import StringIO | |
# some examples from | |
# https://stackoverflow.com/questions/17978092/combine-date-and-time-columns-using-python-pandas |
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" ) |
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
""" | |
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
#!/usr/bin/env python3 | |
import multiprocessing as mp | |
SENTINEL = None | |
dat = range(10) | |
rets = [] | |
def function( *args ): |
OlderNewer