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
/* | |
V5 - 2-11-15 - JR | |
This program plays a note at a given bpm through serial MIDI | |
-POT changes the speed notes are played (by multiples of the base tempo) | |
-PROXIMITY SENSOR changes the pitch of the notes played (notes within chord) | |
-BUTTONS select chord from an arrray of chords |
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
/* | |
* MIDI Control Change | |
*/ | |
#include <MIDI.h> | |
MIDI_CREATE_DEFAULT_INSTANCE(); | |
#define potPin A0 // define peripherals |
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
/* | |
MOD | |
POT | |
BUTTONS (toggle) | |
Smoothing | |
CONNECTIONS: | |
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 os | |
import shutil | |
import time | |
# DIRECTORY PATHS ========================= | |
driveName = 'DISK_IMG' | |
drivePath = '../../Volumes/%s' % driveName |
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
#include <iostream> | |
using namespace std; | |
void printTruthTable () { | |
cout << "A B | X" << endl; | |
for (int i = 0; i <= 1; i++){ | |
for (int j = 0; j <= 1; j++){ | |
bool A = i; |
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
def transverse_dict(d, indent=0, level=None, abstract=False): | |
"""Transverse dictionary to see underlying structure | |
indent: amount of indent when outputing to console | |
level: max depth when transversing | |
abstract: if True, prints the datatype for items | |
that are not lists or dicts. | |
if False, prints the items themselves | |
""" |
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
def graphql_query(payload): | |
query = str(payload).replace("'",'%22') | |
r = requests.get("https://example.com/graphql?query={}".format(query)) | |
return r.json() | |
payload = "{__schema{types{name}}}" | |
r = graphql_query(payload) | |
for t in [i['name'] for i in r['data']['__schema']['types']]: | |
print(t) |
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
#!/bin/bash | |
sudo apt-get install git | |
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py | |
sudo python get-pip.py | |
sudo pip install google_images_download | |
#git clone https://github.com/hardikvasa/google-images-download.git | |
#cd google-images-download | |
googleimagesdownload -k "mosquito bite" -i mosquito_bite |