Skip to content

Instantly share code, notes, and snippets.

import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
class Interval
attr_accessor :start, :end
def initialize(start, _end)
@start = start
@end = _end
end
end
def uncovered(intervals)
sorted = intervals.sort_by {|i| i.start}
import sys
class Interval(object):
def __init__(self, start, end):
self.start = start
self.end = end
def uncovered_intervals(intervals):
uncovered = []
#

Keybase proof

I hereby claim:

  • I am jasonjho on github.
  • I am jasonjho (https://keybase.io/jasonjho) on keybase.
  • I have a public key ASDS7w_0XBA8sCnRh4Ardkb_0SYYZIexZTVzxeUejW8ZhAo

To claim this, I am signing this object:

SELECT
o_history._PARTITIONTIME AS report_date,
o.facility_name AS facility_name,
o.facility_departure_date AS ship_date,
sum(o.number_of_boxes) AS num_boxes
FROM orders o
LEFT JOIN order_history o_history ON o.order_id = o_history.order_id
WHERE
o_history._PARTITIONTIME > timestamp('2016-11-01')
AND o_history.shipment_status IN ('Pending', 'Shipped')
@jasonjho
jasonjho / settings.py
Created February 10, 2016 15:23
Variable and Connection settings
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
Variables = {
# emails
'email_recipients': {
'airflow_admins': [],
'pagerduty_airflow': [],
'convertro-spend': [],
@jasonjho
jasonjho / compose_example.py
Last active December 16, 2015 04:23
Compose multiple file transform functions
from tempfile import NamedTemporaryFile
def lookahead(iterable):
"""Generate pairs (islast, item) with the iterable's items"""
it = iter(iterable)
last = next(it)
for val in it:
yield last, True
last = val