text
stringlengths
185
73.3k
repo
stringlengths
7
100
path
stringlengths
4
146
language
stringclasses
7 values
hash
stringlengths
16
16
score
float64
7
8.5
stars
int64
0
237k
# Combine the per-node evaluation results of the Bonn cohort into a single Excel file # # eval_bonn_left.py / eval_bonn_right.py write one file per node, with one row per modality # combination and one column per training trial. This script concatenates those columns across nodes # and adds the aggregations over trials...
soumbane/magmsforEZprediction
combine_bonn_cohort_results.py
.py
0dcde53359959223
7.15
1
# Load the dataset with different modalities for EZ prediction for each node number import os import numpy as np from scipy.io import loadmat # type: ignore import torch from torch.nn import functional as F from torchmanager_core.typing import Any, Enum, Tuple from torchmanager.data import Dataset class EZMode(Enum...
soumbane/magmsforEZprediction
data/dataset_ez.py
.py
ab5b4fe6533440e7
7.15
1
import argparse, magnet, os, torch, torchmanager from torchmanager_core import view from typing import Union from ezpred import DESCRIPTION from .basic import Configs as _Configs class Configs(_Configs): """ The testing configurations Args: batch_size (int): The number of batch size. data...
soumbane/magmsforEZprediction
ezpred/configs/eval.py
.py
3e9cefdeefffbf6a
7.15
1
import argparse, magnet, os, torch, torchmanager from torchmanager_core import view from typing import Optional, Union from ezpred import DESCRIPTION from .basic import Configs as _Configs class Configs(_Configs): """ The training configurations Args: batch_size (int): The number of batch size. ...
soumbane/magmsforEZprediction
ezpred/configs/train.py
.py
70a636ae21fe9afc
7.15
1
from magnet import Manager as _Manager from torch.optim.optimizer import Optimizer as Optimizer from torchmanager.callbacks import Frequency from torchmanager.data import DataLoader, Dataset from torchmanager.losses.loss import Loss from torchmanager.metrics.metric import Metric from torchmanager_core import errors, de...
soumbane/magmsforEZprediction
ezpred/managers.py
.py
da631c3c42e69802
7.15
1
from magnet.nn.fusion import Fusion import torch class MidConcat(Fusion): """ Fusion at the middle for encoders with multiple outputs * extends: `Fusion` """ def forward(self, x_in: list[tuple[torch.Tensor, ...]]) -> list[tuple[torch.Tensor, ...]]: return super().forward(x_in) ...
soumbane/magmsforEZprediction
ezpred/nn/fusion/fuse.py
.py
091f1f741fbb2873
7.15
1
# Modality-Specific Feature Extractor (MSFE) import torch import torch.nn as nn from enum import Enum from typing import Optional, Union from .pad import PaddingLast1D # from pad import PaddingLast1D class EZScale(Enum): COURSE = "course" FINE = "fine" class ConvBlock(nn.Module): r"""...
soumbane/magmsforEZprediction
ezpred/nn/msfe.py
.py
ee85f27c05392c3e
7.15
1
# Shared Classification Head (SCH) import torch import torch.nn as nn from typing import Union class SCH(nn.Module): r""" Shared Classification Head Args: mlp_features: input features for the fully connected layer - this is the concatenation of all the feature maps obtained from the `shfe` course ...
soumbane/magmsforEZprediction
ezpred/nn/sch.py
.py
6ee35aa9ee79d3bf
7.15
1
# Build the modality-combination table of the additional cohort for reporting # # One row per sequence combination, in the publication layout: # # # T1w T2w FLAIR DWI DWIC Left_Hemis_Mean_BA Right_Hemis_Mean_BA # 1 0 0 0 0 1 0.6797 0.6889 # 2 0 0 0 ...
soumbane/magmsforEZprediction
make_addcohort_combination_table.py
.py
f77e6ee867c29c01
7.15
1
# Build the modality-combination table of the Bonn cohort for reporting # # One row per sequence combination, in the same publication layout as the additional cohort: # # # Combo T1w T2w FLAIR DWI DWIC Left_Hemis_Mean_BA Right_Hemis_Mean_BA # 1 4 0 0 1 0 0 ... ...
soumbane/magmsforEZprediction
make_bonncohort_combination_table.py
.py
94a7d5dab2daddd9
7.15
1
# Build the joint AddCohort + BonnCohort combination table for the paper # # One row per sequence combination, 1-31, with both external cohorts side by side: # # # T1w T2w FLAIR DWI DWIC AddCohort_Left AddCohort_Right BonnCohort_Left BonnCohort_Right # 1 0 0 0 0 1 0.6797 ...
soumbane/magmsforEZprediction
make_combined_cohort_table.py
.py
e2607f3d5173e6ed
7.15
1
#!/usr/bin/env python3 """ Generates files for the "Brawler" mod. """ import argparse import os from dataclasses import dataclass from functools import cached_property from moddb import multiply_resources from modtools.gamedata import PassiveData from modtools.lsx.game import ( ActionResource, CharacterClass,...
justin-elliott/bg3
Brawler.py
.py
9db575b5de353a32
7
0
#!/usr/bin/env python3 """ Generates files for the "ChildOfTheForest" mod. """ import os from functools import cached_property from modtools.gamedata import ( PassiveData, ) from modtools.lsx.game import ( CharacterRace, Progression, ) from modtools.replacers import ( progression, Replacer, ) cl...
justin-elliott/bg3
ChildOfTheForest.py
.py
c32bf5d0b00a0326
7
0
#!/usr/bin/env python3 """ Generates files for the "ComfortableBoots" mod. """ import os from modtools.gamedata import Armor from modtools.lsx.game import GameObjects from modtools.mod import Mod from modtools.text import Text, TreasureTable from uuid import UUID class ItemCombinations(Text): @property def ...
justin-elliott/bg3
ComfortableBoots.py
.py
b99979be2fb40b5d
7
0
#!/usr/bin/env python3 import os from moddb import Sorcery from modtools.replacers import ( CharacterClass, Replacer, ) class CreateSorceryPoints(Replacer): def __init__(self, **kwds: str): super().__init__(os.path.join(os.path.dirname(__file__)), author="justin-elliott"...
justin-elliott/bg3
CreateSorceryPoints.py
.py
f4d25721fcc4ac0d
7
0
#!/usr/bin/env python3 """ Generates files for the "MonkExpanded" mod. """ import argparse import os from dataclasses import dataclass from functools import cached_property from moddb import ( Bolster, Defense, multiply_resources, PackMule, ) from modtools.gamedata import PassiveData from modtools.lsx...
justin-elliott/bg3
MonkExpanded.py
.py
86d93264196c16ad
7
0
#!/usr/bin/env python3 """ Generates files for the "ProgressionsReplacer" mod. """ import os from modtools.lsx.game import ( CharacterSubclasses, Progression, ) from modtools.replacers import ( DontIncludeProgression, only_existing_progressions, progression, Replacer, ) class ProgressionsRep...
justin-elliott/bg3
ProgressionsReplacer.py
.py
6ecb9247792244fc
7
0
#!/usr/bin/env python3 """confhistory: extract conference history database into text format.""" # Copyright 2023 Pexip AS # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.a...
pexip/pexip-log-tools
confhistory.py
.py
db01aca84a9f3d8a
7.24
2
#!/usr/bin/env python3 """connectivity: process admin logs for connectivity loss events.""" # Copyright 2023 Pexip AS # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apach...
pexip/pexip-log-tools
connectivity.py
.py
b405d488b244b355
7.24
2
#!/usr/bin/env python3 # Copyright 2025 Pexip AS # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
pexip/pexip-log-tools
pexidpconfig.py
.py
882f92ef9f64c3e9
7.24
2
#!/bin/bash # Copyright 2023-2026 Airbus, CS Group # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
RS-PYTHON/rs-client-libraries
.github/scripts/call_prefect.py
.py
2ddde5d12897fd6a
7.15
1
# Copyright 2023-2026 Airbus, CS Group # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
RS-PYTHON/rs-client-libraries
rs_client/osam_client.py
.py
06fefb48dbb0cc0a
7.15
1
# Copyright 2023-2026 Airbus, CS Group # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
RS-PYTHON/rs-client-libraries
rs_client/rs_client.py
.py
12f5dab5d21869ca
7.15
1
# Copyright 2023-2026 Airbus, CS Group # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
RS-PYTHON/rs-client-libraries
rs_client/stac/auxip_client.py
.py
cbb2de3974965a81
7.15
1
# Copyright 2023-2026 Airbus, CS Group # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
RS-PYTHON/rs-client-libraries
rs_client/stac/cadip_client.py
.py
bf0a5e3269bd5b84
7.15
1
# Copyright 2023-2026 Airbus, CS Group # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
RS-PYTHON/rs-client-libraries
rs_client/stac/cdse_client.py
.py
7d41698b5cbd2866
7.15
1
# Copyright 2023-2026 Airbus, CS Group # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
RS-PYTHON/rs-client-libraries
rs_client/stac/earthdatahub_client.py
.py
6bbe31a1621b57e4
7.15
1
# Copyright 2023-2026 Airbus, CS Group # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
RS-PYTHON/rs-client-libraries
rs_client/stac/prip_client.py
.py
8e829460b43b74d2
7.15
1
# Copyright 2023-2026 Airbus, CS Group # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
RS-PYTHON/rs-client-libraries
rs_common/config.py
.py
56f4e445df85bc84
7.15
1
# Copyright 2023-2026 Airbus, CS Group # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
RS-PYTHON/rs-client-libraries
rs_common/geometry_fix.py
.py
7fd3b2155428902b
7.15
1
# Copyright 2023-2026 Airbus, CS Group # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
RS-PYTHON/rs-client-libraries
rs_common/init_opentelemetry.py
.py
39a4541597fb233c
7.15
1
# Copyright 2023-2026 Airbus, CS Group # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
RS-PYTHON/rs-client-libraries
rs_common/logging.py
.py
3e14a255b127b067
7.15
1
# Copyright 2023-2026 Airbus, CS Group # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
RS-PYTHON/rs-client-libraries
rs_common/utils.py
.py
65604eed0c1219b1
7.15
1
#!/usr/bin/env python # coding: utf8 # # Vendored from the ESA EOPF Copernicus project (CPM ADF auxiliary-data-file): # https://gitlab.eopf.copernicus.eu/cpm/adf-auxiliary-data-file/-/tree/main/scripts/ # # Copyright 2022-2026 ESA # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
RS-PYTHON/rs-client-libraries
rs_workflows/adf_conversion/S00__ADF_ECMWA.py
.py
92c1cc93dc03e6cf
7.15
1
#!/usr/bin/env python # coding: utf8 # # Vendored from the ESA EOPF Copernicus project (CPM ADF auxiliary-data-file): # https://gitlab.eopf.copernicus.eu/cpm/adf-auxiliary-data-file/-/tree/main/scripts/ # # Copyright 2022-2026 ESA # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
RS-PYTHON/rs-client-libraries
rs_workflows/adf_conversion/S00__ADF_ECMWF.py
.py
1eeb0aff6fe0b885
7.15
1
#!/usr/bin/env python # coding: utf8 # # Vendored from the ESA EOPF Copernicus project (CPM ADF auxiliary-data-file): # https://gitlab.eopf.copernicus.eu/cpm/adf-auxiliary-data-file/-/tree/main/scripts/ # # Copyright 2022-2026 ESA # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
RS-PYTHON/rs-client-libraries
rs_workflows/adf_conversion/S00__ADF_WATER.py
.py
9efe1f27aa8164d6
7.15
1
# Vendored from the ESA EOPF Copernicus project (CPM ADF auxiliary-data-file): # https://gitlab.eopf.copernicus.eu/cpm/adf-auxiliary-data-file/-/tree/main/scripts/cop_dem_utils import os import shutil import cop_dem_utils as cdu import dask import numpy as np class CopDemConverter: @staticmethod def reset_s...
RS-PYTHON/rs-client-libraries
rs_workflows/adf_conversion/cop_dem_utils/CopDemConverter.py
.py
2f25e388422cd307
7.15
1
# Vendored from the ESA EOPF Copernicus project (CPM ADF auxiliary-data-file): # https://gitlab.eopf.copernicus.eu/cpm/adf-auxiliary-data-file/-/tree/main/scripts/cop_dem_utils class Progression: """Class to track the progression""" def __init__(self, step_name, total): self.step_name = step_name ...
RS-PYTHON/rs-client-libraries
rs_workflows/adf_conversion/cop_dem_utils/Progression.py
.py
8668ab1e7bd3c659
7.15
1
# Vendored from the ESA EOPF Copernicus project (CPM ADF auxiliary-data-file): # https://gitlab.eopf.copernicus.eu/cpm/adf-auxiliary-data-file/-/tree/main/scripts/cop_dem_utils import os import cop_dem_utils as cdu import dask from skimage.io import imread class Tile: def __init__(self, s3_config, s3_path, work...
RS-PYTHON/rs-client-libraries
rs_workflows/adf_conversion/cop_dem_utils/Tile.py
.py
a77d26eee182a899
7.15
1
# Copyright 2023-2026 Airbus, CS Group # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
RS-PYTHON/rs-client-libraries
rs_workflows/aux_flow.py
.py
7dd53ef63522e062
7.15
1
# Copyright 2023-2026 Airbus, CS Group # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
RS-PYTHON/rs-client-libraries
rs_workflows/init_pi_db_flow.py
.py
b03e0d19d0a9d2bd
7.15
1
# Copyright 2023-2026 Airbus, CS Group # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
RS-PYTHON/rs-client-libraries
rs_workflows/on_demand/adf/convert_adf_set.py
.py
cdfda613780b6542
7.15
1
import shutil import typing import os import pathlib import tarfile from .chiral import ChiralClient from .ftp import ftp_connect def require_project(func): def wrapper_func(self, *args, **kwargs) -> typing.Any: if not self.project: raise Exception(f'project is required for JobManager') ...
chiral-data/chiral-client-python
chiral_client/client.py
.py
5ef6f4fe0faf04e7
7.15
1
""" Tests for Chiral Python SDK using UserCommunicate API. """ import os from chiral_client import AppKind, ChiralClient def create_client() -> ChiralClient: """Create a ChiralClient from environment variables.""" user_email = os.environ["CHIRAL_USER_EMAIL"] token_auth = os.environ["CHIRAL_TOKEN_API"] ...
chiral-data/chiral-client-python
tests.py
.py
f4025118e1784349
7.65
1
from typing import Tuple, List def min_cost_nk(ind: int, cost: List[int], k: int) -> Tuple[int, List[int]]: """ Calculate minimum cost to reach index using brute force recursion. Args: ind: Target index to reach cost: List of costs for each platform k: Maximum jump d...
devYRPauli/AlgoRapids-Path-Optimization-Solutions
basic_brute_force.py
.py
288bdd4b2028edca
7
0
import heapq from collections import deque from typing import List def min_cost_nk(ind: int, cost: List[int], dp: List[int], k: int) -> int: """ Calculates the minimum cost to reach the last index using DP with min-heap optimization. Args: ind: Current index (unused in this implementation) ...
devYRPauli/AlgoRapids-Path-Optimization-Solutions
basic_dp_heap.py
.py
7982baaa5207fdea
7
0
from typing import List def min_cost_nk(ind: int, cost: List[int], dp: List[int], k: int) -> int: """ Calculate minimum cost to reach index using bottom-up DP. Args: ind: Target index to reach (unused in bottom-up approach) cost: List of costs for each platform dp: DP array fo...
devYRPauli/AlgoRapids-Path-Optimization-Solutions
basic_dp_iterative.py
.py
8a596e95361d15a0
7
0
from typing import List def min_cost_nk(ind: int, cost: List[int], dp: List[int], k: int) -> int: """ Calculate minimum cost to reach index using top-down DP with memoization. Args: ind: Target index to reach cost: List of costs for each platform dp: Memoization array for stor...
devYRPauli/AlgoRapids-Path-Optimization-Solutions
basic_dp_memoization.py
.py
d66135403a0f6048
7
0
from collections import deque from typing import List def min_cost_path(cost: List[int], k: int) -> None: """ Finds the minimum cost path using DP with monotonic queue optimization. Args: cost: A list of integers representing the cost of each platform k: Maximum jump distanc...
devYRPauli/AlgoRapids-Path-Optimization-Solutions
basic_dp_monotonic_queue.py
.py
701cfb8ba1a2c505
7
0
from typing import Tuple, List def find_minimum_cost(n: int, cost: List[int], k: int, m: int) -> Tuple[int, List[int]]: """ Finds the minimum cost and path using brute force with exact number of jumps. Args: n: Number of platforms cost: Cost to jump on each platform k: Maximum dis...
devYRPauli/AlgoRapids-Path-Optimization-Solutions
exact_jumps_brute_force.py
.py
d06d2493d941ff0a
7
0
import heapq from typing import Tuple, List def find_minimum_cost(n: int, cost: List[int], k: int, m: int) -> Tuple[float, List[int]]: """ Finds minimum cost and path using DP with min-heap for exact jumps problem. Args: n: Total number of platforms cost: List of costs for landing on each...
devYRPauli/AlgoRapids-Path-Optimization-Solutions
exact_jumps_dp_heap.py
.py
fa438ce82f083afd
7
0
from typing import Tuple, List def find_minimum_cost_bottom_up(n: int, cost: List[int], k: int, m: int) -> Tuple[float, List[int]]: """ Finds minimum cost using bottom-up DP for exact jumps problem. Args: n: Total number of platforms cost: List of costs for jumping on each platform ...
devYRPauli/AlgoRapids-Path-Optimization-Solutions
exact_jumps_dp_iterative.py
.py
ae30aafb043d8a02
7
0
from typing import Tuple, List, Optional def find_minimum_cost(n: int, cost: List[int], k: int, m: int) -> Tuple[int, List[int]]: """ Finds minimum cost and path using top-down DP with memoization for exact jumps. Args: n: Number of platforms cost: List of costs to jump on each platfo...
devYRPauli/AlgoRapids-Path-Optimization-Solutions
exact_jumps_dp_memoization.py
.py
aed637b6247605fd
7
0
from collections import deque from typing import List, Tuple def find_minimum_cost(n: int, cost: List[int], k: int, m: int) -> Tuple[float, List[int]]: """ Finds minimum cost and path using DP with monotonic queue for exact jumps problem. Args: n: Number of platforms cost: List of costs f...
devYRPauli/AlgoRapids-Path-Optimization-Solutions
exact_jumps_dp_monotonic_queue.py
.py
4c44ddd9a6b4b5fa
7
0
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Dec 9 14:36:24 2019 Updated on Jan 2 2024 @author: James Farmer, Sadman Ahmed Shanto Version 2.0 ChangeLog: Calls an instance of printing_press.Editor and sends the articles to the Slack channel ID specified in the accompanying text file 'channel....
LFL-Lab/LFL_PaperBot
distributor.py
.py
224760765969f886
7.39
5
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Dec 8 09:12:38 2019 Updated on Jan 2 2020 @author: James Farmer, Sadman Ahmed Shanto Version: 2.0 ChangeLog: Two classes are defined below, Journalist and Editor. The Journalist pulls RSS feeds, searches their contents, and generates a list of the a...
LFL-Lab/LFL_PaperBot
printing_press.py
.py
9f6c867d70ca6291
7.39
5
# aeb/core/audio_stream_manager.py """ Contains functions for managing the application's audio stream, including starting, stopping, and reconfiguring the connection to the sound device. """ from typing import TYPE_CHECKING, Optional import numpy as np from aeb.core.audio_engine import AudioGenerator from aeb.ui.widg...
ferocioustoast/AEB
aeb/core/audio_stream_manager.py
.py
32e6e413e89b4a54
7.24
2
# aeb/core/generators/base.py """ Defines the abstract base class for all audio generators. """ import copy from abc import ABC, abstractmethod from typing import TYPE_CHECKING import numpy as np from aeb.config.constants import AUDIO_SAMPLE_RATE if TYPE_CHECKING: from aeb.app_context import AppContext MAX_BUFF...
ferocioustoast/AEB
aeb/core/generators/base.py
.py
46b24c182cda8211
7.24
2
# aeb/core/generators/noise.py """ Contains the audio generator for various types of noise. """ import numpy as np from scipy import signal as scipy_signal from aeb.core.audio_math import generate_brown_noise, generate_white_noise from aeb.core.generators.base import AudioGeneratorBase class NoiseGenerator(AudioGene...
ferocioustoast/AEB
aeb/core/generators/noise.py
.py
bac850e85d159d76
7.24
2
# aeb/core/path_utils.py """ Contains utility functions for resolving and relativizing file paths, particularly for audio samples, to ensure scene portability. """ import os from aeb.config.constants import CONFIG_FILE_PATH def get_samples_dir() -> str: """ Calculates and returns the absolute path to the 'Sam...
ferocioustoast/AEB
aeb/core/path_utils.py
.py
88ad807131847689
7.24
2
# aeb/services/active_config_proxy.py """ Defines the ActiveConfigProxy, a unified interface for accessing settings from the currently active scene slot in the AppContext. """ from typing import TYPE_CHECKING, Any if TYPE_CHECKING: from aeb.app_context import AppContext class ActiveConfigProxy: """ A pro...
ferocioustoast/AEB
aeb/services/active_config_proxy.py
.py
5c80ed181f2e9ab3
7.24
2
# aeb/services/controller.py """ Manages the virtual Xbox 360 controller functionality using the ViGEmBus driver. Handles rumble events and provides utility functions. """ import logging import time from typing import TYPE_CHECKING import numpy as np try: import vgamepad as vg g_controller_available = True ex...
ferocioustoast/AEB
aeb/services/controller.py
.py
d842f4437f149def
7.24
2
# aeb/services/hotkey_manager.py """ Contains the HotkeyManager service for global keyboard event listening. """ import time from typing import TYPE_CHECKING, Optional, Set, List, Dict from PySide6.QtCore import QObject, Signal try: from pynput import keyboard G_PYNPUT_AVAILABLE = True except (ImportError, Mo...
ferocioustoast/AEB
aeb/services/hotkey_manager.py
.py
94f84634713a9186
7.24
2
# aeb/services/scene_transition_manager.py """ Contains the SceneTransitionManager, a state machine that orchestrates the smooth, timed transition between different scenes in the playlist. """ import time from typing import TYPE_CHECKING import numpy as np if TYPE_CHECKING: from aeb.app_context import AppContext ...
ferocioustoast/AEB
aeb/services/scene_transition_manager.py
.py
8674edbc61ca5d7f
7.24
2
# aeb/services/screen_flow.py """ Contains the ScreenFlowService class, which manages screen capture and rhythmic motion analysis. """ import collections import threading import time import traceback from typing import TYPE_CHECKING, Optional import cv2 import mss import numpy as np from PySide6.QtCore import QRect fr...
ferocioustoast/AEB
aeb/services/screen_flow.py
.py
64404d36157e07fd
7.24
2
# aeb/services/system_lfo_manager.py """ Contains the SystemLfoManager, a service that provides a high-level API for managing the application's system_lfos configuration. """ import copy from typing import TYPE_CHECKING, Any from PySide6.QtCore import QObject, Signal if TYPE_CHECKING: from aeb.app_context import ...
ferocioustoast/AEB
aeb/services/system_lfo_manager.py
.py
b52a8ba75b75e1a9
7.24
2
# aeb/services/tcode_parser.py """ Handles the parsing of T-Code data strings and updating the shared T-Code state within the AppContext. """ import logging import time from typing import TYPE_CHECKING import numpy as np from aeb.config.constants import BIPOLAR_AXES, TCODE_PATTERN if TYPE_CHECKING: from aeb.app_...
ferocioustoast/AEB
aeb/services/tcode_parser.py
.py
46b86b70c366962c
7.24
2
# aeb/services/udp_server.py """ Contains the UdpTCodeServer class, which manages the UDP T-Code server in a self-contained, object-oriented manner. """ import logging import socket import threading from typing import TYPE_CHECKING, Optional from aeb.services.tcode_parser import parse_tcode_string if TYPE_CHECKING: ...
ferocioustoast/AEB
aeb/services/udp_server.py
.py
974fc88798e7205d
7.24
2
# aeb/ui/widgets/inspectors/base.py """ Defines the abstract base class for all waveform inspector panels. """ from typing import TYPE_CHECKING from PySide6.QtCore import Signal from PySide6.QtWidgets import QFrame if TYPE_CHECKING: from aeb.app_context import AppContext from aeb.ui.main_window import MainWin...
ferocioustoast/AEB
aeb/ui/widgets/inspectors/base.py
.py
dec012e05a4e612c
7.74
2
# aeb/ui/widgets/inspectors/preset_showcase.py """ Defines the PresetShowcase panel for editing Waveform Group metadata. """ from typing import TYPE_CHECKING from PySide6.QtWidgets import ( QFormLayout, QFrame, QLabel, QLineEdit, QScrollArea, QTextEdit, QVBoxLayout, QWidget ) from aeb.ui.widgets.inspectors.ba...
ferocioustoast/AEB
aeb/ui/widgets/inspectors/preset_showcase.py
.py
08ccfb19a30d5e9f
7.74
2
import os import re import matplotlib.colors as mcolors import numpy as np def load_pipeline(folder): """Load pipeline configuration from experiment folder.""" pipeline_file = os.path.join(folder, "pipeline.log") return file2dic(pipeline_file) # TODO: Extract this styles = { 0: ("#9ce4f3", "#128099...
LauAvinyo/limblab
archive/_utils.py
.py
b416e24cef0aa4f5
7.35
4
""" LimbLab Command Line Interface This module provides the command-line interface for the LimbLab library, enabling automated processing and analysis of limb development data. The CLI supports the complete pipeline from raw data to visualization: 1. Create experiment structure 2. Clean and preprocess volume data 3. ...
LauAvinyo/limblab
packages/limblab-cli/limblab_cli/main.py
.py
5fa2d7afe08b9838
7.35
4
from limblab import clean, get_channel_path, pick_isovalues, save_experiment from limblab.design import theme from limblab.params import CleanParams from PyQt6.QtWidgets import ( QComboBox, QDoubleSpinBox, QGroupBox, QHBoxLayout, QMessageBox, QSpinBox, QVBoxLayout, QWidget, ) from vedo i...
LauAvinyo/limblab
packages/limblab-gui/limblab_gui/Controllers/clean_controller.py
.py
69cc015791b39ca6
7.35
4
import os from limblab import ( extract_surface, get_nuclei_channel_path, pick_isovalue, ) from limblab.database.crud import save_experiment from limblab.design import theme from PyQt6.QtCore import QThread, pyqtSignal, QObject from PyQt6.QtWidgets import ( QHBoxLayout, QMessageBox, QWidget, ) ...
LauAvinyo/limblab
packages/limblab-gui/limblab_gui/Controllers/surface_controller.py
.py
88b862fe2595339f
7.35
4
import pyqtgraph.opengl as gl from limblab.design import theme from PyQt6.QtCore import Qt from PyQt6.QtWidgets import ( QLabel, QPushButton, QSizePolicy, QSlider, QToolButton, QVBoxLayout, QWidget, ) def create_styled_button( text: str, color: str | None = None, hover_color: ...
LauAvinyo/limblab
packages/limblab-gui/limblab_gui/Controllers/utils.py
.py
de86fe822ee3a818
7.35
4
# pyright: reportOptionalMemberAccess=false from typing import Callable from config import * from limblab.vizutils import * from PyQt6.QtCore import Qt from PyQt6.QtWidgets import QMessageBox class NavigationMixin: # Types nav_stack: list current_screen: Callable | None menuBar: Callable # Navi...
LauAvinyo/limblab
packages/limblab-gui/limblab_gui/Mixin/NavigationMixin.py
.py
43a221f9744b756b
7.35
4
import webbrowser from limblab.design import theme from PyQt6.QtGui import QAction from PyQt6.QtWidgets import ( QHBoxLayout, QLabel, QMenu, QScrollArea, QToolButton, QVBoxLayout, QWidget, ) from utils import create_back_button, create_collapsible_section from vedo import printc class Men...
LauAvinyo/limblab
packages/limblab-gui/limblab_gui/menu_utils.py
.py
e1cefef892007763
7.35
4
import webbrowser import numpy as np import pyqtgraph.opengl as gl from config import * from limblab.design import theme from PyQt6.QtCore import QObject, Qt, pyqtSignal from PyQt6.QtGui import QAction, QIcon from PyQt6.QtWidgets import ( QLabel, QMenu, QPushButton, QSizePolicy, QSlider, QTool...
LauAvinyo/limblab
packages/limblab-gui/limblab_gui/utils.py
.py
4e63c8c280b75a8c
7.35
4
import os import sys from pathlib import Path from types import SimpleNamespace import vtkmodules from PyQt6.QtWidgets import QApplication, QMenuBar from vedo import Mesh, Plotter from vtkmodules.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor from PyQt6.QtGui import ( QAction) from limblab.models ...
LauAvinyo/limblab
packages/limblab-gui/limblab_gui/vis_test.py
.py
286e76dd81c195a7
7.85
4
import limblab import re from limblab.models import Experiment from .crud import save_experiment import sqlite3 from pathlib import Path DATABASE_EXPERIMENT_ACTION = { 'Clean': ['clean_path', 'clean_isovalue_min', 'clean_isovalue_max'], 'Surface': ['surface_path', 'surface_isovalue'], 'Stage': ['stage'], ...
LauAvinyo/limblab
packages/limblab/limblab/database/navigation.py
.py
8892068513cdef8b
7.35
4
from __future__ import annotations import json from pathlib import Path from typing import Any DESIGN_TOKEN_PATH = Path(__file__).with_name("design_tokens.json") try: with DESIGN_TOKEN_PATH.open("r", encoding="utf-8") as fp: DESIGN_TOKENS: dict[str, Any] = json.load(fp) except FileNotFoundError: DESI...
LauAvinyo/limblab
packages/limblab/limblab/design.py
.py
e92f4b719b707839
7.35
4
from pathlib import Path from typing import List, Optional from sqlalchemy import JSON, Column from sqlmodel import Field, Relationship, SQLModel class Channel(SQLModel, table=True): """Database table for dynamic image channels.""" id: Optional[int] = Field(default=None, primary_key=True) experiment_id:...
LauAvinyo/limblab
packages/limblab/limblab/models.py
.py
7d88d50d8853b2e4
7.35
4
# limblab/tools/surface.py import os from pathlib import Path from typing import Any, Literal, Optional from vedo import Volume from vedo.applications import IsosurfaceBrowser from vedo.pyplot import histogram from limblab.exceptions import VolumeProcessingError from limblab.models import Channel, Experiment from lim...
LauAvinyo/limblab
packages/limblab/limblab/tools/surface.py
.py
138e2dc482462bb8
7.35
4
import os from typing import Any, Literal, Optional import numpy as np from limblab.design import theme from limblab.models import Experiment from limblab.utils import generate_kwargs from vedo import Line, Plotter, Volume, show from vedo.pyplot import plot def _probe( volume_paths: list[str], channel_names:...
LauAvinyo/limblab
packages/limblab/limblab/vis/probe.py
.py
d3240da73952880f
7.35
4
"""LimbLab Plotter""" from typing import Any, Literal, Optional import numpy as np from limblab.design import theme from limblab.models import Channel, Experiment from vedo import Volume, Plotter from vedo.applications import ( RayCastPlotter, ) import os from limblab.utils import generate_kwargs # TODO: # This...
LauAvinyo/limblab
packages/limblab/limblab/vis/raycast.py
.py
1dbe2776e16c3aec
7.35
4
"""Tests for backend-aware cache_on_runner command generation.""" # pylint: disable=protected-access import json import os from unittest import mock from CelebiChrono.utils.metadata import ConfigFile from Yuki.kernel.container_job import ContainerJob def _job(machine_id="m1", is_input=False, cache=True): """Buil...
CelebiProjects/Yuki
UnitTest/test_cache_on_runner.py
.py
36c766e2af5326f2
7.5
0
"""Tests for live log collection while a job is running.""" from unittest import mock from Yuki.kernel.status_constants import CODA, FAILED, IN_MOVEMENT def _storage(tmp_path): from Yuki.kernel import impression_storage as ims s = ims.ImpressionStorage.__new__(ims.ImpressionStorage) s.project_uuid = "pro...
CelebiProjects/Yuki
UnitTest/test_collect_logs_live.py
.py
ce2de57b0c970c2b
7.5
0
"""Tests for ContainerJob output discovery.""" from Yuki.kernel.container_job import ContainerJob def _make_container(path, machine_id="runner-1"): c = ContainerJob.__new__(ContainerJob, str(path), machine_id) c.path = str(path) c.machine_id = machine_id return c def test_outputs_returns_relative_pa...
CelebiProjects/Yuki
UnitTest/test_container_job.py
.py
8787d71b82c8a583
7.5
0
"""Tests for the `yuki docker` CLI commands (Yuki/main.py).""" from unittest import mock from click.testing import CliRunner from Yuki.main import cli def _run(args, info_stdout=''): """Invoke the CLI with subprocess mocked; info_stdout fakes `docker info` output.""" runner = CliRunner() with mock.patch...
CelebiProjects/Yuki
UnitTest/test_docker_cli.py
.py
1e8d202364b3694a
7.5
0
"""Tests for the error-log route's offset support.""" from unittest import mock from Yuki.server.routes import status as status_routes def _app(): """Create a minimal Flask app with the status blueprint.""" from flask import Flask app = Flask(__name__) app.register_blueprint(status_routes.bp) ret...
CelebiProjects/Yuki
UnitTest/test_error_log_route.py
.py
38888786855fe53c
7.5
0
"""Tests for the file staging helpers.""" # pylint: disable=protected-access import json import os from Yuki.kernel.file_staging import FileStager, walk_files def test_walk_files_yields_relative_paths(tmp_path): """walk_files yields paths relative to the walked root.""" root = tmp_path / "root" root.mkdi...
CelebiProjects/Yuki
UnitTest/test_file_staging.py
.py
92d81b7c90cf07f6
7.5
0
"""Tests for the file_types classification helpers.""" from Yuki.kernel import file_types def test_is_plot_by_extension(): """is_plot matches image extensions case-insensitively.""" assert file_types.is_plot("mass.png") is True assert file_types.is_plot("fit.PDF") is True # case-insensitive a...
CelebiProjects/Yuki
UnitTest/test_file_types.py
.py
8890cfc0dddf67c7
7.5
0
"""Tests for the imp-view page listing.""" import os from unittest import mock from Yuki.server.routes import status as status_routes def _stub_config(root): """A config shim returning the fixture directory as the job path.""" stub = mock.MagicMock() stub.get_job_path = lambda p, i: str(root) return ...
CelebiProjects/Yuki
UnitTest/test_imp_view.py
.py
839be5d266c1e3bc
7.5
0
"""Tests for ReanaWorkflow.upload_file.""" # pylint: disable=protected-access import os from unittest import mock from Yuki.kernel import reana_workflow class _FakeJob: """Minimal job object for upload_file; like a real VJob it has no use_eos attribute, only the cache_on_runner replacement.""" def __ini...
CelebiProjects/Yuki
UnitTest/test_reana_upload_file.py
.py
7cffdab269f4f943
7.5
0
"""Tests for ReanaWorkflow file selection and download helpers.""" import os from unittest import mock import pytest from Yuki.kernel import reana_workflow def _make_wf(): wf = reana_workflow.ReanaWorkflow.__new__(reana_workflow.ReanaWorkflow) wf.machine_id = "runner-1" wf.project_uuid = "proj-1" wf...
CelebiProjects/Yuki
UnitTest/test_reana_workflow_select.py
.py
4861677a1d481803
7.5
0
"""Tests for submit-time validation of remote-hosted data runner binding.""" import json from unittest import mock from Yuki.server import tasks def _marker(tmp_path, project, impression, host_runner): marker_dir = tmp_path / ".Yuki" / "Storage" / project / impression marker_dir.mkdir(parents=True, exist_ok=...
CelebiProjects/Yuki
UnitTest/test_remote_data_validation.py
.py
7ca1dc6d48c2225c
7.5
0
"""Tests for select route handlers.""" from unittest import mock from Yuki.server.routes import workflow as wf_routes from Yuki.server.routes import execution as ex_routes from Yuki.server.routes import upload as up_routes def test_collect_files_route_passes_spec(): """collect-files forwards kind and pattern to ...
CelebiProjects/Yuki
UnitTest/test_routes_select.py
.py
fa86ef45dcda20fe
7.5
0
"""Tests for listing conda environments on runners.""" import json import os import subprocess import tempfile from unittest import mock from CelebiChrono.utils.metadata import ConfigFile from Yuki.server import runner_probe from Yuki.server.routes import runner as runner_routes def _app(bp): from flask import F...
CelebiProjects/Yuki
UnitTest/test_runner_envs.py
.py
c8f77c5b75d54233
7.5
0
"""Tests for runner capability probing and test-runner endpoints.""" import json import os import subprocess import tempfile from unittest import mock from CelebiChrono.utils.metadata import ConfigFile from Yuki.server import runner_probe from Yuki.server.routes import runner as runner_routes def _app(bp): from ...
CelebiProjects/Yuki
UnitTest/test_runner_probe.py
.py
2728dc4b458ab1f6
7.5
0
"""Tests for VWorkflow.create backend-type resolution and persistence.""" import json import os import tempfile import unittest from unittest.mock import MagicMock, patch from Yuki.kernel.vworkflow import VWorkflow class TestVWorkflowCreate(unittest.TestCase): """Verify the factory picks the right subclass and p...
CelebiProjects/Yuki
UnitTest/test_vworkflow_create.py
.py
0ee3756e79a69a89
7.5
0