sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
e6cc58705de96d5c9b6505f6fe1d88ebbd4e7881da62ac6921972cef774504db
Python
41,094
1,097
# mapping = { # "default": { # "core_allocation": 1, # "spatial_mapping": {"D1": ("K", 16), "D2": ("OY", 14), }, # # "temporal_ordering": (('OX', 56), ('OY', 56), ('FX', 1), ('FY', 1), ('K', 4), ('C', 4), ('T', 1), ('B', 1)), # "memory_operand_links": {"O": "O", "W": "I2", "I": "I1"}...
ebc1eaa359a016917db16da44de5c76e33ca8b7ba354ad0379fb4f026b2447e7
Python
41,094
1,097
# mapping = { # "default": { # "core_allocation": 1, # "spatial_mapping": {"D1": ("K", 16), "D2": ("OY", 14), }, # # "temporal_ordering": (('OX', 56), ('OY', 56), ('FX', 1), ('FY', 1), ('K', 4), ('C', 4), ('T', 1), ('B', 1)), # "memory_operand_links": {"O": "O", "W": "I2", "I": "I1"}...
ed0b0370c6bfbcb7101cf771ff9b0e2b7c01997defff4018b1dcc6ac0119c85a
Python
41,094
1,097
# mapping = { # "default": { # "core_allocation": 1, # "spatial_mapping": {"D1": ("K", 16), "D2": ("OY", 14), }, # # "temporal_ordering": (('OX', 56), ('OY', 56), ('FX', 1), ('FY', 1), ('K', 4), ('C', 4), ('T', 1), ('B', 1)), # "memory_operand_links": {"O": "O", "W": "I2", "I": "I1"}...
ee05fd4da123ef8e234f52b0ffc8190f325e3c92c6645f8325ad458af52bd7a9
Python
41,094
1,097
# mapping = { # "default": { # "core_allocation": 1, # "spatial_mapping": {"D1": ("K", 16), "D2": ("OY", 14), }, # # "temporal_ordering": (('OX', 56), ('OY', 56), ('FX', 1), ('FY', 1), ('K', 4), ('C', 4), ('T', 1), ('B', 1)), # "memory_operand_links": {"O": "O", "W": "I2", "I": "I1"}...
ef8830366d4e5b0cf1abb843e81b349ae174041ce84c7d6dcad06aa523950787
Python
41,094
1,097
# mapping = { # "default": { # "core_allocation": 1, # "spatial_mapping": {"D1": ("K", 16), "D2": ("OY", 14), }, # # "temporal_ordering": (('OX', 56), ('OY', 56), ('FX', 1), ('FY', 1), ('K', 4), ('C', 4), ('T', 1), ('B', 1)), # "memory_operand_links": {"O": "O", "W": "I2", "I": "I1"}...
f19e154a5f5dc10c96d4944d073e62dcee0e49357212a7421d22637767bd6e99
Python
41,094
1,097
# mapping = { # "default": { # "core_allocation": 1, # "spatial_mapping": {"D1": ("K", 16), "D2": ("OY", 14), }, # # "temporal_ordering": (('OX', 56), ('OY', 56), ('FX', 1), ('FY', 1), ('K', 4), ('C', 4), ('T', 1), ('B', 1)), # "memory_operand_links": {"O": "O", "W": "I2", "I": "I1"}...
f2b168d92bd1d27e193d6d982d8640d570aaf92e38e00467efa1af77561cd947
Python
41,094
1,097
# mapping = { # "default": { # "core_allocation": 1, # "spatial_mapping": {"D1": ("K", 16), "D2": ("OY", 14), }, # # "temporal_ordering": (('OX', 56), ('OY', 56), ('FX', 1), ('FY', 1), ('K', 4), ('C', 4), ('T', 1), ('B', 1)), # "memory_operand_links": {"O": "O", "W": "I2", "I": "I1"}...
f3e40739c55b809049c3e9c0c6568a73765012497988b51eb885dfcb7bb131b1
Python
41,094
1,097
# mapping = { # "default": { # "core_allocation": 1, # "spatial_mapping": {"D1": ("K", 16), "D2": ("OY", 14), }, # # "temporal_ordering": (('OX', 56), ('OY', 56), ('FX', 1), ('FY', 1), ('K', 4), ('C', 4), ('T', 1), ('B', 1)), # "memory_operand_links": {"O": "O", "W": "I2", "I": "I1"}...
f4331b328a589b983a5739bc2cfb7d36cc5312baf04e1312179fa50e537f2bde
Python
41,094
1,097
# mapping = { # "default": { # "core_allocation": 1, # "spatial_mapping": {"D1": ("K", 16), "D2": ("OY", 14), }, # # "temporal_ordering": (('OX', 56), ('OY', 56), ('FX', 1), ('FY', 1), ('K', 4), ('C', 4), ('T', 1), ('B', 1)), # "memory_operand_links": {"O": "O", "W": "I2", "I": "I1"}...
f88707e42c75eda2558ed877525dc8b70d94beb09da26697f57bd36ad4e873f1
Python
41,094
1,097
# mapping = { # "default": { # "core_allocation": 1, # "spatial_mapping": {"D1": ("K", 16), "D2": ("OY", 14), }, # # "temporal_ordering": (('OX', 56), ('OY', 56), ('FX', 1), ('FY', 1), ('K', 4), ('C', 4), ('T', 1), ('B', 1)), # "memory_operand_links": {"O": "O", "W": "I2", "I": "I1"}...
f8e42c96b719d3c1657276fbf9a17ab4d3a3fc789dd694b02457c9b5a626a49f
Python
41,094
1,097
# mapping = { # "default": { # "core_allocation": 1, # "spatial_mapping": {"D1": ("K", 16), "D2": ("OY", 14), }, # # "temporal_ordering": (('OX', 56), ('OY', 56), ('FX', 1), ('FY', 1), ('K', 4), ('C', 4), ('T', 1), ('B', 1)), # "memory_operand_links": {"O": "O", "W": "I2", "I": "I1"}...
fe3daee99ce921e8f68cce628ec169e0a1cb929860c0a4fe563337f48d1eb79f
Python
41,094
1,097
# mapping = { # "default": { # "core_allocation": 1, # "spatial_mapping": {"D1": ("K", 16), "D2": ("OY", 14), }, # # "temporal_ordering": (('OX', 56), ('OY', 56), ('FX', 1), ('FY', 1), ('K', 4), ('C', 4), ('T', 1), ('B', 1)), # "memory_operand_links": {"O": "O", "W": "I2", "I": "I1"}...
ff6c02a7c6570b95d862554624973296b7ac2b40ab4b13e0d578e42d90de5f34
Python
41,094
1,097
# mapping = { # "default": { # "core_allocation": 1, # "spatial_mapping": {"D1": ("K", 16), "D2": ("OY", 14), }, # # "temporal_ordering": (('OX', 56), ('OY', 56), ('FX', 1), ('FY', 1), ('K', 4), ('C', 4), ('T', 1), ('B', 1)), # "memory_operand_links": {"O": "O", "W": "I2", "I": "I1"}...
ff7a82b5c893c60f4a4bb5fe12e1390574afd871532ee4747e11ad601ba05043
Python
41,094
1,097
# mapping = { # "default": { # "core_allocation": 1, # "spatial_mapping": {"D1": ("K", 16), "D2": ("OY", 14), }, # # "temporal_ordering": (('OX', 56), ('OY', 56), ('FX', 1), ('FY', 1), ('K', 4), ('C', 4), ('T', 1), ('B', 1)), # "memory_operand_links": {"O": "O", "W": "I2", "I": "I1"}...
ffb4d113e2de0d196795b5c1da674fa9d82f39dd703a201b0c701755e930f658
Python
41,094
1,097
# mapping = { # "default": { # "core_allocation": 1, # "spatial_mapping": {"D1": ("K", 16), "D2": ("OY", 14), }, # # "temporal_ordering": (('OX', 56), ('OY', 56), ('FX', 1), ('FY', 1), ('K', 4), ('C', 4), ('T', 1), ('B', 1)), # "memory_operand_links": {"O": "O", "W": "I2", "I": "I1"}...
d7ac42b4f3802797b25c7aa397d7b3d03438ecf4c3c97d8d065cb55ff69635c5
Python
41,195
1,228
"""octagonal maze linearization""" import copy import numpy as np # from scipy import interpolate # from collections import namedtuple from ..core import _analogsignalarray, _epocharray from ..auxiliary import _position from .. import utils from ..plotting.core import colorline # TODO: linsmooth(), wrap(), unwrap(),...
67cc6c7b257909ab78d868a2a58b4d500422ae264c5a51a8a0d581514171ce5c
Python
41,212
1,157
#!/usr/bin/python # ## @file # # A ctypes based interface to Andor cameras. # (Andor Software Version 2.82). # # Cameras are 1 indexed? # # This can control more than one camera. # # Hazen 09/15 # import ctypes import numpy import time import storm_control.sc_library.halExceptions as halExceptions ...
b689a48d5f13ef614b8d596eaa92b053785b4fd72fbbb07d2fa8420fb50057c3
Python
41,308
1,302
""" General utility code for test-time interraction with a SeqNN model. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import pdb import sys import numpy as np import tensorflow as tf from basenji.dna_io import hot1_augment from basenji import accurac...
a90538818d28060c693bfb02cbb4bf2b53ccd2cba2e8981c7815e2712aa8690e
Python
41,511
1,116
#!/usr/bin/env python3 """ PFAS Content Prediction using Gaussian Process Regression for HGBO This module provides a comprehensive pipeline for predicting PFAS content in soil samples using Gaussian Process Regression with enhanced kernels, SHAP interpretability analysis, and Partial Dependence Plot (PDP) visualizatio...
4b3500cf9e5b613e564f063d3654fc1b58efb8f324c0dd7b3b27a3a2675b2297
Python
41,548
802
# -*- coding: utf-8 -*- """ Code to reproduce analyses and plots shown on Figure 1 and Supplementary Figure 1 Please make sure to run sequentially as some cells might depend on variables defined earlier. Created on Fri Jan 17 12:32:43 2025 @author: Lukas Oesch """ from chiCa import * #Run inside chiCa path to direc...
ae867d47e078e351e6a852a9e83ccdad875577bdd0cdd4cb9be8c5870f60b4bb
Python
41,557
1,170
#!/usr/bin/python # ## @file # # A ctypes based interface to Andor cameras. # (Andor Software Version 2.82). # # Cameras are 1 indexed? # # This can control more than one camera. # # Hazen 09/15 # import ctypes import numpy import time import storm_control.sc_library.halExceptions as halExceptions ...
4cfda08e26d4d532e7b79763db55b034edee30fbd2ffc0172ece856a19921269
Python
41,565
850
# This file is part of connectome-manipulator. # # SPDX-License-Identifier: Apache-2.0 # Copyright (c) 2024 Blue Brain Project/EPFL """Module for building connection/synapse properties models""" import os.path import matplotlib.pyplot as plt import numpy as np import progressbar from scipy.optimize import curve_fit ...
faee43bd9d7628e942f56e3303f1cbcb49b102afe0f803842bdb55141a0fd96b
Python
41,575
890
import torch import torch.nn as nn from torch.nn.parameter import Parameter import numpy as np from models.rec_weight_matrix import * import random def seed(seed=1810): random.seed(seed) np.random.seed(seed) torch.manual_seed(seed) torch.cuda.manual_seed(seed) torch.cuda.manual_seed_all(seed) ...
c12ee744ae3bb5469164c46a4b9bbb8d7287110a49267b4614c9bdced5413e78
Python
41,621
1,029
import numpy as np from scipy import linalg import scipy.sparse import scipy.sparse.linalg import lapy import brainspace.mesh as mesh import mne from useful_fns import apply_solver, log_exp_var, find_each_nearest_vertex from dynsim_fns import map_data_to_full_src, centre_loader, generate_com_labels def get_downsample...
92e011acd9f15ae98134a6ad23ef4d673d876d7c8af57c76ffe2545c119ec8b1
Python
41,670
1,358
#!/usr/bin/env python3 """Serial ECC registration refinement for MuscleX calibration refinement.""" from __future__ import annotations import math import time import cv2 import matplotlib.pyplot as plt import numpy as np try: from musclex.utils.fold_symmetry import _compute_fold_symmetry except Exception: fr...
b0de084cc693a0bc4ecdf35dda6ab1f416243d423e27110d78fbcf3de026cdf5
Python
41,692
923
from attorch.layers import (SpatialXFeatureLinear, elu1, SpatialTransformerPooled2d, SpatialTransformerPyramid2d) from attorch.module import ModuleDict import numpy as np import torch from torch import nn as nn from torch.nn import Parameter from torch.nn import functional as F from static...
e368e1856fdc952eec2ea520be2bb30affa99079bca4b6f32dda9b852f84971a
Python
41,692
677
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'D:\PycharmProjects\ISAT_with_segment_anything\ISAT\ui\MainWindow.ui' # # Created by: PyQt5 UI code generator 5.15.11 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you...
51692b9d789046feee2a50529f89f60ca16445bb71e930c4177f2717a6581f6d
Python
41,693
998
# -*- coding: utf-8 -*- import os import gc import numpy as np import pandas as pd from time import time import matplotlib.pyplot as plt from collections import defaultdict from scipy.ndimage import gaussian_filter from scipy import stats import tensorflow as tf import torch import torch.nn as nn imp...
3bb86c2cddc1db995e2026096d513aec3ce5203a52c603ddc09f3fdb9a75b001
Python
41,715
834
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 6 15:42:00 2019 Analyze animal now in a seperate file # Analyse animal is the main analysis function. It takes one obligated argument which is the name of the csv file. It has two optional # arguments. # Single = minicube with only one photoreceiv...
c630912e7b078ed02afb64cc09a5345fbec2dff61f07c0060349b10443041155
Python
41,770
871
import codecs from contextlib import closing import requests import csv import itertools import statistics import random import collections import copy import math import pprint as pp import seaborn as sns import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap import numpy as np import argparse ...
e8bb094164d61d1f4e25029b24496da25aa1aea2c089d58a1d39d1f14a71afa5
Python
41,847
899
import torch import torch.nn as nn from torch.nn.parameter import Parameter import numpy as np from models.rec_weight_matrix import * import random def seed(seed=1810): random.seed(seed) np.random.seed(seed) torch.manual_seed(seed) torch.cuda.manual_seed(seed) torch.cuda.manual_seed_all(seed) ...
3ba1714f5b3dd9028200a922203333a430061572a7eed8da68b9c905e768086a
Python
41,903
813
# Kai Sandbrink # 2023-02-01 # This script performs the analyses for the LEVC task (Task 2) # %% LIBRARY IMPORTS import torch import pandas as pd import numpy as np import matplotlib as mpl from utils import Config, plot_learning_curve, plot_learning_curves_comparison, get_timestamp from utils_project import load_co...
cc6589ee841927b01d183834a5e4fd2b560804247f609cf1678d978fec48d76c
Python
41,926
1,239
""" Module for the Canvas QWidget the task will render into """ import json import time import enum import types import base64 import typing import logging import pathlib import asyncio import hashlib import itertools import functools import contextlib import collections import bisect import os.path import stl.mesh ...
d011c261ac66a85e614511efc3279419ba34f7e9a814d8ec9a57b1f538b79d89
Python
41,943
1,186
import os from zigzag.classes.hardware.architecture.memory_hierarchy import MemoryHierarchy from zigzag.classes.hardware.architecture.memory_level import MemoryLevel from zigzag.classes.hardware.architecture.operational_unit import Multiplier from zigzag.classes.hardware.architecture.operational_array import Multiplier...
2b2bd15f60d7dcca6f9b9329780abc734797d8ac76079ebd0f3dd6243b89c6eb
Python
41,956
1,186
import os from zigzag.classes.hardware.architecture.memory_hierarchy import MemoryHierarchy from zigzag.classes.hardware.architecture.memory_level import MemoryLevel from zigzag.classes.hardware.architecture.operational_unit import Multiplier from zigzag.classes.hardware.architecture.operational_array import Multiplier...
b3ceea293ece9964006c104c78f1ca37d92877f3aae991dd97b5b66cec1efd76
Python
42,024
1,097
# -*- coding: utf-8 -*- import matplotlib import matplotlib.pyplot as plt import matplotlib.patheffects as PathEffects from mpl_toolkits.axes_grid1 import make_axes_locatable import numpy as np import pandas as pd import seaborn as sns from scipy.ndimage import zoom from scipy import stats def get_2d(arra...
2adce749b7f7cce2bec10c9d2cab63944a68d08fde61f179652ae4d0259eadfe
Python
42,029
1,188
import os from zigzag.classes.hardware.architecture.memory_hierarchy import MemoryHierarchy from zigzag.classes.hardware.architecture.memory_level import MemoryLevel from zigzag.classes.hardware.architecture.operational_unit import Multiplier from zigzag.classes.hardware.architecture.operational_array import Multiplier...
5171ea0f934cd036cabef9d59798775f8066c86b43e2c76db68ae395e8872a36
Python
42,053
923
#!/usr/bin/env python3 """ DEGU Distillation Training Script for lentiMPRA DREAM-RNN Models This script implements the DEGU (Distilling Ensembles for Genomic Uncertainty-aware models) methodology as described in the DEGU paper for lentiMPRA data. It trains distilled student models using: 1. Ensemble mean predictions...
98cd7225a344df6ef2bddde13563ab674f82014ceb207159655f99cc3274c7c9
Python
42,102
798
###---The very basic intro---### # This analysis plugin takes advantage of labdatatools to download raw data to # be analyzed from the churchland gdrive and to upload the results of the # analysis. Here's a use example in the terminal: # # labdata submit caiman -a LO032 -s 20220215_114758 -d miniscope -- run_cnmfe --n_...
a0fcccfbfc7648ac7e95478550fbaf7d878c030b379ed914b177ab342ee03fec
Python
42,231
1,045
""" An implementation of HMAX: """ import torch import torch.nn as nn import torch.nn.functional as F import torchvision import numpy as np import scipy as sp import time import pdb import random from ._builder import build_model_with_cfg from ._manipulate import checkpoint_seq from ._registry import register_model, g...
2ebf42d5a08e84720b370a8153610d63db1310e61034db0d27e930b093d3b0ab
Python
42,235
866
import collections import os.path import shutil import subprocess import sys import unittest import tests.base_test import tests.output_parser as output_parser import tests.test_config import tests.util class Test(tests.base_test.BaseTest): def setUp(self): super().setUp() self._test_base_dir = ...
168dde9b078476a856a06e1ccf9f978d7e1852e2c72ebf68995e89d25068a990
Python
42,276
1,171
""" TMS Explorer was developed to assist with the data preprocessing of transcranial magnetic stimulation (TMS) as part of the study "Transcranial direct current stimulation (tDCS) and mindfulness meditation in fibromyalgia" in the "Non- invasive brain stimulation lab" (NBS) at the university medicine Göttingen ...
df5f599f38ef69b4a91980f8a8cd5fc60ba86070c4b176a6082eba82fec08e63
Python
42,319
979
#!/usr/bin/env python # -*- coding: utf-8 -*- ## # @file lite2.py # @brief # @author Zhijie Xie # @date 2015-11-27 from __future__ import print_function import sys import os import os.path import argparse import subprocess import shutil import time from datetime import datetime from rmatspipeline import run_pipe VE...
9d546b2bdd782a14584911c8f7bcf1498cfecdecdd1b4703e0594c200ae762db
Python
42,359
981
# core.py by CoccaGuo at 2022/05/16 16:45 ############################################## # core.py renew by Zhiwen Zhu at 2023/07/21 Email address: zhiwenzhu@shu.edu.cn ############################################## import logging import time from abc import ABCMeta, abstractmethod from enum import Enum import matplo...
62b2fe34c14e2701c9a45d7cf68e24e9d22e828ec9f5200d69456031cdfa7261
Python
42,406
1,074
import itertools import logging import math from typing import Any, Callable, Dict, List, Optional, Tuple, Union import numpy as np import torch import torch.multiprocessing as mp from torch import Tensor from torch_geometric.distributed import ( DistContext, LocalFeatureStore, LocalGraphStore, ) from tor...
3ebe373867dccbd8c57c1b1f82ccd94b6a108f9082543a067810c72eb35c815d
Python
42,444
986
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license # -------------------------------------------------------- # TinyViT Model Architecture # Copyright (c) 2022 Microsoft # Adapted from LeViT and Swin Transformer # LeViT: (https://github.com/facebookresearch/levit) # Swin: (https://github.com/micro...
23b1363d1ea42c21d0ff6b7e7e875eed68dbb236c920eec73c524acc8feb39e3
Python
42,505
1,137
# -*- coding: utf-8 -*- # @Author : LG import math import typing from PyQt5 import QtCore, QtGui, QtWidgets from ISAT.annotation import Object from ISAT.configs import STATUSMode, ShapeType # ============================================================ # Outline pen # ============================================...
de30f4b8febcbf9c2770024895226eb6399604f3d4556a6d2603ef5926dd871b
Python
42,523
976
"""MEA network plotting: Python port of StandardisedNetworkPlot.m.""" from __future__ import annotations from pathlib import Path from typing import TYPE_CHECKING from dataclasses import dataclass import numpy as np import pandas as pd import scipy.io as sio if TYPE_CHECKING: import matplotlib.axes # ── Data...
a3626e1dcf91ea1fbee624050fe06d9599232258095b7ccac3d92a73a6b97bc7
Python
42,574
1,175
import os from functools import partial import numpy as np import pandas as pd import tables import matplotlib import warnings from PyQt5.QtCore import Qt, QPointF from PyQt5.QtGui import QPixmap, QPainter, QFont, QPen, QPolygonF, QColor, QKeySequence, QBrush from PyQt5.QtWidgets import QApplication, QMessageBox from...
3ac12ab1d6b728f8edc92dd768fbf7ada3208d43358a08745182446f37273f6c
Python
42,583
1,144
# Generated by Django 4.2.25 on 2025-10-20 15:38 import django.db.models.deletion from django.conf import settings from django.db import migrations, models import cvat.apps.engine.models class Migration(migrations.Migration): replaces = [ ("engine", "0001_release_v0_1_0"), ( "engine...
c6a93311959d2b0aec9b1442d97094bd19ca46a82bc30bec0edc1b03656a7323
Python
42,595
1,103
from __future__ import annotations import copy import re from abc import ABC, abstractmethod from typing import Union, TYPE_CHECKING import numpy as np from scipy.signal import stft import seisbench from seisbench import config if TYPE_CHECKING: import seisbench.data as sbd class SupervisedLabeller(ABC): ...
e9ef40f2f947ca6768a659a446b38d6b9db71763d2bf267afe7c8a48a50b08c7
Python
42,661
849
import pdb import models import torch, torch.nn as nn import cv2 from torch.autograd import Variable import sys, os, time, math, numpy as np sys.path.append("/LiNet") import torchvision.utils as vutils # import YuSmith.lib.irnet as irnet import YuSmith.lib.torch_util as tu import torch.optim as optim # from LiNet imp...
8d1125cd8fa98df0e38fedf3589ca241a2909670833e571adfdae1744dca83e3
Python
42,833
776
import copy import os import cv2 import re import tempfile from typing import Dict, Tuple, List, Union import functools import logging from collections import OrderedDict from multiprocessing.pool import ThreadPool import numpy as np from PIL import Image from tqdm.auto import tqdm import xarray as xr from brainscor...
2c48480bee2ac3e3f1d9540cb7db08f012bff94750d12f04558933fe1e01c8ee
Python
43,053
1,307
"""Preprocessing functions.""" from __future__ import annotations import json from pathlib import Path from typing import Any import mne import numpy as np import matplotlib.pyplot as plt from mne.preprocessing import ICA from mne_icalabel import label_components from scipy import stats from scipy.ndimage.filters im...
520a802c6206e5271e76b43faf17c5e93782f46be9a0ec669c59ba078731f052
Python
43,059
1,192
import json import pandas as pd from scipy.stats import pearsonr, wilcoxon import matplotlib.pyplot as plt import seaborn as sns from matplotlib.patches import FancyArrowPatch from sklearn.decomposition import PCA from infopath.utils.functions import * from infopath.model_loader import load_model_and_optimizer def ra...
229010bbb139775b19e3bf3fac045c218a676e7ca2dad16513877a02196ebeb6
Python
43,120
1,105
#!/usr/bin/env python """ These classes implement various focus lock modes. They determine all the behaviors of the focus lock. Hazen 05/15 """ import math import numpy import scipy.optimize import tifffile import time from PyQt5 import QtCore import storm_control.sc_library.halExceptions as halExcept...
3093d84003b6e834e6517c7f2fbdd3090c2437977cb8566e445ce378a9fb826c
Python
43,155
1,105
#!/usr/bin/env python """ These classes implement various focus lock modes. They determine all the behaviors of the focus lock. Hazen 05/15 """ import math import numpy import scipy.optimize import tifffile import time from PyQt5 import QtCore import storm_control.sc_library.halExceptions as halExcept...
f7b385302b0f0c42390424a2ed186845c53608d469ef3724dad133ae5b45663e
Python
43,192
1,179
import math from typing import Optional, Tuple import torch from torch import Tensor from torch.autograd import grad from torch.nn import Embedding, LayerNorm, Linear, Parameter from torch_geometric.nn import MessagePassing, radius_graph from torch_geometric.utils import scatter class CosineCutoff(torch.nn.Module):...
2815b97ff44b6bac5e0a9088684c29dfc6032ba020190625c720463e4e5dd108
Python
43,204
1,028
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Jul 27 10:53:04 2020 @author: Cristian """ # Core simulator and tools from brian2 import * from brian2tools import * import numpy as np import matplotlib.pyplot as plt from scipy import signal import math import random import os # ====...
e1adff133f42e977fce55e5a9518f050271077aba19ea9fbb8af7fa6404fb99b
Python
43,265
853
import logging import os import json import vtk import qt,ctk import slicer from slicer.ScriptedLoadableModule import * from slicer.util import VTKObservationMixin import numpy as np from CurveToBundleLib.Widgets.multiHandleSlider import MultiHandleSliderWidget from CurveToBundleLib.Widgets.multiModelSelector import...
be3cd0b48099c095042d09ff86c659140d97107fcb07fc826efcf2666e1bf22b
Python
43,266
1,089
import yaml import sys import os import h5py import numpy as np import matplotlib.pyplot as plt import pandas as pd import matplotlib as mpl pathpath,myrun,ncluststr,cmethod = sys.argv[1:] """ pathpath = 'PATHS/filepaths_carlen.yml' myrun = 'runC00dMP3_brain' cmethod = 'ward' ncluststr = '8' """ with open(pathpath,...
5e1f77c705e1b6eeff021b1fcad3d59cee3621a420edff72b4c93b45e234cc43
Python
43,301
1,481
# -*- coding: utf-8 -*- """ Created on Fri Mar 11 11:05:25 2022 @author: DELINTE Nicolas """ import os import warnings import numpy as np import nibabel as nib from dipy.io.streamline import load_tractogram def voxel_distance(position1: tuple, position2: tuple): ''' Returns the distance between two voxels...
a222112fd1cc36afc63f0641e9cf0cdfe9dbeeac8880f97de1c3fbb2df29831a
Python
43,338
1,049
# -*- coding: utf-8 -*- import os import gc import numpy as np import pandas as pd import matplotlib.pyplot as plt from scipy.ndimage import rotate, zoom, gaussian_filter from collections import defaultdict from Bio import SeqIO from torch import masked_select import json import warnings from . import data_utils from...
c3078ce1e8911a5bd75dd28c71e85b4526af3f7948fa8062f86ea2fd34d2d0dd
Python
43,365
1,229
"""Tests for the chemgraph.execution abstraction layer. Tests cover: - TaskSpec validation - LocalBackend: python and shell tasks - GlobusComputeBackend: python and shell tasks (mocked SDK) - Backend factory (get_backend) - Shared utilities: resolve_structure_files, gather_futures, write_results_jsonl """ import json...
3e9be182a905d93f7903d65b53f309c0525b0293e8a8558e6e3499a1b15c7219
Python
43,410
1,260
""" Compare reflectance distributions (PCA projections) of different simulation sets with real data, aggregated at different levels (image, subject, organ). Controlled by a YAML configuration file. """ import os import pickle import fastkde import matplotlib.animation as animation import matplotlib.colors as mcolors ...
41021e19cb678071f0faaa4781f2ce948cec5f68d77469735bb5111ef1d525b5
Python
43,430
815
import anndata try: from anndata.base import Raw except ImportError: from anndata import Raw import batchglm.api as glm import logging import numpy as np import pandas as pd import patsy import scipy.sparse from typing import Union, List, Dict, Callable, Tuple from .external import _fit from .external import p...
718e3f95c180ed4adbcc520bba9d6b7e1ff031d2026391036919deaa34c2f8ec
Python
43,437
1,156
import os, json, sys, shutil import numpy as np import nibabel as nib import matplotlib.pyplot as plt from time import time # DIPY Local PCA Denoising from dipy.denoise.localpca import mppca from dipy.core.gradients import gradient_table from dipy.io.image import load_nifti import dipy.reconst.dki as dki sys.path.in...
82d00d3e9dcf4a7401c27025f95fc508bfd1dc8ce6fb6eccf207344f219519da
Python
43,446
1,261
import pickle from collections.abc import Sequence from pathlib import Path from typing import TYPE_CHECKING, Literal import numpy as np import pytest from eir import train from eir.setup.config import Configs from tests.conftest import get_system_info from tests.test_modelling.test_modelling_utils import check_perfo...
029d0ea1f61bf8d13ebf1e9025a06304dba24dc137224744e04c5e8773613958
Python
43,496
928
from .trainer import * from flair.training_utils import store_teacher_predictions from flair.list_data import ListCorpus import math import random import pdb import copy from flair.datasets import CoupleDataset from ..custom_data_loader import ColumnDataLoader from torch.optim.adam import Adam import torch.nn.functiona...
9295090e53d6f901bbc44b956a1af778c50eb9ddca056c1352a7a0df69d6e618
Python
43,506
1,061
#!/usr/bin/env python3 """ Corrected Semantic Detail Analysis for Translation Module Analyzes teacher-student pairs individually and provides global summary """ import os import sys from pathlib import Path import torch import torch.nn as nn import numpy as np import matplotlib.pyplot as plt import seaborn as sns from...
88efe8d156f5e864cddcacecabf59a4be753b296d10be78a250f23c2a889532d
Python
43,588
922
import warnings warnings.filterwarnings("ignore", message="It is not recommended to directly access") import os import argparse import numpy as np import matplotlib.pyplot as plt from rdkit import Chem from rdkit.Chem import AllChem import matplotlib.patheffects as path_effects from matplotlib.colors import LinearSegme...
af2c23b61fd5bfd039381b74d3b07e765bd80ead2f2cf12acf045b35589d7c9c
Python
43,596
1,082
import tensorflow as tf tf.compat.v1.disable_eager_execution() tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR) import logging import os import numpy as np import pandas as pd pd.options.mode.chained_assignment = None import json import random from collections import defaultdict # import s3fs import h...
ccf7ce0479d188d72371715763fb857411beebd36b767c9ada5d5ab5a89e3f77
Python
43,639
879
#!python import shutil import os import importlib from pathlib import Path import argparse,yaml from argparse import RawTextHelpFormatter import traceback,time,copy,yaml,sys,uuid import sys import subprocess import re sys.path.append(Path(__file__).resolve().parent.parent.__str__()) ## this line is for development imp...
9f82a48e7e73e78aec3227359860854f1838ef9aca716b90e3575660b34114ac
Python
43,723
663
#!/bin/python3 # Tests for the arborNetworkConsolidationMultiComp module # Copyright 2022-2024 Jannik Luboeinski # License: Apache-2.0 (http://www.apache.org/licenses/LICENSE-2.0) # Contact: mail[at]jlubo.net import numpy as np import json import os import inspect import pytest import arborNetworkConsolidationMultiC...
cf6a5fa8c8a14e6bf756c91d6b02bf8f33c31d92bcb8ff32a403d0b89507da4a
Python
43,763
1,178
# Copyright (C) 2020-2022 Intel Corporation # Copyright (C) CVAT.ai Corporation # # SPDX-License-Identifier: MIT from __future__ import annotations import io import os import os.path import pickle # nosec import tempfile import time import zipfile import zlib from collections.abc import Callable, Collection, Generat...
e2b19d0be07709ccb160f26b17efe66f3fbd590e278f3ed3b095600c7999b85b
Python
43,791
1,167
# file: layers.py # brief: A number of objects to wrap caffe layers for conversion # author: Andrea Vedaldi from collections import OrderedDict from math import floor, ceil from operator import mul import numpy as np from numpy import array import scipy import scipy.io import scipy.misc import copy import collections ...
97f807cb5f20f56b624829b59838a7478bc6ad938b7ada20af0e70244727db71
Python
43,807
1,196
import copy import warnings from collections.abc import Mapping, Sequence from dataclasses import dataclass from itertools import chain from typing import ( Any, Callable, Dict, Iterable, List, NamedTuple, Optional, Tuple, Union, overload, ) import numpy as np import torch from ...
e9505257a478da2b1ff81b04fe3880d07e804a0a94917f7dcf6c8bb8a584cffc
Python
43,808
1,064
############################################################################################## ### Code to create plots of the neurons and synaptic weights in the network via Matplotlib ### ############################################################################################## ### Copyright 2017-2022 Jannik Lub...
e6d9689cff1a993f921f0ac16b6ed3c811e3ee372b23c74da51a5026cbf26dc9
Python
43,888
610
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/media/lg/disk2/PycharmProjects/ISAT_with_segment_anything/ISAT/ui/Converter_dialog.ui' # # Created by: PyQt5 UI code generator 5.15.10 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit t...
4b58679477ac809fc21cea05aa5f867ec9e5520c197aea1deef085dd3f25c3ac
Python
43,934
1,170
# file: layers.py # brief: A number of objects to wrap caffe layers for conversion # author: Andrea Vedaldi from collections import OrderedDict from math import floor, ceil from operator import mul import numpy as np from numpy import array import scipy import scipy.io import scipy.misc import copy import collections ...
7a302df7b9b751b99c73431636237ab9ac415aa82834ba5ff0acea9556ef347f
Python
43,970
815
from .base_classes import LearningRule, BiasLearningRule import torch import math class BP_like_1E(LearningRule): def __init__(self, projection, max_pop_fraction=1., stochastic=False, learning_rate=None, relu_gate=False): """ Output units are nudged to target. Hidden dendrites locally compute an e...
ebc7e380c95a4c2b57be372cfad4c347d10bff61ecb100ed9087d78a5162ae45
Python
43,977
1,036
#!/usr/bin/env python3 """ 1. Copy config_template.yaml to config.yaml 2. Edit config.yaml with your data paths and settings 3. Prepare a CSV file with molecular identifiers, SMILES, and labels 4. Run: python batch_processing_script.py """ import sys import os import logging import gzip import tarfile...
3ca4fd946284713549d1d066b2737400ac25cb8b901b9db2ee14b32b62b89437
Python
43,979
1,043
"""Pure-Python implementation of the ALCF IRI Facility API integration. No LangChain. No ``@tool`` decorators. Any Python caller (agent tool, notebook, test, MCP server) can import :func:`dispatch` and drive the IRI API directly. See :mod:`chemgraph.tools.alcf_iri_tools` for the LangChain wrappers layered on top. Ful...
d987adcf9ae895d58b258858e003756bc18acc758c7373a984558dedf67d22ae
Python
43,982
925
# /------------------------------------------------------------------------------+ # | 24-OCT-2022 | # | Copyright (c) Bone Imaging Laboratory | # | All rights reserved ...
20cb7e1eb0acc8754f3014d11abcc9d444412a00ec7eca2d6b98cfd3ff7e8d58
Python
43,984
1,052
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license from __future__ import annotations import copy import math from functools import partial import numpy as np import torch import torch.nn.functional as F from torch import Tensor, nn from ultralytics.nn.modules import MLP, LayerNorm2d, MLPBlock fro...
31a42bb7e993d4e1a0c0023c18051cbd8724f7440f00c01c56e0e14f90fcda03
Python
44,010
990
import collections.abc as collections import numbers import os import stat import tempfile from abc import ABCMeta, abstractmethod from collections import OrderedDict from collections.abc import Callable, Mapping from pathlib import Path from typing import Any, NamedTuple, cast import torch import torch.nn as nn from...
07801a893a747c806976e4b77b8d2a4fe1c12ce76be919a520a8f6021e7e734c
Python
44,033
1,117
# -*- coding: utf-8 -*- """Module for performing binary classification from multi-voxel pattern using a support vector machine.""" import csv from collections import namedtuple from pathlib import Path from typing import NamedTuple, Optional import joblib import matplotlib.pyplot as plt import numpy as np import pand...
662ae0c3693c700e9f63501472938536d53bd7fd5d905fefc91b1e2bb8c66f8f
Python
44,055
1,394
# The ImpedanceFitter is a package to fit impedance spectra to # equivalent-circuit models using open-source software. # # Copyright (C) 2018, 2019 Leonard Thiele, leonard.thiele[AT]uni-rostock.de # Copyright (C) 2018, 2019, 2020 Julius Zimmermann, # julius.zimmermann[AT]un...
e64d0a410071c8f9b6aa9e34cad5d62b99259ddcdbaa4fac59b17094c45d30ed
Python
44,060
1,218
# -*- coding: utf-8 -*- """ D-P rule using just RNAi phen """ import obonet import numpy as np import os import networkx as nx import matplotlib.pyplot as plt import pandas as pd import matplotlib as mpl from scipy.cluster.hierarchy import dendrogram import great_library_phenotypes as glp from matplot...
76be88e02e314d428b45f9681dc8e52cd68c5586939ef1d73a18a05d1c0096b5
Python
44,126
1,070
############################################################################################## ### Code to create plots of the neurons and synaptic weights in the network via Matplotlib ### ############################################################################################## ### Copyright 2017-2022 Jannik Lub...
762e2ff1fb050739723ebb1ec9c761f1d4ea3a73432e62e4b70f7b0840c71390
Python
44,200
1,185
"""Runs the PyDesigner pipeline""" import argparse # ArgumentParser, add_argument import glob # recursive file search import json import logging import os # mkdir import os.path as op # path import shutil # which, rmtree import subprocess # subprocess import sys as sys import textwrap # dedent import numpy as ...
071db555e8438cb8c98e2fd8fcab08e44aea05295235dc1b6638c8471c83fddd
Python
44,335
1,370
import os import pickle from typing import Any import numpy as np import pandas as pd import torch from nltk.sentiment.vader import SentimentIntensityAnalyzer from nltk.stem import WordNetLemmatizer from nltk.tokenize import sent_tokenize from sklearn.model_selection import train_test_split from torch.utils.data impor...
3ede583d7ae3461f012f1d7a22d7b002c7caf9bd134593d53213f0fc2ce9caf9
Python
44,346
1,034
import os.path as osp import warnings from abc import abstractmethod from inspect import Parameter from typing import ( Any, Callable, Dict, Final, List, Optional, OrderedDict, Set, Tuple, Union, ) import torch from torch import Tensor from torch.utils.hooks import RemovableHand...
520e745d0aef2f72f3112ffc5ea6eb8ee3975401fec61b3f583d46eb6aa2b7b2
Python
44,399
1,264
# -*- coding: utf-8 -*- """snn-leukemia-gradcam.ipynb Automatically generated by Colab. Original file is located at https://colab.research.google.com/drive/15qmb8Dj14uDKFREW6Ojafv2dfHVSoAtE # SNN Leukemia Classification - Clean Training Pipeline ## Focus: Training + Model Saving + Grad-CAM **Key Features:** - C...
b2976670211754bd0f43229cc5c291fd6fc78a0e364f7a2e77e21cbee830df53
Python
44,487
1,117
import sys import os from os.path import join from PySide6.QtWidgets import ( QDialogButtonBox, QDoubleSpinBox, QSlider, QGridLayout, QCheckBox, QDialog, QPushButton, QLabel, QSpinBox, QStatusBar, QVBoxLayout, QFileDialog, QWidget, ) from PySide6.QtGui import QPixmap,...
7aac4ffbf1e8d1c60e89cc9726c94d360e621f8c07859f638549ba2cac409dcb
Python
44,496
1,177
# -*- coding: utf-8 -*- # ============================================================================= # This code is released for the publication: # # "A Transparent AI Assurance and Benchmarking Framework for EEG Seizure # Detection on TUSZ Seeded with a Reproducible Gradient-Boosting Ensemble" # # License: # ...
a23d59fc14a2a1b015be7521b3cfdd3979bea3148bd6261f3229bd2429be6b0d
Python
44,518
1,197
import streamlit as st # Page configuration -- MUST be first Streamlit call st.set_page_config( page_title="ChemGraph", page_icon="🧪", layout="wide", initial_sidebar_state="expanded", ) import json import ast import toml import os from io import StringIO from uuid import uuid4 import re from typing i...
807eee34b8bbd97f5f2d8e76655c9ee22670733742ec6d997d4918a23f838bc6
Python
44,579
1,220
# Copyright 2024 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
8f28ade0a587ac9fbc0eceaf1eb669491346aba322d0760629fa90d767482cc6
Python
44,597
1,187
from .trainer import * from flair.training_utils import store_teacher_predictions from flair.list_data import ListCorpus import math import random import pdb import copy from flair.datasets import CoupleDataset from ..custom_data_loader import ColumnDataLoader from torch.optim.adam import Adam import torch.nn.functiona...
cb2617ad5ce0f4dc0bcbbd378810f893993b3997c444e219983b29df4ba2410a
Python
44,618
1,313
# Copyright (C) CVAT.ai Corporation # # SPDX-License-Identifier: MIT from __future__ import annotations import itertools import math from abc import ABCMeta from collections import Counter from copy import deepcopy from enum import StrEnum from functools import cached_property, lru_cache from io import StringIO from ...