This file contains 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 python | |
import json | |
import colorsys | |
import math | |
def hsv(h, s, v): | |
r, g, b = colorsys.hsv_to_rgb(h, s, v) | |
return (int(r*255)*256 + int(g*255))*256 + int(b*255) | |
arr = [] |
This file contains 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 python | |
import numpy as np | |
from pylab import * | |
x = np.random.randn(65536) | |
m=16 | |
d0 = [0] * m | |
d1 = [0] * m | |
d2 = [0] * m |
This file contains 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 python | |
import struct | |
import sys | |
fin = open(sys.argv[1], 'rb') | |
fout = open(sys.argv[2], 'wb') | |
bin = fin.read() | |
fin.close() |
This file contains 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 python | |
from adf4351usb import ADF4351 | |
import numpy as np | |
import rtlsdr | |
import time | |
import matplotlib.pyplot as plt | |
import scipy.fftpack as sf | |
#start = 390e6 |
This file contains 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
diff --git a/Modules/CMakeASM_YASMInformation.cmake b/Modules/CMakeASM_YASMInformation.cmake | |
index 50b2848..3d7b330 100644 | |
--- a/Modules/CMakeASM_YASMInformation.cmake | |
+++ b/Modules/CMakeASM_YASMInformation.cmake | |
@@ -1,7 +1,13 @@ | |
set(ASM_DIALECT "_YASM") | |
set(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS asm) | |
-if(UNIX) | |
+if(APPLE) |
This file contains 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 python | |
import hid | |
import math | |
verbose = False | |
class ADF4351: | |
DIV1 = 0 | |
DIV2 = 1 | |
DIV4 = 2 |
This file contains 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 python | |
# Fetch temperature from sensortag by bluetooth low energy and feed it up into xively. | |
# Source code is derived from https://github.com/msaunby/ble-sensor-pi | |
# usage: python sensortag2xively.py {mac address} | |
import xively | |
import datetime | |
import sys | |
import time | |
import pytz |
This file contains 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 python | |
from collada import * | |
import numpy | |
mesh = Collada() | |
effect = material.Effect("effect0", [], "phong", diffuse=(1,0,0), specular=(0,1,0)) | |
mat = material.Material("material0", "mymaterial", effect) | |
mesh.effects.append(effect) | |
mesh.materials.append(mat) |
This file contains 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
/* | |
Serial Event example | |
When new serial data arrives, this sketch adds it to a String. | |
When a newline is received, the loop prints the string and | |
clears it. | |
A good test for this is to try it with a GPS receiver | |
that sends out NMEA 0183 sentences. | |
This file contains 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 python | |
from numpy import sin,sign,pi,sqrt | |
import numpy as np | |
import pyaudio | |
import array | |
# generation function derived from WolframAlpha | |
# http://www.wolframalpha.com/input/?i=graph+Hatsune+miku+curve | |
# ignore "RuntimeWarning: invalid value encountered in sqrt" |