Skip to content

Instantly share code, notes, and snippets.

@jrhea
jrhea / vp5.py
Created April 10, 2022 18:13 — forked from simrit1/vp5.py
while (True):
vp.rate(500)
#Calculte the force using gravitationalForce function
star.force = gravitationalForce(star,planet1)+gravitationalForce(star,planet2)+gravitationalForce(star,planet3)
planet1.force = gravitationalForce(planet1,star)+gravitationalForce(planet1,planet2)+gravitationalForce(planet1,planet3)
planet2.force = gravitationalForce(planet2,star)+gravitationalForce(planet2,planet1)+gravitationalForce(planet2,planet3)
planet3.force = gravitationalForce(planet3,star)+gravitationalForce(planet3,planet1)+gravitationalForce(planet3,planet2)
#Update momentum, position and time
@jrhea
jrhea / wpAddresses.js
Created September 29, 2021 02:43
This gist returns the addresses of the Element Yield Token Pools (aka weighted pools)
const https = require('https');
const url =
"https://raw.githubusercontent.com/element-fi/elf-deploy/main/addresses/mainnet.json";
let wpAddresses = [];
https
.get(url, (res) => {
let body = "";
@jrhea
jrhea / pricing_model.js
Last active March 30, 2021 21:26
methods for balancer sor
// calc_in_given_out (swap)
function _tokenInForExactTokenOut(amount, poolPairData) {
let inReserves = poolPairData.balanceIn;
let outReserves = poolPairData.balanceOut;
let lpShares = poolPairData.lpShares;
let inputToken = poolPairData.inputToken
let outputToken = poolPairData.outputToken;
let baseToken = poolPairData.baseToken;
let principalToken = poolPairData.principalToken;
let phi = poolPairData.swapFee;
class Playground {
public static int OFFSET_SHORT_STRING = 0x80;
public static int OFFSET_LONG_STRING = 0xb7;
public static int OFFSET_SHORT_LIST = 0xc0;
public static int OFFSET_LONG_LIST = 0xf7;
public static void main(String[ ] args) {
try {

Prysm

IPs

  • 18.183.12.240:9000
  • 34.237.53.47:9000
  • 18.228.206.102:9000
  • 3.127.134.103:9000

ENRs

  • enr:-LK4QIz2ts8vBmFvl4qagzyPIGwInrs-1YbdQPpVKCXDEcB3HExjuNx3E-nk63dEW30ZQycr39QkO2zXAZPUvjWbkLoCh2F0dG5ldHOIBs6QbYE7WKGEZXRoMpDDVKVKAAAAAP__________gmlkgnY0gmlwhBK3DPCJc2VjcDI1NmsxoQMLKPinmDnROP9TPUG0R-LdCpv-X9hxRS8G4rCrJ7hQuoN0Y3CCIyiDdWRwgiMo
@jrhea
jrhea / bounds_output.json
Created June 24, 2020 14:53 — forked from protolambda/bounds_output.json
Eth2 type bounds v0.12
{
"AggregateAndProof": {
"min_size": 337,
"max_size": 593
},
"Attestation": {
"min_size": 229,
"max_size": 485
},
"AttestationData": {
@jrhea
jrhea / witti.txt
Created June 24, 2020 14:03
terence's witti node
bootnode=[/dns4/prylabs.net/tcp/30001/p2p/16Uiu2HAm7Qwe19vz9WzD2Mxn7fXd1vgHHp4iccuyq7TxwRXoAGfc enr:-Ku4QAGwOT9StqmwI5LHaIymIO4ooFKfNkEjWa0f1P8OsElgBh2Ijb-GrD_-b9W4kcPFcwmHQEy5RncqXNqdpVo1heoBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpAAAAAAAAAAAP__________gmlkgnY0gmlwhBLf22SJc2VjcDI1NmsxoQJxCnE6v_x2ekgY_uoE1rtwzvGy40mq9eD66XfHPBWgIIN1ZHCCD6A]
self=enr:-LK4QGBO7GEbVq1q2btTuglDqr3cvD_t0vkowXcFDLAskw0jLCnnA7_s1-7obhZqQAz8Eclj-DGEVd0J_2f-JBpMNoA2h2F0dG5ldHOIN_vu372-__yEZXRoMpD2d10HAAABE___________gmlkgnY0gmlwhBgE6n6Jc2VjcDI1NmsxoQN74Bkxm4bC8TORYWHdnqbUdL_oCUyKTXfZPk84mw3-rIN0Y3CCNrCDdWRwgjax,/ip4/192.168.1.11/tcp/14000/p2p/16Uiu2HAmLzYh3Y25iveWTVFxeJEAPCWSbSxmHHjZCbDSTGzVPy6T,/ip4/24.4.234.126/tcp/14000/p2p/16Uiu2HAmLzYh3Y25iveWTVFxeJEAPCWSbSxmHHjZCbDSTGzVPy6T
34 peers
/ip4/127.0.1.1/tcp/9500/p2p/16Uiu2HAm519XL1mHxc4FuTXArWNHwaUr6SAMz2ywM4VMz4T4bxqr/p2p/16Uiu2HAm519XL1mHxc4FuTXArWNHwaUr6SAMz2ywM4VMz4T4bxqr
/ip4/51.210.9.77/tcp/9000/p2p/16Uiu2HAmNU5LnMBkM6xsXEnBBLiLqXefJoxmkbgNmFamDkJQeQ7m,/ip4/127.0.0.1/tcp/9000/p2p/16Uiu2H
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jrhea
jrhea / FML.sh
Last active March 9, 2019 14:25
run Artemis run
# clone and build
$ git clone --recursive https://github.com/PegaSysEng/artemis.git
$ cd artemis && ./gradlew mash
# run with formatted output
$ ./gradlew run --args='-o=foo.csv'
Verifying my identity on Peepeth.com 0xb7693d3f040d66ab89ab86e7f8688c01febbc77c