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
some_list = [1,2,3,4,5,6,7] | |
for element in some_list: | |
print some_list |
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
application: project4 | |
version: 1 | |
runtime: python27 | |
api_version: 1 | |
threadsafe: true | |
handlers: | |
- url: /css | |
static_dir: css | |
- url: /.* |
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
## https://www.udacity.com/course/viewer#!/c-cs101/l-48683810/e-48750084/m-48735060 | |
# Question 5: Date Converter | |
# Write a procedure date_converter which takes two inputs. The first is | |
# a dictionary and the second a string. The string is a valid date in | |
# the format month/day/year. The procedure should return | |
# the date written in the form <day> <name of month> <year>. | |
# For example , if the | |
# dictionary is in English, |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Greg L's Notes</title> | |
<link rel="stylesheet" type="text/css" href="css/style.css"> | |
</head> | |
<body> | |
<div class="page title"> |
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
if next_concept_end >= 0: | |
concept = text[next_concept_start:next_concept_end] | |
else: | |
next_concept_end = len(text) | |
concept = text[next_concept_start:] |
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
while index < len(random_list): | |
number = random_list[index] | |
count_list[number] = count_list[number] + 1 | |
index = index + 1 |
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
#Helper Functions | |
""" | |
Whenever you have a large problem to solve, | |
try to break it down into multiple smaller problems. | |
Then go about solving the smaller problems, and, if | |
possible, turn each solution into its own procedure / function. | |
""" |
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
for note in your_notes: | |
new_note = Notes_db(lesson_number = notes[0], title = notes[1], content = notes[2]) | |
new_note.put() | |
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 os | |
import jinja2 | |
import webapp2 | |
template_dir = os.path.join(os.path.dirname(__file__), 'templates') | |
jinja_env = jinja2.Environment(loader = jinja2.FileSystemLoader(template_dir), autoescape = True) | |
class Handler(webapp2.RequestHandler): | |
def write(self, *a, **kw): |
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 os | |
import jinja2 | |
import webapp2 | |
template_dir = os.path.join(os.path.dirname(__file__), 'templates') | |
jinja_env = jinja2.Environment(loader = jinja2.FileSystemLoader(template_dir), autoescape = True) | |
# class Handler(webapp2.RequestHandler): | |
# def write(self, *a, **kw): |
NewerOlder