Skip to content

Instantly share code, notes, and snippets.

Austin Schwartz austinschwartz

Block or report user

Report or block austinschwartz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
austinschwartz / Jeopardy.ipynb
Created Apr 3, 2018
Jeopardy Python Notebook
View Jeopardy.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
austinschwartz /
Created Feb 18, 2018
Python Recursive Descent Parser Example
#!/usr/bin/env python3
import re
from enum import Enum
from collections import namedtuple
Simple Expression Grammar
exprterm {(+ | -) term}
View link-local.rb
def parens(n, l = 0, r = 0, curr = ""):
if len(curr) == n:
if l < n // 2:
parens(n, l + 1, r, curr + '(')
if r < l:
parens(n, l, r + 1, curr + ')')
View jeopardy_slopegraph.r
CSV_Text = '"","jaro","dice","levNorm"
"a shot",0.8888888888888888,1,0.6666666666666667
"keanu (reeves)",0.8714285714285714,0.5333333333333333,0.3571428571428571
"the woodwork",0.8425925925925926,0.8,0.5833333333333333
# Rewriting this this in python:
import math
recording = False
result = None
N = 16
ia = math.atan(math.sqrt(.5))
View randomwalk.tex
% Modified from
austinschwartz / multiply.s
Created Aug 10, 2017
64-bit tail-recursive multiply w/ two return registers
View multiply.s
.section .data
.section .text
@ throughout the program
@ r4 stores m
@ r5 stores n
@ r6 stores the 32-bit LSB of acc (lower 32 bits)
@ r7 stores the 32-bit MSB of acc (higher 32 bits)
@ int multiply(int m, int n, int acc) {
austinschwartz / test_in.c
Created Mar 1, 2017
CS352 Lab3 Test Case 1
View test_in.c
long main(){for(Y=qG[SkBfdSGWx[((FJAmdCw*'u'))]];-636762;UUqxgV=("RLjcdJQyO")){asEHwREpg(tfUwAvibIFe);if(PXqBIEew(Jb,pAt,Lg,jux,okMy,US,hLe,N)){if(-885414.5125210375){while(436485){for(KzuTWYRUrN=(wPL[LKE["UOrmyhvw"]]*(NENNnyXP[(-760952.4360878994||(+'i'))]&&'f'));'k';yMSIlDLMeg=(-*(+"RFs"))){}}{}}}while("jkvqgqXeU"){loUXakm(W,Iqe,I);}}{}for(qRX=I;((("LQgsOETC">24260.031260388205)||yx[nHaqh(j,IU,lMjBa,oRs)])||(('h'/"RDNdGLsN")/'g'));RuuwkW=mvXD(sTTaY,iO,TC,U)){while(("IbQMnAfRN"-(-29940.42566039192))){LnRb(zHb,qO);}}for(O=-966957.704638198;'j';axRBI=292999.3623444184){bMWOc(SlICzzk,RUMI,TRFUytt);for(gA=tTtCGpLLIq;413429;zbJJC=nVCKLs){for(XzRLyYv=-666092;ulzY;HM=ymvV){ReVKv(F,tv);PhpNW(huSnY);}AYrmt(Hgzc,Wj,iJYfAc,eXnZAWc);pHogU(Kq,rKP,il);BYz(JXUO,wlrRY,L);}IPPmKtMUwA(QsZ,wy,p);FNsFHmlSC(OS,uQ);mI(LdQ,sOuim,Pg);cqu(b);cgFi(mnwOD,Qw,xlUGe,Ol,b);Eyo(Yo,VTP,UPM);for(ssIwnksyBq=K(M,TSVH);-999647;Ixu='x'){EAryCRRL(WF,M);{EM(fz,jBeXzEj,BoqkhYt,xwXH);}EWQUIjF(Ml);}vFFYhN(nr);}for(jgGqC=(+-*"Fssxgjnw");PyREQDa;rQlRsd
austinschwartz /
Created Mar 1, 2017
Generates balanced brackets of size n
import random, sys
class Generator:
def __init__(self):
self.r = 0
self.k = 0
def open(self):
print("{", end = '')
You can’t perform that action at this time.