I hereby claim:
- I am shoeffner on github.
- I am shoeffner (https://keybase.io/shoeffner) on keybase.
- I have a public key whose fingerprint is 17CC D765 B0C7 C5C1 EE7B 890B FF4B F569 F0FF E9C2
To claim this, I am signing this object:
#!/usr/bin/env python | |
""" | |
This script converts all *.jp2 files in a directory (IMAGE_PATH) to *.jpg files. | |
It uses IrfanView's command line tools. Specify IRFANVIEW_PATH to make it work. | |
""" | |
import logging | |
import os | |
import subprocess | |
IRFANVIEW_PATH = os.path.join('C:', r'\Program Files', 'IrfanView', 'i_view64.exe') |
""" | |
Left click adds points. | |
Right click clears the image. | |
Use the fancy figure window to store plots. | |
If 2+ points were added, principal components are drawn at the center of mass. | |
""" | |
import matplotlib | |
matplotlib.use('Qt5Agg') |
I hereby claim:
To claim this, I am signing this object:
ZSH theme, further simplied from Minimal Zoo by s3ththompson.
Shows animal emoji followed by a %
sign, denoting the last return value (red for non-zero, green for zero):
🐌 %
🐚 %
🐑 %
🐁 %
def flatten(x, depth=-1): | |
"""Flattens a list of lists into a single list.""" | |
if depth == 0: | |
return x | |
if isinstance(x, list): | |
result = [] | |
for el in x: | |
if hasattr(el, '__iter__') and not isinstance(el, str): | |
result.extend(flatten(el, depth - 1)) | |
else: |