Skip to content

Instantly share code, notes, and snippets.

View gagejustins's full-sized avatar

Justin Gage gagejustins

  • New York City
View GitHub Profile
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 32 columns, instead of 26. in line 4.
sale_date,Zoom Fly Mercurial (Total Orange),Zoom Fly Mercurial (Black),Zoom Fly (Tulip Pink),Zoom Fly (The Ten),Zoom Fly (Black),React Hyperdunk (The Ten),Jordan 1 High (White),Jordan 1 High (University Blue),Jordan 1 High (Chicago),Converse Chuck Taylor Hi (The Ten),Converse Chuck Taylor 70s Hi,Blazer Mid (The Ten),Blazer Mid (Serena Pack),Blazer Mid (Grim Reaper),Blazer Mid (All Hallow's Eve),Air VaporMax (The Ten),Air VaporMax (Black),Air Presto (White),Air Presto (The Ten),Air Presto (Black),Air Max 97 (The Ten),Air Max 97 (Serena Pack),Air Max 97 (Menta),Air Max 97 (Black),Air Max 90 (The Ten),Air Max 90 (Desert Ore),Air Max 90 (Black),AF1 Low (Volt),AF1 Low (The Ten),AF1 Low (ComplexCon),AF1 Low (Black)
2017-08-20 00:00:00,,,,,,,,,1800,,,,,,,,,,,,,,,,,,,,,,
2017-08-27 00:00:00,,,,,,,,,2100,,,,,,,,,,,,,,,,,,,,,,
2017-09-10 00:00:00,,,,,,,,,2547.666667,,,811.2903226,,,,1498.235294,,,1313.046512,,,,,,1005.055556,,,,,,
2017-09-17 00:00:00,,,,,,,,,2040.114286,,,676.4583333,,,,1121.761194,,,1212.152542,,,,,,8
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 32 columns, instead of 11. in line 5.
sale_date,Zoom Fly Mercurial (Total Orange),Zoom Fly Mercurial (Black),Zoom Fly (Tulip Pink),Zoom Fly (The Ten),Zoom Fly (Black),React Hyperdunk (The Ten),Mercurial Vapor 360,Jordan 1 High (White),Jordan 1 High (University Blue),Jordan 1 High (Chicago),Converse Chuck Taylor Hi (The Ten),Converse Chuck Taylor 70s Hi,Blazer Mid (The Ten),Blazer Mid (Serena Pack),Blazer Mid (Grim Reaper),Blazer Mid (All Hallow's Eve),Air VaporMax (The Ten),Air VaporMax (Black),Air Presto (White),Air Presto (The Ten),Air Presto (Black),Air Max 97 (The Ten),Air Max 97 (Serena Pack),Air Max 97 (Menta),Air Max 97 (Black),Air Max 90 (The Ten),Air Max 90 (Black),AF1 Low (Volt),AF1 Low (The Ten),AF1 Low (ComplexCon),AF1 Low (Black)
8/20/17 0:00,,,,,,,,,,1800,,,,,,,,,,,,,,,,,,,,,
8/27/17 0:00,,,,,,,,,,2100,,,,,,,,,,,,,,,,,,,,,
9/10/17 0:00,,,,,,,,,,2547.666667,,,811.2962963,,,,1498.235294,,,1338.028571,,,,,,1007,,,,,
9/17/17 0:00,,,,,,,,,,2042.059701,,,686.8269231,,,,1119.984375,,,1202.428571,,,,,,855.1395349,,,,,
9/24/17 0:00,,,,,,,,,,
from airflow import DAG
from airflow.operators import PythonOperator
from datetime import datetime
dag = DAG(
dag_id = 'my_first_dag',
start_date = datetime(2019,1,15),
schedule_interval = '0 2 * * *')
def print_hello():
sale_date sale_price
2017-12-25 156.8809524
2018-01-01 161.8688525
2018-01-08 160.0571429
2018-01-15 155.1566265
2018-01-22 156.1129032
2018-01-29 157.25
2018-02-05 156.5
2018-02-12 148.7663551
2018-02-19 149.2560976
sale_date sale_price
2017-10-22 1500.0
2017-10-29 790.1212121212121
2017-11-05 826.0869565217391
2017-11-12 858.8181818181819
2017-11-19 597.9185185185186
2017-11-26 498.4469696969697
2017-12-03 490.2369668246445
2017-12-10 513.1603053435115
2017-12-17 515.9662921348314
sale_date white blue chicago
8/20/17 1800
8/27/17 2100
9/3/17 2100
9/10/17 2547.666667
9/17/17 2042.059701
9/24/17 1870.604167
10/1/17 1880.428571
10/8/17 1885.357143
10/15/17 1869.68
sale_date sale_price
2017-08-20 1800.0
2017-08-27 2100.0
2017-09-03 2100.0
2017-09-10 2547.6666666666665
2017-09-17 2042.0597014925372
2017-09-24 1870.6041666666667
2017-10-01 1880.4285714285713
2017-10-08 1885.357142857143
2017-10-15 1869.68
sale_date sale_price
2017-09-07 2899.0
2017-09-08 2645.0
2017-09-09 2510.5
2017-09-10 2412.5
2017-09-11 2509.5
2017-09-12 2391.4
2017-09-13 2104.0
2017-09-14 2002.2142857142858
2017-09-15 1955.3125
sale_date chicago white blue
9/7/17 2899
9/8/17 2645
9/9/17 2510.5
9/10/17 2412.5
9/11/17 2509.5
9/12/17 2391.4
9/13/17 2104
9/14/17 2002.214286
9/15/17 1955.3125
const request = require('request');
/**
* Sends input from a Slack SlashCommand to Algorithmia's nlp/SummarizeURL, and returns result
*
* @param {!Object} req Cloud Function request context.
* @param {!Object} res Cloud Function response context.
*/
exports.summarizeURL = function summarizeURL(req, res) {
// verify that this request came from a valid Slack App