Skip to content

Instantly share code, notes, and snippets.


Neeraj Kashyap nkashy1

View GitHub Profile
nkashy1 / alternative.bash
Created Apr 11, 2020
Alternative management for Java
View alternative.bash
#!/usr/bin/env bash
# Inspired by:
set -e
usage () {
echo "Usage: $0 {register|install} JAVA_DIR [PRIORITY]"
nkashy1 / rise-of-github-samples.jsonl
Created Mar 2, 2020
Rise of GitHub - metadata for sample repositories
View rise-of-github-samples.jsonl
This file has been truncated, but you can view the full file.
nkashy1 / Dockerfile
Created Dec 1, 2019
Powershell alpine docker image
View Dockerfile
FROM alpine:3.10.3
RUN apk add --no-cache \
ca-certificates \
less \
ncurses-terminfo-base \
krb5-libs \
libgcc \
libintl \
libssl1.1 \
# First, run:
# pip install simiotics
from simiotics.clients import SimioticsRESTClient
if __name__ == '__main__':
import json
import time
dataset_id = f'test-dataset-{int(time.time())}'
nkashy1 / simiotics_python.ipynb
Created Oct 30, 2019
Tutorial: Using Simiotics from Python
View simiotics_python.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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 / 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');
You can’t perform that action at this time.