<commit_before>tkbd
====
`tkbd` is a daemon run on the faculty of sciences of the
[Radboud University Nijmegen](http://ru.nl) to register
which computer lab PC's are free and which are taken.

[tkb.js](http://github.com/bwesterb/tkb.js) is a frontend.

How it works
------------
### Information stored
`tkbd` maintains three bits of information. See `state.py`.

1. *occupation*: for each PC its current state, which is either:
   - `o` the PC is turend off
   - `x` the PC is in an unknown state
   - `wf` the PC is free and booted in Windows
   - `lf` the PC is free and booted in Linux
   - `wu` the PC is used and booted in Windows 
   - `lu` the PC is used and booted in Linux
   - `wx` the PC is booted in Windows, but we do not know if it is used
   - `lx` the PC is booted in Linux, but we do not know if it is used
2. *roomMap*: a list of rooms and the PC's in it.
3. *schedule*: for each room, the possible reservations of it.

### Source of information
When people log in and out of computers, this is logged.
A script watches the log and pushes changes to `tkbd` via
HTTP requests on port 1235. See `cnczPush.py`.

Secondly, another script periodically polls all PCs.
The results of this scan are also pushed to port 1235.

The schedule is pulled from (Ruuster)[http://ruuster.nl].
See `ruuster.py`.

### How to access it
#### Joyce
`tkbd` uses a bidirectional JSON message exchanging protocol over HTTP<commit_msg>README.md: fix a syntax error<commit_after>tkbd
====
`tkbd` is a daemon run on the faculty of sciences of the
[Radboud University Nijmegen](http://ru.nl) to register
which computer lab PC's are free and which are taken.

[tkb.js](http://github.com/bwesterb/tkb.js) is a frontend.

How it works
------------
### Information stored
`tkbd` maintains three bits of information. See `state.py`.

1. *occupation*: for each PC its current state, which is either:
   - `o` the PC is turend off
   - `x` the PC is in an unknown state
   - `wf` the PC is free and booted in Windows
   - `lf` the PC is free and booted in Linux
   - `wu` the PC is used and booted in Windows 
   - `lu` the PC is used and booted in Linux
   - `wx` the PC is booted in Windows, but we do not know if it is used
   - `lx` the PC is booted in Linux, but we do not know if it is used
2. *roomMap*: a list of rooms and the PC's in it.
3. *schedule*: for each room, the possible reservations of it.

### Source of information
When people log in and out of computers, this is logged.
A script watches the log and pushes changes to `tkbd` via
HTTP requests on port 1235. See `cnczPush.py`.

Secondly, another script periodically polls all PCs.
The results of this scan are also pushed to port 1235.

The schedule is pulled from [Ruuster](http://ruuster.nl).
See `ruuster.py`.

### How to access it
#### Joyce
`tkbd` uses a bidirectional JSON message exchanging protocol over HTTP
{'fraction_non_alphanumeric': 0.09477351916376307, 'fraction_numerical': 0.007665505226480836, 'mean_word_length': 3.3237951807228914, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2780125', 'n_tokens_mistral': 915, 'n_tokens_neox': 868, 'n_words': 467}