Skip to content

Instantly share code, notes, and snippets.

@schuhumi
schuhumi / cvHelpers.py
Created April 23, 2021 10:40
simply plot float matrices with OpenCV
import numpy as np
import cv2
class cvWindows:
def __init__(self):
self.windowlist = []
def imshow(self, name, mat):
cv2.namedWindow(name, cv2.WINDOW_NORMAL | cv2.WINDOW_GUI_EXPANDED)
cv2.imshow(name, mat)
@schuhumi
schuhumi / get_wotd.py
Created June 1, 2020 11:06
Get Word of the Day from dictionary.com https://imgur.com/a/YicwTP6
#!/usr/bin/env python3
import urllib
from bs4 import BeautifulSoup
from os import path
class bcolors:
HEADER = '\033[95m'
CYAN = '\033[36m'
BLUE = '\033[34m'
@schuhumi
schuhumi / APKBUILD
Created September 24, 2019 13:58
APKBUILD for fread's xserver-sorg-video-imx. Linux headers need to be installed to the system as well or tweak CPATH
# Maintainer: Simon Schumann <simon.schumann@web.de>
pkgname=xserver-xorg-video-imx
pkgver=0.1.0
pkgrel=1
pkgdesc="Video driver for imx framebuffer device"
url="https://github.com/fread-ink/xserver-xorg-video-imx"
arch="all"
license="XFree86 License 1.0"
subpackages=""
depends=
@schuhumi
schuhumi / yoga l390 wifi.txt
Created July 8, 2019 06:34
Wifi hardware of Lenovo Yoga L390
00:14.3 Network controller: Intel Corporation Cannon Point-LP CNVi [Wireless-AC] (rev 11)
Subsystem: Intel Corporation Cannon Point-LP CNVi [Wireless-AC]
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 16
Region 0: Memory at a1338000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [c8] Power Management version 3
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
@schuhumi
schuhumi / journalctl -k.txt
Created July 8, 2019 06:32
Kernel messages of broken Intel wifi with linux-firmware 20190628
Jul 08 07:49:32 yogal390 kernel: iwlwifi 0000:00:14.3: enabling device (0000 -> 0002)
Jul 08 07:49:32 yogal390 kernel: iwlwifi 0000:00:14.3: Found debug destination: EXTERNAL_DRAM
Jul 08 07:49:32 yogal390 kernel: iwlwifi 0000:00:14.3: Found debug configuration: 0
Jul 08 07:49:32 yogal390 kernel: iwlwifi 0000:00:14.3: loaded firmware version 46.a41adfe7.0 op_mode iwlmvm
Jul 08 07:49:32 yogal390 kernel: iwlwifi 0000:00:14.3: Detected Intel(R) Wireless-AC 9560 160MHz, REV=0x318
Jul 08 07:49:32 yogal390 kernel: iwlwifi 0000:00:14.3: Applying debug destination EXTERNAL_DRAM
Jul 08 07:49:32 yogal390 kernel: iwlwifi 0000:00:14.3: Allocated 0x00400000 bytes for firmware monitor.
Jul 08 07:49:32 yogal390 kernel: iwlwifi 0000:00:14.3: base HW address: 48:89:e7:cb:99:bd
Jul 08 07:49:32 yogal390 kernel: iwlwifi 0000:00:14.3 wlp0s20f3: renamed from wlan0
Jul 08 07:49:33 yogal390 kernel: iwlwifi 0000:00:14.3: Applying debug destination EXTERNAL_DRAM
"modules": [
{
"name" : "beignet",
"buildsystem" : "cmake",
"make-install-args": [
"prefix=/app"
],
"config-opts": [
"-DCMAKE_INSTALL_PREFIX=/app"
],
import sys
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
gi.require_version('GtkClutter', '1.0')
from gi.repository import GtkClutter, Clutter
GtkClutter.init(sys.argv)
class Application(Gtk.Application):
@schuhumi
schuhumi / viewlocalrefs.py
Created September 13, 2015 20:17
sort local refs of your ipfs by filetype
#!/usr/bin/env python3
import os
import subprocess
refsdir = "./localrefs"
extensions = { "ASCII text":"txt",
"C source":"c",
"C++ source":"cpp",
@schuhumi
schuhumi / gist:0f1f13c6e2f35af15990
Created May 16, 2015 18:34
launch java jar with nautilus, save as ~/.local/share/applications/run-jar.desktop
[Desktop Entry]
Encoding=UTF-8
Type=Application
Exec=java -jar %f
Icon=java
Name=run-jar
Name[zh_CN]=run-jar
Comment=Run the jar file
[root@localhost ~]# ./parallelman.py
:: Synchronizing package databases...
downloading core.db...
downloading extra.db...
downloading community.db...
downloading alarm.db...
aur is up to date
Building trees
...list of indipendend trees(14):