Skip to content

Instantly share code, notes, and snippets.

@mavdol
mavdol / sandboxing_untrusted_python.md
Created January 2, 2026 11:22
Notes on sandboxing untrusted code - why Python can't be sandboxed, comparing Firecracker/gVisor/WASM approaches

Sandboxing Untrusted Python

Python doesn't have a built-in way to run untrusted code safely. Multiple attempts have been made, but none really succeeded.

Why? Because Python is a highly introspective object-oriented language with a mutable runtime. Core elements of the interpreter can be accessed through the object graph, frames and tracebacks, making runtime isolation difficult. This means that even aggressive restrictions can be bypassed:

# Attempt: Remove dangerous built-ins
del __builtins__.eval
@pongo
pongo / triggers.org
Created May 21, 2022 16:13 — forked from svetlyak40wt/triggers.org
Спусковые крючки по Дорофееву в формате для Org Mode

Спусковые крючки для очистки мозга

Как пользоваться картой

  1. Карта помогает выгрузить из головы все задачи
  2. Пройдитесь взглядом по всем разделам карты
  3. Если в голове “сидит” задача, то она обязательно всплывёт при взгляде на соответствующий узел
  4. Выписывайте задачи, пока их количество не достигнет 50
  5. Почувствуйте, как гора упала с ваших плеч :)

При составлении карты использовались материалы Максима Дорофеева, mnogosdelal.ru

Учёба

@tirinox
tirinox / tree2021rt.py
Created December 31, 2020 16:45
New Year 2021 PyWay demo
# inspired by https://www.shadertoy.com/view/4st3DH
import array
import os
from math import *
import colorsys
W, H = 640, 480
OUT_FILE = 'test_2.ppm'
@yashika51
yashika51 / nb-viewer.md
Last active September 12, 2025 06:46
Share your jupyter notebooks with nbviewer and Gist

How to share .ipynb files from your computer without using Colab or Binder?

The most easiest way to share the .ipynb files without using Colab or Binder is by using Gist+nbviewer.

nbviewer helps you to share your jupyter notebooks as static sites. Follow these steps to share notebooks as url:

  • Find the notebook you want to share and open it with notepad.
  • Copy the raw code from there

image