This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from collections.abc import Hashable, Iterable, Iterator | |
| from itertools import chain | |
| from numpy import argsort, dtype, float32, full, ndarray | |
| from numpy import sum as np_sum | |
| def rank_fusion[T: Hashable](*documents_args: Iterable[T], alpha: int = 60) -> Iterator[T]: | |
| """ | |
| Summary |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from collections.abc import Sequence | |
| from typing import Annotated, ClassVar, Literal | |
| from msgspec import Meta, Struct | |
| from uuid_utils import UUID, uuid7 | |
| from src.typedefs import Role | |
| class Data(Struct): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ruff: noqa: T201 | |
| from collections import deque | |
| from dataclasses import dataclass | |
| from random import choice | |
| from time import perf_counter_ns | |
| from typing import Literal, NamedTuple, TypedDict | |
| from uuid import uuid4 | |
| from msgspec import Struct |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from argparse import ArgumentParser | |
| from gc import disable | |
| from logging import NOTSET, basicConfig, getLogger | |
| from socket import ( | |
| AF_INET, | |
| IPPROTO_TCP, | |
| SO_REUSEADDR, | |
| SOCK_STREAM, | |
| SOL_SOCKET, | |
| TCP_NODELAY, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func() { | |
| echo "Hello world!" | |
| } | |
| export -f func | |
| yes '' | parallel -j 10 --delay 0auto func |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Project Sdk="Microsoft.NET.Sdk"> | |
| <PropertyGroup> | |
| <PublishDir>../Assets/NuGet</PublishDir> | |
| <TargetFramework>netstandard2.1</TargetFramework> | |
| <UnityBuildArchitecture>win-x64</UnityBuildArchitecture> | |
| <ProtobufClientDir>../Assets</ProtobufClientDir> | |
| </PropertyGroup> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from typing import Callable, Protocol | |
| class Comparable[*T](Protocol): | |
| """ | |
| Summary | |
| ------- | |
| a protocol for comparable types | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from random import sample | |
| from typing import Callable, Protocol, TypeVar | |
| class Comparable[*T](Protocol): | |
| """ | |
| Summary | |
| ------- | |
| a protocol for comparable types | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| consul: | |
| container_name: consul | |
| image: hashicorp/consul-enterprise:1.9.17-ent | |
| network_mode: host | |
| volumes: [./Consul.Test:/config:ro] | |
| command: consul agent -dev -config-file config/test_config.json -log-level=error | |
| healthcheck: | |
| test: ['CMD-SHELL', 'curl localhost:8500/v1/status/leader'] | |
| interval: 1s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from enum import Enum | |
| class Players(Enum): | |
| """ | |
| Summary | |
| ------- | |
| an enum to represent the players | |
| """ | |
| NULL = 0 |
NewerOlder