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
PS C:\...\example> dir | |
Directory: C:\...\example | |
Mode LastWriteTime Length Name | |
---- ------------- ------ ---- | |
-a---- 11/04/2020 22:43 220 test_bad.py | |
-a---- 11/04/2020 22:43 235 test_good.py |
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 asyncio | |
class FutIterator: | |
def __init__(self, fut): | |
self.fut = fut | |
def __iter__(self): | |
return self |
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 glob | |
import itertools | |
with open("rmem.tex", "w") as outf: | |
outf.write( | |
r""" | |
\documentclass{article} | |
\usepackage[a4paper, margin=0in, left=8mm, top=15mm]{geometry} | |
\usepackage{listings} | |
\usepackage{xcolor} |
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 multiprocessing import Process, Manager | |
from multiprocessing.managers import SharedMemoryManager | |
import array | |
T = 200000 | |
def f(X, Y, Out, b): | |
X, Y = X.buf, Y.buf |
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
Process Process-3: | |
Traceback (most recent call last): | |
File "/home/bjs/.pyenv/versions/3.9-dev/lib/python3.9/multiprocessing/process.py", line 313, in _bootstrap | |
self.run() | |
File "/home/bjs/.pyenv/versions/3.9-dev/lib/python3.9/multiprocessing/process.py", line 108, in run | |
self._target(*self._args, **self._kwargs) | |
File "/home/bjs/Downloads/e4671450a50df5a0648c6dda0c7b642a-3db67c29d8d9e6a6d629c2c016f5853ec22000ed/test.py", line 11, in g | |
X[0] | |
File "/home/bjs/.pyenv/versions/3.9-dev/lib/python3.9/multiprocessing/shared_memory.py", line 413, in __getitem__ | |
(v,) = struct.unpack_from( |
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 <stdint.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <sys/mman.h> | |
#include <err.h> | |
int main() { | |
uint32_t x = 0; | |
uint64_t c = 0; | |
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 <errno.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <sys/mman.h> | |
int main(int argc,char **argv) { | |
/* IGNORE ... | |
* this block is needed to change the write protections on the page the asm is written to. */ | |
void* code_block_ptr = &&code; | |
unsigned int pagesize = getpagesize(); |
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 collections import MutableMapping | |
class Hashtable(MutableMapping): | |
def __init__(self, iterable=None): | |
self._map = [[] for _ in range(10)] | |
self._size = 0 | |
if iterable is not None: | |
for (k, v) in iterable: | |
self[k] = v |
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
module MCTS | |
open System | |
let rnd = System.Random() | |
[<AutoOpen>] | |
module Exprs = | |
type Expr<'a> = | |
| Lit of 'a | |
| Add of Expr<'a> * Expr<'a> |
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
(lambda a0:a0.meta_path.append((type('',(),{'find_module':lambda a1,a2,a3:None if not a2.startswith('_')else print((('fizz' if not int(a2[1:]) % 3 else '')+('buzz' if not int(a2[1:]) % 5 else ''))or str(int(a2[1:])))or type('',(),{'load_module':(lambda a4,a5:a0.modules.update(**{a2:None}))})()})())))(__import__('sys')) | |
import _1 | |
import _2 | |
import _3 | |
import _4 | |
import _5 | |
import _6 | |
import _7 |