Coder Social home page Coder Social logo

geohutch / hivemind Goto Github PK

View Code? Open in Web Editor NEW

This project forked from compserv/hivemind

0.0 2.0 0.0 265 KB

Usage stats for the Berkeley EECS instructional computers.

Home Page: https://hivemind.eecs.berkeley.edu

Python 1.92% Shell 0.11% CSS 0.88% HTML 2.28% JavaScript 94.77% Makefile 0.05%

hivemind's Introduction

Hivemind

Hivemind displays usage stats for the Berkeley EECS instructional computers. It was originally developed by Allen Guo and is now maintained by HKN's Compserv committee and hosted by the OCF.

How does it work?

Every five minutes, backend/census.py is executed. It connects to each server listed in backend/server.txt via SSH and collects information. The results from all of the servers are combined into a single JSON file (data/latest.json).

You can view the most recently generated JSON file here: https://www.ocf.berkeley.edu/~hkn/hivemind/data/latest.json.

Overall load formula

The "overall load" heuristic is implemented in toRating() in main.js.

How to contribute

Want to host the website locally? Clone this repo, and start a web server in the project root directory.

The backend (i.e. the script that grabs data from the servers) is a little harder to set up:

  1. Clone this repo.
  2. Run make venv to create a virtualenv and install paramiko. You can also run pip install paramiko, but you'll probably want to install it locally to avoid polluting your system libraries, so a virtualenv works well for that.
  3. Create an RSA key pair with no passphrase, rename the private key to hivemind_rsa and the public key to hivemind_rsa.pub and put them inside your home directory's SSH directory (~/.ssh).
  4. Add the public key to your class account's ~/.ssh/authorized_keys file to allow hivemind to log in to the servers automatically.
  5. Change the value of LOGIN_USERNAME in census.py to your login.

You should then be able to execute census.py to grab data from each server in servers.txt. The results are printed to stdout, which run_census puts into a file for the frontend to fetch.

Credits

Hivemind was made using jQuery, Vue.js, Moment.js, Skeleton, clipboard.js, and Hint.css.

Hivemind was originally developed by Allen Guo and is now maintained by HKN's Compserv committee and hosted by the OCF.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.