Skip to content

Instantly share code, notes, and snippets.

View Willy-JL's full-sized avatar
🗿

WillyJL Willy-JL

🗿
View GitHub Profile
@Willy-JL
Willy-JL / proxitok.js
Last active February 26, 2023 23:40
Userscript to redirect tiktok.com to proxitok
// ==UserScript==
// @name Proxitok
// @match https://www.tiktok.com/*
// @grant none
// @version 1.0
// @run-at document-start
// @author WillyJL
// @description Redirect tiktok.com to proxitok
// ==/UserScript==
@Willy-JL
Willy-JL / pyimgui_scrolling.py
Last active May 17, 2022 07:28
Smooth scrolling and scroll multiplier for pyimgui
from imgui.integrations.glfw import GlfwRenderer
import OpenGL.GL as gl
import imgui
import glfw
# Example usage
if __name__ == "__main__":
imgui.create_context()
window = impl_glfw_init() # Get this here https://github.com/pyimgui/pyimgui/blob/24219a8d4338b6e197fa22af97f5f06d3b1fe9f7/doc/examples/integrations_glfw3.py
@Willy-JL
Willy-JL / pyimgui_ratingwidget.py
Last active November 19, 2022 03:43
Simple rating widget for pyimgui
import imgui
filled_icon = "󰓎"
empty_icon = "󰓒"
def ratingwidget(id: str, current: int, num_stars=5, *args, **kwargs):
value = current
imgui.push_style_color(imgui.COLOR_BUTTON, 0, 0, 0, 0)
imgui.push_style_color(imgui.COLOR_BUTTON_ACTIVE, 0, 0, 0, 0)
@Willy-JL
Willy-JL / async_thread.py
Last active January 11, 2023 19:30
Python thread to run coroutines in a separate asynchronous context
import threading
import asyncio
import typing
import time
loop: asyncio.BaseEventLoop = None
thread: threading.Thread = None
done_callback: typing.Callable = None
@Willy-JL
Willy-JL / sync_thread.py
Last active May 16, 2022 16:58
Python thread to run functions in a queue
import queue as _queue
import threading
import typing
import time
fn_queue: _queue.Queue = None
thread: threading.Thread = None
def setup():
@Willy-JL
Willy-JL / pyimgui_imagehelper.py
Last active July 5, 2023 10:08
Image helper class for pyimgui
from PIL import Image, ImageSequence, UnidentifiedImageError
import OpenGL.GL as gl
import pathlib
import imgui
_dummy_texture_id = None
def dummy_texture_id():
global _dummy_texture_id
@Willy-JL
Willy-JL / pyimgui_filepicker.py
Last active February 25, 2024 05:51
Simple file picker widget for pyimgui
import pathlib
import typing
import string
import imgui
import sys
import os
dir_icon = "[D] " # Use "󰉋 " if you have setup Material Design Icons
file_icon = "[F] " # Use "󰈔 " if you have setup Material Design Icons
up_icon = "Go Up" # Use "󰁞" if you have setup Material Design Icons
@Willy-JL
Willy-JL / pyimgui_aiohttp_example.py
Last active March 27, 2022 17:39
PyImGui + Aiohttp example, with main sync thread for window and second thread for asyncio
from imgui.integrations.glfw import GlfwRenderer
import OpenGL.GL as gl
import traceback
import threading
import asyncio
import aiohttp
import imgui
import glfw
import sys
@Willy-JL
Willy-JL / 🧩 Code::Stats Levels
Last active July 5, 2024 06:25
🧩 Code::Stats Levels
Total XP lvl 15 ( 363,135 XP)
C lvl 10 ( 176,037 XP)
Python lvl 8 ( 112,188 XP)
Markdown lvl 3 ( 21,313 XP)
JavaScript lvl 2 ( 13,699 XP)
Shell Script lvl 2 ( 10,875 XP)
Vue lvl 2 ( 9,541 XP)
Lua lvl 1 ( 4,563 XP)
C++ lvl 1 ( 3,814 XP)
HTML lvl 1 ( 2,858 XP)
C +94.7k -5.9k ████████████████████░ 95.5%
Markdown +1.2k -199 ▍░░░░░░░░░░░░░░░░░░░░ 2.3%
Python +700 -205 ▎░░░░░░░░░░░░░░░░░░░░ 1.3%
CSV +174 -64 ▏░░░░░░░░░░░░░░░░░░░░ 0.7%
Text +52 -52 ░░░░░░░░░░░░░░░░░░░░░ 0.1%
YAML +36 -2 ░░░░░░░░░░░░░░░░░░░░░ 0.1%
JavaScript +43 -0 ░░░░░░░░░░░░░░░░░░░░░ 0.1%
JSON +6 -6 ░░░░░░░░░░░░░░░░░░░░░ 0.0%