Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [~/preanalytics]$ git status 22:35:29
- On branch algo_standalone
- nothing to commit, working directory clean
- [~/preanalytics]$ cd preanalytics 22:35:44
- [~/preanalytics/preanalytics]$ ./start.py 22:36:01
- usage: start things like the CLI and/or API server [-h] [-s] [-c]
- optional arguments:
- -h, --help show this help message and exit
- -s, --server start algo API server
- -c, --cli start a CLI for interfacing with the algo API
- [~/preanalytics/preanalytics]$ ./start.py -sc 22:36:03
- Starting server
- server.py | __init__ | 46 | INFO | Algo API server initialized
- server.py | listen | 50 | INFO | API listening on: tcp://*:42000
- Starting CLI
- example_client.py | __init__ | 52 | INFO | ExampleClient connected to Server at tcp://127.0.0.1:42000
- prea$ help
- Documented commands (type help <topic>):
- ========================================
- EOF die help kill ping rand shell
- prea$ help help
- help [command]
- Provide help on given command. If no argument, list commands.
- prea$ help ping
- ping
- Ping the algo API server.
- prea$ help kill
- kill
- Ask the server to exit.
- prea$ help die
- die
- Disconnect from server and close CLI.
- prea$ help rand
- rand
- Send algo_req-type message to API with random, valid data.
- prea$ help shell
- !|shell [command]
- Send command to underlying system shell (like Bash).
- prea$ help EOF
- ctrl+d
- Disconnect from server and close CLI with ctrl+d.
- prea$ ping
- Server response time: 0.869035720825ms
- prea$
- Server response time: 1.06811523438ms
- prea$
- Server response time: 1.1260509491ms
- prea$ shell ls
- algo clients __init__.py interfaces logs server
- algo_config.yaml config.yaml __init__.pyc lib scripts start.py
- prea$ !ls
- algo clients __init__.py interfaces logs server
- algo_config.yaml config.yaml __init__.pyc lib scripts start.py
- prea$ rand
- Sending random data:
- {'abused': 5,
- 'age': 17,
- 'age_first_sexual_experience': 'never',
- 'attractiveness': 5,
- 'developmental_disability': 2,
- 'gang_affil': 2,
- 'health_and_grooming': 4,
- 'immigration_crime': True,
- 'interactions_with_others': 5,
- 'marital_status': 'separated',
- 'nonconformist': 3,
- 'num_aggressive_sex_acts': 2,
- 'num_incarcerations': 3,
- 'num_other_violent_crimes': 3,
- 'num_psych_hospitalizations': 3,
- 'num_sex_crimes': 157,
- 'perceived_nonheteronormative': 1,
- 'physical_disabilities': 3,
- 'physique': 2,
- 'pretrial': False,
- 'race': 'islander',
- 'seductive': 3,
- 'self_importance': 4,
- 'sexual_aggression': 2,
- 'sexual_deviance': 5,
- 'sexual_pref': 'males_only',
- 'sexually_ids_with_children': 2,
- 'street_smart': 4,
- 'violence_history': 'none',
- 'violence_of_charges': 5,
- 'voice': 1,
- 'vulnerability': 5,
- 'years_sentenced': '1_to_4'}
- Scores returned from server:
- {'rperp': 542.6500000000002, 'rvic': 741.5000000000001}
- prea$ kill
- example_client.py | exit_server | 73 | INFO | Asking server to exit...
- server.py | handle_msg | 87 | INFO | Received message to die. Bye!
- prea$ die
- Disconnecting...
- example_client.py | clean_up | 96 | INFO | Closing ZMQ socket and context...
- example_client.py | clean_up | 100 | INFO | ExampleClient disconnected from Server tcp://127.0.0.1:42000
- Bye!
- [~/preanalytics]$ docker build -t dfarrell07/preanalytics:dev .; docker run -ti dfarrell07/preanalytics:dev tox
- Sending build context to Docker daemon 384 kB
- Sending build context to Docker daemon
- Step 0 : FROM debian:8.0
- ---> 835c4d274060
- Step 1 : MAINTAINER Daniel Farrell <dfarrell07@gmail.com>
- ---> Using cache
- ---> ed3edfceb16a
- Step 2 : RUN apt-get update && apt-get install -y python-pip libzmq-dev python-zmq python-dev python-yaml python curl
- ---> Using cache
- ---> 12aef978d1c3
- Step 3 : RUN curl --silent --insecure -o requirements.txt "https://raw.githubusercontent.com/dfarrell07/PREAnalytics/docker/requirements.txt?token=AA1ukebXjgQAMQdi6VeE7YjbxFFhP-pyks5UyZcXwA%3D%3D" && pip install -r requirements.txt && rm requirements.txt
- ---> Using cache
- ---> 71dcc39a9dec
- Step 4 : ADD . /opt/preanalytics
- ---> 22115c13d6db
- Removing intermediate container 7e7829dc0973
- Step 5 : WORKDIR /opt/preanalytics
- ---> Running in fddb0456f1e1
- ---> e0b36652e2e5
- Removing intermediate container fddb0456f1e1
- Successfully built e0b36652e2e5
- GLOB sdist-make: /opt/preanalytics/setup.py
- py27 create: /opt/preanalytics/.tox/py27
- py27 installdeps: -r/opt/preanalytics/requirements.txt
- py27 inst: /opt/preanalytics/.tox/dist/preanalytics-0.0.1.zip
- py27 runtests: PYTHONHASHSEED='3592427261'
- py27 runtests: commands[0] | python setup.py test
- [~/preanalytics]$ docker build -t dfarrell07/preanalytics:dev .; docker run -ti dfarrell07/preanalytics:dev tox
- Sending build context to Docker daemon 384 kB
- Sending build context to Docker daemon
- Step 0 : FROM debian:8.0
- ---> 835c4d274060
- Step 1 : MAINTAINER Daniel Farrell <dfarrell07@gmail.com>
- ---> Using cache
- ---> ed3edfceb16a
- Step 2 : RUN apt-get update && apt-get install -y python-pip libzmq-dev python-zmq python-dev python-yaml python curl
- ---> Using cache
- ---> 12aef978d1c3
- Step 3 : RUN curl --silent --insecure -o requirements.txt "https://raw.githubusercontent.com/dfarrell07/PREAnalytics/docker/requirements.txt?token=AA1ukebXjgQAMQdi6VeE7YjbxFFhP-pyks5UyZcXwA%3D%3D" && pip install -r requirements.txt && rm requirements.txt
- ---> Using cache
- ---> 71dcc39a9dec
- Step 4 : ADD . /opt/preanalytics
- ---> 22115c13d6db
- Removing intermediate container 7e7829dc0973
- Step 5 : WORKDIR /opt/preanalytics
- ---> Running in fddb0456f1e1
- ---> e0b36652e2e5
- Removing intermediate container fddb0456f1e1
- Successfully built e0b36652e2e5
- GLOB sdist-make: /opt/preanalytics/setup.py
- py27 create: /opt/preanalytics/.tox/py27
- py27 installdeps: -r/opt/preanalytics/requirements.txt
- py27 inst: /opt/preanalytics/.tox/dist/preanalytics-0.0.1.zip
- py27 runtests: PYTHONHASHSEED='3592427261'
- py27 runtests: commands[0] | python setup.py test
- <snip many tests>
- ok
- ----------------------------------------------------------------------
- Ran 148 tests in 26.704s
- OK (skipped=2)
- pep8 create: /opt/preanalytics/.tox/pep8
- pep8 installdeps: flake8
- pep8 inst: /opt/preanalytics/.tox/dist/preanalytics-0.0.1.zip
- pep8 runtests: PYTHONHASHSEED='3592427261'
- pep8 runtests: commands[0] | flake8
- ________________________________________ summary _________________________________________
- py27: commands succeeded
- pep8: commands succeeded
- congratulations :)
- [~/preanalytics]$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement