This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import cairo | |
import gi | |
gi.require_version('Gtk', '3.0') | |
from gi.repository import Gtk, Gdk | |
class AppWindow(Gtk.ApplicationWindow): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
class MyLogger: | |
enabled = True | |
def log(self, something: str) -> None: | |
if not self.enabled: | |
print("NOT LOGGING:", something) | |
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Zstore is designed to be a heavily read, low write storage that is shared | |
across all instances of Python code that is connected to it. It is updated | |
via a call to .update(), which is meant to be a slow process. | |
Usage: | |
zstore = Zstore(db) | |
zstore.set('something', 'something') | |
zstore.get('something') |