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
[package] | |
name = "my-first-pyo3" | |
version = "0.1.0" | |
edition = "2021" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[lib] | |
name = "my_first_pyo3" | |
crate-type = ["cdylib"] |
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
void a_function(); | |
int main() { | |
a_function(); | |
} |
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
#include <stdio.h> | |
void a_function() { | |
printf("This is a_function!\n"); | |
} |
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
from time import sleep | |
delta = { | |
1: { | |
0: ( 1, 1, 2), | |
1: ( 2, -1, 1), | |
2: ( 1, -1, 1) | |
}, | |
2: { | |
0: ( 2, -1, 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 sys | |
from traceback import format_exc | |
NUM2CHAR = ( | |
r'ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
r'abcdefghijklmnopqrstuvwxyz' | |
r'0123456789+/' | |
) |
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
<!-- reset.css ress --> | |
<link | |
rel="stylesheet" | |
href="https://unpkg.com/ress/dist/ress.min.css" | |
/> |
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
<!-- reset.css modern-css-reset --> | |
<link | |
rel="stylesheet" | |
href="https://unpkg.com/modern-css-reset/dist/reset.min.css" | |
/> |
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
<!-- reset.css destyle --> | |
<link | |
rel="stylesheet" | |
href="https://cdn.jsdelivr.net/npm/[email protected]/destyle.css" | |
/> |
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 sys | |
from io import StringIO | |
from re import split | |
from textwrap import dedent | |
from traceback import format_exc | |
class UserInput: | |
def __init__(self, text=None): | |
self._io = StringIO(text) if text else sys.stdin |
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
const PENDING = Symbol('PENDING'); | |
const FULFILLED = Symbol('FULFILLED'); | |
const REJECTED = Symbol('REJECTED'); | |
const exec = (f, resolve, reject) => { | |
let isRejected = false; | |
try { | |
f( |