Skip to content

Instantly share code, notes, and snippets.

View estebanafonso's full-sized avatar

estebanafonso

View GitHub Profile
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
engine = create_engine('postgresql://ubuntu:thinkful@localhost:5432/tbay')
Session = sessionmaker(bind=engine)
session = Session()
Base = declarative_base()
import sys
if len(sys.argv) == 1:
input_val = raw_input("Please enter upper limit:")
elif len(sys.argv) > 1:
input_val = sys.argv[1]
try:
n = int(input_val)
except ValueError:
import sys
if len(sys.argv) == 1:
input_val = raw_input("Please enter upper limit:")
elif len(sys.argv) > 1:
input_val = sys.argv[1]
try:
n = int(input_val)
except ValueError:
@estebanafonso
estebanafonso / index.html
Created April 9, 2015 13:40
Module 4 Assignment
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Assignment 3</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
<style type="text/css">
body {
background-color: white;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Assignment 3</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
<style type="text/css">
body {
background-color: white;
@estebanafonso
estebanafonso / index.html
Created April 2, 2015 13:39
# of Lego Sets Released in 2014 by Theme
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Assignment 3</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
<style type="text/css">
body {
background-color: gray;
@estebanafonso
estebanafonso / index.html
Created April 2, 2015 13:34
# of New Sets Released in 2014 by Theme
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Assignment 3</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
<style type="text/css">
body {
background-color: gray;
@estebanafonso
estebanafonso / index.html
Created March 31, 2015 19:20
Different Lego Sets by Theme 2014
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Assignment 3</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
<style type="text/css">
body {
background-color: gray;
@estebanafonso
estebanafonso / index.html
Created March 31, 2015 19:16
Different Lego Sets by Theme 2014
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Assignment 3</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
<style type="text/css">
body {
background-color: gray;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>LEGO Data!!!</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
<style type="text/css">
svg {