Skip to content

Instantly share code, notes, and snippets.

Neeraj Kashyap nkashy1

Block or report user

Report or block nkashy1

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
nkashy1 / stanford-dogs.bash
Last active Sep 23, 2019
Upload Stanford Dogs dataset to S3 and register against Simiotics Data Registry
View stanford-dogs.bash
#!/usr/bin/env bash
if [ -z "$SIMIOTICS_SOURCE" ]; then
nkashy1 /
Last active Aug 26, 2019
Pylint wrapper with scripting-friendly exit codes
#!/usr/bin/env sh
# Wraps Pylint invocation to produce shell-friendly exit codes
# Because Pylint exit codes are weird:
if [ ! -z $PYTHON_ENV ]; then
nkashy1 / gce-instance-pollster.js
Created Apr 22, 2018
Poll GCE instance to make sure it hasn't died (or been pre-empted)...
View gce-instance-pollster.js
var Compute = require('@google-cloud/compute');
var {poll} = require('@nkashy1/pollster');
var twilio = require('twilio');
// START gcp-related setup
const gcpProject = process.env.GOOGLE_CLOUD_PROJECT
const gcpSacred = process.env.GOOGLE_APPLICATION_CREDENTIALS
const gceZone = process.env.GOOGLE_COMPUTE_ZONE;
const gceInstance = process.env.GOOGLE_COMPUTE_INSTANCE;
nkashy1 / file-sms-signal.js
Last active Apr 22, 2018
Alert using SMS on file creation
View file-sms-signal.js
var path = require('path');
var {poll} = require('@nkashy1/pollster');
var {spawnPredicate} = require('@nkashy1/pollster/predicates');
var twilio = require('twilio');
// START fs config
var rawFilepath = process.env.WATCH_FILE;
if (!rawFilepath) {
throw new Error('WATCH_FILE (undefined) should be the path that you want to poll for file existence');
View serving-input-reception-bug.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
nkashy1 /
Last active Jun 19, 2017
Markdown anchors




(Scroll all the way down beyond the wall of text)

(Wall of text generated by randomtextgenerator)

Necessary ye contented newspaper zealously breakfast he prevailed. Melancholy middletons yet understood decisively boy law she. Answer him easily are its barton little. Oh no though mother be things simple itself. Dashwood horrible he strictly on as. Home fine in so am good body this hope.

View clojure-tree-descendant-counting
(def test-tree {1 {:root nil} 2 {:root 1} 3 {:root 1} 4 {:root 2} 5 {:root 1} 6 {:root 4}})
(defn path-to-top [tree v]
(if (nil? v)
(cons v (path-to-top tree (:root (get tree v))))))
(defn steps-indexed-path
([upward-path steps]
(if (= upward-path '())
You can’t perform that action at this time.