repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
KorlaMarch/simple_rl
[ "4b90fd2f877ae8a56b3be4a3f273743e3d8fb00c" ]
[ "simple_rl/mdp/StateClass.py" ]
[ "# Python imports\nimport numpy as np\n\n''' StateClass.py: Contains the State Class. '''\n\nclass State(object):\n ''' Abstract State class '''\n\n def __init__(self, data=[], is_terminal=False):\n self.data = data\n self._is_terminal = is_terminal\n\n def features(self):\n '''\n ...
[ [ "numpy.array" ] ]
marcelo-santos-12/APP_WEB_CANCER_CLASSIFICATION
[ "11f9ae79af526964c611aa10c071bbfa4b9d0626" ]
[ "classifiers/utils/get_data.py" ]
[ "try:\n import os\n import pandas as pd\n from wget import download\n from zipfile import ZipFile\n from glob import iglob\n from tqdm import tqdm\n from numpy import array, transpose\n \nexcept Exception as e:\n print(e)\n raise Exception('Alguns módulos não foram instalados...')\n\nd...
[ [ "numpy.array", "pandas.concat", "pandas.DataFrame", "numpy.transpose", "pandas.Series", "pandas.read_csv" ] ]
isuruf/boxtree.fmm3d
[ "2af6580b08c536197f94ce01d2af5f3f3dd4a341" ]
[ "boxtree/fmm3d/treeinfo.py" ]
[ "import numpy as np\nfrom boxtree.fmm3d.fortran import pts_tree_sort\nfrom collections import deque\n\n_child_mapping = [1, 5, 3, 7, 2, 6, 4, 8]\n_child_mapping_inv = [0, 4, 2, 6, 1, 5, 3, 7]\n\n\ndef _get_child_number(dirs):\n # https://github.com/flatironinstitute/FMM3D/blob/6e3add2a8fb7cfc2b6b723975ff36f2adea...
[ [ "numpy.zeros_like", "numpy.array", "numpy.count_nonzero", "numpy.zeros", "numpy.ones", "numpy.asfortranarray", "numpy.nonzero", "numpy.arange", "numpy.abs", "numpy.append" ] ]
ocefpaf/system-test
[ "9e435524b96dcdcb7a2e5dccb8be8ead0f35a547" ]
[ "Theme_2_Extreme_Events/Scenario_2D/USGS_Gauges/Rapid_Deploy_Gauges.py" ]
[ "\n# coding: utf-8\n\n# ># IOOS System Test: Rapid Deployment gages from USGS\n# \n# ###Can we obtain water level data from the rapid deployment gages, deployment for Hurricane Irene? \n# This notebook is based on IOOS System Test: Inundation\n# \n# #### Methodology:\n# \n# * USGS gage data (ASCII Text Files) obtai...
[ [ "numpy.array", "pandas.DataFrame", "matplotlib.dates.DateFormatter", "matplotlib.pyplot.subplots", "numpy.argmax" ] ]
sjoudaki/CosmoJBD
[ "3c1d029b74034b92cb2974de15e4c18637a5277e" ]
[ "python/getdist/types.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import print_function\nimport decimal\nimport os\nfrom io import BytesIO\nimport numpy as np\nfrom getdist import paramnames\nimport six\nimport tempfile\n\n\nclass TextFile(object):\n def __init__(self, lines=None):\n if isinstance(lines, six.strin...
[ [ "numpy.sqrt" ] ]
katysav/transformers
[ "1173903eac4d9a51848766a8e7b3d85938d2a797" ]
[ "src/transformers/data/processors/glue.py" ]
[ "# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.\n# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may...
[ [ "tensorflow.data.experimental.cardinality", "tensorflow.TensorShape" ] ]
Jerome-Cong/PPO-PyTorch
[ "3c2ad0e779603a5acadcec6b45a7fdb27a0b2d63" ]
[ "warehouse/warehouse.py" ]
[ "'''\nfrom environments.warehouse.item import Item\nfrom environments.warehouse.robot import Robot\nfrom environments.warehouse.utils import *\n'''\nfrom warehouse.item import Item\nfrom warehouse.robot import Robot\nfrom warehouse.utils import *\nimport torch\nimport numpy as np\nimport copy\nimport random\nfrom g...
[ [ "numpy.zeros", "numpy.random.seed", "numpy.copy", "matplotlib.pyplot.subplots", "numpy.random.uniform", "numpy.arange", "matplotlib.pyplot.draw", "matplotlib.pyplot.pause", "numpy.append", "matplotlib.patches.Rectangle" ] ]
Erdos1729/text-classification-ml
[ "87a5342d7075319c2bbde189ce562162fa951800" ]
[ "code_files/download_reuters.py" ]
[ "import warnings\nwarnings.filterwarnings(\"ignore\")\n\nfrom keras.datasets import reuters\nimport pandas as pd\nimport os\nimport numpy as np\n\nindex = reuters.get_word_index(path=\"reuters_word_index.json\")\nprint(\"Please find the word index below\")\nprint(\"\\n\", index)\n\nprint(\"\\nDownloading Reuters da...
[ [ "pandas.DataFrame" ] ]
RajeevAtla/tensorflow
[ "c105190702f616457ed613479d7b6a8a3937a80c" ]
[ "tensorflow/python/autograph/pyct/cfg_test.py" ]
[ "# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.platform.test.main", "tensorflow.python.autograph.pyct.parser.parse_entity", "tensorflow.python.autograph.pyct.cfg.build" ] ]
landuber/agents
[ "4111e05a23d9bd6e85ff83e7e34b1e1529f778e2" ]
[ "tf_agents/agents/dqn/dqn_agent.py" ]
[ "# coding=utf-8\n# Copyright 2018 The TF-Agents Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b...
[ [ "tensorflow.compat.v2.summary.scalar", "tensorflow.compat.v1.losses.huber_loss", "tensorflow.debugging.check_numerics", "tensorflow.GradientTape", "tensorflow.argmax", "tensorflow.nest.flatten", "tensorflow.compat.v1.losses.mean_squared_error", "tensorflow.nest.map_structure", ...
GavinGuan95/Punctuator.Pytorch
[ "65956fac30d74c537577b35cb9b95d2cf0505dfa" ]
[ "data/utils.py" ]
[ "from __future__ import print_function\n\nimport fnmatch\nimport io\nimport os\nfrom tqdm import tqdm\nimport subprocess\nimport torch.distributed as dist\n\n\ndef create_manifest(data_path, output_path, min_duration=None, max_duration=None):\n file_paths = [os.path.join(dirpath, f)\n for dirpat...
[ [ "torch.distributed.all_reduce" ] ]
ml4ai/delphi
[ "9294d2d491f10c297c84f1cd5fdc9b55b6f866d9" ]
[ "scripts/modeling_efforts.py" ]
[ "import delphi.plotter as dp\nfrom delphi.cpp.DelphiPython import AnalysisGraph, InitialBeta, InitialDerivative\nimport pandas as pd\nimport numpy as np\n\ndf_temp = pd.read_csv('../data/mini_use_case/TerraClimateOromiaMonthlyMaxTemp.csv')\ntemperature = df_temp['(deg C) Max Temperature (TerraClimate) at State, 195...
[ [ "numpy.median", "numpy.std", "pandas.read_csv" ] ]
maguelo/dtools
[ "21926c8bdddcff33ed27000869f31b819f221d50" ]
[ "test/test_datamirror.py" ]
[ "import unittest\nfrom threading import Event\nfrom dtools.datamirror import DatasetMirror\nimport pandas as pd\n\nclass TestDataMirror(unittest.TestCase):\n\n def setUp(self):\n self.datamirror = DatasetMirror()\n \n def test_class_empty(self):\n \"\"\"Test class no params\"\"\"\n ...
[ [ "pandas.DataFrame" ] ]
uprush/cartpole-rl-remote
[ "7111c9752cb663c1ef7a3815bd7c9f3c2d199ab9" ]
[ "cartpole/metrics/callbacks/visdom.py" ]
[ "# -*- coding: utf-8 -*-\n# vim: tabstop=4 shiftwidth=4 softtabstop=4\n\nimport numpy as np\n\nfrom .callback import SummaryCallback\n\nfrom cartpole.metrics import get_visdom_conn\n\n\nclass VisdomCallback(SummaryCallback):\n\n def __init__(self, **conf):\n super(VisdomCallback, self).__init__(**conf)\n ...
[ [ "numpy.column_stack" ] ]
saurav2608/pandas
[ "b90f9db6d23f64b0ce9ff469445e1c31013a07c0" ]
[ "pandas/tests/test_multilevel.py" ]
[ "# -*- coding: utf-8 -*-\nimport datetime\nfrom io import StringIO\nimport itertools\nfrom itertools import product\nfrom warnings import catch_warnings, simplefilter\n\nimport numpy as np\nfrom numpy.random import randn\nimport pytest\nimport pytz\n\nfrom pandas.compat import lrange, lzip\n\nfrom pandas.core.dtype...
[ [ "numpy.random.rand", "pandas.DatetimeIndex", "numpy.tile", "pandas.Timestamp", "pandas.core.index.MultiIndex.from_tuples", "pandas.core.dtypes.common.is_float_dtype", "pandas.concat", "numpy.random.random", "pandas.core.index.MultiIndex", "pandas.compat.lzip", "pandas.p...
MCFpy/mcf
[ "dac9056ed63620e3225903582d50e89af87b6896" ]
[ "mcf/mcf_gate_functions.py" ]
[ "\"\"\"\nProcedures needed for GATEs estimation.\n\nCreated on Thu Dec 8 15:48:57 2020.\n\n@author: MLechner\n\n# -*- coding: utf-8 -*-\n\"\"\"\nimport copy\nimport os\nfrom concurrent import futures\nimport itertools\nimport numpy as np\nimport pandas as pd\nimport scipy.stats as sct\nimport matplotlib.pyplot as ...
[ [ "numpy.quantile", "numpy.isclose", "numpy.load", "numpy.mean", "numpy.size", "pandas.read_csv", "numpy.concatenate", "numpy.zeros_like", "numpy.empty", "pandas.DataFrame", "matplotlib.pyplot.subplots", "numpy.save", "numpy.arange", "numpy.around", "numpy...
aasensio/pyAndres
[ "e952ded9aba145a6d87afec071e0fb44a3131750" ]
[ "prof.py" ]
[ "__all__ = ['prof4']\nimport pyfits as pf\nimport numpy as np\nimport matplotlib.pyplot as pl\nimport sys\nimport scipy.io\n\nclass prof4(object):\n\tdef __init__(self, fileIn):\n\t\tself.currentFile = fileIn\n\t\tself.readData()\n\t\tself.currentPos = [0,0]\n\t\t\n# Plot with integrated maps\n\t\tself.figFixedMaps...
[ [ "numpy.max", "numpy.asarray", "matplotlib.pyplot.close", "matplotlib.pyplot.figure" ] ]
xwkgch/IsoTensor
[ "b08e9753d50f082023d4f516361bc666ee359223" ]
[ "model/hamiltonian.py" ]
[ "import torch\nimport numpy as np\nfrom numpy import linalg as LA\nfrom scipy import integrate\nimport math\n\nclass Hamiltonian(object):\n r\"\"\"Constructing 1D Hamiltonian of various models.\n Args:\n model (str): name of models ('Ising', Heisenberg 'XY', Heisenberg 'XXZ', 'Potts')\n device (...
[ [ "numpy.sin", "numpy.log", "torch.einsum", "torch.eye", "torch.tensor", "numpy.cos" ] ]
mavahedinia/mianmaayeh
[ "9be6bbb4192f6c7a7f531718229a18091f8de251" ]
[ "run_verification.py" ]
[ "import math\nfrom copy import deepcopy\nfrom pathlib import Path\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport seaborn as sns\n\nfrom miyanmaayeh.runner import Runner\n\nPLOT_DIR = \"verification/\"\nPath(PLOT_DIR).mkdir(parents=True, exist_ok=True)\n\nNUM_RUNS = 5\nITERS = 500\n\n\ndef generate_p...
[ [ "matplotlib.pyplot.savefig", "matplotlib.pyplot.close", "matplotlib.pyplot.subplots", "matplotlib.pyplot.figure", "numpy.polyfit", "numpy.poly1d" ] ]
aditya-giri/qiskit-aer
[ "4a82bab1d5329730bf5ebecfcaf1d24441d95ae9" ]
[ "test/terra/reference/ref_1q_clifford.py" ]
[ "# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2018, 2019.\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.array", "numpy.diag", "numpy.sqrt", "numpy.eye" ] ]
rklaic/plantcv
[ "7548d308645edba2b347c16cb62922dddbca7ab8" ]
[ "plantcv/analyze_bound_vertical.py" ]
[ "# User-Input Boundary Line\n\nimport cv2\nimport numpy as np\nfrom . import print_image\nfrom . import plot_image\n\n\ndef analyze_bound_vertical(img, obj, mask, line_position, device, debug=None, filename=False):\n \"\"\"User-input boundary line tool\n\n Inputs:\n img = image\n obj ...
[ [ "numpy.zeros", "numpy.copy", "numpy.nonzero", "numpy.shape", "numpy.transpose", "numpy.vstack" ] ]
perellonieto/background_check
[ "7da967bad4a6d8cbc924b5301041f3c99ba39595" ]
[ "cwc/visualization/heatmaps.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib.colors import LinearSegmentedColormap\n\ncm_ra = {'red': ((0.0, 1.0, 1.0),\n (1.0, 1.0, 1.0)),\n 'green': ((0.0, 1.0, 1.0),\n (1.0, 0.0, 0.0)),\n 'blue': ((0.0, 1.0, 1.0),\n (1.0, 0....
[ [ "matplotlib.colors.LinearSegmentedColormap", "matplotlib.pyplot.ylim", "numpy.sqrt" ] ]
pangfumin/variational-autoencoder
[ "c6952b5621be844087a08b011a05640f9b9de362" ]
[ "input_data.py" ]
[ "\"\"\"Functions for downloading and reading MNIST data.\"\"\"\nimport gzip\nimport os\nimport urllib\nimport numpy\nimport shutil\nimport tempfile\nimport urllib.request\n\nSOURCE_URL = 'http://yann.lecun.com/exdb/mnist/'\n\n\ndef maybe_download(filename, work_directory):\n \"\"\"Download the data from Yann's w...
[ [ "numpy.zeros", "numpy.random.shuffle", "numpy.multiply", "numpy.arange", "numpy.frombuffer", "numpy.dtype" ] ]
saketkc/rna-seq-snakemake
[ "a912cbaaa5102b94c0ba515e437682005565faea" ]
[ "scripts/fix_kallisto_output.py" ]
[ "import sys\nimport os\nimport pandas as pd\n\ndef main(filepath, fileout=None):\n if not fileout:\n fname, ext = os.path.splitext(filepath)\n fileout = fname+'_txid' + '.' + ext\n df = pd.read_table(filepath)\n df['target_id'] = df['target_id'].str.split('|').str.get(0)\n df.to_csv(fileou...
[ [ "pandas.read_table" ] ]
armerg/ca1_muscarinic_modulation
[ "c67f53fa6a04a31b11b12956d94bb2e3e147e439" ]
[ "m1_model_results.py" ]
[ "import datetime as dat\nimport frequency_analysis as fan\nimport ca1_pyramidal as ca1p\nimport config_utils as conf\nimport numpy as np\nimport os\nimport pandas as pd\nimport pickle\nimport plot_results as plt_res\nimport time\n\nfrom scipy import integrate as scin\nfrom scipy import optimize as spopt\nfrom neuro...
[ [ "scipy.integrate.trapz", "numpy.exp", "numpy.min", "numpy.mean", "numpy.where", "numpy.linalg.lstsq", "numpy.logspace", "numpy.max", "numpy.nonzero", "numpy.arange", "numpy.argmax", "numpy.log10", "numpy.vstack", "numpy.array", "numpy.zeros", "numpy....
dey4ss/masters_thesis
[ "23c671a50ef2731397b08b1a232ad40f617fe700" ]
[ "scripts/compare_benchmarks.py" ]
[ "#!/usr/bin/env python3\n\nimport json\nimport math\nimport numpy as np\nimport re\nimport sys\nfrom terminaltables import AsciiTable\nfrom termcolor import colored\nfrom scipy.stats import ttest_ind\n\np_value_significance_threshold = 0.001\nmin_iterations = 10\nmin_runtime_ns = 59 * 1000 * 1000 * 1000\nmin_iterat...
[ [ "numpy.array", "scipy.stats.ttest_ind", "numpy.mean" ] ]
Ljferrer/SimSent
[ "78b399c55a936471b7d712387106769a16336b17" ]
[ "SimSent/indexer/deploy_handler.py" ]
[ "import os.path as p\nfrom time import sleep\nfrom pathlib import Path\nfrom typing import Dict, List, Tuple, Union\nfrom multiprocessing import Pipe, Process, Queue\n\nimport faiss\nimport numpy as np\n\nfrom SimSent.indexer.faiss_cache import faiss_cache\nfrom SimSent.indexer.base_handler import BaseIndexHandler\...
[ [ "numpy.reshape" ] ]
CelineWang1027/PSGAN
[ "33f246c8b4cf616929c01963476eb0d3f9d57132" ]
[ "faceutils/dlibutils/main.py" ]
[ "#!/usr/bin/python\n# -*- encoding: utf-8 -*-\nimport os.path as osp\n\nimport numpy as np\nfrom PIL import Image\nimport dlib\nimport cv2\nfrom concern.image import resize_by_max\n\ndetector = dlib.get_frontal_face_detector()\npredictor = dlib.shape_predictor(osp.split(osp.realpath(__file__))[0] + '/lms.dat')\n\n\...
[ [ "numpy.array", "numpy.asarray" ] ]
thaihungle/SAM
[ "aa6342d0c62b2ac0f3e916caeed435c253ccb3f5" ]
[ "baselines/sam/utils.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.optim as optim\nfrom torch.optim.lr_scheduler import _LRScheduler\nimport numpy as np\nimport json\nimport logging\n\nclass MLP(nn.Module):\n def __init__(self, equation, in_features, hidden_size, out_size):\n super(MLP, self).__init__()\n self.equ...
[ [ "torch.zeros", "torch.sqrt", "torch.einsum", "torch.nn.init.xavier_uniform_", "torch.ones", "numpy.prod", "numpy.sqrt" ] ]
negi111111/StarGAN
[ "149c8b4092e1555d8a7af8daab0185d1d04a6089" ]
[ "network.py" ]
[ "import torch\nimport torch.nn as nn\nfrom torch.nn import init\nimport functools\nfrom torch.autograd import Variable\nfrom torch.optim import lr_scheduler\nimport numpy as np\n###############################################################################\n# Functions\n############################################...
[ [ "torch.optim.lr_scheduler.StepLR", "torch.nn.init.constant", "torch.nn.LeakyReLU", "torch.nn.init.kaiming_normal", "torch.cuda.is_available", "torch.nn.parallel.data_parallel", "torch.autograd.Variable", "torch.nn.ConvTranspose2d", "torch.nn.ReflectionPad2d", "torch.nn.BCEL...
seyedrezamirkhani/tfx
[ "b2dc2338b27d6ccf1cae690e65c4e358e17ec626" ]
[ "tfx/components/transform/component_test.py" ]
[ "# Lint as: python2, python3\n# Copyright 2019 Google LLC. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\...
[ [ "tensorflow.test.main" ] ]
jcw780/wows_shell
[ "6f9997cc60ff0a40d40c5931db4a980c29b09477" ]
[ "src/Python/examples/pythonGraphTest.py" ]
[ "from wows_shell import *\nimport numpy as np\nimport matplotlib\n# matplotlib.use('TkAgg',warn=False, force=True)\nimport matplotlib.pyplot as plt\nimport os\n# os.environ['KMP_DUPLICATE_LIB_OK']='True'\n\n\ns = shell(shellParams(.460, 780, .292, 1460,\n 2574, 6, .033, 76, 45, 60, 0),\n ...
[ [ "matplotlib.pyplot.grid", "matplotlib.pyplot.show", "matplotlib.pyplot.subplot" ] ]
wdayang/TED-net
[ "4775b08e318c046ff960ac43f86bd57a6fa3f01e" ]
[ "T2T_transformer_block.py" ]
[ "# Copyright (c) [2012]-[2021] Shanghai Yitu Technology Co., Ltd.\n#\n# This source code is licensed under the Clear BSD License\n# LICENSE file in the root directory of this file\n# All rights reserved.\n\"\"\"\nBorrow from timm(https://github.com/rwightman/pytorch-image-models)\n\"\"\"\nimport torch\nimport torch...
[ [ "torch.zeros", "torch.nn.Linear", "numpy.sin", "torch.nn.Dropout", "torch.nn.Identity", "torch.FloatTensor", "torch.ones", "torch.eye", "numpy.power", "numpy.cos", "torch.sum" ] ]
SmartSan/ExpenseTrackerWithMachineLearning
[ "eac00235d14011a898b7bbeeee694e9d99014370" ]
[ "Automation_DeepLearning.py" ]
[ "import pandas\nfrom pandas.tools.plotting import scatter_matrix\nimport matplotlib.pyplot as plt\nfrom sklearn import model_selection\nfrom sklearn.metrics import classification_report\nfrom sklearn.metrics import confusion_matrix\nfrom sklearn.metrics import accuracy_score\nfrom sklearn.linear_model import Logist...
[ [ "matplotlib.pyplot.show", "pandas.read_csv", "pandas.tools.plotting.scatter_matrix" ] ]
poodae-nc/MANN
[ "914f5ddb06a3853f2f60a09d156702154b084cb3" ]
[ "MANN.py" ]
[ "import numpy as np\nimport tensorflow as tf\nimport Gating as GT\nfrom Gating import Gating\nimport ExpertWeights as EW\nfrom ExpertWeights import ExpertWeights\nfrom AdamWParameter import AdamWParameter\nfrom AdamW import AdamOptimizer\nimport Utils as utils\n\n\nclass MANN(object):\n def __init__(self, \n ...
[ [ "tensorflow.expand_dims", "numpy.ones", "tensorflow.train.Saver", "tensorflow.matmul", "numpy.loadtxt", "tensorflow.squeeze", "tensorflow.placeholder", "tensorflow.nn.elu", "numpy.arange", "tensorflow.global_variables_initializer", "tensorflow.square", "tensorflow.n...
anton-br/SlowFast
[ "6e8d68bc6f3191886a57f819db1c766c6ca32d21" ]
[ "slowfast/datasets/ava_helper.py" ]
[ "#!/usr/bin/env python3\n# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n\nimport logging\nimport os\nfrom collections import defaultdict\nfrom fvcore.common.file_io import PathManager\n\nimport numpy as np\n\nlogger = logging.getLogger(__name__)\n\nFPS = 30\nAVA_VALID_FRAMES = range(902, 1...
[ [ "numpy.zeros_like", "numpy.array", "numpy.random.randint", "numpy.diff" ] ]
chuusan/DSCI_532_Group114_SKEC
[ "1ee8f15497ad96eb9faa523db18e3d219ed7aabb" ]
[ "server-e.py" ]
[ "import dash\nimport dash_core_components as dcc\nimport dash_html_components as html\nimport dash_bootstrap_components as dbc\nfrom dash.dependencies import Input, Output\nimport altair as alt\nimport pandas as pd\nimport vega_datasets\nfrom pyproj import Proj\nimport numpy as np\n\napp = dash.Dash(__name__, asset...
[ [ "pandas.DataFrame", "pandas.read_csv", "numpy.arange" ] ]
gene-fingerprinting/dtaidistance-2.0.6_F-distance
[ "08a3ac58a7d1256ac9567ee9c1ac18b98c3ee9c6" ]
[ "dtaidistance/alignment.py" ]
[ "# -*- coding: UTF-8 -*-\n\"\"\"\ndtaidistance.alignment\n~~~~~~~~~~~~~~~~~~~~~~\n\nSequence alignment (e.g. Needleman–Wunsch).\n\n:author: Wannes Meert\n:copyright: Copyright 2017-2018 KU Leuven, DTAI Research Group.\n:license: Apache License, Version 2.0, see LICENSE for details.\n\n\"\"\"\nimport logging\nimport...
[ [ "numpy.argmax" ] ]
KaliberAI/TensorRT
[ "34a167558058bb801176430d37d38a46328ab0d2" ]
[ "tools/Polygraphy/tests/cuda/test_cuda.py" ]
[ "#\n# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless ...
[ [ "numpy.empty", "numpy.zeros", "numpy.ones", "numpy.float32", "numpy.all", "numpy.dtype" ] ]
Tsinghua-gongjing/StructureImpute
[ "59e33e913998a8841c2cb552828f0f0cc19ebc21" ]
[ "structureimpute/explore/rRNA_18s_validate_mask_specific_regions.py" ]
[ "import matplotlib as mpl\nmpl.use('Agg')\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nsns.set(style=\"ticks\")\nsns.set_context(\"poster\")\nimport sys, os\nfrom nested_dict import nested_dict\nimport pandas as pd\nimport numpy as np\nfrom scipy import stats\n\nimport argparse\nimport util\n\nimport ma...
[ [ "matplotlib.use", "pandas.DataFrame.from_dict", "matplotlib.pyplot.savefig", "matplotlib.pyplot.close", "matplotlib.pyplot.subplots", "matplotlib.pyplot.tight_layout", "pandas.read_csv" ] ]
Breccia/s-py
[ "4fc5fcd0efbfcaa6574a81ee922c1083ed0ef57d" ]
[ "sp/fibo.py" ]
[ "#!/usr/local/anaconda3/bin/python\n\nimport matplotlib.pylab as plt\n\ndef fibo(n):\n series = []\n ratio = []\n x = []\n start = 0\n if (n == 0):\n series = [0]\n x = [0]\n ratio = [0]\n return x,series,ratio\n elif (n == 1):\n series = [0]\n x = [0]\n ...
[ [ "matplotlib.pylab.plot", "matplotlib.pylab.show" ] ]
Oliver-ss/Domain_Adaptation
[ "13e8edc89628f681c383bb2f7297527bbd510f09" ]
[ "configs/deeplab.mobilenet.vegas.instance-same/utils/func.py" ]
[ "import numpy as np\nimport torch\nimport torch.nn as nn\n\ndef bce_loss(y_pred, y_label):\n y_truth_tensor = torch.FloatTensor(y_pred.size())\n y_truth_tensor.fill_(y_label)\n y_truth_tensor = y_truth_tensor.to(y_pred.get_device())\n return nn.BCEWithLogitsLoss()(y_pred, y_truth_tensor)\n\ndef prob_2_e...
[ [ "numpy.log2", "torch.nn.BCEWithLogitsLoss", "torch.log2" ] ]
maxmahlke/statsmodels
[ "46506401952c9311c705c83b0b3a737c9da14871" ]
[ "statsmodels/graphics/gofplots.py" ]
[ "from statsmodels.compat.python import lzip\n\nimport numpy as np\nfrom scipy import stats\n\nfrom statsmodels.distributions import ECDF\nfrom statsmodels.regression.linear_model import OLS\nfrom statsmodels.tools.decorators import cache_readonly\nfrom statsmodels.tools.tools import add_constant\n\nfrom . import ut...
[ [ "scipy.stats.scoreatpercentile", "numpy.array", "numpy.mean", "numpy.diff", "numpy.std", "numpy.arange", "scipy.stats.mstats.mquantiles", "numpy.linspace" ] ]
KonstantinKlepikov/models
[ "383c6e309dba446642a6a681af82474e8558d5f2" ]
[ "official/transformer/transformer_estimator_benchmark.py" ]
[ "# Copyright 2019 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.compat.v1.logging.set_verbosity" ] ]
tushar-nitave/fake-new-classification
[ "67569131b93242483d6749983638e4c174eaa33e" ]
[ "code/dm.py" ]
[ "import pandas as pd\nimport matplotlib.pyplot as plt\nimport statistics\n\ndata = pd.read_csv(\"agreed.csv\", sep=\",\")\na = data['s1tos2'].mean()\nb = data['s2tos1'].mean()\n\nprint(f'Mean for s1tos2: {a:.4f}')\nprint(f'Mean for s2tos1: {b:.4f}')\nam = (a+b)/2\nprint(f'Overall Mean for Agreed: {am:.4f}')\n\ns1t...
[ [ "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "matplotlib.pyplot.hist", "matplotlib.pyplot.show", "pandas.read_csv" ] ]
Mukosame/EDVR
[ "a268f372f071e7a9ee0045cc4d6e948b8c341a63" ]
[ "codes/test_Vid4_REDS4_with_GT_DUF.py" ]
[ "\"\"\"\nDUF testing script, test Vid4 (SR) and REDS4 (SR-clean) datasets\nwrite to txt log file\n\"\"\"\n\nimport os\nimport os.path as osp\nimport glob\nimport logging\nimport numpy as np\nimport cv2\nimport torch\n\nimport utils.util as util\nimport data.util as data_util\nimport models.modules.DUF_arch as DUF_a...
[ [ "torch.device", "torch.no_grad", "numpy.copy", "numpy.stack", "numpy.transpose", "torch.LongTensor", "torch.load" ] ]
rohit180191/resume-parser
[ "d6bab04c8da5d86f34995998f4905cbfe65e5fd9" ]
[ "resumeparser.py" ]
[ "import csv\nimport re\nimport spacy\nimport sys\nreload(sys)\nsys.setdefaultencoding('utf8')\nfrom cStringIO import StringIO\nfrom pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter\nfrom pdfminer.converter import TextConverter\nfrom pdfminer.layout import LAParams\nfrom pdfminer.pdfpage import PDFPa...
[ [ "numpy.where", "numpy.array" ] ]
zhufyaxel/ML_SaltyFish
[ "84b839fa236c471e1fa8600093f0096ff79e4097" ]
[ "Homework/HW5/main.py" ]
[ "import os\nimport numpy as np\nimport pandas as pd\nfrom Base import Train, Predict, Plot, Utility\n\n\ndef main(boolNormalize, boolDeep, boolBias):\n strProjectFolder = os.path.dirname(__file__)\n\n if boolNormalize:\n if boolDeep:\n strOutputPath = \"02-Output/\" + \"Deep\" + \"Normal\"\n...
[ [ "numpy.std", "numpy.squeeze", "numpy.mean" ] ]
neurodebian/python-neo
[ "56ce3b6a3f6944a096279404c22a75166b905844" ]
[ "neo/io/klustakwikio.py" ]
[ "\"\"\"Reading and writing from KlustaKwik-format files.\nRef: http://klusters.sourceforge.net/UserManual/data-files.html\n\nSupported : Read, Write\n\nAuthor : Chris Rodgers\n\nTODO:\n* When reading, put the Unit into the RCG, RC hierarchy\n* When writing, figure out how to get group and cluster if those annotatio...
[ [ "numpy.array", "numpy.asarray", "numpy.zeros", "matplotlib.mlab.csv2rec", "numpy.unique" ] ]
FunctionX/validator_queries
[ "842d0a75ee07f48b972d1bb18d292cadc730fa8b" ]
[ "Data.py" ]
[ "import Cmd\nimport requests\nimport json\nimport utils\nimport pandas as pd\nimport File\n\n\ndef _get_val_list()->list:\n \"\"\"\n create a list of validator addresses with prefix fxvaloper\n \"\"\"\n cmd=Cmd._filter_cmd(\"validator_info\",\"cmd_list.json\")\n data=Cmd._get_raw_data(cmd)\n val_a...
[ [ "pandas.DataFrame", "pandas.json_normalize" ] ]
Leonardo8133/Simulacao-de-Ecossistema
[ "46b88c014efb635ef7ef2388fe7be4610c538c94" ]
[ "data_visu.py" ]
[ "from numpy import array\r\nimport pandas as pd\r\nfrom matplotlib import pyplot as plt\r\nfrom matplotlib.animation import FuncAnimation\r\nfrom ast import literal_eval\r\nimport seaborn as sea\r\nimport generate as gn\r\n\r\n\r\nt=1\r\ndef pdc(data):\r\n\t\t\treturn pd.DataFrame.from_dict(data)\r\nclass visualiza...
[ [ "numpy.array", "pandas.DataFrame.from_dict", "matplotlib.pyplot.title", "matplotlib.pyplot.subplots", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.show" ] ]
SoroushMehraban/Real-time-and-Layout-independent-Automatic-License-Plate-Recognition-System
[ "0060e156b98ee8adf84e2676ed0004f861da9ce3", "0060e156b98ee8adf84e2676ed0004f861da9ce3" ]
[ "annotation_utils/remove_duplicate_images.py", "lp_recognition/loss.py" ]
[ "import numpy as np\nimport cv2\nfrom glob import glob\nimport os\n\nif __name__ == '__main__':\n files = glob(\"images/*.jpg\")\n files_info = {}\n for file in files:\n files_info[file] = cv2.imread(file, cv2.IMREAD_GRAYSCALE)\n files_info[file] = cv2.resize(files_info[file], (200, 200))\n\n...
[ [ "numpy.all" ], [ "torch.sqrt", "torch.exp", "torch.nn.MSELoss", "torch.nn.Sigmoid" ] ]
mingen-pan/Kinetic-Model-for-Metal-Condensation
[ "36b92ad4db2b1f1f9274c0683dc6d18d145160aa" ]
[ "nucleation.py" ]
[ "import math\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd\nimport setting\n\n\n\nclass Nucleation():\n def __init__(self, main, df = None):\n self.main = main\n self.metal_list = main.metal_list\n self.collider = main.collider\n self.Gas = main.Gas\n ...
[ [ "numpy.array", "numpy.log", "numpy.sum", "pandas.DataFrame", "numpy.sqrt", "pandas.concat", "pandas.Series" ] ]
josh95117/freetype-py
[ "1b564b7de61f0bde5c3e09ed9a1fb0f7642d6bad" ]
[ "examples/example_1.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# -----------------------------------------------------------------------------\n#\n# FreeType high-level python API - Copyright 2011-2015 Nicolas P. Rougier\n# Distributed under the terms of the new BSD license.\n#\n# ----------------------------------------------...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.imshow" ] ]
jiefangxuanyan/tensorflow
[ "f78fd433118830482dddbf6055751898a19265de", "8e86dcd1c59bb3f1dc978fcb5398dd3f2f51d9ad" ]
[ "tensorflow/python/keras/engine/input_layer.py", "tensorflow/python/keras/datasets/mnist.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.keras.engine.base_layer.Node", "tensorflow.python.keras.backend.floatx", "tensorflow.python.ops.array_ops.sparse_placeholder", "tensorflow.python.ops.array_ops.placeholder", "tensorflow.python.eager.context.executing_eagerly", "tensorflow.python.keras.engine.base_layer.D...
Rancerle/Clarkson_Magenta
[ "38fe21582d43efa1441f82f4c271682f1e33869e", "38fe21582d43efa1441f82f4c271682f1e33869e" ]
[ "magenta/common/state_util.py", "magenta/models/polyphony_rnn/polyphony_lib.py" ]
[ "# Copyright 2017 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli...
[ [ "numpy.stack", "tensorflow.python.util.nest.map_structure" ], [ "tensorflow.logging.debug" ] ]
dmitry-markeshov/incubator-mxnet
[ "34010ea417014a6b6203395d3359099431c362cf" ]
[ "tests/python/unittest/test_extensions.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.random.randint" ] ]
aiyolo/prototypical-network-pytorch-lightning
[ "e6fb9397f98314cd8f4b42282ca3f28e46c51d4a" ]
[ "utils/metric.py" ]
[ "import torch\n\ndef euclidean_metric(a, b):\n return torch.cdist(a, b, p=2)" ]
[ [ "torch.cdist" ] ]
lnpandey/DL_explore_synth_data
[ "0a5d8b417091897f4c7f358377d5198a155f3f24", "0a5d8b417091897f4c7f358377d5198a155f3f24" ]
[ "data/load_cifar.py", "training/at_conv/training_at_zero.py" ]
[ "import torchvision\nimport torchvision.transforms as transforms\nfrom torch.utils.data import DataLoader\nfrom torchvision import datasets\ndef cifarset():\n\t'''\n \treturns trainset and testset for cifar10 dataset\n\t'''\n\t\n\tprint('==> Preparing data..')\n\ttransform_train = transforms.Compose([\n ...
[ [ "torch.utils.data.DataLoader" ], [ "torch.max", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "numpy.mean", "matplotlib.pyplot.figure", "torch.cuda.is_available", "torch.utils.data.DataLoader", "matplotlib.pyplot.ylabel", "torch....
yl-1993/hfsoftmax
[ "80fa7d333baa024ce5aaf49c7e726d6db67b015f" ]
[ "models/ir.py" ]
[ "import torch\nimport torch.nn as nn\n\n__all__ = ['InceptionResNetV2', 'inceptionresnetv2']\n\n\nclass BasicConv2d(nn.Module):\n def __init__(self, in_planes, out_planes, kernel_size, stride, padding=0):\n super(BasicConv2d, self).__init__()\n self.conv = nn.Conv2d(in_planes,\n ...
[ [ "torch.nn.Linear", "torch.cat", "torch.nn.MaxPool2d", "torch.nn.AvgPool2d", "torch.nn.BatchNorm2d", "torch.nn.ReLU", "torch.nn.Conv2d" ] ]
SeanSyue/SklearnReferences
[ "a2770a7108947877e772f3525bc915c5de4114bb" ]
[ "MachineLearning/hw2_q2/Step 3/hw2_2_full.py" ]
[ "import pandas as pd\r\nfrom sklearn.model_selection import train_test_split\r\nfrom sklearn.model_selection import cross_val_score\r\nfrom sklearn.neural_network import MLPClassifier\r\nfrom sklearn.preprocessing import StandardScaler\r\nfrom sklearn.tree import DecisionTreeClassifier\r\n\r\n# --------------------...
[ [ "sklearn.neural_network.MLPClassifier", "sklearn.tree.DecisionTreeClassifier", "sklearn.model_selection.train_test_split", "pandas.read_csv", "sklearn.model_selection.cross_val_score", "pandas.get_dummies" ] ]
josephniwjc/MINE-Database
[ "04b64d25cb24600c2a8cf98aaab685074fd8e7c5" ]
[ "Scripts/RxnRuleProcessing.py" ]
[ "import pandas\nimport os\nimport re\nfrom collections import deque\n\n# translate coreactant names into cpd_ids\ncoreactants = {'Any': 'Any'}\nfor line in open('../minedatabase/data/EnzymaticCoreactants.tsv'):\n if line[0] == \"#\":\n continue\n sl = line.split('\\t')\n coreactants[sl[1]] = sl[0]\n...
[ [ "pandas.read_csv" ] ]
Fahima-Islam/c3dp
[ "f8eb9235dd4fba7edcc0642ed68e325346ff577e" ]
[ "c3dp/support_only_for_collimator_unrefined.py" ]
[ "import numpy as np\nfrom instrument.geometry.pml import weave\nfrom instrument.geometry import shapes, operations\nfrom instrument.geometry.pml.Renderer import Renderer as base\n\n\nclass File_inc_Renderer(base):\n def _renderDocument(self, body):\n self.onGeometry(body)\n return\n def header(s...
[ [ "numpy.deg2rad", "numpy.arctan", "numpy.arange", "numpy.sqrt" ] ]
digimatronics/Deepmind-Pythons-TF
[ "9b1c649e7a241ba8a70631378146dc92f742deec" ]
[ "nn/base.py" ]
[ "# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "tensorflow.make_template" ] ]
pchlenski/NeuroSEED
[ "6318431dcce22df70948251b103374f4a6e96fff" ]
[ "edit_distance/baselines/train.py" ]
[ "import argparse\nimport pickle\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom scipy.cluster.hierarchy import linkage\nfrom scipy.spatial.distance import squareform\n\nfrom hierarchical_clustering.relaxed.datasets.loading import load_hc_data\nfrom hierarchical_clustering.relaxed.utils.metrics import das...
[ [ "numpy.concatenate", "numpy.diag_indices", "numpy.sum", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "scipy.spatial.distance.squareform", "numpy.mean", "numpy.where", "numpy.arange", "matplotlib.pyplot.ylabel", "numpy.abs", "matplotlib.pyplot.show" ] ]
kaustavmu/r2auto_nav
[ "20a1a819e03827c3c9645dcacf2253527e301978" ]
[ "Experimentations/exp_autonav7.py" ]
[ "# Copyright 2016 Open Source Robotics Foundation, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by...
[ [ "numpy.array", "numpy.empty", "numpy.savetxt", "numpy.zeros", "numpy.sign", "numpy.nanargmax", "matplotlib.pyplot.pause", "matplotlib.pyplot.imshow" ] ]
zcqsntr/RED
[ "ea2a78833a22861055506d94ddfa961b1d46f9cf" ]
[ "RED/environments/gene_transcription/xdot_gene_transcription.py" ]
[ "import numpy as np\nfrom casadi import *\n\ndef xdot(sym_y, sym_theta, sym_u):\n a, Kt, Krt, d, b = [sym_theta[i] for i in range(sym_theta.size()[0])] #intrinsic parameters\n #a = 20min^-1\n Kr = 40 # practically unidentifiable\n Km = 750\n #Kt = 5e5\n #Krt = 1.09e9\n #d = 2.57e-4 um^-3min^-1\...
[ [ "numpy.exp" ] ]
gawain-bolton/arrow
[ "4d825497cb04c9e1c288000a7a8f75786cc487ff" ]
[ "python/pyarrow/tests/test_dataset.py" ]
[ "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y...
[ [ "numpy.repeat", "pandas.DataFrame", "numpy.array_split" ] ]
sauravsrijan/dffml
[ "7f1e274ec7d557ee931c1f98bc35147f1db3a530" ]
[ "model/scikit/tests/test_scikit.py" ]
[ "import sys\nimport tempfile\nimport numpy as np\n\nfrom dffml.repo import Repo\nfrom dffml.source.source import Sources\nfrom dffml.source.memory import MemorySource, MemorySourceConfig\nfrom dffml.feature import DefFeature, Features\nfrom dffml.util.asynctestcase import AsyncTestCase\n\nimport dffml_model_scikit....
[ [ "numpy.concatenate", "sklearn.datasets.make_blobs" ] ]
saininaresh4435/mlflow-example
[ "a2831b9a7597f918f017b0c47fefc7413dc8fae9" ]
[ "train.py" ]
[ "# The data set used in this example is from http://archive.ics.uci.edu/ml/datasets/Wine+Quality\n# P. Cortez, A. Cerdeira, F. Almeida, T. Matos and J. Reis.\n# Modeling wine preferences by data mining from physicochemical properties. In Decision Support Systems, Elsevier, 47(4):547-553, 2009.\n\nimport os\nimport ...
[ [ "sklearn.metrics.mean_squared_error", "sklearn.model_selection.train_test_split", "numpy.random.seed", "sklearn.linear_model.ElasticNet", "sklearn.metrics.mean_absolute_error", "sklearn.metrics.r2_score", "pandas.read_csv" ] ]
lsgcow/colorization
[ "606037f51703bb1e4d7c31be4789db7d9fa13625" ]
[ "colorizers/util.py" ]
[ "\nfrom PIL import Image\nimport numpy as np\nfrom skimage import color\nimport torch\nimport torch.nn.functional as F\nfrom IPython import embed\n\ndef load_img(img_path):\n\tout_np = np.asarray(Image.open(img_path))\n\tif(out_np.ndim==2):\n\t\tout_np = np.tile(out_np[:,:,None],3)\n\treturn out_np\n\ndef resize_im...
[ [ "torch.cat", "numpy.tile", "torch.Tensor", "torch.nn.functional.interpolate" ] ]
AshishMahendra/flair
[ "041c85cf3d45940dccd453fc350767c1c85aad49" ]
[ "train_flair_clinc.py" ]
[ "from flair.models import TARSClassifier\nfrom flair.data import Corpus,Sentence\nfrom flair.datasets import SentenceDataset\nfrom flair.trainers import ModelTrainer\nimport numpy as np\nimport time\n\nintent= [\n \"restaurant_reviews\",\n \"nutrition_info\",\n \"account_blocked\",\n \"oil_change_how\",...
[ [ "numpy.concatenate", "numpy.sum", "numpy.unique", "numpy.nonzero" ] ]
etarakci-hvl/adanet
[ "712bc8efbcce4684cc81108ad916a735cddb4de2" ]
[ "adanet/ensemble/mean.py" ]
[ "# Copyright 2019 The AdaNet 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# https://www.apache.org/licenses/LICENSE-2.0\n\n# Unless required b...
[ [ "tensorflow.stack", "tensorflow.no_op" ] ]
looch-huang/robotics-toolbox-python
[ "38d58a16dc1131c4d30c129b0e9a640ed3c4d3cf" ]
[ "examples/swift_recording.py" ]
[ "#!/usr/bin/env python\n\"\"\"\n@author Jesse Haviland\n\"\"\"\n\nimport roboticstoolbox as rtb\nimport spatialmath as sm\nimport numpy as np\nimport qpsolvers as qp\n\n\"\"\"\nThis is an implementation of the controller from:\nJ. Haviland and P. Corke, “A purely-reactive manipulability-maximising\nmotion controlle...
[ [ "numpy.ones", "numpy.zeros", "numpy.eye" ] ]
psandahl/trio
[ "34d1c20e6e9bd3cd18bca1a9f2a53518452bd0ff" ]
[ "trio/tests/common_camera.py" ]
[ "import numpy as np\nimport math\nimport unittest\n\nfrom trio.common.camera import Camera\nfrom trio.common.math import column\n\nfrom .utils import equal_arrays\n\n\nclass CommonCameraTestCase(unittest.TestCase):\n def test_camera_space(self):\n # Create a simple camera.\n c = Camera(np.array([3,...
[ [ "numpy.radians", "numpy.array" ] ]
hbueno/awesome-panel
[ "fb27bcaf265cef1278cfa0c78799fbbf6c9a6834" ]
[ "application/pages/owid_choropleth_map/owid_choropleth_map.py" ]
[ "\"\"\"In this example we show how to construct an interactive\r\n[Choropleth](ps://en.wikipedia.org/wiki/Choropleth_map) map.\r\n\r\nThe example is inspired by the article\r\n[Choropleth maps with geopandas, Bokeh and Panel]\\\r\n(https://dmnfarrell.github.io/bioinformatics/bokeh-maps)\r\nby [Damian Farrell](https...
[ [ "pandas.read_csv" ] ]
thomasbreydo/mental-health-nlp-chatbot
[ "62cb6f558f8e3282f24f4699770e838a272cc346" ]
[ "model.py" ]
[ "import torch\nimport torch.nn as nn\n\nclass NeuralNet(nn.Module):\n def __init__(self, input_size, hidden_size, num_classes):\n super(NeuralNet, self).__init__()\n self.l1 = nn.Linear(input_size, hidden_size) \n self.l2 = nn.Linear(hidden_size, hidden_size) \n self.l3 = nn.Linear(hi...
[ [ "torch.nn.Linear", "torch.nn.ReLU" ] ]
simon-m-mudd/LSDMappingTools
[ "d9137710ea18e54f3dc5b6782c5696cafdd2999f" ]
[ "Data_sorting.py" ]
[ "\"\"\"This class contains calculation for sorting data in order to make the plotting scripts lighter\n@author Boris Gailleton\"\"\"\nimport numpy as np\nimport pandas as bamboo_bears\nfrom pyproj import Proj, transform\n\ndef source_num_of_longest_river(arr):\n \"\"\"\n This function will return the source n...
[ [ "pandas.DataFrame", "pandas.read_csv", "numpy.dtype", "numpy.fromfile" ] ]
hugoledoux/pointcloudset
[ "075ddc3f840cc6c2e2505452c1eb9f2e4fce5e99" ]
[ "pointcloudset/diff/origin.py" ]
[ "\"\"\"\nFunctions to calculate distances of points in pointcloud to origin.\n\"\"\"\n\nimport numpy as np\n\nfrom pointcloudset.diff.point import calculate_distance_to_point\n\n\ndef calculate_distance_to_origin(pointcloud, **kwargs):\n \"\"\"Calculate the Euclidian distance to the origin (0,0,0) for each point...
[ [ "numpy.array" ] ]
LGruenhaupt/Qcodes
[ "ffb74dae53c13c4885e61b5a2df3f833d524de04", "b4cf7d58bc1bf3be97af6bf48f57cb6b87d588bb" ]
[ "qcodes/utils/helpers.py", "qcodes/tests/test_plot_utils.py" ]
[ "import io\nimport json\nimport logging\nimport math\nimport numbers\nimport time\nimport os\nfrom pathlib import Path\n\nfrom collections.abc import Iterator, Sequence, Mapping\nfrom copy import deepcopy\nfrom typing import (Dict, Any, Type, List, Tuple, Union, Optional,\n cast, Callable, Suppor...
[ [ "numpy.ceil", "numpy.linspace", "numpy.floor" ], [ "matplotlib.pyplot.close" ] ]
flaudanum/Yet-another-AHP
[ "6eba8a842156ce1651c8dbe243034427f72361d9" ]
[ "yeahp-backend/web_api/tests/unit/test_optimization.py" ]
[ "import networkx as nx\nimport numpy as np\nimport pytest\nfrom numpy.testing import assert_array_almost_equal_nulp, assert_allclose\n\nfrom web_api.graph_drawing import optimization\nfrom web_api.graph_drawing.optimization import OptimizationSetupError\n\n\n@pytest.fixture(scope=\"function\", name=\"graph\")\ndef ...
[ [ "numpy.array", "numpy.testing.assert_array_almost_equal_nulp" ] ]
ishin-pie/e2e-scene-text-spotting
[ "a3f5ba1f486c5d52bb6263aff6663a03ab4effbf" ]
[ "modules/data/loader.py" ]
[ "import torch.utils.data as torchdata\nfrom modules.data.utils import collate_fn\nfrom modules.data.dataset import ICDAR\n\n\nclass ICDARDataLoader:\n\n def __init__(self, config):\n self.config = config\n self.batch_size = config['data_loader']['batch_size']\n self.shuffle = config['data_lo...
[ [ "torch.utils.data.random_split", "torch.utils.data.DataLoader" ] ]
edesz/store-item-demand-forecast
[ "c921ac92a6e6f9afe606eaed1886d461b6b3afc5" ]
[ "src/utils.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n\nfrom time import time\n\nimport numpy as np\nimport pandas as pd\nfrom sklearn.pipeline import Pipeline\n\nimport src.data_custom_transformers as ct\nimport src.feature_utils as ut\nimport src.ml_helpers as mlh\nimport src.ml_trials_helpers as mlth\nfrom src.cv_...
[ [ "pandas.to_datetime", "pandas.DateOffset", "numpy.expm1" ] ]
bebaek/cryomem
[ "088fba2568d10451adda51a068c15c8c2a73d9ce" ]
[ "cryomem/cmtools/lib/cmtools_main.py" ]
[ "\"\"\"\nUser interface for data management for magnetic JJ research\n Raw data processing (I-V fit) and plot\n High level data management (dev parameter database) and plot\n\nMinimize codes here and delegate details to libcmtools modules.\n\nBB, 2015\n\"\"\"\n\nimport sys\nimport numpy as np\nimport matplotl...
[ [ "matplotlib.animation.FuncAnimation", "numpy.zeros", "matplotlib.pyplot.savefig", "matplotlib.pyplot.xlabel", "numpy.ones", "matplotlib.pyplot.plot", "matplotlib.pyplot.grid", "matplotlib.pyplot.subplots", "matplotlib.pyplot.figure", "numpy.shape", "numpy.loadtxt", ...
jiajiaxu123/Orca
[ "e86189e70c1d0387816bb98b8047a6232fbda9df" ]
[ "tests/numpy_unit_testing/test_function_binary_operator_multiply.py" ]
[ "import unittest\nfrom setup.settings import *\nfrom numpy.testing import *\nfrom pandas.util.testing import *\nimport numpy as np\nimport dolphindb_numpy as dnp\nimport pandas as pd\nimport orca\n\n\nclass FunctionMultiplyTest(unittest.TestCase):\n @classmethod\n def setUpClass(cls):\n # connect to a ...
[ [ "numpy.multiply", "numpy.array", "numpy.zeros", "pandas.Series" ] ]
himoto/fitting_hilleq
[ "02aeebb90fb2a4fce14c39fc31ca526bc76d394b" ]
[ "hillfit/fitting.py" ]
[ "import os\nimport re\nfrom typing import List, Optional, Union\n\nimport numpy as np\nfrom matplotlib import pyplot as plt\nfrom pandas import DataFrame\nfrom scipy.optimize import curve_fit\nfrom sigfig import round\nfrom sklearn.metrics import r2_score\n\n\nclass HillFit(object):\n def __init__(\n self...
[ [ "numpy.array", "scipy.optimize.curve_fit", "matplotlib.pyplot.subplots", "numpy.amax", "numpy.amin", "sklearn.metrics.r2_score", "numpy.log10" ] ]
EricZLou/Ax
[ "3f8fc6f4a055e93cb69fda3799be41ee9572ef02", "3f8fc6f4a055e93cb69fda3799be41ee9572ef02" ]
[ "ax/modelbridge/tests/test_utils.py", "ax/utils/common/typeutils.py" ]
[ "#!/usr/bin/env python3\n# Copyright (c) Facebook, Inc. and its 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 numpy as np\nfrom ax.core.arm import Arm\nfrom ax.core.data import Data\nfrom ax.core.generator_run i...
[ [ "numpy.int64" ], [ "torch.device" ] ]
lhogstrom/ThornsInRoses
[ "7f8f1746cba74bb763a2cd76da856d8d702cac72" ]
[ "18_085/PS1_mtrx_inversion.py" ]
[ "import numpy as np\n\n\nn = 5\nmtrx = np.diag(np.repeat(2,n),k=0)\noff1 = np.diag(np.repeat(-1,n-1),k=1)\noff2 = np.diag(np.repeat(-1,n-1),k=-1)\nmtrx = mtrx + off1 + off2\n\nmtrx_inv = np.linalg.inv(mtrx)\ncolsum = mtrx_inv[:,0].sum()\n\nform1 = mtrx_inv * np.linalg.det(mtrx)" ]
[ [ "numpy.repeat", "numpy.linalg.inv", "numpy.linalg.det" ] ]
limpidezza/DeepSpeech
[ "b3c728d46ff4eee68c45f20b0abb76e968008bcb" ]
[ "tools/tune.py" ]
[ "\"\"\"Beam search parameters tuning for DeepSpeech2 model.\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport sys\nimport os\nimport numpy as np\nimport argparse\nimport functools\nimport gzip\nimport logging\nimport paddle.fluid as fluid...
[ [ "numpy.linspace" ] ]
AYCHKnow/CQualityEvaluation
[ "28a20489d450e0e484c1aa660446ba157d488c35" ]
[ "src/server.py" ]
[ "import json\nimport pickle\n\nimport pandas as pd\n\nfrom flask import Flask, request, jsonify\n\n\n# load previously trained and saved MeanRegressor model\nfrom models import MeanRegressor, RandomRegressor\nwith open(\"../models/MeanRegressor.pkl\", \"rb\") as f:\n model = pickle.load(f)\n# load correct order ...
[ [ "pandas.DataFrame" ] ]
iKernels/RelTextRank
[ "0f773fca83bb23f9a159c2da1635597a089ca7e0" ]
[ "scripts/emnlp2018/metaclassifier.py" ]
[ "import pandas as pd\nfrom itertools import chain\nfrom global_constants import *\nimport numpy as np\n\ndef get_metaclassifier_training_data_and_labels(cv_predictions, feature_names):\n '''\n getting meta-classifier training data from the cv fold predictions\n '''\n rez_frame = None\n column_feats =...
[ [ "pandas.DataFrame", "numpy.array", "numpy.hstack", "pandas.merge" ] ]
ivkalgin/openvino
[ "403339f8f470c90dee6f6d94ed58644b2787f66b" ]
[ "inference-engine/ie_bridges/python/tests/test_InferRequest.py" ]
[ "# Copyright (C) 2018-2022 Intel Corporation\n# SPDX-License-Identifier: Apache-2.0\n\nimport numpy as np\nimport os\nimport pytest\nimport threading\nfrom datetime import datetime\nimport time\n\nfrom openvino.inference_engine import ie_api as ie\nfrom conftest import model_path, image_path, create_encoder\nimport...
[ [ "numpy.full", "numpy.array_equal", "numpy.zeros", "numpy.ones", "numpy.allclose", "numpy.argmax", "numpy.sort", "numpy.transpose", "numpy.expand_dims" ] ]
DeepLearnXMU/MNMT
[ "899ec808fe86cde126399101e8d3bcf3120d11d2" ]
[ "onmt/modules/Transformer.py" ]
[ "\"\"\"\nImplementation of \"Attention is All You Need\"\n\"\"\"\n\nimport torch\nimport torch.nn as nn\nfrom torch.autograd import Variable\nimport numpy as np\n\nimport onmt\nfrom onmt.Models import EncoderBase\nfrom onmt.Models import DecoderState\nfrom onmt.Utils import aeq\n\nMAX_SIZE = 5000\n\n\nclass Positio...
[ [ "torch.nn.Linear", "torch.nn.Dropout", "torch.cat", "torch.stack", "torch.autograd.Variable", "numpy.ones", "torch.from_numpy", "torch.nn.ReLU" ] ]
bongiovimatthew/jigsaw-rl
[ "e9589a78b62a7645fe9bc054f0411230eb249acf" ]
[ "Learners/CircularBatchQueue.py" ]
[ "import numpy as np\r\n\r\n\r\nclass CircularBatchQueue:\r\n\r\n def __init__(self, max_size, img_dimensions):\r\n self.size = max_size\r\n\r\n self.observations = np.ndarray(\r\n (self.size, img_dimensions, img_dimensions), dtype=np.uint8) # save memory with uint8\r\n self.rewar...
[ [ "numpy.ndarray", "numpy.float32" ] ]
gabox8888/Graph-CNN
[ "16dc7493c6dbdde8687e9044c850f686d8bf83fd" ]
[ "src/graphcnn/experiment_imagenet.py" ]
[ "from graphcnn.helper import *\nfrom graphcnn.network import *\nfrom graphcnn.layers import *\nfrom sklearn.model_selection import KFold\nimport numpy as np\nimport tensorflow as tf\nimport glob\nimport time\nfrom graphcnn.experiment import GraphCNNExperiment\nfrom tensorflow.python.training import queue_runner\n\n...
[ [ "numpy.array", "tensorflow.image.random_flip_left_right", "tensorflow.python.training.queue_runner.QueueRunner", "tensorflow.train.slice_input_producer", "tensorflow.read_file", "tensorflow.variable_scope", "tensorflow.device", "tensorflow.image.resize_images", "tensorflow.cast...
syskn/mkultra
[ "e4e650624a6be1da497b85e2da49c214946731cd" ]
[ "mkultra/tuning.py" ]
[ "from transformers import GPT2LMHeadModel, GPTNeoForCausalLM\nfrom mkultra.soft_prompt import SoftPrompt\nimport torch\nimport torch.nn as nn\n\nclass GPTPromptTuningMixin:\n @classmethod\n def from_pretrained(cls, pretrained_model_name_or_path, **kwargs):\n model = super().from_pretrained(pretrained_m...
[ [ "torch.no_grad", "torch.full" ] ]
Rubiel1/sktime
[ "2fd2290fb438224f11ddf202148917eaf9b73a87" ]
[ "sktime/classification/feature_based/_random_interval_classifier.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"Random Interval Classifier.\n\nPipeline classifier using summary statistics extracted from random intervals and an\nestimator.\n\"\"\"\n\n__author__ = [\"MatthewMiddlehurst\"]\n__all__ = [\"RandomIntervalClassifier\"]\n\nimport numpy as np\n\nfrom sktime.base._base import _clone_esti...
[ [ "numpy.zeros" ] ]
Ulysses-WJL/deep-learning-coursera
[ "db76fdd20a0d7aaca9f9b33c33e8c72cb4d3e021" ]
[ "Neural Networks and Deep Learning/testCases.py" ]
[ "#-*- coding: UTF-8 -*-\r\n\"\"\"\r\n# WANGZHE12\r\n\"\"\"\r\nimport numpy as np\r\n\r\ndef layer_sizes_test_case():\r\n np.random.seed(1)\r\n X_assess = np.random.randn(5, 3)\r\n Y_assess = np.random.randn(2, 3)\r\n return X_assess, Y_assess\r\n\r\ndef initialize_parameters_test_case():\r\n n_x, n_h...
[ [ "numpy.random.seed", "numpy.array", "numpy.random.randn" ] ]
vkataev/trax
[ "648f02bb5e064209fa08af5f048dfc2cfdc0ddca" ]
[ "trax/rl/envs/online_tune_env.py" ]
[ "# coding=utf-8\n# Copyright 2019 The Trax Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by app...
[ [ "tensorflow.io.gfile.listdir", "tensorflow.io.gfile.makedirs" ] ]
janez87/social-knowledge-extractor
[ "ccaf817c370dcf4f06f21fbad728c67da23d2c69" ]
[ "utils/csv_formatter.py" ]
[ "__author__ = 'marcotagliabue'\n\n\"\"\"\nDescription:\n Formatting Datasets stored in MongoDb following theese rules:\n - seed_au_old.csv: file containing the initial seed in the form of (id,name) where id is the id in the database\n - cand.csv: file containing the candidates in the form of (id,name) wher...
[ [ "pandas.DataFrame" ] ]