Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:2b0057624a44e2af60888a42742bbe762418cead2ab2d9482634c9fb2d081d28" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
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
What is the topic you'd like to explore? | |
Bike sharring in cities | |
Why is this topic personally important to you? What is it about the topic that most fascinates you? | |
I personally bike everywhere. The social factor of sharing bikes, what gets ppl to use bike share vs buying their own bike and the amount of data the could be gathered using bike share. | |
What is the question, or what are the main questions, that you'd like to answer about this topic? | |
The hot destinations people travel from/to most. The time it takes people to travel those destinations. I would eventually encourage safer bike paths and relevant advertising placed along the popular routes. | |
What are the types of available data relevant to your questions? |
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
from collections import Counter | |
food_order = ["burger", "fries", "burger", "tenders", "apple pie"] | |
print Counter(food_order) |
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 bike_cls | |
wheel1 = bike_cls.Wheels("wheel1", 10, 30) | |
wheel2 = bike_cls.Wheels("wheel2", 8, 25) | |
wheel3 = bike_cls.Wheels("wheel3", 6, 20) | |
frame1 = bike_cls.Frames("frame1", 15, 40) | |
frame2 = bike_cls.Frames("frame2", 10, 50) | |
frame3 = bike_cls.Frames("frame3", 13, 45) |
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
class Wheels(): | |
def __init__(self, name, weight, cost): | |
self.name = name | |
self.weight = weight | |
self.cost = cost | |
class Frames(): | |
def __init__(self, composition, weight, cost): | |
self.composition = composition | |
self.weight = weight |
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
#Write one function that determines if one number is evenly divisible by another and returns true or false | |
def divisible_by(x, y): | |
if x % y == 0: | |
return True | |
else: | |
return False | |
import sys | |
if len(sys.argv) > 1: | |
# user supplied value |
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
#I don't understand the need for classes or use of classes. What's __repr__? Why do we have to use the double underscore before the term both for __init__ and __repr__. | |
class coordinate(object): | |
def __init__(self, x, y): | |
self.x = x | |
self.y = y | |
def __repr__(self): | |
return "coord: " + str(self.__dict__) | |
def add(a, b): | |
return coordinate(a.x + b.x, a.y + b.y) |