Skip to content

Instantly share code, notes, and snippets.

@sdockray
sdockray / service-as-a-service.json
Created October 7, 2021 13:09
Service as a service
This file has been truncated, but you can view the full file.
{"bpm":15,"crossfade":0,"sequencers":[{"name":"Opening Keynote and Keynote Interview with Jeff Bezos - keeping \"as a\" - ","pattern":"1111","interval":"4n","offset":1000,"volume":15,"rate":1,"pitch":0,"sequence":["398.04999999999995-398.27","700.6099999999999-700.8499999999999","703.14-703.39","1024.254999-1024.484999","1034.235-1034.485","1480.2600000000002-1480.4","2667.325-2667.564999","2724.235-2724.455","2861.97-2862.21","3078.45-3078.65","3215.975-3216.225","3269.785-3270.0750000000003"],"samples":{"398.04999999999995-398.27":{"start":398.04999999999995,"end":398.27,"start2":12.599999999999966,"sidx":31,"word":"as a","oWord":"as ","phones":[["ae",0.09],["z",0.08],["ah",0.05]],"mediaId":"2198e20c2a0e","docId":"6eb6699d54","pos":["#Phrase"],"rms":{"points":[[0,0.35],[1,0.76],[2,1.17],[3,1.58]],"equation":[0.41,0.35],"r2":0.54,"string":"y = 0.41x + 0.35"},"spectralSlope":{"points":[[0,1.03],[1,2.13],[2,3.23],[3,4.33]],"equation":[1.1,1.03],"r2":0.57,"string":"y = 1.1x + 1.03"},"mfcc":[{"points":[[0,35.77]
@sdockray
sdockray / service-service.json
Created October 7, 2021 12:56
a service service
{"bpm":0,"crossfade":10,"sequencers":[{"name":"Opening Keynote and Keynote Interview with Jeff Bezos - including human - keeping \"human as\" - including service - ","pattern":"1111","interval":"4n","offset":0,"volume":10,"rate":1,"pitch":0,"sequence":["606.29-607.619999","700.0799999999999-701.4799989999999","702.6899999999999-704","825.8-826.99","874.71-876.8499999999999","881.26-882.4999989999999","882.4999989999999-883.17","885.73-886.92","888.64-890.339999","894.81-895.8099990000001","925.0899999999999-926.139999","1039.2549999999999-1040.385","1046.495-1048.095","1054.175-1055.655","1090.0049999999999-1091.205","1157.345-1158.855","1163.745-1166.865","1164.975-1166.075","1401.97-1403.299999","1405.0600000000002-1406.5700000000002","1410.43-1411.8300000000002","1707.16-1708.03","1834.2-1836.21","1947.33-1948.78","2304.83-2307.319999","2311.1499999999996-2312.04","2319.67-2321.6299999999997","2359.58-2360.6099999999997","2527.75-2528.63","3683.8999999999996-3684.91"],"samples":{"825.8-826.99":{"start":825
{"bpm":30,"crossfade":0,"sequencers":[{"name":"human as a service","pattern":"111110111110111111","interval":"4n","offset":700,"volume":10,"rate":1,"pitch":0,"sequence":["3523.1499999999996-3524.64","3383.705-3385.334999","2911.45-2912.2999999999997","2882.59-2884.11","2854.589999-2856.409999","3343.815-3344.644999","2936.88-2940.38","3146.605-3148.255","886.96-887.48","985.385-986.375","995.605-996.375","1003.054999-1003.935","2014.77-2015.8600000000001","1307.175-1308.295","1400.2099990000002-1401.44","1937.26-1938.62","2232.949999-2234.949999","2253.69-2254.509999","393.509999-394.42999999999995","1010.1949999999999-1011.035","3548.2799999999997-3549.16","105.76999900000001-107.119999","767.17-767.9","2357.5899999999997-2358.37","1431.89-1432.63","1993.96-1995.3400000000001","751.8499999999999-753.259999","1971.77-1973.48","1781.1-1782.1100000000001","3244.035-3245.355","1740.21-1741.28","1352.8400000000001-1353.789999","1243.215-1244.885","1308.695-1310.835","1945.2-1946.0700000000002","901.67-902.68","10
@sdockray
sdockray / beckett-variations-3.json
Created October 6, 2021 11:47
Beckett Variations 3
{"bpm":50,"sequencers":[{"name":"","interval":"4n","offset":0,"volume":10,"rate":0.9,"pitch":0,"sequence":["18.359999-18.789998999999998","20.78-21.02","22.91-23.37","25.33-25.79","28.18-28.57","30.29-30.57","31.57-32","34.22-34.51","36.309999000000005-36.639999"],"samples":{"20.78-21.02":{"start":20.78,"end":21.02,"start2":15.57,"word":"i","oWord":"I ","phones":[["ay",0.24]],"mediaId":"e4f4d0e9b1fd","docId":"98f3aead6e","pos":["Pronoun","Noun","Singular"],"rms":{"points":[[0,1.04],[1,1.55],[2,2.06],[3,2.57],[4,3.08]],"equation":[0.51,1.04],"r2":0.36,"string":"y = 0.51x + 1.04"},"spectralSlope":{"points":[[0,1.55],[1,2.31],[2,3.07],[3,3.83],[4,4.59]],"equation":[0.76,1.55],"r2":0.49,"string":"y = 0.76x + 1.55"},"mfcc":[{"points":[[0,43.95],[1,69.64],[2,95.33],[3,121.02],[4,146.71]],"equation":[25.69,43.95],"r2":0.5,"string":"y = 25.69x + 43.95"},{"points":[[0,33.99],[1,49.16],[2,64.33],[3,79.5],[4,94.67]],"equation":[15.17,33.99],"r2":0.42,"string":"y = 15.17x + 33.99"}],"zcr":43.425338225510686,"display":"I
@sdockray
sdockray / example.py
Created May 6, 2020 13:13
Two functions for indexing a page
import spacy
nlp = spacy.load('en_core_web_sm')
def add_to_index(index, content, file_name, page_num):
doc = nlp(filter_text(content))
interesting_entities = ['PERSON', 'WORK_OF_ART', 'LOC', 'GPE']
the_entities = []
for entity in doc.ents:
if entity.label_ in interesting_entities:
index.setdefault(entity.text, {})
@sdockray
sdockray / Floyd-fast-style-transfer-run.txt
Last active February 26, 2018 04:53
Floyd: fast-style-transfer: run
floyd run --gpu --env tensorflow-0.12:py2 --data narenst/datasets/coco-train-2014/1:images --data floydhub/datasets/imagenet-vgg-verydeep-19/3:vgg "python style.py --style examples/style/scarry-small.jpg \
--checkpoint-dir /output \
--train-path /images/train2014 \
--vgg-path /vgg/imagenet-vgg-verydeep-19.mat \
--content-weight 1.5e1 \
--checkpoint-iterations 1000 \
--batch-size 20"
@sdockray
sdockray / index.js
Created September 13, 2017 12:16
sparse dat metadata wonkiness
var Dat = require('dat-node')
var messages = require('dat-protocol-buffers');
Dat('bpp', {
key: 'c6ea9ce5627140020b15de05ecb054e8d1a354559e4a0b9b2295d22d87de632b',
sparse: true,
temp: true,
}, function (err, dat) {
if (err) throw err
dat.joinNetwork()
@sdockray
sdockray / dat-node-example.js
Created February 20, 2017 00:15
Basic dat-node example to clone a dat
var path = require('path')
var Dat = require('dat-node')
var testDir = path.join(__dirname, 'test-dir')
opts = {
key: 'fbdf68b3d65bd1cb46057d9b014a8db269a969185e435f683222d05f0809570e',
}
Dat(testDir, opts, function (err, dat) {

Keybase proof

I hereby claim:

  • I am sdockray on github.
  • I am spd (https://keybase.io/spd) on keybase.
  • I have a public key whose fingerprint is D8EC 5D27 EFD9 B867 3207 E09C DB9E B4B9 28B4 C4A6

To claim this, I am signing this object: