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 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) |
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
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 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 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 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 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 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 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 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Battery Voltage</title> | |
{% include "include/rascal-head.html" %} | |
<style> | |
#chart1 { | |
margin-top: 20px; | |
margin-left: -40px; | |
height: 400px; |
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 <Adafruit_NeoPixel.h> | |
#define PIN 6 | |
// Parameter 1 = number of pixels in strip | |
// Parameter 2 = Arduino pin number (most are valid) | |
// Parameter 3 = pixel type flags, add together as needed: | |
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs) | |
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers) | |
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products) |
OlderNewer