Skip to content

Instantly share code, notes, and snippets.

@ekerstein
ekerstein / gluonts_example_feat_dynamic_real.py
Created September 28, 2022 02:43
GluonTS - feat_dynamic_real example
from gluonts.dataset.common import ListDataset
from gluonts.model.deepar import DeepAREstimator
from gluonts.evaluation import make_evaluation_predictions, Evaluator
from gluonts.mx import Trainer
from itertools import tee
import pandas as pd
import random
import json
@ekerstein
ekerstein / purpleair.py
Created August 25, 2019 18:17
Python script to pull PurpleAir data for multiple sensors from the Thingspeak API, combine them, and export a CSV file. To run this script you'll need to adjust the "user config" section, and you may also want to adjust the Thingspeak query parameters starting on row 49.
import requests # for url requests
from statistics import median # for median of array
import json # for json reading/writing
import time # for epoch timestamp
import csv # for writing csv files
#################################################
# USER CONFIG
data_dir = '/code/data/' # keep trailing slash
@ekerstein
ekerstein / blockstack
Created October 30, 2017 03:19
blockstack verification
Verifying my Blockstack ID is secured with the address 1M7WKuhfkdmGAypoB78payMnYtU7a1MPYB
@ekerstein
ekerstein / onename
Created September 9, 2017 07:38
onename confirmation
Verifying that "ekerstein.id" is my Blockstack ID. https://onename.com/ekerstein