| | Eff | Handlers in Action
| Koka
| Links[
](https://github.com/effect-hand
This file contains hidden or 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 string | |
import base64 | |
# bcrypt uses a strange base64 encoding, which is incompatible with the common one, go figure... | |
B64_CHARS = ''.join((string.ascii_uppercase, string.ascii_lowercase, string.digits, '+/')).encode("utf-8") | |
B64_CHARS_BCRYPT = ''.join(('./', string.ascii_uppercase, string.ascii_lowercase, string.digits)).encode("UTF-8") | |
B64_TO_BCRYPT = bytes.maketrans(B64_CHARS, B64_CHARS_BCRYPT) | |
B64_FROM_BCRYPT = bytes.maketrans(B64_CHARS_BCRYPT, B64_CHARS) |
This file contains hidden or 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 re | |
import threading | |
import time | |
import random | |
import queue | |
STEVILO_STRANI = 50 |
This file contains hidden or 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
from typing import List | |
from web3 import Web3 | |
import eth_abi | |
def submit_price_hash(ftsoIndices: List[int], prices: List[int], random: int, address: str) -> str: | |
assert len(ftsoIndices) == len(prices) | |
assert list(sorted(ftsoIndices)) == ftsoIndices and len(set(ftsoIndices)) == len(ftsoIndices), "Indices are non increasing" | |
return Web3.keccak(eth_abi.encode_abi( |
This file contains hidden or 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
{ | |
"dependencies": { | |
"ocaml": "4.12.x", | |
"@opam/ocaml-lsp-server": "*", | |
"@opam/ocamlfind-secondary": "*", | |
"@opam/reason": "*" | |
} | |
} |
This file contains hidden or 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 random | |
def seed(): | |
random.seed(2021) | |
def prazna_mreza(w, h): | |
return [ | |
[0 for j in range(w)] for _ in range(h) | |
] |
This file contains hidden or 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
"label": "OCaml", | |
"type": "shell", | |
"command": | |
"C:\\OCaml64\\usr\\local\\bin\\ocaml-env.exe exec -- C:\\OCaml64\\home\\???\\.opam\\4.11.1+mingw64c\\bin\\ocaml.exe -init \\\"${file}\\\"" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
I hereby claim:
- I am jo-osko on github.
- I am j00sko (https://keybase.io/j00sko) on keybase.
- I have a public key ASCRfzaqktPSkQ_ubPT57r0dq1JsSRcByseVUjAYwJKYiwo
To claim this, I am signing this object: