This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #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 '()]))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #|--- 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class D(dict): | |
| def __missing__(self, key): | |
| return True | |
| d = D() | |
| lim = 3000000 | |
| nums = xrange(2, lim) | |
| for a in nums: | |
| if d[a]: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- 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!). | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/python | |
| import sys | |
| import string | |
| s = raw_input().strip() | |
| n = int(raw_input().strip()) | |
| strarr = ['']+list(string.ascii_lowercase) | |
| def substr(string): |