Skip to content

Instantly share code, notes, and snippets.

View zomglings's full-sized avatar

Neeraj Kashyap zomglings

View GitHub Profile
@zomglings
zomglings / abi.json
Created March 30, 2023 14:12
USDC ABI
[
{
"inputs": [
{ "internalType": "string", "name": "_name", "type": "string" },
{ "internalType": "string", "name": "_symbol", "type": "string" },
{ "internalType": "uint8", "name": "_decimals", "type": "uint8" },
{ "internalType": "address", "name": "_underlying", "type": "address" },
{ "internalType": "address", "name": "_vault", "type": "address" }
],
"stateMutability": "nonpayable",
@zomglings
zomglings / TerminusABI.json
Created January 21, 2022 09:50
Terminus ABI
[
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
@zomglings
zomglings / past24.py
Last active November 11, 2021 21:01
Iterate through past 24 hours of Ethereum blockchain subscription data using Moonstream Python client.
import argparse
import json
import sys
import time
from moonstream.client import Moonstream
ETHEREUM_BLOCKCHAIN_QUERY = "type:ethereum_blockchain"
if __name__ == "__main__":
@zomglings
zomglings / humbug.bash
Last active March 17, 2021 03:08
Bugout crash reports data dump script
#!/usr/bin/env bash
# humbug.bash - The Bugout crash reporting administration script
# Requirements:
# 1. jq - To install on Linux: `apt-get install jq`, to install on Mac with Homebrew: `brew install jq`
set -e -o pipefail
if [ -z "$BUGOUT_ACCESS_TOKEN" ]
then
@zomglings
zomglings / alternative.bash
Created April 11, 2020 18:47
Alternative management for Java
#!/usr/bin/env bash
# Inspired by:
# https://stackoverflow.com/a/53902806/4905625
set -e
usage () {
echo "Usage: $0 {register|install} JAVA_DIR [PRIORITY]"
echo
@zomglings
zomglings / rise-of-github-samples.jsonl
Created March 2, 2020 02:35
Rise of GitHub - metadata for sample repositories
This file has been truncated, but you can view the full file.
{"position": 256821, "github_id": 774797, "repository": {"id": 774797, "node_id": "MDEwOlJlcG9zaXRvcnk3NzQ3OTc=", "name": "webid-spec", "full_name": "retog/webid-spec", "private": false, "owner": {"login": "retog", "id": 110756, "node_id": "MDQ6VXNlcjExMDc1Ng==", "avatar_url": "https://avatars3.githubusercontent.com/u/110756?v=4", "gravatar_id": "", "url": "https://api.github.com/users/retog", "html_url": "https://github.com/retog", "followers_url": "https://api.github.com/users/retog/followers", "following_url": "https://api.github.com/users/retog/following{/other_user}", "gists_url": "https://api.github.com/users/retog/gists{/gist_id}", "starred_url": "https://api.github.com/users/retog/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/retog/subscriptions", "organizations_url": "https://api.github.com/users/retog/orgs", "repos_url": "https://api.github.com/users/retog/repos", "events_url": "https://api.github.com/users/retog/events{/privacy}", "received_events_url": "https://api.gi
@zomglings
zomglings / Dockerfile
Created December 1, 2019 18:02
Powershell alpine docker image
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())}'
@zomglings
zomglings / simiotics_python.ipynb
Created October 30, 2019 02:47
Tutorial: Using Simiotics from Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zomglings
zomglings / stanford-dogs.bash
Last active September 23, 2019 10:08
Upload Stanford Dogs dataset to S3 and register against Simiotics Data Registry
#!/usr/bin/env bash
STANFORD_DOG_IMAGES_DIR=${STANFORD_DOG_IMAGES_DIR:-~/data/stanford-dogs/Images}
DOG_DIRS=$(ls -1 $STANFORD_DOG_IMAGES_DIR)
BATCH_SIZE=${BATCH_SIZE:-100}
PARALLELISM=${PARALLELISM:-0}
SIMIOTICS_SOURCE=${SIMIOTICS_SOURCE}
if [ -z "$SIMIOTICS_SOURCE" ]; then