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 May 5, 2024 03:15
🧩 Code::Stats Levels
Total XP lvl 13 ( 283,031 XP)
C lvl 9 ( 135,852 XP)
Python lvl 7 ( 95,588 XP)
JavaScript lvl 2 ( 12,691 XP)
Shell Script lvl 2 ( 10,704 XP)
Markdown lvl 2 ( 10,018 XP)
Lua lvl 1 ( 4,563 XP)
C++ lvl 1 ( 3,221 XP)
HTML lvl 1 ( 2,794 XP)
YAML lvl 1 ( 2,149 XP)
C +26.4k -29.8k ███████████████████▎░ 92.2%
Markdown +982 -364 ▉░░░░░░░░░░░░░░░░░░░░ 4.6%
JavaScript +7.7k -36 ▏░░░░░░░░░░░░░░░░░░░░ 0.9%
TypeScript +365 -69 ▏░░░░░░░░░░░░░░░░░░░░ 0.6%
Python +182 -52 ░░░░░░░░░░░░░░░░░░░░░ 0.5%
Shell +158 -56 ░░░░░░░░░░░░░░░░░░░░░ 0.4%
CSV +105 -56 ░░░░░░░░░░░░░░░░░░░░░ 0.4%
YAML +84 -29 ░░░░░░░░░░░░░░░░░░░░░ 0.2%
JSON +35 -35 ░░░░░░░░░░░░░░░░░░░░░ 0.1%
Text +24 -0 ░░░░░░░░░░░░░░░░░░░░░ 0.0%