melange's People
melange's Issues
Data interface issues
The current format seems not generalizable as a module in this project. You should make it more generalizable. Think that anybody who does not know your data format should be able to use it.
1
melange/datahelper/mongodb_helper.py
Line 18 in ebd22d6
In general, this function is not generalizable. It can only digest the file format you have. You should design a function generic enough for every users to use. What you may do are
- Design a data model for the timesereis data.
- How to change the end user's data format into the target data model (that you designed) should be the end user's responsibility.
- The data model I used in the code I shared before was
[ (uuid1, timestamp1, value1), (uuid2, timestamp2, value2), ]
- If you'd like not to include uuids in this data model, you can just remove that part and assuming the uuid is given as a parameter, but it'd be painful in bulk upload.
- Then, in your function, you can transform the functions into the MongoDB model that you are using.
- Change "filename" to srcid, which is the identifier of a sensor.
2
melange/datahelper/mongodb_helper.py
Line 48 in ebd22d6
What is "s"?
3
melange/datahelper/mongodb_helper.py
Line 38 in ebd22d6
Again, change the parameter to srcid
4
melange/datahelper/mongodb_helper.py
Line 12 in ebd22d6
Where is this module?
5
melange/datahelper/mongodb_helper.py
Line 57 in ebd22d6
Use consistent naming conventions. file_path. I think it could be filename as you did in the other codes. But anyway, filename should be agnostic to your implementation, so I'd say if there is any code needeing
filename
, it'd be wrong. Such implementation should be added outside the package (like helper code.)
6
Document your data model in the code.
Code alignment.
While reading through your code, I found that you mix-used both spaces and tab for indentations. It's hard read in text editors. Could you fix them while you are modifying your code for the common database interface?
E.g. https://github.com/Thunder1989/melange/blob/master/inferencer/building_adapter_interface.py#L31
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.