kankiri / pabiana Goto Github PK
View Code? Open in Web Editor NEWA minimalistic Python framework for distributed home automation systems based on ØMQ
License: MIT License
A minimalistic Python framework for distributed home automation systems based on ØMQ
License: MIT License
Area1 is subscribed to Area2 without a slot. If Area1 then receives a message from Area2 with a slot a TypeError will be thrown.
File "/pabiana/parsers.py", line 21, in imprint_full
area.context[source][slot].appendleft(message)
TypeError: sequence index must be integer, not 'str'
Use classes instead of adding functions to an Area instance. Whether the functions have to be added to the instance can be discussed. A simple lookup table might be enough.
class A:
trig = {}
trac = []
def __init__(self):
self.trig = {}
for trig in A.trig:
self.trig[trig] = A.trig[trig].__get__(self, A)
@staticmethod
def register(func):
A.trig[func.__name__] = func
return func
@staticmethod
def note(func):
A.trac.append(func.__name__)
return func
class B(A):
def __init__(self):
super().__init__()
@A.register
def method1(self):
pass
@A.note
def method2(self):
pass
Port the code to make use of Python 3's pathlib
throughout the project. This includes files like:
setup.py
__main__.py
If you define an alteration
function to listen to messages from an area, the message is not passed on to the function. You can access the message through the area.context
variable, but not as a function parameter.
Provide another option to coordinate Pabiana areas beside using a central clock process. It should be a flexible, stable, decentralized system.
At the moment, the trigger name is added to the parameters. Send the trigger name instead as the first part of a multipart message.
There should be a framework to easily test a single area or multiple areas locally. It should be possible to manipulate the input of tested areas.
The basic functionality of an area should look like this: If there was a change to any context values, call functions to calculate a new output. Context changes can be performed by other areas or from within the area. Both should result in a similar behavior.
Functions should be able to subscribe to changes in specific context values. These functions get called after every change to a subscribed value.
The basic functionality should closely resemble the behavior of a neural network (e.g. input -> output).
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.