Files
zeekay e037e8f7ea torus: one name for the package, and it is ours
The distribution called itself torus-ml while shipping a package directory
named concrete, so the name a user installs and the name they import disagreed
— and most of the tree already said torus.ml, which could not resolve against
src/concrete. Moved src/concrete to src/torus and pointed the include at it.

The dependency was Zama's concrete-python from their index. It is torus-fhe
from ours, which is what luxfhe/torus already ships: that frontend declares
torus-fhe and ships a torus/fhe module, so every 'from torus.fhe' in this tree
was already naming our compiler and only the dependency lagged.

Two distributions share one namespace, which is the shape the upstream this
forked from used and the reason the split works: torus-fhe gives torus.fhe,
torus-ml gives torus.ml.

Swept every other spelling — identifiers, enum members, workflow variables,
filenames, notebooks. LICENSE and NOTICE keep the upstream attribution a fork
owes; the figures carry the old name in JPEG metadata a text sweep cannot
reach.
2026-08-27 13:20:50 -07:00

59 lines
1.6 KiB
Python

"""Script to gather Community statistics. Made for Torus ML but can be easily modified for
another team."""
import os
import requests
if "KEY_FOR_COMMUNITY_DISCOURSE" not in os.environ:
raise Exception("please get a key KEY_FOR_COMMUNITY_DISCOURSE in your environment")
key_for_community_discourse = os.environ["KEY_FOR_COMMUNITY_DISCOURSE"]
headers = {
"api-key": key_for_community_discourse,
"username": "benoit",
}
r = requests.get(
"https://community.lux.network/directory_items.json?period=all&order=likes_received&group=ML-team",
headers=headers,
)
dic = r.json()
if "directory_items" not in dic:
raise Exception(f"issue, got this dic {dic}")
for statistics, official_name in [
("topic_count", "Topics created"),
("post_count", "Posts created"),
("likes_received", "Likes received"),
("solutions", "Solutions"),
]:
individual = [user[statistics] for user in dic["directory_items"]]
print(f" {official_name}: {sum(individual)}")
# For dump in Excel
print("\nDump in Excel (community): \n")
for statistics, _ in [
("topic_count", "Topics created"),
("post_count", "Posts created"),
("likes_received", "Likes received"),
("solutions", "Solutions"),
]:
individual = [user[statistics] for user in dic["directory_items"]]
print(f"{sum(individual)} \t ", end="")
print()
for statistics, _ in [
("topic_count", "Topics created"),
("post_count", "Posts created"),
("likes_received", "Likes received"),
("solutions", "Solutions"),
]:
individual = [user[statistics] for user in dic["directory_items"]]
print("0 \t ", end="")
print()