Skip to content

Instantly share code, notes, and snippets.

View illume's full-sized avatar

René Dudfield illume

View GitHub Profile
# Install specified Python version.
# Install only if:
# Our current matrix entry uses this Python version AND
# Python version is not already available.
# from https://raw.githubusercontent.com/matthew-brett/multibuild/11a389d78892cf90addac8f69433d5e22bfa422a/install_python.ps1
$py_exe = "${env:PYTHONPATH}\Python.exe"
if ( [System.IO.File]::Exists($py_exe) ) {
echo "$py_exe exists"
exit 0
@illume
illume / decision_tree.py
Created June 3, 2020 14:09
Decision trees in python using recursion and eval.
# Decision trees in python using recursion and eval.
TREE_SIMPLE = {
"expression": 'state["x"] > 1',
True: {"result": "b"},
False: {"result": "a"},
}
def decide(state, node):
return (
@illume
illume / reinitbug.py
Created February 14, 2021 14:29
press g key, see key repeat is slow. Press f key, then pressing g key means the key repeat is fast (broken).
"""
Manual test for pygame #2100
Press F to quit and restart the screen
"""
import pygame
#pygame.init() # <- problem doesn't happen at all with this