Skip to content

Instantly share code, notes, and snippets.

View laurenrace's full-sized avatar

Lauren Race laurenrace

View GitHub Profile
@laurenrace
laurenrace / rwetfinal.py
Created April 27, 2018 03:15
rwetfinal
# coding: utf-8
# In[1]:
lines = [item.strip() for item in open('letranger.txt').readlines()]
# In[2]:
@laurenrace
laurenrace / assignment6.py
Created April 13, 2018 01:20
assignment 6
import json
color_data = json.loads(open("xkcd.json").read())
def hex_to_int(s):
s = s.lstrip("#")
return int(s[:2], 16), int(s[2:4], 16), int(s[4:6], 16)
import math
def distance(coord1, coord2):
@laurenrace
laurenrace / darwin.py
Created March 30, 2018 16:57
markov darwin
from collections import Counter
from collections import Counter
from markov import *
darwin_str = open("darwin.txt").read()
markmodel = markov_model(4, darwin_str)
@laurenrace
laurenrace / markov.py
Created March 30, 2018 16:21
Markov Darwin Chain
from collections import Counter
from collections import Counter
from markov import *
darwin_str = open("darwin.txt").read()
markmodel = markov_model(4, darwin_str)
# coding: utf-8
# In[102]:
get_ipython().system('pip install tracery')
# In[103]:
@laurenrace
laurenrace / stresscontrolfinal.js
Created March 7, 2018 02:10
stresscontrolfinal
#include <DmxSimple.h>
const int analogInPin = A0; //analog input pin for pressure sensor
// variables:
int sensorValue = 0; // the sensor value
int sensorMin = 1023; // minimum sensor value
int sensorMax = 0; // maximum sensor value
@laurenrace
laurenrace / stresscontroller.js
Created March 6, 2018 20:48
stresscontroller
#include <DmxSimple.h>
const int analogInPin = A0; //analog input pin for pressure sensor
// variables:
int sensorValue = 0; // the sensor value
int sensorMin = 1023; // minimum sensor value
int sensorMax = 0; // maximum sensor value
//int sensorMin = 54; // minimum sensor value
//int sensorMax = 200; // maximum sensor value
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@laurenrace
laurenrace / amyrobert.ipynb
Created February 23, 2018 05:53
amy robert
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@laurenrace
laurenrace / allwayssummer.js
Created February 19, 2018 20:33
always summer
<!-- load the jquery library. jquery is a javascript library that is essentially shorthand for js
when you see the $ in javascript, that means you're working with jquery -->
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
<div style="background: #ffff00ff;">The page where it's <br /> always summer ☀️🌴🍹</div>
<html>
<br /><br />
<style>
div {