Skip to content

Instantly share code, notes, and snippets.

View cronokirby's full-sized avatar
🗿

Lúcás Meier cronokirby

🗿
View GitHub Profile
@cronokirby
cronokirby / eprintdl.py
Created June 25, 2022 21:39
Script to download papers from eprint to pdf and markdown
from bs4 import BeautifulSoup
from dataclasses import dataclass
import os
from typing import List
import re
import requests
import sys
HEADERS = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36"
This is something new
The Casper Slide part two
Featuring the Platinum Band
And this time
We're going to get funky
Funky
Everybody clap your hands
Clap, clap, clap, clap your hands
Clap, clap, clap, clap your hands
@cronokirby
cronokirby / README.md
Last active November 24, 2021 18:03
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=9ae094faf74fd94305596dd4db2277f1

CS-234 Solidity Homework (Part 1)

In the first part of this homework, you will work on a few Ethereum smart contracts that are written in Solidity to learn the basics about interacting with smart contracts. For now, you are going to work individually. In the second part of the homework, you will be interacting with your classmates on the same contract.

To interact with these contracts, we will be using a sandbox: https://remix.ethereum.org. Remix allows you to load a project from different sources. In case you do not

@cronokirby
cronokirby / README.md
Created October 22, 2021 12:34
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=

REMIX EXAMPLE PROJECT

Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer. It contains 3 directories:

  1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
  2. 'scripts': Holds two scripts to deploy a contract. It is explained below.
  3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity.

SCRIPTS

@cronokirby
cronokirby / README.md
Created October 22, 2021 12:33
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=

REMIX EXAMPLE PROJECT

Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer. It contains 3 directories:

  1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
  2. 'scripts': Holds two scripts to deploy a contract. It is explained below.
  3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity.

SCRIPTS

@cronokirby
cronokirby / README.md
Created October 22, 2021 12:33
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=

REMIX EXAMPLE PROJECT

Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer. It contains 3 directories:

  1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
  2. 'scripts': Holds two scripts to deploy a contract. It is explained below.
  3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity.

SCRIPTS

def exp(x, e, P):
x_squared = x % P
acc = 1
while e > 0:
if e & 1:
acc = (acc * x_squared) % P
e >>= 1
x_squared = (x_squared * x_squared) % P
return acc
"".mulWW_g STEXT nosplit size=24 args=0x20 locals=0x0 funcid=0x0
0x0000 00000 (arith.go:46) TEXT "".mulWW_g(SB), NOSPLIT|ABIInternal, $0-32
0x0000 00000 (arith.go:46) FUNCDATA $0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x0000 00000 (arith.go:46) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x0000 00000 (arith.go:47) MOVQ "".x+8(SP), AX
0x0005 00005 (arith.go:47) MOVQ "".y+16(SP), CX
0x000a 00010 (arith.go:47) MULQ CX
0x000d 00013 (arith.go:48) MOVQ DX, "".z1+24(SP)
0x0012 00018 (arith.go:48) MOVQ AX, "".z0+32(SP)
0x0017 00023 (arith.go:48) RET
factorial 0 = 1
factorial n = n * factorial (n - 1)
main = factorial 20
@cronokirby
cronokirby / in.hs
Last active November 28, 2020 10:42
factorial 0 = 1
factorial n = n * factorial (n - 1)
main = factorial 20