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
<json> ::= <primitive> | <container> | |
<primitive> ::= <number> | <string> | <boolean> | |
; Where: | |
; <number> is a valid real number expressed in one of a number of given formats | |
; <string> is a string of valid characters enclosed in quotes | |
; <boolean> is one of the literal strings 'true', 'false', or 'null' (unquoted) | |
<container> ::= <object> | <array> | |
<array> ::= '[' [ <json> *(', ' <json>) ] ']' ; A sequence of JSON values separated by commas |
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 a library of functions called 'pygame' | |
import pygame | |
import numpy as np | |
# Width and height of display | |
WIDTH = 255>>0 | |
HEIGHT = 65>>0 | |
# Downscale to ripple grid | |
SHFT = 2 |
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
# See below for algorithm details | |
# https://web.archive.org/web/20160418004149/http://freespace.virgin.net/hugo.elias/graphics/x_water.htm | |
// GRID_MAX refers to the maximum position of an LED via map_led_to_point | |
#define LED_GRID_MAX_Y 65 | |
#define LED_GRID_MAX_X 255 | |
// Number to shift right by to get to ripple grid | |
#define GRID_COARSE 4 |
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
def match(path, expr): | |
names = expr.split('.')[1:] | |
curr_name = 0 | |
curr_path = 0 | |
wildpath = False | |
while curr_path < len(path): | |
el = path[curr_path] | |
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 | |
import matplotlib | |
import scipy | |
from scipy.optimize import curve_fit | |
#matplotlib,pgetu,emcee,astropy,warnings | |
#from scipy import ndimage,optimize; from scipy.optimize import fmin | |
import matplotlib.pyplot as plt | |
import sys | |
import datetime | |
import matplotlib.dates as mdates |
OlderNewer