Skip to content

Instantly share code, notes, and snippets.

View manish's full-sized avatar

Manish Sinha manish

View GitHub Profile
@manish
manish / run-timeit.py
Created August 8, 2024 06:31
timeit.repeat experiments
import timeit
import matplotlib.pyplot as plt
import json
import os
import statistics
import numpy as np
def run_experiment(number_of_repeats, number_of_runs=1000):
execution_time = timeit.repeat(
"from functools import reduce; reduce((lambda x, y: x * y), range(1, 2000))",
@manish
manish / keybase.md
Created October 6, 2017 16:39
keybase.md

Keybase proof

I hereby claim:

  • I am manish on github.
  • I am manishsinha (https://keybase.io/manishsinha) on keybase.
  • I have a public key ASCdpPJj4kDiqYL2JpIJR7pfAYCuCbT-zdNgXqzTP8z5ywo

To claim this, I am signing this object:

@manish
manish / 0_reuse_code.js
Last active August 29, 2015 14:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@manish
manish / gist:249fb66fbcec66e53497
Created November 12, 2014 06:03
A script to generate CommuterRail enumeration and CommuterRail Enum to Route Id Mapping
/*var routes = GetRoutes ().Select (x => x.Name.Replace (" ", "").Replace ("/", "")).ToList ();
var enumRoutes = string.Join (",\n", routes);*/
var summaryHolder =
@"/// <summary>
/// {0}
/// </summary>";
var allRoutesEnum = new List<string> ();
var allRoutesDict = new List<string> ();
from launchpadlib.launchpad import Launchpad
cachedir = "/home/me/.launchpadlib/cache/"
lpInst = Launchpad.login_anonymously('TestingDebianBTS', 'production', cachedir)
bugInst = lpInst.bugs[536692]
print bugInst.title
print bugInst.description
# Output is: