Skip to content

Instantly share code, notes, and snippets.

View maxgillett's full-sized avatar

Max Gillett maxgillett

View GitHub Profile
@maxgillett
maxgillett / engine.c
Created October 20, 2023 22:52 — forked from druska/engine.c
Quant Cup 1's winning order book implementation
/*****************************************************************************
* QuantCup 1: Price-Time Matching Engine
*
* Submitted by: voyager
*
* Design Overview:
* In this implementation, the limit order book is represented using
* a flat linear array (pricePoints), indexed by the numeric price value.
* Each entry in this array corresponds to a specific price point and holds
* an instance of struct pricePoint. This data structure maintains a list
I contributed to the Semaphore Trusted Setup Multi-Party Ceremony.
The following are my contribution signatures:
Circuit: semaphore17
Contributor # 143
Hash: bf23d121 797f834d a22c638f 4df43b95
4f9c742c d98ae0b8 cf5e0cf6 88238688
35c5656b 239e5a8c 47f6a594 e5868463
7ab1c005 e6ccc6d6 dcb4972d 48c714f2
from typing import (Tuple) # noqa: F401
import numpy as np
from web3 import Web3
from web3.auto import w3
from eth_account.messages import encode_defunct, _hash_eip191_message
from eth_keys import keys
from eth_keys.backends.native.ecdsa import (
from typing import List
from eth_account.messages import encode_defunct, _hash_eip191_message
from eth_utils import big_endian_to_int
from fastecdsa.curve import Curve
from fastecdsa import keys, ecdsa
P = 0x2523648240000001ba344d80000000086121000000000013a700000000000013
N = 0x2523648240000001ba344d8000000007ff9f800000000010a10000000000000d
func ecdsa_raw_recover{range_check_ptr}(
msg_hash : BigInt3, v : felt, r : BigInt3, s : BigInt3) -> (res : EcPoint):
alloc_locals
let gen_pt = EcPoint(
BigInt3(0xe28d959f2815b16f81798, 0xa573a1c2c1c0a6ff36cb7, 0x79be667ef9dcbbac55a06),
BigInt3(0x554199c47d08ffb10d4b8, 0x2ff0384422a3f45ed1229a, 0x483ada7726a3c4655da4f))
# Compute y-coordinate of R
%{

Keybase proof

I hereby claim:

  • I am maxgillett on github.
  • I am maxgillett (https://keybase.io/maxgillett) on keybase.
  • I have a public key ASA0TjejyzYSULoVZQIGTyJne2nbeIC9X8hXnBjN1GOi2Ao

To claim this, I am signing this object:

@maxgillett
maxgillett / bot.py
Created August 26, 2015 04:23
JSwipe Bot
import sys
import json
import argparse
from time import sleep
from random import randint
from datetime import datetime
import requests
@maxgillett
maxgillett / sim.py
Last active June 28, 2022 08:46
VogelsAbbott2005 Network
from __future__ import division
import sys
import time
from brian2 import *
#import matplotlib.pyplot as plt
delays = False
method = 'euler'
# RNG seed
@maxgillett
maxgillett / vim.rb
Last active December 29, 2015 14:49
require 'formula'
class Vim < Formula
homepage 'http://www.vim.org/'
# This package tracks debian-unstable: http://packages.debian.org/unstable/vim
url 'http://ftp.debian.org/debian/pool/main/v/vim/vim_7.4.052.orig.tar.gz'
sha1 '216ab69faf7e73e4b86da7f00e4ad3b3cca1fdb8'
head 'https://vim.googlecode.com/hg/'
@maxgillett
maxgillett / vim.rb
Last active December 14, 2015 00:48 — forked from mgrouchy/vim.rb
require 'formula'
class Vim < Formula
homepage 'http://www.vim.org/'
head 'https://vim.googlecode.com/hg/'
url 'http://ftp.debian.org/debian/pool/main/v/vim/vim_7.4.225.orig.tar.gz'
sha1 '674fafec19e24f75113c9f5a8440a85e8e636c3e'
def features; %w(tiny small normal big huge) end