Skip to content

Instantly share code, notes, and snippets.

View ociule's full-sized avatar

ociule

View GitHub Profile
@ociule
ociule / ipnbdoctest.py
Last active July 12, 2018 10:06 — forked from minrk/ipnbdoctest.py
simple example script for running and testing notebooks.
#!/usr/bin/env python
"""
simple example script for running and testing notebooks.
Usage: `ipnbdoctest.py foo.ipynb [bar.ipynb [...]]`
Each cell is submitted to the kernel, and the outputs are compared with those stored in the notebook.
Tested with python 3.6 and jupyter 5.0
"""
# License: MIT, but credit is nice (Min RK, ociule).
@ociule
ociule / base.css
Created May 25, 2021 15:47
Django teaching: tetris with HTMX
body{
background:lightblue !important;
}
.box {
background: black;
border-radius: 4px;
width: 40px;
height:40px;
}
import ctypes
import win32event, winerror
class ExitCodeProcess(ctypes.Structure):
_fields_ = [
('hProcess', ctypes.c_void_p), # HANDLE
('lpExitCode', ctypes.POINTER(ctypes.c_ulong)) # LPDWORD
]