pamelam / mptools Goto Github PK
View Code? Open in Web Editor NEWWrapper for multiprocessing that provides a bunch of boilerplate.
License: MIT License
Wrapper for multiprocessing that provides a bunch of boilerplate.
License: MIT License
I would like to use mptools in a research project in University because i need a reliable, minimal queue-worker framework. I notice there were no recent commits - so is this mature code? Is it in use somewhere? I think the code is beautiful and very readable. ๐
I needed to switch logging to syslog, and added code to do that:
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': '%(levelname)s %(module)s P%(process)d T%(thread)d %(message)s'
},
},
'handlers': {
'stdout': {
'class': 'logging.StreamHandler',
'stream': sys.stdout,
'formatter': 'verbose',
},
'sys-logger6': {
'class': 'logging.handlers.SysLogHandler',
"address": ["127.0.0.1", 514],
'facility': "local6",
'formatter': 'verbose',
},
},
'loggers': {
'my-logger': {
'handlers': ['sys-logger6', 'stdout'],
'level': logging.DEBUG,
'propagate': True,
},
}
}
logging.config.dictConfig(LOGGING)
my_logger = logging.getLogger('my-logger')
def _logger(name, level, msg, exc_info=None):
elapsed = time.monotonic() - start_time
hours = int(elapsed // 60)
seconds = elapsed - (hours * 60)
my_logger.log(level, f'{os.getpid()} - {hours:3}:{seconds:06.3f} {name:20} {msg}', exc_info=exc_info)
this could easily be put into a json config file.
is that a desired feature? i could provide a patch.
An attempt to install the stable version with pip install mptools gives "ERROR: No matching distribution found for mptools"
https://pypi.org/project/mptools/ gives 404
System:
Win10, Python 3.6.2, pip 20.3 and 20.2.2 before that. Also tried Python 3.8.3
Use sphinx, add doc-strings to generate some basic docs, I think?
There are still a few lines not covered by tests. Since the last test that was added to cover what seemed like an unimportant line ended up finding a bug, it's probably a good idea to nail all of them down.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.