Skip to content

Instantly share code, notes, and snippets.

@mandyRae
mandyRae / tictac.py
Last active July 11, 2016 16:55
Raspberry Pi's GPIO pins with some LEDs and pushbuttons to make a tic tac toe arcade game; Python RPi.GPIO with PWM
'''
Tic Tac Toe -- Raspberry Pi GPIO -- v0.0
Amanda on Electrothoughts -- March 2016
--arcade game
--four-way keypad
--3x3 LED grid
--sound FX
--decent computer AI
--uses software PWM
@mandyRae
mandyRae / pi.py
Created March 15, 2016 12:26
Happy Pi Day!!!!
import time
j = 0
pi = 0
plusminus = True
start_time = time.time()
while True:
if j%2 == 1:
if plusminus == True:
pi += (1/j)
@mandyRae
mandyRae / relaylight.ino
Last active April 2, 2016 20:41
ultrasonic sensor and power relay to control desk lighting
/*
Using an Arduino with a Power Relay
Parts used:
--ultrasonic sensor
--desk lamp
--Arduino Uno
--120v relay
'''
Large Seven-Segment Display
Python Code for controlling display with a Raspberry Pi's GPIO
Written by Amanda on electrothoughts.wordpress.com, Aug 25, 2015
Modify this code to your heart's content!
This code contains function definitions. To make your display work,
it's recommended that you run the code in the Python shell IDE as root, and execute
functions from there, for example enter the following in a terminal:
@mandyRae
mandyRae / data.py
Created May 11, 2016 18:43
data for bioinformatics research on genes and proteins, goes with bioinfo.py
'''
Data file for bioinformatics research project
All of the following are genes were parsed for this project.
All are copied from NCBI's Nucleotide Database. Links are provided.
'''
'''GENES FROM CHROMOSOME 10 USED TO FIND CG CONTENT'''
#length 3618, http://www.ncbi.nlm.nih.gov/nuccore/XM_011539816.1
@mandyRae
mandyRae / bioinfo.py
Created May 11, 2016 18:48
code to parse and analyze nucleotide sequences and genetic mutations, bioinformatics research project
import data
#sequence = 'cgauggccuaaguuaaagcauccaagcguagauaauagugga'
'''
Functions defined here:
convertDNAtoRNA(sequence)
countNucleotides(sequence)
getLength(sequence)
sequenceIsValid(sequence)