Skip to content

Instantly share code, notes, and snippets.


Aanand Kainth akainth015

View GitHub Profile
akainth015 /
Created Nov 12, 2020
Count core words in a document
# Spacy is a natural language processing tool to aid with quickly building apps. We can use it, meaning we will have
# to do minimal work on our own
import spacy
if __name__ == '__main__':
# Load the poem from my computer. The text file contains just the content of the poem as is, pasted in with Notepad.
file = open("C:\\Users\\aanand\\Downloads\\How To Tame a Wild Tongue.txt", "r")
poem =
akainth015 / GrecoLatin2MagicSquares.js
Last active Aug 29, 2020
Solving Greco-Latin squares for Magic Squares
View GrecoLatin2MagicSquares.js
// Replace these variables with your own
const chemEcoSquare = `A5 B4 C3 D2 E1
E4 A3 B2 C1 D5
D3 E2 A1 B5 C4
C2 D1 E5 A4 B3
B1 C5 D4 E3 A2 `;
let map = {
A: 0,
B: 1,
akainth015 /
Created Aug 29, 2020
Generate a dump of sentiment data using UCSD's database of Amazon reviews
import gzip
import json
import subprocess
import sys
import pandas as pd
if __name__ == '__main__':
reviews ="Downloads/Books_5.json.gz", "r")
data = list()
akainth015 / networkTables.js
Created Feb 19, 2020
PyNetworkTables2Js Client for Webpack projects
View networkTables.js
import {encode, decode} from 'cbor-js';
export default class NetworkTables {
constructor(pynetworktables2jsAddress) {
this._pynetworktables2jsAddress = pynetworktables2jsAddress;

Keybase proof

I hereby claim:

  • I am akainth015 on github.
  • I am akainth015 ( on keybase.
  • I have a public key ASCYG6J4kN4HWjZ9fi1-ZLbG66R8IODyqBinTN_QGCKn7wo

To claim this, I am signing this object:

akainth015 / ServiceWorkerAPI.js
Last active Nov 4, 2017
A definition file for WebStorm to index
View ServiceWorkerAPI.js
throw new Error("ServiceWorkerAPI is not meant to be run in the browser, it is just for IDEs to index for autocompletion");
const caches = {
_cache: function() {
* A list of files to add to this cache
* @param files An array containing a list of files to add to cache
this.addAll = function(files) {