sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
4157a0430095b2282f3e7d217afad2bfa5a99932277b11597c8c5d6436a5683f
Python
3,342
99
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Friday, May 1 15:32:13 2020 @authors: Luz Santamaría Granados (luzsantamariag@gmail.com) Juan Francisco Mendoza Moreno (jfmendozam@gmail.com) """ import matplotlib.pyplot as plt import seaborn as sns class RecommenderPlots: """ Gener...
a8c8bcdd6ff41ee889c3e11fbe246cfdac58e507f73c9631b7e05f6ff85d7f90
Python
3,342
121
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
407f4f0deb857d608c0f0a3b9aa174149eb7e15339dc89bd8989b582f55b7841
Python
3,344
100
from .data_config import DATA_CATALOG as _DATA_CATALOG from .model_config import MODEL_CFG_CATALOG as _MODEL_CFG_CATALOG Mode = "RT" # IonIntensity RT data_name = "U2OS_DIA_RT" # U2OS_DIA PhosDIA_DIA18 PhosDIA_DDA # PredInput # for RT # U2OS_DIA_RT PhosDIA_DIA18_finetune_RT PhosDIA_DDA_RT # PredInput_RT refres...
2a31d5469a430a509b48c9fe4c4af17f5cca4fbde5a71144c078af6ca3f4c22a
Python
3,350
133
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
f56b9e4d922b05e5dd57ac9e3e6a93b54ead09da7f45f204cee2ee73643bfba6
Python
3,350
94
import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import tflite_runtime.interpreter as tflite from scipy.special import softmax os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' import json import numpy as np from utils.reader import ImageArchive from actions.extract import getImageArrayFromRegion class IntronModeller():...
f0374a3cc26122f26609965aa6563d08c2420f629dda36ef7f985f5a62e28990
Python
3,355
84
import os # main function - startAnalysis(): # main function to analyse the results of the newtwork simulation # e.g: - start fitting with Gabor-Functions # - start calculation of STA and STC # - start the image reconstrunction functions # - create all necessary folders # - test if all necessary inpu...
d5bb4111c08544109a768d0b8184cadc55a0234bab729c4b8bacd5cae2df13a0
Python
3,359
82
import hashlib import json from pathlib import Path import click import zoltpy from code.zoltar_scripts.upload_covid19_forecasts_to_zoltar import VALIDATED_FILE_DB, \ DATA_PROCESSED_DIR # run in the covid19-forecast-hub repo root def main(): """ Utility that repairs validated_file_db.json by checking ev...
e21633bac9ba325d54b0ece5ea5d8bd1b078d959dc3f6ed429ebd063444d83b1
Python
3,359
102
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
2c36ea580fcdd98b7178a4bcefb41874944bd8508c0b547513126d75bebebc40
Python
3,371
113
import math import numpy as np def get_2d_bins( arr: np.ndarray, bin_width: int, bin_height: int ) -> np.ndarray: """ Bin a 2D array. Parameters ---------- arr : Input array. bin_width, bin_height : Width/height of the bins. Returns ------- binned_arr ...
ad7b596a527faa749f4390d7040b1ecb26debcdeaf4422a353855fa29508dae2
Python
3,371
103
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
d4413a3a63054e7f5df8dcdb4d6b4d68755ac11c8cc30a6cd470970ea8b21144
Python
3,375
119
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
b232b4c9c0ecbc3655dbf871c10f13748827acb4c0f7f94365459707f0d1197f
Python
3,379
84
from ANNarchy import * setup(dt=1.0)#,seed=1001) import matplotlib as mp mp.use('Agg') import matplotlib.pyplot as plt import Gabor as gabor import os.path from net import * #------------------------------------------------------------------------------- def createInput(parameters,maxInput): inputIMG = gabor.create...
5a4192903bc4ff3e1211e36c4770c7eb25c5b8f02c0d8d9a2489b81c56db2d97
Python
3,381
100
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
11e4c899e592952fcb7332b865b24784b552f39aac903d0d0da44f634e17b27c
Python
3,390
116
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
38b2b132df69e286efcaedb5c86555b882a89544757462ccc38b822673a21fb0
Python
3,395
97
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
c12a5ae17037552deb274df314f14a6e4a0f949aa31cec2949867af00f958d7e
Python
3,395
100
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
d2a268e66e7bc8ce08b1195ca38a0201477d0b6f8d075c72f08bf9b282a0169c
Python
3,401
112
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
122b542c50a4cd931da2c067140c1827c1a32ee3a96860172709f240ea9d0f0e
Python
3,407
116
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
fe91ab54e428868eda09c6cc1a4eac7f8d34b9ca8c8699b3602476076e91d9c0
Python
3,407
109
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
1b19f85198d98e0ae3d60e6f1d7e595c31498e4c68d2971a8cecde3864882f80
Python
3,408
103
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
442726f5368421c48da131955e0fe11984d78c904950402581f99265ec9ec25c
Python
3,411
98
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
66184e24abd1fb21f8f9fdc3d24a0ac76cadba24df1b9b0c0bc8cecb0bd6355e
Python
3,414
96
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
4bbc3d1e2a614f2e884f44cafb2d967ccfe0e0e541f6f6d832c4d67619cb6e48
Python
3,415
113
# If the work folder defined as Here, the folder will be where the config file in # Else define a specific folder WorkFolder = 'Here' # Experiment name will be used as the part of result folder name and plays as an identifier ExpName = '' # Instance name has higher priority than ExpName, and this will fully overwrit...
72a127c0783ad6ee3224663f434b2447e3c4e377a1f98e9eef516004183fe313
Python
3,416
117
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
cdde67b8d5f0f39b93fcec9edcf2250d07fe081871cc3059fd86bb3e0cfbb05f
Python
3,427
85
import os import numpy as np from file_handling import recording from file_handling.file_handling_exceptions import InconsistentNChanError class RecordingGroup(object): """ class for managing recordings and applying operations to multiple recording instances together typically, a single exp...
2f2e56f61a26e32467987ed218a256bc227c3478bdb9d7a1e17ebaca2a013189
Python
3,433
106
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
b74dacc6ec8ab142c9e8cb17ec88ae2216c2d77228940902e017923fca33d432
Python
3,442
105
import numpy as np import matplotlib.pyplot as plt import matplotlib.patches as mpatches import matplotlib import h5py as h5 from importlib import reload import sys import matplotlib.patches as patches direc = sys.argv[0].split('scripts')[0] where = sys.argv[1] sys.path.append(direc+'support') import parameters reload(...
94b8509c43229156b30d5578b737ab6e8eae1cef5dbfc0d22906211ea3cd2ef0
Python
3,465
109
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
66a497724bbc8a75a63072e2e2884e46d82ab61dbea32cc1d110761dcb078827
Python
3,480
83
import os import os.path import csv def main(): """Reads a file of raw data and analyze side bias""" print ("This program analyzes win shift data for Bandit test") #folder=r"C:\Users\grissomlab\Desktop\1003" folder=input("please enter the directory name:") destinationFolder=input("Pl...
def8d3bb5a2da668028d54ef0cbc0cfdd2efe7b3f7a77d74d69577c4e412fcd6
Python
3,482
100
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
f57665d8f49cbb94fe375f286654397b09e34a5ca78ae3194ac16fa230246aaa
Python
3,482
100
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
41ef5d92182eaff99f4c937d1b132d44384dc9767fdf7c1aca71467a0f011bf6
Python
3,483
112
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
72f5a2f2bd732c4066b09ff287267cd06024af1e708eb25a186020b1dd92905e
Python
3,485
107
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu May 3 10:22:34 2018 @author: Frank Kane """ from EvaluationData import EvaluationData from EvaluatedAlgorithm import EvaluatedAlgorithm class Evaluator: """ It loads the datasets of tourist experiences of the hotels, the ...
1565663929ffe8f7ba309be446f17d854c2976a128bead6559b28dea8494044b
Python
3,492
118
# -*- coding: utf-8 -*- """ Created on Sun Jun 6 09:02:33 2021 @author: yuyi6 """ import torch import torch.nn as nn input_size = 60 hidden_size = 60 num_layers = 1 sequence_length = 64 num_classes = 600 dropout1 = 0.2 dropout2 = 0 device = 'cuda' if torch.cuda.is_available() else 'cpu' class CRNN_cla(nn.M...
85607fabc4e08839905a804f971eb6dbb7ce4a535c8a0bcc58b7ee7e213872b1
Python
3,496
82
import os import numpy as np from analysis.probe.probe_cell import ProbeCell from analysis.probe.ctxt_manager_decorator import temp_setattr from spike_handling import spike_io from analysis.probe.trigger_handling import trigger_handler import pandas as pd def main(): src_dir = '/home/slenzi/Desktop/CA...
d0bcebfeb976406fd1e324d54d6409fe2f2f0c6e519e95f8346aa64ccc0376ea
Python
3,501
110
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
a66d391b45b959c406a47c3d6229c2e55883ac799d774ef1ca22924c94c602c3
Python
3,504
119
# If the work folder defined as Here, the folder will be where the config file in # Else define a specific folder WorkFolder = 'Here' # Experiment name will be used as the part of result folder name and plays as an identifier ExpName = '' # Instance name has higher priority than ExpName, and this will fully overwrit...
86cb3c25633ed96bf66201a91a3477e6554216d4f74cfc084e9adebcf071b205
Python
3,510
107
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
dec26633c8c6e340cfd46c93c268f1932b673b96f3846badeb3a2b350751596f
Python
3,510
123
from unittest.mock import MagicMock import numpy as np import pytest from pytest_mock.plugin import MockerFixture from cellfinder.core.detect.detect import main @pytest.fixture def mocked_main(mocker: MockerFixture): from cellfinder.core.detect.filters.volume.volume_filter import ( VolumeFilter, ) ...
6e533219a10b400dfaa4764c3eb499038ed245806680c100609ca5c3c75d0a43
Python
3,512
114
"""Test I/O.""" import logging import pytest from yasa.io import ( _log_level, _parse_log_level, _restore_log_level, is_pyriemann_installed, is_sleepecg_installed, set_log_level, ) logger = logging.getLogger("yasa") @pytest.mark.parametrize( "verbose, expected", [ ("debug",...
852960015ef102470a784a60a9ee29c70bb750c4838c1994d5c0cb3e4bc18bda
Python
3,525
109
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
b41cc38ec86601306c03659478fab006213e7ff018794613088b5634fc78e93e
Python
3,525
75
import numpy import numpy.testing import pandas import unittest from metax.gwas import Utilities as GWASUtilities # from metax.Constants import SNP from metax.Constants import EFFECT_ALLELE from metax.Constants import NON_EFFECT_ALLELE from metax.Constants import ZSCORE from metax.Constants import CHROMOSOME from meta...
d9d5d281101b9f1a4fe9a2f7764be60888ea42c444b6fe39e790f2b3944e1b48
Python
3,527
52
import argparse from argparse import RawTextHelpFormatter import warnings warnings.simplefilter('ignore', FutureWarning) import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' from prospr.train import train from prospr.prediction import predict from prospr.evaluate import evaluate desc_usg = '''ProSPr requires a multipl...
43312400b26a2146421f625c26234f494b10b0eceb10747836e66e531c933226
Python
3,532
103
#----------------------imports and environment--------------------------------- ##Neuron - Modell for the analysis## from ANNarchy import * setup(dt=1.0,seed=1356) import numpy as np import scipy.io as sio import os from net import * from matplotlib import gridspec import matplotlib.pyplot as plt # Show only a few nu...
6ca47b3cde980f3e69f61dad6123e626e5cb5f727018ed06334f61956c2efd90
Python
3,534
125
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
8b2a74b4dd9ca0905a8eba311e60b4c41cc2e0d991f7d256c6d45179efc4de71
Python
3,537
127
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
2731b7b3fa188da1fd01fd0cb32279e417a46ce8c278ab938d4dad462e143558
Python
3,546
96
# coding=utf-8 # Copyright 2026 The Edward2 Authors. # # 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 o...
09bad0b5db60c7e199d8a98bd885c03af2bd778b95d30616946f7c81fdff6f9b
Python
3,549
81
from deep_phospho.proteomics_utils.colors import PreColorDict from deep_phospho.proteomics_utils.drawing_area import ax_utls from deep_phospho.proteomics_utils.annotations import bar_anno, dyna_bar_anno from matplotlib import pyplot as plt def comp_bar(data_dict, base_key=None, comp_keys=None, filter_fu...
86df121e2d5ecf40dbc323899a07d813f5890eb4b851cbbc67eae5ed75d59327
Python
3,553
102
import numpy as np from cached_property import cached_property class ClusterRead(object): def __init__(self, spike_io, cluster_id): self.spike_io = spike_io self.cluster_id = cluster_id @property def channel_waveforms(self): """ :return array best_channel_waveforms: every ...
8be8929d117828ae0b66331bcd25ee2c95756870b79b3eb8ff44cf60eb51f97e
Python
3,554
98
import os import re import pandas as pd from ._deeprt_constant import MOD from deep_phospho.proteomics_utils import rapid_kit def newrt_format_to_deeprt(rt_df: pd.DataFrame, pep_col='IntPep'): rt_df = rt_df[rt_df[pep_col].apply(lambda x: True if x[0] != '*' else False)] rt_df['IntPep'] = rt_df['IntPep'].ap...
b95114c01b209080ad33c944ab1a47cb77f876f26b2b9d75f12a1ead41792a90
Python
3,562
109
# encoding=utf-8 import matplotlib #matplotlib.rcParams['backend'] = 'SVG' import matplotlib.pyplot as plt from matplotlib.font_manager import FontProperties import numpy as np from pylab import * #mpl.rcParams['font.sans-serif'] = ['SimHei'] #simsun = FontProperties(fname=r'C:\Windows\...
abe62820e372622ac6f1e41dc2d3ca669ea08c51bad5ac80f44fb8102202516f
Python
3,566
127
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
f57ec8862920ac3a251a035a7ec8853c45e0527cd495c7b00ddc0eced1189e90
Python
3,576
124
# coding=utf-8 # Copyright 2026 The Edward2 Authors. # # 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 o...
e20274e5e7480e1a24df60cfc47ab187dc18ad84794403085883278e58bbacbd
Python
3,585
95
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
bf6239e93e375b45496a541e2baa5228f39b5aad67e7501d29dad11679631be2
Python
3,590
105
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
7508ad93cdec6d8f0c4b1d224913ae6f75a7a7a9d1d0794f3a416f8c44a6d5d4
Python
3,593
102
from magicgui.widgets import ProgressBar from napari.qt.threading import WorkerBase, WorkerBaseSignals from qtpy.QtCore import Signal from cellfinder.core.main import main as cellfinder_run from .detect_containers import ( ClassificationInputs, DataInputs, DetectionInputs, MiscInputs, ) class MyWork...
ca547eaa30f450df701904304224e1bb34109d8f7b6c24199d513f0e4390fba6
Python
3,605
123
#!/usr/bin/env python # coding: utf-8 # # Author: Kazuto Nakashima # URL: http://kazuto1011.github.io # Created: 2017-10-30 import random import cv2 import numpy as np import torch from PIL import Image from torch.utils import data class _BaseDataset(data.Dataset): """ Base dataset class """ ...
348c1bd9ab2aa16f661cf2211a77e2dc5a00b4b0504b5332f0c3ac44b381c4bd
Python
3,614
127
""" An integration test module for structure splitting The associated test dataset (exposed here through fixtures) is a minimal example created to cover the structure splitting code with (modified) real life data. """ import numpy as np import pytest import torch from brainglobe_utils.IO.image.load import read_with_d...
e6ac1d72e6b28c01ad7a90113f70f78d302e632485a0416b7bbbefe597369a02
Python
3,623
94
# @license # Copyright 2016 Google Inc. # 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...
f098f546d03adbc58a90dd2e7963307e8605a597f2e377d4e587f8ae4c993ea2
Python
3,624
96
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
def9241543d8f4df97c1b2f796e20344cc36ba8feb1178cfe886f847a1785bba
Python
3,626
96
from importlib import reload import numpy as np import h5py as h5 import sys direc = sys.argv[0].split('scripts')[0] where = sys.argv[1] sys.path.append(direc+'support') import parameters reload(parameters) import parameters as par import functions reload(functions) import functions as f import nest # Create data fil...
61f87c42d41c2974544360e6ca7d39666eda61c8fc4df77e9ad9312d2c12038c
Python
3,628
120
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
f2bf3b509bfb101508f1b7bfe6e13778ba646cb4c9d2cc1547048241bc4d9f5e
Python
3,637
103
from rotation_analysis.analysis.trial import Trial from rotation_analysis.analysis.probe.probe_events_collection import ProbeEventsCollection from rotation_analysis.analysis.probe.probe_stimulus import ProbeRotationStimulus, StaticStimulus class ProbeTrial(Trial): def __init__(self, block, idx, use_bsl_2, s...
c65f2785b477031318e444b6d59615804d2973862a45f4fb700e1939f69c39db
Python
3,640
80
# coding=utf-8 # Copyright 2026 The Edward2 Authors. # # 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 o...
2140443a1a4c31e97f15abcc673dbf6ddefd288de43aa6c481a32cd6c8e3040b
Python
3,645
122
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
0cc55830f828157b62a3acac1139b508169581b4e0cc6c6ec519174540dc5791
Python
3,651
120
from collections import deque import torch import torch.nn as nn from .nnutils import GRU, create_var MAX_NB = 8 class JTNNEncoder(nn.Module): def __init__(self, vocab, hidden_size, embedding=None): super(JTNNEncoder, self).__init__() self.hidden_size = hidden_size self.vocab_size = voc...
da8c380ce7f0f4f47587530d9ba949cf0342abd35f2e9debf03e8572934f621c
Python
3,654
89
import re from deep_phospho.proteomics_utils.rapid_kit import substring_finder def extract_mod_for_deepms2(mod_pep, mod_trans_dict: dict): """ From SN modpep to DeepMS2 modification col needed format For mods: Acetyl is not considered Carbamidomethyl will be ignored """ mod_pep = ...
340710fd7dbb280a0c8117bf5f2da12c632f64381d5234f07618249a810e2713
Python
3,660
95
import matplotlib.pyplot as plt import numpy as np import sys import os.path # R. Larisch, Technische Universitaet Chemnitz # 2015-06-23 # ueberarbeiten, STA und STC dynamisch fuer jede moegliche Neuronenpopulation! #------------------------------------------------------------------------------ def setSubplotDimensio...
84fa65306692f644feb33684545138954be2a63a96bfaac9cb3864d62d1b3c10
Python
3,660
110
# encoding=utf-8 import matplotlib #matplotlib.rcParams['backend'] = 'SVG' import matplotlib.pyplot as plt from matplotlib.font_manager import FontProperties import numpy as np from pylab import * #mpl.rcParams['font.sans-serif'] = ['SimHei'] #simsun = FontProperties(fname=r'C:\Windows\...
9bea06f697e52c5f596ab98e20cdcb7aaf6174aa82da937d16d061a303b8e6df
Python
3,661
109
# encoding=utf-8 import matplotlib #matplotlib.rcParams['backend'] = 'SVG' import matplotlib.pyplot as plt from matplotlib.font_manager import FontProperties import numpy as np from pylab import * #mpl.rcParams['font.sans-serif'] = ['SimHei'] #simsun = FontProperties(fname=r'C:\Windows\...
391215923e58177dd9d660964945959d9fdf636eaf986451c80c76527f7295e6
Python
3,662
117
import logging import pickle import os.path from pathlib import Path from datetime import datetime import opendirection.run.run as run from opendirection.main import run_stability_analyses def run_analysis_single_bin(args, options, config): conditions, total_df = run.analysis(args, options, config) if optio...
32dfca3a35a8512c845b1095169a567a55332a973b0190d0bef905287eb75fae
Python
3,673
94
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
4798764f91083be07780a53b4321d06aee2d3cbcd6d2d8e509ac5d4bb93e8f88
Python
3,673
103
# coding=utf-8 # Copyright 2026 The Edward2 Authors. # # 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 o...
3af49670a1a1a3a9e5513dd0dc166b605647cc4fbc8dd404da087186a61b79c0
Python
3,675
94
#!/usr/bin/python3 import os, pickle import pandas as pd import numpy as np from sklearn.linear_model import LogisticRegression from sklearn.multiclass import OneVsRestClassifier from sklearn.metrics import roc_auc_score from sklearn.model_selection import ParameterSampler import sys sys.path.append("../..") import ...
5a5cb257cbc9336e25fbb85893b3e6714a0f0bd5be0a3d7ebe259c52af0b4920
Python
3,679
92
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
8ea57525f0ce9bf06b66e6bd89f7f849ab9298038d47045a3afe6db3eab0628b
Python
3,679
112
import numpy as np import pandas as pd from stytra import Stytra from stytra.stimulation import Protocol from stytra.stimulation.stimuli import CalibratingClosedLoop1D, GratingStimulus, Basic_CL_1D from lightparam import Param class ClosedLoop1DProt(Protocol): name = "E0030_long_term_adaptation/v01_normal" ...
cf7f9bf1f3edbc8fbeeca343c55d72c408d2fe38755b34224a0fc52f2599fe97
Python
3,681
123
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
60f4594bfc6bfba18efe24be73908f2698593346ad2843929a8292f628522b8b
Python
3,693
100
import argparse import os import matplotlib.pyplot as plt import torch import yaml from torch.utils.data import DataLoader from models import * # This is necessary, do not remove it from torchvision.transforms import transforms from datasets.embeddings_localization_dataset import EmbeddingsLocalizationDataset from d...
5ca3e80026a5e27809c5057f7ab0450b1447a103822e033daf5ea9a2510ea67a
Python
3,696
140
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
a9c0b33edc3fe89d41025c53992c29df5bd481a2ee47002df1f7289d0b5b754d
Python
3,700
106
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
11ba98acc6a8ab1f339e2abdd6829de2f94be0a0d1e85a4cc5f1e3fd0657e08c
Python
3,702
108
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
3721f37d76fb721710fa38a65d323228857e487ab4cb4015ef9cea5e312ed79d
Python
3,704
132
import os import sys sys.path.append(os.path.dirname(__file__)) import numpy as np import torch from benchmark_tools import ( compare_results, get_test_data_path, profile_cpu, profile_cuda, time_filters, ) from brainglobe_utils.IO.image.load import read_with_dask from cellfinder.core.detect.filte...
262bdcd4cba89cba285264c31cb47b5bb7ad4d92897f6465880756dd8be6954c
Python
3,716
140
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
00c2f8fcc062d697c09ff9f626d462eb9a5a2c5f2e528745e40d2c58390a69af
Python
3,720
92
"""Test the functions in the yasa/heart.py file.""" import numpy as np import pytest from yasa.heart import hrv_stage @pytest.fixture(scope="module") def hrv_default(ecg_8hrs): """HRV per stage with the default parameters.""" return hrv_stage(ecg_8hrs.data, ecg_8hrs.sf, hypno=ecg_8hrs.hypno) def test_hrv_...
5360fea93787cffb8d19aafcbc176ada7ec5d0c0e406e6804af9bbd6cdb56ba8
Python
3,724
114
import os, re, time import glob #from ij import IJ from ini.trakem2 import ControlWindow, Project from ini.trakem2.display import Display, Patch, LayerSet from java.awt import Color from ij import IJ import math from ij.process import ImageStatistics as IS from ij import Prefs argv = getArgument() arg_array = argv....
e31da65f444a4bd3945351f496a98a214b783b5580ee14bef3aaa39243cb44d4
Python
3,724
117
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
cda36021642ae73061e10c98245add50060446d62c611308c5f3ff87a831d4e7
Python
3,732
115
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
9f014a50dac10931c91c8a11b3e1ba47c46375b18f3d22d10c5b1c6d69a1a46d
Python
3,735
105
""" Packing DeepPhospho desktop APP for: - Source code with required python environment """ import argparse import datetime import os import shutil from os.path import join as join_path def init_arg_parser(): parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter, description='''''') ...
5a2e379a7ba4c331bee5aeef7b703dd28bfcce7db0933556a07d834b82fa0b94
Python
3,736
133
import os import sys sys.path.append(os.path.dirname(__file__)) import numpy as np import torch from benchmark_tools import ( compare_results, get_test_data_path, profile_cpu, profile_cuda, time_filters, ) from brainglobe_utils.IO.image.load import read_with_dask from cellfinder.core.detect.filte...
3d2f4b91eaf15c9a12410674d3640a1d2ae9f757c031d46d15ff68d47a1094e9
Python
3,742
99
import keras import numpy as np from utils.utils import calculate_metrics from utils.utils import create_directory from utils.utils import check_if_file_exits import gc from utils.constants import UNIVARIATE_ARCHIVE_NAMES as ARCHIVE_NAMES import time class Classifier_NNE: def create_classifier(self, model_name,...
d5f8b02a535719fd84be849511b0a3fc8ea0d7829c7d15ad7350dd02ba045aed
Python
3,744
137
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
529969b1253381d0b23252cfc4d14d9f5ea9f4465721a5803eb6412a28c7fb8a
Python
3,758
114
import operator import warnings import numpy as np import pandas as pd class EventsCollection(object): def __init__(self, events): self.events = events def __len__(self): return len(self.events) def __getitem__(self, item): return self.events[item] def __su...
4bc887363ef6c362aa4298e481e0e85dad9a0730d25e42d67f35ac0cea020857
Python
3,759
101
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
82128085b3e9edfa7b4fe9b981696f0e3940291e105cc7593c0450752f8d1a83
Python
3,760
84
''' function [matched,unmatched] = corr_mols(set1_pos,set2_pos,tform_start,match_radius) % This function takes two input sets of positions and matches the points to % each other based on the initial transform tform_start and the radial % tolerance match_radius. set1 is the master set, and set2 is matched to % it. Both...
acc0bbd29c8e963c25729ca138437ad67debf85f4bdc50ab1e3e227f5806fce5
Python
3,769
124
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
58456f88e442e3970f9c0400810ac1953cad6075de0dc2069468cd9bc57dd0e8
Python
3,772
101
# @license # Copyright 2020 Google Inc. # 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...
c1a2a1ca90572c7f5d42aaa1d1cc841b6fafd2700ce02ee2893e91b46f7cc734
Python
3,777
126
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
eb5674aa460aabb4d246850446f7faf2960bce19e1ba94950749739100a8053f
Python
3,782
86
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
b843a04901b81e4d1485109cc18979b604f9dd15b845b49206e33aa3562eada4
Python
3,784
129
import numpy as np import matplotlib as mp mp.use('Agg') import matplotlib.pyplot as plt from os import listdir from os.path import isfile, join import os interpolation='nearest'#'bilinear'#'nearest' def loadData(data): weights = np.loadtxt(data) return(weights) def reshapeFields(w): nbrPost,nbrPre = np....
b017a18284611038387569ce766398e39bb38ecca58acf70ec35b9d0f4ea5c47
Python
3,787
70
import argparse from deep_phospho import proteomics_utils as prot_utils HelpMSG = ''' This script will transform datasets from some supported sources to DeepPhospho compatible training and prediction input format Usage 1: python generate_dataset.py train -f pathA -t file_type -o dirA this will transform the inpu...