I hereby claim:
- I am taylormutch on github.
- I am taylorm (https://keybase.io/taylorm) on keybase.
- I have a public key ASAkprTThdWPtgBs-w2JCFq6dzV2KLZ0mfiXuFbs2SlyBQo
To claim this, I am signing this object:
package main | |
import ( | |
"crypto" | |
_ "crypto/sha512" | |
"fmt" | |
) | |
func main() { |
I hereby claim:
To claim this, I am signing this object:
// See line 300 for changes that differ from OrbitControls.js | |
// @author TaylorMutch / https://github.com/TaylorMutch | |
/** | |
* @author qiao / https://github.com/qiao | |
* @author mrdoob / http://mrdoob.com | |
* @author alteredq / http://alteredqualia.com/ | |
* @author WestLangley / http://github.com/WestLangley | |
* @author erich666 / http://erichaines.com | |
*/ |
float when_eq(float x, float y) { | |
return 1.0 - abs(sign(x - y)); | |
} | |
float when_neq(float x, float y) { | |
return abs(sign(x - y)); | |
} | |
float when_gt(float x, float y) { | |
return max(sign(x - y), 0.0); |
""" | |
Extracts JPGs from a PDF. Inspired by this StackOverflow post: | |
https://stackoverflow.com/questions/2693820/extract-images-from-pdf-without-resampling-in-python | |
""" | |
import sys | |
with open(sys.argv[1],"rb") as file: | |
file.seek(0) | |
pdf = file.read() |
import os, sys | |
exts = ['.py', '.ini', '.c', '.h'] | |
count_empty_line = True | |
here = os.path.abspath(os.path.dirname(sys.argv[0])) | |
def read_line_count(fname): | |
count = 0 | |
for line in open(fname).readlines(): | |
if count_empty_line or len(line.strip()) > 0: |
>>> from jerilyn import build_night_classification | |
>>> data = build_night_classification('path/to/sodar_data', 'path/to/classification.csv') | |
# Keys for accessing the top layer of data | |
>>> data[0].keys() | |
dict_keys(['mcrae_speeds', 'date', 'meta', 'primet_directions', 'mcrae_directions', 'primet_speeds']) | |
# Keys for accessing the criterion | |
>>> data[0]['meta'].keys() | |
dict_keys(['pulsing', 'mesoscale_forcing', 'date', 'direction', 'year', 'month', 'day', 'valley_jet', 'similar']) |
''' | |
Collect each of Jerilyn's nights into a dictionary structure, and packs and reloads it from a db if necessary for speed. | |
''' | |
import os | |
import sys | |
import csv | |
import sqlite3 | |
import datetime | |
from sodar_utils import SodarCollection, register_adapters, datetime_to_name |
# Compare two nights | |
from sodar_utils import SodarCollection | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import matplotlib.colors as col | |
import matplotlib as mpl | |
def cyclic_colormap(): |
from sodar_utils import SodarCollection | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import matplotlib.colors as col | |
sodars = SodarCollection('sodar_data/Primet') | |
data = sodars.night_array('direction') | |
def cyclic_colormap(): |