Skip to content

Instantly share code, notes, and snippets.

@player1537
player1537 / _semeditor is a local GUI editor that supports semantic syntax highlighting.md
Last active January 11, 2024 10:55
semeditor: Local GUI editor that supports semantic syntax highlighting.

Semeditor

Install with:

$ pip install semeditor@git+https://gist.github.com/player1537/1c23b91b274d2e885be80d5892bac5b7.git

Put one kind of text (e.g. text with positivity, text with concrete ideas, text referring to some concept) in each of the left panes. Then in the right pane, put some document text that you want to analyze/edit.

@player1537
player1537 / ospray.py
Last active August 17, 2023 14:36
Lightweight wrapper around Intel OSPRay for Python
"""Lightweight wrapper around Intel OSPRay for Python
Install with:
```console
$ pip install ospray@git+https://gist.github.com/player1537/c06faa784cc993fd6fd9c112d9feb5d9.git
```
Use with:
"""
"""
__all__ = [
'maybe_download',
'maybe_extract',
'maybe_init',
]
@player1537
player1537 / README.md
Last active April 15, 2024 12:06
This is a library of helper functions that I use when writing Python Jupyter code.

This is a library of helper functions that I use when writing Python Jupyter code.

Usually, I just copy-paste this between notebooks, but I've found a need for simplifying the code-reuse story across different notebooks.

from __future__ import annotations
try:
    from mediocreatbest import auto
except ImportError:
 %pip install --quiet --upgrade pip

Probabilistic SCAD

This idea would build on the idea of OpenSCAD which is a "Programmer's Solid 3D CAD Modeller." In short, you could write code to generate 3D models that could be 3D printed, like:

// Resolution
$fn=50;