Skip to content

Instantly share code, notes, and snippets.

@jhereth
jhereth / console.log
Created October 22, 2022 07:26
poetry add huggingface-hub - no dice
github.com/jhereth/poetry_huginface is 📦 v0.1.0 via 🐍 v3.7.14
❯ date; poetry -vv add git+https://github.com/huggingface/huggingface_hub.git
Fri Oct 21 22:33:01 CEST 2022
Using virtualenv: /Users/jhereth/quda_repos/github.com/jhereth/poetry_huginface/.venv
Updating dependencies
Resolving dependencies...
1: fact: poetry-huginface is 0.1.0
1: derived: poetry-huginface
1: fact: poetry-huginface depends on huggingface-hub (0.11.0.dev0)
@jhereth
jhereth / .pre-commit-config.yaml
Created February 16, 2022 21:51
reorder-python-imports experiment
repos:
- repo: local
hooks:
- id: reorder-local
name: Reorder python imports (locally installed)
entry: reorder-python-imports
language: python
types: ["python"]
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.7.1
```
jhereth@puk-3 articles_api % .venv/bin/python -m pytest -vv .
=========================================================================================== test session starts ============================================================================================
platform darwin -- Python 3.8.2, pytest-5.4.2, py-1.8.1, pluggy-0.13.1 -- /Users/jhereth/repos/github/jpizagno/huginns-news/sandbox/articles_api/.venv/bin/python
cachedir: .pytest_cache
rootdir: /Users/jhereth/repos/github/jpizagno/huginns-news/sandbox/articles_api, inifile: tox.ini
plugins: asyncio-0.12.0
collected 1 item
tests/integration/articles_api_test.py::test_get_results PASSED [100%]
# Automated Focus Stacking via Sony Imaging Edge for Sony A7III/A7RIII/A9
# Author: Andreas Mariotti / 25.07.2018
# Joachim Hereth / 08.12.2019
# Usage: Start Imaging Edge Remote, connect your camera, change camera to manual focus mode, focus on start position, run this script.
# Optional: Change the values of $Count, $Speed and $Sleep to your needs
$Count = 500 # Number of photos
$Speed = 't' # Focus speed: y=fast, t=medium, r=slow
$FocusRepeat = 10 # How often to focus before taking a shot
$FocusSleep = 50 # How long to sleep after focusing
$Sleep = 500 # Time between each shoot in miliseconds
(venv) puk-2:python jhereth$ mprof run --include-children --multiprocess python perf_test.py 2> /dev/null
mprof: Sampling memory every 0.1s
branch width row_count lexical median (s) mean (s)
SPARK-24915 3 100 True 0.82103 1.51440
SPARK-24915 3 100 False 0.69327 0.78487
SPARK-24915 15 100 True 0.79183 0.79360
SPARK-24915 15 100 False 0.75500 0.76866
SPARK-24915 30 100 True 0.87075 0.88923
SPARK-24915 30 100 False 0.88697 0.88728
SPARK-24915 75 100 True 1.38605 1.39553
@jhereth
jhereth / prospector.log
Created October 20, 2018 19:01
prospector run on scikit-learn
Messages
========
.
Line: None
pylint: failure / Tool pylint failed to run (exception was raised)
benchmarks/bench_plot_fastkmeans.py
Line: 97
pyflakes: F401 / 'mpl_toolkits.mplot3d.axes3d' imported but unused (col 5)
@jhereth
jhereth / MapR-Hadoop-Essentials-Lesson3-Mahout-Files.tgz.b64
Last active August 29, 2015 14:16
MapR Hadoop Essentials - files for Lesson 3, Mahout Example (base64-encoded tar-zipped).
H4sIAPZH8FQAA+1Z23PbWBn/qXGiRHG392xduou2W8BOE8s32VunKaRNLwlOUpq2kE1LUWwlVteW
vLKcpizlstxhhneeeITX8pBQMsPwxgwvzMB/wJ/BA8t3jiRbdhI3mWmyu0PO2DpH3/lu57scncvM
s7t60apWdbOk2/En2qqG114SVLKZDK9zWdWrs7ymkk6mskimMslENpnNZnJIJNNqOg058fpV2Voa
dUezZZlq3U4ku+F17/+cFqNas2xHtuyVuFbTimU9XtXKVsOJF5fjjlZ39DhhVOJVq6RX4stGRY8P
j0m7JDJ1Y6W8ZNllyyrtgcwOBOTuqepG1ahotuE82x2RO6Jdoe59HHsewrbas2yMG1YnpOEYXHGp
1liqGEW5WNHqdXkmmMjyR5Iky14/BbhD1apllOSqZpjRecc2zJXFR7Jmr9RjslO2rad1+cZaUa85
hmUSscyKosj1Z6ajreU7mPMwKNZXZZYTxNRsVGnAdZfKZc5xZrWqLo9zKYuJR2Nuf8WiXo9wXC7Q
W7ym2XWdtaIcNfko5uEapuMzJ9wp09FXyKAcnV5c7BTDdtFvkkyZ+5W3xmVTf8qBUV8bn7H7nNQc
bYahu0QBgmZPtMmuKeU+6T7fdJfc8pxHf0cn/SzzumXbekVjBm1hu+zaWM0GgksORprHbpbY6XVn
thM3mhoJyB6R2zkH3RUIRo/nLd0k+xcZy2taXS8FsF0NR9o0CQpqSigYdedKi7A05ejVqy1ZfODM
@jhereth
jhereth / MapR Essentials - Hive - receipts.txt
Created February 16, 2015 17:01
MapR Hadoop Essentials - Lesson 3 - receipts.txt (File referenced in Lesson 3, Part 19/44) but missing from the usual MapR Sandbox.
1901 588 525 63 588 525 63 .......... .......... ..........
1902 562 485 77 562 485 77 .......... .......... ..........
1903 562 517 45 562 517 45 .......... .......... ..........
1904 541 584 -43 541 584 -43 .......... .......... ..........
1905 544 567 -23 544 567 -23 .......... .......... ..........
1906 595 570 25 595 570 25 .......... .......... ..........
1907 666 579 87 666 579 87 .......... .......... ..........
1908 602 659 -57 602 659 -57 .......... .......... ..........
1909 604 694 -89 604 694 -89 .......... .......... ..........
1910 676 694 -18 676 694 -18 .......... .......... ..........
@jhereth
jhereth / MapR Essentials - HBase - myvoters.tsv
Created February 16, 2015 15:13
MapR Essentials Course - Lesson 3 - HBase Example. In the normal MapR sandbox the file myvoters.tsv is not included but is used in Lesson 3 of the MapR Essentials course.This is a base64 encoded gzipped version of this file.
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
H4sICGoH4lQAA215dm90ZXIudHN2AIV9aZpdN47s73tXoRXkx3lYjixnl7OtkvxSclW5V98R4HAA
nvTr+lGTmedyAIEAEAD949fP/3r79ZP8+4/v3x6pP358//L2+evbj5+PWPpLbY/sXXuGxx/vbz++
vH39+vnTj5+vb99+ef3y+6P4x6+v//z+5f3zz4f3/qWWR+itPuPj9edvn799+vz16ys+6q5RvfiX
7B8+Nl+f6fE/n7/89ulfGPnLn+8YWf3j69svr+8/P7+/fcYfBv9S4qO1EJ758Y/Pv7y/vXICf33/
89s/HjU93r79+vrHK/7t20/8Sn8pDdOovT3L+PLbl98+//L910cO9rvNyVSL9/FZHz+///PTz9++
//MP7kAsj/fXP/785evbF4xs0b3E9AgNf/Jsj3++/f766f37L2/fZGgzE/C1vRSM7T61Z398/RNj
//v7bzI0F7WvwbmX5rG6nJ/ePb7/+PL5/dN//vr6/Y/fvn975br+8f6K3Qglv/T6CKlX9/RencBv
r+/fPuNX/+eB7RmDW3tx9dHxN08f5vb/4/M7ftMeavHuJfGj0Yenj+qjf+KD77/hvz5C1XsQMAue
WHDp6dPjz69//fjx+kOdWmjX+TZfXvDnvqRQnz4/8KNfXtXiStYCFtpLz48QOr5cHl8+f/3X27fr
KFI2p1YhDb1jiRlfrkocfnn//m/MQq8yQxhyw5e970/f1Cr/6/PX37+9vj+CFbXg2ws2PsTssIF9
@jhereth
jhereth / DB metrics (BASE64 encoded)
Created February 15, 2015 12:37
MapR Hadoop Essentials - MySQL-databse "metrics" tar.gz'ed and BASE64 encoded.
This file has been truncated, but you can view the full file.
H4sIALdH31QAA9T9W9cu2XWcB+q2+Suqr0i6ATnXea3qoTEEEiULNgjQOLgt30AQRVscgyLdJOhh
//ueK1+AtTMyJkHXjGW50XCbrr3re/C+X2TkaUbM//gffvWf//I3f/dXf/H3v/qP//Cf/9d/+ff/
37/+F+r/XPafXuv9/7b/fPH/ztc1Wqqp/IuUax+9lp77v7hSqSP/i68u+f8S8p9/+Pvf/Prvvvrq
X/zd3/7tb/6pv/f7/vz/T//z/e9/9Wf/x8//+x9/tX/7X6XrX6by1Vc//Ku/N0n8h6/av0z/cpTv
ffU//+3fffV3f/kf/9Ovf/P9v/6rv/mH//37/8vf/MNXf/S/z/6rXv/4D77/ffvvV//2b//+N19/
9dd/+xe//uv/ZP/nV/afH/76N7/+D7/++7/8+qvfSmz/ve9/p//sf/Pnf/l3/9tf/t1X9v/8/V/9
7d/8Pz7/4/7gD/7r/+r/Wa90pa9+/s0vvvrXP/3xD3/1p//2Bz/7wZ/+4puf/cr+0a/+9Mc/+uYn
v/hX//pfs3/81X/1X/+/f+9P+Nk3P//lj3/x89eP+O0/937GT3/84x/84kc//Yn9Xz/5yTd/uv/P
/SPIP37/hJ/84M+++flX//Cb/3l++Wfl25/+ix/92Te/+p9++pNv7Ef+4//9/rvf/rU//H9d19fX
9Yff/p0r1W9/3i9/8qP//pff2Af/5k//u/1JH//f3/vq+ceX80P+zU9/9s2P/puf/Oq/++bfffuT