sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
18ce0230c3e7b8c2f30396c91c541c349f42aeebb49e811fcd4756064f49557f
Python
62,409
1,450
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <codecell> import os import cmath import math import sys import numpy as np import glob import subprocess import re from matplotlib_venn import venn2 import pandas as pd from collections import defaultdict from operator import itemgetter import matplotlib as mpl i...
6a8f2a328dac0d6c121c6f70c7387666b3f64d7f71cf2615ab25f1f05e4d3783
Python
62,912
1,835
# Import Libraries import numpy as np import pandas as pd import matplotlib.pylab as plt from IPython.core.display import display, HTML display(HTML("<style>.container { width:100% !important; }</style>")) #load and merge list of patietns from (1) HIS (2) Patients medical records df2= pd.read_excel("C:\DOCUMEN...
f27fa726426572bee2757c984c458736e9ba9b11da20161431c5587485b59f12
Python
63,151
1,408
#!/usr/bin/env python # Copyright (c) 2026 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """Allows controlling a vehicle with a keyboard.""" """ Welcome to CARLA man...
9ea0cce9d1c5bf445d0a26fcc824d8d8496a009f05e6fad10c69be36182df4ca
Python
63,195
1,622
# Author: Christian Brodbeck <christianbrodbeck@nyu.edu> from enum import Enum from functools import partial from itertools import product from numbers import Number from typing import Sequence from warnings import warn import mne from nibabel.freesurfer import read_annot import numpy as np from .._data_obj import ND...
49e1ec8ee8472849aae2371216f51d316803decad30d876523ae1496710b1e8c
Python
63,998
1,230
""" PRIDICT pegRNA prediction script including calculation of features. Additionally, nicking guides (including DeepSpCas9 score from Kim et al. 2019) and primers for NGS amplicon (based on Primer3 from Untergasser et al. 2012) are designed in separate output file. """ ### set parameters first ### #us...
50b6335085acd75ac869dfb7c46916f127e6300e613b9d5624c490fcbd9aa025
Python
64,690
1,248
'''Tensorflow backend for the slideflow.model submodule.''' from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import json import warnings import shutil import types import inspect warnings.filterwarnings('ignore') import numpy as np import tensorf...
a4d608780f2a017413f26bb14f7d53d6891a2450510fdbcaa3387f40c96ded9a
Python
64,764
2,111
"""The core functionality for supporting Hero search space. 1. Parse a program from string. 2. Execute a program in a given namespace, including both concrete and abstract execution. 3. Mutate a program. 4. Turn a program to string for visualization and serialization. The main classes are: 1. Program: the main co...
8990acded240487fb6920cf1f87382b30d1ab5e856a44ba23c98ef6fab79574e
Python
64,882
1,675
import inspect import mmcv import numpy as np from numpy import random from .my_transform import Rotate1 from mmdet.core import PolygonMasks from mmdet.core.evaluation.bbox_overlaps import bbox_overlaps from ..builder import PIPELINES try: from imagecorruptions import corrupt except ImportError: corrupt = No...
4f32233b16f0fb7f315c3f7280d77470dd89759d15db39c865e735ddb9856f77
Python
65,758
1,365
""" Copyright 2020 - by Jerome Tubiana (jertubiana@gmail.com) All rights reserved Permission is granted for anyone to copy, use, or modify this software for any uncommercial purposes, provided this copyright notice is retained, and note is made of any changes that have been made. This softwar...
0ced9d18c33373a0d86b24e5b8d4e9b1cc985c22d53ef35ac1c77417808b8558
Python
65,831
1,919
""" A module containing the models to be trained on gene expression data """ import copy import itertools import pickle import sys from abc import ABC, abstractmethod from collections import OrderedDict from typing import Union, Iterable, Tuple, Any import neptune.new as neptune import numpy as np import sklearn.line...
16df97c299334f384c83bf1642afd372c2974ce4c6264f5aafd34c4710515d86
Python
65,861
1,527
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <codecell> import os import cmath import math import sys import numpy as np import glob import subprocess import re from matplotlib_venn import venn2 import pandas as pd from collections import defaultdict from operator import itemgetter import matplotlib as mpl i...
c2fbb12441303fbc81480cb6c5f8fba326fc1edac30f255fd6d6189bc0be83c6
Python
65,904
1,528
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <codecell> import os import cmath import math import sys import numpy as np import glob import subprocess import re from matplotlib_venn import venn2 import pandas as pd from collections import defaultdict from operator import itemgetter import matplotlib as mpl i...
ef1721933409d1da1a9aebce287aa3916ffab23d3efa3f6f22f062aaf96823a6
Python
65,909
1,527
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <codecell> import os import cmath import math import sys import numpy as np import glob import subprocess import re from matplotlib_venn import venn2 import pandas as pd from collections import defaultdict from operator import itemgetter import matplotlib as mpl i...
11935cea72f7d51aae6b69d243aa363a8d0f827111e379239880a7bee9f47430
Python
66,001
1,768
"""Source reconstruction.""" from __future__ import annotations import os import numpy as np import nibabel as nib import matplotlib.pyplot as plt import mne from mne.beamformer._compute_beamformer import ( Beamformer, _proj_whiten_data, _reduce_leadfield_rank, ) from mne.beamformer._lcmv import _apply_...
8c957e201f3c004818f9a9fc205a51d7a100673b73f4904cbc1905b29d3bf07a
Python
66,001
1,182
# module for processing adjacency matrices in various ways import pandas as pd import numpy as np import csv import matplotlib.pyplot as plt import seaborn as sns import pymaid from tqdm import tqdm from joblib import Parallel, delayed class Adjacency_matrix(): def __init__(self, adj, input_counts, mat_type, pai...
10e17baff05e3b72515cf8cb3120aadf2219c45989d04e18cf9562958d7c9f84
Python
66,046
1,468
#!/usr/bin/env python # Copyright (c) 2026 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """Allows controlling a vehicle with a keyboard, focused on fisheye cameras."...
73870207ed2cecb8d0a381df2292f84338eef9a27aa7bc1baf8a5ae82cfb20e1
Python
66,119
1,535
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <codecell> import os import cmath import math import sys import numpy as np import glob import subprocess import re from matplotlib_venn import venn2 import pandas as pd from collections import defaultdict from operator import itemgetter import matplotlib as mpl i...
c15ec66a2a13434ed09d4067e5b954280b6802280c49c60f09762e6ecbb07df4
Python
66,140
1,183
# module for processing adjacency matrices in various ways import pandas as pd import numpy as np import csv import matplotlib.pyplot as plt import seaborn as sns import pymaid from tqdm import tqdm from joblib import Parallel, delayed class Adjacency_matrix(): def __init__(self, adj, input_counts, mat_type, pai...
a3c4a4a12ff24f6696061cf7f63ab9f6723fe2157176f0e80d0a1e84302946b4
Python
66,250
1,452
#!/usr/bin/env python # Copyright (c) 2026 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """Allows controlling a vehicle with a keyboard.""" HELP_TEXT = """ Use ARRO...
c0361385f4c16fdc63c871f094361422f158ca0b5964d90604bfe3ef5508e289
Python
66,434
1,716
import os, sys, time, re import numpy as np import scipy as sp import matplotlib.pyplot as plt import random as rnd import numpy.random as npr from numpy.random import rand,randn,randint,choice from scipy.integrate import solve_ivp, odeint verbose=0 mplotlibcolors=['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd'...
4a9509d0ba47b0b1ca3586dc0fd20ccf70f2b48d3d93148ae8e9a72f0deaa381
Python
66,534
1,667
# Copyright 2020 Google Research. All Rights Reserved. # # 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...
a413cb08f9362b562427341cce8928ebea459c81e35444bfa4a5e6349eba101a
Python
66,573
1,622
import logging import time import typing from abc import ABC from collections import defaultdict from concurrent.futures import ThreadPoolExecutor from dataclasses import dataclass from typing import Any, Dict, Iterable, Iterator, List, Optional, Tuple, Union from urllib.error import HTTPError, URLError import kgcl_rd...
00ddc6c1952c5745620a371897ce7b4ddae8011482bdaf5c736f5f60cd2ab5bd
Python
66,806
1,822
from dipy.align import resample from dipy.segment.clustering import QuickBundles from dipy.segment.metric import AveragePointwiseEuclideanMetric from dipy.segment.featurespeed import ResampleFeature from dipy.io.streamline import ( load_tractogram, save_tractogram, StatefulTractogram, Space) from dipy.data.fetcher ...
3b3e8004d766378f2804baa71186737ce7a03cdc23280637a2e74b490949c9a2
Python
66,863
1,842
""" This file contains dataset objects for manipulating gene expression data """ import random from abc import ABC, abstractmethod from pathlib import Path from typing import Sequence, Tuple, List, Union, Set, Dict import numpy as np import pandas as pd import yaml from sklearn import preprocessing import utils def...
0f3069240cef5e31107d4eb6f7b0c0bdcc58473f2c611b040613326e91f7ecf6
Python
67,478
1,817
# -*- coding: utf-8 -*- """ A collections of helper functions to work with dataset. Load benchmark dataset, save and restore model, save and load variables. TensorFlow provides ``.ckpt`` file format to save and restore the models, while we suggest to use standard python file format ``.npz`` to save models for the sake...
09022f4041536c068a7b08eb3eefcece40e5a015707a8f2dadd78446f957915c
Python
67,513
1,770
# This script is part of navis (http://www.github.com/schlegelp/navis). # Copyright (C) 2018 Philipp Schlegel # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of...
a80d839d11d7140c8be1be581306e24a3526ea00213c9d2f9b3865fae3b4a235
Python
67,581
1,525
# ----- IMPORTS and STUFFS ------------------------------------------------------- from re import sub from sklearn.metrics import * import firebase_admin from firebase_admin import credentials, auth, firestore, storage import pandas as pd import os import datetime import math from math import * import urllib.request im...
a322e597bfac68ac06f37c04ee7fa3071b4079f500f1b20be2a8f636b503da87
Python
68,263
1,139
import torch import warnings from abc import ABC from typing import Iterator from collections import deque from torch.utils.data.dataset import T_co from datasources.datasource import Datasource from torch.utils.data import Dataset, IterableDataset from datasources.preprocessing_lib import * from lab.training_tools imp...
17a5a1854a825aa7b4fb7f75009f88ea4e7f40df7b1abfd0b6d1ab5604cb94ea
Python
68,265
1,601
# load seg map, make sure they're aligned with heatmap. Remove neg value in heatmap for fair comparison. import nibabel import os import logging import glob import numpy as np import pickle from argparse import ArgumentParser import matplotlib.pyplot as plt import matplotlib as mpl from mpl_toolkits.axes_grid1 import...
75e51aafc865d111896f75bad141b685564f2ab41cf8408744069f58e49a1eab
Python
68,478
1,541
# ----- IMPORTS and STUFFS ------------------------------------------------------- from re import sub from sklearn.metrics import * import firebase_admin from firebase_admin import credentials, auth, firestore, storage import pandas as pd import os import datetime import math from math import * import urllib.request im...
0bdf72954d957996cb51a19608204fb3a0b14ab517ab177372baec52cc9ad5c4
Python
68,676
1,315
"""NuRec scenes as Cosmos clips: a real place, a real rig, a real drive. A NuRec artifact (``<uuid>.usdz``) is a Gaussian-splat reconstruction of twenty seconds of real driving. Everything this module needs is *inside* that zip: ============================ ==========================================================...
1c8ef89d5fe2d4536aeb7a54ab694992f1a2cd9f651117f5016327e220f1df15
Python
68,752
1,886
# Version: 0.18 """The Versioneer - like a rocketeer, but for versions. The Versioneer ============== * like a rocketeer, but for versions! * https://github.com/warner/python-versioneer * Brian Warner * License: Public Domain * Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, 3.5, 3.6, and pypy * [![Latest Version] (...
ca5c1a5f5324f1b78bc9ddeecbe009bdefa3a0e73c11802d9a873a90962f12e6
Python
69,001
1,599
#### Analysis on experiments """ This file performs downstream analysis on the output of the siVAE/VAE. 0. Basic analysis on the siVAE results/ Input dataset 1. siVAE loadings comparison a. 2. Gene embeddings a. Geneset analysis: create scatterplot of embeddings annotated with genesets b. Iden...
4283d1ee3386d3b165bdcd3d102ef3ff586b929b864362f46a824a8042f94670
Python
69,128
1,937
# -*- coding: utf-8 -*- """ Created on Tue Jul 30 12:56:47 2019 @author: rjovelin """ # import modules import os import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt from matplotlib.patches import Patch from matplotlib.lines import Line2D from mpl_toolkits.axes_grid1 import make_axes_locatable impo...
4513b140960d2c188e2b3e905148526fc8d91dd1ea5658796efc14286f940598
Python
69,179
1,322
#!/usr/bin/env python import pandas as pd import datetime from scipy import sparse import scipy.io from scipy.stats import zscore, wilcoxon, spearmanr from sklearn.preprocessing import binarize, normalize from sklearn import metrics from itertools import cycle import os import pickle import seaborn as sns import subp...
7243147641eb4d38bf1bf0476cae660b2e162822ea488ee1d1b10dc80e45ce02
Python
69,237
1,562
import sys #(2P_date, 2P_genotype, 2P_fly, 2P_recroding, 2P_trim_start_time (s), 2P_trim_end_time (s), CC_fluorescein_recording, confocal_data, confocal_genotype, confocal_fly) #todo: check which 2P recording, cc512, confocal images are representative, TwoP_recordings_sparseLine_list=[ ################ visuall...
56a51f9cbdcdd768d4cb7fca28d7dd02fcd5e27eb2090ad0c3fcf84c1ac3c184
Python
69,332
1,541
import itertools import torch from torch import nn from torch.utils.data import TensorDataset import torch.nn.functional as F import numpy as np import scipy.special as sps from net_utils import StatefulBase, check_dims, random_weight_init, binary_classifier_accuracy, xe_classifier_accuracy #%%############ ### Hebbia...
8968bed2d22df111ba3640e9f7dbfa43c90afbbe381cb9da89993be97f31f746
Python
69,669
1,633
import sys import os.path import platform import copy import itertools #PySide2 imports from PySide2 import QtCore, QtGui from PySide2.QtCore import Slot from PySide2 import __version__ as pyside_version from PySide2.QtWidgets import QApplication, QMainWindow, QWidget, QGridLayout, QMessageBox, QFileDialog, QAction, Q...
94eda505a91e65a366480a56e761629315959c40084f726919ba166c6cd28d73
Python
69,978
2,116
"""Functions to perform spectral analysis.""" import logging from typing import List, Optional, Tuple, Union import numpy as np from scipy import signal from scipy.signal._spectral_py import _median_bias from sklearn.decomposition import non_negative_factorization from osl_dynamics.utils import array_ops from osl_dy...
3645fdc1c3ef7b7fdd4655df8cb6b60cbaae0cd435e71d5c3a5e2a79f84272b5
Python
70,303
1,915
"""Base class for handling data.""" import atexit import hashlib import json import math import os import re import logging import pathlib import pickle import uuid from contextlib import contextmanager from functools import partial from dataclasses import dataclass from typing import Dict, List, Optional, Tuple, Unio...
39f78ca7cfdd52bff3205fc6801f5fb841bf7373dfc0b467d86bb084520ec4d6
Python
70,343
1,260
#%% import os import sys try: os.chdir('/Volumes/GoogleDrive/My Drive/python_code/connectome_tools/') print(os.getcwd()) except: pass # %% import sys sys.path.append('/Volumes/GoogleDrive/My Drive/python_code/maggot_models/') sys.path.append('/Volumes/GoogleDrive/My Drive/python_code/connectome_tools/') fr...
f9fb0b5efaecb608f20020afb256c3dcb271258ec1cffb52ac3c976209215c59
Python
70,376
1,620
#!/usr/bin/env python # Copyright (c) 2026 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """Allows visualising a 2D map generated by vehicles.""" """ Welcome to CARL...
6436043c1ab4e6bdb373903ce44b68c22ecd4dd9ca07be68d61006b8cb205973
Python
70,962
1,876
"""GUI for rejecting epochs""" # Author: Christian Brodbeck <christianbrodbeck@nyu.edu> # Document: represents data # ChangeAction: modifies Document # Model: creates ChangeActions and applies them to the History # Frame: # - visualizaes Document # - listens to Document changes # - issues commands to Model from...
7d9adb3c3dc68e2e455cb0bf1cd4ded10155fb4e32a0fcd7d42b3000d40f3c94
Python
70,983
787
# Copyright 2022 Huawei Technologies Co., Ltd # # 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...
289783392517a0b475484287ba817185ce432176404fe0291cf59f0215cbd9b3
Python
71,598
2,433
# Author: Christian Brodbeck <christianbrodbeck@nyu.edu> """Document model for formatted text documents Objects for the abstract representation of a document which can be into different formats. Currently (incomplete) support for str, RTF, TeX and HTML. Base classes: :class:`FMTextElement` A string (or object w...
7deba915da0826fccbb28a78d2ae5b8b993e30fcfb6db00f1511685221e32db2
Python
71,674
1,602
import math import torch import numpy as np import torch.nn as nn from pytorch_lightning.loggers import wandb from torch import Tensor from typing import Dict, Tuple, Union, Any import pytorch_lightning as pl import torch.nn.functional as F from constants.constants import * from neural_networks.unet_nilm import quantil...
7915bfa8f684e8e11ba8ab8ec76dceb5cb602e4c1a2cba95e9683bc22e172e48
Python
71,741
1,872
import sys import re import statistics import string import random import os.path import itertools import copy from collections import defaultdict, Counter import numpy as np import pandas as pd import copy import docx import docx.shared from docx.oxml import OxmlElement from docx.oxml.ns import qn from docx.table impo...
e48d222464fff9b636d7a4d0ecb39f9af42b51793dc59a230da6d9dfd6d5f4ce
Python
71,813
1,949
# Obtains the cell threshold, rheobase, resting v, and bias currents for # steady state v of a cell defined in a hoc file in the given directory. # Usage: python getCellProperties /path/To/dir/with/.hoc import cPickle import csv import json import os import re import shutil import string import urllib from abc import ...
77def41a73e97e9aa50952ebccb4db18192f0add548311dd6e2c58ea1640cf82
Python
71,934
1,561
import pandas as pd import numpy as np from pandas import read_csv from scipy.ndimage import uniform_filter1d import csv from . import utilities __all__ = ['Test'] class Test: def __init__(self, filename, filter_size = 20): self.filename = filename self.filter_size = filter_size def set_data...
3bb87b05f712ac90611481dd91cee64e833b24fab9aa9d4b9c3c8cdd9ad1c28c
Python
72,134
1,528
# -*- coding: utf-8 -*- """ @author: Yuxiu Shao Network with reciprocal random components; Full-rank Gaussian Network and Gaussian-mixture Rank-one Approximation Dynamics """ import numpy as np import matplotlib.pylab as plt from numpy import linalg as la # import seaborn as sb from functools import partial # from s...
a4837335d0cd956a0f06583de22e2284777e71527acedad5ba90aa60089cdec3
Python
72,393
2,122
# This script is part of navis (http://www.github.com/schlegelp/navis). # Copyright (C) 2018 Philipp Schlegel # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of...
6ff57b8957408d5325716e45d6408d5f8a07d1762b87c87c994c8a341458a5a3
Python
72,724
2,135
# Copyright 2021 DeepMind Technologies Limited # # 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 agr...
6072b7a22fabf17c67ff2d8061e42307199de7e7ff7f84bba21b4d4c2cc3dd8c
Python
73,124
1,913
import csv import json import logging import re import subprocess import sys import tempfile import unittest from pathlib import Path from shutil import copyfile from typing import Optional from unittest.mock import MagicMock, patch import rdflib import yaml from click.testing import CliRunner from kgcl_schema.datamod...
6a20aa6835f8bb9de12e1f582b6c99717282a5eac9473db67460cc22caf0148f
Python
74,779
1,644
# -*- coding: utf-8 -*- import inspect import tensorflow as tf from .. import _logging as logging from .core import * __all__ = [ 'RNNLayer', 'BiRNNLayer', 'ConvRNNCell', 'BasicConvLSTMCell', 'ConvLSTMLayer', 'advanced_indexing_op', 'retrieve_seq_length_op', 'retrieve_seq_length_op2', ...
f157b4dc334e2b4aee0dfe7256e16f0a81a9d10bb74fe90acdc2f0998662e62d
Python
75,195
1,394
from __future__ import absolute_import from __future__ import division from __future__ import print_function # We disable pylint because we need python3 compatibility. from six.moves import xrange # pylint: disable=redefined-builtin from six.moves import zip # pylint: disable=redefined-builtin from tensorf...
a3fcd7c991982358fb7f05c15b9d3eb518ef3d9045b280371d1722ff46252336
Python
75,623
1,878
# -*- coding: utf-8 -*- import tensorflow as tf from .. import _logging as logging from .core import * __all__ = [ 'Conv1dLayer', 'Conv2dLayer', 'DeConv2dLayer', 'Conv3dLayer', 'DeConv3dLayer', 'UpSampling2dLayer', 'DownSampling2dLayer', 'DeformableConv2d', 'AtrousConv1dLayer', ...
7767676f68d742f6771e8fe0911ca9b010861556adb7ecd1e098f34df68c1517
Python
76,589
1,263
#!/usr/bin/env python3 """ File: decon_eqtl.py Created: 2021/07/12 Last Changed: 2022/02/10 Author: M.Vochteloo Copyright (C) 2020 M.Vochteloo This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software ...
51a83856617a559710492fec1397284c7ca58e5a359e5694e4776e3d62101fd7
Python
77,298
2,056
"""Command-line interface for CROPro. CROPro exposes pipelines as subcommands: - ``cropro crop ...`` -- crop prostate MR images (center/random/stride). - ``cropro resample ...`` -- resample a dataset's ADC/HBV scans and masks onto the T2W grid so the sequences are aligned before cropping. - ``cropro normalize ....
e5b4be9a9f6e718ef1006ff20b48d063920680a96fb082b83ba0d6c54acf2d81
Python
77,651
1,710
#----------------------------------------------------------------------------- # Copyright (c) 2022--, Bojing Jia. # # Distributed under the terms of the GPLv3 license. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------------------------------------------...
2272eae0548b6ede6457e8852e30b8516248d260ca77d5f4ccdc445dce073cc2
Python
78,112
1,102
# Based on (Jurgens et al 2018) # pylint: disable=line-too-long # These include manual lexicons defined by Teufel 2006 and Jurgens 2018 # that help identifying the citation intents. # They also include linguistic patterns and rules that are leveraged as features for the classifier # From: Jurgens et al. (2018). Measuri...
8819845d780e4955e05384c9659a971071e342b5f48fe8e17472d44ffb3d3e52
Python
78,452
1,830
""" Clustering classes and functions for RACCOON F. Comitani @2018-2022 A. Maheshwari @2019 """ import os import sys #from shutil import copyfile import csv import pickle import logging DEBUG_R = 15 """ Suppress UMAP and numpy warnings. """ import numba import warnings warnings.filterwarnings( "ignore",...
1f78763956fd7bd973ed280ff0a4c33f623d163832b17a903378c41a19f653e3
Python
78,864
1,387
import os import warnings import torch import pandas as pd from typing import Union from constants.constants import * from lab.nilm_trainer import train_eval, train_eval_super from constants.appliance_windows import WINDOWS from datasources.datasource import Datasource from datasources.datasource import DatasourceFact...
b61890a204b3921ada763d70623a1a39f746744a9393d7dc89d02eeae8775135
Python
78,970
1,414
""" ======================================================================================================================== Network Architect Module ======================================================================================================================== (incomplete documentation) Classes -------------...
85c30e178a9b3c3eb2d6680c768ac3dbbe55fd337ba882009d5adabc9edbe7f3
Python
79,432
5,176
import numpy as np import pandas as pd import matplotlib.pylab as plt import openpyxl pd.set_option('display.max_rows', 50) pd.set_option('display.max_columns', 100) pd.set_option('display.width', 1000) #define name of hospital in databases, this will be used in the future hospital_name="Emam" if hospital_name=="Ema...
050b981c67cabc5cea493a5055114b1a36c448e43655d3528dc0cfff60afa97c
Python
80,360
1,887
#### Analysis on experiments """ This file performs downstream analysis on the output of the siVAE/VAE. 0. Basic analysis on the siVAE results/ Input dataset 1. siVAE loadings comparison a. 2. Gene embeddings a. Geneset analysis: create scatterplot of embeddings annotated with genesets b. Iden...
eb39139ddcda232d7268d2f15c605412b7aa9d26b74aa42b8c3bb031023a85ad
Python
80,801
2,400
"""Wrapper functions for use in the config API. All of the functions in this module can be listed in the config passed to :code:`osl_dynamics.run_pipeline`. All wrapper functions have the structure:: func(data, output_dir, **kwargs) where: - :code:`data` is an :code:`osl_dynamics.data.Data` object. - :code:`ou...
6048ed913ac3cdcf528a969743ed25c9fa6e5e87c53e5e88a6e632bc45914353
Python
81,917
1,669
# -*- coding: utf-8 -*- """ @author: Yuxiu Shao Sparse EI Network with reciprocal connectivity, Full-rank Gaussian Network and Rank-one Mixture of Gaussian Approximation Connectivity, Dynamics """ ''' HELP FUNCTIONS ''' import numpy as np import matplotlib.pylab as plt import matplotlib from numpy import linalg as la...
12ffd91da2dd09ba7b533ad377100d92b41b1d0cd92d4ca433c7ce8e23fcc423
Python
82,976
2,742
"""Plotting functions.""" import logging from itertools import zip_longest from typing import List, Optional, Tuple, Union import numpy as np import pandas as pd import seaborn as sns import matplotlib import matplotlib.pyplot as plt from matplotlib import patches from matplotlib.path import Path from mpl_toolkits.ax...
0dc5eeb78cb3426f968802ea92e1092b26b63032556bba88057fdecd661dc26e
Python
83,242
2,546
import abc from copy import deepcopy import matplotlib.pyplot as plt from matplotlib import rcParams import numpy as np from numpy.linalg import inv import weave from weave import converters from .GIF import GIF from .Filter_Rect import Filter_Rect_LogSpaced from . import Tools from .Tools import reprint class iGIF...
1b0a83664a7a26640eb6e66d6edee4a92e2d77d0d826d9a881bbfa6eada3a558
Python
83,477
2,420
"""Custom Tensorflow layers.""" from typing import List, Optional, Tuple, Union import numpy as np import tensorflow as tf import tensorflow_probability as tfp from tensorflow.keras import ( activations, layers, initializers, regularizers, ) import osl_dynamics.inference.initializers as osld_initiali...
e8f26a810a68d86f1c7c7f1b012c681ed3b6d62be938f636b12cb4ac2302ba27
Python
83,870
1,771
import os import sys import csv import types import time import pickle import seaborn as sns import numpy as np import pandas as pd import multiprocessing as mp import slideflow as sf from tqdm import tqdm from functools import partial from slideflow.util import ProgressBar, to_onehot from os.path import join from sli...
a1a8e804ebb0d975ac6e647520835bbbd34e3c5b13ec05fc4ecb5eb97f050023
Python
83,910
1,831
""" Copyright 2020 - by Jerome Tubiana (jertubiana@gmail.com) All rights reserved Permission is granted for anyone to copy, use, or modify this software for any uncommercial purposes, provided this copyright notice is retained, and note is made of any changes that have been made. This softwar...
555b4b83789ed11f3162df3b845d760280c5ac130008d0c08a7d7755e58e4d57
Python
84,040
1,994
#!/usr/bin/env python """Module Description: Test the `macs3 hmmratac` command and the public output functions in MACS3.Commands.hmmratac_cmd. Most command-line runs use a small synthetic ATAC-seq-like BEDPE file (open regions full of short fragments, flanked by positioned nucleosomes, over a sparse background of mon...
b911638d27d4df17caa2b7754f0eaa7b5d82e9dc10eef916a6f9019b9868ff53
Python
84,600
2,011
# SPDX-FileCopyrightText: © 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: MIT """ NUREC Integration Module This module provides the main integration between NUREC (Neural Reconstruction Engine) and CARLA simulation. It contains classes and functions for: - Loading and manag...
fe01d3dcd16362ea13fccf5ee24d7a30487d332c35a1153f6d653022e135728c
Python
86,672
2,317
# Version: 0.29 """The Versioneer - like a rocketeer, but for versions. The Versioneer ============== * like a rocketeer, but for versions! * https://github.com/python-versioneer/python-versioneer * Brian Warner * License: Public Domain (Unlicense) * Compatible with: Python 3.7, 3.8, 3.9, 3.10, 3.11 and pypy3 * [![L...
90abc30eae82b61943a5c7f1bd1fa1135534d94d86797640fa8e12515de1e087
Python
86,853
2,333
# Version: 0.29 """The Versioneer - like a rocketeer, but for versions. The Versioneer ============== * like a rocketeer, but for versions! * https://github.com/python-versioneer/python-versioneer * Brian Warner * License: Public Domain (Unlicense) * Compatible with: Python 3.7, 3.8, 3.9, 3.10, 3.11 and pypy3 * [![L...
1eaec41a4eaf02743888306c3bb18afad3caeba7deda192d8546d1fbfc20b453
Python
87,235
1,295
"""Implicit generator for 3D volumes""" import random from siren.siren import sample_from_3dgrid import torch.nn as nn import torch import time import curriculums from torch.cuda.amp import autocast from .util import gather_points, scatter_points from .volumetric_rendering import * class ImplicitGenerator3d(nn.Module...
16465bd79190a898cbf1c907567a6e70a18752e6959da813e252945b3313f665
Python
87,862
1,887
'''This module includes tools to convolutionally section whole slide images into tiles. These tessellated tiles can be exported as PNG or JPG as raw images or stored in the binary format TFRecords, with or without data augmentation. Requires: libvips (https://libvips.github.io/libvips/).''' from __future__ import abs...
0ea7db39266661cfb70af7cf3a217fc358535f4b6deb66c96e3723e9a50617ed
Python
88,157
1,836
import sys from numpy.lib.type_check import imag from torch._C import device from torch.functional import align_tensors sys.path.append('/apdcephfs/share_1330077/starksun/projects/pi-GAN') from fid_evaluation import output_images import numpy as np import torch.nn as nn import torch import math import torch.nn.functio...
07e2a82ac30bb49edabb37680f70124331121f198a209d6174d30a7151260199
Python
89,079
2,237
from itertools import combinations, product import itertools import json from logging import critical from multiprocessing import Pool import os from typing import Any, Callable, Dict, Iterable, List, Tuple, Union import logging from matplotlib.colors import TwoSlopeNorm import matplotlib.gridspec as gridspec from pal...
e3479baaed93e94f16bddd4b620988dac277e00ae9f31ce98d86f63871c8312f
Python
89,622
2,051
#! /usr/bin/env python3 #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Sep 7 14:21:29 2021 @author: Alexandra Vallet This scritps allow to write slurm files and a batch file in order to launch the PVS simulations on the supercomputer. The simulations can also be run locally in the docker cont...
595d55df51b2c53c925e47863e5f23fb9ebc61a2fd5530194bae8a09ad599fa6
Python
90,163
2,313
#!/usr/bin/env python import os import cmath import math import sys import numpy as np import glob import subprocess import re # from matplotlib_venn import venn2 import pandas as pd from collections import defaultdict from operator import itemgetter import matplotlib as mpl import matplotlib.pyplot as plt from optp...
33ef44c11e72c094770aa8727191561efddffd6937823c438c7ca61e4d391bb4
Python
90,419
2,255
import tracemalloc import warnings from contextlib import nullcontext import numpy as np import pytest import scipy.fft from nitime.algorithms.spectral import dpss_windows as nitime_dpss_windows from spectral_connectivity import _backend from spectral_connectivity.connectivity import Connectivity from spectral_connec...
2800b2ed372d2b64b94346dbd18e65c14423dc8561d9176200bd7f5f278223ea
Python
90,599
2,639
# This script is part of navis (http://www.github.com/schlegelp/navis). # Copyright (C) 2018 Philipp Schlegel # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of...
a37f5583db00e4a26c29949a73de550d9b077b3c4f8bd6de35168e4ee8f61b17
Python
90,606
1,565
#!/usr/bin/env python3 """Unit tests for carla_pack.py (standard library only, no engine needed). python3 Util/ContentPacks/test_carla_pack.py """ import contextlib import io import json import os import shutil import sys import tarfile import tempfile import unittest from pathlib import Path sys.path.insert(0, ...
82df093e71b3520532131df95bc5915533e71bf91cfbcc68f40081ed4fba5426
Python
92,246
2,067
import itertools import torch from torch import nn from torch.utils.data import TensorDataset import torch.nn.functional as F import numpy as np import scipy.special as sps from net_utils import StatefulBase, check_dims, random_weight_init, binary_classifier_accuracy, xe_classifier_accuracy #%%############ ### Hebbia...
b2e13dbb8bffbf2b990a18212c093ca910cec37e78fab8f999047df69213922d
Python
92,426
2,515
# Copyright 2024 Chen Liang # # 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 writing, ...
45a2514393dafcadbedacf39972319fe072721ae82d00ef384f6f00069bfebe8
Python
95,566
2,417
__author__ = 'duarte' """ ===================================================================================== Analysis Module ===================================================================================== Collection of analysis and utility functions that are used by other modules (Note: this documentation is i...
9fb39d7310a124df499e45a5de1c401ee014613ed29928d9931235dda3d4e34d
Python
95,646
1,836
import copy import queue import threading import time import os import csv import shutil import types import multiprocessing import shapely.geometry as sg import slideflow as sf import numpy as np import pandas as pd from random import shuffle from glob import glob from os import listdir from datetime import datetime ...
8edc2153c56b81f3ba6da7b91bed21af18a3b70634f19e2d4e6b82bf0ee99222
Python
100,405
2,571
""" Compliance tests for multiple interfaces. See <https://github.com/INCATools/ontology-access-kit/issues/291>_ """ import json import logging import tempfile import unittest from dataclasses import dataclass from pathlib import Path from typing import Callable, List, Optional import kgcl_schema.grammar.parser as k...
4eefed4ae59efe14f30ca04ded0fe2093b273c438c0e8a1c5730b16084baa21a
Python
103,364
3,423
from oaklib.datamodels.association import Association NCBI_ASSOCIATIONS = [ Association( subject="NCBIGene:1956", predicate="enables", object="GO:0005524", property_values=[], subject_label="EGFR", predicate_label=None, object_label="ATP binding", neg...
93b6aca621c4ef0e4ec54e97824e532a4a2d1a4b102eee42af6f29a09dfa99ce
Python
105,720
2,258
import torch import torch.nn as nn import functools from torch.nn import init from torch.optim import lr_scheduler # Class components class DownSample(nn.Module): """ SingleConv1D module + MaxPool The output dimension = input dimension // down_ratio """ def __init__(self, input_chan_num, output_c...
2f4498789f1c5e12a9f35587c0e98d9bb6ecc4190b5050969925df1d4adf38f1
Python
106,529
1,942
# Auto generated from ontology_metadata.yaml by pythongen.py version: 0.9.0 # Generation date: 2022-05-29T22:52:46 # Schema: Ontology-Metadata # # id: http://purl.obolibrary.org/obo/omo/schema # description: Schema for ontology metadata # license: https://creativecommons.org/publicdomain/zero/1.0/ import dataclasses i...
2e046c180d018c2dbc3803b77cafcd16bae73cc0f0072c7de2f79596216d0f3a
Python
107,313
2,850
# -*- coding: utf-8 -*- # lucam.py # Copyright (c) 2010-2019, Christoph Gohlke # Copyright (c) 2010-2019, The Regents of the University of California # Produced at the Laboratory for Fluorescence Dynamics. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are...
faac1342b322ec6f97839c0d7c0af9982488f1348a12ebe1c87efbcda27fdff4
Python
107,403
2,932
# ---------------------------------------------------------------------- # LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator # https://www.lammps.org/ Sandia National Laboratories # LAMMPS Development team: developers@lammps.org # # Copyright (2003) Sandia Corporation. Under the terms of Contr...
c5214ce44580f9cdc8b146b7f9dfbecf396627baee07aedd23b498a7cd761b5f
Python
108,228
2,032
''' Experiment of randomize model parameters and check heatmap similarity change Adapted from https://github.com/adebayoj/sanity_checks_saliency/blob/master/src/randomize_inceptionv3.py ''' from pathlib import Path from tqdm import tqdm import os import glob import pickle # import logging import numpy as np import pa...
ba9286d6fa52b37b88279d39da5eba62d3f6c462b9c10e41f3b6ae4518ba87c4
Python
108,705
3,189
# -*- coding: utf-8 -*- import threading, time, scipy, skimage import numpy as np import scipy.ndimage as ndi # import tensorlayer as tl from scipy import linalg from scipy.ndimage.filters import gaussian_filter from scipy.ndimage.interpolation import map_coordinates from six.moves import range from skimage import exp...
a6258bcba9cf8449dddad956a519be30f4d874437c005b234670ab05cf800fbf
Python
110,770
3,049
__author__ = 'duarte' """ ============================================================================================ Visualization Module ============================================================================================ (incomplete documentation) Provides all the relevant classes, methods and functions fo...
fe53c4d1bdf031f12deeede46e3990442f92ee3591baf013d31c3a42a6214121
Python
112,606
2,358
#!/usr/bin/env python3 # Copyright (c) 2026 Computer Vision Center (CVC) at the Universitat Autonoma # de Barcelona (UAB). # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """carla-pack: author, build, inspect, verify and install CARLA content packs....
389671cb71584a0f9d9e91b4af78cd9fe3f1439f54431d5454075af3e5c5e9a2
Python
113,611
3,065
# cython: language_level=3 # Time-stamp: <2025-11-14 19:08:47 Tao Liu> """Module for filter duplicate tags from paired-end data 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). """ # ------------------------...