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
import multiprocessing | |
import signal | |
import sys | |
import random | |
import multiprocessing | |
class Markov(object): | |
def __init__(self, open_file): | |
self.cache = {} |
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 | |
### | |
### http://elinks.or.cz/download.html | |
### | |
### http://elinks.or.cz/download/elinks-current-unstable.tar.bz2 | |
### | |
### http://cygwin.com/ml/cygwin-apps/2003-12/msg00323.html | |
### --without-x --enable-leds --enable-fastmem --enable-256-colors |
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
#N canvas 296 286 808 492 10; | |
#X declare -lib mrpeach; | |
#X declare -lib moocow; | |
#X msg 543 65 close; | |
#X msg 637 66 devices; | |
#N canvas 0 309 789 479 bauds 0; | |
#X msg 319 274 baud 57600; | |
#X msg 357 312 baud 230400; | |
#X msg 338 293 baud 115200; | |
#X msg 300 255 baud 38400; |
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/sh | |
#use as get_externals.sh TWITTERACCOUNT USERNAME PASSWORD | |
#account is public but i dont wanna share it | |
mkdir externals && cd externals | |
wget -O temphtml https://twitter.com/$1 && grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' temphtml > ips && rm temphtml | |
read -r ipaddress < ips | |
wget -m ftp://$2:$3@$ipaddress/share/pd/* | |
#mv * ~/externals #THIS LINE DOESN"T WORK | |
rm ips | |
echo "now move these files to the correct directory under ~/pd-externals" |
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/sh | |
USER="$( logname )" | |
ls > allexternals | |
filename="allexternals" #ls > allexternals to get foldernames | |
echo "#N canvas 5 57 450 294 10;" > declareALL.pd #all pd sketches start with this | |
while read -r line | |
do | |
name="$line" | |
echo "#X declare -stdpath /home/$USER/pd-externals/$name;" >> declareALL.pd | |
echo "#X obj 7 34 54 declare -stdpath /home/$USER/pd-externals/$name;" >> declareALL.pd |
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 <OSCBundle.h> | |
#include <SLIPEncodedSerial.h> | |
SLIPEncodedSerial SLIPSerial(Serial); | |
/* | |
1 --------------- VIN | |
0 -| |- GND | |
RST -| |- RST | |
GND -| |- 5V | |
2 -| ARDUINO |- A7 ONLY |
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/sh | |
#wget -O NOR http://www.northofreality.com/tales/2016/7/4/the-inner-hologram 2>/dev/null && grep 'blog-item-content ' NOR | sed 's/<\/p>/\n/g' | sed 's/<p>/\n/g'| sed 's/<div class=\"blog.*div class=\"sqs-block-content">//g'| sed 's/<\/div><\/div>.*//g' | sed 's/\.\ /\./g' | |
#used to practice sed | |
#load front page, grab newest story | |
newest=$( wget -O NOR http://www.northofreality.com/ 2>/dev/null && grep '\/tales\/[0-9]\{4\}\/[0-9]*\/[0-9]*\/[^#]*' NOR -m 1 | sed 's/<a href="//g' | sed 's/#.*//g' | sed 's/ //g') | |
#grab newest story and format for terminal | |
wget -O NOR http://www.northofreality.com$newest 2>/dev/null && grep 'blog-item-content ' NOR | sed 's/<\/p>/\n/g' | sed 's/<p>/\n/g'| sed 's/<div class=\"blog.*div class=\"sqs-block-content">//g'| sed 's/<\/div><\/div>.*//g' | sed 's/\.\ /\./g' |
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
sudo cpufreq-set -g performance | |
wget https://launchpad.net/~canonical-chromium-builds/+archive/ubuntu/stage/+build/7916060/+files/chromium-browser_45.0.2454.85-0ubuntu0.15.04.1.1181_armhf.deb | |
wget https://launchpad.net/~canonical-chromium-builds/+archive/ubuntu/stage/+build/7916060/+files/chromium-chromedriver_45.0.2454.85-0ubuntu0.15.04.1.1181_armhf.deb | |
wget https://launchpad.net/~canonical-chromium-builds/+archive/ubuntu/stage/+build/7916060/+files/chromium-codecs-ffmpeg_45.0.2454.85-0ubuntu0.15.04.1.1181_armhf.deb | |
sudo dpkg -i chromium-browser_45.0.2454.85-0ubuntu0.15.04.1.1181_armhf.deb chromium-chromedriver_45.0.2454.85-0ubuntu0.15.04.1.1181_armhf.deb chromium-codecs-ffmpeg_45.0.2454.85-0ubuntu0.15.04.1.1181_armhf.deb | |
sudo apt-get -f install -y | |
sudo apt-get install dbus-x11 xauth -y #might be unnecessary | |
chromium-browser --noerrordialogs --disable-session-crashed-bubble |
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
/* | |
shift register simpletown for LTC1257 | |
12 bit DAC, 5V, 1.4MHz max clock | |
DIN, CLK, !LOAD | |
________ | |
CLK - - VCC | |
DIN - - VOUT | |
!LOAD - - REF | |
DOUT -________- GND |
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
import os, datetime, time | |
yam = [] #init var | |
timestamp = str(datetime.datetime.now().strftime('%I.%M.%S_%p')) + '.txt' #only once, filename ultimately | |
daystamp = datetime.datetime.fromtimestamp(time.time()).strftime('%Y-%m-%d') #name of folder to put files for today in | |
cwd = os.getcwd() #current working directory | |
opj = os.path.join #more magic - OS PATH JOIN = opj, for windows and linux compatibility | |
folderWithTodaysDate = opj(cwd, daystamp) # folder to place all todays scans in |
OlderNewer