Skip to content

Instantly share code, notes, and snippets.

View allgenesconsidered's full-sized avatar

Michael Olvera allgenesconsidered

View GitHub Profile
def show
# If the user types in /todo/show/1 to the URL
# make @todo_description equal "Make the curriculum"
# and
# make @todo_pomodoro_estimate equal "4"
#
# If the user types in /todo/show/2 to the URL
# make @todo_description equal "Buy workshop supplies"
# and
# make @todo_pomodoro_estimate equal "3"
@todo_description = "Make the curriculum"
@todo_pomodoro_estimate = 4
<p>Let's do some math</p>
4 + 3 = <%= 4+3 %>
<div id="new-todo-block">
<input class="text-input" id="new-todo-description" type="text" placeholder="Add a new todo...">
<input class="text-input" id="new-pomodoro-estimate" type="number" placeholder="Pomodoro estimate...">
<input class="button" id="add-new-todo-button" type="submit" value="Submit Button">
</div>
@allgenesconsidered
allgenesconsidered / premed_mcat.py
Created June 11, 2017 03:24
Get MCAT data from /r/premed
import praw
import re
import csv
reddit = praw.Reddit(client_id='WOULDNT',
client_secret='YOU',
password='LIKE',
user_agent='TO',
username='KNOW',
redirect_uri='http://localhost:8080')
def fibBase(n,m):
"""
Calcultates the number of rabbit pairs alive at month n assuming
rabbits live for m months.
Input: Number of months n and rabbit lifespan m
Output: Number of rabbit pairs alive at month n
"""
memo = {0:0,1:1} # dict of (month:# of pairs)
return fibMortal(n,m,memo)