I hereby claim:
- I am dvdbng on github.
- I am bengoa (https://keybase.io/bengoa) on keybase.
- I have a public key whose fingerprint is 96A5 554D 451B 813E 0642 F48B 8C88 3382 7C5F 60F4
To claim this, I am signing this object:
// ==UserScript== | |
// @name PR Notifications | |
// @namespace ghnotifications | |
// @description Show notifications when the status of a PR changes | |
// @include https://github.com/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
(function(){ |
def fast_list_keys(bucket, prefix="", ignore_dirs=()): | |
""" | |
Like boto.s3.bucket.list but skip over directories named in ignore_dirs | |
""" | |
marker = "" | |
more_results = True | |
ignore_dirs = set(ignore_dirs) | |
keys = [] | |
while more_results: | |
rs = bucket.get_all_keys(prefix=prefix, marker=marker) |
// ==UserScript== | |
// @name Open PR Link | |
// @namespace ghprlink | |
// @description Show a open PR link when an issue has label "3 - code review" | |
// @include https://github.com/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
function addOpenPRLinks(){ |
intersection = (lst) -> | |
types = lst.map((x)-> typeof x) | |
if types.some((t) -> t != types[0]) | |
return null | |
switch types[0] | |
when "object" | |
res = {} | |
Object.keys(lst[0]).forEach (k) -> | |
if lst.every((o) -> k of o) |
intersection = (lst) -> | |
types = lst.map((x)-> typeof x) | |
if types.some((t) -> t != types[0]) | |
return null | |
switch types[0] | |
when "object" | |
res = {} | |
Object.keys(lst[0]).forEach (k) -> | |
if lst.every((o) -> k of o) |
import scrapy | |
from scrapy.crawler import CrawlerRunner | |
from scrapy.settings import Settings | |
from scrapy.http import TextResponse | |
from twisted.internet import defer | |
from splash.browser_tab import BrowserTab | |
from splash.render_options import RenderOptions | |
from splash import defaults | |
import random |
# bench_pg_array.py - benchmark postgresql array vs. join performance | |
""" | |
Replicate http://shon.github.io/2015/12/21/postgres_array_performance.html | |
with proper join table indexes (uniqueness constraints) using sqlalchemy. | |
$ python -i bench_pg_array.py | |
>>> setup() | |
$ python -m timeit -s "import bench_pg_array" "bench_pg_array.test_join()" |
#!/bin/bash | |
# rake db:migrate tries to connect to dump local postgres using pg_dump but | |
# you are using a docker instance? try saving this script as pg_dump somewhere | |
# in your PATH with higher priority | |
orig_params="$@" | |
volmount="" | |
while [[ $# -gt 1 ]] | |
do |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python3 | |
""" | |
Usage: subscene-dl <subscene url> > file.srt | |
Example: | |
subscene-dl https://subscene.com/subtitles/mr-mercedes-second-season/english/1864622 > Mr.Mercedes.S02E09.WEBRip.x264-ION10.srt | |
""" | |
from lxml import html | |
import requests |