Skip to content

Instantly share code, notes, and snippets.

View nfisher's full-sized avatar
🏠
Working from home

Nathan Fisher nfisher

🏠
Working from home
View GitHub Profile

How we're assessing you

As part of this interview you will develop a MVP in Java.

We will measure you on the following criteria:

  • Overall clarity of communication.
  • Problem solving methodology.
  • Architecture and design.
  • Implementation of tests, unit and integration ideally.
@nfisher
nfisher / iris.csv
Created March 27, 2023 13:47
Perceptrons
sepal_length sepal_width petal_length petal_width species
5.1 3.5 1.4 0.2 setosa
4.9 3.0 1.4 0.2 setosa
4.7 3.2 1.3 0.2 setosa
4.6 3.1 1.5 0.2 setosa
5.0 3.6 1.4 0.2 setosa
5.4 3.9 1.7 0.4 setosa
4.6 3.4 1.4 0.3 setosa
5.0 3.4 1.5 0.2 setosa
4.4 2.9 1.4 0.2 setosa
@nfisher
nfisher / cipher.sh
Created April 23, 2020 14:58
Probe for valid ciphers (modified from an SO response)
#!/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).
@nfisher
nfisher / DataToRow.java
Last active September 20, 2018 23:33
POJO to BigQuery TableRow converter
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();
@nfisher
nfisher / ExtractMessage
Created September 19, 2018 14:29
Dataflow primitive operations
// .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);
}
}
@nfisher
nfisher / histo.R
Created April 19, 2018 00:47
R - histogram and scatter plot
library (ggplot2)
library (gridExtra)
# arg1 - online csv
# arg2 - base filename
options <- commandArgs(trailingOnly = TRUE)
basename = options[2]
@nfisher
nfisher / sampler.py
Last active April 18, 2018 20:33
Python: sampling for top referrers to a type
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:
@nfisher
nfisher / compose_run.sh
Created March 23, 2018 23:45
docker bind local folder
docker-compose run dev bash
@nfisher
nfisher / default.yaml
Created February 16, 2018 21:44
Sample CSP handlers section for Google App Engine
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
@nfisher
nfisher / main.rl
Last active January 30, 2018 18:34
bracket matching with ragel
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;