Skip to content

Instantly share code, notes, and snippets.

View janewang's full-sized avatar

Jane Wang janewang

View GitHub Profile
@stefanopepe
stefanopepe / SeatCalc.py
Created June 17, 2021 19:54
NEAR Seat Calculator
#!/usr/bin/env python
staked = [39083288,20742627,17605710,14958721,12372225,11736051,11700857,10766231,10192733,9247144,8829467,8820923,8607624,7496028,7440797,7072148,6658986,6646311,6613536,6200873,6044540,5535635,5514813,5441478,5390617,5058487,5042476,5037097,5007809,4993358,4953007,4891731,4723753,4478417,4406591,4275230,4261006,4193711,4119969,4112941,4053846,4008247,3854746,3807783,3783853,3772500,3724032,3697405,3666975,3664753,3650362,3595469,3589451,3580855,3562831,3515380,3449636,3432393,3430539,3338958,3155647,2124049]
def findSeatPrice(stakes, num_seats):
"""
Find seat price given set of stakes and number of seats required.
Seat price is highest integer number such that if you sum `floor(stakes[i] / seat_price)` it is at least `num_seats`.
"""
stakes = sorted(stakes)
@johncantrell97
johncantrell97 / satoshistreasure.md
Last active April 15, 2023 15:09
How I Obtained Satoshi's Treasure Keys 1, 2, and 3 in Minutes

Today (April 16th 2019 at noon) the first major clues to discover key #1 was set to be released in a few cities. A QR code with the words 'orbital' were found at these locations and looked like this: (https://imgur.com/a/6rNmz7T). If you read the QR code with your phone you will be directed to this url: https://satoshistreasure.xyz/k1

At this URL you are prompted to input a passphrase to decrypt the first shard. An obvious first guess was to try the word 'orbital' from the QR code. Not suprisingly this worked! This reveals a congratulations page and presents the first key shard:

ST-0001-a36e904f9431ff6b18079881a20af2b3403b86b4a6bace5f3a6a47e945b95cce937c415bedaad6c86bb86b59f0b1d137442537a8.

Now, we were supposed to wait until April 17th to get clues from the other cities for keys #2 and #3 but that wouldn't stop me from digging around with all the new information we had. All that time "playing" notpron (http://notpron.org/notpron/) years ago was going to help me here.

The first thing I noticed was