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
/* The modified ArvFake component, allowing to stream from | |
* actual web camera. | |
* Please don't expect production-ready code here. It's dirty, | |
* contains a lot of hardcoded stuff. But enough for | |
* conducting experiments. | |
* Be sure to comment-out the #error block in original source | |
* if problems arise during build. | |
* Below is listed the original LICENSE of ARAVIS | |
*/ |
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
'''This module contains cache-related logic''' | |
## TODO: improve documentation of contents | |
import threading | |
import exceptions | |
from werkzeug.contrib.cache import (SimpleCache, MemcachedCache, RedisCache, | |
FileSystemCache, NullCache) | |
class CacheMixin: |
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
'''A throughput-limiting message dispatcher for Telegram bots''' | |
import sys | |
import time | |
import threading | |
if sys.version_info.major > 2: | |
import queue as q | |
else: | |
import Queue as q |
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
'''A throughput-limiting message dispatcher for Telegram bots''' | |
import sys | |
import time | |
import threading | |
if sys.version_info.major > 2: | |
import queue as q | |
else: | |
import Queue as q |
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
class Polling: | |
def __init__(self, routine): | |
self.routine = routine | |
def __call__(self, *args, **kwargs): | |
self.__last = self.routine(*args, **kwargs) | |
return self.__last | |
@property | |
def last(self): |
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
''' | |
Useful threaded GUI routines | |
''' | |
# Author: thodnev | |
# TODO: add docstrings to methods | |
import queue |