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
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname | |
, filename = path.join(process.cwd(), uri); |
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
#!/bin/sh | |
credentials() | |
{ | |
username=loader | |
password=L0#De&1234 | |
hostname=127.0.0.1 | |
database=yourdatabasename | |
postgres_user=postgresusr |
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 numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
# if you want a list of integers as your random data set | |
df = pd.DataFrame(np.random.randint(0,20,size=(20, 2)), columns=list('PQ')) | |
# if you want a list of random decimal numbers as your random data set | |
df = pd.DataFrame(np.random.randn(20,2), columns=list('PQ')) | |
# plot the data | |
plt.scatter(df.P,df.Q, alpha=0.5) | |
# plt.show() |
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 MySQLdb as mdb | |
import pandas as pd | |
con = mdb.connect(‘127.0.0.1’, ‘root’, ‘password’, ‘database_name’); | |
with con: | |
cur = con.cursor() | |
cur.execute(“select random_number_one, random_number_two, random_number_three from randomness.a_random_table”) | |
rows = cur.fetchall() | |
df = pd.DataFrame( [[ij for ij in i] for i in rows] ) | |
df.rename(columns={0: ‘Random Number One’, 1: ‘Random Number Two’, 2: ‘Random Number Three’}, inplace=True); | |
print(df.head(20)) |
NewerOlder