I hereby claim:
- I am gmittal on github.
- I am gmittal (https://keybase.io/gmittal) on keybase.
- I have a public key ASDhnYTeaSmlVLfI2Ser3JC1UDly_4rOVGLOjS8CoBNFWwo
To claim this, I am signing this object:
""" | |
* RSA from scratch, consistent with the implementation described in EECS 70 at UC Berkeley. | |
* Written by Gautam Mittal | |
* 10/19/2019 | |
""" | |
from math import floor, log | |
N2C = dict(enumerate('abcdefghijklmnopqrstuvwxyz', 1)) | |
C2N = {c: n for n, c in N2C.items()} |
from operator import add, mul, sub, floordiv | |
import re | |
OPERATORS = {'*': mul, '+': add, '-': sub, '/': floordiv} | |
def parse(text, left=r'[(]', right=r'[)]', sep=r','): | |
""" *** Based on https://stackoverflow.com/a/17141899/190597 (falsetru) *** | |
>>> parse('1+2') | |
['1', '+', '2'] | |
>>> parse('(1+2)*(3-4)') |
/* | |
* http://paleyontology.com/AP_CS/rainfall.html | |
*/ | |
let lyst = [-76, 0, -1, 1, 2, -999]; | |
function rainfall(nums) { | |
nums = nums.splice(0, nums.indexOf(-999)); | |
const positive = nums.filter(n => n >= 0); | |
return positive.reduce((total, n) => { |
// ==UserScript== | |
// @name Block YouTube | |
// @namespace http://ah.ah | |
// @description In the name of college applications. | |
// @match https://*.youtube.com/* | |
// ==/UserScript== | |
// Notes: | |
// * is a wildcard character | |
// .tld is magic that matches all top-level domains (e.g. .com, .co.uk, .us, etc.) |
I hereby claim:
To claim this, I am signing this object:
// ==UserScript== | |
// @name Ana Hans | |
// @namespace http://ah.ah | |
// @description Ana Hans helper (populates database each time I visit Facebook) | |
// @include https://www.facebook.com/* | |
// ==/UserScript== | |
// Notes: | |
// * is a wildcard character | |
// .tld is magic that matches all top-level domains (e.g. .com, .co.uk, .us, etc.) |
// ==UserScript== | |
// @name Schoology Overdue Patch | |
// @namespace http://ah.ah | |
// @description Fixes that annoying overdue section which crowds the page with unnecessary content. Made by Gautam Mittal, a student on Schoology who wishes he could use Edmodo. | |
// @include https://pausd.schoology.com/home | |
// ==/UserScript== | |
// Notes: | |
// * is a wildcard character | |
// .tld is magic that matches all top-level domains (e.g. .com, .co.uk, .us, etc.) |
var dotenv = require('dotenv'); | |
dotenv.load(); | |
var express = require('express'); | |
var app = express(); | |
var server = require('http').createServer(app); | |
app.use(express.static(__dirname + '/tmp')); | |
var bodyParser = require('body-parser'); | |
app.use(bodyParser.urlencoded({ | |
extended: true |
] |