sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
d2b21effc42aad4914a71336eeff2bf4173d5d93808820c2d1854ea44ad8e882
Python
91,552
2,530
import functools from collections import OrderedDict from collections import defaultdict from collections import deque from collections import namedtuple import numpy as np import pytest from absl.testing import parameterized from keras.src import backend from keras.src import ops from keras.src import testing from k...
0bbf75363370781fe6429ddc40d18dffa713bae812bfe1a709d3136afc22c5c6
Python
91,810
2,345
""" Generate white-light synthetic cluster frames for the completeness pipeline. Paths are configurable via environment variables (no hardcoded absolute paths): COMP_MAIN_DIR - main run directory (default: project root) COMP_FITS_PATH - LEGUS FITS images root COMP_PSF_PATH - PSF files directory COMP...
b82ef917a5c66aaa38f8919262c04cc3c08616289ca3ea726c9c8bdb94e948de
Python
91,872
2,883
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from __future__ import annotations import os import shutil import time import re _ANSI_RE = re.compile(r"\x1b\[[0-9;]*[mK]") from collections.abc import MutableSequence import numpy as np from vtkmodules.util.numpy_support import numpy_to_vtk, vtk_to_numpy from vtkmodule...
8235f72ec938a6be14e333f78c289f13f90f3022a59be06fd365ba3f8d3c1001
Python
91,904
1,361
import torch import torch.nn as nn import torch.nn.functional as F from torch_scatter import scatter, scatter_min, scatter_max, scatter_log_softmax, scatter_softmax from torch_cluster import radius_graph from tqdm import tqdm from copy import deepcopy from .build_rotamers import RotamerBuilder from .ligand_featurizati...
ad2ee8c90c687e4cab538984f6c5974bf439bca64d561eade24a0c09e731e73c
Python
91,949
1,994
"""PyTorch ResNet This started as a copy of https://github.com/pytorch/vision 'resnet.py' (BSD-3-Clause) with additional dropout and dynamic global avg/max pool. ResNeXt, SE-ResNeXt, SENet, and MXNet Gluon stem/downsample variants, tiered stems added by Ross Wightman Copyright 2019, Ross Wightman """ import math fro...
0e0a85567d76c75161d4eb78a25eaee40732223fa9b68aff9c27a9a4c46a9edc
Python
91,972
2,294
# cython: language_level=3 # cython: profile=True # cython: linetrace=True # Time-stamp: <2025-10-16 17:09:16 Tao Liu> """Compute MACS3 peak-calling scores and helper statistics. This code is free software; you can redistribute it and/or modify it under the terms of the BSD License (see the file LICENSE included with...
eb87d4f43a3a3641a99e8d95782f468db80049fb61f1942cb1e345738a7ad763
Python
92,075
1,909
#!/usr/bin/env python3 """ ANO Feature Optimization (FO) - ANO Framework Module 4 ====================================================== PURPOSE: Module 4 implements Feature Optimization (FO), the first ANO optimization strategy. It searches for the optimal combination of molecular descriptors to maximize prediction a...
678aed92b379514b8eb7cb97a36dc0fe7712bddfe6b349169649383f1210c826
Python
92,121
1,751
import numpy as np import time from copy import deepcopy from MEArecTemplate.tools import (select_templates, find_overlapping_templates, get_binary_cat, resample_templates, jitter_templates, pad_templates, get_templates_features, compute_modulation, annotate_overlappi...
c97fb7fcadc5a0c58e821a0f11dc0e32320598a2c3f722abe60452f4165faac4
Python
92,178
1,824
import torch import torch.utils.data from torch.cuda.amp import autocast import numpy as np import copy import os import time import tifffile import natsort import pathlib import gc import torch.multiprocessing as mp import platform import queue import csv import ailoc.common # from ailoc.common import local_tifffile ...
59a3e07305e298bdedba2bbc0186d4cb1129f57945aff70b7ddae58a68b93bb2
Python
92,430
2,653
"""Plotting functions for AnnData.""" from __future__ import annotations from collections import OrderedDict from collections.abc import Collection, Mapping, Sequence from itertools import pairwise, product from types import NoneType from typing import TYPE_CHECKING, NamedTuple, TypedDict, cast import numpy as np im...
417bffbbcbec75f979c272194f82044b5510c8439d3cea1643513956d14ca254
Python
92,447
2,350
"""Base controller to make clustering GUIs.""" # ------------------------------------------------------------------------------ # Imports # ------------------------------------------------------------------------------ import inspect import logging import os import shutil from functools import partial from pathlib i...
221a7bad745c8db20ac3c08e9bdc1278f57d0111976d217d8065c0327d90f8a5
Python
92,628
2,607
#------------------------------------------------------------------- # tarfile.py #------------------------------------------------------------------- # Copyright (C) 2002 Lars Gustaebel <lars@gustaebel.de> # All rights reserved. # # Permission is hereby granted, free of charge, to any person # obtaining a copy ...
31679f1221b255741f4139aef4f67f32b1ac751f945acf481343f1231bdea6a4
Python
92,922
2,020
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This experiment was created using PsychoPy3 Experiment Builder (v2022.2.5), on March 03, 2023, at 16:18 If you publish work using this script the most relevant publication is: Peirce J, Gray JR, Simpson S, MacAskill M, Höchenberger R, Sogo H, Kastman E, ...
1c4266bf78336fdd5824e72a8d82fd8804807cd75b0409d4f7324ee7fd506518
Python
92,968
1,913
import torch import torch.nn.functional as F import numpy as np from federated_learning.config.config import * from federated_learning.models.cnn import CNNMnist from federated_learning.models.resnet import ResNet50Alzheimer, ResNet18Alzheimer from federated_learning.models.vae import VAE, GradientVAE from federated_le...
c5f17c4ef00b9110bd5ccd6ac841b373e57b6c63641a4ec79f272e7d7e9ecd4e
Python
93,051
1,926
""" This module defines environment variables used in MLflow. MLflow's environment variables adhere to the following naming conventions: - Public variables: environment variable names begin with `MLFLOW_` - Internal-use variables: For variables used only internally, names start with `_MLFLOW_` """ import os import war...
f8eb8d996f8b26e7b98a1d82c30a780af22149acc380ea0e06229b13aa4b1cae
Python
93,140
2,450
"""Parse the dbSNP JSON files into VCF and a rsID map file """ from gwas_norm import ( __version__, __name__ as pkg_name, crossmap ) from gwas_norm.variants.common import SequenceError from gwas_norm.variants import norm from gwas_norm.map_file.dbsnp import clinvar from merge_sort import chunks, merge from ...
8e70b75da24a8ace606be15413dae1ff5373dee9d56ab69514ba5d69dba52eb8
Python
93,177
2,685
""" Python implementation of the io module. """ import os import abc import codecs import errno import stat import sys # Import _thread instead of threading to reduce startup cost from _thread import allocate_lock as Lock if sys.platform in {'win32', 'cygwin'}: from msvcrt import setmode as _setmode else: _set...
df994e409fb62a13513791381cea84bf362af034702ee176a5ba4f0a8cf54a60
Python
93,184
2,583
# -*- coding: utf-8 -*- from __future__ import annotations import os.path import time from typing import Any from typing_extensions import Self import numpy as np import vedo.vtkclasses as vtki # a wrapper for lazy imports import vedo from vedo import utils from vedo import addons from vedo.core.summary import forma...
8097c6a592fd993ee4958379dfbe3841113984039d6c6cbe5af8d67163201710
Python
93,186
2,525
"""Test the file readers in `merit.ipd.files` """ from itertools import zip_longest from typing import ( Union, List, Tuple ) from sortedcontainers import SortedList from merit.ipd.files import ReaderHandler try: from typing import Self except ImportError: from typing_extensions import Self from merit.i...
5de02add311cd6107b393d7b63696800ddec10e2e42fcfb2237433aca1b01eaa
Python
93,215
1,930
#!/usr/bin/env python3 """ ANO Model Optimization (MO) - ANO Framework Module 5 ==================================================== PURPOSE: Module 5 implements Model Optimization (MO), optimizing neural network architecture while keeping features fixed to fingerprints only (no descriptors). KEY FEATURES: 1. **Archi...
18219c71710c1ec19ee79b6f5c8ebe72f482e630c568d28c247c5a025a129e72
Python
93,412
2,692
""" Python implementation of the io module. """ import os import abc import codecs import errno import stat import sys # Import _thread instead of threading to reduce startup cost from _thread import allocate_lock as Lock if sys.platform in {'win32', 'cygwin'}: from msvcrt import setmode as _setmode else: _set...
bcc8d00ebadd684aba19169e853e6f23bc36d609ae0c8119912f1e39e9f0c1e9
Python
93,486
2,890
'''"Executable documentation" for the pickle module. Extensive comments about the pickle protocols and pickle-machine opcodes can be found here. Some functions meant for external use: genops(pickle) Generate all the opcodes in a pickle, as (opcode, arg, position) triples. dis(pickle, out=None, memo=None, indentl...
d7d7b66e5755369eb1834b85c2925748652a80f582c69cf60a5e49b6be0b6c5b
Python
93,533
2,114
import copy import io import os import tempfile from contextlib import contextmanager from pathlib import Path import re import sys import argparse import datetime import ntpath import yaml import torch import pooch import torch.distributed as dist from shutil import copyfile import numpy as np import importlib from ya...
19db592219997ea599caf4456198aa6f394d526af1e3ae36bb953dd6d576ef50
Python
93,593
1,927
# SPDX-License-Identifier: Apache-2.0 """ Classes to get, save and load (static or time dependent) connection matrices and sample submatrices from them authors: Michael Reimann, András Ecker last modified: 01.2022 """ import h5py import numpy as np import pandas as pd from scipy import sparse, stats from .circuit_mod...
fe8ac5bd58badf2373f6b4537d180e50b37b40103df471a93ea9ed897c6de26d
Python
93,929
2,568
#!/usr/bin/env python3 #------------------------------------------------------------------- # tarfile.py #------------------------------------------------------------------- # Copyright (C) 2002 Lars Gustaebel <lars@gustaebel.de> # All rights reserved. # # Permission is hereby granted, free of charge, to any pers...
7223043c2a03d11cb7303f7e3ff64acf62450424b1d735f73c8ec3c31478f323
Python
93,942
2,336
# -*- coding: utf-8 -*- """ ROI.py - Interactive graphics items for GraphicsView (ROI widgets) Copyright 2010 Luke Campagnola Distributed under MIT/X11 license. See license.txt for more infomation. Implements a series of graphics items which display movable/scalable/rotatable shapes for use as region-of-interest mar...
af64c759ddb2de4d9dccb0b98f2180c8d00507e079b9baa74a7ee5e1f8c16899
Python
94,031
2,368
"""Functions/classes that control the stages of the normalisation process. """ # NOTE: Docstrings OK # Standard Python packages # import pprint as pp import csv import gzip import os import shutil import tempfile import warnings # 3rd party packages import pysam # 3rd party packages from Bio import bgzf from tqdm im...
52f2db9734ab336fec531ccdc16e43658ec29136cf552087ed393bbd6103042b
Python
94,055
1,257
__author__ = "Simon Nilsson; sronilsson@gmail.com" import ctypes import math import os import platform from copy import copy, deepcopy from tkinter import * from typing import List, Optional, Union import cv2 import numpy as np import pandas as pd from PIL import Image, ImageTk from scipy.spatial.distance import cdis...
a65a1fb4301ae82de8b307a8d698f327a79b8fa66c8f053f4ddeff52c87020c4
Python
94,154
2,364
from __future__ import annotations import os ENV = {"TF_FORCE_UNIFIED_MEMORY":"1", "XLA_PYTHON_CLIENT_MEM_FRACTION":"4.0"} for k,v in ENV.items(): if k not in os.environ: os.environ[k] = v import warnings from Bio import BiopythonDeprecationWarning # what can possibly go wrong... warnings.simplefilter(action='ign...
15fe8ea5af6fcc5883c0d0d1ecf6d04a61bc4108ce9af34ace573060170e5e2f
Python
94,262
1,960
#!/usr/bin/env python3 """ ANO Network Optimization MOFO - ANO Framework Module 7 ====================================================== Developer: Lee, Seungjin (arer90) PURPOSE: Module 7 implements MOFO (Model Optimization -> Feature Optimization) strategy. It first optimizes the neural network architecture with al...
0393ced435ebd3c4cb5e46d75313a13a4a0f9a0e2a8273fd2c74a05591e01d23
Python
94,404
1,635
# Configuration file for the Sphinx documentation builder. # # For the full list of built-in configuration values, see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master...
519c9c9c18864430956eb296a923c3c5f2fdfd1894b0860834404d7008010218
Python
94,454
2,582
#!/usr/bin/env python3 #------------------------------------------------------------------- # tarfile.py #------------------------------------------------------------------- # Copyright (C) 2002 Lars Gustaebel <lars@gustaebel.de> # All rights reserved. # # Permission is hereby granted, free of charge, to any pers...
b95080c6c9b9b8dfe09869610057eef44de1300946eb0141bff3bc050902e515
Python
94,571
2,310
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Mar 16 10:27:44 2026 @author: kongxiangyu """ import sys import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import matplotlib.colors as mcolors from src.utils import load_as_pickle,save_as_pickle from analysis.e...
e869f1c2f976a2a8f861b3439ec73cb0a02217a4d531c2863aed27ecded8a2f1
Python
94,845
1,889
__author__ = "Simon Nilsson; sronilsson@gmail.com" import math import multiprocessing as mp import os import time from typing import Optional, Tuple, Union try: from typing import Literal except: from typing_extensions import Literal try: import cupy as cp from cupyx.scipy.ndimage import rotate excep...
b9f3ba717869883c0a21663608e35009ce66f61edbee34d2c47b26c7c20928e6
Python
95,138
2,143
""" Vision Transformer (ViT) in PyTorch A PyTorch implement of Vision Transformers as described in: 'An Image Is Worth 16 x 16 Words: Transformers for Image Recognition at Scale' - https://arxiv.org/abs/2010.11929 `How to train your ViT? Data, Augmentation, and Regularization in Vision Transformers` - https:...
844ae9583cc9fd6a7d47a47097a279f5cbd68a5476eca9fd9838ae3878ca4e09
Python
95,324
2,553
""" This script analyzes behavioral data from FED3 experiments, focusing on transitions between different states (e.g., left/right pokes) and learning performance. It includes functions to split data into blocks, calculate transition statistics, visualize learning trends, and assess learning scores. """ import os from ...
776a08c2bfe1a0e3585e0eaf192bc44cf4007c756dc40bb7a632c4890e3f1744
Python
95,659
1,956
import pathlib from pathlib import Path import copy import warnings from typing import List, Optional, Union, Tuple, Dict, Any, Callable, Iterable import numpy as np from tqdm.auto import tqdm import scipy.sparse import sparse from . import helpers, util """ Classes for importing data into the roicat package. Conv...
33d2ed1ec873c77ccbccd5732dc7580b0a61b023dbc412d9c7a8a49312734ec9
Python
95,807
1,912
import json import os import re import time import warnings import numpy as np from multiprocessing import Pool, cpu_count import math import matplotlib.pylab as plt import pandas as pd import pydicom as dicom import nibabel as nib import json import json5 from scipy.ndimage import zoom from pyviz_comms import extensio...
9706393a1f3e028c035b700d83fca63f831ab5b82ad4e7e28bd490bad55a2049
Python
95,936
793
#!/usr/bin/env python from numpy import * data_1=[array([3.523968,4.61725,5.009932,4.781034]), array([6.634649,8.511027]), array([5.299169,2.91673,4.618188,2.633355,2.685078]), array([3.531018,3.453191]), array([7.066488,6.28976,6.814411]), array([8.1,8.4,13.224225,5.757449,10.1,7.805418,10.1,5.795456,1.887426]), ar...
37dda01d260af6be84a22bf51070331f3b16eb0410b7d97b631dafc6a73f2360
Python
95,946
6,684
names_ = [ "AARON", "Aarón", "ABBIE", "ABBY", "ABDUL", "ABDULLAH", "ABE", "Abel", "ABIGAIL", "Abraham", "ABRAM", "ABU", "Abundio", "ACHILLES", "ACTON", "ADA", "ADAH", "ADALBERTO", "ADALINE", "ADAM", "Adamaris", "ADAN", "Adán", ...
adfc1a9d3a6d4f04b2704e3e3fe41ab0f9b377e5d56207afcadce3944cc106ef
Python
95,946
4,383
#!/usr/bin/env python # -*- coding: utf-8 -*- from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel # 3: Positive # 2: Likely # 1: Unlikely # 0: Negative TURKISH_LANG_MODEL = { 23: { # 'A' 23: 0, # 'A' 37: 0, # 'B' 47: 0, # 'C' 39: 0, # 'D' 29: 0, #...
ec1e1dcd5a6e670b004165f978baa787d5b24134799bca39ea0370e067801bcd
Python
95,992
793
#!/usr/bin/env python from numpy import * data_1=[array([2.657485,4.129912,4.380033,3.172819]), array([6.50294,10.991822]), array([5.113638,2.742798,4.502155,3.355231,2.992726]), array([3.467839,3.427282]), array([5.835269,6.721129,7.98197]), array([8.1,8.4,12.689526,5.787908,10.1,6.821768,10.1,5.728776,2.945997]), ...
055fb0c6e59ee4ae83090d4709797cce41353ce65f2fb774860e38aede6c2173
Python
96,011
2,334
import argparse import csv import json import os import re from pathlib import Path import airsim import numpy as np import time import math import dataclasses import torch from dataclasses import dataclass, field from typing import List, Tuple, Optional, Dict # Public release: do not assume a user-specific AirSim se...
62ab0fff1908dee507a82f34909ad84c371a294182f611673c89aedb0fbe3f02
Python
96,015
2,521
# Author: Steven J. Bethard <steven.bethard@gmail.com>. # New maintainer as of 29 August 2019: Raymond Hettinger <raymond.hettinger@gmail.com> """Command-line parsing library This module is an optparse-inspired command-line parsing library that: - handles both optional and positional arguments - produces hi...
dd8317e3772e6b548452a4903bf8d566334b18bb7c85796870483f7d2bb1837a
Python
96,031
2,600
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Oct 22 17:32:43 2025 @author: ekoderman """ from sklearn.base import BaseEstimator, ClassifierMixin from xgbordinal import XGBOrdinal import numpy as np from collections import Counter from sklearn.metrics import recall_score # --- Wrapper to make XGBO...
19e519c44f1b59a26d6a93088b030300d1f57e7d30e0680f9fd2ddf6935b70cc
Python
96,299
2,467
#!/usr/bin/env python3 """Full reproduction pipeline for the PsiAudit paper. Runs the complete experimental battery used in the manuscript: the two-regime audit, the scaling study, the comparative diagnostics, the multi-seed replication with confidence intervals, the sensitivity sweep and H_G-gate ablation, the ...
4d97e89db7161dd1aec6e59a083d0cae5dc81d50e26871e4396ce35f7f3c48de
Python
96,341
2,636
""" Program for presenting visual stimuli to retinal neurons for eletrophysiology experiments. """ # Copyright (C) 2018 Alexander Tomlinson # Distributed under the terms of the GNU General Public License (GPL). import copy import os import pickle import subprocess import sys import traceback from math import ceil fro...
a43629fb2580a822e1c61cbdf02eeb6a756d9eebfd62f5c5d292f2b208652b43
Python
96,820
2,192
from pathlib import Path import warnings import copy from typing import Dict, Any, Optional, Union, List, Tuple, Callable, Iterable, Iterator, Type import datetime import collections import importlib import numpy as np import scipy.sparse from tqdm.auto import tqdm import torch import richfile as rf from . import he...
94cd6a672a8d747cbba0675d6a26b1ac40247407eec3d8ab5ce8785634fc4ee7
Python
97,273
2,534
""" Tests for the data_tools module """ from merit.example_data import dummy_summary_data as dsd from merit.gwas import dataset, utils as data_tools from merit import errors as merit_errors, constants as con from itertools import permutations import pandas as pd import numpy as np import pytest import decimal import r...
6fe3ad9b91e1060d9615fab1207a92397c1b01b4a7d19807a2a98e29dbf08a2e
Python
97,278
2,219
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import math import random from os import path as osp import magnum as mn import numpy as np import pytest import...
6828112d06266b9c172e13f98a3fd06678d5712e6647408719eea175f565c9e9
Python
97,535
2,923
#!/usr/bin/python # Handle unicode encoding import csv import errno import getpass import itertools import locale import os import platform import threading import time import shlex import socket import sys import tempfile import urllib2 from optparse import OptionParser, OptionGroup, SUPPRESS_HELP from re import co...
4343f1070b8c3d908a7eaa813d133f87a761a578a4acbf878e7c54192402f109
Python
97,657
2,017
#!/usr/bin/env python3 """ ANO Network Optimization FOMO - ANO Framework Module 6 ====================================================== Developer: Lee, Seungjin (arer90) PURPOSE: Module 6 implements FOMO (Feature Optimization -> Model Optimization) strategy. It uses the best features from Module 4, then optimizes th...
0e82574a85809fa1b7e0ce7e05230ff0a95ce196713cfbed47ab79bccb37ab0f
Python
97,714
2,575
# Author: Steven J. Bethard <steven.bethard@gmail.com>. # New maintainer as of 29 August 2019: Raymond Hettinger <raymond.hettinger@gmail.com> """Command-line parsing library This module is an optparse-inspired command-line parsing library that: - handles both optional and positional arguments - produces hi...
1118f2ada746c68493f6c5482b226fb4dccee0b7b315fc8226a9d10dd7476882
Python
97,832
2,578
import re import warnings import numpy as np import pytest from keras.src import backend from keras.src import testing from keras.src.losses import losses class MeanSquaredErrorTest(testing.TestCase): def test_config(self): self.run_class_serialization_test(losses.MeanSquaredError(name="mymse")) de...
7c04bfea19039dc1fa9e632ad0556e8e3ef59ef67845daf295968f2b78c2afdf
Python
97,901
2,649
# cython: language_level=3 # cython: profile=True # Time-stamp: <2024-10-15 16:18:23 Tao Liu> """Module for BedGraph data class. This code is free software; you can redistribute it and/or modify it under the terms of the BSD License (see the file LICENSE included with the distribution). """ # -----------------------...
429ea1bea3800bd0726e640df89e5fcbfcbcfe9b6bf9baf3ae082a9bafee72eb
Python
97,918
2,398
""" This module contains a collection of fundamental building blocks for convolutional neural networks, primarily designed for biomedical image segmentation architectures like U-Nets and their variants. It provides modular components for various operations, including: - **Convolutional Layers:** Basic `ConvBlock` and...
ccc970473b7386d7533cf70ed8b21d88b2dd4e61ffeeeae6156935aaec2d3442
Python
98,108
2,335
from __future__ import with_statement import os, time, threading, pickle, shutil from collections import Counter import java from java.util import ArrayList, HashSet, Stack from java.util.concurrent.atomic import AtomicInteger from java.awt import Polygon, Rectangle, Color, Point from java.awt.geom import Area, Affine...
1af4eb4cd228633afee65e1c2050293fdb31ba7505aa16f3a7383e17e1d1096d
Python
98,236
2,235
# -*- coding: utf-8 -*- ''' Document Module ''' from __future__ import division from collections import OrderedDict from time import time from uuid import uuid4 import numpy as np import pkg_resources from dipy.utils.optpkg import optional_package from .fitted_modeling_framework import ( FittedMultiCompartmentMo...
bf19ddc20ecbafa707d11f5db8694066ae1e401a29a1d8787a838e503378d6de
Python
98,310
2,873
# mock.py # Test tools for mocking and patching. # Maintained by Michael Foord # Backport for other versions of Python available from # https://pypi.org/project/mock __all__ = ( 'Mock', 'MagicMock', 'patch', 'sentinel', 'DEFAULT', 'ANY', 'call', 'create_autospec', 'AsyncMock', '...
a8e2b93f226e8d0ad91adc143be24ebd401574f7709b6542dfe1e310983dcb77
Python
98,699
2,861
""" GUI for pyStim """ # Copyright (C) 2018 Alexander Tomlinson # Distributed under the terms of the GNU General Public License (GPL). # must first turn pyglet shadow windows off to avoid conflict between wxPython # and psychopy.visual on OSX from sys import platform if platform == 'darwin': import pyglet py...
0f33cfe933c61bff8f57bb6ab29bbf77c76eb9eaa6eee37ee5e434687530d468
Python
98,776
4,383
#!/usr/bin/env python # -*- coding: utf-8 -*- from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel # 3: Positive # 2: Likely # 1: Unlikely # 0: Negative HEBREW_LANG_MODEL = { 50: { # 'a' 50: 0, # 'a' 60: 1, # 'c' 61: 1, # 'd' 42: 1, # 'e' 53: 1, # ...
9ed532db71da3c3604d4e434e1289c8a2512e03ef696a6bcf6ff06b24bfb79f7
Python
98,934
2,173
""" QSAR AD Visualization Module - FIXED PATH VERSION This module contains visualization functions for Applicability Domain analysis. Fixed version with consistent path structure. """ # Import performance analyzer with error handling try: from .ad_performance_analysis import ADPerformanceAnalyzer AD_PERFORMAN...
dd915b7b0533f8dde19352584ee1ee04d91620cd824cf147a8852f5ec5ae6429
Python
98,939
3,107
"""Shared argparse helpers for pipeline command-line wrappers.""" from __future__ import annotations import argparse import hashlib import json import os import re import secrets import stat from collections.abc import Callable, Mapping from dataclasses import dataclass from functools import partial from importlib.re...
8846048f2ae98d7341bcfc4e81658543ba9291d469dd7ab981bcfce2b4b5a148
Python
99,132
2,891
# mock.py # Test tools for mocking and patching. # Maintained by Michael Foord # Backport for other versions of Python available from # https://pypi.org/project/mock __all__ = ( 'Mock', 'MagicMock', 'patch', 'sentinel', 'DEFAULT', 'ANY', 'call', 'create_autospec', 'AsyncMock', '...
f25758672154147b546421d5305b63d60b851d6bdc0c147a15627c6a3d47c9dc
Python
99,341
2,383
from __future__ import annotations import configparser import copy import logging import os import pathlib import sys import uuid import warnings import webbrowser from abc import ABC, abstractmethod from collections import OrderedDict from typing import ( TYPE_CHECKING, Any, Callable, Dict, List, ...
4beb8d4358a10bbe72841bd2bb1db880b159bf743272d3300ba3b12c9757f9bc
Python
99,571
4,398
#!/usr/bin/env python # -*- coding: utf-8 -*- from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel # 3: Positive # 2: Likely # 1: Unlikely # 0: Negative GREEK_LANG_MODEL = { 60: { # 'e' 60: 2, # 'e' 55: 1, # 'o' 58: 2, # 't' 36: 1, # '·' 61: 0, # '...
df63ee69f20c3842ac1f6a7c868dfff2e1b6142afe57681b2bf1f4324a646c60
Python
100,047
2,522
import math import warnings import numpy as np from typing import Literal, Optional from math import ceil from .base import minimum_spike_dtype from .basesorting import SpikeVectorSortingSegment from .numpyextractors import NumpySorting from probeinterface import Probe, generate_linear_probe, generate_multi_columns_p...
85cf6589b65a1e60a3bd1eacf9e3fe2d8fbd7822e79cf758aa79cc13c39caa07
Python
100,071
2,523
""" Collate narrative simulation figures into a single combined plot. Regenerates all plots from underlying data for visual consistency. Layout: - a) PCA plot (left, square) - Right of PCA, two rows: - Row 1: b) Bergman/Roediger data, c) Cosine distances to topic centroid - Row 2: d) Frac new words by temp, e) Fra...
17853f43f755792383eb0bdc8ca593b944008530d5af56ebbeee94f040324346
Python
100,076
1,819
import warnings import torch import numpy as np import time import collections import matplotlib.pyplot as plt import datetime import random from tqdm import tqdm import copy import collections import scipy import os import ailoc.common import ailoc.simulation import ailoc.lunar class Lunar_LocLearning(ailoc.common....
4f8ad3cb6f16657f623ae5e8e15f7341eab1ee3adfdbb80fffc3eccd56756a0f
Python
100,296
2,931
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """SPM wrappers for preprocessing data """ import os from copy import deepcopy # Third-party imports import numpy as np # Local imports from ...utils.filemanip import ( fname_p...
4a15379412d24369ef641526fbccb3636326b6500a9e5c254cdbf0e096c15139
Python
100,582
2,577
""" helper classes and functions """ from merit.ensembl import ensembl_errors, constants, coords from itertools import combinations import sys import pprint as pp # The codes for unknown indels UNKNOWN_INDEL_REF = 'R' UNKNOWN_INDEL_INSERTION = 'I' UNKNOWN_INDEL_DELETION = 'D' UNKNOWN_INDEL_ALTS = [UNKNOWN_INDEL_INSERT...
8d1a5f86334c468df202969a87df233dc25c1449f8696f24a986e922b2cfdefd
Python
101,280
2,774
"""An extensible library for opening URLs using a variety of protocols The simplest way to use this module is to call the urlopen function, which accepts a string containing a URL or a Request object (described below). It opens the URL and returns the results as file-like object; the returned object has some extra me...
e6f0837a5348a2f9ccb3f4f1d11a09e6a08518e993d79dcb37dbe48bef8cc1a7
Python
101,351
2,042
""" Optic Lobe Cross-Dataset Matching: Iterative Connectivity Alignment Assigns FAFB cell_type labels to BANC optic lobe neurons by iteratively comparing type-level connectivity profiles between the two datasets. Algorithm: 1. FAFB types are ground truth (fixed centroids) 2. BANC neurons initialized from SeaTable...
544197bfc14ea6e186e08d7c98a3dae011401d52f1b02896df6724e11ed1637e
Python
101,585
2,782
"""An extensible library for opening URLs using a variety of protocols The simplest way to use this module is to call the urlopen function, which accepts a string containing a URL or a Request object (described below). It opens the URL and returns the results as file-like object; the returned object has some extra me...
ee917db29ebaf985ad80c7924d29fee26459dba0dd9c644432fa94d3cbf7488c
Python
102,119
2,364
""" The EfficientNet Family in PyTorch An implementation of EfficienNet that covers variety of related models with efficient architectures: * EfficientNet-V2 - `EfficientNetV2: Smaller Models and Faster Training` - https://arxiv.org/abs/2104.00298 * EfficientNet (B0-B8, L2 + Tensorflow pretrained AutoAug/RandAug/A...
46d247ec365db26687ab22b8e8a9269e4e70407889c093cf252aaa225a5e6517
Python
102,498
4,650
#!/usr/bin/env python # -*- coding: utf-8 -*- from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel # 3: Positive # 2: Likely # 1: Unlikely # 0: Negative HUNGARIAN_LANG_MODEL = { 28: { # 'A' 28: 0, # 'A' 40: 1, # 'B' 54: 1, # 'C' 45: 2, # 'D' 32: 1, ...
5d207863134360b010a90e78d03a5bb0ad76b69bdbb94bb5385873cbd90cc35f
Python
103,185
2,497
################################### File paths need to be adjusted for each utiliy plot in case used ######################################################################## # %% ###################################### Change in Baseline (Delta Na_i) ####################################################################...
6a187a2bc2329cbc31a6efe5763f554b57286741f153036887e617737d9c7bb0
Python
103,225
3,023
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """SPM wrappers for preprocessing data""" import os from copy import deepcopy # Third-party imports import numpy as np # Local imports from ...utils.filemanip import ( fname_presuffix, ensure_lis...
475c171e750cb5e8e9c342671ff24ef177586ac304eb08d5aa9d733fb4ca2e08
Python
103,312
4,383
#!/usr/bin/env python # -*- coding: utf-8 -*- from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel # 3: Positive # 2: Likely # 1: Unlikely # 0: Negative THAI_LANG_MODEL = { 5: { # 'ก' 5: 2, # 'ก' 30: 2, # 'ข' 24: 2, # 'ค' 8: 2, # 'ง' 26: 2, # 'จ' ...
96a7b322fca3eb480934278c74050f91006546d8e49eaac0dd6030215f8442c1
Python
103,361
2,265
import torch import torch.nn.functional as F import os import sqlite3 import numpy as np from copy import deepcopy from typing import Optional, Dict, List, Any, Union from huggingface_hub import HfApi from transformers import Trainer, TrainingArguments, EarlyStoppingCallback, EvalPrediction, TrainerCallback from datacl...
8cd13bea52d7a33fadd2ec22588e10360ea959bd53b3436e90f8f22dbc173c95
Python
103,478
2,866
import numbers import warnings import numpy as np from keras.src import backend from keras.src import ops from keras.src import tree from keras.src.api_export import keras_export from keras.src.backend.common.backend_utils import canonicalize_axis from keras.src.losses.loss import Loss from keras.src.losses.loss impo...
65d7fb70f3815d6bd4ae2de5eacf839a96417a026b9d6ea3950b21188170a97d
Python
103,633
1,073
import google.protobuf from packaging.version import Version if Version(google.protobuf.__version__).major >= 5: # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: model_registry.proto # Protobuf Python Version: 5.26.0 """Generated protocol buffer code.""" from goo...
16fff52a081d3814fe40d2b76c4f118f0947b49b602583d9f992618df1842ae2
Python
103,702
2,472
# Copyright 2024 ByteDance and/or its affiliates. # # 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 ...
d14e6782e6fabcab617cb42c36e55effdc6a4256004c613bbefa1de618651861
Python
103,824
1,207
__author__ = "Simon Nilsson; sronilsson@gmail.com" from simba.utils.printing import (SimbaTimer, stdout_information, stdout_success, stdout_warning) load_timer = SimbaTimer(start=True) import os.path import warnings warnings.filterwarnings("ignore", category=FutureWarning) warnings....
d191d99b4578b9346d3043e8752d2090c771b6ab4a19814a834faabf44e93a07
Python
103,985
2,986
from unittest import mock import jax import numpy as np import pytest from absl.testing import parameterized import keras from keras.src import backend from keras.src import initializers from keras.src import layers from keras.src import losses from keras.src import metrics from keras.src import models from keras.src...
fbffe0a47c12720af3a87aa4231cec4eff0aa04a55259c776b2dcabc9cd51a80
Python
104,543
2,793
# Module doctest. # Released to the public domain 16-Jan-2001, by Tim Peters (tim@python.org). # Major enhancements and refactoring by: # Jim Fulton # Edward Loper # Provided as-is; use at your own risk; no warranty; no promises; enjoy! r"""Module doctest -- a framework for running examples in docstrings. In...
bbcd360aac71512cfc7b346cf754f50ae67e48fda3266e0cc1d6e4df79a0506b
Python
104,546
2,793
# Module doctest. # Released to the public domain 16-Jan-2001, by Tim Peters (tim@python.org). # Major enhancements and refactoring by: # Jim Fulton # Edward Loper # Provided as-is; use at your own risk; no warranty; no promises; enjoy! r"""Module doctest -- a framework for running examples in docstrings. In...
e6893c103168a8fcc1f304a2240889090d842c6f51de877197a4354c8b7c13aa
Python
105,305
1,808
#!/usr/bin/env python3 import sys import os import os.path as osp sys.path.append(os.getcwd()) import string import functools import socket import getpass import argparse import collections import json import random import math import itertools from collections import OrderedDict import copy from types import SimpleNam...
229957b599770139141d891dc559abc41904399d0a21e93a61e6bfa39c274716
Python
105,369
2,624
from merit import constants as con, errors from merit.utils import analysis_tools from merit.gwas import utils from merit.ipd import ipd_tools from merit.wrappers import qctool from tqdm import tqdm from pybgen import PyBGEN import pandas as pd import numpy as np import numpy.ma as ma import math import warnings import...
f393647f30af3bc58d4d75e8d3d179a0cdef4edbfcfd440efa3603a61d937161
Python
105,420
1,064
import google.protobuf from packaging.version import Version if Version(google.protobuf.__version__).major >= 5: # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: databricks_tracing.proto # Protobuf Python Version: 5.26.0 """Generated protocol buffer code.""" from...
ae4f42269bb13b46ce6dba0972fea03605aea2c61999df2a10476ce72ec34bf6
Python
105,697
4,650
#!/usr/bin/env python # -*- coding: utf-8 -*- from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel # 3: Positive # 2: Likely # 1: Unlikely # 0: Negative BULGARIAN_LANG_MODEL = { 63: { # 'e' 63: 1, # 'e' 45: 0, # '\xad' 31: 0, # 'А' 32: 0, # 'Б' 35: ...
62aed4388e4de27cd5220bb5f5e02197cb92b32d0d40ffab85bec1154b1ef949
Python
105,916
2,514
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # NOTE: This example requires the GUI viewer, which is built by default. # If you built in headless mode (HABITAT_...
1c8003eec5555a866b5dae29d96f9610f027912a339bfd1bf9055e0c532fb928
Python
105,948
3,444
# Copyright 2017 Google LLC. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # #...
d90226d6351f85e74a5f6062686c53723304b71743f3148046697d4c647384a5
Python
106,508
2,698
""" Drift estimation via image registration. Supports phase correlation and ECC (Enhanced Correlation Coefficient). Key fixes included: - Pass 1 stores *absolute* (reference->frame) drift WITHOUT per-frame clamping. - Pass 2 estimates *residual* after Pass 1 pre-alignment, then adds it to Pass 1 deltas. - Optional pe...
a3fee6c76b5de2ab675364e66df9b96ebd8b462a6ab7d9099e7459029940da1f
Python
106,569
2,744
#!/usr/bin/env python3 """Generate Python documentation in HTML or text for interactive use. At the Python interactive prompt, calling help(thing) on a Python object documents the object, and calling help() starts up an interactive help session. Or, at the shell command line outside of Python: Run "pydoc <name>" to ...
4ffee5fc84407dc8f76b35b53fdc81577a37368858382d39399fdb5d2b76ab0c
Python
106,672
2,566
""" Python implementation of the coloc R package. See the original R code here (06-04-2021 last update): `Here <https://github.com/chr1swallace/coloc/blob/main/R/split.R>`__. Relevant documentation: `Here <https://chr1swallace.github.io/coloc/articles/a02_data.html>`__. And relevant papers: `Here <https:...
bf3d7d4d8ce40faab3a0798df354a493c677d9d308df97fb6f3f9c58987ce85f
Python
106,714
2,768
from tabulate import tabulate import pandas as pd import numpy as np from timeit import default_timer as dt from copy import deepcopy import functools from typing import List, Tuple, Optional, Dict, Any, Callable, Union from skimage.measure import regionprops_table, _regionprops_utils from skimage import measure from s...
f32f8b681ce9ea2b9c13ab04f084d097eae7c7dcad3dff2322c49f1703809c02
Python
106,959
3,003
"""Header value parser implementing various email-related RFC parsing rules. The parsing methods defined in this module implement various email related parsing rules. Principal among them is RFC 5322, which is the followon to RFC 2822 and primarily a clarification of the former. It also implements RFC 2047 encoded w...
e05bd476b3a0d242c2d8bd508125860ca625f460f968fc73254fa3ff96a319d4
Python
106,991
2,884
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from __future__ import annotations from collections.abc import MutableSequence from typing import Any from typing_extensions import Self import numpy as np import vedo.vtkclasses as vtki # a wrapper for lazy imports import vedo from vedo.core import input as input_util...
309deae66f37bbf6abdeb8e85b9ad2bc3b5045ff94d07822d7533a7b1e9aa7df
Python
107,642
2,580
"""Filesystem tests for installing the bundled agent skills into a project. The install command writes into a directory that belongs to the user rather than to this package, which makes most of what it does a promise about what it will *not* touch: a second run must not rewrite an unchanged copy, an edited copy must s...