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 os | |
git_version_hook_lines = [ | |
"#!/bin/sh\n", | |
"git_version_str=$(printf '#define GIT_VERSION_STRING \"%s\"' $(git rev-parse --short=16 HEAD))\n", | |
"echo $git_version_str\n", | |
"echo $git_version_str > ./git_version.h\n", | |
] | |
hooks_dir = os.path.join(os.getcwd(), '.git', 'hooks') |
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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <math.h> | |
#ifndef NO_LIBSNDFILE | |
#include <sndfile.h> | |
#endif | |
#include "soundpipe.h" | |
int sp_create(sp_data **spp) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 time | |
import numpy as np | |
fs_list = [120.0, 2.0] | |
dt_list = [1/fs for fs in fs_list] | |
prevt_list = [time.time(), ] * len(fs_list) | |
sample_times = [list() for fs in fs_list] | |
timeout_seconds = 10 | |
sleep_seconds = min(dt_list) * 0.1 |
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
#include <stdio.h> // for printf | |
#include <math.h> // for testing only, not used by cordic | |
#include "cordic-32bit.h" // for actual cordic algo | |
//Print out sin(x) vs fp CORDIC sin(x) | |
int main(int argc, char **argv) | |
{ | |
float p; | |
// sin_int, cos_in; |
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 threading | |
import serial | |
import queue | |
import time | |
# make thread-safe queue for data logging/writing | |
global_dataMsgQ = queue.Queue() | |
# make a thread-safe queue to inform different threads when it's time to stop | |
global_stopQ = queue.Queue() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 io | |
import numpy as np | |
from numpy.random import randint, standard_normal | |
dtypes = ('float32', 'float64', 'int64', 'int32', 'int16') | |
def make_random_array(): | |
s = randint(1, 5, size=randint(1, 5)) | |
d = dtypes[randint(0, len(dtypes))] |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>My first three.js app</title> | |
<style> | |
body { margin: 0; } | |
canvas { display: block; } | |
</style> | |
</head> |
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 socket | |
import sys | |
msgFromClient = "Hello UDP Server" | |
if len(sys.argv) >= 2: | |
msgFromClient = sys.argv[1] | |
bytesToSend = str.encode(msgFromClient) | |
serverAddressPort = ("192.168.0.174", 3333) |