This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MODULE=disjoint_set_c | |
VER=12 | |
EXT=cpython-3$(VER)-$(HOSTTYPE)-gnu.so | |
SO=$(MODULE).$(EXT) | |
%.$(EXT): %_setup.py %.pyx | |
env PYTHONPATH=/usr/local/lib/python3.12/dist-packages python3.$(VER) $< build_ext -i | |
strip $@ | |
-rm -rf build | |
all: $(SO) | |
clean: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3.12 | |
''' | |
https://www.pythonguis.com/tutorials/qtableview-modelviews-numpy-pandas/ | |
''' | |
from sys import argv, exit | |
from rich import print as rprint | |
from pandas import read_csv | |
from os import name as osname, popen | |
from os.path import realpath, basename, splitext, split | |
from re import sub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MODULE=primes_cython | |
VER=14 | |
EXT=cpython-3$(VER)-$(HOSTTYPE)-gnu.so | |
SO=$(MODULE).$(EXT) | |
%: %.cpp | |
g++ -O2 -o $@ $< | |
strip $@ | |
%.$(EXT): %_setup.py %.pyx | |
env PYTHONPATH=/usr/local/lib/python3.14/site-packages python3.$(VER) $< build_ext -i | |
strip $@ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/tcsh -f | |
"/usr/bin/true" '''\' | |
setenv PYTHONPATH /home/mdmitry/python3.12/dist-packages:/home/mdmitry/python3.12/dist-packages6 | |
exec /usr/bin/python3.12 $0 | |
''' | |
''' | |
https://octave.sourceforge.io/octave/function/sombrero.html | |
''' | |
import numpy as np | |
import matplotlib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3.14 | |
''' | |
https://www.lihaoyi.com/post/BuildyourownCommandLinewithANSIescapecodes.html | |
https://www.codequoi.com/en/coloring-terminal-text-tput-and-ansi-escape-sequences | |
https://web.archive.org/web/20210226122732/http://ascii-table.com/ansi-escape-sequences.php | |
''' | |
from sys import argv | |
from argparse import ArgumentParser | |
def print_color(fg_bg_code, color): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3.14 | |
import sys | |
# Completely replace sys.path | |
sys.path = ['', '/usr/lib/python3.14', '/usr/lib/python3.14/lib-dynload', | |
'/usr/local/lib/python3.14/site-packages', '/usr/lib/python3.14/site-packages' ] | |
import sys | |
from os.path import realpath, basename | |
from rich import print as rprint | |
import pandas as pd | |
import argparse |

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/tcsh -f | |
"/usr/bin/true" '''\' | |
if(1 == `uname | grep ^MINGW | wc -l`) then | |
exec python3.10 $0 | |
else | |
setenv PYTHONPATH /usr/local/lib/python3.14/site-packages | |
exec python3.14 $0 | |
endif | |
''' | |
# https://realpython.com/python310-new-features/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3.12 | |
from os import environ | |
from sys import argv | |
def sortDecorator(x): | |
def decorator(func): | |
def wrapper(*args, **kwargs): return func(*args, **kwargs) | |
return wrapper | |
return decorator |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/tcsh -f | |
set w=`xdotool getwindowfocus` | |
set g=`xdotool getwindowgeometry $w | grep : \ | |
| sort | awk '{print $2}' | tr '\012' ' ' | sed -e 's/ /+/' -e 's/,/+/' -e 's/$//'` | |
echo $g |
NewerOlder