Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
#!/usr/bin/env python3 | |
import re | |
from enum import Enum | |
from collections import namedtuple | |
""" | |
Simple Expression Grammar | |
expr → term {(+ | -) term} |
This file contains 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
require 'sinatra' | |
set :bind, '0.0.0.0' | |
get '/link-local/:mac' do | |
mac = params['mac'] | |
x = mac.split(':') | |
x.insert(3, 'ff') | |
x.insert(4, 'fe') | |
x[0] = (x[0].to_i(16) ^ 0b00000010).to_s(16) |
This file contains 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
def parens(n, l = 0, r = 0, curr = ""): | |
if len(curr) == n: | |
print(curr) | |
if l < n // 2: | |
parens(n, l + 1, r, curr + '(') | |
if r < l: | |
parens(n, l, r + 1, curr + ')') |
This file contains 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
library(scales) | |
library(ggplot2) | |
library(ggthemes) | |
library("devtools") | |
library("slopegraph") | |
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 |
This file contains 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
# Rewriting this this in python: | |
# https://gist.github.com/beesandbombs/2abe9464e2f43e75807879036a1962ca | |
import math | |
recording = False | |
result = None | |
N = 16 | |
ia = math.atan(math.sqrt(.5)) |
This file contains 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
% Modified from https://tex.stackexchange.com/a/249320 | |
\documentclass{article} | |
\usepackage{tikz} | |
\usetikzlibrary{arrows.meta} | |
\usetikzlibrary{calc} | |
\pgfmathsetseed{\number\pdfrandomseed} | |
\begin{document} | |
\begin{tikzpicture} |
This file contains 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
.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) { |
This file contains 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
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 |
This file contains 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
# http://dl.acm.org/citation.cfm?id=357091 | |
import random, sys | |
class Generator: | |
def __init__(self): | |
self.r = 0 | |
self.k = 0 | |
def open(self): | |
print("{", end = '') |
NewerOlder