This file contains hidden or 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
#!perl -w | |
use strict; | |
use warnings; | |
use LWP::UserAgent; | |
use URI; | |
use JSON; | |
use YAML::XS; | |
my $uri = URI->new('http://translate.google.com/translate_a/t'); |
This file contains hidden or 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
my $url = URI->new('http://books.google.com/ngrams/graph'); | |
$url->query_form( | |
year_start => 1800, | |
year_end => 2000, | |
corpus => $corpus, | |
smoothing => 30, | |
content => encode_utf8($q), | |
); |
This file contains hidden or 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 httpProxy = require('http-proxy'); | |
var http = require('http'); | |
var fs = require('fs'); | |
var proxy = httpProxy.createProxyServer({ | |
target:'http://localhost:9005' | |
}); | |
proxy.listen(8005); |
This file contains hidden or 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
##################################################################### | |
# | |
# This script starts an automatically recorded session using `script` | |
# storing logs in `$log_dir`. Care should be taken to secure records | |
# generated by this script as they may easily contain passwords and | |
# other sensistive information. | |
# | |
##################################################################### | |
# FIXME(bh): make this configurable |
This file contains hidden or 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/bash | |
##################################################################### | |
# Copyright (c) 2016 Bjoern Hoehrmann <[email protected]>. GPLv3+. | |
# | |
# Given image + color, creates mask encoding pixel's LAB color diff. | |
##################################################################### | |
path_in="$1" | |
color_rgb="$2" | |
path_out="$3" |
This file contains hidden or 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
0 !| < > & A B == | |
+---+---+ +---+---+ +---+---+ +---+---+ +---+---+ +---+---+ +---+---+ +---+---+ | |
| 0 | 0 | | 0 | 0 | | 0 | 0 | | 0 | 0 | | 0 | 0 | | 0 | 0 | | 0 | 0 | | 0 | 0 | | |
+---+---+ +---+---+ +---+---+ +---+---+ +---+---+ +---+---+ +---+---+ +---+---+ | |
| 0 | 0 | | 0 | 0 | | 0 | 0 | | 0 | 0 | | 0 | 0 | | 0 | 0 | | 0 | 0 | | 0 | 0 | | |
+---+---+ +---+---+ +---+---+ +---+---+ +---+---+ +---+---+ +---+---+ +---+---+ | |
+---+---+ +---+---+ +---+---+ +---+---+ +---+---+ +---+---+ +---+---+ +---+---+ | |
| 0 | 0 | | 0 | 0 | | 0 | 0 | | 0 | 0 | | 0 | 0 | | 0 | 0 | | 0 | 0 | | 0 | 0 | | |
+---+---+ +---+---+ +---+---+ +---+---+ +---+---+ +---+---+ +---+---+ +---+---+ |
This file contains hidden or 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
SQLite version 3.11.0 2016-02-15 17:29:24 | |
Enter ".help" for usage hints. | |
sqlite> EXPLAIN QUERY PLAN | |
...> WITH RECURSIVE path(pos, vertex) AS ( | |
...> SELECT 0, ? | |
...> UNION ALL | |
...> SELECT path.pos + 1, (SELECT Edge.dst | |
...> FROM Edge | |
...> WHERE Edge.src = path.vertex | |
...> ORDER BY RANDOM() |
This file contains hidden or 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
token = _ | |
/ keyword | |
/ identifier | |
/ constant | |
/ string-literal | |
/ punctuator | |
preprocessing-token = _ | |
/ header-name | |
/ identifier |
This file contains hidden or 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
DROP VIEW IF EXISTS view_every_hour_past_six_months; | |
CREATE VIEW view_every_hour_past_six_months AS | |
WITH RECURSIVE | |
bounds AS ( | |
SELECT | |
strftime('%s', 'now', 'start of day', '-6 month') AS lower, | |
strftime('%s', 'now', 'start of day', '+1 day') AS upper | |
), | |
samples AS ( | |
SELECT lower AS sample FROM bounds |