This file has been truncated, but you can view the full file.
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
[{"name":"`Boolean","ts":1514340216924000,"ph":"X","tid":1,"dur":0,"pid":0} | |
,{"name":"`Byte","ts":1514340216924000,"ph":"X","tid":1,"dur":0,"pid":0} | |
,{"name":"`Character","ts":1514340216924000,"ph":"X","tid":1,"dur":0,"pid":0} | |
,{"name":"`Class","ts":1514340216924000,"ph":"X","tid":1,"dur":0,"pid":0} | |
,{"name":"`ClassLoader","ts":1514340216924000,"ph":"X","tid":1,"dur":0,"pid":0} | |
,{"name":"`Compiler","ts":1514340216924000,"ph":"X","tid":1,"dur":0,"pid":0} | |
,{"name":"`Double","ts":1514340216926000,"ph":"X","tid":1,"dur":0,"pid":0} | |
,{"name":"`Enum","ts":1514340216926000,"ph":"X","tid":1,"dur":0,"pid":0} | |
,{"name":"`Float","ts":1514340216926000,"ph":"X","tid":1,"dur":0,"pid":0} | |
,{"name":"`InheritableThreadLocal","ts":1514340216926000,"ph":"X","tid":1,"dur":0,"pid":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
package search | |
import ( | |
"github.com/james-bowman/nlp" | |
"github.com/james-bowman/nlp/measures/pairwise" | |
"gonum.org/v1/gonum/mat" | |
) | |
type Index struct { | |
vectoriser *nlp.CountVectoriser |
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
package main | |
// generate with ragel -G1 -Z main.rl no compile error with -G2 the following; | |
// main.rl:13[/Users/nathanfisher/workspace/go/src/github.com/nfisher/gir/command/runner/main.go:119:2]: syntax error: unexpected goto at end of statement | |
// main.go:59[/Users/nathanfisher/workspace/go/src/github.com/nfisher/gir/command/runner/main.go:59:1]: label _again defined and not used | |
import "fmt" | |
%%{ | |
machine graphql_collections; |
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
handlers: | |
- url: /(.*\.html) | |
static_files: public/\1 | |
upload: public/(.*\.html) | |
mime_type: text/html; charset=UTF-8 | |
secure: always | |
expiration: "0d 3m" | |
http_headers: | |
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload | |
Content-Security-Policy: default-src 'none'; font-src 'self' https://cdnjs.cloudflare.com https://fonts.gstatic.com a.gwponline.com; style-src 'self' https://cdnjs.cloudflare.com https://fonts.googleapis.com a.gwponline.com; img-src 'self' ws1.postescanada-canadapost.ca a.gwponline.com; script-src 'self' a.gwponline.com; connect-src 'self' ws1.postescanada-canadapost.ca; media-src a.gwponline.com |
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
docker-compose run dev bash |
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
def teardown(self): | |
# other stuff... | |
gc.collect() | |
parents = {} | |
for o in gc.get_objects(): | |
if not isinstance(o, list): | |
continue | |
c = c + 1 | |
if c % 1000 == 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
library (ggplot2) | |
library (gridExtra) | |
# arg1 - online csv | |
# arg2 - base filename | |
options <- commandArgs(trailingOnly = TRUE) | |
basename = options[2] |
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
// .apply("Extract Body", ParDo.of(new ExtractMessage())) | |
class ExtractMessage extends DoFn<PubsubMessage, String> { | |
@ProcessElement | |
public void processElement(final ProcessContext c) { | |
final PubsubMessage msg = c.element(); | |
final String s = new String(msg.getPayload()); | |
c.output(s); | |
} | |
} |
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
class DataToRow { | |
public static TableRow asRow(final Object child, final String pkg) { | |
if (null == child) { | |
return null; | |
} | |
TableRow row = new TableRow(); | |
Field[] publicFields = child.getClass().getFields(); | |
for (Field f : publicFields) { | |
String name = f.getName(); |
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
#!/usr/bin/env bash | |
# OpenSSL requires the port number. | |
SERVER=$1 | |
PORT=$2 | |
DELAY=1 | |
ciphers=$(openssl ciphers 'ALL:eNULL' | sed -e 's/:/ /g') | |
echo Obtaining cipher list from $(openssl version). |