This file contains hidden or 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
| ### Keybase proof | |
| I hereby claim: | |
| * I am pingswept on github. | |
| * I am brandonstafford (https://keybase.io/brandonstafford) on keybase. | |
| * I have a public key whose fingerprint is 96E3 30F7 534B B328 14BD 92AF F3B1 AADE 8B45 35C0 | |
| To claim this, I am signing this object: |
This file contains hidden or 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
| # Add in cat /etc/supervisor/conf.d/smack-blog.conf | |
| # | |
| # [program:smack-blog] | |
| # command=/root/smack-blog.py | |
| #!/usr/bin/python | |
| import Adafruit_BBIO.UART as UART | |
| import os, pytumblr, serial, time |
This file contains hidden or 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 time | |
| TUBES = range(1,49) | |
| while(1): | |
| ReadOpticalSensors() | |
| ReadTemperatures() | |
| ReadFluidFlowStatus() | |
| (speeds, temps, flows) = DecideExperimentSpecificStuff() # This is where the custom stuff goes! |
This file contains hidden or 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
| [optical density] | |
| max_od=0.25 | |
| min_od=0.1 | |
| od_logging_interval=30 | |
| [stirrer] | |
| speed="medium" | |
| [temperature] | |
| target=37.0 |
This file contains hidden or 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 csv, re, requests | |
| pattern = re.compile('<li>REPRESENTATIVE: (\d\d)</li>\n\t\t\t<li>SENATORIAL: (\d\d)</li>') | |
| infile = csv.reader(open('addresses.csv', 'r')) | |
| with open('output.csv', 'wb') as outfile: | |
| for line in infile: | |
| unique_id = line[0] | |
| address = line[1] |
This file contains hidden or 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 <SPI.h> | |
| #define RESOLUTION 18 | |
| #define SCALE_FACTOR 0.00003814697265625 | |
| // 10/(2^18) = 0.00003814697265625 | |
| #define BUSY 3 | |
| #define RESET 4 | |
| #define START_CONVERSION 5 | |
| #define CHIP_SELECT 10 |
This file contains hidden or 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
| /**************************************************************************/ | |
| // Based on code from Adafruit's PN532 NFC shield example | |
| // BSD license | |
| /**************************************************************************/ | |
| #include <Wire.h> | |
| #include <Adafruit_NFCShield_I2C.h> | |
| #define IRQ (2) |
This file contains hidden or 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
| server { | |
| listen 0.0.0.0:80; | |
| server_name test.rascalmicro.com; | |
| access_log /var/log/nginx/test.rascalmicro.com/access.log; | |
| error_log /var/log/nginx/test.rascalmicro.com/error.log; | |
| location / { # catch-all directive | |
| proxy_set_header X-Real-IP $remote_addr; |
This file contains hidden or 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
| void setup() { | |
| //set pins to output because they are addressed in the main loop | |
| pinMode(7, OUTPUT); | |
| pinMode(8, OUTPUT); | |
| pinMode(11, OUTPUT); | |
| pinMode(13, OUTPUT); | |
| } | |
| void loop() { |
This file contains hidden or 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 insert_post_into_database(list_of_posts): | |
| import sqlite3 | |
| con = sqlite3.connect('ghost-dev.db') | |
| cur = con.cursor() | |
| for post in list_of_posts: | |
| print(post) | |
| cur.execute('INSERT INTO posts(uuid, title, slug, markdown, featured, page, status, language, author_id, created_at, created_by) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', post) |