Aiming to solve matrix-org/synapse#5677.
Follows on from matrix-org/synapse#10695.
We're running our own homeserver with users Bob and Eve. A remote user Alice is already in a public room on her own homeserver. Bob on our homeserver joins it.
from unittest import TestCase | |
class DMRTest(TestCase): | |
class_count = 0 | |
def __init__(self, *args, **kwargs): | |
super().__init__(*args, **kwargs) | |
self.instance_count = 0 |
#! /usr/bin/env python3 | |
"""TypedDicts and Dicts in mypy""" | |
from typing import TypedDict, Dict, Any, Mapping | |
JsonDict = Dict[str, Any] | |
JsonMapping = Mapping[str, Any] |
Aiming to solve matrix-org/synapse#5677.
Follows on from matrix-org/synapse#10695.
We're running our own homeserver with users Bob and Eve. A remote user Alice is already in a public room on her own homeserver. Bob on our homeserver joins it.
We want only public profiles to be searchable and visible in the user directory search. By public profiles ("canonical" maybe?) we mean the thing returned by GET /profile/USER_ID
.
We're getting names into the user directory (user_directory
and user_directory_search
) via calls to update_profile_in_user_dir
.
There are five calls:
main/user_directory.py
(regenerate the user directory)"""A script to build a model representing the Cayley graph of F_3 in Blender. I threw this together in a morning so it's quite hacky and quite dirty.""" | |
import bpy | |
from itertools import product | |
from math import sqrt | |
def make_alphabet(letters): | |
"""Group/monoid elements are represented in memory as numbers, but we should be able to list them as human-readable strings. We use an asterisk to denote inverse, so that (e.g.) xx* = 1.""" | |
symbols = {} | |
for i, char in enumerate(letters): |