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 | |
import time | |
from uuid import uuid4 | |
DB = {} | |
def fish(): | |
time.sleep(random.random() * 3) | |
return 'CATCH_FISH' if random.random() > 0.5 else 'IS_NIGHT' |
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
%builtins output | |
from starkware.cairo.common.alloc import alloc | |
from starkware.cairo.common.invoke import invoke | |
from starkware.cairo.common.registers import get_label_location | |
struct A: | |
member a: felt | |
member b: felt |
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 starkware.cairo.common.alloc import alloc | |
from starkware.cairo.common.invoke import invoke | |
from starkware.cairo.common.registers import get_ap, get_label_location | |
struct Class: | |
member _ : felt* | |
member name : felt | |
member super : Class* | |
member size : felt | |
member ctor : codeoffset # constructor |
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
%lang starknet | |
from starkware.cairo.common.alloc import alloc | |
from starkware.cairo.common.invoke import invoke | |
from starkware.cairo.common.registers import get_ap, get_label_location | |
from structs import Class | |
func invoke_func(size: felt, func_ptr : codeoffset, args_len : felt, args : felt*) -> (loc_ptr : felt*): | |
let (func_pc) = get_label_location(func_ptr) |
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
%lang starknet | |
from starkware.cairo.common.alloc import alloc | |
from starkware.cairo.common.invoke import invoke | |
from starkware.cairo.common.registers import get_ap, get_label_location | |
from structs import Class | |
func invoke_func(size: felt, func_ptr : codeoffset, args_len : felt, args : felt*) -> (loc_ptr : felt*): | |
let (func_pc) = get_label_location(func_ptr) |
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
%builtins output | |
from starkware.cairo.common.serialize import serialize_word | |
from starkware.cairo.common.registers import get_ap | |
from starkware.cairo.common.alloc import alloc | |
from starkware.cairo.common.invoke import invoke | |
from starkware.cairo.common.registers import get_label_location | |
func add_vals{output_ptr: felt*}(x, y) -> (output_len, sum : felt*): |
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 starkware.cairo.common.alloc import alloc | |
from starkware.cairo.common.invoke import invoke | |
from starkware.cairo.common.registers import get_label_location | |
func add_nums(a: felt, b: felt) -> (sum: felt): | |
return (a + b) | |
end | |
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
%lang starknet | |
from starkware.cairo.common.alloc import alloc | |
struct Foo: | |
member val: felt | |
end | |
func make_foo(value: felt) -> (foo: Foo): |
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
const start = {x: -10, y: 3}; | |
const end = {x: 10, y: 5}; | |
let segCnt = 40, | |
ropeLen = 30; | |
var scene = new THREE.Scene(); | |
var camera = new THREE.PerspectiveCamera( 75, window.innerWidth/window.innerHeight, 0.1, 1000 ); | |
camera.position.z = 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
### Keybase proof | |
I hereby claim: | |
* I am rlkelly on github. | |
* I am schoollunch (https://keybase.io/schoollunch) on keybase. | |
* I have a public key whose fingerprint is A9B4 DB4B 60C3 9021 972F C1FE 8787 A96E B0E8 5FA2 | |
To claim this, I am signing this object: |
NewerOlder