repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
maccam912/Oddyssey
[ "a9d1eca9ea1dfabd9873eb842eae03f2ed83d405" ]
[ "src/GameManager/gui/subscreen.py" ]
[ "import numpy as np\n\nclass SubScreen():\n def __init__(self, x, y, width, height, curses):\n self.x = x\n self.y = y\n self.width = width\n self.height = height\n self.curses = curses\n \n def put_char(self, x, y, char=' ', foreground='white', background='transparent'):...
[ [ "numpy.ceil" ] ]
davidliyutong/Flint
[ "4e2552dac8d781c21e8998ad68bbf1b986b09258" ]
[ "test/test43_tf_official.py" ]
[ "from models import Linear3\nfrom core.Optimizers import sgd, bgd\nfrom core.Functions import one_hot_f\nimport numpy as np\nfrom tensorflow import keras\nfrom core.Dataloader import batch_iterator\n\n\ndef test(model, test_inputs, test_labels):\n num_of_sample = test_inputs.shape[0]\n cnt_correct, cnt_tot = ...
[ [ "numpy.expand_dims", "numpy.argmax" ] ]
vishalbelsare/neupy
[ "684313cdaddcad326f2169384fb15ec3aa29d991" ]
[ "tests/layers/test_reshape_layer.py" ]
[ "import numpy as np\n\nfrom neupy import layers\n\nfrom base import BaseTestCase\n\n\nclass ReshapeLayerTestCase(BaseTestCase):\n def test_reshape_layer_1d_shape(self):\n x = np.random.random((5, 4, 3, 2, 1))\n\n input_layer = layers.Input((4, 3, 2, 1))\n reshape_layer = layers.Reshape()\n ...
[ [ "numpy.random.random" ] ]
baender/gimli
[ "eb9a2204669cf11209b9577472f61ac70217a191", "eb9a2204669cf11209b9577472f61ac70217a191", "eb9a2204669cf11209b9577472f61ac70217a191", "eb9a2204669cf11209b9577472f61ac70217a191" ]
[ "pygimli/physics/traveltime/raplot.py", "pygimli/utils/cache.py", "doc/examples/3_dc_and_ip/plot_03_ert_2_layer_mod.py", "doc/examples/2_seismics/plot_03_rays_layered_and_gradient_models.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\"WRITEME\"\"\"\n\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nimport pygimli as pg\n\nfrom pygimli.viewer.mpl import createColorBar # , updateColorBar\n\nfrom .ratools import shotReceiverDistances\n\n\ndef drawTravelTimeData(ax, data, t=None):\n ...
[ [ "numpy.arange", "numpy.absolute", "numpy.loadtxt", "numpy.unique" ], [ "numpy.load", "numpy.save" ], [ "numpy.array", "numpy.sin" ], [ "numpy.minimum", "numpy.abs", "numpy.linspace", "numpy.arange", "numpy.arccosh", "matplotlib.pyplot.subplots", ...
saraswat/TensorLog
[ "c56cebfa33b5123d5340a7b429e333da09d223d8", "c56cebfa33b5123d5340a7b429e333da09d223d8" ]
[ "tensorlog/testxcomp.py", "tensorlog/dataset.py" ]
[ "# (C) William W. Cohen and Carnegie Mellon University, 2017\n\nimport logging\nimport numpy as np\nimport os\nimport unittest\nimport sys\nimport collections\nimport tempfile\n\nfrom tensorlog import xctargets\n\nif xctargets.tf:\n import tensorflow as tf\n from tensorlog import tensorflowxcomp\nelse: \n tensor...
[ [ "tensorflow.Graph", "tensorflow.nn.softmax", "numpy.clip", "tensorflow.cast", "tensorflow.placeholder", "tensorflow.global_variables_initializer", "tensorflow.reset_default_graph", "tensorflow.train.GradientDescentOptimizer", "tensorflow.logging.set_verbosity", "tensorflow....
Mu-L/kedro
[ "a925fd59187a642e124527f0f1097e92ea8d1819" ]
[ "tests/extras/datasets/pandas/test_json_dataset.py" ]
[ "from pathlib import Path, PurePosixPath\n\nimport pandas as pd\nimport pytest\nfrom adlfs import AzureBlobFileSystem\nfrom fsspec.implementations.http import HTTPFileSystem\nfrom fsspec.implementations.local import LocalFileSystem\nfrom gcsfs import GCSFileSystem\nfrom pandas.testing import assert_frame_equal\nfro...
[ [ "pandas.testing.assert_frame_equal", "pandas.DataFrame" ] ]
acezen/graph-learn
[ "77bd92f960e4d178a3606444684f7f04c7f5b738" ]
[ "examples/data/cora.py" ]
[ "# Copyright 2020 Alibaba Group Holding Limited. 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# Unle...
[ [ "numpy.power", "scipy.sparse.diags", "numpy.dtype", "scipy.sparse.csr_matrix", "numpy.genfromtxt", "numpy.array", "numpy.isinf" ] ]
zjzh/chainer
[ "e9da1423255c58c37be9733f51b158aa9b39dc93", "e9da1423255c58c37be9733f51b158aa9b39dc93", "e9da1423255c58c37be9733f51b158aa9b39dc93", "e9da1423255c58c37be9733f51b158aa9b39dc93", "e9da1423255c58c37be9733f51b158aa9b39dc93", "e9da1423255c58c37be9733f51b158aa9b39dc93" ]
[ "tests/chainer_tests/functions_tests/pooling_tests/test_unpooling_2d.py", "tests/chainerx_tests/unit_tests/routines_tests/test_misc.py", "chainer/datasets/sub_dataset.py", "tests/chainer_tests/initializer_tests/test_constant.py", "tests/chainer_tests/links_tests/rnn_tests/test_link_n_step_lstm.py", "chain...
[ "import unittest\n\nimport numpy\nimport six\n\nimport chainer\nfrom chainer.backends import cuda\nfrom chainer import functions\nfrom chainer import gradient_check\nfrom chainer import testing\nfrom chainer.testing import attr\nfrom chainer_tests.functions_tests.pooling_tests import pooling_nd_helper\n\n\n@testing...
[ [ "numpy.random.uniform", "numpy.array", "numpy.zeros" ], [ "numpy.asarray", "numpy.array", "numpy.abs", "numpy.full" ], [ "numpy.empty_like", "numpy.array", "numpy.random.RandomState" ], [ "numpy.empty", "numpy.full" ], [ "numpy.concatenate", ...
Substancia/FDTD-Huygens-metasurface
[ "dfb46f43c0653b394b63e7af92a331ae4824d9be", "dfb46f43c0653b394b63e7af92a331ae4824d9be" ]
[ "quartz_sphere.py", "remote_stuff/fdtd_output_2021-5-29-2-27-17 (planoconvex_R_200_d_20)_(dBmap_loop_test)/dBmap_loop.py" ]
[ "from fdtd_venv import fdtd_mod as fdtd\nfrom numpy import arange, flip, meshgrid, array\nfrom matplotlib.pyplot import plot, show\n\ndef main():\n\tgrid = fdtd.Grid(shape=(200, 200, 1), grid_spacing=155e-9)\n\n\tlens_width = 10\n\tlens_order = 3\n\tlens_radius = 25\n\tx, y = arange(-90, 90, 1), arange(lens_radius-...
[ [ "numpy.arange", "numpy.meshgrid", "numpy.flip" ], [ "matplotlib.pyplot.imshow", "matplotlib.pyplot.title", "matplotlib.pyplot.colorbar", "numpy.log10", "numpy.load", "matplotlib.pyplot.show" ] ]
medicode/tensor2tensor
[ "3386fa537957fcf8133536322fcadec0630dde11", "3386fa537957fcf8133536322fcadec0630dde11" ]
[ "tensor2tensor/utils/usr_dir.py", "tensor2tensor/bin/t2t_datagen.py" ]
[ "# coding=utf-8\n# Copyright 2018 The Tensor2Tensor 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 requir...
[ [ "tensorflow.logging.info" ], [ "tensorflow.logging.warning", "numpy.random.seed", "tensorflow.logging.info", "tensorflow.logging.set_verbosity", "tensorflow.set_random_seed", "tensorflow.app.run" ] ]
dmitryduev/broker
[ "7b9582fae6cd37bbd334bca228ef429d96e0e498", "7b9582fae6cd37bbd334bca228ef429d96e0e498" ]
[ "kowalski/alert_watcher_zuds.py", "kowalski/dev/ingest_known_lenses_20180901.py" ]
[ "import argparse\nimport os\nimport sys\nimport io\nimport time\nimport json\nfrom bson.json_util import dumps\nimport traceback\n\nimport confluent_kafka\nfrom ast import literal_eval\nimport avro.schema\nimport fastavro\nimport subprocess\nimport datetime\nimport multiprocessing\n# import threading\n\nimport pymo...
[ [ "tensorflow.keras.models.load_model", "numpy.expand_dims", "numpy.sqrt", "numpy.abs", "numpy.pad", "numpy.rint", "numpy.cos", "numpy.nan_to_num", "numpy.sin", "numpy.sign", "numpy.linalg.norm", "numpy.log10", "numpy.floor", "numpy.zeros" ], [ "pandas...
jshede/Cirq
[ "5db0f6aa8c009735a9ce0b0b7909ffe2532c396d", "5db0f6aa8c009735a9ce0b0b7909ffe2532c396d", "5db0f6aa8c009735a9ce0b0b7909ffe2532c396d" ]
[ "cirq/google/api/v1/programs.py", "cirq/linalg/decompositions_test.py", "cirq/ops/parallel_gate_operation.py" ]
[ "# Copyright 2018 The Cirq Developers\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 o...
[ [ "numpy.pad", "numpy.asarray", "numpy.frombuffer", "numpy.packbits", "numpy.shape", "numpy.unpackbits" ], [ "numpy.diag", "numpy.sqrt", "numpy.allclose", "numpy.conj", "numpy.isnan", "numpy.eye", "numpy.linalg.norm", "numpy.ones", "numpy.linalg.det", ...
gideont/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10
[ "f8b24ccba44e3a55cc20da2ed0ad44d7ad2216bf" ]
[ "detect_single_image.py" ]
[ "######## Image Object Detection Using Tensorflow-trained Classifier #########\n#\n# Author: Evan Juras\n# Date: 1/15/18\n# Description: \n# This program uses a TensorFlow-trained neural network to perform object detection.\n# It loads the classifier and uses it to perform object detection on an image.\n# It draws ...
[ [ "tensorflow.Graph", "numpy.expand_dims", "tensorflow.import_graph_def", "tensorflow.compat.v1.GPUOptions", "tensorflow.compat.v1.ConfigProto", "tensorflow.io.gfile.GFile", "numpy.squeeze", "tensorflow.compat.v1.logging.set_verbosity", "tensorflow.compat.v1.GraphDef" ] ]
farzana0/pgm_graph_inference
[ "37f1ea68f191d4f3021e7fdc8dd246d945e37ead", "37f1ea68f191d4f3021e7fdc8dd246d945e37ead" ]
[ "experiments/saved_exp_res/exp_helpers.py", "graphical_models/data_structs.py" ]
[ "\"\"\"\n\nExperiment specifications:\nan experiment is defined by train,test dataset pair,\neach dataset is loaded from graphical_models/datasets.\nAuthors: kkorovin@cs.cmu.edu\n\n\"\"\"\n\nimport os\nimport numpy as np\n\nfrom graphical_models import BinaryMRF\nfrom inference import get_algorithm\nfrom graphical_...
[ [ "numpy.load" ], [ "numpy.where", "numpy.abs" ] ]
jasperroebroek/sklearn-quantile
[ "d357240527f32b04b0fec3dcd308bb23de517209" ]
[ "tests/test_weighted_quantile.py" ]
[ "import numpy as np\nimport pytest\n\nfrom sklearn_quantile.utils import weighted_quantile\n\nfrom numpy.testing import assert_equal\nfrom numpy.testing import assert_array_almost_equal\nfrom numpy.testing import assert_almost_equal\nfrom numpy.testing import assert_raises\n\n\ndef test_quantile_equal_weights():\n ...
[ [ "numpy.ones_like", "numpy.arange", "numpy.quantile", "numpy.sort", "numpy.ones", "numpy.testing.assert_raises", "numpy.random.RandomState", "numpy.testing.assert_array_almost_equal" ] ]
ghanashyamchalla/cis_interface
[ "7b59439276eacb66f1f6ea4177d3a85cc061eed5" ]
[ "yggdrasil/drivers/CModelDriver.py" ]
[ "import os\nimport re\nimport warnings\nimport copy\nimport shutil\nimport subprocess\nimport numpy as np\nimport sysconfig\nfrom collections import OrderedDict\nfrom yggdrasil import platform, tools\nfrom yggdrasil.drivers.CompiledModelDriver import (\n CompiledModelDriver, CompilerBase, ArchiverBase)\nfrom ygg...
[ [ "numpy.distutils.misc_util.get_numpy_include_dirs", "numpy.dtype" ] ]
marcoabrate/transformers
[ "3f77c26d74e1282955fefa8dfff2451e44f6d4a9" ]
[ "src/transformers/trainer.py" ]
[ "# coding=utf-8\n# Copyright 2020-present the HuggingFace Inc. team.\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# Unles...
[ [ "torch.utils.data.distributed.DistributedSampler", "torch.cat", "torch.utils.data.sampler.SequentialSampler", "torch.tensor", "torch.cuda.amp.autocast", "torch.nn.DataParallel", "torch.cuda.amp.GradScaler", "torch.no_grad", "torch.distributed.get_rank", "torch.utils.data.da...
arpitdm/nifty
[ "763792d2ddc72f2af8c6d1372c5ed8d04c741ae1" ]
[ "models/fairgnn.py" ]
[ "import torch.nn as nn\nfrom models import *\nimport torch\nimport gc\n\ndef get_model(nfeat, args):\n if args.model == \"gcn\":\n model = GCN_Body(nfeat,args.num_hidden,args.dropout)\n elif args.model == \"gat\":\n heads = ([args.num_heads] * args.num_layers) + [args.num_out_heads]\n mo...
[ [ "torch.nn.Linear", "torch.sigmoid", "torch.mean" ] ]
buchgr/tensorflow
[ "2938772a08ed02ced4663ca38168ab3f82e8f81b" ]
[ "tensorflow/python/keras/saving/model_architectures.py" ]
[ "# Copyright 2020 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.keras.layers.BatchNormalization", "tensorflow.python.keras.layers.LSTM", "tensorflow.python.keras.Input", "tensorflow.python.keras.layers.Embedding", "tensorflow.python.keras.layers.Dense", "tensorflow.python.keras.layers.concatenate", "tensorflow.python.keras.Model"...
gvashishtha/azureml-examples
[ "dc7ee4c01410757beeaa52a4f696882ca38e0be7" ]
[ "code/deployment/triton/bidaf_utils.py" ]
[ "\"\"\"score_bidaf.py\n\nScoring script for use with the Bi-directional Attention Flow model from the ONNX model zoo.\nhttps://github.com/onnx/models/tree/master/text/machine_comprehension/bidirectional_attention_flow\n\"\"\"\n\nimport json\nimport nltk\nimport numpy as np\nimport os\n\nfrom nltk import word_tokeni...
[ [ "numpy.array" ] ]
wi1k1n/nrf-accelerations
[ "3075d63177e8ac04ee91784d5b0c56379335740f", "3075d63177e8ac04ee91784d5b0c56379335740f" ]
[ "util/visualize_light_samples.py", "util/prepare_flower_dataset.py" ]
[ "import argparse, sys, os, os.path as op, json, subprocess\nimport numpy as np\nimport open3d as o3d\nimport plotly.graph_objects as go\n\nPATH = 'D:\\\\edu\\\\UniBonn\\\\Study\\\\thesis\\\\codes\\\\NSVF\\\\'\n# PATH2MODEL = 'D:\\\\edu\\\\UniBonn\\\\Study\\\\thesis\\\\codes\\\\blender\\\\projects\\\\brdf_sphere\\\\...
[ [ "numpy.linalg.norm" ], [ "scipy.spatial.transform.Rotation.from_rotvec", "numpy.random.seed", "numpy.linalg.inv", "numpy.eye", "numpy.fromstring", "numpy.array", "numpy.zeros" ] ]
evenrus/myeloma_SNV
[ "b8faa365babcc5583bc7b8431e4c5053acb35cb9" ]
[ "myeloma_snv/commands.py" ]
[ "\"\"\"variants_process main command.\"\"\"\n\nimport timeit\nimport re\nfrom datetime import datetime\nfrom os.path import join\nimport pandas as pd\nimport numpy as np\nimport pybedtools as pyb\n\nSTART = timeit.default_timer()\n\n## IMPORT VARIANTS FILE\ndef import_variants(path):\n \"\"\"\n Determine file...
[ [ "pandas.merge", "pandas.read_excel", "pandas.read_csv", "pandas.Series", "pandas.isnull", "numpy.where" ] ]
rubyvanrooyen/katdal
[ "e90bca3c2cd6305492d03ddc9aa48e67c1800428" ]
[ "katdal/h5datav2.py" ]
[ "################################################################################\n# Copyright (c) 2011-2021, National Research Foundation (SARAO)\n#\n# Licensed under the BSD 3-Clause License (the \"License\"); you may not use\n# this file except in compliance with the License. You may obtain a copy\n# of the Lice...
[ [ "numpy.ones_like", "numpy.unique", "numpy.arange", "numpy.ones", "numpy.bitwise_and", "numpy.packbits", "numpy.isscalar", "numpy.array", "numpy.zeros", "numpy.unpackbits" ] ]
Statfactory/ColdBrew
[ "ee16eee73e8dc89646abd6ee3e19858e49c6ffb7" ]
[ "cortado/cutcovfactor.py" ]
[ "from cortado.abstractfactor import AbstractFactor\nimport numpy as np\nfrom cortado.seq import Seq\nfrom cortado.funcslicer import FuncSlicer\nfrom cortado.consts import HEADLENGTH, SLICELEN, MISSINGLEVEL\nfrom numba import jit\nfrom numba.typed import Dict\nfrom numba import types\n\n@jit(nopython=True, cache=Fal...
[ [ "numpy.isnan", "numpy.empty", "numpy.searchsorted" ] ]
primasanjaya/muat-github
[ "4603c6c960188643fb38d8dba82e0dcc1ba00b40", "4603c6c960188643fb38d8dba82e0dcc1ba00b40" ]
[ "main_old.py", "dataset/pcawgtcga_dataloader.py" ]
[ "# make deterministic\r\nfrom mingpt.utils import set_seed\r\nset_seed(42)\r\n#frompc\r\n\r\nimport numpy as np\r\nimport torch\r\nimport torch.nn as nn\r\nfrom torch.nn import functional as F\r\nimport math\r\nfrom torch.utils.data import Dataset\r\n\r\nfrom mingpt.model import *\r\n\r\nfrom mingpt.trainer import ...
[ [ "pandas.DataFrame" ], [ "pandas.read_csv", "numpy.pad", "numpy.asarray", "pandas.DataFrame", "torch.tensor", "numpy.round", "numpy.argmax" ] ]
Bartosz-D3V/ml-dataset-analysis
[ "cb2458dcb7cecba01f52be5b12e816ca00ce7da4" ]
[ "bike-sharing-demand/one_hot_encoder_transformer.py" ]
[ "import pandas as pd\nfrom sklearn.base import BaseEstimator, TransformerMixin\n\n\nclass OneHotEncoderTransformer(BaseEstimator, TransformerMixin):\n\n def __init__(self, columns) -> None:\n self.columns = columns\n\n def fit(self, X, y=None):\n return self\n\n def transform(self, X, y=None)...
[ [ "pandas.get_dummies" ] ]
payoto/graphcore_examples
[ "46d2b7687b829778369fc6328170a7b14761e5c6", "46d2b7687b829778369fc6328170a7b14761e5c6", "46d2b7687b829778369fc6328170a7b14761e5c6", "46d2b7687b829778369fc6328170a7b14761e5c6", "46d2b7687b829778369fc6328170a7b14761e5c6", "46d2b7687b829778369fc6328170a7b14761e5c6", "46d2b7687b829778369fc6328170a7b14761e5c...
[ "applications/tensorflow/detection/yolov3/log.py", "applications/pytorch/miniDALL-E/train.py", "applications/popart/transformer_transducer/training/common/data/dali/pipeline.py", "applications/tensorflow/tgn/model.py", "applications/tensorflow/dynamic_sparsity/ipu_sparse_ops/tools/sparse_transformer_encoder...
[ "# Copyright (c) 2021 Graphcore Ltd. 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 ...
[ [ "tensorflow.pywrap_tensorflow.NewCheckpointReader", "numpy.sum", "numpy.min", "numpy.isnan", "numpy.linalg.norm", "numpy.max", "numpy.prod", "tensorflow.trainable_variables", "tensorflow.Summary", "numpy.array", "numpy.histogram", "tensorflow.HistogramProto" ], ...
rehohoho/mmsegmentation
[ "a73ae7a421e07741fda62c9d81b335cbc4b7f7d6", "a73ae7a421e07741fda62c9d81b335cbc4b7f7d6" ]
[ "mmseg/models/decode_heads/knet_head.py", "mmseg/models/decode_heads/stdc_head.py" ]
[ "# Copyright (c) OpenMMLab. All rights reserved.\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom mmcv.cnn import ConvModule, build_activation_layer, build_norm_layer\nfrom mmcv.cnn.bricks.transformer import (FFN, TRANSFORMER_LAYER,\n MultiheadAtten...
[ [ "torch.cat", "torch.einsum", "torch.nn.ModuleList", "torch.nn.Linear", "torch.nn.init.normal_", "torch.nn.functional.interpolate", "torch.nn.init.xavier_uniform_" ], [ "torch.stack", "torch.nn.functional.conv2d", "torch.nn.functional.interpolate", "torch.tensor" ]...
tsutterley/captoolkit
[ "314c4d34f49012c25286478c943b0ab13c893c62", "314c4d34f49012c25286478c943b0ab13c893c62", "314c4d34f49012c25286478c943b0ab13c893c62" ]
[ "captoolkit/readgla12.py", "captoolkit/fittopo.py", "captoolkit/cubesmb.py" ]
[ "#!/usr/bin/env python\r\n\"\"\"\r\n Reads GLA12 Release 634 HDF5.\r\n \r\n Reads several files in parallel if njobs > 1 is specified.\r\n \r\n Extracts a subset of the data based on a mask.tif file.\r\n \r\n Example:\r\n \r\n python readgla.py /mnt/devon-r0/shared_data/icesat/GLAH12.034/...
[ [ "numpy.abs", "numpy.invert", "numpy.unique", "numpy.isnan", "numpy.arange", "numpy.flipud", "numpy.empty", "numpy.ones", "numpy.modf", "numpy.round", "numpy.size", "scipy.ndimage.map_coordinates", "numpy.meshgrid", "numpy.zeros", "numpy.where", "nump...
mathyouf/GPT-Games
[ "bf6e558bf6ec92d1fba97770587610da0f3447eb" ]
[ "src/interactive_conditional_samples.py" ]
[ "#!/usr/bin/env python3\n\nimport fire\nimport json\nimport os\nimport re\nimport numpy as np\nimport tensorflow as tf\n\nimport model, sample, encoder\n\ndef modify_raw_text(raw_text, interviewer, interviewee):\n return interviewer+\": \\\"\" + raw_text + \"\\\" \"+ interviewee +\":\\\"\"\n\ndef interact_model(...
[ [ "tensorflow.Graph", "numpy.random.seed", "tensorflow.placeholder", "tensorflow.set_random_seed", "tensorflow.train.Saver" ] ]
rparini/cxroots
[ "037247fc47b29781b9cc66857a8395283e8ecc86", "037247fc47b29781b9cc66857a8395283e8ecc86" ]
[ "cxroots/tests/test_deriv.py", "cxroots/Paths.py" ]
[ "import pytest\nimport numpy as np\nfrom numpy import cos, sin\n\nfrom cxroots import Circle, Rectangle\nfrom cxroots import CxDerivative\n\n@pytest.mark.parametrize('C', [\n pytest.param(Circle(0, 2), id='circle'),\n pytest.param(Rectangle([-1.5,1.5],[-2,2]), id='rect'),\n pytest.param(None, id='default')...
[ [ "numpy.array", "numpy.cos", "numpy.sin" ], [ "matplotlib.pyplot.gca", "numpy.linspace", "numpy.isnan", "matplotlib.pyplot.savefig", "numpy.empty", "matplotlib.pyplot.plot", "matplotlib.pyplot.close", "numpy.exp", "matplotlib.pyplot.xlabel", "numpy.angle", ...
kingagla/reviews_classification
[ "9bf9636035bf14fb3ce151d075a6c04f4cdbfde6" ]
[ "scripts/models/01_prepare_and_save_models.py" ]
[ "import os\nimport pickle\nimport pandas as pd\nfrom sklearn.cluster import DBSCAN\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.metrics import classification_report\nfrom sklearn.preprocessing import LabelEncoder\nfrom tensorflow.keras.callbacks import ModelCheckpoint\nfrom tensorflow.keras.la...
[ [ "tensorflow.keras.callbacks.ModelCheckpoint", "pandas.read_pickle", "tensorflow.keras.models.Sequential", "sklearn.ensemble.RandomForestClassifier", "tensorflow.keras.layers.Dense", "sklearn.cluster.DBSCAN", "pandas.DataFrame", "tensorflow.keras.layers.Dropout", "sklearn.prepro...
Jarino/cgp-optimization
[ "3b50813a591c3535c7846b7e8acf5f5959122d02" ]
[ "tengp_eval/optimizers/sa.py" ]
[ "from configparser import ConfigParser\n\nimport numpy as np\nfrom sklearn.metrics import mean_squared_error, r2_score\nimport pygmo as pg\n\nfrom tengp.individual import IndividualBuilder, NPIndividual\nfrom tengp import Parameters, FunctionSet\nfrom tengp_eval.coevolution import TrainersSet, GaPredictors\n\n\ndef...
[ [ "sklearn.metrics.mean_squared_error" ] ]
THU-DA-6D-Pose-Group/Self6D-Diff-Renderer
[ "408330a9c7d7010a5af0a5b0b469f1ef695d18de", "408330a9c7d7010a5af0a5b0b469f1ef695d18de" ]
[ "core/dr_utils/dib_renderer_x/utils/sphericalcoord.py", "core/dr_utils/dib_renderer_x/renderer/texrender_batch.py" ]
[ "# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.\n\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the \"Software\"),\n# to deal in the Software without restriction, including without limitation\n# the rights to u...
[ [ "numpy.arccos", "numpy.linalg.norm", "numpy.stack", "numpy.arctan2", "numpy.transpose", "numpy.zeros" ], [ "torch.ones_like", "torch.cat" ] ]
gioramponi/LOGEL
[ "e862324816c57dd5d07691ee8583259a6a62116c", "e862324816c57dd5d07691ee8583259a6a62116c" ]
[ "gridworld/lfl/mdp_utils.py", "mujoco/observer_logel.py" ]
[ "\"\"\"utils for entropy-regularized discrete MDPs.\"\"\"\n\nfrom __future__ import print_function\nimport numpy as np\n\n\ndef softmax(x, tau=1.):\n e = np.exp(x * tau)\n z = -np.log(sum(e))\n return np.exp(x * tau + z)\n\n\ndef score_policy(pi, r, p, alpha, gamma):\n \"\"\"Returns expected score J(pi)...
[ [ "numpy.log", "numpy.tile", "numpy.random.rand", "numpy.exp", "numpy.zeros" ], [ "numpy.square", "torch.zeros", "numpy.min", "torch.manual_seed", "numpy.median", "torch.from_numpy", "numpy.linalg.norm", "numpy.max", "torch.set_num_threads", "torch.Flo...
b3ttin4/network_simulation_and_analysis
[ "56ec3fd497ad95eee6eec00042d332133495288e" ]
[ "network_model/tools/bn_tools_t.py" ]
[ "import numpy as np\n\n\n# Nonlinearity functions (Numpy implementation)\nnl_linear = lambda x: x\nnl_tanh = lambda x: np.tanh(x)\nnl_sigmoid = lambda x: 1./(1+np.exp(-x)) \nnl_rect = lambda x: np.clip(x, 0, np.inf)\n#nl_rect = lambda x: np.clip(x, -np.inf, np.inf)\nnl_shallow_rect = lambda x: np.clip(0.1*x, 0, np....
[ [ "numpy.clip", "numpy.arange", "numpy.tile", "numpy.tanh", "numpy.exp", "matplotlib.pyplot.show" ] ]
project-k-0-1/project-k
[ "fa5be043a3c82daee992d28db25519e2b1b53289" ]
[ "sa_numeric.py" ]
[ "\"\"\" Numerical functions \"\"\"\nimport math\nimport numpy as np\nimport pymysql.cursors\nfrom sa_db import sa_db_access\nACCESS_OBJ = sa_db_access()\nDB_USR = ACCESS_OBJ.username()\nDB_PWD = ACCESS_OBJ.password()\nDB_NAME = ACCESS_OBJ.db_name()\nDB_SRV = ACCESS_OBJ.db_server()\n\ndef get_pct_change(ini_val, new...
[ [ "numpy.std" ] ]
parachutel/garage
[ "e9d4301278f5dd31e3cbd20df1422befa2d0b6c4", "f4a6271edd0f9c280c306d1f0bbf4bc1591ab85e", "f4a6271edd0f9c280c306d1f0bbf4bc1591ab85e", "f4a6271edd0f9c280c306d1f0bbf4bc1591ab85e" ]
[ "tests/benchmarks/test_benchmark_trpo.py", "tests/fixtures/models/simple_gaussian_mlp_model.py", "tests/fixtures/fixtures.py", "tests/garage/torch/policies/test_deterministic_policy.py" ]
[ "'''\nThis script creates a regression test over garage-TRPO and baselines-TRPO.\n\nUnlike garage, baselines doesn't set max_path_length. It keeps steps the action\nuntil it's done. So we introduced tests.wrappers.AutoStopEnv wrapper to set\ndone=True when it reaches max_path_length. We also need to change the\ngar...
[ [ "tensorflow.compat.v1.Session", "tensorflow.Graph" ], [ "tensorflow.constant_initializer", "tensorflow.shape" ], [ "tensorflow.compat.v1.Session", "tensorflow.Graph", "tensorflow.reset_default_graph", "tensorflow.Session" ], [ "numpy.prod", "torch.ones", "nu...
zahrag/3DHARSOM
[ "f934d0b5786d2edac29a7a18be31fa74aafcb881" ]
[ "codes/SOM.py" ]
[ "\n\"\"\"\n Author: Zahra Gharaee.\n This code is written for the 3D-Human-Action-Recognition Project, started March 14 2014.\n \"\"\"\n\nimport numpy as np\nfrom numpy import linalg as LA\n\n\nclass SOM:\n\n def __init__(self, learning, outputsize_x, outputsize_y, inputsize, sigma, softmax_exponent, ma...
[ [ "numpy.expand_dims", "numpy.max", "numpy.argmax", "numpy.random.rand", "numpy.exp", "numpy.array", "numpy.zeros", "numpy.sum" ] ]
JPLMLIA/libeos
[ "3ad25c22159edf79d407454e32b8f07333cb57c2" ]
[ "pims/els_data.py" ]
[ "# Cassini CAPS ELS data reader\n# Modeled after Gary's MDIS reader\n# Kiri Wagstaff, 11/28/18\n\nimport os\nfrom datetime import datetime\nfrom collections import defaultdict\nimport numpy as np\nfrom pds.core.parser import Parser\nfrom scipy.interpolate import interp1d\n\nGEOMFILE = os.path.join(\n os.path.dir...
[ [ "numpy.dtype", "scipy.interpolate.interp1d", "numpy.fromstring", "numpy.load", "numpy.sum" ] ]
Shuai-Xie/openseg.pytorch
[ "79116a58782ccd2150f9eb9054e70cfd42fc9773" ]
[ "lib/loss/loss_helper.py" ]
[ "##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n## Created by: Donny You, RainbowSecret\n## Microsoft Research\n## yuyua@microsoft.com\n## Copyright (c) 2019\n##\n## This source code is licensed under the MIT-style license found in the\n## LICENSE file in the root directory of this sou...
[ [ "torch.nn.CrossEntropyLoss", "torch.nn.functional.softmax", "torch.softmax", "torch.cuda.current_device", "torch.nn.functional.cross_entropy", "torch.FloatTensor", "torch.nn.functional.interpolate" ] ]
paulfioravanti/Reinforcement-Learning-In-Motion
[ "e09afd23b82040d76c95875b077ba0a5af517470", "e09afd23b82040d76c95875b077ba0a5af517470" ]
[ "Unit-7-The-Cartpole/q_learning.py", "Unit-3-The-Multi-Armed-Bandit/bandit_ucb.py" ]
[ "import gym\nimport numpy as np\nfrom util import plot_running_average\n\n# pylint: disable-msg=redefined-outer-name\ndef max_action(estimates, state):\n values = np.array([estimates[state, i] for i in range(2)])\n action = np.argmax(values)\n return action\n\ndef get_state(observation):\n cart_x, cart_...
[ [ "numpy.random.random", "numpy.linspace", "numpy.argmax", "numpy.digitize", "numpy.zeros" ], [ "matplotlib.pyplot.legend", "numpy.log", "numpy.random.random", "numpy.random.choice", "numpy.full", "matplotlib.pyplot.plot", "numpy.random.randn", "matplotlib.pyp...
vardhanaleti/AdversarialQuerying
[ "f2ed5960f345ba448eeb4c9a1f5c819c41d092da", "f2ed5960f345ba448eeb4c9a1f5c819c41d092da" ]
[ "models/R2D2_embedding.py", "data/mini_imagenet.py" ]
[ "import torch.nn as nn\nimport torch\nimport math\n\n# Embedding network used in Meta-learning with differentiable closed-form solvers\n# (Bertinetto et al., in submission to NIPS 2018).\n# They call the ridge rigressor version as \"Ridge Regression Differentiable Discriminator (R2D2).\"\n \n# Note that they use a...
[ [ "torch.nn.Softmax", "torch.nn.Dropout", "torch.nn.Softplus", "torch.einsum", "torch.reshape", "torch.nn.Conv2d", "torch.nn.MaxPool2d", "torch.nn.LeakyReLU", "torch.nn.BatchNorm2d", "torch.nn.ReLU" ], [ "torch.LongTensor", "numpy.random.seed", "numpy.unique",...
brianjo/pytorch
[ "fd8004b42e2a2348ec8837e3fb524b960c1b4cdb" ]
[ "torch/testing/_internal/distributed/distributed_test.py" ]
[ "import copy\nimport itertools\nimport math\nimport os\nimport random\nimport sys\nimport tempfile\nimport time\nfrom collections import namedtuple\nfrom contextlib import contextmanager, suppress\nfrom datetime import timedelta\nfrom functools import reduce\nfrom typing import Union, NamedTuple, Callable, Any\n\ni...
[ [ "torch.distributed.scatter", "torch.zeros", "torch.testing._internal.common_distributed.nccl_skip_if_lt_x_gpu", "torch.distributed.algorithms.ddp_comm_hooks.post_localSGD_hook.PostLocalSGDState", "torch.cuda.amp.autocast", "torch.distributed.distributed_c10d._get_default_group", "torch...
lacrosse91/scikit-learn
[ "2a67d88258264eb2b6dfad221be8f8d61684dcba", "2a67d88258264eb2b6dfad221be8f8d61684dcba", "2a67d88258264eb2b6dfad221be8f8d61684dcba", "2a67d88258264eb2b6dfad221be8f8d61684dcba", "2a67d88258264eb2b6dfad221be8f8d61684dcba", "2a67d88258264eb2b6dfad221be8f8d61684dcba" ]
[ "sklearn/datasets/_twenty_newsgroups.py", "sklearn/decomposition/_fastica.py", "sklearn/ensemble/_iforest.py", "sklearn/linear_model/_bayes.py", "sklearn/cluster/_bicluster.py", "sklearn/cluster/tests/test_k_means.py" ]
[ "\"\"\"Caching loader for the 20 newsgroups text classification dataset.\n\n\nThe description of the dataset is available on the official website at:\n\n http://people.csail.mit.edu/jrennie/20Newsgroups/\n\nQuoting the introduction:\n\n The 20 Newsgroups data set is a collection of approximately 20,000\n n...
[ [ "numpy.arange", "numpy.in1d", "numpy.concatenate", "numpy.searchsorted", "scipy.sparse.vstack", "numpy.array" ], [ "numpy.dot", "scipy.linalg.pinv", "scipy.linalg.svd", "numpy.sqrt", "numpy.asarray", "numpy.linalg.multi_dot", "numpy.tanh", "numpy.exp", ...
ZiningWang/Sparse_Pooling
[ "a160ddf9a03ef53bad630b4ac186a8437bd0475c", "a160ddf9a03ef53bad630b4ac186a8437bd0475c", "a160ddf9a03ef53bad630b4ac186a8437bd0475c" ]
[ "MV3D_TF_release/lib/datasets/voc_eval.py", "MV3D_TF_release/lib/gt_data_layer/roidb.py", "avod/scripts/offline_eval/get_AP.py" ]
[ "# --------------------------------------------------------\n# Fast/er R-CNN\n# Licensed under The MIT License [see LICENSE for details]\n# Written by Bharath Hariharan\n# --------------------------------------------------------\n\nimport xml.etree.ElementTree as ET\nimport os\nimport pickle\nimport numpy as np\nim...
[ [ "numpy.maximum", "numpy.minimum", "numpy.arange", "numpy.cumsum", "numpy.sort", "numpy.finfo", "numpy.concatenate", "numpy.max", "numpy.argmax", "numpy.where", "numpy.argsort", "numpy.array", "numpy.zeros", "numpy.sum" ], [ "numpy.log", "numpy.sq...
sadams2013/pvtools
[ "12bd9334a1335972519c81d0c01c6308aa597c39" ]
[ "pvtools.py" ]
[ "# Import standard libraries.\nimport json\n\n# Import external libraries.\nimport numpy as np\nimport pandas as pd\n\nclass dbSNP:\n \"\"\"Store dbSNP data for a gene.\n\n Parameters\n ----------\n dbsnp_file : str\n Path to a dbSNP file containing variant information.\n\n Attributes\n ---...
[ [ "pandas.read_table", "pandas.DataFrame" ] ]
vishalbelsare/tsa
[ "203e602fe5fc95b89afb454156fc7e4faee90f2a", "203e602fe5fc95b89afb454156fc7e4faee90f2a" ]
[ "src/main/python/thalesians/tsa/optimization/visual.py", "src/main/python/thalesians/tsa/numpyutils.py" ]
[ "import itertools\nimport time\nimport warnings\n\nimport numpy as np\nimport matplotlib.colors\nimport matplotlib.pyplot as plt\n\nimport thalesians.tsa.checks as checks\nimport thalesians.tsa.numpyutils as npu\nimport thalesians.tsa.utils as utils\n\ndef _aggregate(aggregate_func, data, empty_aggregate):\n if ...
[ [ "numpy.size", "matplotlib.pyplot.figure" ], [ "numpy.asscalar", "numpy.triu_indices_from", "numpy.sign", "numpy.ndim", "numpy.copy", "numpy.size", "numpy.shape", "numpy.warnings.filterwarnings", "numpy.array", "numpy.empty" ] ]
MUYANGGUO/HPC
[ "ab95d18d4054b892269dd439470548abd06f5512" ]
[ "projects/1-molecular-dynamics/check.py" ]
[ "\nif __name__ == \"__main__\":\n import sys\n import json\n import numpy as np\n\n firstline = sys.stdin.readline()\n obj = json.loads(firstline)\n\n Np = obj['num_points']\n dt = obj['dt']\n L = obj['L']\n Nt = obj['num_steps']\n Nint = obj['step_chunk']\n k = obj['k']\n d = o...
[ [ "numpy.polyfit", "numpy.linspace", "numpy.ndarray", "numpy.ones", "numpy.mean", "numpy.array", "numpy.zeros" ] ]
hiroyasuakada/ros_start
[ "10221ad2bcaefa4aaadc6c90424a3751126ac256" ]
[ "scripts/gan/cycle_gan/train.py" ]
[ "import os\nimport random\nimport itertools\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.utils.data\nimport torchvision.transforms as transforms\nfrom torchvision.utils import make_grid\nfrom torch.autograd import Variable\nfrom PIL import Image\nimport matplotlib.pyplot as plt\nfrom tenso...
[ [ "torch.device", "torch.manual_seed", "torch.utils.data.DataLoader", "numpy.random.seed" ] ]
ziyedy/category-priornet
[ "5aa080eeff936ce3939f0d5458a2936677c15726" ]
[ "lib/prior/priorNet.py" ]
[ "import sys\n\nsys.path.append(\"../../\")\nimport lib.gcn3d as gcn3d\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\nclass PriorEncoder(nn.Module):\n def __init__(self, support_num: int, neighbor_num: int):\n super(PriorEncoder, self).__init__()\n\n self.neighbor_num =...
[ [ "torch.nn.Linear", "torch.randn", "torch.nn.functional.relu" ] ]
yulong314/mmpose
[ "cdfce789d0e48dd868c70a405a7d7f3da2b4ebe3", "cdfce789d0e48dd868c70a405a7d7f3da2b4ebe3" ]
[ "mmpose/datasets/datasets/hand/freihand_dataset.py", "mmpose/datasets/datasets/fashion/fashion_base_dataset.py" ]
[ "# Copyright (c) OpenMMLab. All rights reserved.\nimport os\nfrom collections import OrderedDict\n\nimport numpy as np\n\nfrom mmpose.datasets.builder import DATASETS\nfrom .hand_base_dataset import HandBaseDataset\n\n\n@DATASETS.register_module()\nclass FreiHandDataset(HandBaseDataset):\n \"\"\"FreiHand dataset...
[ [ "numpy.array", "numpy.zeros", "numpy.minimum", "numpy.ones" ], [ "numpy.max", "numpy.array", "numpy.random.rand" ] ]
gonsoomoon/tensorflow-workshop-for-sagemaker
[ "985ab3853c16f4833caeae6382ccfc4474ac8e98" ]
[ "training_script/cifar10_keras_sm.py" ]
[ "# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy of this\n# software and associated documentation files (the \"Software\"), to deal in the Software\n# without restriction, including without limitation the ri...
[ [ "tensorflow.image.resize_image_with_crop_or_pad", "tensorflow.image.random_flip_left_right", "tensorflow.FixedLenFeature", "tensorflow.data.TFRecordDataset", "tensorflow.decode_raw", "tensorflow.cast", "tensorflow.saved_model.builder.SavedModelBuilder", "tensorflow.reshape", "t...
slimnsour/datman
[ "6ac4827e2ae20401eb4b048d42bdfca5db5d3de9" ]
[ "bin/dm_link.py" ]
[ "#!/usr/bin/env python\n\"\"\"\nRenames (links) exam zip archives by consulting a lookup table.\n\nThis program looks up the proper name in a table that lists the original exam\narchive name, and the target name.\n\nUsage:\n dm_link.py [options] <study>\n dm_link.py [options] <study> <zipfile>\n\nArguments:\n...
[ [ "pandas.read_csv" ] ]
haggaila/qiskit-dynamics
[ "fd20314e2b591c35323782bc429d9f928fdb9a12" ]
[ "test/dynamics/solvers/test_solver_classes.py" ]
[ "# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2021.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n# Any modifications or ...
[ [ "numpy.eye", "numpy.array", "numpy.kron", "numpy.abs" ] ]
Sourodip-ghosh123/Fruits-360
[ "f15ce919757f0a0ce057f4ba4b49ce3d5aba53e2" ]
[ "ResNet50 V2/resnet50_v2_model.py" ]
[ "from keras.applications.resnet_v2 import ResNet50V2\nmodel=ResNet50V2(include_top=True, weights=None, input_tensor=None, input_shape=(100,100,3),classes=41)\nmodel.summary()\n\nmodel.compile(loss='categorical_crossentropy',\n optimizer='adam',\n metrics=['accuracy'])\nprint('Compiled!')\n...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
gandreassi/ImmoKaa
[ "904115e5a6f91ca78b41aebdaf4ffe3934a4c318" ]
[ "ImmoKaa/scraper.py" ]
[ "from bs4 import BeautifulSoup\nimport urllib.request as urllib2\nimport random\nfrom random import choice\nimport pandas as pd\nimport copy, time, sys, shutil, os, yaml, json\nimport datetime as dt\nfrom glob import glob\nimport regex\n\nclass scraper():\n \n criteria = None\n df = None\n df_pre = None...
[ [ "pandas.concat", "pandas.read_csv", "pandas.to_datetime", "pandas.DataFrame.from_dict" ] ]
yxia-fb/shaDow-GNN
[ "2b867011c7084d4ed1b407e29f3ee09632fcc3dc" ]
[ "shaDow/utils.py" ]
[ "import os\nimport torch\nimport glob\n\nimport numpy as np\nimport scipy.sparse as sp\nimport yaml\nfrom sklearn.preprocessing import StandardScaler\n\nfrom shaDow.globals import git_rev, timestamp, Logger\nfrom torch_scatter import scatter\n\nfrom copy import deepcopy\n\nfrom typing import List, Union\nfrom shaDo...
[ [ "torch.LongTensor", "torch.Size", "numpy.clip", "numpy.asarray", "numpy.power", "torch.load", "torch.from_numpy", "scipy.sparse.csr_matrix", "numpy.ones", "numpy.concatenate", "sklearn.preprocessing.StandardScaler", "torch.FloatTensor", "numpy.load", "torch....
dmuehlemann/RPGV
[ "18b4216e6cedce40a020a57e1822a363a8a6b60c" ]
[ "3_ gph-low-pass-filter.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sam Aug 7 11:50:05 2020\n\n@author: Dirk\n\nThis scripts applies a 10day low pass filter to the ERA5 gph daily means\n\n\"\"\"\n\nimport scipy.signal as signal\nimport matplotlib.pyplot as plt\nfrom pathlib import Path\nimport xarray as xr\n\n\n#Define input and output ...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "matplotlib.pyplot.plot", "scipy.signal.butter", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.ylabel" ] ]
endremborza/data-bevy
[ "25398124595ffddc201de6a748e84bb24d5885b2" ]
[ "staging/stop_detection/stops.py" ]
[ "from dataclasses import dataclass\nfrom datetime import datetime\n\nimport datazimmer as dz\nimport pandas as pd\nfrom colassigner import ColAssigner, get_all_cols\n\n\nclass NoStops(Exception):\n pass\n\n\n@dataclass\nclass DaySetup:\n work_start: int\n work_end: int\n home_arrive: int\n home_depar...
[ [ "pandas.NamedAgg" ] ]
zhubonan/castepxbin
[ "24b875cf44b83d5eac75b52cf45e378a3361e90e" ]
[ "castepxbin/pdos.py" ]
[ "\"\"\"\nReader module for CASTEP pdos_bin\n\nWritten based on the example `pdos_bin.f90` file in open-source OptaDos code\n\"\"\"\nfrom enum import Enum, unique\nimport numpy as np\nfrom scipy.io import FortranFile\n\n\n@unique\nclass SpinEnum(Enum):\n \"\"\"\n Enum type for Spin. Only up and down.\n Usa...
[ [ "numpy.unique", "numpy.dtype", "numpy.histogram", "numpy.where", "numpy.zeros" ] ]
TwinMooon/transformers-plus-performers
[ "c17d6473deb5316363f60bb2ddd1007d4364abe4" ]
[ "src/transformers/modeling_tf_performer_attention.py" ]
[ "from typing import Optional, Union\nimport logging\nimport numpy as np\nimport tensorflow as tf\n\n\nfrom .configuration_performer_attention import PerformerAttentionConfig\nfrom .modeling_utils import (\n find_pruneable_heads_and_indices,\n prune_linear_layer\n)\n\nKERNEL_CALLABLES = {\n 'cosh': lambda x...
[ [ "tensorflow.device", "tensorflow.concat", "tensorflow.reduce_sum", "tensorflow.cast", "numpy.random.default_rng", "tensorflow.math.reduce_sum", "numpy.log", "tensorflow.nn.elu", "tensorflow.math.reduce_max", "tensorflow.keras.layers.Dense", "tensorflow.linalg.diag", ...
ChaplinMarchais/cortana-intelligence-product-detection-from-images
[ "2e5370098f9f83cd27cdaba2eab675f3c30ae157" ]
[ "technical_deployment/train_model/imdb_data.py" ]
[ "# --------------------------------------------------------\n# Fast R-CNN\n# Copyright (c) 2015 Microsoft\n# Licensed under The MIT License [see LICENSE for details]\n# Written by Ross Girshick\n# --------------------------------------------------------\n\nfrom __future__ import print_function\nfrom builtins import...
[ [ "numpy.maximum", "numpy.minimum", "numpy.cumsum", "numpy.finfo", "numpy.max", "numpy.argmax", "numpy.argsort", "numpy.array", "numpy.zeros", "numpy.loadtxt" ] ]
disktnk/chainer-compiler
[ "5cfd027b40ea6e4abf73eb42be70b4fba74d1cde", "5cfd027b40ea6e4abf73eb42be70b4fba74d1cde", "5cfd027b40ea6e4abf73eb42be70b4fba74d1cde", "5cfd027b40ea6e4abf73eb42be70b4fba74d1cde", "5cfd027b40ea6e4abf73eb42be70b4fba74d1cde", "5cfd027b40ea6e4abf73eb42be70b4fba74d1cde", "5cfd027b40ea6e4abf73eb42be70b4fba74d1cd...
[ "ch2o/tests/syntax/MultiFunction.py", "ch2o/ch2o/chainer2onnx.py", "elichika/tests/node/ndarray/NpZeros.py", "elichika/tests/node/ndarray/Shape.py", "examples/imagenet/train_imagenet.py", "ch2o/tests/syntax/UserDefinedFunc.py", "elichika/tests/node/Softmax.py", "elichika/tests/node/Functions/ExpandDim...
[ "# coding: utf-8\n\nimport chainer\nimport chainer.links as L\n\n# Network definition\n\n\nclass A(chainer.Chain):\n\n def __init__(self):\n super(A, self).__init__()\n with self.init_scope():\n self.l0 = L.Linear(7)\n self.l1 = L.Linear(5)\n\n def g(self, y):\n retu...
[ [ "numpy.random.rand", "numpy.random.seed" ], [ "numpy.array" ], [ "numpy.zeros" ], [ "numpy.array", "numpy.random.rand", "numpy.random.seed" ], [ "numpy.load", "numpy.average" ], [ "numpy.random.rand" ], [ "numpy.random.rand", "numpy.random.se...
888dahong888/open3dTest
[ "cf28df9f9f5d24b1ca614414804a1c18d349467c" ]
[ "test01.py" ]
[ "#读写点云,网格,图片文件\n\nimport numpy as np\nimport open3d as o3d\npcd=o3d.io.read_point_cloud(\"data/rs1.pcd\")\n\nprint(pcd) #打印点云数量\n\n#可视化一下\no3d.visualization.draw_geometries([pcd])\n \n#下采样\ndownpcd = pcd.voxel_down_sample(voxel_size=0.05)\no3d.visualization.draw_geometries([downpcd])\n \n#计算法向量\ndownpcd.estima...
[ [ "numpy.asarray" ] ]
INK-USC/shifted-label-distribution
[ "3cf2b7ced3b2e18234db405f6014f049c4830d71", "3cf2b7ced3b2e18234db405f6014f049c4830d71" ]
[ "NeuralATT/train.py", "Neural/train.py" ]
[ "'''\nTraining script with ramdom splitting dev set\n'''\n__author__ = 'Maosen'\nimport torch\nfrom model import Model, Wrapper\nimport utils\nfrom utils import Dataset\nimport argparse\nimport pickle\nimport numpy as np\nfrom tqdm import tqdm\nimport logging\nimport os\nimport random\n\ntorch.backends.cudnn.determ...
[ [ "torch.manual_seed", "numpy.load", "numpy.random.seed", "torch.cuda.is_available" ], [ "numpy.random.seed", "torch.manual_seed", "torch.from_numpy", "torch.cuda.is_available", "torch.device", "numpy.load" ] ]
xiaoMrzhang/mmdetection3d
[ "1e7695297e60afe3e09834de1582c3437086ed49", "1e7695297e60afe3e09834de1582c3437086ed49", "1e7695297e60afe3e09834de1582c3437086ed49", "1e7695297e60afe3e09834de1582c3437086ed49", "1e7695297e60afe3e09834de1582c3437086ed49" ]
[ "mmdet3d/models/backbones/second_ran.py", "tools/data_converter/waymo_converter.py", "mmdet3d/datasets/waymo_dataset.py", "mmdet3d/datasets/pipelines/formating.py", "mmdet3d/models/necks/second_fpn_ran.py" ]
[ "from mmcv.cnn import build_conv_layer, build_norm_layer\nfrom mmcv.runner import load_checkpoint, force_fp32\nfrom torch import nn as nn\nimport torch\nimport numpy as np\n\nfrom mmdet.models import BACKBONES\nfrom mmdet3d.utils.soft_mask import SoftMask\n\n@BACKBONES.register_module()\nclass SECOND_RAN(nn.Module)...
[ [ "torch.nn.Sequential", "torch.nn.ModuleList", "torch.log", "torch.nn.ReLU", "torch.pow" ], [ "tensorflow.convert_to_tensor", "tensorflow.reverse", "tensorflow.enable_eager_execution", "numpy.ones_like", "tensorflow.constant", "tensorflow.__version__.split", "num...
ZJU-lishuang/mmaction2
[ "ee34d952e792fd1adea2c2e397b29faff68eaec9" ]
[ "tests/test_models/test_recognizers/test_recognizer2d.py" ]
[ "import torch\n\nfrom mmaction.models import build_recognizer\nfrom ..base import generate_recognizer_demo_inputs, get_recognizer_cfg\n\n\ndef test_tsn():\n config = get_recognizer_cfg('tsn/tsn_r50_1x1x3_100e_kinetics400_rgb.py')\n config.model['backbone']['pretrained'] = None\n\n recognizer = build_recogn...
[ [ "torch.no_grad" ] ]
yikir/mmdetection
[ "dfceb61b0252f81b010f550f2acbe46c7dad6ef6" ]
[ "port.py" ]
[ "#!/usr/bin/env python\n# -*- coding: UTF-8 -*-\n\n# n(net) o(oil) h(hang) r(rust) 检测模块\nimport os\nimport sys\ncurrent_dir = os.path.dirname(os.path.abspath(__file__))\nsys.path.append(current_dir)\n\nfrom mmdet.models import build_detector\nimport mmcv\nimport torch\nimport cv2\nimport time\nimport json\nfrom mmc...
[ [ "numpy.asarray", "numpy.ascontiguousarray", "numpy.full", "numpy.concatenate", "torch.no_grad", "numpy.array", "numpy.vstack" ] ]
balakrishnan273818/AdvancedLaneDetection
[ "c0993aa9422654258a41fe9616ab4e24b29e6a7a" ]
[ "examples/unwanted/example.py" ]
[ "'''\ndef warper(img, src, dst):\n\n # Compute and apply perpective transform\n img_size = (img.shape[1], img.shape[0])\n M = cv2.getPerspectiveTransform(src, dst)\n warped = cv2.warpPerspective(img, M, img_size, flags=cv2.INTER_NEAREST) # keep same size as input image\n\n return warped\n'''\n\nimpo...
[ [ "numpy.zeros" ] ]
DanielSun94/kgenlu
[ "bbf377c6740040cb1a8b656785e7c5bfdb8371d5" ]
[ "src/test/rnn_test.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nNLP From Scratch: Translation with a Sequence to Sequence Network and Attention\n*******************************************************************************\n**Author**: `Sean Robertson <https://github.com/spro/practical-pytorch>`_\n\nThis is the third and final tutorial on doi...
[ [ "torch.nn.NLLLoss", "matplotlib.ticker.MultipleLocator", "torch.nn.LogSoftmax", "torch.nn.Dropout", "torch.zeros", "torch.cat", "matplotlib.pyplot.switch_backend", "torch.nn.GRU", "matplotlib.pyplot.subplots", "torch.nn.Embedding", "torch.tensor", "matplotlib.pyplot...
theKasra/14-puzzle-problem-bidirectionalsearch
[ "f6fe4e0d8a1db1b1675933d8b2461981ac08686b" ]
[ "Project_2.py" ]
[ "from copy import deepcopy\r\nfrom collections import deque\r\nimport time\r\nimport numpy as np\r\n\r\nclass Node:\r\n def __init__(self, parent, grid):\r\n self.parent = parent\r\n self.grid = grid\r\n\r\ndef print_answer(p1, p2):\r\n initial_to_middle = []\r\n while p1:\r\n initial_...
[ [ "numpy.matrix" ] ]
cloudcomputinghust/IoT
[ "5db3f9078be427fa23549add1747a067c2add767" ]
[ "test-component/draw_graph_2.py" ]
[ "import matplotlib.pyplot as plt\nimport numpy as np\nfrom influxdb import InfluxDBClient\nimport time\nimport datetime\nimport collections\n\n\ntime_min = '2017-04-03 16:35:00'\ntime_max = '2017-04-03 22:35:00'\ntime_min_2 = '2017-04-06 09:30:00'\ntime_max_2 = '2017-04-06 14:30:00'\n# time_min = '2017-03-25 00:00:...
[ [ "numpy.array", "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "numpy.isfinite", "matplotlib.pyplot.figure", "numpy.arange", "matplotlib.pyplot.yscale", "matplotlib.pyplot.plot", "matplotlib.pyplot.subplots_adjust", "matplotlib.pyplot.bar", "matplotlib.pyplot.gri...
slipperlobster/flipper
[ "527952a74bc76f76cf3a2d25755386f8db285885", "527952a74bc76f76cf3a2d25755386f8db285885", "527952a74bc76f76cf3a2d25755386f8db285885", "527952a74bc76f76cf3a2d25755386f8db285885", "8482edd77604fcec2ea08913f1748c21be80dac7", "527952a74bc76f76cf3a2d25755386f8db285885" ]
[ "jesse/indicators/gatorosc.py", "jesse/indicators/voss.py", "jesse/indicators/gauss.py", "jesse/factories/candle_factory.py", "jesse/indicators/vwap.py", "jesse/indicators/mwdx.py" ]
[ "from collections import namedtuple\n\nimport numpy as np\nimport talib\n\nfrom jesse.helpers import get_candle_source, np_shift\nfrom jesse.helpers import slice_candles\n\nGATOR = namedtuple('GATOR', ['upper', 'lower', 'upper_change', 'lower_change'])\n\n\ndef gatorosc(candles: np.ndarray, source_type: str = \"clo...
[ [ "numpy.arange", "numpy.abs" ], [ "numpy.full_like", "numpy.sqrt", "numpy.cos" ], [ "numpy.dot", "numpy.power", "numpy.isnan", "numpy.cos", "numpy.repeat", "numpy.array", "numpy.zeros" ], [ "numpy.isnan", "numpy.array", "numpy.zeros" ], [ ...
legend-of-zyda/LuxPythonEnvGym
[ "7d818b5943dad1b7fae3c66b612aae93c743bd0e" ]
[ "examples/agent_policy.py" ]
[ "import sys\nimport time\nfrom functools import partial # pip install functools\nimport copy\nimport random\n\nimport numpy as np\nfrom gym import spaces\n\nfrom luxai2021.env.agent import Agent, AgentWithModel\nfrom luxai2021.game.actions import *\nfrom luxai2021.game.game_constants import GAME_CONSTANTS\nfrom lu...
[ [ "numpy.concatenate", "numpy.delete", "numpy.argmax", "numpy.argmin", "numpy.array", "numpy.zeros", "numpy.sum" ] ]
pritesh-mehta/dwi-utilities
[ "f1e307fcf51ef4e4cc95ac311f031e3521c1fbbf" ]
[ "dwi_utilities/comp_high_b.py" ]
[ "#!/usr/bin/env python\n\n\"\"\"\n@author: pritesh-mehta\n\"\"\"\n\nimport numpy as np\nfrom scipy.optimize import curve_fit\nfrom pathlib import Path\nfrom argparse import ArgumentParser\n\nfrom dwi_utilities.monoexponential_decay import log_func, func\nimport dwi_utilities.nifti_utilities as nutil\n\ndef comp_hig...
[ [ "numpy.log", "numpy.shape", "numpy.exp", "numpy.array", "scipy.optimize.curve_fit", "numpy.zeros" ] ]
SarderLab/HistomicsTK_PodoSighter
[ "9a75302f645bfb3dfd9688d247388c9948f4eadb" ]
[ "histomicstk/deeplab/utils/get_dataset_colormap.py" ]
[ "# Lint as: python2, python3\n# 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/L...
[ [ "numpy.asarray", "numpy.arange", "numpy.max", "numpy.zeros" ] ]
Jasonandy/Python-X
[ "2f02b9a17bd5495dd1f8746b191f11ec2d7bccbe", "2f02b9a17bd5495dd1f8746b191f11ec2d7bccbe" ]
[ "cn/opencv/finger/finger.py", "cn/PyTorch/demo_1/demo.py" ]
[ "import cv2 as cv\nimport numpy as np\nimport math\nimport time\n\ncapture = cv.VideoCapture(0)\n\n# video = \"http://admin:admin@10.242.200.134:8081/\" # admin是账号:admin是密码 后面是局域网\n# capture = cv.VideoCapture(video)\n\n\n# 获得欧几里距离\ndef _get_eucledian_distance(vect1, vect2):\n distant = vect1[0] - vect2[0]\n ...
[ [ "numpy.square", "numpy.ones" ], [ "torch.nn.BatchNorm1d", "torch.randn", "torch.nn.RNN", "torch.nn.Sigmoid", "torch.nn.LeakyReLU", "torch.nn.ReLU", "torch.nn.Threshold" ] ]
winnerineast/pythia
[ "b6fe288405490f6e02a3e59dbf32a181aee35645", "b6fe288405490f6e02a3e59dbf32a181aee35645" ]
[ "pythia/utils/general.py", "pythia/modules/metrics.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates.\nimport collections\nimport gc\nimport os\nfrom bisect import bisect\n\nimport requests\nimport torch\nimport tqdm\nimport yaml\nfrom torch import nn\n\n\ndef lr_lambda_update(i_iter, cfg):\n if (\n cfg[\"training_parameters\"][\"use_warmup\"] is True\n ...
[ [ "torch.is_tensor", "torch.cuda.max_memory_allocated", "torch.cuda.max_memory_cached", "torch.cuda.memory_allocated", "torch.cuda.memory_cached" ], [ "torch.mean", "torch.nn.functional.softmax", "torch.max", "torch.sum", "torch.tensor", "torch.le", "torch.no_grad...
Qianna00/mmdetection
[ "31e7dff4c61000002d27117543b85e68d2619b4c", "31e7dff4c61000002d27117543b85e68d2619b4c", "31e7dff4c61000002d27117543b85e68d2619b4c", "31e7dff4c61000002d27117543b85e68d2619b4c" ]
[ "mmdet/models/detectors/two_stage_with_MetaEmbedding.py", "mmdet/models/roi_heads/bbox_heads/bbox_head_separate.py", "mmdet/mmcv/multi_optim_runner.py", "mmdet/models/detectors/two_stage_extra_backbone.py" ]
[ "import torch\nimport torch.nn as nn\nimport numpy as np\n\n# from mmdet.core import bbox2result, bbox2roi, build_assigner, build_sampler\nfrom ..builder import DETECTORS, build_backbone, build_head, build_neck\nfrom .base import BaseDetector\nfrom tqdm import tqdm\nfrom mmdet.datasets import build_dataloader, buil...
[ [ "numpy.unique", "torch.zeros", "torch.randn", "torch.unsqueeze", "torch.tensor", "torch.set_grad_enabled", "torch.cuda.is_available", "numpy.array" ], [ "torch.nn.init.constant_", "torch.nn.ModuleList", "torch.nn.Linear", "torch.nn.init.xavier_uniform_", "to...
BUPT-GAMMA/GammaGL
[ "2b9f32e1ac3533cb75a063243e8a2fa654466d18", "2b9f32e1ac3533cb75a063243e8a2fa654466d18" ]
[ "profiler/mpops/ms_gpu.py", "gammagl/utils/coalesce.py" ]
[ "# !/usr/bin/env python3\n# -*- coding:utf-8 -*-\n\n# @Time : 2022/04/14 08:36\n# @Author : clear\n# @FileName: ms_gpu.py\n\nimport os\nos.environ['TL_BACKEND'] = 'mindspore'\nos.environ[\"CUDA_VISIBLE_DEVICES\"] = \"1\"\n\nimport sys\nsys.path.insert(0, os.path.abspath('../../'))\nimport time\nimport numpy as ...
[ [ "numpy.argsort", "numpy.load", "numpy.max", "numpy.random.randn" ], [ "numpy.multiply", "numpy.arange", "numpy.sort", "numpy.argsort", "numpy.zeros" ] ]
karimul/ebm-sampling
[ "c8c8565a21fde52ac71598f20625857c4ccb8b67", "c8c8565a21fde52ac71598f20625857c4ccb8b67" ]
[ "sampling/resgld.py", "models/mnist_model.py" ]
[ "import torch\nimport numpy as np\nfrom autograd.numpy import sqrt\n\ndef gen_image_resgld(label, FLAGS, model, im_neg, num_steps, sample=False):\n\n im_noise = torch.randn_like(im_neg).detach()\n\n T_multiply=0.9\n T = 0.9\n var=0.1\n resgld_beta_high = im_neg\n resgld_beta_low = im_neg\n swap...
[ [ "torch.exp", "numpy.random.uniform", "torch.clamp", "torch.randn_like" ], [ "torch.nn.Linear", "torch.nn.Conv2d" ] ]
jkkummerfeld/lamb
[ "769adaa76394dc74746c2fd8d31afe9c3ca7895b", "769adaa76394dc74746c2fd8d31afe9c3ca7895b" ]
[ "lamb/nascell.py", "lamb/training.py" ]
[ "# Copyright 2018 DeepMind Technologies Limited. 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# Unles...
[ [ "tensorflow.compat.v1.get_variable", "tensorflow.compat.v1.split", "tensorflow.compat.v1.zeros_initializer", "tensorflow.compat.v1.matmul", "tensorflow.compat.v1.nn.rnn_cell.LSTMStateTuple", "tensorflow.compat.v1.nn.bias_add" ], [ "numpy.split", "tensorflow.compat.v1.ConfigProt...
sert121/ivy
[ "286f86e487b0c83d46a3ef8d30aa96316337db32", "286f86e487b0c83d46a3ef8d30aa96316337db32" ]
[ "ivy/functional/backends/tensorflow/array_api/linear_algebra.py", "ivy/functional/backends/numpy/core/general.py" ]
[ "# global\nimport tensorflow as tf\nfrom tensorflow.python.types.core import Tensor\nfrom typing import Union, Optional, Tuple, Literal\n\n# local\nfrom ivy import inf\n\n\n# noinspection PyUnusedLocal,PyShadowingBuiltins\ndef vector_norm(x: Tensor,\n axis: Optional[Union[int, Tuple[int]]] = None, \n...
[ [ "tensorflow.cast", "tensorflow.expand_dims", "tensorflow.abs", "tensorflow.linalg.norm" ], [ "numpy.take_along_axis", "numpy.split", "numpy.expand_dims", "numpy.take", "numpy.linspace", "numpy.asarray", "numpy.squeeze", "numpy.cumsum", "numpy.dtype", "nu...
ddboline/kaggle_predict_west_nile
[ "b4dbb3eed450beaf2b73d2a772e0fb3266926418" ]
[ "feature_extraction.py" ]
[ "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Fri May 1 16:28:06 2015\n\n@author: ddboline\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport csv\nimport gzip\n\nimport numpy as...
[ [ "pandas.read_csv", "numpy.abs", "numpy.isnan", "numpy.cos", "numpy.sin" ] ]
neulab/idiomata-bot
[ "f397e49fb9d1d59b9b74e0e528a72307637a18e9" ]
[ "lang_id.py" ]
[ "import numpy as np\nimport iso639\nfrom collections import defaultdict\n\nall_langs = ('cay', 'dan', 'deu', 'eng', 'fra', 'kwk', 'see', 'swe')\n\ncodelang = [('cay', 'Cayuga'), ('see', 'Seneca'), ('other', 'Other')]\ncode2lang_dict = {c:l for (c,l) in codelang}\nlang2code_dict = {l:c for (c,l) in codelang}\n\ndef ...
[ [ "numpy.max", "numpy.exp", "numpy.sum" ] ]
drat/Neural-Voice-Cloning-With-Few-Samples
[ "4febde43ccc143fc88d74d5fa0c5a117636778b4" ]
[ "Modules/Attention.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport sys\n\nfrom Modules.MultiHeadAttention import MultiHeadAttention\n\nclass Attention(nn.Module):\n def __init__(self, dim):\n super(Attention, self).__init__()\n\n self.encoders = self._build_model(dim)\n\n def _build_m...
[ [ "torch.nn.ModuleList" ] ]
galvinw/fairmotdocker
[ "032d50a4025788b97ca36b0d97b7df15ddb5986c", "032d50a4025788b97ca36b0d97b7df15ddb5986c" ]
[ "monoloco/monoloco/visuals/plot_3d_box.py", "monofair2/monoloco/monoloco/eval/eval_kitti.py" ]
[ "\nimport numpy as np\n\n\ndef correct_boxes(boxes, hwls, xyzs, yaws, path_calib):\n\n with open(path_calib, \"r\") as ff:\n file = ff.readlines()\n p2_str = file[2].split()[1:]\n p2_list = [float(xx) for xx in p2_str]\n P = np.array(p2_list).reshape(3, 4)\n boxes_new = []\n for idx in rang...
[ [ "numpy.min", "numpy.cos", "numpy.sin", "numpy.ones", "numpy.max", "numpy.any", "numpy.transpose", "numpy.array", "numpy.vstack" ], [ "numpy.array" ] ]
Ditskih/Project
[ "87170245e55e615b0a14966d60afe41caece0434" ]
[ "processingfcmsvd.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Thu Feb 21 15:38:52 2019\r\n\r\n@author: Ditskih\r\n\"\"\"\r\nimport os\r\nimport json\r\nimport re\r\nimport csv\r\nfrom nltk.tokenize import word_tokenize\r\nfrom nltk.stem import WordNetLemmatizer\r\nfrom sklearn.feature_extraction.text import CountVectorizer\r\n#...
[ [ "sklearn.random_projection.GaussianRandomProjection", "sklearn.feature_extraction.text.TfidfVectorizer", "scipy.sparse.csr_matrix", "numpy.ones" ] ]
hengma1001/molecules
[ "c6694cc77ef1eb246f3fdab1f201481d1bcaa07c" ]
[ "molecules/utils/callback.py" ]
[ "import os\nimport time\nimport torch\n\ndevice = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n\nclass Callback:\n def __init__(self): pass\n def on_train_begin(self, logs): pass\n def on_train_end(self, logs): pass\n def on_epoch_begin(self, epoch, logs): pass\n def on_epoch_end...
[ [ "torch.cuda.is_available", "torch.save" ] ]
bemrdo/CTF-2019
[ "424512f7c43278d72091aa737da78907c14f9fc1" ]
[ "watevrCTF-2019/challenges/web/NewPwd/train.py" ]
[ "import requests\nimport urllib.parse\nimport base64\nimport json\nimport io\nimport numpy as np\nfrom PIL import Image\nimport cv2.cv2 as cv\nfrom solve import *\n\ndef combine_and_show_alphabet():\n imgTop = np.empty((50, 0))\n imgBottom = np.empty((50, 0))\n for char in alphabet[:16]:\n imgTop = ...
[ [ "numpy.rot90", "numpy.empty", "numpy.min" ] ]
ToddSmall/beanmachine
[ "85768bd1785bf6a8b3760a04f37a8fca69b4e4ca" ]
[ "src/beanmachine/ppl/inference/tests/inference_test.py" ]
[ "# Copyright (c) Meta Platforms, Inc. and affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport math\nimport sys\n\nimport beanmachine.ppl as bm\nimport pytest\nimport torch\nimport torch.distributions as dist\nfrom bea...
[ [ "torch.tensor", "torch.distributions.Uniform", "torch.distributions.Normal" ] ]
hzyjerry/InfoGAIL
[ "89bf3bee42242f4a8a41401d17296773294e6b6a" ]
[ "wgail_info_2/preprocess.py" ]
[ "from keras.applications.resnet50 import ResNet50\nfrom keras.preprocessing import image\nfrom keras.applications.resnet50 import preprocess_input\nfrom keras.models import Model\nimport numpy as np\nimport time\nimport cv2\n\n\ndef collect_demo(path, num_patch, aux_dim, action_dim):\n\n for i in range(num_patch...
[ [ "numpy.concatenate", "numpy.expand_dims", "numpy.zeros" ] ]
anlavandier/dask-image
[ "a858c61ac5beb7de7d7644d7e85714b5c16c2a7a", "a858c61ac5beb7de7d7644d7e85714b5c16c2a7a" ]
[ "tests/test_dask_image/test_ndfilters/test__conv.py", "tests/test_dask_image/test_ndfilters/test__gaussian.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport pytest\nimport numpy as np\nimport scipy.ndimage\n\nimport dask.array as da\n\nimport dask_image.ndfilters\n\n\n@pytest.mark.parametrize(\n \"da_func\",\n [\n (dask_image.ndfilters.convolve),\n (dask_image.ndfilters.correlate),\n ]\n)\n@...
[ [ "numpy.random.random", "numpy.random.seed", "numpy.arange", "numpy.stack", "numpy.ones", "numpy.concatenate" ], [ "numpy.random.random", "numpy.random.seed", "numpy.arange", "numpy.stack", "numpy.concatenate", "numpy.prod" ] ]
ViniViniAntunes/Prevendo_Valor_de_Aluguel_em_SP
[ "e37d54da0b2c8ce3c6ddb4ec45191b069834427c" ]
[ "Previsao_valor_aluguel/app.py" ]
[ "# Importando as bibliotecas necessárias\nimport pandas as pd\nimport streamlit as st\nimport plotly.express as px\nfrom sklearn.ensemble import RandomForestRegressor\n\n# Criando uma função para carregar o dataset\n#@st.cache # Notação para ficar em cache\ndef get_data():\n return pd.read_csv(\"model/data_deplo...
[ [ "sklearn.ensemble.RandomForestRegressor", "pandas.read_csv" ] ]
LucasLorenc/tensorflow
[ "10a7b61cdf55d13c85c2a3cc5ca669e3d9ea8e11" ]
[ "tensorflow/python/keras/layers/core.py" ]
[ "# 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.framework.tensor_shape.TensorShape", "tensorflow.python.ops.array_ops.shape", "tensorflow.python.ops.variable_scope.variable_creator_scope", "tensorflow.python.util.tf_inspect.getfullargspec", "tensorflow.python.ops.gen_math_ops.mat_mul", "tensorflow.python.ops.array_ops...
QuantumQuadrate/Rearrangement
[ "5f8d64bd18a471a488747ed8d17b00304b4ab293" ]
[ "PythonRearrangement/setup.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Aug 22 13:22:01 2018\n\n@author: Cody\n\"\"\"\n\nfrom setuptools import setup\nfrom setuptools import Extension\nfrom Cython.Distutils import build_ext\nimport numpy as np\n\n\nsetup(\n cmdclass = {'build_ext': build_ext},\n ext_modules = [Extension(\"Rearrange...
[ [ "numpy.get_include" ] ]
Lechatelia/Welding_Joints
[ "7cb5b8ac4c961c4080e1590934c24130bfde3a26" ]
[ "ceshi.py" ]
[ "import cv2\r\nimport tensorflow as tf\r\nimport numpy as np\r\nimport random\r\n\r\ny = tf.constant([1,2,3,4,5,6], name='y',dtype=tf.float32)\r\ny_ = tf.constant([0,1,2,3,4,5], name='Y_',dtype=tf.float32)\r\ny = tf.reshape(y,[2,3])\r\ny_ = tf.reshape(y_,[2,3])\r\nz= tf.constant([1,2], name='z',dtype=tf.float32)\r\...
[ [ "tensorflow.multiply", "tensorflow.constant", "numpy.abs", "tensorflow.reshape", "tensorflow.subtract", "tensorflow.Session", "numpy.array" ] ]
WeiyuCheng/FIA-KDD-19
[ "18f29f8babbf1c505973a8a62ac48c6ca34ccd8a" ]
[ "src/scripts/RQ1.py" ]
[ "from __future__ import division\nfrom __future__ import print_function\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\nimport numpy as np\nimport argparse\nimport os\nfrom scipy.stats import pearsonr\nimport sys\n\nsys.path.append(\"..\")\nfrom scripts.load_movielens import load_m...
[ [ "numpy.savez", "numpy.random.choice", "scipy.stats.pearsonr", "numpy.max", "numpy.array", "numpy.zeros" ] ]
eyyupdirek/Rawpythn
[ "e66f0adcb8be514f349796d8ecad0a398412409d" ]
[ "rawpython.py" ]
[ "import pandas as pd\nimport numpy as np\nts = pd.Series(np.random.randn(1000),index=pd.date_range('1/1/2000', periods=1000))\n\nts\n" ]
[ [ "numpy.random.randn", "pandas.date_range" ] ]