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

2021-05-21_09-57-master-b11a951f16f0.json.gz

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

2021-05-26_08-53-master-a316f34dd8dc.json.gz

View AdaptiveSpecializingExamples.md

Data structures

typedef struct {
    uint32_t ch_version;
    uint16_t ch_index;
    uint8_t ch_counter;
    uint8_t ch_oparg;
} HotPyVersionAndCounters;
@markshannon
markshannon / pep544_compare.md
Created Apr 29, 2020
Concurrency comparison
View pep544_compare.md
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)
View Speed_up_range_and_list.md

range.sh

#!/bin/sh

PYTHON=python3

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

timeit()

View taint-tracking.rst

Taint tracking in Python

Overview

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
:020000040000FA
:10000000004000208D590100C9590100CB59010061
:1000100000000000000000000000000000000000E0
:10002000000000000000000000000000CD590100A9
:100030000000000000000000CF590100D15901006C
:10004000D3590100E914010095550100D35901006D
:10005000D359010000000000C1910100D3590100F3
:10006000AD100000D35901000D940100D3590100D7
:10007000D3590100D3590100D3590100D3590100CC
:10008000D359010081520100D3590100D359010015
View speech.py
class Voice:
def __init__(self, **config_options):
self.config(config_options)
def say(phonemes):
# This returns a generator (or C implemented iterator) of audio frames
...
@markshannon
markshannon / waves.py
Created Jan 13, 2016
Supposed test case for GC failure.
View waves.py
""" 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