Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

adding my transport_x app #114

Open
wants to merge 5 commits into
base: v3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions PegasusMKD/transport_x/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
app_order_hash.txt
data.json
chain.json
orders.json
./.wallet/*
UTC-*
wallet
60 changes: 60 additions & 0 deletions PegasusMKD/transport_x/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
FROM ubuntu

RUN apt-get update \
&& apt-get install -y python3-pip python3-dev \
&& cd /usr/local/bin \
&& ln -s /usr/bin/python3 python \
&& pip3 install --upgrade pip

##########ADD PYTHON PACKAGES HERE:#######################

RUN pip install --upgrade Cython

RUN pip install attrdict python-gnupg web3

RUN pip install numpy

RUN pip install pandas

RUN pip install geopy

RUN pip install scipy

RUN pip install sklearn

RUN pip install keras


#RUN cp /usr/bin/python3.6 /usr/bin/python3

COPY src /app

#RUN SCONE_MODE=sim SCONE_HASH=1 SCONE_HEAP=1G SCONE_ALPINE=1 \
# && mkdir conf \
# && scone fspf create fspf.pb \
# && scone fspf addr fspf.pb / --not-protected --kernel / \
# && scone fspf addr fspf.pb /usr --authenticated --kernel /usr \
# && scone fspf addf fspf.pb /usr /usr \
# && scone fspf addr fspf.pb /bin --authenticated --kernel /bin \
# && scone fspf addf fspf.pb /bin /bin \
# && scone fspf addr fspf.pb /lib --authenticated --kernel /lib \
# && scone fspf addf fspf.pb /lib /lib \
# && scone fspf addr fspf.pb /etc --authenticated --kernel /etc \
# && scone fspf addf fspf.pb /etc /etc \
# && scone fspf addr fspf.pb /sbin --authenticated --kernel /sbin \
# && scone fspf addf fspf.pb /sbin /sbin \
# && scone fspf addr fspf.pb /signer --authenticated --kernel /signer \
# && scone fspf addf fspf.pb /signer /signer \
# && scone fspf addr fspf.pb /app --authenticated --kernel /app \
# && scone fspf addf fspf.pb /app /app \
# && scone fspf encrypt ./fspf.pb > /conf/keytag \
# && MRENCLAVE="$(SCONE_HASH=1 python)" \
# && FSPF_TAG=$(cat conf/keytag | awk '{print $9}') \
# && FSPF_KEY=$(cat conf/keytag | awk '{print $11}') \
# && FINGERPRINT="$FSPF_KEY|$FSPF_TAG|$MRENCLAVE" \
# && echo $FINGERPRINT > conf/fingerprint.txt \
# && printf "\n########################################################\nMREnclave: $FINGERPRINT\n########################################################\n\n"


##########CHANGE ENTRYPOINT HERE:#######################
ENTRYPOINT unzip -o /iexec_in/$DATASET_FILENAME -d /iexec_in && python3 /app/main.py
14 changes: 14 additions & 0 deletions PegasusMKD/transport_x/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# transport_x
## Branch v3
### An iExec API for the Chainlink Hackathon

It's supposed to be used as a "Protocol" as in, ( later on when the app comes out, in a few days ) anyone can use the contract we made to build their own front-end to it which makes use of our system, AI, algorithm, etc.

If someone wants to make their own middleware, but use our API, they are free to do so. Or maybe someone would like to make their own API, and use our middleware, again, free to do so.

The API has 2 key features:

- AI which predicts where users should be expected to call in the next hour, and sends taxi drivers to the location
- Algorithm which finds the closest taxi ( from the given dataset ) to a user, and connects them, as well as sending the taxi to the user's location

Will add more documentation and stuff to the README in the next 3 days <3
1 change: 1 addition & 0 deletions PegasusMKD/transport_x/app_address.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0xeB8633385c9e349deA5547Bc890b0C5b9EAef43A
5 changes: 5 additions & 0 deletions PegasusMKD/transport_x/deployed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"app": {
"42": "0xeB8633385c9e349deA5547Bc890b0C5b9EAef43A"
}
}
24 changes: 24 additions & 0 deletions PegasusMKD/transport_x/iexec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"description": "My iExec ressource description, must be at least 150 chars long in order to pass the validation checks. Describe your application, dataset or workerpool to your users",
"license": "MIT",
"author": "?",
"social": {
"website": "?",
"github": "?"
},
"logo": "logo.png",
"buyConf": {
"params": "",
"tag": "0x0000000000000000000000000000000000000000000000000000000000000000",
"trust": "0",
"callback": "0x0000000000000000000000000000000000000000"
},
"app": {
"owner": "0x0112e984aEac848886a36fd8b5a1bC0066Eb0CE1",
"name": "VanityEth",
"type": "DOCKER",
"multiaddr": "registry.hub.docker.com/iexechub/vanityeth:1.1.1",
"checksum": "0x00f51494d7a42a3c1c43464d9f09e06b2a99968e3b978f6cd11ab3410b7bcd14",
"mrenclave": ""
}
}
Binary file added PegasusMKD/transport_x/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
108 changes: 108 additions & 0 deletions PegasusMKD/transport_x/src/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# Common settings that generally should always be used with your language specific settings

# Auto detect text files and perform LF normalization
# https://www.davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/
* text=auto
build/* linguist-vendored
dist/* linguist-vendored
*.sh linguist-vendored

#
# The above will handle all files NOT found below
#

# Documents
*.bibtex text diff=bibtex
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.md text
*.tex text diff=tex
*.adoc text
*.textile text
*.mustache text
*.csv text
*.tab text
*.tsv text
*.txt text
*.sql text

# Graphics
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.tif binary
*.tiff binary
*.ico binary
# SVG treated as an asset (binary) by default.
*.svg text
# If you want to treat it as binary,
# use the following line instead.
# *.svg binary
*.eps binary

# Scripts
*.bash text eol=lf
*.fish text eol=lf
*.sh text eol=lf
# These are explicitly windows files and should use crlf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf

# Serialisation
*.json text
*.toml text
*.xml text
*.yaml text
*.yml text

# Archives
*.7z binary
*.gz binary
*.tar binary
*.zip binary

#
# Exclude files from exporting
#

.gitattributes export-ignore
.gitignore export-ignore

# Basic .gitattributes for a python repo.

# Source files
# ============
*.pxd text diff=python
*.py text diff=python
*.py3 text diff=python
*.pyw text diff=python
*.pyx text diff=python
*.pyz text diff=python

# Binary files
# ============
*.db binary
*.p binary
*.pkl binary
*.pickle binary
*.pyc binary
*.pyd binary
*.pyo binary

# Jupyter notebook
*.ipynb text

# Note: .db, .p, and .pkl files are associated
# with the python modules ``pickle``, ``dbm.*``,
# ``shelve``, ``marshal``, ``anydbm``, & ``bsddb``
# (among others).
Binary file not shown.
Loading