sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
628b88b5b36bd34e55a2b9f31ee6dc63f65ee58de1c54c8cddda6eaa84d449bf | Python | 7,939 | 241 | # 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... |
cd6b78f82a158ea2aa122c67e2bb6e3baa4da924764bc4482867b70aa9e0e80e | Python | 7,942 | 288 | # 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... |
895402123466e6eb3f0a0240480a58c210dee4151db66551f2f09139bb0483bc | Python | 7,944 | 186 | # 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... |
533e100fbc7844796b6bb8b0f1fcca52d68248a13d8e00d096dc535d93c81f46 | Python | 7,968 | 243 | # 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... |
485d36756338e3df90b17c501322aae0b556cda9a569fed7794238e34b7129e7 | Python | 7,979 | 256 | # 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... |
8f76cca0f7ec8d86e7cf42f85b1c1a25fc4f68a4842df7c75fcff493663de22c | Python | 7,989 | 271 | from typing import Dict, List, Tuple, Type
import numpy as np
import pytest
from cellfinder.core.detect.filters.setup_filters import DetectionSettings
from cellfinder.core.detect.filters.volume.structure_detection import (
CellDetector,
Point,
get_non_zero_dtype_min,
get_structure_centre,
)
def coor... |
eb682923fc8b13a561912ee6ebbd8a82b738e5425e6bdf936d8e2d48a15b2a19 | Python | 7,994 | 227 | # 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... |
8e4476ca58b0776b3ede01a97f7da1fd5d9d662393b6efa64daf841c1fb5eb04 | Python | 8,007 | 136 | import tensorflow as tf
from ..utils.tf_utils import activation_fun
def UNET(nb_classes, inputs):
"""Compile a UNET model.
Args:
nb_classes: the number of classes to predict
inputs: the input tensor
Returns:
an output tensor, with 'nb_classes' of featuremaps
"""
padding... |
66a5c67600b9fac685bca9bd453b26e67921d71a9770c0472cf02649c4e882ee | Python | 8,015 | 254 | import tensorflow as tf
from tensorflow.python.keras.backend import zeros_like
gpus = tf.config.experimental.list_physical_devices("GPU")
if gpus:
try:
# Currently, memory growth needs to be the same across GPUs
for gpu in gpus:
tf.config.experimental.set_memory_growth(gpu, True)
... |
4469774f37eed59032445e1265e61ae83494984d48eb90fb410c977fab05f0aa | Python | 8,021 | 183 | import os
import numpy as np
import pandas as pd
from tqdm import tqdm
from rotation_analysis.analysis.field_of_view import FieldOfView
from rotation_analysis.analysis.probe.probe_cell import ProbeCell
from rotation_analysis.analysis.probe.ctxt_manager_decorator import temp_setattr
import matplotlib.pyplot a... |
4efa027357f29340b5835c2877b29b24e7c1fde8ca45d255f96bceb43ad6663d | Python | 8,027 | 242 | # 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... |
241af36bce0ec7a9d6a6331d32f193dfbb1282737f41391531d34800e53ae310 | Python | 8,044 | 220 | """ Generator module """
import torch.nn as nn
import torch
import torch.cuda
import onmt.inputters as inputters
from onmt.utils.misc import aeq
from onmt.utils import loss
class CopyGenerator(nn.Module):
"""Generator module that additionally considers copying
words directly from the source.
The main id... |
e3c5687cb1b74f379ca1a20bb28724d003bc8612c4e73280dc64bae42dea2122 | Python | 8,045 | 237 | # 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... |
7a033e0d3740a5949b1df5ae71aa33f9199c479a24f487d00d22f96d6707f4cb | Python | 8,050 | 180 | import numpy as np
from scipy import signal
from margrie_libs.margrie_libs.signal_processing.filters import box_smooth, diff
from margrie_libs.margrie_libs.signal_processing.measures import get_sd
from margrie_libs.margrie_libs.signal_processing.thresholding import find_levels, find_level_increase
from margrie_l... |
627df33da48e5695a09ae87973ddeebbe5014c834420b3d28fdf1e5aa9f382c4 | Python | 8,098 | 247 | # 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... |
cb28395901c306b2316563264645cb1d8db430cd03fb0465db619014801247bd | Python | 8,117 | 251 | # 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... |
db52f2d405aaa74cf1919ccb58450bd76d9fb8914e16558e1c3e0ca55228399e | Python | 8,117 | 214 | """
Visualize torus graph results (computed in Matlab by torus_graph_fit.m).
Creates Figure 3 in the paper.
"""
import scipy.special
import scipy.io
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import networkx as nx
import os.path
root_path = '/'.join(os.path.abspath(__file__).split('/')[:-1])... |
1ef613e28f57625f80834817e49ddc453db2ce52eec227bb0fa3b3982620c66b | Python | 8,130 | 141 | import pandas as pd
import modules.help_scripts as helpers
from collections import defaultdict,Counter
def group_by_exons(unique_blocksizes,iso_group_vals):
some_count = 0
some_dict = defaultdict(list)
for i in unique_blocksizes:
fixed_i = list(map(int,i.split(',')))
if len(some_dict) == 0:... |
6f24d49cf9cd6fbfa5b86ff717af42c45b4c0f008f87ffe41516dff0e3f662dd | Python | 8,135 | 213 | """
Visualize torus graph results (computed in Matlab by torus_graph_fit.m).
Creates Figure 3 in the paper.
"""
#%%
import scipy.special
import scipy.io
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import networkx as nx
import os.path
root_path = '/'.join(os.path.abspath(__file__).split('/')[:... |
6797a30a741c386d554301525b9a4be6dd9741e2dceb812e94278309ad9075ab | Python | 8,136 | 263 | # -*- coding: utf-8 -*-
"""
Functions for analyzing abagen expression data
"""
import os
from pathlib import Path
import nibabel as nib
import numpy as np
import pandas as pd
from scipy import ndimage
from scipy.spatial import distance_matrix
from scipy.stats import pearsonr, spearmanr
from sklearn.metrics import sil... |
b31ab5579324013ebac486ebf339a4804c9cc92329848a1b0b1d3fe470b1fd10 | Python | 8,142 | 219 | # 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... |
26ea1d3a041e51745e2ebb6479eca9c293058f8d847d70789c99a4dc21db0123 | Python | 8,143 | 235 | # 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... |
8361b314c21c28bea466eef5c373dab28f36749c234b78c1230ab3cf83fa48b0 | Python | 8,143 | 207 | import os
import sys
import copy
from collections import OrderedDict
import json
import dill
import logging
import torch
def load_config(config_path):
config_dir = os.path.dirname(config_path)
config_file = os.path.basename(config_path)
config_file_name = os.path.splitext(os.path.basename(config_path))[... |
0fff0c6990f03cf9663323cc0429b9d9549c5afc091b5607da27d8191196655e | Python | 8,152 | 236 | from dataclasses import dataclass, field
from enum import Enum, auto
from pathlib import Path
from typing import List, Optional
import numpy
import torch
from brainglobe_utils.cells.cells import Cell
from cellfinder.napari.input_container import InputContainer
from cellfinder.napari.utils import html_label_widget
@... |
ebc24e3f4add91d5f9347469422374f332edad7642ff758b4c4e2f7463ad6a3e | Python | 8,152 | 214 | import random
import numpy as np
import pandas as pd
import json
import zipfile
import gzip
import pickle
import torch
import string
try:
import od_models as od
import ffnn
except ModuleNotFoundError:
import deepgravity.od_models as od
import deepgravity.ffnn as ffnn
def load_data(db_dir, tile_size='... |
af91e2ec83eb5b38ac3b4df129b80e155b24c27204ed6c76835cb335f77a0b07 | Python | 8,169 | 180 | import os
import random
import copy
import ipdb
from collections import defaultdict
import numpy as np
import pandas as pd
DF_path = "/Users/admin/Documents/Project/IonIntensity/datasets/NewSpec"
def split_data(row_is_sample, data_path, train_ratio, dev_ratio, test_ratio=0, input_sep=None, to_csv=True, seed=666, ):... |
71a5f8a15da36c681cfc6770ef22834c1862c15a99a427d5942cbd7867157a15 | Python | 8,173 | 260 | # 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... |
7a0aef10a555a510dc63cc3be3ec7e33b3637598d91bd8f61ccbf95c435b4e39 | Python | 8,175 | 260 | # 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... |
56dc3737222715357165004b62173d988ed7646576b00685f4e4ac2fd0bab5d6 | Python | 8,188 | 257 | # 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... |
0ace394faead3caba7b46f4232ca5aef76ca9484402280fc716dccd90d4e61d9 | Python | 8,191 | 218 | # -*- coding: utf-8 -*-
"""
Simple example using BarGraphItem
"""
# import initExample ## Add path to library (just for examples; you do not need this)
import numpy as np
import pickle as p
import pandas as pd
from analysis_guis.dialogs.rotation_filter import RotationFilter
from analysis_guis.dialogs impor... |
5d0c84c22644870060b8db2ff91515c0f942218d8251f3c235b9d25eb87c292e | Python | 8,239 | 217 | # 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... |
4b023e068299591d58dcef45d99e4204e449e58ac299059e2b69a84c72ed9ce8 | Python | 8,265 | 237 | # 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... |
4e6b0bd0508ea47926fdbf55a85bf58d499ca63c154f56eb9973f2816ae6bfa1 | Python | 8,270 | 239 | # 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... |
a0d7ff29ae973667ac5888d196b3aa6e6329af762c960305cc3aaaf2a7a0d20c | Python | 8,279 | 206 | #===================================
# 1. customized transformation function
#===================================
def gaussian_noise1(img, mean=0, sigmas=(0.001, 0.1)):
'''
add gaussian noise to imge. (the probability that a noise appears is gaussian distributed )
input:
PIL_img, Gaussian Paramete... |
3cac95fb724120d14d3408936941c85562c74631a8563fa6e936e2752f520c05 | Python | 8,281 | 320 | # 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... |
6c023629942d6f04d077223078a686e216a01ca1827790a96b02758fcb7469d3 | Python | 8,291 | 242 | # 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... |
bcce7c12842f64c278776877b1eabdbdbe3a5eaf273a52718665fc9c0e2d944a | Python | 8,305 | 347 | # 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... |
c99859292629d96f10a6d8a26923d1b135fa5ddf095eb79e43dbeeed34da9718 | Python | 8,305 | 278 | # 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... |
5ba3ef8cb969cec26e0c738ed8b2807cf7ba9f7ae9dfff6ccbe5a661535305cb | Python | 8,308 | 270 | # 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... |
93d4f4f8e1f46b2aed3cacef0abd51c6d2d35192e9cc1776e64c6c6d119fb8fc | Python | 8,312 | 347 | # 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... |
478f7bb2066317df6ad99a7c85966f734f03375835926d4fde24eb9f5d8f8b5d | Python | 8,328 | 181 |
import dateutil
import os
import glob
from dateutil.parser import parse
import re
import yaml
import pandas as pd
from pykwalify.core import Core
SCHEMA_FILE = 'schema.yml'
DESIGNATED_MODEL_CACHE_KEY = 'designated_model_cache'
def validate_metadata_contents(metadata, filepath, cache):
# Initialize output
is... |
f9c35d0ec4e2ed439562e190b0fd6af0c0d9bdedbe73dfed3cffcfd434f9a091 | Python | 8,337 | 198 | """
ECG-based functions.
Author: Dr Raphael Vallat <raphaelvallat@berkeley.edu>, UC Berkeley.
Date: May 2022
"""
import logging
import numpy as np
import pandas as pd
from ._validation import _check_data_hypno
from .hypno import _hypno_find_periods
from .io import _restore_log_level, is_sleepecg_installed
logger =... |
b2eb78f8c5cc853fe7b367af9afe47431348ca9a3e6370496949d3c1da39a0ef | Python | 8,339 | 210 | # 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... |
0467adf333f5af813ab8129e6c279e680f6f00d008630a494c09bade169d0a6f | Python | 8,344 | 249 | # 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... |
28515ea93cf16905d7fc1467c6a5d82f519c0304a1a6f3002a7e73f7f8d70fcd | Python | 8,354 | 303 | # 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... |
2b366133151e2ab359384ed76d57575f4edc901cf3e97f75946895fd2baf12a3 | Python | 8,367 | 207 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Feb 10 10:22:10 2020
@authors:
Juan Francisco Mendoza Moreno (jfmendozam@gmail.com)
Luz Santamaría Granados (luzsantamariag@gmail.com)
"""
from SPARQLWrapper import SPARQLWrapper, JSON
import pandas as pd
class OntoTouTraData():
"""
... |
69c8a47fbe1c653d8088a93ecf872b8895d7f8078e12083aa64662dec046e7ce | Python | 8,367 | 156 | #!/usr/bin/env python3
# encoding: utf-8
'''
intron_scanner.intron_scanner -- shortdesc
intron_scanner.intron_scanner is a description
It defines classes_and_methods
@author: user_name
@copyright: 2020 organization_name. All rights reserved.
@license: license
@contact: user_email
@deffield updated: ... |
d43f6edb79bc9259e3876ff19768ea175f4fe42af4a41214917325a45d3e0bb4 | Python | 8,375 | 238 | import numpy as np
import logging
import scipy.ndimage.filters as filters
from imlib.pandas.query import column_as_array
from imlib.radial.distributions import vonmises_kde
from imlib.radial.temporal import angle_bin_occupancy
from imlib.array.misc import midpoints_of_series
import opendirection.tools.tools as tools
... |
66036a1023f635538fc5af852aa7e870a830ef047ef4edcb432953ff41e8a3a8 | Python | 8,402 | 241 | #!/usr/bin/python3
import os, math
import numpy as np
import pandas as pd
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import torch.optim as optim
torch.manual_seed(42)
from sklearn.metrics import roc_auc_score
from sklearn.model_selection import ParameterSam... |
86ac11b493bcea032e0e13d67b878fa2610b6ef720f074a5313b44131a85e5f2 | Python | 8,425 | 263 | # 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... |
87c4e12cc6888dc81f09e22dff79deb3bbd5844a251aed1ea9bbd913dd850e4b | Python | 8,425 | 264 | # 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... |
47c544c6a34a24ad22036e0b066854a6df8033c40d201130b67c91baf8350edd | Python | 8,453 | 263 | # 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... |
69c48ba281c02f9b17b274140ccb58a1ca8e8f8cafb8f99051b63d51330378ff | Python | 8,454 | 267 | # 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... |
85c13ffd073ef92e79d371b499d553abc0de8b207533697e4b6ce887bf349043 | Python | 8,463 | 278 | #!/usr/bin/env python
import sys, os, re
import collections
ORIG_TRANSDECODER_FLAG = False
def main():
import argparse
parser = argparse.ArgumentParser(description="transdecoder orf selection algorithm", formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument("--long_orfs_cds"... |
6659723acf47ff017e59c731bc7035c0cdd814baae4633e7082919e1c0a03dda | Python | 8,470 | 242 | from utils.constants import UNIVARIATE_ARCHIVE_NAMES as ARCHIVE_NAMES
from utils.utils import read_all_datasets
from utils.utils import transform_labels
from utils.utils import create_directory
from utils.utils import run_length_xps
from utils.utils import generate_results_csv
import utils
import numpy as np
import s... |
3b6f14d4cb2bad909d99334256cd9a8820e7c15254cea0b4a13398a32af7562b | Python | 8,475 | 215 | # 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... |
7ff3bf196438af517b35b0af71ce629376109401a4ca005ef90518aadbaf4e13 | Python | 8,504 | 297 | # 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... |
6af36f7bdefbaec74b2aebeb6a529711c10c00e454a3644a2a8a87ad0b6dd781 | Python | 8,505 | 271 | # 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... |
3c02ef6246a4499379f998fbb8065a20c9b44bfd339e45877857eaef8bdb67a2 | Python | 8,523 | 205 | """
Simulate some data from GP to test methods and evaluate errors.
In this case, the fitted GPCSD model matches the generating model in form.
Reproduces results from Section "Quantifying performance on repeated trials" in the paper.
"""
# %% Imports
import matplotlib.pyplot as plt
import autograd.numpy as np
import ... |
4eea90b7fc3ec025af5bf79d5d27413a6323bcfbb468ec4eb9130baad40cf58a | Python | 8,523 | 263 | # 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... |
f4f28b4d66165e6ee001b3710842b3cba31883287bc7cecbc3689622ab866500 | Python | 8,524 | 193 | import threading
import time
from Queue import Queue
import cv2 # Import OpenCV2
#from opto import Opto # Import modules provided by optotune
import hamamatsu_camera as hc
import os
import numpy as np
import sys
#TRY TO REPLACE THREADING WITH PROCESS: http://stackoverflow.com/questions/323972/is-there-any-wa... |
5d9c63b6e63a004f224aff269f82c37b944db353c83c1c23e7093066d87590d0 | Python | 8,529 | 215 | # 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... |
5a582184bd138bd889225dab5fde28f0e2bd0c4b607a0368b0583c5346a394cc | Python | 8,532 | 266 | # 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... |
92c5f120dc31aaefe77b281338b0045756977ea158cd808f5c2b8075e396fccf | Python | 8,559 | 271 | # 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... |
478d63855569c28359179e84ac44bcd1f9ccf1ef0e44ac04937f46fe090a8a59 | Python | 8,566 | 271 | # LICENSE: EXTERNAL
# MIT License
#
# Copyright (c) 2021 Chin-Wei Huang
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use... |
754a97ac199201548517bb9718b37f8eb2d76f32a8623b378267bf101fcf2117 | Python | 8,568 | 272 | # 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... |
36d34f79455ca8da93f60698be9914ff0b22c978c26489185bc80099151c4088 | Python | 8,570 | 271 | # LICENSE: EXTERNAL
# MIT License
#
# Copyright (c) 2021 Chin-Wei Huang
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use... |
60d125c5a125271fbf93199c0605512743705b078f11f7b191ff88960f2d67b6 | Python | 8,578 | 210 | """
Simulate some data from GP to test methods and evaluate errors.
In this case, the fitted GPCSD model matches the generating model in form.
Reproduces results from Section "Quantifying performance on repeated trials" in the paper.
"""
# %% Imports
import matplotlib.pyplot as plt
import autograd.numpy as np
import ... |
71923b2f2c20d34d11ce0ae4cdd33b1f5014d74573c11436c2d5356f800826c1 | Python | 8,586 | 231 | #!/usr/bin/env python3
"""Turn the dated measureHubSpace reports into one HTML page of charts.
The page loads hubSpaceReport.css and hubSpaceReport.js from its own directory,
so those two files must be installed next to it.
"""
import argparse
import datetime
import json
import os
import re
import socket
import sys
... |
de7448c574ea91f81cc78d656f78bedbeceb2beb127bfdab929da63a7fdee585 | Python | 8,595 | 207 | #!/usr/bin/python
# Preprocesses terms from behaviorally relevant cells of the RDoC matrix, including:
# (1) Construct
# (2) Description
# (3) Behavior
# (4) Self-Report
# (5) Paradigms
# Filter 2-5 by the lexicon of combined ontologies
import string, os
import pandas as pd
from nltk.stem import WordNetLemmatizer
fr... |
4700d832dceac3fe617a575e0c3e575da5e45ef8bc071a81805ec87a456b63a2 | Python | 8,670 | 212 | # -*- coding: utf-8 -*-
"""
Created on Thu Jul 18 12:25:40 2019
@author: Hari - hariteja1992@gmail.com
This code implements the state equations for a 2-DOF planar arm with
6 muscle actuators and non-linearities.
In the tensor representation, the 3 dimensions represent :
time tensor dimension (T) - 1
sample number ten... |
6459dac3b21fb8c2cf13e9c43ab7b0b9ce553f8baf637fb5cb5bf2d1ab3c3bd8 | Python | 8,675 | 301 | # 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... |
001eba19a69ec33dfde2c02fdefe38b253fcfb3e9812ec99b3200bb390d3757b | Python | 8,685 | 226 | # 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... |
d7aa0c8dd117f351bba0ab28928f7fec7682157bd59bc7046888d7ce98c5e593 | Python | 8,691 | 270 | # 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... |
6deae02d75d297454bd1f7471c296d4923068f3fe8afc54e0495ab5ccfe72f24 | Python | 8,692 | 218 | # 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... |
1f28bdb84cb69f5e30920d2d532c7983d71a8e52efef86c48a4a63e5e1aca496 | Python | 8,696 | 249 | import copy
import os
import json
import random
import re
import typing
import numpy as np
import pandas as pd
from deep_phospho.proteomics_utils import rapid_kit as rk
from deep_phospho.proteomics_utils.post_analysis import spectronaut as SN
from deep_phospho.proteomics_utils.post_analysis import maxquant as MQ
from... |
8e2c0806b29e39613b1b7204f90a67436c36ae046963ade966e33e2c00db4aec | Python | 8,698 | 362 | # 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... |
b5bd5bf26dcf514a79b3d1b6372160fef72b363a12894c67f8815de258006aee | Python | 8,721 | 294 | # 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... |
17047ea3c209a301a7aa1e425cc48bcbab47ae3e81c94cff4264be7c79c3d04e | Python | 8,745 | 297 | # 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... |
5f2babbd97ba8660eeccfa97b0f847066c061e99931517dba32676ff00290d31 | Python | 8,760 | 173 | import os
import random
import sys
import pandas as pd
import tensorflow as tf
sys.path.append('.')
from src.common import assign_label, get_dict_labels
tma_list_file = r'data\tma_wsi_data.xlsx'
tma_sheet_name = 'list'
tcga_list_file = r'data\tcga_wsi_data.xlsx'
tcga_sheet_name = 'list'
images_num ... |
58c67590178e0753e99eeaa3c728087ba68d45c70c6dfff67d9360b73681d3ea | Python | 8,775 | 278 | # 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... |
0d028fdb35b2e96a7c521a490b568f152eabd389b1b5e2cdcc37b3e3428ea4d4 | Python | 8,776 | 256 | # 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... |
0755332191e5991db2672eefaf4dab6b462f3eac4a287e54066c14cc181c19da | Python | 8,778 | 274 | # 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... |
62cd74a1bda9b140492296da336281a39871e2b29fbbef16d36cdb0339dd2120 | Python | 8,784 | 219 | #!/usr/bin/env python3
import os
import re
import xml.etree.ElementTree as ET
from collections import defaultdict
import difflib
def extract_notes_with_context(file_path):
"""Extract headnote and footnote content with line numbers from a TEI XML file"""
try:
tree = ET.parse(file_path)
root = tr... |
cfdc10e66d7b1686ddfff9e4c26ebcb059785de2804236c14c6006909ed4c82c | Python | 8,784 | 258 | # 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... |
4436564c618bb71fdd7efa2465874f6e327776936d14a6704bcb47e91ae0f965 | Python | 8,796 | 232 | from bisect import bisect_right
import torch
from torch.optim import Optimizer
class WarmupMultiStepLR(torch.optim.lr_scheduler._LRScheduler):
def __init__(
self,
optimizer,
milestones,
warmup_iters,
gamma=0.1,
warmup_factor=1.0 / 3,
... |
5a3cabb0b09036206de92ad30496f8f20101a4319c26948163ea3eb586b5ba50 | Python | 8,820 | 269 | # 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... |
90b3c07daa8896c722ec7b7b79b4ab7f71082ee71880829588f1d990daca5245 | Python | 8,820 | 279 | import numpy as np
import pytest
import torch
from brainglobe_utils.IO.cells import get_cells_xml
from brainglobe_utils.IO.image.load import read_with_dask
from pytest_mock.plugin import MockerFixture
from cellfinder.core.detect.detect import main
from cellfinder.core.tools.IO import fetch_from_registry, fetch_pooch_d... |
fb01e18710f4be1fbdc06b9db268d0592725f93f72a392ea64176a344784b720 | Python | 8,831 | 238 | # 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... |
6e81bd64e176cdd6f7e6c33f355495daca964a78de46932b8dd835ea7ffa20d8 | Python | 8,832 | 307 | #!/usr/bin/env python
import os, sys, re, math
import argparse
import numpy as np
import simuOpt
simuOpt.setOptions(quiet=True)
import simuPOP as sim
import math
from simuPOP.utils import *
#-----------------#
# Parse arguments #
#-----------------#
parser = argparse.ArgumentParser(description="Backward simulatio... |
6d1277ddb60810eddcc0ce8fd111df61c60c28791fd0ec98fd8b4168267d7f8a | Python | 8,837 | 307 | #!/usr/bin/env python
import os, sys, re, math
import argparse
import numpy as np
import simuOpt
simuOpt.setOptions(quiet=True)
import simuPOP as sim
import math
from simuPOP.utils import *
#-----------------#
# Parse arguments #
#-----------------#
parser = argparse.ArgumentParser(description="Backward simulatio... |
4158ba4a183de43505e320c9ac0520fbee0db56f9fd3da72d5bab3ac7c18955d | Python | 8,838 | 285 | from matplotlib import pyplot as plt
from PyQt5.QtCore import QObject, QVariant, pyqtSlot
# For type hinting
from analysis.cell import Cell
from analysis.block import Block
from analysis.event_detection.gui.image_providers import PyplotImageProvider
from PyQt5.QtWidgets import QApplication
from PyQt5.QtQml i... |
c97175fade6f7c4f98c52fd60064ce9148d40a1bd91a35a3f1aadb11485b488d | Python | 8,840 | 253 | # 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... |
acecdb2b757661a8a8709be226113ac0f927c823686e6a8f7daf4c52f6ab2833 | Python | 8,842 | 222 | from .sn_constant import SNLibraryTitle
import os
import re
import pandas as pd
import numpy as np
from deep_phospho.proteomics_utils import rapid_kit
from deep_phospho.proteomics_utils import calc
def filter_inten_neutral_loss_pos(modpep, intens,
exclude_mod_in_pep='[Phospho (STY... |
6bf1391231516b4440f53488c2a1654031bcdcff6a9b372e5ee72bc8842f44a2 | Python | 8,868 | 279 | # 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... |
f3b2f78f90d536ace06d78dfa15f2afe65ad72547bab4d14fb88b1dd89a75369 | Python | 8,871 | 210 | # 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... |
afd840a5b62999cf7bc579c1b908966412329c2235363ef109079e3a51932b34 | Python | 8,880 | 329 | # 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... |
5d6741756be800ac786bcacdff14a19e2a6dbb84b80adda617e01fb28095e7a4 | Python | 8,885 | 152 | import numpy as np
import tensorflow as tf
from utils.layers import PrimaryCaps, FCCaps, Length, Mask
from keras import regularizers
def efficient_capsnet_graph(input_shape):
"""
Efficient-CapsNet graph architecture.
Parameters
----------
input_shape: list
network input shape
"""
... |
4f8762334de249e6cacf6832128819d2281a9c637fea594b2aff0cb4b880cf93 | Python | 8,889 | 201 | import numpy as np
import matplotlib as mp
import matplotlib.pyplot as plt
import matplotlib.colors as colors
from matplotlib.colors import LogNorm
from mpl_toolkits.axes_grid1 import make_axes_locatable
from matplotlib.colors import LinearSegmentedColormap
#------------------------------------------------------------... |
dcd1238363f04d360b3b184929b9238d1242ae6623bc29f37a15b3e11b6ad35b | Python | 8,897 | 257 | # 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.