repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
AndreSlavescu/OSSDC-VisionAI-Core | [
"8f4942c91aa8164401fbca192180d6f064a18e39"
] | [
"race-ossdc-org_webrtc_processing.py"
] | [
"import argparse\nimport asyncio\nimport logging\nimport os\nimport random\nimport numpy as np\nimport cv2\nfrom av import VideoFrame\nimport traceback \n\nfrom aiortc import (\n RTCIceCandidate,\n RTCPeerConnection,\n RTCSessionDescription,\n RTCConfiguration,\n RTCIceCandidate,\n RTCIceServer,\n... | [
[
"numpy.average"
]
] |
berserkrambo/fcos-pytorch | [
"a064eccf6d45fc85da401151dcefe7a3b01a065b"
] | [
"dataset.py"
] | [
"import os\n\nimport torch\nfrom torchvision import datasets\n\nfrom boxlist import BoxList\n\n\ndef has_only_empty_bbox(annot):\n return all(any(o <= 1 for o in obj['bbox'][2:]) for obj in annot)\n\n\ndef has_valid_annotation(annot):\n if len(annot) == 0:\n return False\n\n if has_only_empty_bbox(a... | [
[
"torch.as_tensor",
"torch.tensor"
]
] |
exeex/pytorch-OpCounter | [
"c9b6f6335457aefbfd7e19fd316bc6fa46066135"
] | [
"thop/count_hooks.py"
] | [
"import argparse\n\nimport torch\nimport torch.nn as nn\n\nmultiply_adds = 1\n\n\ndef count_convNd(m, x, y):\n x = x[0]\n cin = m.in_channels\n batch_size = x.size(0)\n\n kernel_ops = m.weight.size()[2:].numel()\n bias_ops = 1 if m.bias is not None else 0\n ops_per_element = kernel_ops + bias_ops\... | [
[
"torch.prod",
"torch.Tensor"
]
] |
CrackAD/cs207-FinalProject | [
"1a50b9b9d2966029c77ef2f065c3ee62efd6742e"
] | [
"EasyDiff/var.py"
] | [
"import numpy as np\nimport pytest\nclass Var():\n '''\n This class defines a multivariate dual number\n '''\n def __init__(self, val, dual_paras):\n \"\"\" constructor for Var class\n\n INPUT\n =======\n val: value of the input variable\n dual_paras: partial derivativ... | [
[
"numpy.log",
"numpy.sqrt",
"numpy.arctan",
"numpy.arcsin",
"numpy.cos",
"numpy.arccos",
"numpy.sin",
"numpy.tan",
"numpy.exp"
]
] |
fossabot/turicreate | [
"7f07ce795833d0c56c72b3a1fb9339bed6d178d1",
"7f07ce795833d0c56c72b3a1fb9339bed6d178d1"
] | [
"src/nnvm/tvm/topi/recipe/conv/test_conv2d_hwcn_map.py",
"src/unity/python/turicreate/test/test_graph_analytics.py"
] | [
"\"\"\"Example code to do convolution.\"\"\"\nimport os\nimport numpy as np\nimport scipy.signal\nimport tvm\nfrom tvm.contrib import nvcc\nimport topi\nfrom topi.nn.util import get_const_tuple\n\nTASK = \"conv2d_hwcn_map\"\nUSE_MANUAL_CODE = False\n\n@tvm.register_func\ndef tvm_callback_cuda_compile(code):\n pt... | [
[
"numpy.maximum"
],
[
"pandas.util.testing.assert_frame_equal"
]
] |
MarsZhaoYT/SAR2Opt-Heterogeneous-Dataset | [
"af9428453028456d834d3268360d23d2652baf13",
"af9428453028456d834d3268360d23d2652baf13",
"af9428453028456d834d3268360d23d2652baf13"
] | [
"CUT/util/visualizer.py",
"CUT/metric/psnr_ssim.py",
"ASGIT/models/attn_cycle_gan_model.py"
] | [
"import numpy as np\nimport os\nimport sys\nimport ntpath\nimport time\nfrom . import util, html\nfrom subprocess import Popen, PIPE\n# try:\n#from func_timeout import func_timeout, FunctionTimedOut\n# except ImportError:\n# print(\"module func_timeout was not installed. Please install func_timeout using pip ins... | [
[
"numpy.array",
"numpy.random.randint"
],
[
"numpy.std",
"numpy.array",
"numpy.mean"
],
[
"torch.ones",
"torch.cat",
"torch.zeros",
"torch.no_grad",
"torch.nn.L1Loss"
]
] |
glhr/gammatone | [
"14fdcd37c0c3054e5c85ed8c53f2cdec6e5d2b99"
] | [
"tests/test_specgram.py"
] | [
"#!/usr/bin/env python3\n# Copyright 2014 Jason Heeris, jason.heeris@gmail.com\n#\n# This file is part of the gammatone toolkit, and is licensed under the 3-clause\n# BSD license: https://github.com/detly/gammatone/blob/master/COPYING\nfrom mock import patch\nimport nose\nimport numpy as np\nimport scipy.io\nfrom p... | [
[
"numpy.asarray",
"numpy.abs",
"numpy.allclose"
]
] |
david-zwicker/sensing-normalized-results | [
"5b64ab34d400dcf457626e1ad244c2b4a889ac80",
"5b64ab34d400dcf457626e1ad244c2b4a889ac80",
"5b64ab34d400dcf457626e1ad244c2b4a889ac80",
"5b64ab34d400dcf457626e1ad244c2b4a889ac80"
] | [
"src/binary_response/library_theory.py",
"src/binary_response/tests.py",
"src/adaptive_response/adaptive_threshold/at_numeric.py",
"figures/calc_mutual_information_distributed.py"
] | [
"'''\nCreated on Sep 10, 2015\n\n@author: David Zwicker <dzwicker@seas.harvard.edu>\n'''\n\nfrom __future__ import division\n\nimport logging\n\nimport numpy as np\n\nfrom utils.math.distributions import lognorm_mean, DeterministicDistribution\n\n__all__ = ['LibraryLogNormal']\n\n\n\nclass LibraryLogNormal(object):... | [
[
"numpy.log",
"numpy.exp",
"numpy.sqrt"
],
[
"numpy.random.rand",
"numpy.eye",
"numpy.fill_diagonal",
"numpy.full"
],
[
"numpy.diag",
"numpy.dot",
"numpy.log2",
"numpy.sqrt",
"numpy.arange",
"numpy.flatnonzero",
"numpy.full",
"numpy.outer",
"n... |
zozo123/tcrdist3 | [
"49c6554f16ad7f20f50d7303a8ac75268f5f601f"
] | [
"tcrdist/centers.py"
] | [
"\"\"\"\ncenters \n\nModule contains functions for evaluating TCRs as center(oids) of meta-clonotypes.\n\nfind_center \n\"\"\"\nimport warnings \nimport numpy as np\nfrom tcrdist.ecdf import distance_ecdf\n\ndef calc_radii(tr, tr_bkgd, chain = 'beta', ctrl_bkgd = 10**-5, use_sparse = True, max_radius=50, chunk_size... | [
[
"pandas.concat",
"pandas.read_csv",
"pandas.Series",
"pandas.DataFrame",
"numpy.array",
"numpy.where",
"numpy.sum"
]
] |
RobertClay/Paper1 | [
"d08bbed37add5a128db20c24e2eea0727508dbd7",
"d08bbed37add5a128db20c24e2eea0727508dbd7"
] | [
"minos/data_generation/US_full_data_parser.py",
"minos/data_generation/US_format_raw.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Feb 17 14:12:06 2021\n\n@author: robertclay\n\nThis file is for parsing the understanding societies data over all waves into \na persistent data frame containing immutable person attributes for all\nagents over all times and variable frames co... | [
[
"pandas.read_stata"
],
[
"numpy.arange",
"numpy.random.randint"
]
] |
xinyual/horovod | [
"65ae9afd05b854bc0dc9719dc246454edadf9487"
] | [
"test/parallel/test_torch.py"
] | [
"# Copyright 2018 Uber Technologies, Inc. All Rights Reserved.\n# Modifications copyright (C) 2019 Intel Corporation\n# Modifications copyright (C) 2020, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance... | [
[
"torch.set_default_tensor_type",
"torch.cat",
"torch.zeros",
"torch.load",
"torch.nn.Embedding",
"torch.FloatTensor",
"torch.cuda.is_available",
"torch.allclose",
"torch.save",
"torch.ones",
"torch.eq",
"torch.randn",
"torch.tensor",
"torch.nn.functional.rel... |
AI-App/Python-Control | [
"c2f6f8ab94bbc8b5ef1deb33c3d2df39e00d22bf",
"c2f6f8ab94bbc8b5ef1deb33c3d2df39e00d22bf"
] | [
"control/matlab/wrappers.py",
"control/tests/descfcn_test.py"
] | [
"\"\"\"\nWrappers for the MATLAB compatibility module\n\"\"\"\n\nimport numpy as np\nfrom ..statesp import ss\nfrom ..xferfcn import tf\nfrom ..ctrlutil import issys\nfrom ..exception import ControlArgument\nfrom scipy.signal import zpk2tf\nfrom warnings import warn\n\n__all__ = ['bode', 'nyquist', 'ngrid', 'dcgain... | [
[
"scipy.signal.zpk2tf"
],
[
"numpy.linspace",
"numpy.clip",
"numpy.logspace",
"numpy.cos",
"numpy.sin",
"numpy.testing.assert_almost_equal"
]
] |
mjpolak/K3D-jupyter | [
"539c53cab580d55b8841bb87589ab3d4cf95bdb0",
"539c53cab580d55b8841bb87589ab3d4cf95bdb0",
"539c53cab580d55b8841bb87589ab3d4cf95bdb0"
] | [
"k3d/objects.py",
"k3d/test/test_visual_points.py",
"docs/source/showcase/lines.py"
] | [
"import warnings\n\nimport ipywidgets as widgets\nimport numpy as np\nfrom traitlets import (\n Any,\n Bool,\n Bytes,\n Dict,\n Float,\n Int,\n Integer,\n List,\n TraitError,\n Unicode,\n Union,\n validate,\n)\nfrom traittypes import Array\n\nfrom ._version import __version__ as ... | [
[
"numpy.dtype",
"numpy.array",
"numpy.stack",
"numpy.finfo"
],
[
"numpy.arange",
"numpy.array",
"numpy.linspace"
],
[
"numpy.vstack",
"numpy.cos",
"numpy.linspace",
"numpy.sin"
]
] |
richiurb/physics | [
"46e8a44790a7c6c29af11f29a846057026348cd2"
] | [
"heat_distribution_in_the_rod/graphic.py"
] | [
"import tkinter\nimport matplotlib.pyplot as plt\nimport matplotlib.ticker as ticker\nfrom config import Config\nfrom matrix import Matrix\n\n\nclass Graphic:\n TITLE = \"Heat distribution in the rod(t = \"\n\n def __init__(self, a, u):\n self.root = tkinter.Tk()\n self.root.title(self.TITLE + s... | [
[
"matplotlib.ticker.MultipleLocator",
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots"
]
] |
lucasiscovici/cvopt | [
"b74dcdc07a66456c1a52dc4a13df20f2d5fe7071",
"b74dcdc07a66456c1a52dc4a13df20f2d5fe7071",
"b74dcdc07a66456c1a52dc4a13df20f2d5fe7071"
] | [
"cvopt_study/model_selection/_search.py",
"cvopt_study/model_selection/_forest.py",
"cvopt_study/utils/_logger.py"
] | [
"import numpy as np\n\nfrom hyperopt import fmin, tpe, hp\nfrom GPyOpt.methods import BayesianOptimization\nimport GPyOpt#.optimization.optimizer as GPyOO\nfrom GPyOpt.optimization.optimizer import OptLbfgs, OptDirect, OptCma, Optimizer\nfrom GPyOpt.core.errors import InvalidVariableNameError\nfrom ._base import ... | [
[
"numpy.atleast_2d",
"numpy.random.seed"
],
[
"numpy.reshape"
],
[
"sklearn.ensemble.RandomForestRegressor",
"numpy.nanargmax",
"numpy.isnan",
"pandas.DataFrame",
"numpy.round",
"numpy.std",
"numpy.nanargmin",
"numpy.mean",
"numpy.array",
"sklearn.preproc... |
jhchung/summary-gwas-imputation | [
"f860475fdd714de90fa66a1c6e5e2ff59d631d97",
"f860475fdd714de90fa66a1c6e5e2ff59d631d97"
] | [
"src/slice_gwas_by_region.py",
"src/genomic_tools_lib/data_management/TextFileTools.py"
] | [
"#!/usr/bin/env python\n__author__ = \"alvaro barbeira\"\nimport os\nimport logging\n\nimport numpy\nimport pandas\n\nfrom genomic_tools_lib import Utilities, Logging\n\ndef run(args):\n if os.path.exists(args.output):\n logging.info(\"%s exists. Nope.\", args.output)\n return\n\n logging.info(\... | [
[
"numpy.isnan",
"pandas.read_table",
"pandas.concat"
],
[
"pandas.read_table",
"numpy.array",
"pandas.to_numeric",
"pandas.DataFrame"
]
] |
KiLJ4EdeN/DeepCOVID | [
"3df626f09658c4c0d8f91a00886d9ab04106154b"
] | [
"create_dataset.py"
] | [
"# for this to work download the dataset from the provided link.\n# then cd in the Images_Processed directory.\n\nimport os\nimport numpy as np\nimport cv2\nfrom scipy.io import savemat\n\nC = np.ones((349,))\nN = np.zeros((397,))\nlabels = np.concatenate((C, N), axis=0)\ncovid = os.listdir('CT_COVID')\nn_covid = o... | [
[
"numpy.ones",
"numpy.concatenate",
"scipy.io.savemat",
"numpy.array",
"numpy.zeros"
]
] |
etalab-ia/pseudo_conseil_etat | [
"c2d8be0289049fe29c3cf5179415a8452605c22e"
] | [
"src/results/conll_evaluate_results.py"
] | [
"'''\nEvaluates the performance of a CoNLL format annotated file. Also shows the errors that were found in the file.\nThe file should have three columns (token, true tag, predicted tag).\n\nUsage:\n conll_evaluate_results.py <conll_file_path> <output_results_path> [options]\n\nArguments:\n <conll_file_path> ... | [
[
"pandas.read_csv"
]
] |
NervanaSystems/ngraph-python | [
"5e5c9bb9f24d95aee190b914dd2d44122fc3be53",
"5e5c9bb9f24d95aee190b914dd2d44122fc3be53"
] | [
"examples/deepspeech/data.py",
"examples/video-c3d/video_c3d.py"
] | [
"from __future__ import division\nimport numpy as np\nfrom ngraph.frontends.neon.aeon_shim import AeonDataLoader\nfrom ngraph.util.persist import get_data_cache_or_nothing\n\n\ndef make_aeon_dataloader(manifest_filename, audio_length, transcript_length,\n sample_freq_hz=16000, frame_length=.... | [
[
"numpy.reshape",
"numpy.prod",
"numpy.clip"
],
[
"numpy.arange",
"numpy.mean"
]
] |
dirkcgrunwald/SAM | [
"0478925c506ad38fd405954cc4415a3e96e77d90"
] | [
"scripts/find_best.py"
] | [
"import numpy as np\nimport argparse\nfrom sklearn.model_selection import cross_val_score\nfrom sklearn import metrics\nfrom sklearn.metrics import (precision_recall_curve, average_precision_score,\n roc_curve, roc_auc_score)\n \nfrom sklearn.ensemble import R... | [
[
"numpy.count_nonzero",
"sklearn.metrics.roc_auc_score",
"numpy.loadtxt",
"sklearn.ensemble.RandomForestClassifier"
]
] |
youngsjjn/SFNet | [
"7de986398992aa2c8d3d50474b04c4c48235e075"
] | [
"util/dataset.py"
] | [
"import os\nimport os.path\nimport cv2\nimport numpy as np\n\nfrom torch.utils.data import Dataset\nfrom network.datasets import edge_utils as edge_utils\nimport torch\n\n\nIMG_EXTENSIONS = ['.jpg', '.jpeg', '.png', '.ppm', '.bmp', '.pgm']\n\n\ndef is_image_file(filename):\n filename_lower = filename.lower()\n ... | [
[
"numpy.float32"
]
] |
neuro-ml/deep_pipe | [
"fa559630c20548105884151e973dc40c88531891",
"fa559630c20548105884151e973dc40c88531891"
] | [
"dpipe/im/tests/test_preprocessing.py",
"dpipe/dataset/wrappers.py"
] | [
"import unittest\nimport numpy as np\n\nfrom dpipe.im.preprocessing import *\n\n\nclass TestPrep(unittest.TestCase):\n def setUp(self):\n self.x = np.random.rand(3, 10, 10) * 2 + 3\n\n def test_normalize_image(self):\n x = normalize(self.x)\n np.testing.assert_almost_equal(0, x.mean())\n ... | [
[
"numpy.testing.assert_equal",
"numpy.array",
"numpy.random.rand"
],
[
"numpy.array",
"numpy.sum"
]
] |
ys3x/deep-learning | [
"39a9191e05e1b7005456cacf6b84e1439f8252ec"
] | [
"first-neural-network/my_answers.py"
] | [
"import numpy as np\n\n\nclass NeuralNetwork(object):\n def __init__(self, input_nodes, hidden_nodes, output_nodes, learning_rate):\n # Set number of nodes in input, hidden and output layers.\n self.input_nodes = input_nodes\n self.hidden_nodes = hidden_nodes\n self.output_nodes = out... | [
[
"numpy.dot",
"numpy.random.normal",
"numpy.exp",
"numpy.zeros"
]
] |
sunnysinghnitb/tensorflow | [
"e3aa49701d60a006d09786f5a240530ee5f47e25"
] | [
"tensorflow/python/keras/engine/training_utils.py"
] | [
"# Copyright 2018 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"numpy.expand_dims",
"numpy.asarray",
"tensorflow.python.keras.backend.placeholder",
"tensorflow.python.keras.metrics.MeanMetricWrapper",
"numpy.concatenate",
"tensorflow.python.keras.losses.MeanSquaredError",
"tensorflow.python.eager.context.executing_eagerly",
"numpy.reshape",
... |
EulerWong/director | [
"e30a56ba3a3bac82216adb0f8cc29d1fae8cb74b"
] | [
"src/python/director/segmentationroutines.py"
] | [
"''' Routines and Fitting algorithms\n Fitting: means where ALL other non-object points\n have been removed, determining the transform frame\n of the object\n\n Segment: means seperating clusters from a single cloud\n'''\n\n\nfrom director.filterUtils import *\nimport director.visualization as vis\nfrom dir... | [
[
"numpy.dot",
"numpy.min",
"numpy.asarray",
"numpy.nanmin",
"numpy.linalg.norm",
"numpy.max",
"numpy.cross",
"numpy.array",
"numpy.zeros"
]
] |
intheworld/incubator-tvm | [
"c07aa37aeb602e1ade7e26061d0fd3e908dd3791",
"c07aa37aeb602e1ade7e26061d0fd3e908dd3791"
] | [
"tests/python/driver/tvmc/conftest.py",
"tests/python/unittest/test_tir_intrin.py"
] | [
"# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y... | [
[
"torch.jit.save",
"tensorflow.keras.applications.resnet50.ResNet50",
"numpy.expand_dims",
"numpy.savez",
"numpy.asarray",
"torch.randn",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.InputLayer",
"tensorflow.keras.layers.Flatten... |
Brian-ning/HMNE | [
"1b4ee4c146f526ea6e2f4f8607df7e9687204a9e",
"1b4ee4c146f526ea6e2f4f8607df7e9687204a9e"
] | [
"Source/tools/Layer_Distance_Calculation/78/draw_78.py",
"Source/AMNE.py"
] | [
"#coding: utf-8\n\nimport pickle\nimport networkx as nx\nimport matplotlib.pyplot as plt\n\n\nlayers = ['0_communication.txt','1_financial.txt','2_operationalaggregated.txt','3_trustaggregated.txt']\ngraphs = []\n\n# nodes_infor = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 2... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.figure"
],
[
"torch.load",
"torch.from_numpy",
"torch.tensor",
"torch.nn.BCELoss",
"torch.mul",
"torch.cuda.is_available"
]
] |
darwinbeing/deepdriving-tensorflow | [
"036a83871f3515b2c041bc3cd5e845f6d8f7b3b7",
"036a83871f3515b2c041bc3cd5e845f6d8f7b3b7",
"036a83871f3515b2c041bc3cd5e845f6d8f7b3b7"
] | [
"python/modules/deep_learning/layer/conv/CLogFeatureMap.py",
"python/modules/deep_learning/layer/dense/CDense.py",
"python/modules/deep_learning/trainer/CTrainer.py"
] | [
"# The MIT license:\n#\n# Copyright 2017 Andre Netzeband\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation\n# the rights to use, copy,... | [
[
"tensorflow.variable_scope",
"tensorflow.identity"
],
[
"tensorflow.matmul",
"tensorflow.reshape",
"tensorflow.add",
"numpy.prod",
"tensorflow.summary.histogram"
],
[
"tensorflow.norm",
"tensorflow.truncated_normal",
"tensorflow.train.start_queue_runners",
"tens... |
pribalta/MolBART | [
"c2afec482883df370f4ce99e2ebdd98bce6bcc55",
"c2afec482883df370f4ce99e2ebdd98bce6bcc55",
"c2afec482883df370f4ce99e2ebdd98bce6bcc55"
] | [
"test/pre_train_model_test.py",
"molbart/data/datasets.py",
"molbart/predict.py"
] | [
"import pytest\nimport torch\nimport random\n\nfrom molbart.decoder import DecodeSampler\nfrom molbart.tokeniser import MolEncTokeniser\nfrom molbart.models.pre_train import BARTModel\n\nregex = \"\\[[^\\]]+]|Br?|Cl?|N|O|S|P|F|I|b|c|n|o|s|p|\\(|\\)|\\.|=|#|-|\\+|\\\\\\\\|\\/|:|~|@|\\?|>|\\*|\\$|\\%[0-9]{2}|[0-9]\"\... | [
[
"torch.manual_seed",
"torch.tensor"
],
[
"pandas.concat",
"pandas.read_pickle",
"pandas.read_csv"
],
[
"torch.no_grad"
]
] |
alessandro-gentilini/geostatsmodels | [
"4f50fbd0b53a504050ac6df8dc1db84f23836649"
] | [
"geostatsmodels/variograms.py"
] | [
"#!/usr/bin/env python\nimport numpy as np\n\nimport geostatsmodels.utilities as utilities\n\n\ndef lagindices(pwdist, lag, tol):\n '''\n Input: (pwdist) square NumPy array of pairwise distances\n (lag) the distance, h, between points\n (tol) the tolerance we are comfortable with ... | [
[
"numpy.cov",
"numpy.array",
"numpy.where",
"numpy.mean"
]
] |
shineware/KOMORANPy | [
"b8c1904b42a0bdfcd26c4c85cb37cd8cb48ffb6a"
] | [
"KOMORANPy/training/model/transition.py"
] | [
"import numpy as np\nimport pickle\nimport gzip\n\n\nclass Transition:\n def __init__(self, size):\n self.score_matrix = np.full((size, size), -np.inf)\n\n def put(self, prev_pos_id, cur_pos_id, score):\n self.score_matrix[prev_pos_id][cur_pos_id] = score\n\n def get(self, prev_pos_id, cur_po... | [
[
"numpy.full"
]
] |
Joshuaalbert/IonoTomo | [
"9f50fbac698d43a824dd098d76dce93504c7b879",
"9f50fbac698d43a824dd098d76dce93504c7b879"
] | [
"src/ionotomo/utils/gaussian_process_expected_improvement.py",
"src/ionotomo/scripts/2d_vs_3d/temporal_powerspectrum.py"
] | [
"import numpy as np\nimport pylab as plt\nfrom scipy.special import erf\nfrom scipy.integrate import simps\nfrom scipy.linalg import cho_solve\n#from ChoSolver import choSolve, choBackSubstitution\n \ndef styblinsky(x):\n return (x[0]**4 - 16*x[0]**2 + 5*x[0] + x[1]**4 - 16*x[1]**2 + 5*x[1])/2.\n\ndef ros... | [
[
"numpy.random.lognormal",
"numpy.diag",
"numpy.sqrt",
"numpy.linspace",
"numpy.max",
"numpy.mean",
"numpy.exp",
"numpy.random.randint",
"numpy.hstack",
"numpy.ones_like",
"numpy.arange",
"numpy.eye",
"scipy.linalg.cho_solve",
"numpy.copy",
"numpy.std",
... |
rose-brain/deepvariant | [
"59687bab3a93ba0674cc21edf71caf336b01f138"
] | [
"deepvariant/core/python/vcf_writer_wrap_test.py"
] | [
"# Copyright 2017 Google Inc.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# 1. Redistributions of source code must retain the above copyright notice,\n# this list of conditions and the following dis... | [
[
"tensorflow.gfile.GFile"
]
] |
tsutterley/model-harmonics | [
"17f6842d5fa1f2abf42caea51cfb09b6a4b2ee30",
"17f6842d5fa1f2abf42caea51cfb09b6a4b2ee30"
] | [
"ECCO/ecco_read_realtime.py",
"ECCO/ecco_read_llc_tiles.py"
] | [
"#!/usr/bin/env python\nu\"\"\"\necco_read_realtime.py\nWritten by Tyler Sutterley (10/2021)\n\nReads 12-hour ECCO ocean bottom pressure data from JPL\nCalculates monthly anomalies on an equirectangular grid\n https://ecco.jpl.nasa.gov/drive/files/NearRealTime/Readme\n https://ecco.jpl.nasa.gov/drive/files/Ne... | [
[
"numpy.abs",
"numpy.nonzero",
"numpy.unique",
"numpy.arange",
"numpy.squeeze",
"numpy.cos",
"numpy.ones",
"numpy.sin",
"numpy.copy",
"numpy.array",
"numpy.ma.zeros",
"numpy.zeros",
"numpy.sum",
"numpy.isclose"
],
[
"numpy.logical_not",
"numpy.non... |
hongzhili/pretrained-models.pytorch | [
"40b9212ce38b520dba7335645ad1dd41f3e857b0"
] | [
"pretrainedmodels/models/senet.py"
] | [
"\"\"\"\nResNet code gently borrowed from\nhttps://github.com/pytorch/vision/blob/master/torchvision/models/resnet.py\n\"\"\"\n\nfrom collections import OrderedDict\nimport math\n\nimport torch.nn as nn\nfrom torch.utils import model_zoo\n\n__all__ = ['SENet', 'senet154', 'se_resnet50', 'se_resnet101', 'se_resnet15... | [
[
"torch.nn.Sequential",
"torch.nn.Dropout",
"torch.nn.Conv2d",
"torch.nn.Sigmoid",
"torch.nn.Linear",
"torch.nn.MaxPool2d",
"torch.nn.AdaptiveAvgPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU",
"torch.utils.model_zoo.load_url"
]
] |
ChrisRenka/Tumor3D | [
"32b7fa4a8b5f679211f6a383ef6d9a4697dd60c2"
] | [
"plot_vasos.py"
] | [
"from mpl_toolkits.mplot3d import Axes3D\r\nimport matplotlib.pyplot as plt\r\nimport csv\r\n\r\nprint (\"Número da simulação:\")\r\nnSim = input()\r\nprint (\"Número do frame:\")\r\nnFrame = input()\r\n\r\nfig = plt.figure()\r\nax = fig.add_subplot(111, projection = '3d')\r\n\r\nxs = []\r\nys = []\r\nzs = []\r\n\r... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
Pivoz/Machine-Learning-Collection | [
"ee0b0f0718fac7810bb660713618605c58eb282e"
] | [
"ML/Pytorch/Basics/albumentations_tutorial/segmentation.py"
] | [
"import cv2\nimport albumentations as A\nimport numpy as np\nfrom utils import plot_examples\nfrom PIL import Image\n\nimage = Image.open(\"images/elon.jpeg\")\nmask = Image.open(\"images/mask.jpeg\")\nmask2 = Image.open(\"images/second_mask.jpeg\")\n\ntransform = A.Compose(\n [\n A.Resize(width=1920, hei... | [
[
"numpy.array"
]
] |
dmarvs/bfg-nets | [
"0c8e7f469b6a50c7b167ead98cb545d238dee214"
] | [
"bfgn/reporting/visualizations/model_performance.py"
] | [
"import logging\nfrom typing import List\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport sklearn.metrics\nfrom matplotlib import gridspec\nfrom mpl_toolkits.axes_grid1 import make_axes_locatable\n\nfrom bfgn.reporting import samples\nfrom bfgn.reporting.visualizations import colormaps, subplots\n\n_l... | [
[
"numpy.nanmax",
"matplotlib.pyplot.tight_layout",
"numpy.abs",
"numpy.isfinite",
"numpy.arange",
"matplotlib.pyplot.subplots",
"numpy.ceil",
"numpy.argmax",
"matplotlib.pyplot.subplot",
"numpy.nanmean",
"matplotlib.gridspec.GridSpec",
"matplotlib.pyplot.figure"
]
... |
WachiRatip/MLPipe_workshop | [
"c25b4ebbe5e095e3dace0f1ef9b4e77be551a301"
] | [
"code/regression.py"
] | [
"import pandas as pd\r\nfrom sklearn.preprocessing import StandardScaler\r\nfrom sklearn.model_selection import KFold\r\nfrom sklearn.metrics import mean_squared_error\r\nfrom sklearn.svm import SVR, LinearSVR, NuSVR\r\nfrom sklearn.neighbors import KNeighborsRegressor\r\nfrom sklearn.neural_network import MLPRegre... | [
[
"pandas.read_csv",
"sklearn.linear_model.HuberRegressor",
"sklearn.linear_model.ElasticNet",
"sklearn.model_selection.KFold",
"sklearn.svm.NuSVR",
"sklearn.neighbors.KNeighborsRegressor",
"sklearn.svm.SVR",
"sklearn.ensemble.GradientBoostingRegressor",
"sklearn.gaussian_process... |
yerfor/Soft-DRGN | [
"0c96d1ea295077b949229261c37d8dde25001a03"
] | [
"scenarios/continuous_uav_base/render_utils.py"
] | [
"import pygame\nimport numpy as np\nimport cv2\n\nRED = (255, 0, 0)\nGREEN = (0, 255, 0)\nBLUE = (0, 0, 255)\nBLACK = (0, 0, 0)\nWHITE = (255, 255, 255)\nYELLOW = (255, 255, 0)\nBROWN = (184, 134, 11)\nGRAY = (169, 169, 169)\nDISPLAY_BATTERY = True\n\n\nclass ContinuousWorldRenderer:\n def __init__(self, num_gri... | [
[
"numpy.array"
]
] |
sarthakpati/nncf | [
"29ad62c664c1dd53b3c8c50fc001a1b36bd1e8ac",
"29ad62c664c1dd53b3c8c50fc001a1b36bd1e8ac",
"29ad62c664c1dd53b3c8c50fc001a1b36bd1e8ac",
"29ad62c664c1dd53b3c8c50fc001a1b36bd1e8ac",
"29ad62c664c1dd53b3c8c50fc001a1b36bd1e8ac",
"29ad62c664c1dd53b3c8c50fc001a1b36bd1e8ac",
"29ad62c664c1dd53b3c8c50fc001a1b36bd1e8a... | [
"tests/torch/quantization/test_onnx_export.py",
"examples/tensorflow/segmentation/evaluation.py",
"examples/tensorflow/segmentation/train.py",
"examples/tensorflow/common/object_detection/utils/ops.py",
"nncf/torch/nncf_network.py",
"nncf/tensorflow/quantization/quantizers.py",
"tools/debug/compare_accu... | [
"\"\"\"\n Copyright (c) 2020 Intel Corporation\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n Unless required by applicable law or agr... | [
[
"torch.rand_like",
"torch.nn.Conv2d",
"torch.rand",
"torch.nn.ConvTranspose2d"
],
[
"tensorflow.io.gfile.isdir",
"tensorflow.train.latest_checkpoint",
"tensorflow.Variable",
"tensorflow.io.gfile.exists",
"tensorflow.train.checkpoints_iterator",
"tensorflow.get_logger",
... |
diavy/tensorflow-without-a-phd | [
"7270d75cf259c49e9457b7041f56941928308b4a"
] | [
"tensorflow-nmt-tutorial/nmt/nmt.py"
] | [
"# Copyright 2017 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appl... | [
[
"tensorflow.train.latest_checkpoint",
"numpy.random.seed",
"tensorflow.gfile.Exists",
"tensorflow.gfile.MakeDirs",
"tensorflow.Session",
"tensorflow.app.run"
]
] |
moinnadeem/composer | [
"bc3f41b766bd4450f05a99f44db4a6b3901ea1c8",
"bc3f41b766bd4450f05a99f44db4a6b3901ea1c8",
"bc3f41b766bd4450f05a99f44db4a6b3901ea1c8",
"bc3f41b766bd4450f05a99f44db4a6b3901ea1c8"
] | [
"tests/algorithms/test_torch_export.py",
"composer/algorithms/ema/ema.py",
"composer/datasets/streaming/world.py",
"composer/models/ssd/ssd.py"
] | [
"# Copyright 2022 MosaicML Composer authors\n# SPDX-License-Identifier: Apache-2.0\n\n\"\"\"\nTests a variety of export options with our surgery methods applied, including\ntorchscript, torch.fx, and ONNX.\n\"\"\"\nimport os\nimport pathlib\nfrom typing import Any, Callable, Type\n\nimport pytest\nimport torch\nimp... | [
[
"torch.jit.script",
"torch.onnx.export",
"torch.Tensor",
"torch.fx.symbolic_trace",
"torch.rand"
],
[
"torch.no_grad"
],
[
"torch.utils.data.get_worker_info"
],
[
"numpy.squeeze",
"numpy.array"
]
] |
gglin001/popart | [
"3225214343f6d98550b6620e809a3544e8bcbfc6",
"3225214343f6d98550b6620e809a3544e8bcbfc6",
"3225214343f6d98550b6620e809a3544e8bcbfc6",
"3225214343f6d98550b6620e809a3544e8bcbfc6",
"3225214343f6d98550b6620e809a3544e8bcbfc6"
] | [
"tests/torch/cifar10/model_instancenorm.py",
"tests/integration/operators_test/boolean_test.py",
"tests/integration/optimizer_tests/adaptive_mixed_mode_test_py_0.py",
"tests/integration/model_loading_test.py",
"tests/integration/operators_test/constexpr_gather.py"
] | [
"# Copyright (c) 2018 Graphcore Ltd. All rights reserved.\nimport sys\nimport os\nimport c10driver\nimport popart\nimport cmdline\nfrom popart.torch import torchwriter\nimport torch\nimport numpy as np\n\nargs = cmdline.parse()\n\nnInChans = 3\nnOutChans = 8\nbatchSize = 2\nbatchesPerStep = 4\nanchors = {\n \"l1... | [
[
"numpy.random.seed",
"torch.nn.Module.__init__",
"torch.manual_seed",
"torch.nn.InstanceNorm2d",
"numpy.random.rand"
],
[
"torch.eq",
"numpy.logical_not",
"numpy.random.randn",
"torch.tensor"
],
[
"numpy.allclose",
"numpy.random.seed",
"numpy.asarray",
"... |
pinkimondli/Qubit | [
"aa918e7614f97ec66c723eb57e8f577685e7ae85"
] | [
"qubitPlots.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nfrom Qubit import Qubit\n\nsns.set(font_scale=1)\nsns.set_style(\"whitegrid\", {\"font.family\": \"serif\"})\nplt.rcParams[\"figure.dpi\"]=100\nplt.rcParams[\"savefig.bbox\"]='tight'\nplt.rcParams[\"savefig.transparent\"]=True\n\ndef frequ... | [
[
"numpy.dot",
"numpy.linspace",
"numpy.fft.fft",
"matplotlib.pyplot.subplots",
"numpy.append",
"numpy.argmax",
"numpy.array",
"matplotlib.pyplot.show"
]
] |
micuat/bci-workshop | [
"2ce12f3b44e89f35bc1f04c00a184a372cddfe1e"
] | [
"python/exercise_01.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nExercise 1: A neurofeedback interface (single-channel)\n======================================================\n\nDescription:\nIn this exercise, we'll try and play around with a simple interface that\nreceives EEG from one electrode, computes standard frequency band powers\nand di... | [
[
"numpy.asarray",
"numpy.array",
"matplotlib.pyplot.pause",
"numpy.floor"
]
] |
CDU-LSP/NCSSK | [
"2a8b729933aa59967409a0202e0e9a65b0a23ec8"
] | [
"signal_source/gen_4xsin_signal.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\n\n# 本代码用于产生四路sin信号,并对其中的三路信号进行了延迟\n\nfs = 1e6 # 正弦信号1MHz\nFs = 256e6 # 采样率256MHz\nadc_t = 1 / Fs\nA = 1 # 幅度\nN = 1024 # 序列长度\nt = np.arange(0, N)\n\nd1 = 20 # 延后点数\nd2 = 60\nd3 = 150\n\nx1 = A * np.cos(2 * np.pi * fs * t * adc_t) # 源信号\n\nx2 = A * np.cos(... | [
[
"matplotlib.pyplot.title",
"numpy.arange",
"numpy.cos",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] |
rui-mo/arrow | [
"266993f33511760aafbf63e131136ee422e69ec0"
] | [
"python/pyarrow/tests/test_dataset.py"
] | [
"# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y... | [
[
"pandas.DataFrame",
"numpy.random.randn",
"pandas.testing.assert_frame_equal",
"numpy.repeat",
"numpy.array_split"
]
] |
FooBandit89/PyKot | [
"892831e757b6a51153d077e5faaab5a411f1ff3d"
] | [
"PyKot.py"
] | [
"\"\"\"\nCopyright (c) 2021, Russell Wallace Butler\nAll rights reserved.\n\nThis source code is licensed under the BSD-style license found in the\nLICENSE file in the root directory of this source tree.\n\"\"\"\n\nimport traceback as tb\nfrom dataclasses import dataclass\nimport re as re\nimport numpy as np\n\nit_... | [
[
"numpy.array"
]
] |
RasmusSemmle/scipy | [
"4ffeafe269597e6d41b3335549102cd5611b12cb"
] | [
"scipy/integrate/_ivp/common.py"
] | [
"from __future__ import division, print_function, absolute_import\nfrom itertools import groupby\nfrom warnings import warn\nimport numpy as np\nfrom scipy.sparse import find, coo_matrix\n\n\nEPS = np.finfo(float).eps\n\n\ndef validate_max_step(max_step):\n \"\"\"Assert that max_Step is valid and return it.\"\"\... | [
[
"numpy.diag",
"numpy.asarray",
"numpy.all",
"numpy.max",
"numpy.any",
"numpy.searchsorted",
"numpy.hstack",
"scipy.sparse.coo_matrix",
"scipy.sparse.find",
"numpy.unique",
"numpy.arange",
"numpy.empty_like",
"numpy.finfo",
"numpy.real",
"numpy.diff",
... |
tomsal/endtoenddecisiontrees | [
"be4cf69f530cbbd3cd1a2443c9cc513482a9a2c3"
] | [
"e2edt/gate.py"
] | [
"\"\"\"\nThis file implements the smooth gating/split function including the linear\ncombination of features. If given, the features are sent through a non linear\nmodule first, which may also be optimized thanks to autograd..\n\"\"\"\nimport torch.nn as nn\n\nclass Gate(nn.Module):\n def __init__(self, input_size... | [
[
"torch.nn.Linear",
"torch.nn.Sigmoid"
]
] |
mohamedelmesawy/MTAF | [
"b0200a3a38843a6c95d270da63aae64ad7950113"
] | [
"mtaf/utils/loss.py"
] | [
"import numpy as np\nimport torch\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\n\n\ndef cross_entropy_2d(predict, target):\n \"\"\"\n Args:\n predict:(n, c, h, w)\n target:(n, h, w)\n \"\"\"\n assert not target.requires_grad\n assert predict.dim() == 4\n asse... | [
[
"torch.nn.functional.kl_div",
"torch.nn.functional.softmax",
"numpy.log2",
"torch.max",
"torch.nn.functional.log_softmax",
"torch.zeros",
"torch.nn.functional.cross_entropy",
"torch.nn.functional.mse_loss",
"torch.log2"
]
] |
chdhr-harshal/uber-driver-strategy | [
"f21f968e7aa04d8105bf42e046ab120f813aa12f"
] | [
"src/python/strategies.py"
] | [
"#!/usr/local/bin/python\n\n\"\"\"\nNaive strategy methods\n\"\"\"\nimport numpy as np\nfrom driver_utils import *\nfrom uncertainty_utils import *\n\ndef build_naive_strategy(self, city_attributes):\n for b in reversed(xrange(self.B)):\n for i in xrange(len(self.city_zones)):\n action_cumulati... | [
[
"numpy.delete",
"numpy.array",
"numpy.argmax",
"numpy.sum"
]
] |
P0lyFish/noise2-series | [
"a21ad1b7cb20e44161393156efd7dcdab729b4a3",
"a21ad1b7cb20e44161393156efd7dcdab729b4a3"
] | [
"models/loss.py",
"data/bsd_dataset.py"
] | [
"import torch\nimport torch.nn as nn\n\n\nclass CharbonnierLoss(nn.Module):\n \"\"\"Charbonnier Loss (L1)\"\"\"\n\n def __init__(self, eps=1e-6):\n super(CharbonnierLoss, self).__init__()\n self.eps = eps\n\n def forward(self, x, y):\n diff = x - y\n loss = torch.sum(torch.sqrt(... | [
[
"torch.empty_like",
"torch.Tensor",
"torch.zeros",
"torch.sqrt",
"torch.trace",
"torch.sum",
"torch.nn.BCEWithLogitsLoss",
"torch.device",
"torch.autograd.grad",
"torch.nn.MSELoss"
],
[
"numpy.ascontiguousarray",
"numpy.transpose"
]
] |
outlk/read-ICESat-2 | [
"4a1e90038548a050b4bdbcbcf9e4fb7864a52b9f"
] | [
"scripts/interp_sea_level_ICESat2_ATL11.py"
] | [
"#!/usr/bin/env python\nu\"\"\"\ninterp_sea_level_ICESat2_ATL11.py\nWritten by Tyler Sutterley (10/2021)\nInterpolates sea level anomalies (sla), absolute dynamic topography (adt) and\n mean dynamic topography (mdt) to times and locations of ICESat-2 ATL11 data\n This data will be extrapolated onto land point... | [
[
"numpy.logical_not",
"numpy.nonzero",
"numpy.ma.empty",
"numpy.zeros_like",
"numpy.broadcast_to",
"numpy.floor",
"numpy.shape",
"numpy.ma.array",
"numpy.array",
"numpy.meshgrid",
"numpy.sum"
]
] |
ipattarapong/dbnd | [
"7bd65621c46c73e078eb628f994127ad4c7dbd1a"
] | [
"modules/dbnd/test_dbnd/targets_tests/conftest.py"
] | [
"from __future__ import absolute_import\n\nimport os\n\nimport pandas as pd\n\nfrom pytest import fixture\n\n\n@fixture\ndef simple_df():\n return pd.DataFrame(data=[[1, 1], [2, 2]], columns=[\"c1\", \"c2\"])\n\n\n@fixture\ndef pandas_data_frame():\n names = [\"Bob\", \"Jessica\", \"Mary\", \"John\", \"Mel\"]... | [
[
"pandas.DataFrame"
]
] |
albertvillanova/audio | [
"0cd25093626d067e008e1f81ad76e072bd4a1edd",
"0cd25093626d067e008e1f81ad76e072bd4a1edd",
"0cd25093626d067e008e1f81ad76e072bd4a1edd"
] | [
"examples/libtorchaudio/speech_recognition/build_pipeline_from_huggingface_transformers.py",
"examples/source_separation/utils/metrics.py",
"examples/pipeline_wavernn/inference.py"
] | [
"#!/usr/bin/env python3\nimport argparse\nimport logging\nimport os\nfrom typing import Tuple\n\nimport torch\nimport torchaudio\nfrom torchaudio.models.wav2vec2.utils.import_huggingface import import_huggingface_model\nfrom greedy_decoder import Decoder\n\nTORCH_VERSION: Tuple[int, ...] = tuple(int(x) for x in tor... | [
[
"torch.jit.script",
"torch.__version__.split",
"torch.quantization.quantize_dynamic"
],
[
"torch.log10",
"torch.zeros"
],
[
"torch.jit.script",
"torch.no_grad",
"torch.cuda.is_available"
]
] |
tccw/geotools | [
"babfa6ab190c4ee89e97b87062505c1880f50233"
] | [
"toys/fatiando_2D_videos.py"
] | [
"\r\n\"\"\"\r\nUses the seismic package from Fatiando to create 2D finite difference\r\nmodels for wave propogation in different velocity fields.\r\n\r\nThe BP velocity model is 67km long and 12km deep, and was built on a 6.25m x 12.5m grid.\r\nIn order for Fatiando to work the cells have to be square so I ignore t... | [
[
"matplotlib.pyplot.imshow",
"numpy.linspace",
"numpy.squeeze",
"matplotlib.pyplot.plot",
"numpy.max",
"numpy.zeros_like",
"matplotlib.pyplot.subplot2grid",
"matplotlib.pyplot.gca",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.subplots_adjust",
"matplotlib.pyplot... |
jeffzi/optuna | [
"133e9d678723ad9e5183789f9271b7f96db32322",
"133e9d678723ad9e5183789f9271b7f96db32322"
] | [
"examples/tensorflow_eager_simple.py",
"tests/samplers_tests/tpe_tests/test_parzen_estimator.py"
] | [
"\"\"\"\nOptuna example that optimizes multi-layer perceptrons using Tensorflow (Eager Execution).\n\nIn this example, we optimize the validation accuracy of hand-written digit recognition using\nTensorflow and MNIST. We optimize the neural network architecture as well as the optimizer\nconfiguration.\n\n\"\"\"\n\n... | [
[
"tensorflow.metrics.Accuracy",
"tensorflow.device",
"tensorflow.data.Dataset.from_tensor_slices",
"tensorflow.keras.regularizers.l2",
"tensorflow.keras.Sequential",
"tensorflow.cast",
"tensorflow.keras.datasets.mnist.load_data",
"tensorflow.nn.sparse_softmax_cross_entropy_with_logi... |
MuharremOkutan/Screeni-py | [
"77a6626ce470a1812693a0350dcc8c2e2eb37dc5"
] | [
"src/classes/ParallelProcessing.py"
] | [
"\n'''\n * Project : Screenipy\n * Author : Pranjal Joshi, Swar Patel\n * Created : 18/05/2021\n * Description : Class for managing multiprocessing\n'''\n\nimport multiprocessing\nimport pandas as pd\nimport numpy as np\nimport sys\nimport os\nimport pytz\nfr... | [
[
"pandas.DataFrame"
]
] |
DIRECTLab/EVPRE | [
"320e59a6b027a19b725a2a5e9cb2c366ba84a8da"
] | [
"fastsim-2021a/fastsim/tests/accel_test.py"
] | [
"# Demonstrate the use of acceleration test\n\nimport sys\nimport os\nimport numpy as np\n\nfrom fastsim import simdrive, vehicle, cycle\n\ndef create_accel_cyc(length_in_seconds=300, spd_mph=89.48, grade=0.0, hz=10):\n \"\"\"\n Create a synthetic Drive Cycle for acceleration targeting.\n Defaults to a 15 ... | [
[
"numpy.asarray",
"numpy.arange",
"numpy.zeros"
]
] |
kzkymn/defragTrees | [
"6fbf111c9fbc7f0468c7d18b63660e3f63e628c3"
] | [
"example/example_xgb.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\n@author: Satoshi Hara\n\"\"\"\n\nimport sys\nsys.path.append('../')\n\nimport numpy as np\nimport xgboost as xgb\nfrom defragTrees import DefragModel\n\n# load data\nZtr = np.loadtxt('./train.csv', delimiter=',')\nZte = np.loadtxt('./test.csv', delimiter=',')\nXtr = Ztr[:, :-1]\nyt... | [
[
"numpy.loadtxt"
]
] |
apetkau/thesis-index | [
"6c96e9ed75d8e661437effe62a939727a0b473fc"
] | [
"genomics_data_index/test/integration/api/query/features/test_MutationFeaturesComparator.py"
] | [
"import pandas as pd\n\nfrom genomics_data_index.api.query.GenomicsDataIndex import GenomicsDataIndex\nfrom genomics_data_index.api.query.features.MutationFeaturesComparator import MutationFeaturesComparator\nfrom genomics_data_index.storage.SampleSet import SampleSet\nfrom genomics_data_index.storage.model.db impo... | [
[
"pandas.concat",
"pandas.read_csv"
]
] |
DLunin/pygraphmodels | [
"4ea8ebed74f3a7d5d56af4d5f189a514aab420f9"
] | [
"graphmodels/information/information.py"
] | [
"from ..factor import TableFactor\nimport numpy as np\nimport pandas as pd\nfrom itertools import combinations\n\n\ndef discrete_entropy(x):\n def make_factor(data, arguments, leak=1e-9):\n factor = TableFactor(arguments, list(data.columns))\n factor.fit(data)\n factor.table += leak\n ... | [
[
"numpy.isnan",
"pandas.concat",
"numpy.zeros",
"numpy.log"
]
] |
Marcnuth/KDD2017 | [
"34332b76ab1910dbd85488123e5dbb24f7663cac"
] | [
"src/tasks/reg/preprocessor.py"
] | [
"import luigi\nimport pandas as pd\nimport numpy as mp\nfrom sklearn import preprocessing\nfrom tasks.reg.combiner import CombineFeatures\nfrom pathlib import Path\nfrom common import utils\nfrom sklearn import decomposition\nfrom sklearn import pipeline\nfrom sklearn import feature_selection\n\n\nclass Preprocess(... | [
[
"sklearn.preprocessing.RobustScaler",
"pandas.concat",
"pandas.DataFrame"
]
] |
myyim/placecellperceptron | [
"8e03b880f47a1f0b7934afd91afb167f669ceeab"
] | [
"revision/fig8_gaussian.py"
] | [
"# This code was developed by Man Yi Yim (manyi.yim@gmail.com) under Python 2.7.13.\n# Note that the figure order, label and the content may have changed during revision.\n\nimport numpy as np\nimport pylab\nimport matplotlib as mpl\nimport pickle\nimport itertools\nimport os\nfigpath = './figure/'\nif not os.path.... | [
[
"numpy.dot",
"numpy.abs",
"numpy.min",
"numpy.arange",
"numpy.cumsum",
"numpy.ones",
"numpy.round",
"numpy.copy",
"matplotlib.rcParams.update",
"numpy.diff",
"numpy.mod",
"numpy.array",
"numpy.zeros",
"numpy.sum",
"numpy.random.RandomState"
]
] |
GeraldCSC/jax | [
"16c809ce7fcd4a1041216002c8088844410151f6",
"6411f8a03388ce63eb365188f2e2880815745125",
"16c809ce7fcd4a1041216002c8088844410151f6"
] | [
"jax/experimental/jax2tf/jax2tf.py",
"tests/global_device_array_test.py",
"jax/experimental/global_device_array.py"
] | [
"# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ... | [
[
"tensorflow.convert_to_tensor",
"tensorflow.math.floormod",
"tensorflow.raw_ops.PreventGradient",
"tensorflow.compiler.tf2xla.python.xla.dot_general",
"tensorflow.math.greater_equal",
"tensorflow.linalg.eigh",
"tensorflow.dtypes.cast",
"tensorflow.compiler.tf2xla.python.xla.variadi... |
yichenj/yolov3-tf2 | [
"17bcb67e765eeab648c201146856d4440c784240"
] | [
"yolov3_tf2/models.py"
] | [
"from absl import flags\nfrom absl.flags import FLAGS\nimport numpy as np\nimport tensorflow as tf\nfrom tensorflow.keras import Model\nfrom tensorflow.keras.layers import (\n Add,\n Concatenate,\n Conv2D,\n Input,\n Lambda,\n LeakyReLU,\n MaxPool2D,\n UpSampling2D,\n ZeroPadding2D,\n ... | [
[
"tensorflow.concat",
"tensorflow.stack",
"tensorflow.reduce_sum",
"tensorflow.cast",
"tensorflow.keras.layers.ZeroPadding2D",
"tensorflow.keras.layers.Concatenate",
"tensorflow.keras.layers.LeakyReLU",
"tensorflow.keras.regularizers.l2",
"tensorflow.keras.layers.UpSampling2D",
... |
P-Hidringer/tensorflow | [
"c8731009708d4694fc553562a267d75064fc5ab4"
] | [
"tensorflow/contrib/lite/testing/generate_examples.py"
] | [
"# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.get_variable",
"tensorflow.device",
"tensorflow.nn.batch_norm_with_global_normalization",
"tensorflow.nn.log_softmax",
"tensorflow.concat",
"tensorflow.zeros",
"tensorflow.control_dependencies",
"tensorflow.minimum",
"tensorflow.global_variables",
"tensorflow.sp... |
Chenguang-Zhu/relancer | [
"bf1a175b77b7da4cff12fbc5de17dd55246d264d",
"bf1a175b77b7da4cff12fbc5de17dd55246d264d"
] | [
"relancer-exp/original_notebooks/mirichoi0218_insurance/medical-insurance-cost-linear-regression.py",
"relancer-exp/original_notebooks/shivam2503_diamonds/predicting-diamond-prices-using-linear-svm.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# In[ ]:\n\n\n# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load in \n\nimport numpy as np # l... | [
[
"sklearn.cross_validation.train_test_split",
"pandas.read_csv",
"sklearn.linear_model.LinearRegression",
"matplotlib.pyplot.scatter"
],
[
"pandas.read_csv",
"sklearn.utils.shuffle",
"numpy.arange",
"sklearn.svm.SVR",
"sklearn.preprocessing.scale"
]
] |
JohannesSeidel/pyNastran | [
"91ccd2756b201a7a3e4bb81cc6dc53b947d43bbf",
"91ccd2756b201a7a3e4bb81cc6dc53b947d43bbf",
"91ccd2756b201a7a3e4bb81cc6dc53b947d43bbf",
"91ccd2756b201a7a3e4bb81cc6dc53b947d43bbf",
"91ccd2756b201a7a3e4bb81cc6dc53b947d43bbf",
"91ccd2756b201a7a3e4bb81cc6dc53b947d43bbf",
"91ccd2756b201a7a3e4bb81cc6dc53b947d43bb... | [
"pyNastran/utils/test/test_dict_to_h5py.py",
"pyNastran/bdf/cards/loads/dloads.py",
"pyNastran/converters/abaqus/abaqus_cards.py",
"pyNastran/op2/tables/oes_stressStrain/oes_nonlinear_rod.py",
"pyNastran/converters/openfoam/test_openfoam.py",
"pyNastran/dev/bdf_vectorized/cards/elements/spring/celas1.py",... | [
"# coding: utf-8\n\"\"\"tests for dict_to_h5py\"\"\"\nimport os\nimport unittest\nimport numpy as np\nfrom cpylog import get_logger\n\ntry:\n import h5py # pylint: disable=unused-import\n IS_H5PY = True\nexcept ImportError: # pragma: no cover\n IS_H5PY = False\n\nif IS_H5PY:\n from pyNastran.utils.dic... | [
[
"numpy.isnan",
"numpy.zeros"
],
[
"numpy.sqrt",
"numpy.asarray",
"numpy.cos",
"numpy.exp",
"numpy.array",
"numpy.where",
"numpy.zeros"
],
[
"numpy.array",
"numpy.zeros",
"numpy.where"
],
[
"numpy.array_equal",
"numpy.zeros",
"numpy.allclose",... |
semeniuta/CarND-Capstone | [
"c61c4bd51789b8018924ecf2058e8228f9580d18"
] | [
"ros/src/tl_detector/image_saver.py"
] | [
"#!/usr/bin/env python\n\nimport rospy\nfrom styx_msgs.msg import TrafficLightArray\nfrom sensor_msgs.msg import Image\nfrom styx_msgs.msg import Lane\nfrom geometry_msgs.msg import PoseStamped\nimport yaml\nimport numpy as np\nfrom scipy.spatial import KDTree\nfrom cv_bridge import CvBridge, CvBridgeError\nimport ... | [
[
"numpy.array",
"scipy.spatial.KDTree"
]
] |
derinaksit/REMARK | [
"fcc6e4720c9f11ddbe4701edcf2511bf6a8cdd2d"
] | [
"REMARKs/cAndCwithStickyE/Code/StickyEparams.py"
] | [
"'''\nThis module holds calibrated parameter dictionaries for the cAndCwithStickyE paper.\nIt defines dictionaries for the six types of models in cAndCwithStickyE:\n\n1) Small open economy\n2) Small open Markov economy\n3) Cobb-Douglas closed economy\n4) Cobb-Douglas closed Markov economy\n5) Representative agent e... | [
[
"numpy.log",
"numpy.sqrt",
"numpy.genfromtxt",
"numpy.array",
"numpy.zeros"
]
] |
415905716/MQBench | [
"3f8321ec9ab9fd05d99c21700a901b1ff6a90a1e",
"3ac8928ef6641e0ea78f9a5f0524b574a835463e"
] | [
"application/imagenet_example/main.py",
"mqbench/fake_quantize/quantize_base.py"
] | [
"import argparse\nimport os\nimport random\nimport shutil\nimport time\nimport warnings\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.parallel\nimport torch.backends.cudnn as cudnn\nimport torch.distributed as dist\nimport torch.optim\nimport torch.multiprocessing as mp\nimport torch.utils.data\nimport to... | [
[
"torch.nn.CrossEntropyLoss",
"torch.distributed.init_process_group",
"torch.multiprocessing.spawn",
"torch.load",
"torch.utils.data.distributed.DistributedSampler",
"torch.manual_seed",
"torch.cuda.set_device",
"torch.utils.data.DataLoader",
"torch.nn.DataParallel",
"torch.... |
HansBlackCat/Python | [
"32c69f1f749a46b5bf1a305e385d96b2449c2a28"
] | [
"data_science/np_arr2.py"
] | [
"import numpy as np\n\nnp.random.seed(0)\n\nx1=np.random.randint(10, size=6)\nx2=np.random.randint(10, size=(3,4))\nx3=np.random.randint(10, size=(3,4,5))\n\nprint(\"------------------------------------------\")\nprint(x3)\nprint(\"------------------------------------------\")\nprint(\"x3 ndim: \", x3.ndim)\nprint(... | [
[
"numpy.random.seed",
"numpy.random.randint"
]
] |
google/learned_optimization | [
"1c9ee0159c97815fc6afe79a76224fb28b199053",
"1c9ee0159c97815fc6afe79a76224fb28b199053"
] | [
"learned_optimization/eval_training.py",
"learned_optimization/distributed.py"
] | [
"# coding=utf-8\n# Copyright 2021 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | [
[
"numpy.asarray",
"numpy.arange",
"numpy.concatenate",
"numpy.mean",
"numpy.random.randint"
],
[
"numpy.asarray"
]
] |
GraduationTeam2020/LipNet | [
"a3f63d3b793c0074bc7237e082f3eba4eaf2fc86"
] | [
"training/overlapped_speakers/train.py"
] | [
"from keras.optimizers import Adam\nfrom keras.callbacks import TensorBoard, CSVLogger, ModelCheckpoint\nfrom lipnet.lipreading.generators import BasicGenerator\nfrom lipnet.lipreading.callbacks import Statistics, Visualize\nfrom lipnet.lipreading.curriculums import Curriculum\nfrom lipnet.core.decoders import Deco... | [
[
"numpy.random.seed"
]
] |
hongyehu/NeuralRG | [
"ff4eb18f7f9e083dac6f3da3995f3f69ecf381e8",
"ff4eb18f7f9e083dac6f3da3995f3f69ecf381e8"
] | [
"test/test_tebd.py",
"source/ising.py"
] | [
"from flowRelated import *\n\nimport os\nimport sys\nsys.path.append(os.getcwd())\n\nimport torch\nfrom torch import nn\nimport numpy as np\nimport utils\nimport flow\nimport source\n\ndef test_bijective():\n p = source.Gaussian([1,4,4])\n BigList = []\n for _ in range(2*2*2):\n maskList = []\n ... | [
[
"torch.nn.ELU",
"torch.cat",
"torch.zeros"
],
[
"torch.nn.Softplus",
"numpy.linalg.slogdet",
"numpy.eye",
"scipy.linalg.eigh",
"scipy.linalg.inv",
"numpy.zeros"
]
] |
shoneg/createMessdienerplan | [
"85830b257b58cc14ba5d08bbbcb5bbc4a28fd957"
] | [
"main.py"
] | [
"from exit_methods import *\n\ntry:\n import itertools\n import shutil\n import sys\n import warnings\n from os.path import exists\n from os import mkdir\n\n import numpy as np\n\n from table_utils import *\nexcept ImportError as e:\n print(\"Ein Import Fehler ist aufgetreten: \" + str(e))\n input(\"Drück... | [
[
"numpy.arange",
"numpy.unique"
]
] |
coderkhaleesi/Computer-Vision-Traditional-Techniques | [
"ac24334e2f1762ad8ae450b6a01c9086474c132c"
] | [
"CameraGeometry_andTwoViewHomography/calibrate.py"
] | [
"# -*- coding: utf-8 -*-\r\n# CLAB3\r\nimport numpy as np\r\nfrom PIL import Image\r\nimport matplotlib.pyplot as plt\r\nimport time\r\nimport cv2\r\n\r\nI = Image.open('stereo2012a.jpg');\r\nplt.imshow(I)\r\nuv = plt.ginput(12) # Graphical user interface to get 6 points\r\n\r\n#xyz coordinates (world coordinates)\... | [
[
"matplotlib.pyplot.imshow",
"numpy.linalg.svd",
"matplotlib.pyplot.scatter",
"numpy.asarray",
"numpy.repeat",
"numpy.linalg.lstsq",
"matplotlib.pyplot.close",
"numpy.linalg.qr",
"matplotlib.pyplot.ginput",
"matplotlib.pyplot.show",
"numpy.zeros",
"numpy.vstack"
]
... |
Toni-SM/skrl | [
"15b429d89e3b8a1828b207d88463bf7090288d18",
"15b429d89e3b8a1828b207d88463bf7090288d18",
"15b429d89e3b8a1828b207d88463bf7090288d18",
"15b429d89e3b8a1828b207d88463bf7090288d18"
] | [
"skrl/agents/torch/cem/cem.py",
"docs/source/examples/isaacgym_sequential_shared_memory_eval.py",
"docs/source/examples/omniisaacgym/ppo_cartpole.py",
"docs/source/examples/isaacgym3/ppo_franka_cabinet.py"
] | [
"from typing import Union, Tuple, Dict, Any\n\nimport gym\nimport copy\n\nimport torch\nimport torch.nn.functional as F\n\nfrom ....memories.torch import Memory\nfrom ....models.torch import Model\n\nfrom .. import Agent\n\n\nCEM_DEFAULT_CONFIG = {\n \"rollouts\": 16, # number of rollouts before ... | [
[
"torch.mean",
"torch.cat",
"torch.tensor",
"torch.quantile",
"torch.no_grad",
"torch.nonzero"
],
[
"torch.nn.Linear",
"torch.zeros"
],
[
"torch.nn.Linear",
"torch.nn.ELU",
"torch.zeros"
],
[
"torch.nn.Linear",
"torch.nn.ELU",
"torch.zeros"
]
] |
juroberttyb/DRL | [
"24c3b4bccd87384a3842283d970bd5d17f189e67",
"24c3b4bccd87384a3842283d970bd5d17f189e67"
] | [
"spinup/algos/pytorch/ppo/robert/ppo.py",
"spinup/algos/pytorch/vpg/robert_core.py"
] | [
"import numpy as np\nimport torch\nfrom torch.optim import Adam\nimport gym\nimport time\nimport spinup.algos.pytorch.ppo.core as core\nfrom spinup.utils.logx import EpochLogger\nfrom spinup.utils.mpi_pytorch import setup_pytorch_for_mpi, sync_params, mpi_avg_grads\nfrom spinup.utils.mpi_tools import mpi_fork, mpi_... | [
[
"numpy.random.seed",
"torch.manual_seed",
"torch.min",
"torch.exp",
"numpy.append",
"torch.clamp",
"numpy.zeros",
"torch.as_tensor"
],
[
"torch.nn.Sequential",
"torch.distributions.categorical.Categorical",
"torch.distributions.normal.Normal",
"numpy.full",
... |
SLAB-NLP/Akk | [
"baa07b0fdf8c7d8623fbd78508867c30a8a7ff6d"
] | [
"akkadian_bert/data_collators_bert.py"
] | [
"from typing import List, Union, Dict, Tuple\n\nimport torch\nfrom torch.nn.utils.rnn import pad_sequence\nfrom preprocessing.main_preprocess import MISSING_SIGN_CHAR\n\n\nclass DataCollatorForLanguageModelingAkkadian:\n \"\"\"\n Data collator used for language modeling.\n - collates batches of tensors, ho... | [
[
"torch.full",
"torch.nn.utils.rnn.pad_sequence",
"torch.tensor",
"torch.bernoulli",
"torch.stack"
]
] |
BangShiuh/plasmatools | [
"4e1ef0f187e1cc4b1fdf66f69fd557458cea0692"
] | [
"plasmatools/VVSystem.py"
] | [
"import numpy as np\n\nclass VVSystem:\n \"\"\"\n Calculate VV transfer rate coefficient\n \"\"\"\n def __init__(self, w_ei, x_ei, w_ej, x_ej, c, S, sigma, rm):\n \"\"\"\n param w_ei:\n The energy spacing between the vobrational energy levels for species i.\n Correspo... | [
[
"numpy.exp",
"numpy.sqrt"
]
] |
moritzj29/Examples | [
"63e8f1f84433eee4dec57cb7a4a9015a2239b837"
] | [
"SignalGenerators/Python/RsSmw_ScpiPackage/RsSmw_FileTransferWithProgress_Example.py"
] | [
"\"\"\"Example showing how you can transfer a big file to the instrument and from the instrument with showing the progress.\nSince the SMW is quite fast on data transfer, we slow it down by waiting for 100ms between each chunk transfer (1MB)\nThis way we see the transfer progress better and we do not need a file th... | [
[
"numpy.random.bytes"
]
] |
HSE-LAMBDA/roerich | [
"17e178292593d1ea6a821b99705620ba066abd2a"
] | [
"roerich/viz.py"
] | [
"import numpy as np\nfrom matplotlib import pyplot as plt\n\n\ndef display(X, T, L, S, Ts, peaks=None, plot_peak_height=10, s_max=10):\n n = X.shape[1] + 1 if peaks is None else X.shape[1] + 2\n \n plt.figure(figsize=(12, n*2.5+0.25))\n \n for i in range(X.shape[1]):\n \n plt.subplot(n,... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.yticks",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.ylim",
"numpy.arange",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.figure"
]
... |
ummavi/pfrl-1 | [
"e856a7cca30fcc3871024cdf7522d066006a5f0c",
"e856a7cca30fcc3871024cdf7522d066006a5f0c",
"e856a7cca30fcc3871024cdf7522d066006a5f0c",
"e856a7cca30fcc3871024cdf7522d066006a5f0c",
"e856a7cca30fcc3871024cdf7522d066006a5f0c"
] | [
"tests/agents_tests/basetest_training.py",
"pfrl/agents/dpp.py",
"pfrl/collections/prioritized.py",
"pfrl/nn/concat_obs_and_action.py",
"tests/agents_tests/test_double_categorical_dqn.py"
] | [
"import logging\nimport os\nimport tempfile\nfrom unittest import mock\n\nimport numpy as np\nimport pytest\n\nimport pfrl\nfrom pfrl.experiments import (\n train_agent_async,\n train_agent_batch_with_evaluation,\n train_agent_with_evaluation,\n)\nfrom pfrl.experiments.evaluator import (\n batch_run_eva... | [
[
"numpy.asarray"
],
[
"torch.logsumexp",
"torch.no_grad"
],
[
"numpy.random.binomial",
"numpy.random.uniform"
],
[
"torch.cat"
],
[
"torch.nn.LSTM"
]
] |
allenai/robustnav | [
"137a4f4c185f1d6f587874c91abb1dafb6de08ad"
] | [
"allenact/base_abstractions/sensor.py"
] | [
"# Original work Copyright (c) Facebook, Inc. and its affiliates.\n# Modified work Copyright (c) Allen Institute for AI\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\nfrom abc import abstractmethod, ABC\nfrom collections import OrderedD... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.expand_dims",
"numpy.float32"
]
] |
heytitle/MASS-Learning | [
"0d40de5227c94d1a5e4b18e44d16374e12821ad2"
] | [
"start_training.py"
] | [
"import base64\nimport pickle\nimport pprint\nimport sys\nfrom math import ceil\n\nimport numpy as np\nimport torch\n\nimport experiments\nimport models\nfrom models.utils import save_model_kwargs, load_model_from_checkpoint\nfrom utils import get_dataloaders, setup_writer\n\n\ndef train_epoch(writer,\n ... | [
[
"torch.isnan",
"torch.manual_seed",
"torch.cuda.is_available",
"numpy.random.seed"
]
] |
nherbert25/Computational-Physics | [
"6fc01cf7bee566ca1e095877cc10d63bd678e21f",
"6fc01cf7bee566ca1e095877cc10d63bd678e21f",
"6fc01cf7bee566ca1e095877cc10d63bd678e21f",
"6fc01cf7bee566ca1e095877cc10d63bd678e21f"
] | [
"HW10/problem1 copied.py",
"HW1/Cromer Algorithm.py",
"HW4/useful.py",
"HW11/problem 2 new REAL - Copy.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Apr 10 15:11:54 2019\n\n@author: Nate\n\"\"\"\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nN1 = int(1e4)\nx10, x20 = 1.1, 2.2\n\ntau = np.arange(1, 10.1, .5)\nr_max = 2\n\n\ndef G2(x1, x2, dt):\n return np.exp(-(x1-x2)**2/(2*dt)-dt/4*(x1*x1+x2*x2)) / ... | [
[
"numpy.sqrt",
"numpy.linspace",
"numpy.arange",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.ylabel",
"numpy.random.rand",
"numpy.exp",
"matplotlib.pyplot.xlabel",
"numpy.array",
"numpy.average",
"numpy.zeros",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure... |
brianjo/vision | [
"a8bde78130fd8c956780d85693d0f51912013732",
"a8bde78130fd8c956780d85693d0f51912013732",
"a8bde78130fd8c956780d85693d0f51912013732"
] | [
"test/test_cpp_models.py",
"torchvision/models/detection/faster_rcnn.py",
"torchvision/models/detection/ssd.py"
] | [
"import os\nimport sys\nimport unittest\n\nimport torch\nimport torchvision.transforms.functional as F\nfrom PIL import Image\nfrom torchvision import models\n\ntry:\n from torchvision import _C_tests\nexcept ImportError:\n _C_tests = None\n\n\ndef process_model(model, tensor, func, name):\n model.eval()\n... | [
[
"torch.allclose",
"torch.jit.trace",
"torch.cat"
],
[
"torch.nn.Linear"
],
[
"torch.nn.functional.normalize",
"torch.nn.Sequential",
"torch.nn.functional.softmax",
"torch.ones",
"torch.cat",
"torch.nn.init.constant_",
"torch.nn.ModuleList",
"torch.nn.Conv2d"... |
dmis-lab/BERN2 | [
"0eaf635672b6c952984e16a165ce7e7f7805c675"
] | [
"multi_ner/training/run_eval.py"
] | [
"# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.\n# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may... | [
[
"torch.nn.CrossEntropyLoss",
"numpy.argmax"
]
] |
cosunae/postproc_np_products | [
"90d66f8e6bed1cae10f4b1b5ff21bf4e4aad26a1"
] | [
"thetavi.py"
] | [
"#!/usr/bin/python\nimport numpy as np\nimport cfgrib\nimport xarray as xr\nimport matplotlib.pyplot as plt\nimport cProfile\nimport pstats\nimport io\nimport time\nfrom pstats import SortKey\nimport dask\n\n\ndask.config.set(scheduler=\"threads\", num_workers=8)\n\n# pr = cProfile.Profile()\n# pr.enable()\n\npc_g ... | [
[
"numpy.arange"
]
] |
chris-tng/minitorch | [
"f5facd366aac6a4d3a437796c43ac02a9b7069ff"
] | [
"tests/strategies.py"
] | [
"# +\nimport sys\nsys.path.append(\"..\")\n\nimport minitorch\nfrom hypothesis import settings\nfrom hypothesis.strategies import composite, floats, integers, lists\nimport numpy as np\n# -\n\nsettings.register_profile(\"ci\", deadline=None)\nsettings.load_profile(\"ci\")\n\n\nsmall_ints = integers(min_value=1, max... | [
[
"numpy.testing.assert_allclose"
]
] |
MentorEmbedded/autobahn-python | [
"299a6560cc8bd8e3ad7c02acf6cf15cf15cee87b"
] | [
"autobahn/xbr/_config.py"
] | [
"###############################################################################\n#\n# The MIT License (MIT)\n#\n# Copyright (c) Crossbar.io Technologies GmbH\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"),... | [
[
"numpy.datetime64"
]
] |
dungxibo123/NeuralCDE | [
"19f7ed24223f5822142c676127c92d818d290903"
] | [
"experiments/models/metamodel.py"
] | [
"import pathlib\nimport sys\nimport torch\n\nhere = pathlib.Path(__file__).resolve().parent\nsys.path.append(str(here / '..' / '..'))\n\nimport controldiffeq\n\n\nclass NeuralCDE(torch.nn.Module):\n \"\"\"A Neural CDE model. Provides a wrapper around the lower-level cdeint function, to get a flexible Neural CDE\... | [
[
"torch.nn.Linear",
"torch.cat",
"torch.zeros"
]
] |
dendisuhubdy/pytorch-saliency | [
"dcb3499be127637435a577cb42161b3e096aa28d",
"dcb3499be127637435a577cb42161b3e096aa28d"
] | [
"saliency/deconv/saliency.py",
"saliency/lime/saliency.py"
] | [
"import torch\nimport torch.nn as nn\n\nfrom saliency.saliency import Saliency\n\nclass DeconvSaliency(Saliency):\n \"\"\"docstring for DeconvSaliency.\"\"\"\n def __init__(self, model):\n super(DeconvSaliency, self).__init__(model)\n\n\n def guided_relu_hook(self, module, grad_in, grad_out):\n ... | [
[
"torch.nn.functional.relu",
"torch.zeros_like"
],
[
"torch.zeros",
"torch.from_numpy",
"numpy.argwhere",
"numpy.concatenate",
"torch.nn.Linear",
"scipy.ndimage.label",
"numpy.zeros",
"torch.nn.L1Loss"
]
] |
Jsakkos/microtools | [
"5800cb86631d2533def5d040f076295aab9536f1"
] | [
"Scripts/imgfileutils.py"
] | [
"# -*- coding: utf-8 -*-\n\n#################################################################\n# File : imgfileutils.py\n# Version : 1.4.5\n# Author : czsrh\n# Date : 10.12.2020\n# Institution : Carl Zeiss Microscopy GmbH\n# Location : https://github.com/zeiss-microscopy/OAD/blob/master/ju... | [
[
"pandas.concat",
"numpy.squeeze",
"numpy.double",
"pandas.DataFrame",
"numpy.round",
"numpy.int",
"numpy.mean",
"numpy.sum",
"numpy.float"
]
] |
behzadnouri/pandas | [
"506520bd35331aa82db50686c07d96594cac0c10"
] | [
"pandas/io/tests/parser/comment.py"
] | [
"# -*- coding: utf-8 -*-\n\n\"\"\"\nTests that comments are properly handled during parsing\nfor all of the parsers defined in parsers.py\n\"\"\"\n\nimport numpy as np\nimport pandas.util.testing as tm\n\nfrom pandas import DataFrame\nfrom pandas.compat import StringIO\n\n\nclass CommentTests(object):\n\n def te... | [
[
"pandas.util.testing.assert_numpy_array_equal",
"pandas.compat.StringIO",
"pandas.util.testing.assert_almost_equal",
"pandas.DataFrame",
"pandas.util.testing.assert_frame_equal",
"numpy.array"
]
] |
ternaus/iglovikov_segmentation | [
"5a9463031e5da7c2cf34c967a4f2657416c11bd2"
] | [
"src/inference.py"
] | [
"\"\"\"Script to create segmented masks.\"\"\"\n\nimport argparse\nfrom pathlib import Path\n\nimport cv2\nimport numpy as np\nimport torch\nfrom catalyst.dl import SupervisedRunner\nfrom catalyst.dl import utils\nfrom iglovikov_helper_functions.config_parsing.from_py import py2cfg\nfrom iglovikov_helper_functions.... | [
[
"torch.no_grad",
"torch.load"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.