https://github.com/neowaylabs/datahub
Just a POC :-)
https://github.com/neowaylabs/datahub
Last synced: 3 months ago
JSON representation
Just a POC :-)
- Host: GitHub
- URL: https://github.com/neowaylabs/datahub
- Owner: NeowayLabs
- License: mit
- Created: 2017-03-05T13:33:55.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-07T11:13:29.000Z (over 9 years ago)
- Last Synced: 2023-10-30T05:20:18.935Z (over 2 years ago)
- Language: Go
- Size: 110 KB
- Stars: 3
- Watchers: 13
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Datahub
Just a POC :-)
# Running
You need to have docker installed, after that just run:
```
make run
```
The server is running locally, to upload a file to it:
```
./tools/upload.sh 127.0.0.1:8080 /tmp/example
```
To run R code on the server:
```
./tools/execr.sh 127.0.0.1:8080 /tmp/rcode
```
R code must work with the files previously uploaded
to the server. Because of that the script will always
upload examples datasets before uploading your code.
# R Examples
If you want to run an R example directly on your machine just run:
```
cd examples
sudo R -f ./installdeps.r
R -f ./code.r
```
Example:
```
curl -XPOST http://192.168.10.169:8080/api/companies/jobs -d '{"title": "Faturamento Presumido de Empresas do Brasil", "description":"Calcular para a Neoway o faturamento presumido de todas as empresas do Brasil baseado no CNAE", "deadline": "2017-04-01", "proposed": 5000, "accuracyRequired": 90.5}'
curl http://192.168.10.169:8080/api/companies/jobs|json_pp
curl -XPOST http://192.168.10.169:8080/api/scientists/4/jobs/5/apply -d '{"counterproposal": 1000}'
curl -XPOST http://192.168.10.169:8080/api/companies/jobs/5/start -d '{"scientists":[{"id":4}]}'
curl http://192.168.10.169:8080/api/scientists/4/jobs/5/workspace|json_pp
```