Accounts | Mainnet | Ropsten |
---|---|---|
Near on Eth Client | 0x0151568af92125fb289f1dd81d9d8f7484efc362 | 0xb289c6e6c98644dc9f6a03c044564bc8558b6087 |
Prover on Eth | 0x051ad3f020274910065dcb421629cd2e6e5b46c4 | [0xb3df48b0ea3e91b43226fb3c5eb335b7e3d76faa](https://rop |
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
N = 2000 | |
R = 5 | |
def matmul(a, b): | |
c = [[0] * R for _ in range(R)] | |
for i in range(R): | |
for j in range(R): | |
for k in range(R): | |
c[i][j] += a[i][k] * b[k][j] |
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
import requests | |
import json | |
url = "https://archival-rpc.mainnet.near.org/" | |
payload = json.dumps({ | |
"jsonrpc": "2.0", | |
"id": "dontcare", | |
"method": "EXPERIMENTAL_validators_ordered", | |
"params": [ |
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
for j in range(1, 100): | |
for i in range(1, 100): | |
b = i**j | |
b_s, i_s, j_s = map(str, (b, i, j)) | |
if b_s.startswith('1') and b_s.endswith(i_s + j_s): | |
x = b_s[1:-len(i_s + j_s)] | |
print(f"{b} = 1^{x} * {i}^{j}") |
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
#![feature(prelude_import)] | |
#[prelude_import] | |
use std::prelude::rust_2018::*; | |
#[macro_use] | |
extern crate std; | |
use borsh::{BorshDeserialize, BorshSerialize}; | |
use eth_types::*; | |
use near_plugins::{only, pause, FullAccessKeyFallback, Ownable, Pausable, Upgradable}; | |
use near_sdk::collections::UnorderedMap; | |
use near_sdk::AccountId; |
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
//SPDX-License-Identifier: CC0-1.0 | |
pragma solidity ^0.8.7; | |
interface Router { | |
function get_implementatino_address() external returns (address); | |
} | |
contract Front { | |
Router router; |
This file has been truncated, but you can view the full file.
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
╔════════════════════════════════════════════╤═════════╤══════╤════════╤══════════════════════╤════════╗ | |
║ address │ tickets │ wins │ aurora │ eth │ kyc ║ | |
╟────────────────────────────────────────────┼─────────┼──────┼────────┼──────────────────────┼────────╢ | |
║ 0xdabd4c9c5e5f3ca23e6316f92eec1419066223a5 │ 2442 │ 84 │ 4200 │ 29475000000000000000 │ passed ║ | |
╟────────────────────────────────────────────┼─────────┼──────┼────────┼──────────────────────┼────────╢ | |
║ 0x4467554da9e6e79ef5f90f0c0fcbf7d645c394cf │ 1876 │ 43 │ 2150 │ 22912500000000000000 │ passed ║ | |
╟────────────────────────────────────────────┼─────────┼──────┼────────┼──────────────────────┼────────╢ | |
║ 0x9da59d5b67ae4b05a3c2c93feeb3ce82a3cb6f7a │ 1626 │ 42 │ 2100 │ 19800000000000000000 │ passed ║ | |
╟────────────────────────────────────────────┼─────────┼──────┼────────┼──────────────────────┼────────╢ | |
║ 0x47705c55e46802ddf233d7497a5f4e1b4a423b83 │ 1223 │ 39 │ 1950 │ 148000 |
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
""" | |
https://twitter.com/bitshiftmask/status/1323809212875608066?s=20 | |
Let P(i, j) be the probability that if there are `i` devices, then after one | |
round `j` devices selected a unique number, so they are out. The expected | |
value of the number of rounds required so that each device selected a unique number is: | |
E(n) = p(n, n) * E(0) + p(n, n - 1) * E(1) + ... + p(n, 0) * E(n) | |
E(n) * (1 - p(n, 0)) = p(n, n) * E(0) + p(n, n - 1) * E(1) + ... |
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
# %%% | |
import PIL.Image | |
import numpy as np | |
import matplotlib.pyplot as plt | |
# %% | |
im = PIL.Image.open("panda.jpeg") | |
arr = np.array(im).mean(2) |