I hereby claim:
- I am davidcox143 on github.
- I am davidcox (https://keybase.io/davidcox) on keybase.
- I have a public key whose fingerprint is 715B 891A 68EA 8CC5 0170 9AD7 3834 95CA 461C C954
To claim this, I am signing this object:
FROM ubuntu:jammy-20221130 | |
RUN apt update && apt install -y \ | |
build-essential cmake ninja-build pkg-config \ | |
ncurses-dev libreadline-dev libedit-dev \ | |
libgoogle-perftools-dev \ | |
libgmp-dev \ | |
libssl-dev \ | |
unixodbc-dev \ | |
zlib1g-dev libarchive-dev \ | |
libossp-uuid-dev \ |
#!/usr/bin/python2.7 | |
# David Cox 2016 | |
from fractions import gcd | |
def pollards_rho(n): | |
x = 2; y = 2; d = 1 | |
f = lambda x: (x**2 + 1) % n | |
while d == 1: | |
x = f(x); y = f(f(y)) | |
d = gcd(abs(x-y), n) |
from math import sqrt, log, floor, fabs | |
# computes the distance between two points | |
def dist(A, B): | |
return sqrt( (A[0]-B[0])**2 + (A[1]-B[1])**2 ) | |
# simple triangle class | |
class triangle: | |
def __init__(self, vertices): | |
self.A, self.B, self.C = vertices[0], vertices[1], vertices[2] |
#!/usr/bin/python2.7 | |
from random import choice | |
from sys import argv | |
def word_map(text): | |
''' Maps each word to a list of all words that follow it. ''' | |
D = {w : [] for w in text}; D[''] = text | |
[D[w].append(text[i+1]) for i, w in enumerate(text) if i < len(text)-1] | |
return D |
I hereby claim:
To claim this, I am signing this object: