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 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" |
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
| @todo_description = "Make the curriculum" | |
| @todo_pomodoro_estimate = 4 |
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
| <p>Let's do some math</p> | |
| 4 + 3 = <%= 4+3 %> |
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
| <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> |
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 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') |
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 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) |
NewerOlder