Skip to content

Instantly share code, notes, and snippets.

View caseyanderson's full-sized avatar

Casey Anderson caseyanderson

View GitHub Profile
@caseyanderson
caseyanderson / NLP_NLTK.md
Last active April 14, 2021 15:06
Natural Language Processing w/ NLTK (Python3)

Natural Language Processing w/ NLTK (Python3)

Pre-flight

(assumes a working Anaconda installation)

  1. Create an Anaconda environment for this workshop: conda create -n scraping python=3.8
  2. Activate the scraping environment: conda activate scraping
  3. Install nltk to our environment: pip install nltk
  4. Instal matplotlib to our environment: pip install matplotlib
  5. Run jupyter notebook in our environment: jupyter notebook
@caseyanderson
caseyanderson / micropython_mac_setup.markdown
Last active January 19, 2020 22:17
describes the installation procedure for MicroPython development under MacOS
@caseyanderson
caseyanderson / subsonic_cleanup.py
Last active November 10, 2019 02:32
cleanup filenames of .wav files for subsonic
"""
subsonic_cleanup
example input: "the body - No One Deserves Happiness - 01 Wanderings.wav"
example output: "01 Wanderings.wav"
usage: python3 subsonic_cleanup.py --path "the body - No One Deserves Happiness/" --ext "wav"
TODO:
* check to see if album or artist has digit, need alternate procedure for such a case
@caseyanderson
caseyanderson / micropython_win_setup.markdown
Last active August 10, 2022 06:27
describes the installation procedure for MicroPython development under Windows 10
// Filter MIDI Messages by srcID
// (example)
s.boot;
MIDIIn.connectAll;
~organPort = MIDIIn.findPort("QuNexus", "Port 1");
~buttonPort = MIDIIn.findPort("Midi Fighter 3D", "Midi Fighter 3D");
~twisterPort = MIDIIn.findPort("Midi Fighter Twister", "Midi Fighter Twister");
/*
midi controls gui
written for midifighter twister
HT Scott Cazan for line 55
*/
s.boot;
MIDIIn.connectAll;
// route + mix
s.options.memSize = 2097152;
s.options.numInputBusChannels = 8;
s.options.numOutputBusChannels = 8;
s.boot;
/*
midi controls gui
written for midifighter twister
HT Scott Cazan for line 40
*/
s.boot;
MIDIIn.connectAll;
DummyMIDI {
var dummy = 0;
*new {
^super.newCopyArgs();
}
noteOn {}
noteOff {}
control {}
#!/usr/bin/env python3
'''
Trigger a print message when sensor value meets test condition
To Run: python3 trigger.py --pin 13 --chn 0
'''
from gpiozero import MCP3008
from gpiozero import Button