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
#nim.cfg | |
#-d:release | |
#-d:danger | |
#-d:samplerate=44100 | |
# Result (12th Gen Intel(R) Core(TM) i9-12900 2.40 GHz): | |
# | |
#GSinOsc : (seconds: 0, nanosecond: 283590800) | |
#RVSinOsc : (seconds: 1, nanosecond: 615131700) | |
#STDSinOsc: (seconds: 6, nanosecond: 88408100) |
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
#https://stackoverflow.com/questions/26270681/can-an-asyncio-event-loop-run-in-the-background-without-suspending-the-python-in | |
import asyncio | |
import threading | |
import cherrypy | |
from cherrypy.process import plugins | |
from hbmqtt.client import MQTTClient, ClientException | |
from hbmqtt.mqtt.constants import QOS_1, QOS_2 | |
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 threading | |
import pgpubsub | |
import cherrypy | |
from cherrypy.process import plugins | |
class PGrepub(plugins.SimplePlugin): | |
""" | |
Plugin that listens to Postresql notification channels and publishes | |
the payload unmodified to a channel on the CherryPy bus. | |
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 threading | |
import cherrypy | |
from cherrypy.process import plugins | |
class Portier(threading.Thread): | |
""" | |
The Doorman (Portier) detects changes of message by listening to the | |
subscribed channel, opens 'the door' as a message appears, yield it | |
and closes the door once trough. |