Skip to content

Instantly share code, notes, and snippets.

@TamasNo1
TamasNo1 / ChatGPT Codex Usage- Weekly Linear Usage Graph-0.0.3.user.js
Last active February 9, 2026 10:25
Adds a simple linear weekly usage graph (100->0 over 7 days) + an X marker for current remaining usage.
// ==UserScript==
// @name ChatGPT Codex Usage: Weekly Linear Usage Graph
// @namespace https://chatgpt.com/
// @version 0.0.3
// @description Adds a linear weekly usage graph (100->0 over 7 days) + an X marker for current remaining usage.
// @match https://chatgpt.com/codex/settings/usage*
// @run-at document-idle
// @grant none
// ==/UserScript==
@TamasNo1
TamasNo1 / lru.py
Created August 31, 2023 16:29
Python LRU cache with expiry
import functools
import time
from collections import OrderedDict
class LRUCache:
def __init__(self, max_size, expiry_hours):
self.cache = OrderedDict()
self.max_size = max_size
self.expiry_seconds = expiry_hours * 3600
@TamasNo1
TamasNo1 / multiprocessing.py
Created May 11, 2019 18:40
Python multiprocessing template
from multiprocessing import Pool
import datetime
import time
import os
def f(x):
time.sleep(0.2)
return x*x
before = datetime.datetime.now()