Skip to content

Instantly share code, notes, and snippets.

@Cheaterman
Cheaterman / main.py
Created August 24, 2024 16:33
A radial progress bar with a gradient!
from kivy.animation import Animation
from kivy.app import App
from kivy.lang import Builder
from kivy.properties import AliasProperty, ColorProperty, NumericProperty
from kivy.uix.effectwidget import AdvancedEffectBase, EffectWidget
class TangentGradient(AdvancedEffectBase):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@Cheaterman
Cheaterman / main.py
Created April 4, 2024 18:29
main.py
import collections
import re
text = '''
20. Miguel ReC FIN 30,39 31
21. Mz FIN 30,40 29,5
21. kuiva FIN FIN 30,40 29,5
23. MozMan H K GBR 30,48 27,5
23. oizo! SWE 30,48 27,5
25. Jalli FBE NOR 30,49 25,5
@Cheaterman
Cheaterman / README.md
Last active March 16, 2024 14:33
Kivy/Cython example of GIL vs nogil thread work

Building

Use cythonize --build cysleep.pyx

Running

After building, run python main.py

@Cheaterman
Cheaterman / main.py
Created October 11, 2023 12:25
main.py
chunks = [
'He',
'llo',
', W',
'orl',
'd!\nA',
'nd h',
'ap',
'py ',
'Pyth',
@Cheaterman
Cheaterman / better_react.py
Last active September 2, 2023 18:44
Thinking in Kivy - "Thinking in React" example using Kivy
from kivy.app import App
from kivy.lang import Builder
from kivy.properties import (
BooleanProperty,
ListProperty,
StringProperty,
)
from kivy.uix.boxlayout import BoxLayout
@Cheaterman
Cheaterman / magicmodule.py
Created August 19, 2023 16:01
magicmodule.py
import sys
class UndefinedNameLogger:
def __getattr__(self, name):
print(f'{name} not found in module {__name__}')
sys.modules[__name__] = UndefinedNameLogger()
@Cheaterman
Cheaterman / README.md
Last active July 21, 2023 20:48
Human shader in GLSL
@Cheaterman
Cheaterman / scibs.py
Last active December 2, 2022 16:58
scibs.py
import re
import httpx
from bs4 import BeautifulSoup
EMAIL = '[email protected]'
USER_AGENT = (
'Mozilla/5.0 (X11; Linux x86_64; rv:99.0) '
'Gecko/20100101 Firefox/99.0'
)
@Cheaterman
Cheaterman / 0001-fix-hdmi-colors.patch
Created September 19, 2022 18:19
0001-fix-hdmi-colors.patch
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
index 3e1be9894..eee410758 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
@@ -2719,6 +2719,9 @@ static u32 *dw_hdmi_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge,
* if supported. In any case the default RGB888 format is added
*/
+ /* Default 8bit RGB fallback */
+ output_fmts[i++] = MEDIA_BUS_FMT_RGB888_1X24;
@Cheaterman
Cheaterman / etcportagepatchessys-kernelgentoo-sources0006-add-nvidia-wmi-ec-backlight.patch
Created September 16, 2022 20:28
/etc/portage/patches/sys-kernel/gentoo-sources/0006-add-nvidia-wmi-ec-backlight.patch
diff --git a/MAINTAINERS b/MAINTAINERS
index 3b79fd441dde..c7f17525b340 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -13400,6 +13400,12 @@ S: Maintained
F: drivers/video/fbdev/nvidia/
F: drivers/video/fbdev/riva/
+NVIDIA WMI EC BACKLIGHT DRIVER
+M: Daniel Dadap <[email protected]>