Skip to content

Instantly share code, notes, and snippets.

View elejke's full-sized avatar
♻️

German Novikov elejke

♻️
View GitHub Profile
@0xdevalias
0xdevalias / ai-ml-toolkit.md
Last active June 11, 2024 17:01
Some notes on AI/ML tools that seem interesting/useful (largely aiming to focus on open source tools)
@RhetTbull
RhetTbull / vision.py
Last active May 27, 2024 20:57
Use Apple's Vision framework from Python to detect text in images
""" Use Apple's Vision Framework via PyObjC to detect text in images
To use:
python3 -m pip install pyobjc-core pyobjc-framework-Quartz pyobjc-framework-Vision wurlitzer
"""
import pathlib
@jcupitt
jcupitt / bench-read.py
Created August 21, 2020 00:35
benchmark pyvips vs cv2 for image read
#!/usr/bin/python3
# setup with:
#
# mkdir sample
# cd sample
# for i in {1..300}; do cp ~/pics/k2.png $i.png; done
#
# on this modest 2015 laptop running Ubuntu 20.04, I see:
#
from gino import Gino
db = Gino()
async def start():
await db.set_bind('postgresql://localhost/gino')
# Create tables
await db.gino.create_all()
@jcberthon
jcberthon / networkmanager-wifi-powersave.md
Last active July 17, 2024 14:03
NetworkManager Wi-Fi powersaving configuration

NetworkManager WiFi Power Saving

NetworkManager supports WiFi powersaving but the function is rather undocumented.

From the source code: wifi.powersave can have the following value:

  • NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0): use the default value
  • NM_SETTING_WIRELESS_POWERSAVE_IGNORE (1): don't touch existing setting
  • NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2): disable powersave