Skip to content

Instantly share code, notes, and snippets.

@apullin
apullin / deepar_multivar_ex.py
Created March 9, 2022 20:01
Minimal example of data setup for running DeepAR on multiple simultaneous related timeseries
## first cat : 2 individual, 0 or 1
## second cat: 2 vars, 0 or 1
freq = "5min"
prediction_length = 10
context_length = 20
feat_00 = list( np.random.randn( 300 ) )
feat_01 = list( np.random.randn( 300 ) )
feat_10 = list( np.random.randn( 300 ) )
@apullin
apullin / gluonts_gpu_test.ipynb
Last active March 8, 2022 00:10
Example jupyter notebook, comparing gluonts on CPU and GPU, on AWS EC2 ml.g4dn.xlarge
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@apullin
apullin / mbt_tone.py
Created June 23, 2018 04:45
Python code to start & stop Bluetooth carrier TX for bt_mfg_test app
#!/anaconda3/bin/python
import serial
import sys
import ctypes
def tone(ser, frequency, power, onoff = True):
if (frequency < 2402) or (frequency > 2480):
print("Frequency must be between 2402-2480 Mhz")
if type(frequency) != int: