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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>tableToExcel Demo</title> | |
<script src="tableToExcel.js"></script> | |
</head> | |
<body> | |
<h1>tableToExcel Demo</h1> | |
<p>Exporting the W3C Example Table</p> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>tableToExcel Demo</title> | |
<script src="tableToExcel.js"></script> | |
</head> | |
<body> | |
<h1>tableToExcel Demo</h1> | |
<p>Exporting the W3C Example Table</p> |
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
-- Provide a log file debugging statement. | |
SELECT 'DROP PROCEDURE IF EXISTS dropForeignKeys'; | |
-- Conditionally drop the procedure. | |
DROP PROCEDURE IF EXISTS dropForeignKeys; | |
-- Provide a log file debugging statement. | |
SELECT 'CREATE PROCEDURE dropForeignKeys'; | |
-- Change delimiter to create procedure. |
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
#!/bin/sh | |
mysql test -Bse"drop table myserial" | |
mysql test -Bse"create table myserial (ticketDate date, primary key (ticketDate))" | |
for myserial in {1..2000} | |
do | |
mysql -Bse"insert into test.myserial select date_add('2011-01-01', interval $myserial day)" | |
done | |
mysql -Bse"delete from test.myserial where ticketDate > curdate()" |
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
140609 22:16:44 mysqld_safe Starting mysqld daemon with databases from /data/mysql_new | |
140609 22:16:44 [Note] Plugin 'FEDERATED' is disabled. | |
140609 22:16:44 [Note] Plugin 'InnoDB' is disabled. | |
Mon Jun 9 22:16:44 2014 Tokudb recovery starting in env /data/mysql_new/ | |
Mon Jun 9 22:16:44 2014 Tokudb recovery scanning backward from 8022815629 | |
Mon Jun 9 22:16:48 2014 Tokudb recovery bw_end_checkpoint at 8021727390 timestamp 1401947797731124 xid 8020678322 (bw_newer | |
) | |
Mon Jun 9 22:16:53 2014 Tokudb recovery bw_begin_checkpoint at 8020678322 timestamp 1401947761665744 (bw_between) | |
Mon Jun 9 22:16:53 2014 Tokudb recovery turning around at begin checkpoint 8020678322 time 36065380 | |
Mon Jun 9 22:16:53 2014 Tokudb recovery starts scanning forward to 8022815629 from 8020678322 left 2137307 (fw_between) |
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
import pafy | |
import re | |
import boto | |
cv = pafy.new("https://www.youtube.com/watch?v=0PGrtdcvlVE") | |
# use cv.title or cv.description for more info | |
best = cv.getbest() | |
myfile = best.title + "." + best.extension |
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
from pandas import DataFrame, Series | |
import pandas as pd | |
import json | |
from urllib2 import urlopen | |
db = json.load(urlopen('https://github.com/pydata/pydata-book/raw/master/ch07/foods-2011-10-03.json')) | |
info_keys = ['description', 'group', 'id', 'manufacturer'] | |
info = DataFrame(db, columns=info_keys) | |
col_mapping = {'description' : 'food', 'group' : 'fgroup' } |
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
import pandas as pd | |
import datetime as DT | |
values_a = range(16) | |
values_b = range(10, 26) | |
states = ['Georgia']*8 + ['Alabama']*8 | |
cities = ['Atlanta']*4 + ['Savanna']*4 + ['Mobile']*4 + ['Montgomery']*4 | |
dates = pd.DatetimeIndex([DT.date(2012,1,1)+DT.timedelta(days = i) for i in range(4)]*4) | |
df = pd.DataFrame( | |
{'value_a': values_a, 'value_b': values_b}, |
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
#! /usr/bin/env python | |
import json | |
import requests | |
def process(obj, ds): | |
data = {} | |
values = obj[ds]['value'] | |
index = obj[ds]['dimension'][obj[ds]['dimension']['id'][1]]['category']['index'] | |
labels = obj[ds]['dimension'][obj[ds]['dimension']['id'][1]]['category']['label'] |
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
#! /usr/bin/env python | |
import json | |
import requests | |
def process(obj, ds): | |
data = {} | |
values = obj[ds]['value'] | |
index = obj[ds]['dimension'][obj[ds]['dimension']['id'][1]]['category']['index'] | |
labels = obj[ds]['dimension'][obj[ds]['dimension']['id'][1]]['category']['label'] |
OlderNewer