repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
apaleyes/xfer
[ "99cd83424bc7e76a2c2def9d5b1dacd06f6e9eb5", "99cd83424bc7e76a2c2def9d5b1dacd06f6e9eb5" ]
[ "xfer/contrib/xfer_leap/synthetic_data.py", "tests/unit/test_bnn_repurposer.py" ]
[ "# Copyright 2018 Amazon.com, Inc. or its affiliates. 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# A copy of the License is located at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n...
[ [ "numpy.arange", "matplotlib.pyplot.subplots" ], [ "numpy.allclose", "numpy.random.seed", "numpy.unique", "numpy.dtype", "numpy.ones", "numpy.argmax", "numpy.mean", "numpy.sum" ] ]
idharmateja/tensorflow
[ "1712002ad02f044f7569224bf465e0ea00e6a6c4", "6f0dd0425c51360fe2be5a938a8f3fb39e420fa3" ]
[ "tensorflow/contrib/data/python/ops/readers.py", "tensorflow/contrib/kfac/python/ops/optimizer.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.python.data.ops.readers.TextLineDataset", "tensorflow.python.framework.tensor_shape.TensorShape", "tensorflow.python.data.ops.dataset_ops.Dataset.from_tensor_slices", "tensorflow.python.ops.parsing_ops.decode_csv", "tensorflow.python.platform.gfile.Glob", "tensorflow.contrib.da...
yicrane/Real-SR
[ "a6e380b791129b80fe58bf282089c0cfd9159b36", "a6e380b791129b80fe58bf282089c0cfd9159b36" ]
[ "codes/preprocess/collect_noise.py", "codes/preprocess/ct_collect_noise_sp32v160m0_yic_210525.py" ]
[ "from PIL import Image\nimport numpy as np\nimport os.path as osp\nimport glob\nimport os\nimport argparse\nimport yaml\n\nparser = argparse.ArgumentParser(description='create a dataset')\nparser.add_argument('--dataset', default='df2k', type=str, help='selecting different datasets')\nparser.add_argument('--artifac...
[ [ "numpy.var", "numpy.array", "numpy.mean" ], [ "numpy.var", "numpy.array", "numpy.mean" ] ]
jalavery/gnomeR
[ "4f165774eb3c5f442881a915ee70e18a5f33b387", "4f165774eb3c5f442881a915ee70e18a5f33b387" ]
[ "inst/CnaAnnotator.py", "inst/AnnotatorCore.py" ]
[ "import argparse\n# from AnnotatorCore import *\nimport sys\nimport csv\nimport requests\nimport os.path\nimport logging\nimport re\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt\nfrom datetime import date\nimport logging\nlogging.basicConfig(level=logging.INFO)\nlog = logging.getLogger(...
[ [ "matplotlib.use" ], [ "matplotlib.use", "matplotlib.pyplot.gca" ] ]
JunweiLiang/Object_Detection_Tracking
[ "f86caaec97669a6da56f1b402cca4e179a85d2f0" ]
[ "tmot/matching.py" ]
[ "import numpy as np\r\nimport scipy\r\nfrom scipy.spatial.distance import cdist\r\nimport lap # 0.4.0\r\n\r\nfrom cython_bbox import bbox_overlaps as bbox_ious\r\nfrom . import kalman_filter\r\n\r\ndef merge_matches(m1, m2, shape):\r\n O,P,Q = shape\r\n m1 = np.asarray(m1)\r\n m2 = np.asarray(m2)\r\n\r\n ...
[ [ "numpy.asarray", "numpy.ascontiguousarray", "scipy.spatial.distance.cdist", "numpy.where", "numpy.empty" ] ]
cailab-tamu/scTenifoldXct
[ "d25ded8dfb7f2951217a30ab71eccd6b060178f6", "d25ded8dfb7f2951217a30ab71eccd6b060178f6" ]
[ "tests/test_stat.py", "scTenifoldXct/pcNet.py" ]
[ "import pytest\n\nimport itertools\n\nimport pandas as pd\nimport numpy as np\n\nfrom scTenifoldXct.core import null_test\n\n\ndef generate_fake_df_nn(n_ligand=3000, n_receptors=3000, n_cands=200):\n gene_names = [f\"GENE{i}\" for i in range(max(n_ligand, n_receptors))]\n iteration = itertools.product(gene_na...
[ [ "numpy.random.lognormal", "numpy.random.chisquare", "numpy.random.choice" ], [ "scipy.sparse.csc_matrix", "numpy.linalg.svd", "scipy.sparse.issparse", "numpy.random.seed", "numpy.percentile", "numpy.ones", "numpy.max", "numpy.delete", "numpy.fill_diagonal", ...
andreyyec/Texas_Tech_AI
[ "e4e8e41c65b41a1a684f1f65d21cf5427abdb046" ]
[ "practices/week6/assignment_exercise_3.py" ]
[ "import numpy as np\nimport pandas as pd\nimport pickle\nimport tensorflow as tf\nimport sklearn.metrics\nimport matplotlib.pyplot as plt\n\n# Load the training and test data from the Pickle file\nwith open(\"../datasets/credit_card_default_dataset.pickle\", \"rb\") as f:\n train_data, train_labels, test_data,...
[ [ "tensorflow.matmul", "tensorflow.nn.sigmoid", "numpy.sqrt", "matplotlib.pyplot.title", "tensorflow.zeros", "matplotlib.pyplot.figure", "tensorflow.placeholder", "matplotlib.pyplot.plot", "tensorflow.global_variables_initializer", "numpy.ceil", "tensorflow.nn.sigmoid_cro...
pengfei99/openfood
[ "2b65af02ce34bf8193d357ef3661da749d2d9671" ]
[ "siamesenetwork/siamesePreTrainedEmbeddings.py" ]
[ "# !/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nDefine the siamese network for one-shot learning,\nfor french short labels\n02/06/2021\n@author: milena-git, from jeremylhour courtesy\n\"\"\"\nimport torch\nimport torch.nn as nn\n\n\ndef _createEmbeddingLayer(weights_matrix, non_trainable=False):\n \"\...
[ [ "torch.nn.Dropout", "torch.nn.Embedding", "torch.tensor", "torch.nn.Linear", "torch.nn.Embedding.from_pretrained", "torch.nn.ReLU" ] ]
DwijayDS/fastestimator
[ "6061a4fbbeb62a2194ef82ba8017f651710d0c65", "9b288cb2bd870f971ec4cee09d0b3205e1316a94", "9b288cb2bd870f971ec4cee09d0b3205e1316a94", "9b288cb2bd870f971ec4cee09d0b3205e1316a94", "6061a4fbbeb62a2194ef82ba8017f651710d0c65", "9b288cb2bd870f971ec4cee09d0b3205e1316a94", "6061a4fbbeb62a2194ef82ba8017f651710d0c6...
[ "test/PR_test/unit_test/op/numpyop/univariate/test_autocontrast.py", "fastestimator/trace/metric/mcc.py", "fastestimator/backend/_iwd.py", "fastestimator/trace/metric/bleu_score.py", "fastestimator/backend/_lambertw.py", "fastestimator/trace/io/traceability.py", "test/PR_test/integration_test/trace/metr...
[ "# Copyright 2021 The FastEstimator 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 r...
[ [ "numpy.random.randint" ], [ "numpy.round", "numpy.argmax", "sklearn.metrics.matthews_corrcoef" ], [ "tensorflow.is_tensor", "torch.cuda.is_available" ], [ "numpy.argmax" ], [ "torch.all", "torch.abs", "tensorflow.is_tensor", "scipy.special.lambertw", ...
yockgen/movidius
[ "cc32f1951a4d00d2250bb0d2b9000c5f2435b41a", "cc32f1951a4d00d2250bb0d2b9000c5f2435b41a", "cc32f1951a4d00d2250bb0d2b9000c5f2435b41a" ]
[ "ncappzoo/tensorflow/topcoder_andresduque/supporting/inferences.py", "ncappzoo/apps/security-cam/security-picam.py", "ncappzoo/apps/object-detector/object-detector.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n#~ The MIT License (MIT)\n#~ Copyright 2018 ©klo86min\n#~ Permission is hereby granted, free of charge, to any person obtaining a copy \n#~ of this software and associated documentation files (the \"Software\"), to deal \n#~ in the Software without restriction, ...
[ [ "numpy.log", "numpy.zeros", "numpy.float" ], [ "numpy.float16", "numpy.array" ], [ "numpy.float16", "numpy.sum" ] ]
agarwalrounak/qmt
[ "5e8a7001cc020979636e492448abcfd894396038" ]
[ "tests/py3/test_property_map.py" ]
[ "import numpy as np\n\nfrom qmt.geometry import PropertyMap, MaterialPropertyMap\nfrom qmt.materials import Materials\n\n\nclass DummyPartMap:\n def __init__(self, part_ids):\n assert len(part_ids) == 2\n self.partIds = part_ids\n\n def __call__(self, x):\n assert np.ndim(x) >= 1\n ...
[ [ "numpy.ones", "numpy.ndim", "numpy.asanyarray", "numpy.vectorize", "numpy.where" ] ]
abhaikollara/tensorflow
[ "4f96df3659696990cb34d0ad07dc67843c4225a9", "4f96df3659696990cb34d0ad07dc67843c4225a9", "4f96df3659696990cb34d0ad07dc67843c4225a9", "4f96df3659696990cb34d0ad07dc67843c4225a9", "4f96df3659696990cb34d0ad07dc67843c4225a9", "4f96df3659696990cb34d0ad07dc67843c4225a9", "7e8927e7af0c51ac20a63bd4eab6ff83df1a39a...
[ "tensorflow/python/kernel_tests/batch_scatter_ops_test.py", "tensorflow/python/keras/datasets/cifar10.py", "tensorflow/python/framework/kernels.py", "tensorflow/python/kernel_tests/batch_matmul_op_test.py", "tensorflow/python/keras/engine/input_spec_test.py", "tensorflow/python/ops/resource_variable_ops.p...
[ "# Copyright 2015 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.python.ops.state_ops.batch_scatter_update", "numpy.random.seed", "tensorflow.python.framework.ops.IndexedSlices", "tensorflow.python.ops.variables.Variable", "tensorflow.python.platform.test.main", "numpy.random.randint", "numpy.random.randn", "numpy.ndenumerate", "...
wenlianglaw/Tetris-in-Python
[ "d4f0a22c4827e7eeb44c55def3f024e0c6932ebe" ]
[ "game_client.py" ]
[ "# This file defines the back end of the Tetris game\n#\n# GameState is the base class of GameClient.\n#\n# GameClient.Run() will start two threads:\n# - _ProcessActions: Process the action list every x seconds\n# - _AutoDrop: Auto drops the current piece.\n#\n# GameClient:\n# - current piece\n# - held piece\...
[ [ "numpy.pad", "numpy.min", "numpy.random.shuffle", "numpy.all", "numpy.copy", "numpy.delete", "numpy.packbits", "numpy.array", "numpy.zeros" ] ]
ZackPashkin/pytorch
[ "5b1f5c8f17ec4067dc9f9df98bbcc6757ab24444" ]
[ "test/test_binary_ufuncs.py" ]
[ "import torch\nimport numpy as np\n\nimport itertools\nfrom itertools import product\nimport math\nimport random\nimport unittest\nimport warnings\nimport operator\nfrom functools import partial\n\nfrom torch._six import inf, nan\nfrom torch.testing._internal.common_utils import (\n TestCase, iter_indices, TEST_...
[ [ "torch.fmod", "torch.randint", "torch.max", "torch.zeros", "torch.testing._internal.common_utils.iter_indices", "torch.testing.get_all_complex_dtypes", "torch.bitwise_xor", "torch.lcm", "torch.where", "torch.device", "torch.pow", "numpy.right_shift", "torch.sqrt...
rkeulemans/exercise_public
[ "5f8020198b8b234169eea4d5e08c98344438de5d" ]
[ "helpers.py" ]
[ "from sympy import Rational, Symbol, latex, UnevaluatedExpr\nimport sympy as sp\nimport numpy as np\n\nu = lambda x : UnevaluatedExpr(x)\n\n# Helper functions\ndef explain_add(a, b):\n assert(np.shape(a) == np.shape(b))\n rows, columns = np.shape(a)\n return sp.Matrix([[Symbol(f\"({latex(u(a[i,j]))} + {lat...
[ [ "numpy.shape", "numpy.empty" ] ]
galactics/space-command
[ "496b054883c6464bcd8d73d72c8145ae80606336", "496b054883c6464bcd8d73d72c8145ae80606336" ]
[ "space/station.py", "space/passes.py" ]
[ "import logging\nfrom numpy import degrees, pi, radians\n\nfrom beyond.frames import get_frame, create_station\nfrom beyond.errors import UnknownFrameError\n\nfrom .wspace import ws\nfrom .utils import dms2deg, deg2dms\n\n\nlog = logging.getLogger(__name__)\n\n\nclass StationDb:\n def __new__(cls):\n\n if...
[ [ "numpy.radians", "numpy.degrees", "matplotlib.pyplot.subplots_adjust", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ], [ "matplotlib.pyplot.tight_layout", "numpy.radians", "matplotlib.pyplot.ylim", "numpy.degrees", "numpy.arange", "matplotlib.pyplot.plot", ...
boringlee24/keras_old
[ "1e1176c45c4952ba1b9b9e58e9cc4df027ab111d", "1e1176c45c4952ba1b9b9e58e9cc4df027ab111d", "1e1176c45c4952ba1b9b9e58e9cc4df027ab111d", "1e1176c45c4952ba1b9b9e58e9cc4df027ab111d", "1e1176c45c4952ba1b9b9e58e9cc4df027ab111d", "1e1176c45c4952ba1b9b9e58e9cc4df027ab111d", "1e1176c45c4952ba1b9b9e58e9cc4df027ab111...
[ "examples/pwr_run/checkpointing/final/final4_new2/job51.py", "examples/pwr_run/checkpointing/final_trace/top50/job48.py", "examples/pwr_run/checkpointing/debug/ovhd_profile/job6.py", "examples/pwr_run/ml_regression/new_speedup_def/knn_k80.py", "examples/pwr_run/checkpointing/nonpc_short/final1/job20.py", ...
[ "\"\"\"\n#Trains a ResNet on the CIFAR10 dataset.\n\n\"\"\"\n\nfrom __future__ import print_function\nimport keras\nfrom keras.layers import Dense, Conv2D, BatchNormalization, Activation\nfrom keras.layers import AveragePooling2D, Input, Flatten\nfrom keras.optimizers import Adam\nfrom keras.callbacks import ModelC...
[ [ "numpy.mean" ], [ "numpy.mean" ], [ "numpy.mean" ], [ "pandas.read_csv", "matplotlib.use", "sklearn.model_selection.train_test_split", "sklearn.metrics.mean_squared_error", "sklearn.neighbors.KNeighborsRegressor", "numpy.mean", "sklearn.linear_model.LinearRegres...
woanderer/neuroformer
[ "df3462d55977b6c9adcb6753e7c474b8b76e8021", "df3462d55977b6c9adcb6753e7c474b8b76e8021", "df3462d55977b6c9adcb6753e7c474b8b76e8021", "df3462d55977b6c9adcb6753e7c474b8b76e8021" ]
[ ".history/neuroformer/model_perceiver_20220116213408.py", ".history/neuroformer/model_perceiver_20220121144506.py", ".history/neuroformer/model_perceiver_20220121172442.py", ".history/neuroformer/perceiver_20220112195138.py" ]
[ "# from code.transformer_vid.utils import convert_weights\n# import rotary_embedding_torch\nfrom torch.nn.modules.activation import GELU, ReLU\n# from data.OneCombo3.trainer import TrainerConfig\nimport math\nimport numpy as np\nimport itertools\nimport logging\n\nimport torch\nimport torch.nn as nn\nfrom torch.nn ...
[ [ "torch.all", "torch.mean", "torch.nn.functional.softmax", "torch.zeros", "torch.sin", "torch.nn.Transformer", "torch.cat", "torch.sum", "torch.nn.Embedding", "torch.no_grad", "torch.cuda.is_available", "torch.topk", "scipy.optimize.linear_sum_assignment", "t...
agramfort/pymultifracs
[ "3a8896f3f26180b05ccecb4a905b05a3ebc0308b", "3a8896f3f26180b05ccecb4a905b05a3ebc0308b" ]
[ "pymultifracs/simul/mrw.py", "pymultifracs/structurefunction.py" ]
[ "# Synthesis of multifractal random walk and derived processes.\n#\n# Roberto Fabio Leonarduzzi\n# January, 2019\n\nimport numpy as np\nfrom .fbm import fgn\nfrom .pzutils import gaussian_cme, gaussian_chol\nfrom numpy.fft import fft, ifft\n# import math\n# import matplotlib.pyplot as plt\n\n\ndef mrw(shape, H, lam...
[ [ "numpy.fft.fft2", "numpy.log", "numpy.maximum", "numpy.sqrt", "numpy.fft.fft", "numpy.min", "numpy.arange", "numpy.ones", "numpy.ceil", "numpy.fft.ifftshift", "numpy.random.randn", "numpy.mean", "numpy.exp", "numpy.zeros" ], [ "numpy.log2", "nump...
CatTiger/vnpy
[ "7901a0fb80a5b44d6fc752bd4b2b64ec62c8f84b", "7901a0fb80a5b44d6fc752bd4b2b64ec62c8f84b", "7901a0fb80a5b44d6fc752bd4b2b64ec62c8f84b", "7901a0fb80a5b44d6fc752bd4b2b64ec62c8f84b" ]
[ "venv/lib/python3.7/site-packages/rqdatac/services/stock_status.py", "venv/lib/python3.7/site-packages/rqdatac/services/financial.py", "venv/lib/python3.7/site-packages/rqdatac/services/structured_fund.py", "vnpy/analyze/util/support_resistence.py" ]
[ "# -*- coding: utf-8 -*-\nimport datetime\nimport warnings\n\nimport pandas as pd\nimport numpy as np\n\nfrom rqdatac.utils import to_datetime, to_date\nfrom rqdatac.validators import (\n ensure_date_range,\n ensure_date_or_today_int,\n ensure_list_of_string,\n check_items_in_container,\n ensure_orde...
[ [ "pandas.Panel", "pandas.DataFrame" ], [ "pandas.merge", "pandas.to_datetime", "pandas.Panel", "pandas.DataFrame", "numpy.float64" ], [ "pandas.DataFrame" ], [ "matplotlib.pyplot.legend", "pandas.concat", "pandas.Series", "numpy.polynomial.Chebyshev.fit",...
pazamelin/openvino
[ "b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48", "b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48", "031e998a15ec738c64cc2379d7f30fb73087c272", "b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48", "b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48", "b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48", "031e998a15ec738c64cc2379d7f30fb73087c27...
[ "src/bindings/python/tests/test_ngraph/test_ops_binary.py", "tools/mo/openvino/tools/mo/middle/passes/convert_data_type.py", "src/bindings/python/tests_compatibility/test_ngraph/test_ops_multioutput.py", "tools/mo/unit_tests/mo/ops/scatternd_test.py", "tools/mo/unit_tests/mo/ops/sparse_segment_sum_test.py",...
[ "# Copyright (C) 2018-2021 Intel Corporation\n# SPDX-License-Identifier: Apache-2.0\n\nimport operator\n\nimport numpy as np\nimport pytest\n\nimport openvino.runtime.opset8 as ov\nfrom tests.runtime import get_runtime\nfrom tests.test_ngraph.util import run_op_node\n\n\n@pytest.mark.parametrize(\n \"ng_api_help...
[ [ "numpy.allclose", "numpy.multiply", "numpy.power", "numpy.arange", "numpy.array" ], [ "numpy.array_equal", "numpy.isfinite", "numpy.count_nonzero" ], [ "numpy.array", "numpy.allclose" ], [ "numpy.array", "numpy.array_equal" ], [ "numpy.array", ...
ihmeuw/cascade-at
[ "a5b1b5da1698163fd3bbafc6288968dd9c398096", "a5b1b5da1698163fd3bbafc6288968dd9c398096", "a5b1b5da1698163fd3bbafc6288968dd9c398096" ]
[ "tests/model/test_priors.py", "src/cascade_at/dismod/constants.py", "src/cascade_at/model/age_time_grid.py" ]
[ "import pytest\nimport numpy as np\nfrom numpy import isclose\nfrom numpy.random import RandomState\n\nfrom cascade_at.model.priors import (\n Constant,\n Gaussian,\n Uniform,\n Laplace,\n StudentsT,\n LogGaussian,\n LogLaplace,\n LogStudentsT,\n PriorError,\n)\n\n\ndef test_happy_constru...
[ [ "numpy.all", "numpy.random.RandomState", "numpy.isclose" ], [ "numpy.dtype" ], [ "numpy.atleast_1d", "numpy.in1d", "pandas.testing.assert_frame_equal" ] ]
jiangbestone/DetectRccn
[ "fb30491201f8c64d5ca75298d52aa1a20c4bc6e3" ]
[ "models/rcnn.py" ]
[ "\nfrom torch.autograd import Variable\nfrom models.proposal_target_layer_cascade import *\nimport torchvision.models as models\nfrom models.proposal import *\n#bocknet\nclass ResNet(nn.Module):\n def __init__(self, block, layers, num_classes=1000,dropout_prob=0.2):\n self.inplanes = 64\n super(Res...
[ [ "torch.autograd.Variable" ] ]
httpsgithu/mindspore
[ "c29d6bb764e233b427319cb89ba79e420f1e2c64", "c29d6bb764e233b427319cb89ba79e420f1e2c64", "c29d6bb764e233b427319cb89ba79e420f1e2c64", "c29d6bb764e233b427319cb89ba79e420f1e2c64", "c29d6bb764e233b427319cb89ba79e420f1e2c64", "c29d6bb764e233b427319cb89ba79e420f1e2c64", "c29d6bb764e233b427319cb89ba79e420f1e2c6...
[ "tests/ut/python/dataset/test_rgb_hsv.py", "tests/st/sparse/test_csr.py", "mindspore/python/mindspore/dataset/transforms/c_transforms.py", "tests/ut/python/dataset/test_duplicate_op.py", "mindspore/python/mindspore/mindrecord/tools/cifar100_to_mr.py", "tests/ut/python/parallel/test_unsortedsegmentprod.py"...
[ "# Copyright 2019 Huawei Technologies Co., Ltd\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 applicable l...
[ [ "numpy.vectorize", "numpy.random.randint" ], [ "numpy.arange", "numpy.array", "numpy.zeros", "numpy.ones" ], [ "numpy.asarray", "numpy.array", "numpy.char.decode" ], [ "numpy.testing.assert_array_equal", "numpy.array" ], [ "numpy.int" ], [ "n...
rtloftin/strategically_efficient_rl
[ "85a702b9361211d345a58cc60696e4e851d48ec4", "85a702b9361211d345a58cc60696e4e851d48ec4" ]
[ "algorithms/agents/intrinsic.py", "train_multiagent.py" ]
[ "import numpy as np\nimport scipy.signal\nfrom ray.rllib.policy.sample_batch import SampleBatch\nfrom ray.rllib.evaluation.postprocessing import Postprocessing\n\nfrom algorithms.curiosity import INTRINSIC_REWARD\n\nINTRINSIC_VALUE_TARGETS = \"intrinsic_value_targets\"\nINTRINSIC_VF_PREDS = \"intrinsic_vf_preds\"\n...
[ [ "numpy.array", "numpy.stack" ], [ "numpy.sum" ] ]
KaihuaTang/scene-graph-benchmark.pytorch
[ "45cd54f7465b81d3154e94fcab2b554a09637f6f", "45cd54f7465b81d3154e94fcab2b554a09637f6f" ]
[ "maskrcnn_benchmark/modeling/roi_heads/relation_head/model_transformer.py", "maskrcnn_benchmark/solver/build.py" ]
[ "\"\"\"\nBased on the implementation of https://github.com/jadore801120/attention-is-all-you-need-pytorch\n\"\"\"\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport numpy as np\nfrom maskrcnn_benchmark.modeling.utils import cat\nfrom .utils_motifs import obj_edge_vectors, to_onehot, nms_o...
[ [ "torch.nn.Softmax", "torch.nn.Dropout", "torch.nn.functional.softmax", "torch.LongTensor", "numpy.sqrt", "torch.cat", "numpy.power", "torch.nn.utils.rnn.pad_sequence", "torch.nn.init.xavier_normal_", "torch.arange", "torch.nn.Embedding", "torch.nn.LayerNorm", "t...
lenna-project/birds-plugin
[ "c548790dcb0593b80ea6da4605e7aa32e3f141ae" ]
[ "scripts/train.py" ]
[ "import logging\nimport numpy as np\nimport os\nimport PIL\nimport PIL.Image\nimport tensorflow as tf\n\nfrom tensorflow.keras.layers import Layer, Conv2D, MaxPool2D, Dense, Flatten, Dropout, GlobalAveragePooling2D\nfrom tensorflow.keras.applications import MobileNetV2\nfrom tensorflow.keras import layers\nfrom ten...
[ [ "tensorflow.keras.utils.image_dataset_from_directory", "tensorflow.keras.callbacks.ModelCheckpoint", "tensorflow.keras.layers.GlobalAveragePooling2D", "tensorflow.keras.layers.RandomFlip", "tensorflow.keras.layers.Dense", "tensorflow.keras.Model", "tensorflow.keras.layers.RandomZoom", ...
tpimentelms/meaning2form
[ "624b3947b3ac2a7a521cf35c762fb56508236f74" ]
[ "learn_pipe/model/lstm.py" ]
[ "import torch.nn as nn\n\nfrom .base import BaseLM\n\n\nclass IpaLM(BaseLM):\n name = 'lstm'\n\n def __init__(self, vocab_size, hidden_size, nlayers=1, dropout=0.1, embedding_size=None, **kwargs):\n super().__init__(\n vocab_size, hidden_size, nlayers=nlayers, dropout=dropout, embedding_size...
[ [ "torch.nn.Linear", "torch.nn.Dropout", "torch.nn.Embedding", "torch.nn.LSTM" ] ]
j-towns/jax
[ "49f3f991d4faae22fcd9d8248f3d36575b5004f6" ]
[ "tests/lax_numpy_einsum_test.py" ]
[ "# Copyright 2018 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 ...
[ [ "numpy.random.RandomState", "numpy.einsum", "numpy.ones" ] ]
tanzhenyu/image_augmentation
[ "d1f8cc35cf25438556e7934e8e6c78827819ea9d" ]
[ "image_augmentation/callbacks/extra_eval.py" ]
[ "import tensorflow as tf\nfrom tensorflow.keras.callbacks import Callback\n\n\nclass ExtraValidation(Callback):\n \"\"\"Log evaluation metrics of an extra validation set. This callback\n is useful for model training scenarios where multiple validation sets\n are used for evaluation (as Keras by default, pr...
[ [ "tensorflow.summary.scalar", "tensorflow.summary.create_file_writer" ] ]
cristianMeli/ubatch
[ "fb3c6dccf0a9e25e25f5956e2e91ed70e9ea01ee" ]
[ "examples/flask_app.py" ]
[ "import random\nimport numpy as np\n\nfrom typing import Dict, List\n\nfrom flask import Flask\nfrom flask_restx import Resource, Api\n\n# from numpy import genfromtxt\n\nfrom ubatch import ubatch_decorator\n\n# from keras.models import load_model\nfrom sklearn.datasets import fetch_20newsgroups\nfrom sklearn.model...
[ [ "numpy.array", "sklearn.model_selection.train_test_split", "sklearn.datasets.fetch_20newsgroups" ] ]
simonharris/pykmeans
[ "4d47eb12a2bbaf1b05d7ccfd0cfc9ccf78ddf86d" ]
[ "tests/initialisations/test_bradleyfayyad1998.py" ]
[ "\"\"\"\nTest for Bradley & Fayyad 1998 initialisation algorithm\n\"\"\"\n\nimport unittest\n\nimport numpy as np\n\nfrom datasets import testloader\nfrom initialisations import bradley as bfinit\nimport kmeans\n\n# pylint: disable=R0201,W0212\n\n\nclass BfTestSuite(unittest.TestCase):\n \"\"\"Test suite for B&F...
[ [ "numpy.testing.assert_array_equal", "numpy.array" ] ]
swharden/SWHLab
[ "a86c3c65323cec809a4bd4f81919644927094bf5" ]
[ "doc/oldcode/swhlab/core/memtest.py" ]
[ "\"\"\"\nMembrane test routines for voltage clamp experiments.\ncreates abf.MTs[sweep]={} #with keys like Ih, Ra, Rm, etc\n\nExample usage:\n abf=swhlab.ABF('../abfs/group/16701010.abf')\n swhlab.memtest.memtest(abf) #performs memtest on all sweeps\n swhlab.memtest.checkSweep(abf) #lets you eyeball check h...
[ [ "numpy.arange", "numpy.max", "numpy.average", "numpy.array", "numpy.where" ] ]
JelleAalbers/lenstronomy
[ "6db785667ff099fa8338e972b66253b2901b2827" ]
[ "lenstronomy/LensModel/MultiPlane/multi_plane_base.py" ]
[ "import numpy as np\nfrom lenstronomy.Cosmo.background import Background\nfrom lenstronomy.LensModel.profile_list_base import ProfileListBase\nimport lenstronomy.Util.constants as const\n\n__all__ = ['MultiPlaneBase']\n\n\nclass MultiPlaneBase(ProfileListBase):\n\n \"\"\"\n Multi-plane lensing class\n\n Th...
[ [ "numpy.ones", "numpy.max", "numpy.zeros_like", "numpy.argsort", "numpy.array" ] ]
benvcutilli/CountingPlusFriendly
[ "1947e2a765e20c87e080da22b4ecc4da1f272b02" ]
[ "Friendly/LaTeX/figures/cosinecomparison.py" ]
[ "# The Plotly^^^plotly^^^ package\nimport plotly\n\n# Importing ^^^numpy^^^\nimport numpy\n\n\n\n\ndef sigmoid(x):\n return (1 + numpy.exp(-x)) ** -1\n\n\n\n\n\n\n\n\n\nsamplesPerDimension = 500\n# Using numpy.linspace to create x and y values is from somewhere on ^^^plotly^^^'s website, most\n# likely. It is a ...
[ [ "numpy.dot", "numpy.expand_dims", "numpy.linspace", "numpy.linalg.norm", "numpy.stack", "numpy.exp", "numpy.array" ] ]
530824679/YOLOv2
[ "eff9ddbab58da970e7fb449cd1974fb810fd6023" ]
[ "model/ops.py" ]
[ "# -*- coding: utf-8 -*-\n# --------------------------------------\n# @Time : 2020/11/01\n# @Author : Oscar Chen\n# @Email : 530824679@qq.com\n# @File : ops.py\n# Description :base operators.\n# --------------------------------------\n\nimport tensorflow as tf\n\ndef leaky_relu(x):\n return tf.nn.leaky_...
[ [ "tensorflow.layers.conv2d", "tensorflow.layers.batch_normalization", "tensorflow.space_to_depth", "tensorflow.layers.max_pooling2d", "tensorflow.name_scope", "tensorflow.pad", "tensorflow.nn.leaky_relu" ] ]
thaipduong/safe-control-gym
[ "69f8f627d232d50813a7fff6113dd6d5caccf930" ]
[ "safe_control_gym/controllers/mpc/gp_mpc_hexa.py" ]
[ "\"\"\"Model Predictive Control with a Gaussian Process model.\n\nBased on:\n * L. Hewing, J. Kabzan and M. N. Zeilinger, \"Cautious Model Predictive Control Using Gaussian Process Regression,\"\n in IEEE Transactions on Control Systems Technology, vol. 28, no. 6, pp. 2736-2743, Nov. 2020, doi: 10.1109/TCST....
[ [ "numpy.diag", "numpy.dot", "scipy.stats.norm.ppf", "numpy.savez", "torch.zeros", "torch.diag_embed", "numpy.hstack", "numpy.arange", "numpy.eye", "torch.from_numpy", "numpy.load", "scipy.linalg.solve_discrete_are", "numpy.zeros", "numpy.atleast_2d", "num...
PouyaREZ/Wastewater_Energy_Optimization
[ "ead604b715337dc8c76871910d38965d1b8b1856" ]
[ "Plotters/Results/Plots_Paper_One.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Fri Feb 4 2020\n\n\n@Author: PouyaRZ\n\n____________________________________________________\nPlots to produce:\n1. LCC of equipment for each scenario for all the individuals\n2, SCC of equipment for each scenario for all the individuals\n\n3. SCC vs LCC scatter plot.\n\...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.scatter", "matplotlib.pyplot.figure", "matplotlib.pyplot.ylim", "matplotlib.pyplot.savefig", "pandas.DataFrame", "matplotlib.pyplot.close", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.xticks", "matplotlib.pyplot.style.use", ...
Felihong/wikidata-sequence-analysis
[ "1d86ad9812c90864eb2c9ab72e5e61474d439f1e" ]
[ "src/sequence_generator.py" ]
[ "import pandas as pd\nfrom itertools import groupby\nfrom operator import itemgetter\n\nclass SequenceGenerator:\n\n def __init__(self, csvfile, jsThreshold):\n self.datafile = csvfile\n self.jsThreshold = jsThreshold\n\n \"\"\"\n Convert the input csv file into dataframe\n \"\"\"\n def...
[ [ "pandas.read_csv" ] ]
cvmxn1/OpenFermion
[ "cf53c063d0f124a02ff8776bb7f8afb110d4bde6" ]
[ "src/openfermion/resource_estimates/molecule/pyscf_utils.py" ]
[ "#coverage:ignore\n\"\"\" Drivers for various PySCF electronic structure routines \"\"\"\nfrom typing import Tuple, Optional\nimport sys\nimport h5py\nimport numpy as np\nfrom pyscf import gto, scf, ao2mo, mcscf, lo, tools, cc\nfrom pyscf.mcscf import avas\n\n\ndef stability(pyscf_mf):\n \"\"\"\n Test wave fu...
[ [ "numpy.sqrt", "numpy.einsum", "numpy.asarray", "numpy.eye", "numpy.max", "numpy.linalg.eigh", "numpy.array", "numpy.sum", "numpy.isclose" ] ]
wenhaopeter/read_pytorch_code
[ "491f989cd918cf08874dd4f671fb7f0142a0bc4f", "491f989cd918cf08874dd4f671fb7f0142a0bc4f", "491f989cd918cf08874dd4f671fb7f0142a0bc4f", "491f989cd918cf08874dd4f671fb7f0142a0bc4f", "491f989cd918cf08874dd4f671fb7f0142a0bc4f", "491f989cd918cf08874dd4f671fb7f0142a0bc4f", "491f989cd918cf08874dd4f671fb7f0142a0bc4...
[ "torch/testing/_internal/common_utils.py", "test/distributed/test_ddp_under_dist_autograd.py", "caffe2/python/data_parallel_model_test.py", "test/test_show_pickle.py", "caffe2/python/operator_test/bbox_transform_test.py", "test/type_hint_tests/tensor_copy.py", "caffe2/python/optimizer_test_util.py", "...
[ "r\"\"\"Importing this file must **not** initialize CUDA context. test_distributed\nrelies on this assumption to properly run. This means that when this is imported\nno CUDA calls shall be made, including torch.cuda.device_count(), etc.\n\ntorch.testing._internal.common_cuda.py can freely initialize CUDA context wh...
[ [ "numpy.random.seed", "torch.autograd.gradcheck.gradgradcheck", "torch.testing._internal.common_cuda.initialize_cuda_context_rng", "numpy.array", "torch.autograd.gradcheck", "torch.testing._compare_tensors_internal" ], [ "torch.testing._internal.common_utils.run_tests" ], [ ...
Geolem/nltk
[ "39b84d97bc857fce4fef185c69b94546b8474551" ]
[ "nltk/parse/dependencygraph.py" ]
[ "# Natural Language Toolkit: Dependency Grammars\n#\n# Copyright (C) 2001-2021 NLTK Project\n# Author: Jason Narad <jason.narad@gmail.com>\n# Steven Bird <stevenbird1@gmail.com> (modifications)\n#\n# URL: <http://nltk.org/>\n# For license information, see LICENSE.TXT\n#\n\n\"\"\"\nTools for reading and writ...
[ [ "matplotlib.pylab.savefig", "matplotlib.pylab.xticks", "matplotlib.pylab.yticks", "matplotlib.pylab.show" ] ]
leguiart/MSc_Thesis
[ "22ffc73c75d814856850f26c4586d90896b74cf3" ]
[ "evosoro_pymoo/Algorithms/RankAndNoveltySurvival.py" ]
[ "import numpy as np\n\nfrom pymoo.core.survival import Survival\nfrom pymoo.util.nds.non_dominated_sorting import NonDominatedSorting\nfrom pymoo.util.randomized_argsort import randomized_argsort\n\n# ---------------------------------------------------------------------------------------------------------\n# Surviv...
[ [ "numpy.array" ] ]
robertklee/SENG474-DataMining
[ "85b6ff300e18320fe8b40c89d5f22fde51ba588e", "85b6ff300e18320fe8b40c89d5f22fde51ba588e" ]
[ "notebooks/imgaug-playground.py", "coco_df.py" ]
[ "import imgaug as ia\nfrom imgaug import augmenters as iaa\nimport numpy as np\nfrom scipy import misc\nimport imageio\nimport cv2\n\nimport imgaug as ia\nimport imgaug.augmenters as iaa\nfrom imgaug.augmentables import Keypoint, KeypointsOnImage\n\n\nia.seed(1)\n\nimage = ia.quokka(size=(256, 256))\nkps = Keypoint...
[ [ "numpy.zeros" ], [ "pandas.merge", "pandas.concat", "pandas.DataFrame" ] ]
anmartinezs/pyseg_system
[ "5bb07c7901062452a34b73f376057cabc15a13c3", "5bb07c7901062452a34b73f376057cabc15a13c3", "5bb07c7901062452a34b73f376057cabc15a13c3", "5bb07c7901062452a34b73f376057cabc15a13c3", "5bb07c7901062452a34b73f376057cabc15a13c3", "5bb07c7901062452a34b73f376057cabc15a13c3", "5bb07c7901062452a34b73f376057cabc15a13c...
[ "code/pyto/tomo/ctf.py", "code/pyorg/scripts/arp23/arp_uni_2nd_W.py", "code/pyto/util/test/test_numpy_plus.py", "code/pyto/util/test/test_scipy_plus.py", "code/pyto/segmentation/cleft.py", "code/pyorg/scripts/syn/syn_column_analysis.py", "code/tutorials/synth_sumb/tracing/mb_graph_batch.py", "code/pyo...
[ "\"\"\"\nFunctions related to ctf.\n\nCurrently only few that allow running ctffind from console or notebook.\n\nWork in progress.\n\n# Author: Vladan Lucic (Max Planck Institute for Biochemistry)\n# $Id$\n\"\"\"\nfrom __future__ import unicode_literals\nfrom __future__ import print_function\nfrom __future__ import...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "matplotlib.pyplot.ylim", "matplotlib.pyplot.plot", "numpy.log10", "numpy.exp", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "numpy.sum", "numpy.loadtxt", "matplotlib.pyplot....
a868111817/language-model-playground
[ "daecd4e39bbf8128b04aa236ad1d31cd22c3c1d9" ]
[ "test/lmp/model/_lstm/conftest.py" ]
[ "r\"\"\"Setup fixtures for testing :py:class:`lmp.model.LSTMModel`.\"\"\"\n\nimport pytest\nimport torch\n\nfrom lmp.model import LSTMModel\nfrom lmp.tknzr import BaseTknzr\n\n\n@pytest.fixture\ndef lstm_model(\n tknzr: BaseTknzr,\n d_emb: int,\n d_hid: int,\n n_hid_lyr: int,\n n_...
[ [ "torch.randint" ] ]
hust-cec-2021/ma2bea
[ "196f8de33cc4902bd9cb1fdd5400e41f9c275b55" ]
[ "code/visualization/ucb.py" ]
[ "import os\nimport argparse\nimport numpy as np\nimport matplotlib.pyplot as plt\n\ndef get_args():\n # create argument parser\n parser = argparse.ArgumentParser()\n # parameter for problem\n parser.add_argument('--seed', type=int, default=1)\n parser.add_argument('--benchmark_id', type=int, default=...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.ylim", "matplotlib.pyplot.cla", "matplotlib.pyplot.clf", "numpy.mean", "numpy.load", "numpy.array", "matplotlib.pyplot.ylabel" ] ]
allisontam/chemprop
[ "87ac151c68d8a200d564b064103c4f514e29f6bd" ]
[ "chemprop/train/run_training.py" ]
[ "from argparse import Namespace\nimport csv\nfrom logging import Logger\nimport os\nfrom pprint import pformat\nfrom typing import List\n\nimport numpy as np\nfrom tensorboardX import SummaryWriter\nimport torch\nfrom tqdm import trange\nimport pickle\nfrom torch.optim.lr_scheduler import ExponentialLR\n\nfrom .eva...
[ [ "numpy.array", "numpy.nanmean", "torch.cuda.set_device" ] ]
Lube-Project/ProgettoLube
[ "901ac307b68486d8289105c159ca702318bea5b0", "cbf33971e2c2e865783ec1a2302625539186a338", "cbf33971e2c2e865783ec1a2302625539186a338", "cbf33971e2c2e865783ec1a2302625539186a338", "cbf33971e2c2e865783ec1a2302625539186a338", "cbf33971e2c2e865783ec1a2302625539186a338", "cbf33971e2c2e865783ec1a2302625539186a33...
[ "ProgettoLube/WebInspector/venv/Lib/site-packages/skimage/color/tests/test_adapt_rgb.py", "ProgettoLube/WebInspector/venv/Lib/site-packages/tensorflow_estimator/python/estimator/canned/v1/linear_testing_utils_v1.py", "ProgettoLube/WebInspector/venv/Lib/site-packages/tensorflow/python/keras/api/_v1/keras/mixed_p...
[ "from functools import partial\n\nimport numpy as np\n\nfrom skimage import img_as_float, img_as_uint\nfrom skimage import color, data, filters\nfrom skimage.color.adapt_rgb import adapt_rgb, each_channel, hsv_value\n\n# Down-sample image for quicker testing.\nCOLOR_IMAGE = data.astronaut()[::5, ::6]\nGRAY_IMAGE = ...
[ [ "numpy.rollaxis", "numpy.ones" ], [ "tensorflow.math.abs", "pandas.Series", "numpy.linspace", "tensorflow.control_dependencies", "tensorflow.cast", "pandas.DataFrame", "tensorflow.compat.v1.test.mock.patch.object", "tensorflow.python.feature_column.feature_column.catego...
Animatory/pytorch-image-models
[ "3ace100fcfdab3619dc71307613c42e53fb70221", "3ace100fcfdab3619dc71307613c42e53fb70221" ]
[ "timm/models/pit.py", "timm/models/layers/pool2d_same.py" ]
[ "\"\"\" Pooling-based Vision Transformer (PiT) in PyTorch\n\nA PyTorch implement of Pooling-based Vision Transformers as described in\n'Rethinking Spatial Dimensions of Vision Transformers' - https://arxiv.org/abs/2103.16302\n\nThis code was adapted from the original version at https://github.com/naver-ai/pit, orig...
[ [ "torch.nn.Dropout", "torch.cat", "torch.nn.init.constant_", "torch.randn", "torch.nn.ModuleList", "torch.nn.Conv2d", "torch.nn.LayerNorm", "torch.nn.Linear", "torch.nn.Identity", "torch.jit.is_scripting" ], [ "torch.nn.MaxPool2d", "torch.nn.functional.avg_pool2d...
ningdez/Tianchi_Cancer_303
[ "59e9b6f906e48e7508f455ce29b97d430791fcf5" ]
[ "mmdet/models/necks/m2fpn.py" ]
[ "'''\nThis code is based on pytorch_ssd and RFBNet.\nDetails about the modules:\n TUM - Thinned U-shaped Module\n MLFPN - Multi-Level Feature Pyramid Network\n M2Det - Multi-level Multi-scale single-shot object Detector\n\nAuthor: Qijie Zhao (zhaoqijie@pku.edu.cn)\nFinishe...
[ [ "torch.nn.Sequential", "torch.cat", "torch.nn.ModuleList", "torch.nn.Conv2d", "torch.nn.Sigmoid", "torch.nn.AdaptiveAvgPool2d", "torch.nn.functional.interpolate", "torch.nn.BatchNorm2d", "torch.nn.ReLU" ] ]
wja30/cortex_0.31
[ "522ec6226526dee6b4f8c3ed67bdf2b913d25de3", "522ec6226526dee6b4f8c3ed67bdf2b913d25de3" ]
[ "test/apis/tensorflow/sound-classifier/predictor.py", "test/apis/pytorch/object-detector/predictor.py" ]
[ "from scipy.io.wavfile import read\nimport numpy as np\nimport io\nimport csv\n\n\nclass TensorFlowPredictor:\n def __init__(self, tensorflow_client, config):\n self.client = tensorflow_client\n self.class_names = self.class_names_from_csv(\"class_names.csv\")\n\n def class_names_from_csv(self, ...
[ [ "numpy.array" ], [ "torch.no_grad", "torch.cuda.is_available" ] ]
MattKrecicki/PYTHON-ISOTOPIC-DEPLETION-PACKAGE
[ "d9da8be6eff4ba301f9689ce5c38a5e50856d033" ]
[ "pyIsoDep/tests/read_csv.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"read_csv\n\nRead the different csv files\n\nCreated on Mon Oct 11 21:30:00 2021 @author: Dan Kotlyar\nLast updated on Mon Oct 11 21:45:00 2021 @author: Dan Kotlyar\n\n\"\"\"\n\nimport numpy as np\nimport pandas as pd\n\n\ndef ReadCsv(csvFile):\n\n data = pd.read_csv('bootstrap.csv...
[ [ "pandas.read_csv", "numpy.unique", "numpy.intersect1d", "numpy.array", "numpy.zeros" ] ]
Sonata-Wang/tensorflow
[ "3e21fe5faedab3a8258d344c8ad1cec2612a8aa8", "6aa83398ab03bfae822f36772757097bcb98b6ed", "83903c9dd9b5235996ec9158c30a1607fcfb4c73", "83903c9dd9b5235996ec9158c30a1607fcfb4c73", "6aa83398ab03bfae822f36772757097bcb98b6ed", "6aa83398ab03bfae822f36772757097bcb98b6ed", "6aa83398ab03bfae822f36772757097bcb98b6e...
[ "tensorflow/python/data/experimental/__init__.py", "tensorflow/contrib/distribute/python/checkpoint_utils_test.py", "tensorflow/python/eager/wrap_function_test.py", "tensorflow/python/keras/engine/training_distributed.py", "tensorflow/python/ops/template.py", "tensorflow/python/tpu/tpu_system_metadata.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.python.util.all_util.remove_undocumented" ], [ "tensorflow.python.framework.ops.Graph", "tensorflow.python.ops.variable_scope.get_variable", "tensorflow.python.platform.test.main", "tensorflow.contrib.distribute.python.combinations.combine", "tensorflow.python.ops.variables...
DoranLyong/DeepFish
[ "3ea3e13653f708d4a8dcb54b990dcc2997edf4e9" ]
[ "trainval.py" ]
[ "import torch\nimport numpy as np\nimport argparse\nimport pandas as pd\nimport sys\nimport os\nfrom torch import nn\nfrom torch.nn import functional as F\nimport tqdm\nimport pprint\nfrom src import utils as ut\nimport torchvision\nfrom haven import haven_utils as hu\nfrom haven import haven_chk as hc\n\nfrom src ...
[ [ "numpy.random.seed", "torch.load", "torch.manual_seed", "torch.utils.data.DataLoader", "pandas.DataFrame", "torch.cuda.is_available", "torch.cuda.manual_seed_all" ] ]
AshburnLee/models
[ "98fa58030f8ce352b3818f43897ac719ccffdffc", "98fa58030f8ce352b3818f43897ac719ccffdffc" ]
[ "PaddleAudio/paddleaudio/features/augment.py", "PaddleAudio/examples/audioset_training/evaluate.py" ]
[ "# Copyright (c) 2021 PaddlePaddle 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 re...
[ [ "numpy.random.randint", "numpy.random.rand", "numpy.random.choice" ], [ "numpy.concatenate", "sklearn.metrics.roc_auc_score", "sklearn.metrics.average_precision_score" ] ]
bahia14/Fedot_Times_Series_Forecast
[ "995751068733541ba2f546065082709ce0fb63ae", "995751068733541ba2f546065082709ce0fb63ae" ]
[ "fedot/core/pipelines/tuning/unified.py", "test/unit/tasks/test_forecasting.py" ]
[ "from datetime import timedelta\nfrom functools import partial\n\nimport numpy as np\nfrom hyperopt import fmin, space_eval, tpe\n\nfrom fedot.core.data.data_split import train_test_data_setup\nfrom fedot.core.log import Log\nfrom fedot.core.pipelines.tuning.hyperparams import convert_params, get_node_params\nfrom ...
[ [ "numpy.array" ], [ "numpy.random.seed", "numpy.arange", "sklearn.metrics.mean_absolute_error", "sklearn.metrics.mean_squared_error", "numpy.sin", "numpy.std", "numpy.array" ] ]
zploskey/Theano
[ "9b3f6351d41d9f5e01b198e3de7538d7f032c409", "1985d4c73fabd5f08f54b922e73a9306e09c77a5" ]
[ "theano/tensor/signal/pool.py", "theano/gof/utils.py" ]
[ "\n\"\"\"\nOps for downsampling images.\nPlanned:\nPool, DownsampleAvg, DownsampleSoftmax.\n\"\"\"\nfrom __future__ import absolute_import, print_function, division\n# This file should move along with conv.py\nimport warnings\nimport itertools\n\nimport numpy as np\nfrom six.moves import xrange\nimport six.moves.bu...
[ [ "numpy.maximum", "numpy.argmax", "numpy.zeros_like", "numpy.ndindex", "numpy.zeros", "numpy.empty" ], [ "numpy.getbuffer" ] ]
huangruizhe/espresso
[ "ee658bcc959bfbe8a7a61d7374d532d082d2aa26" ]
[ "examples/classify_names/rough_work.py" ]
[ "# Online Python compiler (interpreter) to run Python online.\n# Write Python 3 code in this online editor and run it.\nimport numpy as np\nlist_a = []\nfor i in range(2):\n for j in range(5):\n list_a.append(i)\n\nlist_a = np.random.permutation(list_a)\nprint('class labels')\nprint(list_a)\nlist_a = np.a...
[ [ "numpy.array", "numpy.random.permutation", "numpy.where" ] ]
jaedong27/calipy
[ "ed5b5af2654b2a25e16af4267683cafc83d72729" ]
[ "calipy/viewer.py" ]
[ "import vtk\nfrom vtk.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor\nimport math\nimport numpy as np\nimport numpy.matlib\nimport os\nimport json\nimport cv2\n\n# Z\n# /\n# /\n# /\n# ---------- X\n# |\n# |\n# |\n# Y\n\nclass vtkRenderer():\n def _...
[ [ "numpy.dot", "numpy.matlib.repmat", "numpy.eye", "numpy.linalg.norm", "numpy.transpose", "numpy.ones", "numpy.cross", "numpy.array", "numpy.zeros" ] ]
wdar/cdippy
[ "ef38b3445351ec8d9d7ea30b5b0d15825d794b0b" ]
[ "cdippy/stndata.py" ]
[ "from datetime import datetime, timedelta\nfrom bisect import bisect_left\n\nimport numpy.ma as ma\n\nfrom cdippy.cdippy import CDIPnc, Archive, Realtime, RealtimeXY, Historic\nimport cdippy.timestamp_utils as tsu\nimport cdippy.utils as cu\n\n\nclass StnData(CDIPnc):\n \"\"\" \n Returns data and metadata...
[ [ "numpy.ma.concatenate" ] ]
zoumt1633/pytorch-project-template
[ "871e00ebde6c2191de5f61b4cb7010c72b93c198" ]
[ "model/model.py" ]
[ "import torch\nimport torch.nn\nfrom torch.nn.parallel import DistributedDataParallel as DDP\n\nfrom collections import OrderedDict\nimport os.path as osp\nimport wandb\n\nfrom utils.utils import DotDict\n\n\nclass Model:\n def __init__(self, hp, net_arch, loss_f, rank=0, world_size=1):\n self.hp = hp\n ...
[ [ "torch.device", "torch.nn.parallel.DistributedDataParallel", "torch.save" ] ]
ericagol/exoplanet
[ "ec270622f28cd53d3052ed44d20f30b5d2b4dcb6" ]
[ "src/exoplanet/distributions/physical_test.py" ]
[ "# -*- coding: utf-8 -*-\n\nimport numpy as np\nimport pymc3 as pm\nfrom scipy.stats import kstest\n\nfrom .base_test import _Base\nfrom .physical import ImpactParameter, QuadLimbDark\n\n\nclass TestPhysical(_Base):\n random_seed = 19860925\n\n def test_quad_limb_dark(self):\n with self._model():\n ...
[ [ "scipy.stats.kstest", "numpy.allclose", "numpy.isfinite", "numpy.clip", "numpy.all", "numpy.shape" ] ]
Leopard-X/MXNET
[ "7ac046c58f0815223712f77288722a7b06755ec3" ]
[ "python/mxnet/image.py" ]
[ "# pylint: disable=no-member, too-many-lines, redefined-builtin, protected-access, unused-import, invalid-name\n# pylint: disable=too-many-arguments, too-many-locals, no-name-in-module, too-many-branches, too-many-statements\n\"\"\"Read invidual image files and perform augmentations.\"\"\"\n\nfrom __future__ import...
[ [ "numpy.dot", "numpy.sqrt", "numpy.frombuffer", "numpy.random.normal", "numpy.array" ] ]
qma16443/AIcamp_MTCNN
[ "431c3ce1cabf24266690322d525bdf7133666dc0" ]
[ "Detection/MtcnnDetector.py" ]
[ "import cv2\nimport time\nimport numpy as np\nimport sys\nsys.path.append(\"../\")\nfrom train_models.MTCNN_config import config\nfrom Detection.nms import py_nms\n\n\nclass MtcnnDetector(object):\n\n\n def __init__(self,\n detectors,\n min_face_size=25,\n stride=2...
[ [ "numpy.hstack", "numpy.expand_dims", "numpy.maximum", "numpy.tile", "numpy.round", "numpy.zeros", "numpy.array", "numpy.where", "numpy.vstack" ] ]
stjordanis/graph4nlp
[ "c6ebde32bc77d3a7b78f86a93f19b1c057963ffa", "c6ebde32bc77d3a7b78f86a93f19b1c057963ffa", "c6ebde32bc77d3a7b78f86a93f19b1c057963ffa", "c6ebde32bc77d3a7b78f86a93f19b1c057963ffa", "c6ebde32bc77d3a7b78f86a93f19b1c057963ffa" ]
[ "graph4nlp/pytorch/test/seq_decoder/graph2seq/src/g2s_v2/core/utils/vocab_utils.py", "graph4nlp/pytorch/modules/prediction/classification/link_prediction/ConcatFeedForwardNN.py", "graph4nlp/pytorch/modules/prediction/classification/node_classification/FeedForwardNNLayer.py", "graph4nlp/pytorch/test/graph_embe...
[ "# -*- coding: utf-8 -*-\nfrom __future__ import print_function\nimport os\nimport re\nimport pickle\nimport numpy as np\nfrom collections import Counter\nfrom functools import lru_cache\n\nfrom . import constants\nfrom .data_utils import tokenize\n\nword_detector = re.compile('\\w')\n\nclass VocabModel(object):\n ...
[ [ "numpy.random.uniform", "numpy.array", "numpy.zeros" ], [ "torch.nn.ReLU", "torch.tensor" ], [ "torch.nn.Linear", "torch.nn.ReLU", "torch.tensor" ], [ "torch.BoolTensor", "torch.max", "torch.sum", "torch.FloatTensor", "torch.no_grad", "torch.cuda...
YinchaoGao/detectron2
[ "04958b93e1232935e126c2fd9e6ccd3f57c3a8f3" ]
[ "detectron2/export/api.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\nimport copy\nimport logging\nimport os\nimport torch\nfrom caffe2.proto import caffe2_pb2\nfrom torch import nn\n\nfrom detectron2.config import CfgNode as CN\n\nfrom .caffe2_export import export_caffe2_detection_model\nfrom .caffe2_export im...
[ [ "torch.no_grad", "torch.jit.trace" ] ]
UrielMaD/pandas
[ "b5233c447f3ed0ecfe256501e357326b82ce9120" ]
[ "pandas/core/frame.py" ]
[ "\"\"\"\nDataFrame\n---------\nAn efficient 2D container for potentially mixed-type time series or other\nlabeled data series.\n\nSimilar to its R counterpart, data.frame, except providing automatic data\nalignment and a host of useful data manipulation methods having to do with the\nlabeling information\n\"\"\"\nf...
[ [ "pandas.util._validators.validate_bool_kwarg", "pandas.core.dtypes.cast.maybe_box_datetimelike", "pandas.core.aggregation.transform", "pandas.core.dtypes.common.infer_dtype_from_object", "pandas.core.aggregation.reconstruct_func", "numpy.where", "pandas.core.dtypes.common.is_named_tupl...
gwtaylor/pyautodiff
[ "7973e26f1c233570ed4bb10d08634ec7378e2152" ]
[ "autodiff/examples/svm.py" ]
[ "\"\"\"\nLinear SVM\n==========\n\nThis script fits a linear support vector machine classifier to random data. It\nillustrates how a function defined purely by NumPy operations can be minimized\ndirectly with a gradient-based solver.\n\n\"\"\"\nimport numpy as np\nfrom autodiff.optimize import fmin_l_bfgs_b\n\n\nd...
[ [ "numpy.dot", "numpy.maximum", "numpy.allclose", "numpy.mean", "numpy.random.RandomState", "numpy.zeros" ] ]
hz-ants/CDPN-source-
[ "625f9a80858f8a2fb9e74f88ea83073495141693" ]
[ "lib/models/resnet_trans_head.py" ]
[ "import torch.nn as nn\nimport torch\n\nclass TransHeadNet(nn.Module):\n def __init__(self, in_channels, num_layers=3, num_filters=256, kernel_size=3, output_dim=3, freeze=False,\n with_bias_end=True):\n super(TransHeadNet, self).__init__()\n\n self.freeze = freeze\n\n if ker...
[ [ "torch.nn.init.constant_", "torch.nn.ModuleList", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.init.normal_", "torch.no_grad", "torch.nn.BatchNorm2d", "torch.nn.ReLU" ] ]
sejaldua/duolingogogo
[ "226a2a9417238f9c3f0ce738d491b58cdf4dcbdc" ]
[ "app.py" ]
[ "import streamlit as st\nimport pandas as pd\nimport yaml\nimport duolingo\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nimport matplotlib.font_manager\nfrom datetime import timezone, timedelta\nmatplotlib.rcParams['font.family'] = ['Source Han Sans CN']\n\nwith open(\"duo_credentials.yaml\", 'r') as str...
[ [ "pandas.to_datetime", "matplotlib.pyplot.ylabel", "pandas.DataFrame.from_records", "matplotlib.pyplot.xlabel", "pandas.pivot_table", "matplotlib.pyplot.figure" ] ]
Henley13/paper_translation_factories_2020
[ "77558ed70467cf91062abf62e46c794bfbc08e4a" ]
[ "big-fish/bigfish/stack/postprocess.py" ]
[ "# -*- coding: utf-8 -*-\n\n\"\"\"\nFunctions used to format and clean any intermediate results loaded in or\nreturned by a bigfish method.\n\"\"\"\n\nimport numpy as np\nfrom scipy import ndimage as ndi\n\nfrom .utils import check_array, check_parameter, get_offset_value\n\nfrom skimage.measure import regionprops,...
[ [ "numpy.nonzero", "numpy.concatenate", "numpy.any", "numpy.column_stack", "scipy.ndimage.binary_fill_holes", "numpy.array", "numpy.zeros", "numpy.isin" ] ]
metamoles/metamoles
[ "251de6672029566d8becf2538684c0506fc297d0" ]
[ "deprecated/code/datacleaning.py" ]
[ "#!/usr/bin/env python\nimport Bio\nfrom Bio.KEGG import REST\nfrom Bio.KEGG import Enzyme\nimport re\nfrom Bio.KEGG import Compound\n\nimport gzip\nimport pandas as pd\nimport numpy as np\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\ndef create_enzyme_df(path_to_file):\n \...
[ [ "pandas.DataFrame" ] ]
rsuderman/iree-samples
[ "e7ba8e639c1bdd763793a6cf21930fb238607b3f", "e7ba8e639c1bdd763793a6cf21930fb238607b3f" ]
[ "tflitehub/mobilenet_quant_test.py", "tflitehub/deeplab_v3.py" ]
[ "# RUN: %PYTHON %s\n\nimport absl.testing\nimport numpy\nimport test_util\nimport urllib.request\n\nfrom PIL import Image\n\nmodel_path = \"https://tfhub.dev/tensorflow/lite-model/mobilenet_v2_1.0_224_quantized/1/default/1?lite-format=tflite\"\n\nclass MobilenetQuantTest(test_util.TFLiteModelTest):\n def __init__(...
[ [ "numpy.isclose" ], [ "numpy.isclose" ] ]
WyckliffeAluga/data-chronicles
[ "5219fe9cdbafb9fd7be88727483952c4c13f2790", "5219fe9cdbafb9fd7be88727483952c4c13f2790", "5219fe9cdbafb9fd7be88727483952c4c13f2790", "5219fe9cdbafb9fd7be88727483952c4c13f2790" ]
[ "Core Concepts/Deep Learning/3_RELU_activation_function.py", "Core Concepts/Dimensionality Reduction/correlations.py", "Preprocessing Structured Data/detecting-outliers.py", "Model Selection/hyperparameter-tuning.py" ]
[ "import numpy as np\n\ndef relu(input):\n '''Define your relu activation function here'''\n # Calculate the value for the output of the relu function: output\n output = max(input, 0)\n \n # Return the value just calculated\n return(output)\n\ninput_data = np.array([3,5])\n\n# Calculate node 0 valu...
[ [ "numpy.array" ], [ "matplotlib.pyplot.show", "numpy.ones_like", "numpy.ones_line" ], [ "sklearn.covariance.EllipticEnvelope", "sklearn.datasets.make_blobs" ], [ "numpy.logspace", "sklearn.model_selection.GridSearchCV", "sklearn.datasets.load_iris", "sklearn.line...
cwegg/astro-dynamo
[ "024f8aad8785488e9ae3328095d3d9c53b3e31b0" ]
[ "astro_dynamo/model.py" ]
[ "import math\nfrom typing import List, Union, Tuple\n\nimport torch\nimport torch.nn as nn\n\nfrom astro_dynamo.snap import SnapShot\nfrom .snaptools import align_bar\n\n\ndef _symmetrize_matrix(x, dim):\n \"\"\"Symmetrize a tensor along dimension dim\"\"\"\n return (x + x.flip(dims=[dim])) / 2\n\n\nclass Dyn...
[ [ "torch.cos", "torch.linspace", "torch.sin", "torch.nn.ModuleList", "torch.zeros_like", "torch.sum", "torch.asin", "torch.isfinite", "torch.no_grad", "torch.stack", "torch.meshgrid", "torch.atan2", "torch.as_tensor" ] ]
HennyJie/BrainGB
[ "96cf6711e2f2e6fa48b699ce3c0d6e318955c4de" ]
[ "src/dataset/transforms.py" ]
[ "import torch\nfrom node2vec import Node2Vec as Node2Vec_\nfrom .brain_data import BrainData\nfrom torch_geometric.data import Data\nfrom networkx.convert_matrix import from_numpy_matrix\nfrom .utils import binning, LDP\nimport networkx as nx\nfrom .base_transform import BaseTransform\nfrom numpy import linalg as L...
[ [ "torch.ones", "torch.Tensor", "torch.zeros", "torch.cat", "torch.nan_to_num", "torch.sparse_coo_tensor" ] ]
oahziur/probability
[ "ca14fa8924749593fd21e2b6389551f964527eec", "11645be43d2845da65a4fbafde4cfa95780280c0", "8edc2892658b5fac7f2e162e1abdc37d1f9858da", "ca14fa8924749593fd21e2b6389551f964527eec", "11645be43d2845da65a4fbafde4cfa95780280c0" ]
[ "tensorflow_probability/python/bijectors/tanh.py", "tensorflow_probability/python/mcmc/transformed_kernel_test.py", "tensorflow_probability/python/distributions/distribution_test.py", "tensorflow_probability/python/distributions/pareto_test.py", "tensorflow_probability/python/distributions/linear_gaussian_s...
[ "# Copyright 2018 The TensorFlow Probability Authors.\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 a...
[ [ "numpy.log", "tensorflow.atanh", "tensorflow.nn.tanh", "tensorflow.square", "tensorflow.nn.softplus" ], [ "tensorflow.matmul", "numpy.log", "tensorflow.Graph", "tensorflow.reduce_mean", "tensorflow.stack", "tensorflow.reduce_sum", "tensorflow.test.main", "te...
iamlmn/monte_carlo_analysis
[ "45f7af2b439f80bce429a94257a1167c9d5f4a2c" ]
[ "scenario analysis/portfolio_evaluation.py" ]
[ "import yfinance\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom tqdm import tqdm\n\ndef _simulate_returns(historical_returns,forecast_days):\n return historical_returns.sample(n = forecast_days, \n replace = True).reset_index(drop = True)\n\n\ndef ...
[ [ "matplotlib.pyplot.legend", "numpy.sqrt", "pandas.DataFrame", "numpy.percentile", "matplotlib.pyplot.plot", "numpy.std", "numpy.mean", "matplotlib.pyplot.fill_between", "matplotlib.pyplot.grid", "matplotlib.pyplot.bar", "matplotlib.pyplot.xlabel", "matplotlib.pyplot...
rtg0795/tfx
[ "63c31b719896eef645df3850d0e6b946e44cd059", "63c31b719896eef645df3850d0e6b946e44cd059", "63c31b719896eef645df3850d0e6b946e44cd059", "63c31b719896eef645df3850d0e6b946e44cd059", "63c31b719896eef645df3850d0e6b946e44cd059" ]
[ "tfx/orchestration/portable/python_executor_operator_test.py", "tfx/orchestration/kubeflow/kubeflow_dag_runner_test.py", "tfx/utils/name_utils_test.py", "tfx/dsl/components/base/base_component_test.py", "tfx/orchestration/experimental/interactive/interactive_context_test.py" ]
[ "# Copyright 2020 Google LLC. 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.test.main" ], [ "tensorflow.test.main" ], [ "tensorflow.test.main" ], [ "tensorflow.test.main" ], [ "tensorflow.test.main" ] ]
DamienIrving/ocean-analysis
[ "23a6dbf616fb84e6e158e32534ffd394e0df2e3e", "23a6dbf616fb84e6e158e32534ffd394e0df2e3e", "23a6dbf616fb84e6e158e32534ffd394e0df2e3e", "23a6dbf616fb84e6e158e32534ffd394e0df2e3e" ]
[ "visualisation/drift_paper/plot_ohc_drift.py", "data_processing/correct_mask.py", "data_processing/calc_interhemispheric_metric.py", "data_processing/water_mass_binning.py" ]
[ "\"\"\"\nFilename: plot_ohc_drift.py\nAuthor: Damien Irving, irving.damien@gmail.com\nDescription: Create a bar chart showing drift in ocean heat content\n and its thermal and barystatic components \n\n\"\"\"\n\n# Import general Python modules\n\nimport sys\nimport os\nimport re\nimport pdb...
[ [ "pandas.read_csv", "matplotlib.pyplot.axvline", "numpy.arange", "matplotlib.pyplot.axhspan", "matplotlib.pyplot.savefig", "matplotlib.pyplot.ylabel" ], [ "numpy.ma.masked_where", "numpy.ma.masked_invalid" ], [ "numpy.array", "numpy.cumsum" ], [ "numpy.clip",...
vipavlovic/pyprobml
[ "59a2edc682d0163955db5e2f27491ad772b60141", "59a2edc682d0163955db5e2f27491ad772b60141", "59a2edc682d0163955db5e2f27491ad772b60141", "59a2edc682d0163955db5e2f27491ad772b60141", "59a2edc682d0163955db5e2f27491ad772b60141", "59a2edc682d0163955db5e2f27491ad772b60141", "59a2edc682d0163955db5e2f27491ad772b6014...
[ "scripts/emnist_viz_tf.py", "scripts/spectral_clustering_demo.py", "scripts/logreg_iris_bayes_2d_pymc3.py", "vae/models/vq_vae.py", "scripts/mix_gauss_singularity.py", "scripts/newtonsMethodMinQuad.py", "misc/github_stats.py", "scripts/pagerank_demo_harvard.py", "scripts/rvm_regressor.py", "script...
[ "\n\n\nimport superimport\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport pyprobml_utils as pml\n\nimport tensorflow as tf\nimport tensorflow_datasets as tfds\n\nnp.random.seed(0)\n\nds, info = tfds.load('emnist', split='test', shuffle_files=False, with_info=True) # horribly slow\nprint(info)\n\n\npl...
[ [ "matplotlib.pyplot.yticks", "matplotlib.pyplot.imshow", "numpy.random.seed", "matplotlib.pyplot.title", "matplotlib.pyplot.subplot", "matplotlib.pyplot.grid", "matplotlib.pyplot.xticks", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ], [ "numpy.sqrt", "sklear...
MatthiasDR96/industrial_robotics_simulator
[ "9039e7a581ce97c583c73294e9937664de90530b", "9039e7a581ce97c583c73294e9937664de90530b" ]
[ "src/Interpolator.py", "src/arms/ThreeDofArm.py" ]
[ "import numpy as np\nfrom sympy import *\n\n\ndef interpolate_cubic(p1, p2, k_traj, t):\n '''\n Computes a smooth cubic polynomail between 2 N-dimensional points\n Input:\n p1: Nx1 numpy array the first point\n p2: Nx1 numpy array the second poi...
[ [ "numpy.dot", "numpy.linalg.solve", "numpy.sqrt", "numpy.linspace", "numpy.asarray", "numpy.subtract", "numpy.delete", "numpy.array", "numpy.zeros" ], [ "numpy.diag", "numpy.dot", "numpy.linalg.svd", "numpy.resize", "numpy.sqrt", "numpy.reshape", ...
AwhLorraine/mshoot
[ "d6981fa37c55da0457ac0371f9850743858a3543", "d6981fa37c55da0457ac0371f9850743858a3543" ]
[ "test/test_mpc.py", "examples/tutorial/tutorial.py" ]
[ "import unittest\nimport os\n\nimport numpy as np\nimport pandas as pd\nfrom scipy.signal import StateSpace\nimport matplotlib.pyplot as plt\n\nimport mshoot\n\n\ndef cfun(xdf, ydf):\n \"\"\"\n :param ydf: DataFrame, model states\n :param ydf: DataFrame, model outputs\n :return: float\n \"\"\"\n q...
[ [ "numpy.arange", "pandas.Index", "numpy.sum", "numpy.full" ], [ "numpy.arange", "pandas.Index", "numpy.full", "numpy.sin", "numpy.random.rand", "matplotlib.pyplot.show", "numpy.zeros", "numpy.where" ] ]
edges-collab/edges-cal
[ "9b7b28f71e1aa5347f901af38ef3bc0d28766e21" ]
[ "src/edges_cal/cal_coefficients.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nThe main user-facing module of ``edges-cal``.\n\nThis module contains wrappers around lower-level functions in other modules, providing\na one-stop interface for everything related to calibration.\n\"\"\"\nfrom __future__ import annotations\n\nimport attr\nimport h5py\nimport numpy...
[ [ "numpy.nanmax", "numpy.poly1d", "numpy.sqrt", "numpy.nanmin", "numpy.mean", "numpy.nanmean", "numpy.square", "numpy.ones_like", "scipy.interpolate.InterpolatedUnivariateSpline", "numpy.nanvar", "matplotlib.pyplot.gcf", "numpy.isnan", "numpy.genfromtxt", "mat...
aivision2020/OctSceneScan
[ "3b22ecb4f701270f457a7c2d2702f758b8d584cf" ]
[ "test_module.py" ]
[ "from pathlib import Path\nimport copy\nimport time\nimport torch.optim as optim\nimport numpy as np\nimport torch\nfrom torch.autograd import Variable\nfrom model import *\nfrom data_utils import *\nimport torch.nn as nn\nfrom loguru import logger\n\nfeature_dim = 8\nblock_size = 16\npad=2\nn_conv=3\nthresh=0.5\nd...
[ [ "torch.all", "numpy.sqrt", "torch.nn.ReplicationPad3d", "torch.zeros", "torch.load", "torch.utils.data.DataLoader", "numpy.concatenate", "numpy.zeros_like", "torch.save", "torch.ones", "torch.from_numpy", "torch.isfinite", "numpy.diff", "torch.rand", "nu...
soumitrasamanta/FragGenie
[ "9ce493d88e3479a286ce88dc0c5b199ea7c7e441" ]
[ "fragment.py" ]
[ "\"\"\"\n-----------------------------------------------------------------------------\nAUTHOR: Soumitra Samanta (soumitramath39@gmail.com)\n-----------------------------------------------------------------------------\n\"\"\"\n\nimport subprocess\nimport os\nimport numpy as np\nfrom datetime import datetime\nimpor...
[ [ "numpy.fromstring", "numpy.random.random", "pandas.read_csv", "pandas.DataFrame.from_dict" ] ]
BioGeek/annotated_deep_learning_paper_implementations
[ "e2516cc3063cdfdf11cda05f22a10082297aa33e", "e2516cc3063cdfdf11cda05f22a10082297aa33e", "e2516cc3063cdfdf11cda05f22a10082297aa33e", "e2516cc3063cdfdf11cda05f22a10082297aa33e", "e2516cc3063cdfdf11cda05f22a10082297aa33e", "e2516cc3063cdfdf11cda05f22a10082297aa33e" ]
[ "labml_nn/normalization/group_norm/experiment.py", "labml_nn/transformers/compressive/experiment.py", "labml_nn/transformers/gmlp/__init__.py", "labml_nn/transformers/knn/eval_knn.py", "labml_nn/transformers/xl/relative_mha.py", "labml_nn/capsule_networks/__init__.py" ]
[ "\"\"\"\n---\ntitle: CIFAR10 Experiment to try Group Normalization\nsummary: >\n This trains is a simple convolutional neural network that uses group normalization\n to classify CIFAR10 images.\n---\n\n# CIFAR10 Experiment for Group Normalization\n\"\"\"\n\nimport torch.nn as nn\n\nfrom labml import experiment\nf...
[ [ "torch.nn.Sequential", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.ReLU" ], [ "torch.nn.Linear", "torch.no_grad", "torch.nn.Embedding", "torch.cat" ], [ "torch.nn.GELU", "torch.ones", "torch.zeros", "torch.einsum", "torch.nn...
kdeweese/DualRandomizedKaczmarz
[ "3d339e893fe1dcb91677f3240047801ca3c43162" ]
[ "drkcode/python/kktmat.py" ]
[ "#!/usr/bin/env python\n# kktmat.py -- KKT matrix from Laplacian matrix\n#\n# Copyright (C) <2016> <Kevin Deweese>\n# All rights reserved.\n#\n# This software may be modified and distributed under the terms\n# of the BSD license. See the LICENSE file for details.\n\nimport scipy\n\ndef kktmat(L):\n mat=scipy.sp...
[ [ "scipy.sparse.coo_matrix", "scipy.sparse.tril", "scipy.ones", "scipy.arange", "scipy.concatenate", "scipy.array" ] ]
serre-lab/brownUnconference
[ "c51758f0bf695648832448c5c166e2a8dea14268" ]
[ "scripts/embeddings.py" ]
[ "import argparse\nimport csv\n\nimport torch\nimport transformers\n\n\ndef parse_arguments():\n parser = argparse.ArgumentParser(description=\"MiniConf Portal Command Line\")\n\n parser.add_argument(\"papers\", default=False, help=\"papers file to parse\")\n return parser.parse_args()\n\n\nif __name__ == \...
[ [ "torch.no_grad", "torch.save" ] ]
KeAWang/wilds
[ "3b808a84bd477d7877b77675eec2953128a87033" ]
[ "examples/algorithms/groupDRO.py" ]
[ "import torch\nfrom algorithms.single_model_algorithm import SingleModelAlgorithm\nfrom models.initializer import initialize_model\n\nclass GroupDRO(SingleModelAlgorithm):\n \"\"\"\n Group distributionally robust optimization.\n\n Original paper:\n @inproceedings{sagawa2019distributionally,\n ...
[ [ "torch.exp", "torch.zeros" ] ]
IewNixIl/graduation_project_under
[ "67d0345208511bb06c35c3453227b2fa4ebef4a3" ]
[ "DATA/Labeling.py" ]
[ "import numpy\nfrom matplotlib import pyplot\nimport gdal\nfrom skimage import io,exposure\nfrom skimage.segmentation import slic,mark_boundaries\nimport os\nfrom PIL import Image\nimport shelve\nimport sys\nsys.path.append('..')\nfrom Config import config\n\n\n\n\ndef seg(path,n_segments=500, compactness=20):\n ...
[ [ "numpy.unique", "matplotlib.pyplot.get_current_fig_manager", "numpy.array", "numpy.zeros", "numpy.where", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
chenzhengda/tensorflow
[ "8debb698097670458b5f21d728bc6f734a7b5a53", "8debb698097670458b5f21d728bc6f734a7b5a53", "8debb698097670458b5f21d728bc6f734a7b5a53", "8debb698097670458b5f21d728bc6f734a7b5a53", "8debb698097670458b5f21d728bc6f734a7b5a53", "8debb698097670458b5f21d728bc6f734a7b5a53", "8debb698097670458b5f21d728bc6f734a7b5a5...
[ "tensorflow/python/ipu/keras/layers/recomputation.py", "tensorflow/python/ipu/tests/keras/keras_functional_model_test.py", "tensorflow/python/ipu/tests/assume_equal_test.py", "tensorflow/compiler/plugin/poplar/tests/while_loop_perf_test.py", "tensorflow/python/ipu/tests/replicated_reduce_scatter_test.py", ...
[ "# Copyright 2021 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.python.ipu.ops.pipelining_ops.recomputation_checkpoint" ], [ "tensorflow.python.data.ops.dataset_ops.Dataset.from_tensors", "tensorflow.python.keras.layers.Dense", "tensorflow.python.keras.engine.base_layer_utils.enable_v2_dtype_behavior", "numpy.all", "tensorflow.python.ke...
leander-dsouza/Gazebo
[ "4e4c92115c9132b096f9b5a7fc9a9c0f5ed9e598" ]
[ "scripts/Tennis Ball Detection/ball_detection_taskphase.py" ]
[ "#!/usr/bin/env python3\nimport rospy\nimport cv2\nfrom sensor_msgs.msg import Image\nfrom cv_bridge import CvBridge\nimport numpy as np\n\n\n\nkernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(5, 5))\nkernel1= cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(3, 3))\n\naratio = 1.0\n\ndef nothing(x):\n pass\n\n\...
[ [ "numpy.int0", "numpy.hstack", "numpy.arange", "numpy.round", "numpy.array", "numpy.zeros", "numpy.vstack" ] ]
rcourivaud/video-to-pose3D
[ "b908014fe2c531c075c11cee72bb798120f970c2", "b908014fe2c531c075c11cee72bb798120f970c2", "b908014fe2c531c075c11cee72bb798120f970c2", "b908014fe2c531c075c11cee72bb798120f970c2", "b908014fe2c531c075c11cee72bb798120f970c2" ]
[ "joints_detectors/Alphapose/yolo/video_demo_half.py", "joints_detectors/Alphapose/SPPE/src/main_fast_inference.py", "pose_trackers/lighttrack/unit_test/test_utils_convert_heatmap.py", "joints_detectors/hrnet/lib/detector/yolo/soft_NMS.py", "pose_trackers/lighttrack/HPE/train_PoseTrack_COCO_17_MSRA152.py" ]
[ "from __future__ import division\nimport time\nimport torch \nimport torch.nn as nn\nfrom torch.autograd import Variable\nimport numpy as np\nimport cv2 \nfrom .util import *\nfrom .darknet import Darknet\nfrom .preprocess import prep_image, inp_to_image, letterbox_image\nimport pandas as pd\nimport random \nimport...
[ [ "torch.min", "torch.from_numpy", "torch.FloatTensor", "torch.cuda.is_available", "torch.clamp", "torch.autograd.Variable" ], [ "torch._utils._rebuild_tensor", "torch.load" ], [ "numpy.arange" ], [ "numpy.exp" ], [ "tensorflow.image.resize_bilinear", ...
tinapiao/Software-IC-Automation
[ "74b23cd94aa6e4658b110e93b5deb635e014f3a6", "74b23cd94aa6e4658b110e93b5deb635e014f3a6", "74b23cd94aa6e4658b110e93b5deb635e014f3a6", "74b23cd94aa6e4658b110e93b5deb635e014f3a6", "74b23cd94aa6e4658b110e93b5deb635e014f3a6" ]
[ "laygo/generators/serdes/des_layout_generator_woM5.py", "laygo/generators/adc_sar/adc_sar_sarclkgen_static_layout_generator.py", "laygo/generators/serdes/ser_layout_generator.py", "laygo/generators/splash/adc_sar_salatch_pmos_layout_generator_standalone.py", "laygo/generators/splash/adc_sar_sar_wsamp_layout...
[ "#!/usr/bin/python\n########################################################################################################################\n#\n# Copyright (c) 2014, Regents of the University of California\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without modification...
[ [ "numpy.array" ], [ "numpy.array", "numpy.vstack" ], [ "numpy.array" ], [ "numpy.array" ], [ "numpy.array" ] ]
cypher-me/HAS-Qualifier-Challenges
[ "bb795303716155dad4a930880a58fecb5d9b50c5", "bb795303716155dad4a930880a58fecb5d9b50c5" ]
[ "centroids/challenge/ImageGen.py", "tweet/builder/pi3d/pi3d/shape/MergeShape.py" ]
[ "from scipy import signal\nfrom scipy import misc\nfrom scipy import stats as st\nimport numpy as np\n\nW = 128\nL = 128\nBody_Width = 3\nBorder = Body_Width+1\nPoints = 10\nNoise_Max = 10\nBody_Separation = 15\nBody_Scale = 30\nOvScale = 3\n\n\ndef gkern(kernlen=21, nsig=3):\n ''' 2D Gaussian Kernel. '''\n x...
[ [ "scipy.stats.norm.cdf", "numpy.linspace", "numpy.abs", "scipy.signal.convolve2d", "numpy.ones", "numpy.ceil", "numpy.max", "numpy.mean", "numpy.random.rand", "numpy.floor", "numpy.outer", "numpy.array", "numpy.zeros" ], [ "numpy.append", "numpy.array...
xuanxu/py-pde
[ "de33d938aea8680eff872ae1b64569895662a248" ]
[ "pde/trackers/trackers.py" ]
[ "\"\"\"\nModule defining classes for tracking results from simulations.\n\nThe trackers defined in this module are:\n\n.. autosummary::\n :nosignatures:\n\n CallbackTracker\n ProgressTracker\n PrintTracker\n PlotTracker\n DataTracker\n SteadyStateTracker\n RuntimeTracker\n ConsistencyTracker\n M...
[ [ "numpy.allclose", "numpy.isfinite", "pandas.DataFrame", "numpy.flatnonzero", "numpy.all", "numpy.array", "numpy.isclose" ] ]
NunoEdgarGFlowHub/pgmpy
[ "ac0ecc8f5bdd14999c386c6b00a3ce77407b83ce" ]
[ "pgmpy/readwrite/XMLBIF.py" ]
[ "#!/usr/bin/env python\n\ntry:\n from lxml import etree\nexcept ImportError:\n try:\n import xml.etree.ElementTree as etree\n except ImportError:\n #try:\n # import xml.etree.cElementTree as etree\n # commented out because xml.etree.cElementTree is giving errors with dicti...
[ [ "numpy.array" ] ]
peterwauligmann/sparse_mm
[ "344c06c183854f72224c1e88ad2ced2e092d4efb" ]
[ "matmul.py" ]
[ "from typing import Tuple\n\nfrom codegen.ast import *\nfrom codegen.sugar import *\nfrom codegen.forms import *\nfrom codegen.precision import *\n\nimport scripts.old_arm\nimport scripts.max_bn_knl\n\nfrom cursors import *\n\nimport architecture\nimport numpy\n\ndef decompose_pattern(k, n, pattern:Matrix[bool], bk...
[ [ "numpy.zeros" ] ]