This file contains 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
CREATE DATABASE iris; |
This file contains 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
# Imports | |
import pandas as pd | |
from sqlalchemy import create_engine | |
# This CSV doesn't have a header so pass | |
# column names as an argument | |
columns = [ | |
"sepal_length", | |
"sepal_width", | |
"petal_length", |
This file contains 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
engine = create_engine("<type of db>://<username>:<password>@<address>:<port>/<db name>") |
This file contains 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
# Imports | |
import pandas as pd | |
from sqlalchemy import create_engine | |
# This CSV doesn't have a header so pass | |
# column names as an argument | |
columns = [ | |
"sepal_length", | |
"sepal_width", | |
"petal_length", |
This file contains 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
DELETE FROM iris_dataset; | |
\COPY iris_dataset FROM 'Downloads/iris.csv' DELIMITER ',' CSV; |
This file contains 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
# Imports | |
import pandas as pd | |
from sqlalchemy import create_engine | |
# This CSV doesn't have a header so pass | |
# column names as an argument | |
columns = [ | |
"sepal_length", | |
"sepal_width", | |
"petal_length", |
This file has been truncated, but you can view the full file.
This file contains 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
["aaban", "aabha", "aabid", "aabriella", "aadam", "aadan", "aadarsh", "aaden", "aadesh", "aadhav", "aadhavan", "aadhi", "aadhira", "aadhya", "aadhyan", "aadi", "aadian", "aadil", "aadin", "aadish", "aadison", "aadit", "aadith", "aaditri", "aaditya", "aadiv", "aadon", "aadrian", "aadrika", "aadrit", "aadvik", "aadvika", "aadya", "aadyn", "aafreen", "aagam", "aage", "aagot", "aahaan", "aahan", "aahana", "aahil", "aahliyah", "aahna", "aahron", "aaidan", "aaiden", "aaidyn", "aaila", "aailiyah", "aailyah", "aaima", "aaira", "aairah", "aaisha", "aaishah", "aaiyana", "aaiza", "aaja", "aajah", "aajaylah", "aajon", "aakanksha", "aakarsh", "aakash", "aakeem", "aakilah", "aakira", "aakiyah", "aakriti", "aala", "aalaiya", "aalaiyah", "aalana", "aalanah", "aalani", "aalap", "aalaya", "aalayah", "aalayiah", "aalayjah", "aalayna", "aalaysha", "aalaysia", "aalea", "aaleah", "aaleahya", "aaleeya", "aaleeyah", "aaleigha", "aaleiyah", "aalexis", "aalexus", "aaleya", "aaleyah", "aalia", "aaliah", "aaliana", "aalias", "aaliayah", |
This file contains 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
<svg | |
xmlns="http://www.w3.org/2000/svg" | |
xml:lang="en" | |
xmlns:xlink="http://www.w3.org/1999/xlink" | |
viewBox="0 0 600 400" | |
width="600"> | |
<!-- Set the background color --> | |
<rect | |
id="background" | |
x="0" |
This file contains 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
data = { | |
"title":"Time-Price Comparison", | |
"subtitle":"Scatter plot of time vs price.", | |
"data":[ | |
{"time":2,"price":1,"callout":False}, | |
{"time":3,"price":2,"callout":False}, | |
{"time":4,"price":3,"callout":True}, | |
{"time":5,"price":4,"callout":True}, | |
{"time":6,"price":5,"callout":False} | |
], |
This file contains 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 make_scale(dmin,dmax,rmin,rmax): | |
dwidth = dmax - dmin | |
rwidth = rmax - rmin | |
map_ = rwidth / dwidth | |
def scale(n): | |
return (n - dmin) * map_ + rmin | |
return scale | |
xscale = make_scale( | |
layout['data']['time_min'], |
OlderNewer