repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
sjklipp/autochem_1219
[ "b96eb8b847c50d630d7c6422aeabf5662676bd2a" ]
[ "external/transformations/transformations/_transformations.py" ]
[ "# -*- coding: utf-8 -*-\n# transformations.py\n\n# Copyright (c) 2006-2019, Christoph Gohlke\n# Copyright (c) 2006-2019, The Regents of the University of California\n# Produced at the Laboratory for Fluorescence Dynamics\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or witho...
[ [ "numpy.diag", "numpy.dot", "numpy.radians", "numpy.expand_dims", "numpy.sqrt", "numpy.vstack", "numpy.fabs", "numpy.concatenate", "numpy.mean", "numpy.cross", "numpy.negative", "numpy.trace", "numpy.roll", "numpy.linalg.svd", "numpy.allclose", "numpy...
aperiosoftware/astropy-timeseries
[ "e27fa334e5ed0669dc284108f38c87c75fe6c29a" ]
[ "astropy_timeseries/downsample.py" ]
[ "import warnings\n\nimport numpy as np\nfrom astropy import units as u\nfrom astropy.utils.exceptions import AstropyUserWarning\n\nfrom .sampled import TimeSeries\nfrom .binned import BinnedTimeSeries\n\n__all__ = ['simple_downsample']\n\n\ndef reduceat(array, indices, function):\n \"\"\"\n Manual reduceat fu...
[ [ "numpy.unique", "numpy.ceil", "numpy.diff", "numpy.ma.zeros", "numpy.searchsorted", "numpy.repeat", "numpy.array" ] ]
airyadriana/workforce-scripts
[ "85e5b1e706df91c9fa1a7a301e1288daf689b0d7" ]
[ "scripts/create_assignments_from_csv.py" ]
[ "# -*- coding: UTF-8 -*-\n\"\"\"\n Copyright 2018 Esri\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n\n you may not use this file except in compliance with the License.\n\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless requ...
[ [ "pandas.read_csv", "pandas.to_datetime" ] ]
Lokilankaaa/Overfit-SDF
[ "918f8e1ff0507aa352e32b54a31d95140e184434" ]
[ "src/NeuralImplicit.py" ]
[ "import os\nimport time\n\nimport torch\nimport torch.optim as optim\nfrom Renderer import Renderer\nfrom SdfDataset import SdfDataset\nfrom torch import nn\nfrom torch.utils.data import DataLoader\nfrom tqdm import tqdm\n\n\nclass NeuralImplicit:\n def __init__(self, N=16, H=64):\n self.model = self.Over...
[ [ "torch.nn.Sequential", "torch.Tensor", "torch.load", "torch.utils.data.DataLoader", "torch.tanh", "torch.nn.Linear", "torch.nn.LeakyReLU", "torch.cuda.is_available", "torch.nn.L1Loss" ] ]
zooba/pandas
[ "183a41620c596bfc58edef5deb53d53e8bb4b798" ]
[ "pandas/tests/io/formats/test_format.py" ]
[ "# -*- coding: utf-8 -*-\n\n\"\"\"\nTest output formatting for Series/DataFrame, including to_string & reprs\n\"\"\"\n\nfrom __future__ import print_function\nimport re\n\nimport pytz\nimport dateutil\nimport itertools\nfrom operator import methodcaller\nimport os\nimport sys\nimport warnings\nfrom datetime import ...
[ [ "pandas.to_datetime", "pandas.Series", "numpy.linspace", "pandas.core.config.reset_option", "pandas.MultiIndex.from_tuples", "pandas.DataFrame", "numpy.random.randn", "pandas.compat.lzip", "numpy.where", "pandas.util.testing.reset_display_options", "pandas.reset_option"...
masaaldosey/optuna
[ "16ddc8a390129c049c89ab26391cdc7bbb3351f9" ]
[ "tests/integration_tests/lightgbm_tuner_tests/test_optimize.py" ]
[ "import contextlib\nfrom tempfile import TemporaryDirectory\nfrom typing import Any\nfrom typing import Dict\nfrom typing import Generator\nfrom typing import List\nfrom typing import Optional\nfrom typing import TYPE_CHECKING\nfrom typing import Union\nfrom unittest import mock\nimport warnings\n\nimport numpy as ...
[ [ "sklearn.model_selection.train_test_split", "sklearn.model_selection.KFold", "numpy.random.uniform", "numpy.zeros", "numpy.random.randint" ] ]
jtengsico/Challenge-5
[ "6ef97150b852f7bd85b39959f5c8575e788392d8" ]
[ "Starter_Code/MCForecastTools.py" ]
[ "# Import libraries and dependencies\nimport numpy as np\nimport pandas as pd\nimport os\nimport alpaca_trade_api as tradeapi\nimport datetime as dt\nimport pytz\n\nclass MCSimulation:\n \"\"\"\n A Python class for runnning Monte Carlo simulation on portfolio price data. \n \n ...\n \n Attributes\...
[ [ "numpy.random.normal", "pandas.MultiIndex.from_tuples", "pandas.DataFrame" ] ]
vivekbarsagadey/computer-vision
[ "9bc9d770c2de6096f569edc1485b389c074b7fe2" ]
[ "prog_know_classes/t31_detector.py" ]
[ "import cv2\nimport matplotlib.pylab as plt\nimport numpy as np\n\n\ndef region_of_interest(img, vertices):\n mask = np.zeros_like(img)\n # channel_count = img.shape[2]\n match_mask_color = 255\n cv2.fillPoly(mask, vertices, match_mask_color)\n masked_image = cv2.bitwise_and(img, mask)\n return ma...
[ [ "matplotlib.pylab.show", "numpy.copy", "matplotlib.pylab.imshow", "numpy.zeros_like", "numpy.array", "numpy.zeros" ] ]
zhenglab/EMOD
[ "68bef744a99d0ec4eef8f3cc6b1f5ab3c0807d89" ]
[ "mmdet/models/backbones/resnet_emod.py" ]
[ "import warnings\n\nimport torch.nn as nn\nimport torch.utils.checkpoint as cp\nfrom mmcv.cnn import build_conv_layer, build_norm_layer, build_plugin_layer\nfrom mmcv.runner import BaseModule\nfrom torch.nn.modules.batchnorm import _BatchNorm\nfrom mmdet.models.emod_ops import ARModule\n\nfrom ..builder import BACK...
[ [ "torch.nn.MaxPool2d", "torch.nn.ReLU", "torch.utils.checkpoint.checkpoint" ] ]
kaiix/vaelm
[ "4dc88e6c8cb17143c5849e7b89376c17df768cc8" ]
[ "vaelm.py" ]
[ "\"\"\"Variational auto-encoder language model\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import unicode_literals\nfrom __future__ import print_function\nfrom __future__ import division\n\nimport os\nimport time\nimport sys\nimport cPickle as pickle\nimport io\nimport functools\n\nimport numpy a...
[ [ "tensorflow.train.get_checkpoint_state", "tensorflow.gfile.Exists", "numpy.random.random_sample", "tensorflow.initialize_all_variables", "tensorflow.gfile.MakeDirs", "tensorflow.logging.set_verbosity", "tensorflow.Session", "tensorflow.variable_scope", "numpy.load", "numpy....
andreakropp/datarobot-user-models
[ "423ab8c703a545491ad6013a0b7efa3119e2c0fc", "423ab8c703a545491ad6013a0b7efa3119e2c0fc" ]
[ "task_templates/pipelines/python3_pytorch_multiclass/model_utils.py", "tests/drum/test_inference.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# pylint: disable-all\nfrom __future__ import absolute_import\nfrom pathlib import Path\n\nimport torch\nfrom torch.autograd import Variable\nimport torch.nn as nn\nimport torch.optim as optim\n\n\nclass MultiModel(nn.Module):\n expected_target_type = torch.LongTensor\n...
[ [ "torch.nn.Softmax", "torch.nn.CrossEntropyLoss", "torch.from_numpy", "torch.autograd.Variable", "torch.nn.Linear", "torch.nn.ReLU", "torch.save" ], [ "pandas.read_csv", "scipy.sparse.csr_matrix" ] ]
leenamaheshnikam10/datasets
[ "762cc556c364ecbb930b825709aa81647d889300" ]
[ "tensorflow_datasets/image/chexpert.py" ]
[ "# coding=utf-8\n# Copyright 2019 The TensorFlow Datasets 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 ...
[ [ "tensorflow.io.gfile.exists", "tensorflow.io.gfile.GFile" ] ]
yuliujq/incubator-tvm
[ "ba8291001757931a53126375d0ce6de95625240d" ]
[ "tests/python/relay/test_adt.py" ]
[ "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y...
[ [ "numpy.expand_dims", "numpy.stack", "numpy.concatenate", "numpy.random.uniform", "numpy.array" ] ]
Continvvm/continuum
[ "6d6d3fbeb7159e4e604874b8b5a7334ecfde91a3" ]
[ "tests/test_taskset.py" ]
[ "import numpy as np\nimport pytest\nfrom continuum.datasets import InMemoryDataset\nfrom continuum.tasks import TaskSet, concat, split_train_val\nfrom torch.utils.data import DataLoader\n\n\n@pytest.mark.parametrize(\"nb_others\", [1, 2])\ndef test_concat_function(nb_others):\n x = np.random.rand(10, 2, 2, 3)\n ...
[ [ "torch.utils.data.DataLoader", "numpy.ones", "numpy.concatenate", "numpy.copy", "numpy.random.rand", "numpy.random.randint" ] ]
Noppornying00/constant-fraction-activation
[ "b25745e7339df13e3db34d8c8372d5cbaa3c13bb" ]
[ "src/train.py" ]
[ "import time\nimport os\nfrom tqdm import tqdm\nimport logging\nimport torch\nfrom .train_test_functions import train, test, train_constant_fraction\nfrom .models.constant_fraction_wrapper import constant_fraction_wrapper\nfrom .parameters import get_arguments\nfrom .utils.read_datasets import cifar10\nfrom .utils....
[ [ "torch.manual_seed", "torch.cuda.manual_seed" ] ]
isabella232/eland
[ "789f8959bc1ab3f8886dd2f8098ed4182dd34dde" ]
[ "eland/tests/query_compiler/test_get_field_names_pytest.py" ]
[ "# Licensed to Elasticsearch B.V. under one or more contributor\n# license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright\n# ownership. Elasticsearch B.V. licenses this file to you under\n# the Apache License, Version 2.0 (the \"License\"); you may\...
[ [ "pandas.Index" ] ]
ciela/mlflow
[ "9a857b2d7733c276632d85d71036b76c4da9d845" ]
[ "mlflow/sklearn/__init__.py" ]
[ "\"\"\"\nThe ``mlflow.sklearn`` module provides an API for logging and loading scikit-learn models. This\nmodule exports scikit-learn models with the following flavors:\n\nPython (native) `pickle <https://scikit-learn.org/stable/modules/model_persistence.html>`_ format\n This is the main flavor that can be loade...
[ [ "pandas.DataFrame.from_dict" ] ]
MinkaiXu/Discriminator-Contrastive-Divergence
[ "54a56f3cb7b558d33cf1caf6b9a93ca8e947843d" ]
[ "evaluations/gen_images.py" ]
[ "# import os, sys, time\n# import shutil\n# import numpy as np\n# import argparse\n# import chainer\n# from PIL import Image\n\n# base = os.path.dirname(os.path.abspath(__file__))\n# sys.path.append(os.path.join(base, '../'))\n# from evaluation import gen_images_with_condition\n# import yaml\n# import source.yaml_u...
[ [ "numpy.arange", "numpy.random.seed" ] ]
nitbix/pylearn2
[ "e78088221fb99ce9022d5d83ccd325548447542b" ]
[ "pylearn2/scripts/plot_monitor.py" ]
[ "#!/usr/bin/env python\n\"\"\"\nusage:\n\nplot_monitor.py model_1.pkl model_2.pkl ... model_n.pkl\n\nLoads any number of .pkl files produced by train.py. Extracts\nall of their monitoring channels and prompts the user to select\na subset of them to be plotted.\n\n\"\"\"\nfrom __future__ import print_function\n\n__a...
[ [ "numpy.asarray", "matplotlib.use", "matplotlib.pyplot.savefig", "matplotlib.pyplot.subplot", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
ejolly/neighbors
[ "4638408c4ed9c6d314521e62a63be7db10dd1bf2" ]
[ "neighbors/data.py" ]
[ "\"\"\"\nIncluded datasets\n\"\"\"\n\nimport pandas as pd\nimport numpy as np\nimport pkg_resources\nfrom .utils import check_random_state\n\n__all__ = [\"load_movielens100k\", \"load_toymat\"]\n\n\ndef load_movielens100k():\n \"\"\"\n Load the MovieLens 100k dataset fetched from: https://grouplens.org/datase...
[ [ "numpy.arange", "pandas.read_csv", "pandas.DataFrame" ] ]
RezaSoleymanifar/stable-trade
[ "e7b9eb02d981249e05f9d70d3b567a53d7753b13" ]
[ "examples/basics/training.py" ]
[ "import torch\nfrom torch import nn\nfrom torch.utils.data import DataLoader\nfrom torchvision import datasets\nfrom torchvision.transforms import ToTensor, Lambda, Compose\nimport matplotlib.pyplot as plt\nfrom time import time\n\n# Download training data from open datasets.\ntraining_data = datasets.FashionMNIST(...
[ [ "torch.nn.CrossEntropyLoss", "torch.utils.data.DataLoader", "torch.nn.Flatten", "torch.nn.Linear", "torch.no_grad", "torch.cuda.is_available", "torch.nn.ReLU" ] ]
Hanjun-Dai/sdvae
[ "bd26ea949c496419634fd2cf4802fc8e19a9194c", "bd26ea949c496419634fd2cf4802fc8e19a9194c", "bd26ea949c496419634fd2cf4802fc8e19a9194c" ]
[ "mol_vae/pytorch_eval/sample_prior.py", "mol_vae/mol_decoder/mol_decoder.py", "mol_vae/mol_common/pytorch_initializer.py" ]
[ "#!/usr/bin/env python2\n\nfrom __future__ import print_function\n\nimport sys\n\nfrom joblib import Parallel, delayed\nimport numpy as np\nfrom tqdm import tqdm\nfrom rdkit import Chem\n\n# 0. Constants\nnb_latent_point = 200\nchunk_size = 100\nsample_times = 100\n\nfrom collections import Counter\n\ndef cal_valid...
[ [ "numpy.random.normal", "numpy.random.seed" ], [ "torch.div", "torch.nn.functional.torch.sum", "torch.nn.functional.torch.log", "numpy.arange", "torch.nn.GRU", "torch.sum", "torch.exp", "torch.nn.Linear", "torch.nn.functional.relu", "torch.nn.functional.binary_cr...
Mohammed20201991/Methods-for-Ai
[ "e0746631e33710d03f991b93020d5d1a7395f000" ]
[ "Cov_2x2Matrix.py" ]
[ "import numpy as np\nX= [9, 2, 5, 6, 2, 1, 5]\nY= [1, 5, 3, 6, 7, 1, 8]\nCov_matrix = np.stack((X,Y),axis= 0)\nprint(np.cov(Cov_matrix))\n" ]
[ [ "numpy.cov", "numpy.stack" ] ]
DavidBor17/Bot_NihongoNoSensei
[ "4db1a4280350bdbf8a794263e350a083fd404559" ]
[ "Scripts/Chatbot_NihongoNoBot.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n\n# Libraries \nfrom telegram.ext import Updater, CommandHandler, MessageHandler, Filters\nfrom google_trans_new import google_translator\nimport pykakasi\nimport pandas as pd\nimport random\nimport numpy as np\nimport pyodbc \nimport os\n\n# Connect database\nname = 'User...
[ [ "pandas.read_excel" ] ]
bnavigator/imagecodecs
[ "01e7bff6d2bd844f4f782fcee452be9e662b545e" ]
[ "imagecodecs/_imagecodecs.py" ]
[ "# _imagecodecs.py\n\n# Copyright (c) 2008-2021, Christoph Gohlke\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# 1. Redistributions of source code must retain the above copyright no...
[ [ "numpy.swapaxes", "numpy.take", "numpy.ascontiguousarray", "numpy.set_printoptions", "numpy.cumsum", "numpy.dtype", "numpy.bitwise_xor", "numpy.save", "numpy.frombuffer", "numpy.savez_compressed", "numpy.diff", "numpy.insert", "numpy.load", "numpy.empty", ...
LinHangzheng/ECE598_project
[ "f3e9fb1e1cb593a6accce6c1aaf15ba556250650" ]
[ "lib/actor.py" ]
[ "import os\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n# The actor model of DDPG\n# input:\n# @ input_size : int, the size of input\n# @ action_space : int, the size of the action space\n# @ hidden_size : list<int> 3x1, the size of each hidden layer \n# \nclass Actor(nn.Module):\n...
[ [ "torch.nn.Linear", "torch.nn.BatchNorm1d" ] ]
vcl-iisc/MMD-ReID
[ "420d4f0c1af6736dbeae6c90303c47ce5ff3238c" ]
[ "train_mine.py" ]
[ "from __future__ import print_function\nimport argparse\nimport sys\nimport time\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\nimport torch.backends.cudnn as cudnn\nfrom torch.autograd import Variable\nimport torch.utils.data as data\nimport torchvision\nimport ...
[ [ "torch.nn.CrossEntropyLoss", "numpy.unique", "torch.load", "torch.cat", "numpy.set_printoptions", "torch.utils.data.DataLoader", "torch.no_grad", "torch.cuda.is_available", "numpy.transpose", "numpy.zeros", "torch.save" ] ]
minhhn2910/quantized.regression
[ "e09c447a50a6a4c7dabf6176f20c931422aefd67" ]
[ "models/mobilenet_quantized.py" ]
[ "import torch\nimport torch.nn as nn\nfrom torch.nn.modules.utils import _single, _pair, _triple\nimport math\nimport torch.nn.functional as F\nfrom torch.nn.modules.utils import _pair\nimport torchvision.transforms as transforms\nfrom .modules.quantize import quantize, quantize_grad, QConv2d, QLinear, RangeBN\n__a...
[ [ "torch.nn.Sequential", "torch.nn.AvgPool2d", "torch.nn.ReLU" ] ]
TEParsons/BronzeAgeFashionDesigner
[ "7a48f84290802d3b9470dffa127550de7c2b360e" ]
[ "bafd/scenes/map/map.py" ]
[ "from pathlib import Path\nimport numpy\nimport pygame\n\nfrom bafd.sprites import map as sprites\nfrom bafd.utils.window import vsize\nfrom ... import time\nfrom . import spread\n\n__folder__ = Path(__file__).parent\n\n# Read csv of land/water tiles\nlandmap = numpy.fliplr(\n numpy.genfromtxt(__folder__ / 'land...
[ [ "numpy.random.choice", "numpy.ndarray", "numpy.genfromtxt", "numpy.nanmean", "numpy.floor", "numpy.array" ] ]
Duckie-town-isu/tulip-control
[ "07de9f85591a36e9556c612a371e9c28693156d2" ]
[ "tulip/transys/export/graph2dot.py" ]
[ "# Copyright (c) 2013-2014 by California Institute of Technology\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# 1. Redistributions of source code must retain the above copyright\...
[ [ "matplotlib.image.imread", "numpy.array", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
ggpsgeorge/Milan-Cluster
[ "485f69792b0beaf5a8cae9e6ed58d913f624015b" ]
[ "csv-sorting.py" ]
[ "import pandas as pd\n\ndef sort_csv_by_activity_date_and_activity_time(raw_csv, destFilename):\n\n data = pd.read_csv(raw_csv)[['square_id','activity_date', 'cluster', 'activity_time', 'energy']]\n data.sort_values(by=['activity_date','square_id','activity_time'], ascending=True, inplace=True)\n data.to_c...
[ [ "pandas.read_csv" ] ]
GauravHub11/Satellite-Image-Classification
[ "f30e15b41ce36afcd4da661c1a73653199fde8d5" ]
[ "WHU_RS19.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# In[45]:\n\n\nimport keras #Important Imports\nfrom keras.applications.vgg16 import VGG16\nfrom keras.layers import Input,Lambda,Dense,Flatten\nfrom keras.models import Model\nfrom keras.applications.vgg16 import preprocess_input\nfrom keras.prepro...
[ [ "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "matplotlib.pyplot.show", "matplotlib.pyplot.savefig" ] ]
np1919/DTCJ
[ "766d67dc73a0bc5ea59972c52cb9c7db81c43daf" ]
[ "dtcj/load/load_Merged.py" ]
[ "import pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n# import os\nimport dtcj\n\n\nclass Merged:\n\n '''Wrapper for Table 1; Merged\n \n Loads clean data\n Properties:\n demographic households only;\n return a table of datetime versus household ...
[ [ "pandas.read_csv", "pandas.DataFrame" ] ]
Dansato1203/VisionTutorial-python
[ "b8e5c9e733de45a59c4d2a9eb54fbbb3eeb97597" ]
[ "02_Advanced/HSV_extraction.py" ]
[ "#!/usr/bin/env python3\n#! -*- coding: utf-8 -*-\n\nimport cv2\nimport numpy as np\n\ndef green_extraction(img, hsv_img):\n \n hsv_min = np.array([30, 64, 0])\n hsv_max = np.array([90, 255, 255])\n\n img_mask = cv2.inRange(hsv_img, hsv_min, hsv_max)\n\n green_img = cv2.bitwise_and(img, img, mask = i...
[ [ "numpy.array" ] ]
anshula2/nni
[ "ec5af41fdc777f0a27168f4f03901ab72b07aaf8" ]
[ "src/sdk/pynni/nni/compression/torch/utils/mask_conflict.py" ]
[ "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT license.\nimport os\nimport logging\nimport torch\nimport numpy as np\nfrom .shape_dependency import ChannelDependency, GroupDependency, CatPaddingDependency\n# logging.basicConfig(level = logging.DEBUG)\n_logger = logging.getLogger('FixMaskConflict'...
[ [ "torch.jit.trace", "torch.ones", "torch.load", "numpy.prod", "torch.onnx.set_training", "torch.save" ] ]
gvvynplaine/pandas
[ "db6414fbea66aa59dfc0fcd0e19648fc532f7502" ]
[ "pandas/core/indexes/multi.py" ]
[ "from sys import getsizeof\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n Hashable,\n Iterable,\n List,\n Optional,\n Sequence,\n Tuple,\n Union,\n)\nimport warnings\n\nimport numpy as np\n\nfrom pandas._config import get_option\n\nfrom pandas._libs import algos as libalgo...
[ [ "pandas.Series", "numpy.asarray", "pandas._libs.lib.tuples_to_object_array", "numpy.cumsum", "numpy.dtype", "pandas.core.indexes.base.Index", "pandas.core.indexes.frozen.FrozenList", "numpy.concatenate", "pandas._config.get_option", "numpy.all", "numpy.any", "pandas...
dheeraj135/Truss_Innovate
[ "f213610e8f897fc9521007f97d8e3a632039d436" ]
[ "phase_1/hough_line.py" ]
[ "import cv2 as cv\nimport numpy as np\nimport math\nimport sys\n\nfn = \"input1.png\"\n\nsrc = cv.imread(fn)\n\n# canny edge detection and binarise\ndst = cv.Canny(src, 50, 200) \ncdst = cv.cvtColor(dst, cv.COLOR_GRAY2BGR)\n\n\n# for dilation as told by the mam.\nkernel = np.ones((5,5),np.uint8)\ncdst = cv.erode(...
[ [ "numpy.array", "numpy.ones" ] ]
SWHL/RapidVideoOCR
[ "50c13981ac0d92657ea44cbfcd954ea36ba2cf24" ]
[ "rapid_ocr/ch_ppocr_v2_det/utils.py" ]
[ "\"\"\"\n# Copyright (c) 2020 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# Un...
[ [ "numpy.round", "numpy.frombuffer", "numpy.float32", "numpy.array", "numpy.zeros" ] ]
xiexukang/speechbrain
[ "d113daac8e346eb8fc3a861d8b32faa57b42577a" ]
[ "speechbrain/lobes/models/transformer/TransformerASR.py" ]
[ "\"\"\"Transformer for ASR in the SpeechBrain sytle.\n\nAuthors\n* Jianyuan Zhong 2020\n\"\"\"\n\nimport torch # noqa 42\nfrom torch import nn\nfrom typing import Optional\n\nfrom speechbrain.nnet.linear import Linear\nfrom speechbrain.nnet.containers import ModuleList\nfrom speechbrain.lobes.models.transformer.Tr...
[ [ "torch.nn.Dropout", "torch.round", "torch.nn.init.xavier_normal_" ] ]
kabartay/km3pipe
[ "491c425486553e8986682d2b0614918dd23cc964" ]
[ "km3pipe/utils/meantots.py" ]
[ "#!/usr/bin/env python\n# coding=utf-8\n# Filename: tots.py\n\"\"\"\nConvert ROOT and EVT files to HDF5.\n\nUsage:\n meantots FILE [-p PLOT]\n meantots (-h | --help)\n\nOptions:\n -h --help Show this screen.\n -p PLOT Filename including extension [default: meantots.png].\n\n\"\"\"\nfrom __future__...
[ [ "matplotlib.pyplot.title", "matplotlib.use", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig", "pandas.DataFrame", "sklearn.mixture.GaussianMixture", "numpy.array" ] ]
bittremieux/GLEAMS
[ "b71317c06d751e16ce855281b929a8b6cf7c76e5" ]
[ "gleams/metadata/metadata.py" ]
[ "import functools\nimport itertools\nimport logging\nimport os\nimport re\nimport subprocess\nfrom typing import Iterator, List, Optional, Tuple\n\nimport joblib\nimport numba as nb\nimport numpy as np\nimport pandas as pd\nfrom spectrum_utils import spectrum as sus\nfrom spectrum_utils import utils as suu\n\n\nlog...
[ [ "pandas.read_csv", "numpy.uint32", "numpy.arange", "pandas.read_parquet", "numpy.searchsorted" ] ]
9yifanchen9/EchellePy
[ "4d9552b8abfcb2097bba802f9b71343b49f965be" ]
[ "EchellePlotter.py" ]
[ "import numpy as np\nimport pandas as pd\nfrom astropy.convolution import convolve, Box1DKernel\nimport matplotlib.pyplot as plt\nfrom matplotlib.widgets import Slider, RadioButtons, Button\nimport json\nimport tkinter\nfrom tkinter.filedialog import askopenfilename\n\n\nclass EchellePlotter:\n def __init__(self...
[ [ "numpy.sqrt", "numpy.asarray", "matplotlib.pyplot.axes", "numpy.argmin", "pandas.read_csv", "numpy.arange", "numpy.diff", "numpy.interp", "matplotlib.pyplot.subplots_adjust", "numpy.zeros", "numpy.median", "matplotlib.pyplot.savefig", "numpy.append", "numpy....
qore-dl/qore-dl-code
[ "dc60df8fd072df5c641005992630f43892b7f78e", "dc60df8fd072df5c641005992630f43892b7f78e" ]
[ "experiment code/GPU Experiments Code/nodes_mon.py", "qoredl_project/qoredl_flask/util/node_gpu_monitor.py" ]
[ "import kubernetes\nimport requests\nfrom multiprocessing import Process\nimport multiprocessing\nimport urllib\nimport urllib3\nimport time\nimport os\nimport pandas as pd\nimport argparse\naToken = 'eyJhbGciOiJSUzI1NiIsImtpZCI6IiJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3...
[ [ "pandas.DataFrame" ], [ "numpy.sum" ] ]
graeme-winter/xia2
[ "e00d688137d4ddb4b125be9a3f37ae00265886c2" ]
[ "src/xia2/cli/compare_merging_stats.py" ]
[ "import concurrent.futures\nimport functools\nimport math\nimport os\nimport sys\n\nimport iotbx.merging_statistics\nimport iotbx.phil\nimport libtbx\nfrom libtbx.introspection import number_of_processors\nfrom cctbx import uctbx\nfrom cycler import cycler\nfrom dials.util.options import OptionParser\n\nhelp_messag...
[ [ "matplotlib.pyplot.gca", "matplotlib.pyplot.legend", "matplotlib.pyplot.tight_layout", "matplotlib.use", "matplotlib.pyplot.figlegend", "matplotlib.pyplot.gcf", "matplotlib.pyplot.clf", "matplotlib.pyplot.subplot", "matplotlib.pyplot.style.use" ] ]
morgan-at-keysight/pyarbtools
[ "9e43f512a0ffe8425bedb3b4c10cc2be7528abaa" ]
[ "pyarbtools/instruments.py" ]
[ "\"\"\"\ninstruments\nAuthor: Morgan Allison, Keysight RF/uW Application Engineer\nBuilds instrument specific classes for each signal generator.\nThe classes include minimum waveform length/granularity checks, binary\nwaveform formatting, sequencer length/granularity checks, sample rate\nchecks, etc. per instrument...
[ [ "numpy.imag", "numpy.tile", "numpy.real", "numpy.array", "numpy.zeros" ] ]
RaphaelGondo/FinanceHub
[ "28c42db8f2dea9b7c351edcabce0f44a53cf1b57" ]
[ "fhmodels/NominalACM/nominalacm.py" ]
[ "import numpy as np\nimport pandas as pd\nfrom sklearn.decomposition import PCA\n\npd.options.mode.chained_assignment = None\n\n\nclass NominalACM(object):\n \"\"\"\n This class estimates term premium based on the paper 'pricing term structures with linear regressions'.\n It takes the curve vertices and ex...
[ [ "numpy.matrix", "numpy.dot", "numpy.log", "numpy.reshape", "numpy.ones", "numpy.transpose", "numpy.exp", "numpy.zeros", "sklearn.decomposition.PCA" ] ]
Edenhofer/jax
[ "a93c99d7bee56e80f04e5857d688e6976ad30131" ]
[ "jax/_src/numpy/lax_numpy.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.asarray", "numpy.issubdtype", "numpy.dtype", "numpy.concatenate", "numpy.any", "numpy.where", "numpy.arange", "numpy.uint8", "numpy.ceil", "numpy.diff", "numpy.ravel", "numpy.load", "numpy.zeros", "numpy.log", "numpy.multiply", "numpy.ndim", ...
fgiuste7/nipype
[ "f2df20951434bbd92aa07c1b64527710de1c510f" ]
[ "nipype/algorithms/misc.py" ]
[ "# -*- coding: utf-8 -*-\n# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n'''\nMiscellaneous algorithms\n'''\nfrom __future__ import (print_function, division, unicode_literals,\n absolute_import)\nfrom builtins import str, z...
[ [ "numpy.dot", "numpy.savez", "numpy.sqrt", "numpy.asarray", "numpy.squeeze", "pandas.DataFrame", "numpy.any", "numpy.random.rayleigh", "numpy.where", "pandas.read_csv", "numpy.ones_like", "numpy.eye", "numpy.atleast_1d", "numpy.load", "numpy.zeros", "...
Kirayue/MONAI
[ "700f99481c68ae8cbc19ba102921265e00cb5e05" ]
[ "monai/handlers/roc_auc.py" ]
[ "# Copyright 2020 MONAI Consortium\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable law or agreed to i...
[ [ "torch.cat" ] ]
swyang50066/algorithm-python
[ "77b88763ac2d9c01bb6b35da607ca75e9c7e9116" ]
[ "source/geometry/registration.py" ]
[ "import cv2\nimport numpy as np\nfrom numpy.linalg import solve\n\n\ndef _calcJointEntropy(x, y):\n \"\"\" Return intensity based informations\n \"\"\"\n pxy, _, _ = np.histogram2d(x, y,\n bins=128, range=[[1,255], [1,255]])\n pxy = pxy /...
[ [ "numpy.expand_dims", "numpy.ones_like", "numpy.pad", "numpy.abs", "numpy.linalg.solve", "numpy.matmul", "numpy.insert", "numpy.array", "numpy.sum", "numpy.histogram2d" ] ]
Boyiliee/PONO
[ "b9108e8bf8ba0228635532ba5bdc973b7393d045" ]
[ "pytorch-DRIT-PONO-MS/src/saver.py" ]
[ "import os\nimport torchvision\nfrom tensorboardX import SummaryWriter\nimport numpy as np\nfrom PIL import Image\n\n# tensor to PIL Image\ndef tensor2img(img):\n img = img[0].cpu().float().numpy()\n if img.shape[0] == 1:\n img = np.tile(img, (3, 1, 1))\n img = (np.transpose(img, (1, 2, 0)) + 1) / 2.0 * 255.0...
[ [ "numpy.tile", "numpy.transpose" ] ]
trix-co/trix-backend
[ "8857691965688b07c6e3db89d9345c0a156b9260" ]
[ "fawkes/protection_compute_frontloaded.py" ]
[ "# from __future__ import absolute_import\n# from __future__ import division\n# from __future__ import print_function\n\nimport argparse\nimport glob\nimport logging\nimport os\nimport sys\nimport time\n\nimport tensorflow as tf\n\nlogging.getLogger('tensorflow').disabled = True\n\nimport numpy as np\nfrom fawkes.d...
[ [ "numpy.min", "tensorflow.test.is_gpu_available", "numpy.concatenate", "numpy.max", "tensorflow.get_default_graph", "numpy.array" ] ]
Won-Ryeol/robosuite
[ "2a28f2edb5b21443f2d70644c16722b5aa83c35d" ]
[ "robosuite/models/tasks/door_task.py" ]
[ "from robosuite.utils.mjcf_utils import new_joint, array_to_string\nfrom robosuite.models.tasks import Task, UniformRandomPegsSampler\nimport numpy as np\n\nclass DoorTask(Task):\n \"\"\"\n Creates MJCF model of a door opening task.\n \n A door assembly task consists of one robot approaching a door an...
[ [ "numpy.random.uniform", "numpy.array", "numpy.cos", "numpy.sin" ] ]
jackbandy/PySyft
[ "0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b", "0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b" ]
[ "packages/syft/tests/syft/core/node/common/service/obj_search_permission_service_test.py", "tests/integration/smpc/tensor/mpc_tensor_test.py" ]
[ "# third party\n# third party\nimport torch as th\n\n# syft absolute\nimport syft as sy\nfrom syft.core.node.common.node_manager.dict_store import DictStore\nfrom syft.core.node.common.node_service.object_search_permission_update.obj_search_permission_messages import (\n ObjectSearchPermissionUpdateMessage,\n)\n...
[ [ "torch.tensor" ], [ "numpy.array" ] ]
turingtestaishni/trajectory-transformer-city-learn
[ "564cb715cc9f2a593e4d5aaff17baa60eb6f7290" ]
[ "scripts/train.py" ]
[ "import sys\nsys.path.append('/Users/aishniparab/Documents/coursework/winter_2022_coursework/cs269_deep_gen_models/project/trajectory-transformer-city-learn')\n\nimport os\nimport numpy as np\nimport torch\nimport pdb\n\nimport trajectory.utils as utils\nimport trajectory.datasets as datasets\nfrom trajectory.model...
[ [ "torch.save" ] ]
zhoulinmin/tacotron
[ "60d6932f510bf591acb25620290868900b5c0a41" ]
[ "models/helpers.py" ]
[ "import numpy as np\nimport tensorflow as tf\nfrom tensorflow.contrib.seq2seq import Helper\n\n\n# Adapted from tf.contrib.seq2seq.GreedyEmbeddingHelper\nclass TacoTestHelper(Helper):\n def __init__(self, batch_size, output_dim, r):\n with tf.name_scope('TacoTestHelper'):\n self._batch_size = batch_size\n ...
[ [ "tensorflow.convert_to_tensor", "tensorflow.TensorShape", "tensorflow.train.cosine_decay", "tensorflow.shape", "tensorflow.name_scope", "tensorflow.round", "tensorflow.random_uniform", "tensorflow.tile" ] ]
jakemsnyder/political-ideology-detection
[ "71d2c0ed736a7a9f78577d59147c3d8d65eeb4dc" ]
[ "src/clean/splitData.py" ]
[ "import pandas as pd\nimport numpy as np\nfrom nltk import PorterStemmer\n\nnp.random.seed(23)\n\ntrain = pd.read_csv('../../data/csv/model/train.csv', index_col=None)\ntest = pd.read_csv('../../data/csv/model/test.csv', index_col=None)\n\ndef makeTaxWords():\n porterStemmer = PorterStemmer()\n taxWords = [\n...
[ [ "pandas.read_csv", "numpy.random.seed" ] ]
foobarbecue/trimesh
[ "db2c649ebc577874702644248964b3295bd6ed5b" ]
[ "trimesh/scene/scene.py" ]
[ "import numpy as np\nimport collections\n\nfrom .. import util\nfrom .. import units\nfrom .. import convex\nfrom .. import caching\nfrom .. import grouping\nfrom .. import transformations\n\nfrom .. import bounds as bounds_module\n\nfrom ..io import gltf\nfrom .transforms import TransformForest\n\n\nclass Scene:\n...
[ [ "numpy.dot", "numpy.hstack", "numpy.radians", "numpy.allclose", "numpy.linalg.inv", "numpy.eye", "numpy.sort", "numpy.append", "numpy.asanyarray", "numpy.mean", "numpy.diff", "numpy.shape", "numpy.array", "numpy.zeros", "numpy.vstack", "numpy.isclose...
tsthakur/aiida-open_circuit_voltage
[ "de4bd555872b69ab9c23c675400290d96a49bc65" ]
[ "aiida_open_circuit_voltage/workflows/workchain.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nMother Workchain that calls PwRelaxWorkChain to relax experimental structures and\ncalculate DFT energies used to compute open circuit voltages (OCV) at low and high state of \ncharge (SOC) and average OCV for any arbitrary cathode material\n\"\"\"\nimport struct\nimport numpy as n...
[ [ "numpy.arange" ] ]
GabrielMusat/lazaro
[ "9879e938eb1e6da1b6974edf8ab41ece7f33063c" ]
[ "lazaro/agents/replay_buffers/tests/test_n_steps_random_replay_buffer.py" ]
[ "import numpy as np\n\nfrom . import tools\nfrom .test_random_replay_buffer import is_random\nfrom ..base.n_steps_replay_buffer import NStepsReplayBuffer\nfrom ...replay_buffers import NStepRandomReplayBufferParams, NStepsRandomReplayBuffer\nfrom ...base.models import ReplayBufferEntry\n\n\ndef is_n_step(replay_buf...
[ [ "numpy.array" ] ]
zll1996/attention-treelstm
[ "03534c2cce35387e61b016c527607ff8f92c27a9" ]
[ "trainer.py" ]
[ "from tqdm import tqdm\nimport torch\nfrom torch.autograd import Variable as Var\nfrom utils import map_label_to_target, map_label_to_target_sentiment\nimport torch.nn.functional as F\n\nclass SentimentTrainer(object):\n \"\"\"\n For Sentiment module\n \"\"\"\n def __init__(self, args, model, embedding_...
[ [ "torch.range", "torch.max", "torch.autograd.Variable" ] ]
hendraet/research-GANwriting
[ "e62a16529db3037169d9b33ecba5735c99e73bc3" ]
[ "load_data.py" ]
[ "import string\n\nimport cv2\nimport numpy as np\nimport os\nimport random\nimport torch.utils.data as D\nfrom datetime import datetime\n\nfrom pairs_idx_wid_iam import WID2LABEL_TR, WID2LABEL_TE\n\nCREATE_PAIRS = False\n\nIMG_HEIGHT = 64\nIMG_WIDTH = 216\nMAX_CHARS = 10\n# NUM_CHANNEL = 15\nNUM_CHANNEL = 50\nEXTRA...
[ [ "numpy.random.choice", "numpy.stack", "numpy.random.shuffle", "numpy.delete", "numpy.array", "numpy.zeros", "numpy.random.randint" ] ]
TeamLigers/bug-prediction
[ "a441b7425f751f7b1599547de891d8a70e83ff4c" ]
[ "src/Py2Vec_model.py" ]
[ "import json\nimport numpy as np\n\nclass Py2Vec(object):\n \"\"\"Load a Py2Vec JSON model and provide access to the vectors and vector\n space.\n Provides access to word vectors as if it were a dictionary:\n py2vec = Py2Vec('file')\n py2vec['word']\n Unrecognized words will return the Nul...
[ [ "numpy.array", "numpy.zeros", "numpy.sum", "numpy.argpartition" ] ]
HEAPLab/TAFFO-submodule-fe
[ "5c93cedde5ce179a7a25c3b0ae4205cd00cdb8b3" ]
[ "PerformanceEstimator/profile_loader.py" ]
[ "#!/usr/bin/env python3\n__doc__ = '''Load the profile data from multiple files, dump as CSV (standalone) or return Dataframe (as library)'''\nfrom subprocess import getoutput as cmd\nimport pandas as pd\nimport numpy as np\nimport os\n\n\ndef load_file(fname):\n\td = pd.read_csv(fname,sep='\\s\\s+',index_col=0, en...
[ [ "pandas.concat", "pandas.read_csv", "pandas.read_fwf", "pandas.DataFrame" ] ]
jim-obrien-orig/mlv-tools-tutorial
[ "915f052d4e0a27969832d0f2873de239e644b756" ]
[ "modify_input_data.py" ]
[ "#!/usr/bin/env python3\nimport codecs\nimport pickle\nfrom os.path import dirname, join\n\nfrom sklearn.utils import shuffle\n\ncache_path = join(dirname(__file__), 'poc', 'data', '20news-bydate_py3.pkz')\n\n\ndef shuffle_data(subset: str, cache):\n cache[subset].data, cache[subset].target, cache[subset].filena...
[ [ "sklearn.utils.shuffle" ] ]
mhconradt/polars
[ "20fd5129357e0f0afb59e9eb09ceeb7d1e8bb92b" ]
[ "py-polars/tests/test_interop.py" ]
[ "import datetime\n\nimport numpy as np\nimport pandas as pd\nimport pyarrow as pa\nimport pytest\n\nimport polars as pl\n\n\ndef test_from_pandas_datetime() -> None:\n ts = datetime.datetime(2021, 1, 1, 20, 20, 20, 20)\n pl_s = pd.Series([ts, ts])\n tmp = pl.from_pandas(pl_s.to_frame(\"a\"))\n s = tmp[\...
[ [ "pandas.to_datetime", "pandas.Series", "numpy.isnan", "pandas.DataFrame", "pandas.date_range", "numpy.array" ] ]
xyzhou-puck/Paddle
[ "600cb8c828c8f0b4945820aa6cd801b20f4613a3" ]
[ "python/paddle/fluid/tests/unittests/test_split_and_merge_lod_tensor_op.py" ]
[ "# Copyright (c) 2018 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 ...
[ [ "numpy.arange", "numpy.array", "numpy.expand_dims" ] ]
jaygambetta/qiskit-terra
[ "4f7d38a93d7d05a339b8dd2ebc2336dedc1fa178" ]
[ "qiskit/visualization/matplotlib.py" ]
[ "# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017, 2018.\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 modificatio...
[ [ "numpy.abs", "numpy.cos", "numpy.sin", "matplotlib.get_backend", "matplotlib.pyplot.figure" ] ]
patricksanders/policy_sentry
[ "c9f4752c633fe229220b7f476aa766ea65330489" ]
[ "policy_sentry/scraping/scrape.py" ]
[ "\"\"\"\nAt policy_sentry initialize time, this function is used to scrape the AWS HTML docs to build the sqlite database.\n\"\"\"\nimport logging\nimport yaml\nimport pandas\nfrom policy_sentry.shared.constants import LINKS_YML_FILE_LOCAL\n\nlogger = logging.getLogger(__name__)\n\n\ndef get_html(directory, request...
[ [ "pandas.read_html" ] ]
schilli/geopandas
[ "29add0a735b00dc20c79e0fccc8e6a775c4997b0" ]
[ "geopandas/tests/test_geodataframe.py" ]
[ "from __future__ import absolute_import\n\nimport json\nimport os\nimport tempfile\nimport shutil\n\nimport numpy as np\nimport pandas as pd\nfrom shapely.geometry import Point, Polygon\nimport fiona\n\nimport geopandas\nfrom geopandas import GeoDataFrame, read_file, GeoSeries\nfrom geopandas.array import GeometryA...
[ [ "numpy.isnan", "numpy.arange", "pandas.Index", "pandas.DataFrame", "pandas.util.testing.assert_frame_equal", "pandas.DataFrame.from_dict", "numpy.array", "pandas.read_pickle" ] ]
mayi140611/mayiutils_n1
[ "22a1178fc5d86df53fa9769145c64ef4aa8ffeff" ]
[ "mayiutils/template/data_explore.py" ]
[ "#!/usr/bin/python\n# encoding: utf-8\n\n\"\"\"\n@author: Ian\n@file: data_explore.py\n@time: 2019-09-02 11:54\n\"\"\"\nimport numpy as np\nimport sys\nsys.path.append('/Users/luoyonggui/PycharmProjects/mayiutils_n1/mayiutils/data_prepare')\nfrom date_prepare import describe\nimport pandas as pd\npd.set_option('dis...
[ [ "pandas.set_option", "pandas.DataFrame" ] ]
kamino410/edsdk-sample
[ "b08cd8b116a36e09f26358b04e385f32f0c82b4b" ]
[ "nn_warp_image/main.py" ]
[ "import numpy as np\n\nfrom sklearn.neural_network import MLPRegressor\nfrom sklearn.pipeline import make_pipeline\nfrom sklearn.preprocessing import StandardScaler\n\ndata = np.loadtxt('./c2p_dmd.csv', delimiter=',')\n\ndata_x = data[:, 0:2]\ndata_y = data[:, 2:4]\n\nmlp = make_pipeline(StandardScaler(),\n ...
[ [ "sklearn.preprocessing.StandardScaler", "numpy.loadtxt", "sklearn.neural_network.MLPRegressor" ] ]
onurbagoren/UW_SLAM
[ "dc8ae7905c6f40eb90e4ce4618eb2171e2208d0b" ]
[ "scripts/frontend/constants.py" ]
[ "import numpy as np\n\n# For plotting cones in our figures\n# cone_times_ordered = np.array([1372687222.817922, 1372687282.219970, 1372687385.219641, 1372687430.219218, 1372687570.418142, 1372687896.077008, 1372688246.475310, \n# 1372688413.886930, 1372688477.887347, 1372688594.087488, 137268...
[ [ "numpy.array" ] ]
shahhaard47/habitat-api
[ "ec1d5083ca102ee74e5e6d17b78725890b1861a2" ]
[ "habitat_baselines/config/default.py" ]
[ "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\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\nfrom typing import List, Optional, Union\n\nimport numpy as np\n\nfrom habitat import get_config as get_task_...
[ [ "numpy.deg2rad" ] ]
Z-Zheng/ever
[ "8abcbfe5540f6a0b22398868de3ef6034959460e" ]
[ "ever/api/trainer/th_ddp_trainer.py" ]
[ "import torch\nimport torch.distributed as dist\nimport torch.nn as nn\n\nfrom ever.api.trainer import trainer\nfrom ever.core.launcher import Launcher\nfrom ever.util import param_util\n\n\nclass THDDPTrainer(trainer.Trainer):\n def __init__(self, args):\n super().__init__(args)\n\n if torch.cuda....
[ [ "torch.distributed.init_process_group", "torch.cuda.set_device", "torch.nn.SyncBatchNorm.convert_sync_batchnorm", "torch.cuda.is_available", "torch.nn.parallel.DistributedDataParallel" ] ]
saulius-lipkevicius/Transformed_GA
[ "599bbcd93f7e59417586606e04945d860447b2c3" ]
[ "EFBALite/functions/computeEntropy.py" ]
[ "from simtk.openmm.app import AmberPrmtopFile, AmberInpcrdFile, Simulation, HBonds, PDBFile\nfrom simtk.openmm.openmm import LangevinMiddleIntegrator\nfrom simtk.unit import nanometer, kelvin, picosecond, picoseconds, kilojoule_per_mole, angstrom\nimport numpy as np\nfrom scipy.stats import entropy\nfrom functions ...
[ [ "numpy.exp", "numpy.array", "scipy.stats.entropy", "numpy.sum" ] ]
BaofengZan/DBNet.pytorch
[ "0f18ebb240ea3394f7e461aca34fac158e686d95" ]
[ "tools/predict.py" ]
[ "# -*- coding: utf-8 -*-\n# @Time : 2019/8/24 12:06\n# @Author : zhoujun\n\nimport os\nimport sys\nimport pathlib\nimport struct\n__dir__ = pathlib.Path(os.path.abspath(__file__))\nsys.path.append(str(__dir__))\nsys.path.append(str(__dir__.parent.parent))\n\n# project = 'DBNet.pytorch' # 工作项目根目录\n# sys.path.ap...
[ [ "torch.onnx.export", "torch.cuda.synchronize", "torch.jit.trace", "torch.load", "torch.zeros", "torch.no_grad", "torch.cuda.is_available", "torch.device", "matplotlib.pyplot.show" ] ]
matte1/Thesis
[ "c693558a9a6ee840f2b260efb2a6b67870e889d1" ]
[ "Figures/activation_functions.py" ]
[ "from matplotlib import pyplot as plt\nimport numpy as np\nimport math\n\ndef relu(x):\n return max(0, x)\n\ndef tanh(x):\n return (math.exp(x) - math.exp(-x)) / (math.exp(x) + math.exp(-x))\n\ndef sigmoid(x):\n return 1./(1. + math.exp(-x))\n\nx = np.linspace(-10,10,1e3, dtype=float)\n\nplt.plot(x, np.arr...
[ [ "matplotlib.pyplot.legend", "numpy.linspace", "matplotlib.pyplot.savefig", "matplotlib.pyplot.clf", "numpy.random.randn", "matplotlib.pyplot.grid" ] ]
Gokkulnath/vision
[ "7b60f4db9707d7afdbb87fd4e8ef6906ca014720" ]
[ "torchvision/models/detection/transform.py" ]
[ "import random\nimport math\nimport torch\nfrom torch import nn, Tensor\nimport torchvision\nfrom torch.jit.annotations import List, Tuple, Dict, Optional\n\nfrom torchvision.ops import misc as misc_nn_ops\nfrom .image_list import ImageList\nfrom .roi_heads import paste_masks_in_image\n\n\nclass GeneralizedRCNNTran...
[ [ "torch._C._get_tracing_state", "torch.max", "torch.empty", "torch.min", "torch.tensor", "torch.jit.annotate", "torch.nn.functional.interpolate", "torch.stack", "torch.nn.functional.pad", "torch.as_tensor" ] ]
christobal54/aei-grad-school
[ "ea5be566d810ca9d792625b2e97acd2065c9d09a" ]
[ "projects/mosquito/mosquito-plot-histograms-pca-1km.py" ]
[ "#!/usr/bin/python\n#####\n# plots distributions of predictor variables \n#####\n\nimport aei\nimport gdal\nimport pickle\nimport pandas as pd\nimport numpy as np\nfrom sklearn import tree\nfrom sklearn import ensemble\nfrom sklearn import svm\nfrom sklearn import linear_model\nfrom sklearn import metrics\nfrom skl...
[ [ "matplotlib.pyplot.legend", "sklearn.metrics.roc_auc_score", "sklearn.metrics.confusion_matrix", "pandas.DataFrame", "sklearn.metrics.precision_recall_fscore_support", "numpy.zeros_like", "sklearn.metrics.classification_report", "numpy.where", "sklearn.preprocessing.MinMaxScale...
borescht/HoQuNM
[ "89aad7fd76fc9d0048d2dffa61e09258c00f6fa5" ]
[ "hoqunm/simulation/hospital.py" ]
[ "\"\"\"Classes for a hospital-like queueing model. Classes are build like their\nreal counterparts.\n\nAssociate wards 0,...,N-1 as the N wards. Ward N is the outside.\n\nUse SimPy: https://simpy.readthedocs.io/en/latest/.\nThis is a simulation oriented module for implementing\nalso queueing networks. The advantage...
[ [ "numpy.random.random", "numpy.ndindex", "numpy.random.choice", "numpy.arange", "numpy.zeros_like", "numpy.any", "numpy.ndenumerate", "numpy.array", "numpy.zeros", "numpy.random.randint" ] ]
pasztorlacos/Lean
[ "ca204c07d9bb390f853eb2f3da0ebc08150fef36", "ca204c07d9bb390f853eb2f3da0ebc08150fef36" ]
[ "Algorithm.Python/PL_Stat7_fx/ta1.py", "Algorithm.Python/PL_Stat6_fx/hp3.py" ]
[ "### <summary>\n### Technical Analysis \n### \n### </summary>\nfrom QuantConnect.Orders import *\nfrom QuantConnect.Orders.Fills import *\nfrom QuantConnect.Orders.Fees import *\nfrom QuantConnect.Data.Market import TradeBar\n\n#import math\n#import random\nimport numpy as np\nfrom datetime import datetime, timedel...
[ [ "numpy.arange" ], [ "tensorflow.keras.models.load_model", "tensorflow.Graph", "pandas.read_csv", "tensorflow.keras.backend.set_session", "torch.load", "numpy.asarray", "numpy.reshape", "pandas.DataFrame", "tensorflow.ConfigProto", "numpy.argmax", "tensorflow.ker...
dennischenfeng/kaggle-ubiquant
[ "75e7e2d6e15568ae01b9f73c757858e08e39b324" ]
[ "tests/test_train.py" ]
[ "\"\"\"\nUnit tests for train.py\n\"\"\"\n\nimport pytest\nimport pandas as pd\nimport wandb\nfrom xgboost import XGBClassifier\nfrom kaggle_ubiquant.dataset import generate_dataset, compute_lag1, DatasetConfig\nfrom kaggle_ubiquant.model import ModelConfig, generate_model\nfrom kaggle_ubiquant.train import trainin...
[ [ "numpy.array", "pandas.read_csv", "pandas.unique", "numpy.testing.assert_allclose" ] ]
YujunLiao/solo
[ "e6b4d0e79bb9f43e9abd93d4372954406ef07a54" ]
[ "lyj/1.py" ]
[ "import torch\nimport numpy as np\n\ndata = torch.rand([100, 427, 640])\nx = data[0, ...]\ny = np.array(x[:, :, np.newaxis], order='F')\n\n\n\n\nground_truth_binary_mask = np.array([[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n [ 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ [ "numpy.asfortranarray", "numpy.array", "torch.rand" ] ]
lfranceschetti/lymph
[ "d7fc8c0709316fb1b055487f6c3c2165d889974a" ]
[ "lymph/utils.py" ]
[ "from __future__ import annotations\n\nimport json\nimport warnings\nfrom pathlib import Path\nfrom typing import Any, Dict, List, Optional, Tuple, Union\n\nimport emcee\nimport h5py\nimport numpy as np\nimport pandas as pd\nfrom scipy.special import factorial as fact\n\nimport lymph\n\n\ndef lyprox_to_lymph(\n ...
[ [ "numpy.abs", "numpy.random.choice", "numpy.isnan", "numpy.arange", "numpy.sort", "numpy.ones", "numpy.all", "numpy.mean", "numpy.any", "pandas.HDFStore", "scipy.special.factorial", "numpy.random.uniform", "numpy.roll", "numpy.zeros", "numpy.sum" ] ]
Czaki/nme
[ "969f8566e1717c988fb07f5cf3285b0574bacbbc" ]
[ "src/tests/test_json_hooks.py" ]
[ "# pylint: disable=R0201\n\nimport json\nfrom enum import Enum\nfrom pathlib import Path\n\nimport numpy as np\nimport pytest\nfrom napari.utils import Colormap\nfrom napari.utils.notifications import NotificationSeverity\nfrom pydantic import BaseModel, Extra, dataclasses\n\nfrom nme import NMEEncoder, nme_object_...
[ [ "numpy.array_equal", "numpy.arange", "numpy.int16", "numpy.float32", "numpy.isclose" ] ]
lucasiervolino/Machine-Learning-Repo
[ "06cdba478448e13f91a950d8ace6c0cc4fa5a797" ]
[ "Dict Auto Encoder.py" ]
[ "### LabelEncoder dict structure to apply to labeled dataframes\r\n\r\nimport pandas as pd\r\nimport numpy as np\r\nfrom collections import defaultdict\r\nfrom sklearn.preprocessing import LabelEncoder\r\n\r\n#reads both datasets\r\ndataset_train = pd.read_csv(path_train)\r\ndataset_test = pd.read_csv(path_test)\r\...
[ [ "pandas.concat", "pandas.read_csv" ] ]
kabicm/conflux
[ "386394e53bbf63f939353fd5393e0bdaf5db5f79" ]
[ "python/pivoting.py" ]
[ "import numpy as np\n#from mpi4py import MPI\n#import mpi4py\nfrom reference_lu import *\nfrom utils import *\nimport math\n\ndebugK = 200\ndebugNumPivots = False\n\ndef flipbit(n, k):\n return n ^ (1 << k)\n\n\n# empty pivoting strategy.\n# in step k, k-th rank chooses his first v rows as pivots\ndef EmptyPivot...
[ [ "numpy.log2", "numpy.nonzero", "numpy.size", "numpy.copy", "numpy.zeros" ] ]
FAndersson/polynomials_on_simplices
[ "f015a4772c817bfa99b0d6b726667a38a174b064" ]
[ "polynomials_on_simplices/algebra/test/multiindex_test.py" ]
[ "import math\nimport unittest\n\nimport numpy as np\nfrom scipy.special import binom\n\nimport polynomials_on_simplices.algebra.multiindex as multiindex\n\n\nclass MultiIndexTest(unittest.TestCase):\n def test_init(self):\n a = multiindex.MultiIndex(1, 2, 3)\n b = multiindex.MultiIndex([1, 2, 3])\n...
[ [ "scipy.special.binom", "numpy.array" ] ]
joaopfonseca/remote_sensing
[ "1c3704e2ea4de6ec803e6b42a1557660768ab03b" ]
[ "pipelines/pre_feature_selection.py" ]
[ "\n################################################################################\n## Imports and configurations\n\nimport sys\nimport os\nPROJ_PATH = '.'\n#PROJ_PATH = os.path.realpath(os.path.join(os.path.dirname(__file__), '../../'))\n#sys.path.append(PROJ_PATH)\n\nimport pandas as pd\nimport numpy as np\n\nfr...
[ [ "pandas.concat", "pandas.read_csv", "pandas.Series", "sklearn.ensemble.RandomForestClassifier", "sklearn.model_selection.train_test_split", "pandas.DataFrame", "sklearn.preprocessing.StandardScaler", "sklearn.feature_selection.SelectFromModel", "numpy.array" ] ]
johngoeltz/pdf2chem
[ "a9936823ff48d031380186d40684dbfd5511bc8d" ]
[ "pdf2chem.py" ]
[ "# Imports\nimport chemdataextractor as cde\n\nimport cirpy\nimport time\n\nimport sys\nimport re\nimport pandas as pd\nimport os\nimport textract\nfrom datetime import datetime\n\n# future work - a choice for whether to query 3-letter words\n# if curation_type == \"Regular (ignores 3-letter words)\":\n# regex_...
[ [ "pandas.read_csv", "pandas.DataFrame" ] ]
henrysky/Galaxy10
[ "fe47484ad1bcaf57024cf1199237d5075ae32a72" ]
[ "downloader_gzdes_c_des_dr8.py" ]
[ "import urllib.request\nimport numpy as np\nfrom multiprocessing.dummy import Pool as ThreadPool\nimport multiprocessing\nimport os\nimport subprocess\nfrom functools import partial\n\n\nscale = 0.262\nheight = 512\nwidth = 512\n\niamge_dir = 'jpg_c/'\ndata_table = 'gz_decals_volunteers_c.csv'\n\ndef images_url(RA,...
[ [ "numpy.genfromtxt" ] ]
gorsnehal/RoboND-Term1-P1-SearchAndSample
[ "08721a9c255c7f8320d6874becd572bac94fd046" ]
[ "code/drive_rover.py" ]
[ "# Do the necessary imports\nimport argparse\nimport shutil\nimport base64\nfrom datetime import datetime\nimport os\nimport cv2\nimport numpy as np\nimport socketio\nimport eventlet\nimport eventlet.wsgi\nfrom PIL import Image\nfrom flask import Flask\nfrom io import BytesIO, StringIO\nimport json\nimport pickle\n...
[ [ "matplotlib.image.imread", "numpy.isfinite", "numpy.zeros", "numpy.dstack" ] ]
Santhu15rsk/C110-Class-Document
[ "60d33447253caf911db43454f1f902d9ac331fee" ]
[ "main copy 5.py" ]
[ "import plotly.figure_factory as ff\nimport plotly.graph_objects as go\nimport statistics\nimport random\nimport pandas as pd\nimport csv\n\ndf = pd.read_csv(\"data.csv\")\ndata = df[\"temp\"].tolist()\n\ndef random_set_of_mean(counter):\n dataset = []\n for i in range(0, counter):\n random_index= rand...
[ [ "pandas.read_csv" ] ]
tamtemza/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10_
[ "f31b0d5f7022128dc5af791a11b242e009492bca" ]
[ "Object_detection_webcam.py" ]
[ "######## Webcam Object Detection Using Tensorflow-trained Classifier #########\r\n#\r\n# Author: Evan Juras\r\n# Date: 1/20/18\r\n# Description: \r\n# This program uses a TensorFlow-trained classifier to perform object detection.\r\n# It loads the classifier and uses it to perform object detection on a webcam feed...
[ [ "tensorflow.Graph", "numpy.expand_dims", "tensorflow.import_graph_def", "tensorflow.gfile.GFile", "numpy.squeeze", "tensorflow.Session", "tensorflow.GraphDef" ] ]
gavehan/openTSNE
[ "96f177169519f5fae7db840bcb28dc54dbe49676" ]
[ "tests/test_affinities.py" ]
[ "import logging\nimport unittest\nfrom functools import partial\n\nimport numpy as np\nfrom scipy.spatial.distance import squareform, pdist\nfrom sklearn import datasets\nfrom sklearn.model_selection import train_test_split\n\nfrom bigtsne import affinity, nearest_neighbors\n\naffinity.log.setLevel(logging.ERROR)\n...
[ [ "numpy.testing.assert_equal", "sklearn.datasets.load_iris", "sklearn.model_selection.train_test_split", "numpy.ones", "numpy.testing.assert_array_equal", "numpy.random.normal", "scipy.spatial.distance.pdist", "numpy.testing.assert_allclose", "numpy.sum" ] ]
ccliu2/mmf
[ "1d7b32a4202d26f9049d445b4ee9095b0e1a80de" ]
[ "mmf/models/unit/unit.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates.\n\nimport logging\nfrom copy import deepcopy\nfrom typing import Dict\n\nimport torch\nfrom mmf.common.registry import registry\nfrom mmf.models import BaseModel\nfrom mmf.models.unit.unit_base_model import (\n MLP,\n AttributeHead,\n UniTBaseModel,\n ...
[ [ "torch.nn.Dropout", "torch.ones", "torch.zeros", "torch.cat", "torch.load", "torch.nn.ModuleDict", "torch.nn.Embedding", "torch.nn.Linear", "torch.nn.Identity", "torch.hub.load_state_dict_from_url" ] ]
gallardovsky/rna_python
[ "6fd8f190212479542529cfa9d35f3784db574d2c" ]
[ "rna.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\n@author: fpena\n\"\"\"\n\nimport numpy as np\nimport random as rm\nimport time as t\nimport matplotlib.pyplot as plt\nimport warnings\n\nfrom funtions import *\n\n'ANN type=feedforward/backpropagation online'\n'version 2.2.1'\n'nx = # vectores de entrada'\n'...
[ [ "numpy.ones", "numpy.random.rand", "numpy.savetxt", "numpy.zeros", "numpy.loadtxt" ] ]
addtt/multi-object-datasets
[ "d3b03ec56a9e971fed4d3519e8bfee5ed02ed9cb", "d3b03ec56a9e971fed4d3519e8bfee5ed02ed9cb" ]
[ "demo_vae.py", "multiobject/base.py" ]
[ "import argparse\nimport os\n\nimport torch\nimport torch.nn.functional as F\nfrom torch import nn\nfrom torch.optim.adamax import Adamax\nfrom torchvision.utils import save_image\n\nfrom multiobject.pytorch import MultiObjectDataLoader, MultiObjectDataset\n\nepochs = 100\nbatch_size = 64\nlr = 3e-4\ndataset_filena...
[ [ "torch.randn_like", "torch.nn.Dropout2d", "torch.nn.ConvTranspose2d", "torch.nn.Conv2d", "torch.nn.Sigmoid", "torch.nn.functional.binary_cross_entropy", "torch.nn.LeakyReLU", "torch.cuda.is_available", "torch.nn.BatchNorm2d", "torch.chunk", "torch.no_grad" ], [ ...
wangyuhan95/qml
[ "6460c86b2f3a0562feb885c2fb95f7adec0ad7a4" ]
[ "implementations/tutorial_qaoa_maxcut.py" ]
[ "\"\"\"\n.. _qaoa_maxcut:\n\nQAOA for MaxCut\n===============\n\"\"\"\n##############################################################################\n# In this tutorial we implement the quantum approximate optimization algorithm (QAOA) for the MaxCut\n# problem as proposed by `Farhi, Goldstone, and Gutmann (2014) ...
[ [ "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.title", "matplotlib.pyplot.subplots", "matplotlib.pyplot.subplot", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.xticks", "matplotlib.pyplot.show", "matplotlib.pyplot.hist", "matplotlib.pyplot.ylabel" ] ]