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
// Auto-archive email older than X days (so long as not starred) | |
// Inspirations: | |
// - https://gist.github.com/anonymous/2cca33d376f7f924fdaa67891ad098cc | |
// - https://medium.com/@fw3d/auto-archive-emails-in-gmail-after-2-days-1ebf0e076b1c | |
// NOTE: Must have autoarchive and ttl1 labels already created to use. | |
var MAX_AGE_DAYS = 14; | |
var BEFORE_DATE = new Date(); |
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
var search = $('h5.SummaryTable-label:contains("Balance")'); | |
var formatDate = function(date) { | |
return date.toISOString().substring(0, 10); | |
}; | |
var balances = search.map(function() { | |
var arr = $(this).parent().parent().find('.u-secondaryHeading').map(function() { | |
return $(this).text().trim().replace(/(Off|On) Track/, '').trim(); | |
}).get(); | |
var d = new Date(); | |
if ($(this).find('span').size() > 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
# All invites with 2 guests | |
%matplotlib inline | |
from numpy.random import binomial | |
from numpy import mean, std | |
import matplotlib.pyplot as plt | |
from math import sqrt, pow | |
trial_results = [] | |
invited = 100 | |
guests_per_invite = 2 | |
probability = 0.75 |
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
""" | |
EAT Club Highlight Programming Challenge | |
Author: Riley Strong <[email protected]> | |
Last Updated: 2013-03-09 | |
""" | |
import re | |
import sys | |
import unittest | |
START_HIGHLIGHT = "[HIGHLIGHT]" |
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
""" | |
Evernote Top Four Challenge | |
Author: Riley Strong <[email protected]> | |
Last Updated: 2013-03-07 | |
""" | |
class TopValues(object): | |
""" | |
Distills a list of numbers to the top values (largest integers). |