Skip to content

Instantly share code, notes, and snippets.

thodnev

  • Kiev, Ukraine
View GitHub Profile
@thodnev
thodnev / arvfakegvcamera.cpp
Created Apr 30, 2018
Modified version of ARAVIS fake camera
View arvfakegvcamera.cpp
/* 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
*/
@thodnev
thodnev / cache_add.py
Last active Jul 22, 2017
werkzeug cache additions
View cache_add.py
'''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:
View messagequeue.py
'''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
View messagedispatch.py
'''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
View pollingtst.py
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):
View threadedgui.py
'''
Useful threaded GUI routines
'''
# Author: thodnev
# TODO: add docstrings to methods
import queue
You can’t perform that action at this time.