Skip to content

Instantly share code, notes, and snippets.

View table.rst
Benchmark 2021-06-15_14-14-master-243fd01047dd.json.gz 2021-06-16_11-46-master-d5e7d20ed7da.json.gz Change Significance
2to3 314 ms 309 ms 1.02x faster Not significant
2to3 | 314 ms | 309 ms | 1.02x faster | Not significant |
View dict_keys_version_performance.rst


Performance version: 1.0.0 Report on Linux-5.4.0-73-generic-x86_64-with-glibc2.31 Number of logical CPUs: 12 Start date: 2021-05-26 11:01:17.817118 End date: 2021-05-26 11:19:49.454870



Data structures

typedef struct {
    uint32_t ch_version;
    uint16_t ch_index;
    uint8_t ch_counter;
    uint8_t ch_oparg;
} HotPyVersionAndCounters;
markshannon /
Created Apr 29, 2020
Concurrency comparison
Feature Threads Async Multiprocessing PEP 554 Ideal CSP
Parallel execution No No Yes ? Yes
Shared raw memory Yes Yes Limited Limited? No
Shared objects Yes Yes No No? No
Overhead Medium Low High ?
View IterationExtension.qll
// Extending taint-tracking to support tracking through iteration is a bit fiddly prior in 1.20 and earlier
// We need to track both getting an item from the iterable *and* the assignment to the target variable.
/* Track the implicit `next` operation */
class NextItemExtension extends DataFlow::Extension {
ForNode for;
NextItemExtension() {
for.iterates(_, this)



${PYTHON} -c 'from sys import version; print(version)'


View taint-tracking.rst

Taint tracking in Python


Taint tracking tracks how arbitrary values, "taint", flow throughout the program. This is useful for finding whether potentially malicious input can be used in an insecure way, whether dangerous arguments are passed to vulnerable functions, and whether confidential or sensitive data can leak. It is also useful for tracking invalid, insecure, or untrusted data in other analyses.

View microbit-micropython.hex
class Voice:
def __init__(self, **config_options):
def say(phonemes):
# This returns a generator (or C implemented iterator) of audio frames
markshannon /
Created Jan 13, 2016
Supposed test case for GC failure.
""" Display endless waves on the LED display.
You can press the left button to have the waves go faster,
the right button to slow down things.
MAL 2016-01-06.
import microbit
import math