Skip to content

Instantly share code, notes, and snippets.

View cinquemb's full-sized avatar

Cinque McFarlane-Blake cinquemb

View GitHub Profile
@cinquemb
cinquemb / query_slots.py
Created July 19, 2024 15:37
Sample User Deposits/Withdrawl info Directly From Contract Storage - Rethink
from web3 import Web3
import json
import sys
import eth_utils
GovernableFundContract = json.loads(open('./build/contracts/GovernableFund.json', 'r+').read())
RethinkFundGovernorContract = json.loads(open('./build/contracts/RethinkFundGovernor.json', 'r+').read())
PermissionsContract = json.loads(open('./build/contracts/Permissions.json', 'r+').read())
ERC20MockContract = json.loads(open('./build/contracts/ERC20Mock.json', 'r+').read())
RethinkReaderContract = json.loads(open('./build/contracts/RethinkReader.json', 'r+').read())
2087 508e 9934 ee32 ec9a 62cd c658 b358
64eb 1638 61c3 0762 c70e 363b 2771 8b6b
0c30 c31a 64c1 8659 a327 5a60 c18e 1d73
776c b34c b4c7 19c3 4c1a 658c b16e 1830
6386 8e38 68c1 8738 6196 5d71 ceb9 ac3a
d60c 1c31 b2e1 db31 cdd6 98e3 2c31 bb26
2cb6 3327 0c62 e18d 3b18 698c 5b00 cb17
196c cc1a 3996 1c38 e1ae 7369 b075 8358
3ac9 ad31 6998 3871 c70c b268 d632 6b8c
3b4e 3ae1 870e 371d 9347 1c75 a34c 1962
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <cstdint>
#include <map>
const int buff_size = 8;
// clang++ -fcolor-diagnostics fib_encoding.cpp -o fib -Wall -O3 -std=gnu++14 -stdlib=libc++ -pedantic -I/usr/local/include
// Lookup table of Fibonacci numbers that can fit in a ulong.
cinquemb$ time ./bt "9.json" "10.json" "1.0"
sample_block: 9.json
sample_block_1: 10.json
elem_mod_val: 1
block_rlp_len(9.json): 38732
is_identity(9.json): 0
abs_det(proj_block_rep->9.json): 1
abs_det(c_proj_block_rep_t->9.json): 1
block_rlp_len(10.json): 29004
is_identity(10.json): 0
@cinquemb
cinquemb / avax_rlp_matrix_form.cpp
Last active July 8, 2021 10:07
Avalanche RLP encoded block translated into matrix format and projected into SL(667*2, 16)
#include <iostream>
#include <map>
#include <vector>
#include <string>
#include <cstdint>
#include <armadillo>
#include <sys/stat.h>
#include <json/json.h>
@cinquemb
cinquemb / molten_salt_research.py
Last active June 21, 2020 00:51
Molten Salt Research with various ionic cholrides with alkali earth metals
from __future__ import division
from thermo.chemical import Chemical, Mixture
from matplotlib import pyplot as plt
import thermo
import math
import decimal
import sys
'''
LR
@cinquemb
cinquemb / generate_mine_gps_list.py
Last active January 30, 2018 06:41
Strava Tile Mine
#import requests
import os
import math
import csv
'''
https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Resolution_and_Scale
https://en.wikipedia.org/wiki/Tiled_web_map
zoom resolution, m/px scale 96 dpi 1 screen cm is scale 120 dpi
0 156543.03 1 : 554 678 932 5547 km 1 : 739 571 909
@cinquemb
cinquemb / go_conj_trans_test.cpp
Last active January 22, 2016 21:09
Number of legal Go positions matrix representation lies on a complex lie group
#include <iostream>
#include <vector>
#include <cmath>
#include <numeric>
#include <algorithm>
#include <functional>
#include <map>
#include <armadillo>