forked from rueiminl/Nervana
gopal-m/Nervana
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Author: Ruei-Min Lin Note: The Python version in my environment is 2.7.9 Base Challenge -------------------------------- usage python ecdf.py --school "Port Chester University" input_file1.csv input_file2.csv algorithm given scores[] (of students in a specific school) and percentile p, the percentile value (output) should be [0].extend(scores)[p/100 * (N+1)] i.e. when p = 0 * 100/(N+1) ~ 1 * 100/(N+1) => output = 0 when p = 1 * 100/(N+1) ~ 2 * 100/(N+1) => output = scores[0] ... when p = (k-1) * 100/(N+1) ~ k * 100/(N+1) => output = scores[k] ... when p = N * 100/(N+1) ~ (N+1) * 100/(N+1) => output = scores[N-1] highest score among students Bonus Challenge #1 -------------------------------- note The client MUST be able to access the network since I use some external resources (jquery files). client.py and server.py both use port 8000, and it could be changed easily if port 8000 is occupied: server.py:8 PORT = 8000 # change 8000 to whatever port you want to use client.py:29 localhost:8000 # change 8000 to whatever port you want to use server usage python server.py --school "Port Chester University" input_file1.csv input_file2.csv client usage python client.py X Y or using any modern web browser to url http://localhost:8000 (the default port could be configured in server.py) output client would print out what it got from server; server would log requests in the file request_history.log Bonus Challenge #2 -------------------------------- note MUST install plenty of dependent libs such as matplotlib, scipy, statsmodels ...etc. It might take an hour to download and install. In case that your environment not works, I backup my local result into demo.png. The simulation input is generated by test.py usage python visual.py --school "Port Chester University" input_file1.csv input_file2.csv
About
Nervana Code Challenge (python)
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Python 83.2%
- HTML 16.8%