<commit_before>This script visualises the graph formed by Matrix events in a room.

![Example](https://raw.githubusercontent.com/Kegsay/matrix-vis/master/federation.png)

Features:
 - Displays the event graph for a room visually.
 - Display individual event JSON when selected.
 - Can read from the event stream to add new events to the graph in realtime.
 - Can perform scrollback on a room to collect earlier events (up to the root)
 - Different node colours for different servers.

Requires:
 - "npm install vis"

Usage:
 - Host this folder (e.g. ``python -m SimpleHTTPServer``)
 - Visit index.html and enter in your information.
  
Assumptions:
 - The target home server returns a ``prev_events`` key which looks like:
 
     ```
     prev_events: [
       [ event_id, { sha256: "hash" } ]
     ]
     ```
    
    As of Synapse 0.6, this is not supported without modifying the source code. Specifically,
    comment out synapse/events/utils.py:126 ``del d["prev_events"]``
    
 - Event IDs are formatted as ``blob:domain`` (for colouring nodes based on domain).
<commit_msg>Remove 0.6 hack since 0.7 is out<commit_after>This script visualises the graph formed by Matrix events in a room.

![Example](https://raw.githubusercontent.com/Kegsay/matrix-vis/master/federation.png)

Features:
 - Displays the event graph for a room visually.
 - Display individual event JSON when selected.
 - Can read from the event stream to add new events to the graph in realtime.
 - Can perform scrollback on a room to collect earlier events (up to the root)
 - Different node colours for different servers.

Requires:
 - "npm install vis"

Usage:
 - Host this folder (e.g. ``python -m SimpleHTTPServer``)
 - Visit index.html and enter in your information.
  
Assumptions:
 - Event IDs are formatted as ``blob:domain`` (for colouring nodes based on domain).

{'fraction_non_alphanumeric': 0.08726287262872628, 'fraction_numerical': 0.0065040650406504065, 'mean_word_length': 3.5467980295566504, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6214041', 'n_tokens_mistral': 533, 'n_tokens_neox': 511, 'n_words': 230}