Skip to content

Instantly share code, notes, and snippets.

View kamath's full-sized avatar
😳
swaggerific

Anirudh Kamath kamath

😳
swaggerific
View GitHub Profile
#!/bin/python
import sys
import string
s = raw_input().strip()
n = int(raw_input().strip())
strarr = ['']+list(string.ascii_lowercase)
def substr(string):
#!/bin/python
import sys
#Define Box class and methods
class box:
boxes = []
def __init__(self, arr):
self.boxes = arr
#Methods 1, 2, 3, and 4 as defined by HR
# -*- coding: utf-8 -*-
"""
Created on Thu Sep 4 08:42:25 2014
Contains 2-dimensional filters for the spatial filtering of images. Some of
the code below is taken from psychopy [Peirce JW (2009) Generating stimuli
for neuroscience using PsychoPy. Front. Neuroinform. 2:10.
doi:10.3389/neuro.11.010.2008]. I had trouble installing this on my macs, so
I just pilfered the appropriate functions (sorry!).
@kamath
kamath / hr.py
Last active June 16, 2017 18:00
class D(dict):
def __missing__(self, key):
return True
d = D()
lim = 3000000
nums = xrange(2, lim)
for a in nums:
if d[a]:
import numpy as np
from numpy import newaxis
import matplotlib.pyplot as plt
import pandas as pd
from pandas import datetime
import math, time
import itertools
from sklearn import preprocessing
import datetime
from operator import itemgetter
@kamath
kamath / actual.rkt
Last active February 19, 2018 20:15
#|--- DATA DEFINITIONS ---|#
;;A Ball is a (make-ball Number Number Number Number)
(define-struct ball (x y vx vy))
; - where the first Number is the ball's x-coordinate
; - the second Number is the ball's y-coordinate
; - the third Number is the ball's x-velocity
; - the fourth Number is the ball's y-velocity
#|--- CONSTANTS ---|#
(define WIDTH 200)
#lang racket
; Enter your code here. Read input from STDIN. Print output to STDOUT
; Func : None -> None
; Reads a list with variable inputs
(define (func)
(let ([num (read)])
(cond
[(number? num) (cons num (func))]
[else '()])))
f.write(f'<ul>')
f.write(f'<li><b>New TPAs: {new_tpas}</b><ul>')
for i in [1, 4, 2, 3]:
f.write(f'<li>{cats[i]} TPAs: {fix(data[i]["tpas"])} ')
if i == 4:
f.write('(')
tpacats = data[4]['tpa_categories']
for i, a in enumerate(tpacats):
f.write(f'<b>{tpacats[i][0]}</b>: {tpacats[i][1]}')
if i < len(tpacats) - 1:
import PIL as pillow
from PIL import Image
import numpy as np
import os
import pandas as pd
import random
import keras
from matplotlib import pyplot as plt
- Last.fm GraphDB implementation to show how you listen to music
- LinkedIn to website generator - basically convert LinkedIn into Markdown articles that can be edited
- Algorithm teacher