Example on how to use howler.js
This requires howler.js
to be in the same folder as all these files. It can be found in the dist
folder of the howler.js download.
from fastapi import Depends, FastAPI | |
from pydantic import BaseModel | |
from sqlalchemy import Column, Integer, String | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy.orm import Query, Session | |
from pagination import PaginatedList, paginated_get | |
Base = declarative_base() |
''' | |
This module provides a function ``make_except_hook`` which returns a function | |
usable as replacement for ``sys.excepthook``. | |
All imports are done dynamically to make this function a self-contained, | |
copy/pasteable piece of code. | |
Requires the "blessings" module to work! | |
--- License - (MIT) ---------------------------------------------------------- |
""" | |
Access windows credentials | |
Credentials must be stored in the Windows Credentials Manager in the Control | |
Panel. This helper will search for "generic credentials" under the section | |
"Windows Credentials" | |
Example usage:: | |
result = get_generic_credential('foobar') |
""" | |
This file demonstrated using the "FetchedValue" feature of SQLAlchemy for | |
values which are generated by the DB, without knowing *how* they are generated | |
in the DB. | |
""" | |
from sqlalchemy import Column, DateTime, FetchedValue, Unicode, create_engine | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy.orm import sessionmaker | |
Base = declarative_base() |
{ | |
"[sql]": { | |
"editor.formatOnSave": false | |
} | |
} |
Example on how to use howler.js
This requires howler.js
to be in the same folder as all these files. It can be found in the dist
folder of the howler.js download.
Stream URL: https://twitch.tv/exhuma
Some days I may work on other project from my GitHub repositories for general housekeeping.
""" | |
Helper functions for unit-testing with SQLAlchemy | |
This provides a context-manager "rb_session" which | |
creates a new session that ignores all ".commit()" | |
calls. This might not work with all databases. It | |
has been tested with PostgreSQL. Verify that the | |
commits are really ignored if you use any other DB. | |
""" |
import logging | |
import sys | |
from logging.handlers import QueueHandler, QueueListener | |
from queue import Queue | |
from time import sleep | |
class FlushingHandler(QueueHandler): | |
def flush(self): | |
super().flush() |