Skip to content

Instantly share code, notes, and snippets.

Avatar

ociule

View GitHub Profile
@ociule
ociule / base.css
Created May 25, 2021
Django teaching: tetris with HTMX
View base.css
body{
background:lightblue !important;
}
.box {
background: black;
border-radius: 4px;
width: 40px;
height:40px;
}
View ps_exists_win32.py
import ctypes
import win32event, winerror
class ExitCodeProcess(ctypes.Structure):
_fields_ = [
('hProcess', ctypes.c_void_p), # HANDLE
('lpExitCode', ctypes.POINTER(ctypes.c_ulong)) # LPDWORD
]
@ociule
ociule / ipnbdoctest.py
Last active Jul 12, 2018 — forked from minrk/ipnbdoctest.py
simple example script for running and testing notebooks.
View ipnbdoctest.py
#!/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).