Stream URL: https://twitch.tv/exhuma
Current Focus: "WickedShout"
Secondary: "x690", "melldechof"
Some days I may work on other project from my GitHub repositories for general housekeeping.
| """ | |
| This module shows an alternative implementation of the code shown in the SO question | |
| https://stackoverflow.com/questions/58188342/looping-through-web-pages | |
| Comments marked with a ♫ symbol are possible improvements to this code which were | |
| left out to keep concepts out of the code which could make it more difficult to | |
| understand for beginners. | |
| """ | |
| from os.path import exists |
| # pylint: disable=no-member, no-name-in-module | |
| """ | |
| This program is inspired on exercise 4.4 from the book for 1CB "CNESC | |
| Informatique" (2019-2020): The Mandelbrot set. The exercise demands the | |
| following features: | |
| * Display the Mandelbrot set on the complex plane. Initially between -2.2-1.2j | |
| and 1.0+1.2j and later by coordinates selected by the user (see below). | |
| * Points within the set should be drawn in black, points outside of the set | |
| should be colored based on the number of iterations necessary to determine |
| """ | |
| 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() |
| """ | |
| This module defines additional "IP-Address" type decorators for use with | |
| SQLAlchemy and PostgreSQL. These types will convert the PostgreSQL values | |
| to/from Python :py:mod:`ipaddress` classes. | |
| These classes can be used in model definitions:: | |
| class MyTable(Base): | |
| ... | |
| ip = Column(PgIpAddress, ...) |
| class ScannedPort: | |
| label: str = "" | |
| clsas ScannedDevice: | |
| hostname: str = "" | |
| ports: List[ScannedPort] = [] | |
| class Port(Base): | |
| hostname = Column(String, ForeignKey("Device.hostname") | |
| label = Column(String) |
| 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() |
| """ | |
| 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. | |
| """ |
Stream URL: https://twitch.tv/exhuma
Some days I may work on other project from my GitHub repositories for general housekeeping.
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.