repo_name
stringlengths
8
130
hexsha
list
file_path
list
code
list
apis
list
ChristianLin0420/DeepRL
[ "143a9bfebd264229d9d26fcdc070065225774e04" ]
[ "Homework 4/107062240_hw4_train.py" ]
[ "from osim.env import L2M2019Env\n\n'''\n TD3\n'''\nimport copy\nimport numpy as np\nimport pandas as pd\n\nimport argparse\nimport os\nimport os.path\nfrom os import path\nimport utils\nfrom collections import Iterable\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\ndevice = torch.d...
[ [ "numpy.save", "torch.min", "torch.nn.functional.mse_loss", "torch.nn.Linear", "torch.load", "numpy.zeros", "torch.FloatTensor", "torch.randn_like", "torch.manual_seed", "torch.no_grad", "numpy.random.seed", "pandas.json_normalize", "numpy.random.normal", "to...
gptix/DS--Data-Engineering-
[ "2975e4b538aed3e477bea56f0b09601452ed4837" ]
[ "recommender_vanilla.py" ]
[ "import numpy as np\nimport pandas as pd\nfrom sklearn.neighbors import NearestNeighbors\nfrom sklearn.feature_extraction.text import CountVectorizer\n\n\n### Import and shape data\npath_base = 'gitstuff/buildweek2/DS--Data-Engineering-/'\ndf = pd.read_csv(path_base + 'data/cannabis.csv')\n\n## select subset with h...
[ [ "pandas.read_csv", "sklearn.neighbors.NearestNeighbors", "sklearn.feature_extraction.text.CountVectorizer" ] ]
simra/msrflute
[ "c28e2e6bcfa9464b8640ccd625393bbed28491c3", "c28e2e6bcfa9464b8640ccd625393bbed28491c3" ]
[ "utils/preprocessing/create-json.py", "extensions/privacy/__init__.py" ]
[ "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT license.\n\nimport json\nimport time\nfrom tqdm import tqdm\nimport pandas as pd\n\npath = r'C:\\Users\\train.tsv'\n\ndef local_time():\n return str(time.strftime(\"%H:%M:%S\",time.localtime()))\n\n\nprint(local_time() + \" Starting script \" ) ...
[ [ "pandas.read_csv", "pandas.DataFrame", "pandas.concat" ], [ "numpy.sqrt", "torch.dot", "torch.randint", "torch.randn", "torch.rand", "torch.tensor", "numpy.exp", "torch.normal", "scipy.special.betaln", "torch.nn.functional.cosine_similarity", "numpy.log"...
hnguye12333/Python_
[ "6aebb00d18ff5f276e6d1cc006c5e664bf9252eb" ]
[ "discount_cashflows/discount_cashflows.py" ]
[ "path_cashflow = r\"./Cashflows.csv\"\npath_rate = r\"./Yield curve.csv\"\n\n# Implementation with Pandas\nimport pandas as pd\n\n# Read in the cash flows data and rate data as csv\ncashflow_df = pd.read_csv(path_cashflow)\nrate_df = pd.read_csv(path_rate)\n\n# Calculate discount factor from the rates\nrate_df[\"Di...
[ [ "pandas.read_csv" ] ]
caspervdw/circletracking
[ "2d981a1bd3f2982d5d36932d7d5a38e912fcdba3" ]
[ "circletracking/algebraic.py" ]
[ "\"\"\" Functions for algebraic fitting \"\"\"\nfrom __future__ import (absolute_import, division, print_function,\n unicode_literals)\nimport six\nimport numpy as np\n\nMODE_DICT_ELLIPSE = {'circle': 'xy', 'ellipse_aligned': '0', 'ellipse': ''}\nMODE_DICT_ELLIPSOID = {'sphere': 'xyz', 'prola...
[ [ "numpy.sum", "numpy.diff", "numpy.diag", "numpy.dtype", "numpy.issubdtype", "numpy.ones_like", "numpy.isfinite", "numpy.abs", "numpy.cos", "numpy.identity", "numpy.linspace", "numpy.linalg.eig", "numpy.mean", "numpy.argmax", "numpy.arange", "numpy.ma...
fengwang/jax
[ "88f888d498ee5a063c7fbdf96ea593ab8bd01849" ]
[ "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.sum", "numpy.ones", "numpy.multiply", "numpy.diff", "numpy.dtype", "numpy.any", "numpy.issubdtype", "numpy.asarray", "numpy.int64", "numpy.log", "numpy.isscalar", "numpy.where", "numpy.uint8", "numpy.load", "numpy.ceil", "numpy.zeros", "nu...
Zeinab-Haroon/detectron2
[ "6a56c9cadaf392697c4bdef00325e415d07a459f" ]
[ "detectron2/evaluation/cityscapes_evaluation.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates.\nimport glob\nimport logging\nimport numpy as np\nimport os\nimport tempfile\nfrom collections import OrderedDict\nimport torch\nfrom PIL import Image\n\nfrom detectron2.data import MetadataCatalog\nfrom detectron2.utils import comm\nfrom detectron2.utils.file_io ...
[ [ "numpy.ones", "torch.device" ] ]
kalyanvasudev/ptv_temp
[ "85c2282bed9aa4eadc3454bd7e8f2a8e8c4b4ec6" ]
[ "pytorchvideo/models/x3d.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n\nfrom typing import Callable, Tuple\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nfrom fvcore.nn.squeeze_excitation import SqueezeExcitation\nfrom pytorchvideo.layers.convolutions import Conv2plus1d\nfrom pytorchvideo.layers.sw...
[ [ "torch.nn.Linear", "torch.nn.Dropout", "torch.nn.AvgPool3d", "torch.nn.ModuleList", "torch.nn.Identity", "numpy.prod", "torch.nn.AdaptiveAvgPool3d", "torch.nn.Conv3d" ] ]
pmehta08/MulensModel
[ "261738c445a8d116d09c90e65f6e847cfc8a7ad8", "261738c445a8d116d09c90e65f6e847cfc8a7ad8" ]
[ "examples/run_time_tests/compare.py", "data/interpolate_elliptic_integral_1_2.py" ]
[ "import os\nimport sys\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom astropy.coordinates import SkyCoord\nfrom astropy import units as u\n\nsys.path.append(\"/usr/custom/pyLIMA-1.0.0\")\nfrom pyLIMA import event, telescopes, microlmodels\nimport MulensModel as mm\n\n\n# Common settings:\nt_0 = 2456900....
[ [ "matplotlib.pyplot.legend", "numpy.abs", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel", "numpy.array", "matplotlib.pyplot.plot", "numpy.linspace", "matplotlib.pyplot.xlabel", "numpy.loadtxt" ], [ "scipy.special.ellipk", "scipy.special.ellipe", "numpy.abs"...
fabriziocosta/EGO
[ "d89e88183cce1ff24dca9333c09fa11597a45c7a" ]
[ "ego/optimization/neighborhood_graph_grammar.py" ]
[ "#!/usr/bin/env python\n\"\"\"Provides scikit interface.\"\"\"\n\nimport numpy as np\nimport networkx as nx\nimport random\nfrom ego.decompose import do_decompose\nfrom ego.decomposition.positive_and_negative import decompose_positive, decompose_negative\nfrom ego.decomposition.union import decompose_all_union\nfro...
[ [ "numpy.random.choice", "numpy.absolute" ] ]
OliverT1/gnina_tensorflow
[ "339310c643a85e6df1248d03dbbe4ae78cf59f19" ]
[ "layers/layer_functions.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Fri Sep 11 09:12:15 2020\n\n@author: scantleb\n@brief: Functions for generating keras layers.\n\"\"\"\n\nimport tensorflow as tf\nfrom tensorflow.keras import layers\n\n\ndef generate_activation_layers(block_name, activation, append_name_info=True...
[ [ "tensorflow.keras.layers.ThresholdedReLU", "tensorflow.keras.initializers.constant", "tensorflow.keras.layers.Activation" ] ]
hologerry/magenta
[ "c08c17a548f97a3f5d294a010c28ea2803718d6f" ]
[ "magenta/models/gansynth/lib/data_helpers.py" ]
[ "# Copyright 2020 The Magenta 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 applicable law o...
[ [ "tensorflow.compat.v1.device", "tensorflow.compat.v1.concat", "tensorflow.compat.v1.shape", "tensorflow.compat.v1.add_to_collection", "tensorflow.compat.v1.name_scope" ] ]
BMC-SDNU/Cross-Modal-Hashing-Retrieval
[ "0196e313aad0a93ebf93e1150f024d6a07f8363a" ]
[ "DCHUC/utils/txt_module.py" ]
[ "import torch\nfrom torch import nn\nfrom torch.nn import functional as F\n\nLAYER1_NODE = 10240\n\n\ndef weights_init(m):\n if type(m) == nn.Conv2d:\n nn.init.xavier_uniform(m.weight.data)\n nn.init.constant(m.bias.data, 0.01)\n\n\nclass TxtModule(nn.Module):\n def __init__(self, y_dim, bit):\n...
[ [ "torch.nn.init.xavier_uniform", "torch.nn.init.constant", "torch.nn.Tanh", "torch.nn.Conv2d", "torch.nn.ReLU", "torch.nn.Dropout" ] ]
csherstan/DeepRL
[ "fbf8da1f158792a0b9d29728c9d407ae40573070" ]
[ "aux_0.99_10.0.py" ]
[ "import argparse\n\nimport torch\n\nfrom deep_rl import random_seed, set_one_thread, select_device, Config, generate_tag, Task, TDAuxNet, NatureConvBody, \\\n LinearSchedule, AsyncReplay, ImageNormalizer, SignNormalizer, run_steps, mkdir\nfrom deep_rl.agent.TDAux_agent import TDAuxAgent\nimport os\n\ndef td_aux_...
[ [ "torch.optim.Adam" ] ]
wqruan/tf-encrypted
[ "50ee4ae3ba76b7c1f70a90e18f875191adea0a07", "50ee4ae3ba76b7c1f70a90e18f875191adea0a07" ]
[ "primitives/tf_encrypted/primitives/paillier/primitives_test.py", "operations/secure_random/test_secure_random.py" ]
[ "# pylint: disable=missing-docstring\nimport unittest\n\nimport numpy as np\nimport tensorflow as tf\nfrom absl.testing import parameterized\n\nfrom tf_encrypted.primitives import paillier\nfrom tf_encrypted.test import tf_execution_context\n\n\nclass EncryptionTest(parameterized.TestCase):\n @parameterized.para...
[ [ "numpy.array" ], [ "numpy.testing.assert_raises", "tensorflow.load_op_library", "numpy.testing.assert_array_equal", "tensorflow.Session", "tensorflow.constant" ] ]
guilhermeprokisch/catalyst
[ "21e096b261912d9e905584178d6ee626072c23cb" ]
[ "catalyst/pipeline/mixins.py" ]
[ "\"\"\"\r\nMixins classes for use with Filters and Factors.\r\n\"\"\"\r\nfrom textwrap import dedent\r\n\r\nfrom numpy import (\r\n array,\r\n full,\r\n recarray,\r\n vstack,\r\n)\r\nfrom pandas import NaT as pd_NaT\r\n\r\nfrom catalyst.errors import (\r\n WindowLengthNotPositive,\r\n UnsupportedD...
[ [ "numpy.vstack", "numpy.full", "numpy.array" ] ]
ssbyrne89/DIYInvestmentPrimer
[ "eae81d9e7c67b5d912bc7ed7037432f03ee4792c" ]
[ "web_app/routes/company_routes.py" ]
[ "# web_app/routes/company_routes.py\nimport pandas as pd\nfrom flask import Blueprint, jsonify, request, render_template #, flash, redirect\n\nfrom web_app.models import *\n\ncompany_routes = Blueprint(\"company_routes\", __name__)\n\n@company_routes.route(\"/div_yield\")\ndef seeDivYield():\n return render_temp...
[ [ "pandas.read_csv" ] ]
epfl-lasa/crowdbot-evaluation-tools
[ "0e98c76428f6af5a4caa6b83b91ac05b3ed300ce" ]
[ "qolo/viz_traj.py" ]
[ "#!/usr/bin/env python3\n# -*-coding:utf-8 -*-\n# =============================================================================\n\"\"\"\n@Author : Yujie He\n@File : viz_traj.py\n@Date created : 2022/02/25\n@Maintainer : Yujie He\n@Email : yujie.he@epfl.ch\n\"\"\"\n# ===========...
[ [ "numpy.load" ] ]
muzudho/collatz
[ "da99c1cf4cc65c42eeb3ea07134c0e25fc35e606" ]
[ "lifegame_lj.py" ]
[ "\"\"\"\n左寄せ表記(Left justified)\n\"\"\"\n\nimport os\nimport numpy as np\n\n# 環境変数\nRADIX = int(os.getenv(\"RADIX\", 2))\n\n# 桁揃えに利用。10進数27 を指定したときの見やすさをデフォルトにするぜ(^~^)\ncount_width = 3\ncount_str = \"\"\ndec_width = 4\ndec_str = \"\"\nradix_str = \"\"\n# 表示した数の個数\ncount = 0\n\ndef update_print_number(dec):\n \"\"...
[ [ "numpy.base_repr" ] ]
balazssimon/ml-playground
[ "c2eba497bebc53e5a03807bdd8873c55f0ec73e1" ]
[ "udemy/Deep Learning A-Z/Volume 2 - Unsupervised Deep Learning/Part 4 - Self Organizing Maps (SOM)/mega_case_study.py" ]
[ "# Mega Case Study - Make a Hybrid Deep Learning Model\n\n\n\n# Part 1 - Identify the Frauds with the Self-Organizing Map\n\n# Importing the libraries\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd\n\n# Importing the dataset\ndataset = pd.read_csv('Credit_Card_Applications.csv')\nX = data...
[ [ "pandas.read_csv", "sklearn.preprocessing.MinMaxScaler", "numpy.concatenate", "sklearn.preprocessing.StandardScaler" ] ]
gatling-nrl/scikit-fem
[ "04730d80d612470b7e802eed4c21dd96b89cef61" ]
[ "skfem/generic_utils.py" ]
[ "import numpy as np\n\nfrom numpy import ndarray\n\n\ndef hash_args(*args):\n \"\"\"Return a tuple of hashes, with numpy support.\"\"\"\n return tuple(hash(arg.tobytes())\n if isinstance(arg, ndarray)\n else hash(arg) for arg in args)\n\n\nclass OrientedBoundary(ndarray):\n ...
[ [ "numpy.array", "numpy.asarray" ] ]
asears/stanza
[ "f91ca215e175d4f7b202259fe789374db7829395" ]
[ "stanza/models/parser.py" ]
[ "\"\"\"\nEntry point for training and evaluating a dependency parser.\n\nThis implementation combines a deep biaffine graph-based parser with linearization and distance features.\nFor details please refer to paper: https://nlp.stanford.edu/pubs/qi2018universal.pdf.\n\"\"\"\n\n\"\"\"\nTraining and evaluation for the...
[ [ "torch.cuda.is_available", "numpy.argmax" ] ]
st--/jupytext
[ "72aa6c4968da714323fbd7a7c548ee4b1274c946" ]
[ "demo/World population.pct.py" ]
[ "# ---\n# jupyter:\n# jupytext:\n# cell_markers: region,endregion\n# formats: ipynb,.pct.py:percent,.lgt.py:light,.spx.py:sphinx,md,Rmd,.pandoc.md:pandoc\n# text_representation:\n# extension: .py\n# format_name: percent\n# format_version: '1.2'\n# jupytext_version: 1.1.0\n# k...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.stackplot", "matplotlib.pyplot.figure", "matplotlib.pyplot.clf", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
Zwysilence/tensorflow
[ "b55001be83da044bb21d539d433dec6231eaec55", "b55001be83da044bb21d539d433dec6231eaec55", "b55001be83da044bb21d539d433dec6231eaec55" ]
[ "tensorflow/contrib/rnn/python/ops/rnn_cell.py", "tensorflow/python/ops/image_ops_test.py", "tensorflow/compiler/tests/momentum_test.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.ops.nn_ops.dropout", "tensorflow.python.ops.math_ops.mod", "tensorflow.python.ops.rnn_cell_impl.assert_like_rnncell", "tensorflow.python.ops.math_ops.tanh", "tensorflow.python.platform.tf_logging.warn", "tensorflow.python.ops.variable_scope.variable_scope", "tensorfl...
aribasadme/CrimeDB
[ "a16b35204921726ec6f3cf9a7ec5d9b51cbe7d49" ]
[ "crime_db.py" ]
[ "import pandas as pd\nfrom police_api import PoliceAPI\n\n\ndef first_job(api, dates, t_current):\n \"\"\"\n Creates the tables and populates them with the historical data\n from ​T​_0\n​ ​to ​T​_current\n \"\"\"\n # subset of dates\n dates_hist = dates[dates <= t_current]\n\n # crime_catego...
[ [ "pandas.Series", "pandas.DataFrame", "pandas.DataFrame.from_dict" ] ]
mothguib/maptrainer
[ "335334fed073f8d14a4c5137eaa0424efcbcac63" ]
[ "maptrainer/model/LinRNNModel.py" ]
[ "# -*- coding: utf-8 -*-\n\nimport numpy as np\nimport torch\nfrom torch import autograd\nfrom torch.autograd import Variable\nimport torch.nn as nn\n\nfrom maptrainer.model.MAPModel import MAPModel\nfrom ..data import INIT_RANGE_BOUND\n\n\nclass LinRNNModel(MAPModel):\n \"\"\"\n `LinRNNModel`: Linear-output ...
[ [ "torch.nn.RNN", "torch.from_numpy", "torch.nn.Linear", "torch.nn.Dropout" ] ]
sjdv1982/silk
[ "232e759cabfc7a87550d1e50ed9c4de4e0e57bf4" ]
[ "tests/silk/test-complex.py" ]
[ "import sys\nfrom pprint import pprint\nfrom silk import Silk, ValidationError\n\ndef adder(self, other):\n return other + self.x\n\ns = Silk()\ns.__add__ = adder\ns.bla = adder\ns.x = 80\nprint(s.x.data)\nprint(s.bla(5))\nprint(s+5)\n\ns2 = Silk(schema=s.schema)\ns2.x = 10\nprint(s2+5)\n\ns3 = Silk(schema=s2.sc...
[ [ "numpy.array", "numpy.sum" ] ]
jayzed82/scikit-learn
[ "f52c0d441502117020ac0152cea8e89367f55ed6" ]
[ "sklearn/feature_selection/_univariate_selection.py" ]
[ "\"\"\"Univariate features selection.\"\"\"\n\n# Authors: V. Michel, B. Thirion, G. Varoquaux, A. Gramfort, E. Duchesnay.\n# L. Buitinck, A. Joly\n# License: BSD 3 clause\n\n\nimport numpy as np\nimport warnings\n\nfrom scipy import special, stats\nfrom scipy.sparse import issparse\n\nfrom ..base import Ba...
[ [ "numpy.sum", "numpy.ones", "numpy.argsort", "numpy.asarray", "scipy.special.fdtrc", "scipy.special.chdtrc", "numpy.append", "numpy.isnan", "numpy.where", "numpy.nonzero", "numpy.unique", "numpy.mean", "numpy.zeros", "scipy.stats.f.sf", "numpy.arange", ...
AeRabelais/bdt_pipeline
[ "35d0cc3f7ada35e082c384d0755916605daa5feb" ]
[ "scripts/dataToParquet.py" ]
[ "\"\"\"\r\n@Title: dataToParquet.py\r\n@author: Ashia Lewis\r\n\r\nGOAL: Create and update the parquet files for the air and soil data, separately.\r\n\"\"\"\r\nimport os\r\nimport glob\r\nimport pandas as pd\r\nimport pyarrow as pa\r\nimport pyarrow.parquet as pq\r\n\r\n#CODE TO BE USED FOR THE BATCH DATA\r\n\"\"\...
[ [ "pandas.read_csv" ] ]
arushi-08/pandas
[ "014ea2e5a8a647cfa5e3050a5c1299eb39b293d3" ]
[ "pandas/tests/plotting/test_datetimelike.py" ]
[ "\"\"\" Test cases for time series specific (freq conversion, etc) \"\"\"\nfrom datetime import (\n date,\n datetime,\n time,\n timedelta,\n)\nimport pickle\n\nimport numpy as np\nimport pytest\n\nfrom pandas._libs.tslibs import (\n BaseOffset,\n to_offset,\n)\nimport pandas.util._test_decorators ...
[ [ "pandas._testing.assert_numpy_array_equal", "pandas.Series", "pandas._testing.ensure_clean", "numpy.asarray", "numpy.random.RandomState", "pandas.core.indexes.period.period_range", "pandas._testing.assert_series_equal", "pandas._testing.makeDataFrame", "pandas.core.indexes.peri...
krassowski/jupyter-helpers
[ "9feb0af6563b56d02688c18e1a9a415d15d9b1a2" ]
[ "jupyter_helpers/table.py" ]
[ "import pandas as pd\nfrom IPython.core.display import display\n\n\ndef bordered_table(hide_headers=[], color='#ddd'):\n return [\n {'selector': 'th', 'props': [('text-align', 'center'), ('border', f'1px solid {color}')]},\n {'selector': 'td', 'props': [('border', f'1px solid {color}')]},\n ...
[ [ "pandas.option_context" ] ]
chelffey/tilebot
[ "3fa4cc3ea7c03786fb8ac02458ef4e6d464603ec" ]
[ "src/tiler.py" ]
[ "# Purpose: takes a list of filenames AND/OR publically accessible urls. \n# Returns a tiled image file of tiles SIZExSIZE, separated by spaces of width \n# DIFF, in rows if length ROWSIZE. \n# files that can't be retrieved are returned blank. \n\nimport os\nimport numpy as np\nfrom PIL import Image\nimport urllib....
[ [ "numpy.asarray", "numpy.hstack", "numpy.array", "numpy.concatenate", "numpy.full" ] ]
guntbert/astropy
[ "f2d2add09e5b1638b2698f19a4d46fcca19e82be" ]
[ "astropy/visualization/wcsaxes/tests/test_display_world_coordinates.py" ]
[ "# Licensed under a 3-clause BSD style license - see LICENSE.rst\nfrom astropy.visualization.wcsaxes.core import WCSAxes\nimport matplotlib.pyplot as plt\nfrom matplotlib.backend_bases import KeyEvent\n\nfrom astropy.wcs import WCS\nfrom astropy.coordinates import FK5\nfrom astropy.time import Time\nfrom astropy.te...
[ [ "matplotlib.backend_bases.KeyEvent", "matplotlib.pyplot.figure" ] ]
2018-B-GR1-Python/Velasco-Yepez-Andres-David
[ "0c017d6e5f169f31207ddec5ceffc8dd82d327eb" ]
[ "03_spyder/proyecto_spyder.py" ]
[ "\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Nov 28 01:15:31 2018\n\n@author: Andres\n\"\"\"\n\nimport pandas as pd\nurl = 'http://catalogo.datosabiertos.gob.ec/api/action/datastore_search?resource_id=8513f446-1c94-426e-8592-d4cbdd295f33&limit=1000'\n\ndatos = pd.read_json(url, typ='frame')\ndatos =pd.DataFra...
[ [ "pandas.Series", "pandas.DataFrame.from_dict", "pandas.read_json" ] ]
leonidk/cupdice
[ "f3386337922337eaaae2f244607f1af73516843f" ]
[ "lavalle_rrts.py" ]
[ "#!/usr/bin/env python\n\n# rrt.py\n# This program generates a simple rapidly\n# exploring random tree (RRT) in a rectangular region.\n#\n# Written by Steve LaValle\n# May 2011\n\nimport sys, random, math, pygame\nfrom pygame.locals import *\nfrom math import sqrt,cos,sin,atan2\nimport heapq\nimport numpy as np\n\n...
[ [ "numpy.ones", "numpy.append", "numpy.zeros", "numpy.squeeze", "numpy.argmin", "numpy.random.rand", "numpy.array", "numpy.linalg.norm" ] ]
mehrdadzakershahrak/Online-Explanation-Generation
[ "e41ad9b5a390abdaf271562a56105c191e33b74d" ]
[ "rovers/fastdownward/experiments/issue750/relativescatter.py" ]
[ "# -*- coding: utf-8 -*-\n\nfrom collections import defaultdict\n\nfrom matplotlib import ticker\n\nfrom downward.reports.scatter import ScatterPlotReport\nfrom downward.reports.plot import PlotReport, Matplotlib, MatplotlibPlot\n\n\n# TODO: handle outliers\n\n# TODO: this is mostly copied from ScatterMatplotlib (s...
[ [ "matplotlib.ticker.ScalarFormatter" ] ]
lerongil/qiskit-terra
[ "a25af2a2378bc3d4f5ec73b948d048d1b707454c" ]
[ "test/python/quantum_info/test_weyl.py" ]
[ "# -*- coding: utf-8 -*-\n\n# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2017, 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...
[ [ "numpy.array", "numpy.sqrt", "numpy.identity", "numpy.testing.assert_allclose" ] ]
YodaEmbedding/experiments
[ "567c6a1c18fac2d951fe2af54aaa4917b7d529d2" ]
[ "py/pyanaconda/tf_straightline.py" ]
[ "# Fit a straight line, of the form y=m*x+b\n\nimport tensorflow as tf\n\nxs = [0.00, 1.00, 2.00, 3.00, 4.00, 5.00, 6.00, 7.00] # Features\nys = [-0.82, -0.94, -0.12, 0.26, 0.39, 0.64, 1.02, 1.00] # Labels\n\n\"\"\"\nwith enough iterations, initial weights dont matter since our cost function is convex.\n\"\"\"\n...
[ [ "tensorflow.initialize_all_variables", "tensorflow.train.GradientDescentOptimizer", "tensorflow.Session", "tensorflow.Variable" ] ]
CDInstitute/CompoNET.github.io
[ "f978f31a78628c70b1033ed02a75de8a50aa905d" ]
[ "dataset/generator.py" ]
[ "import bpy, bmesh\nfrom math import radians\nimport numpy as np\nimport os\n\nimport random\nimport sys\n\nsys.path.append(\"D:\\ProgramFiles\\Anaconda\\envs\\py37\\Lib\\site-packages\")\nfrom pyntcloud import PyntCloud\n\nfile_dir = os.path.dirname(__file__)\nsys.path.append(file_dir)\n\nfrom blender_utils import...
[ [ "numpy.random.random", "numpy.random.randint" ] ]
genisplaja/cunet
[ "58a200c84810f20099265e30200327eefddb3eff", "58a200c84810f20099265e30200327eefddb3eff" ]
[ "cunet/ftanet/network/ftanet.py", "cunet/ftanet/evaluator.py" ]
[ "import tensorflow as tf\r\nfrom tensorflow.keras import backend as K\r\nfrom tensorflow.keras import Input, Model\r\nfrom tensorflow.keras.layers import Dense, Conv2D, BatchNormalization, Dropout, Lambda, \\\r\n GlobalAveragePooling2D, Activation, MaxPooling2D, AveragePooling2D, \\\r\n Concatenate, Add, Mult...
[ [ "tensorflow.keras.Input", "tensorflow.keras.layers.UpSampling2D", "tensorflow.keras.layers.Concatenate", "tensorflow.keras.layers.MaxPooling2D", "tensorflow.keras.layers.Conv1D", "tensorflow.keras.layers.Softmax", "tensorflow.keras.Model", "tensorflow.keras.layers.Lambda", "ten...
seungkee/2nd-place-solution-to-facebook-image-similarity-matching-track
[ "716667bf416239f448e4ea2730a2cc5146536719" ]
[ "code/descriptor_track/train_eval/make_n_perquery_df_gpu.py" ]
[ "import cv2\nimport os\nimport random\nimport time\nimport torch\nimport torch.backends.cudnn as cudnn\nimport models\nfrom utils.logger import Logger\nimport myexman\nfrom utils import utils\nimport sys\nimport torch.multiprocessing as mp\nimport torch.distributed as dist\nimport socket\nfrom torchvision import tr...
[ [ "torch.utils.data.DataLoader", "torch.no_grad", "torch.mm", "torch.cat", "torch.distributed.init_process_group", "torch.save", "torch.cuda.device_count", "numpy.expand_dims", "torch.device", "torch.cuda.set_device", "numpy.load", "torch.distributed.all_gather", ...
qinfeng2011/wltp
[ "317ad38fb96599a29d22e40f69b6aeb4d205611d" ]
[ "tests/test_wltp_db.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright 2013-2019 European Commission (JRC);\n# Licensed under the EUPL (the 'Licence');\n# You may not use this work except in compliance with the Licence.\n# You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl\n\"\"\"(DEPRECATED) Compares...
[ [ "numpy.gradient", "pandas.Panel", "pandas.read_csv", "matplotlib.pyplot.figure", "pandas.MultiIndex.from_product", "pandas.DataFrame", "numpy.abs", "numpy.testing.assert_array_equal", "numpy.count_nonzero", "matplotlib.pyplot.show", "pandas.cut", "numpy.testing.asse...
Eitan177/StructuralMapping
[ "c20ce43de2698902d606b718c9a9fdf2296b0a52" ]
[ "code/Alignment/FREAD/prosci/loops/fread.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n\nimport sys\nimport os\nimport time\nimport itertools\n\nfrom heapq import heappush, heappop\n\n# Compatibility with Python < 2.6\n#\ntry:\n from heapq import heappushpop\nexcept ImportError:\n def heappushpop(heap, item):\n heappush(heap, item)\n return ...
[ [ "numpy.array", "numpy.dot" ] ]
xudong-sun/mxnet
[ "fc9e70bf2d349ad4c6cb65ff3f0958e23a7410bf" ]
[ "example/reinforcement-learning/a3c/a3c.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.tile", "numpy.zeros", "numpy.reshape", "numpy.set_printoptions", "numpy.random.choice", "numpy.log" ] ]
guoshuhong/Classification-networks
[ "0ca20964e64cf9001e2a770b2b44d88dcca04775" ]
[ "net/layers.py" ]
[ "from tensorflow import keras\nimport tensorflow as tf\n\n\nclass BatchNormalization(keras.layers.BatchNormalization):\n \"\"\"\n Identical to keras.layers.BatchNormalization, but adds the option to freeze parameters.\n \"\"\"\n def __init__(self, freeze, *args, **kwargs):\n self.freeze = freeze\...
[ [ "tensorflow.reduce_sum", "tensorflow.keras.initializers.constant", "tensorflow.keras.activations.relu" ] ]
aist9/autoencoder
[ "b3b1ccbfff61883db06a6ca4506ca890eff08568" ]
[ "vae_torch/sample.py" ]
[ "# VAEのサンプルコード, MNIST使用\r\n\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\n\r\n\r\nif __name__ == '__main__':\r\n import sys\r\n \r\n # コマンドライン引数を読み込み\r\n # 引数が'-1'なら学習しない\r\n args = sys.argv\r\n train_mode = ['train', 'retrain', 'load']\r\n mode = 0 if len(args) < 2 else int(args[...
[ [ "numpy.ones", "matplotlib.pyplot.imshow", "matplotlib.pyplot.show", "matplotlib.pyplot.plot", "numpy.meshgrid", "numpy.linspace", "matplotlib.pyplot.scatter" ] ]
mk43/machine-learning
[ "1ca1baf797fe6f593a88ad4e0d7ac7e5c24ce139" ]
[ "algorithm/neural-network/XOR.py" ]
[ "# coding: utf-8\n\nimport numpy as np\n\nx1 = np.asarray([0, 0, 1, 1])\nx2 = np.asarray([0, 1, 0, 1])\nX = np.row_stack((np.ones(shape=(1, 4)), x1, x2))\nprint(\"X:\\n%s\" % X)\ny = np.asarray([0, 1, 1, 0])\nW1 = np.asarray([[-1, 2, -2],\n [-1, -2, 2]])\nW2 = np.asarray([-1, 2, 2])\n\n\ndef sigmoid...
[ [ "numpy.ones", "numpy.matmul", "numpy.set_printoptions", "numpy.asarray", "numpy.power" ] ]
smartcommunitylab/sco.mobilitycovid
[ "a4af6b3b2d14208d638894a94b2c673397bf77fd" ]
[ "scripts/stop_user_clusters-v6.py" ]
[ "from __future__ import print_function\nfrom sklearn.cluster import DBSCAN\n\nimport argparse\nimport hashlib\nimport os\nimport time\n\nfrom datetime import date, datetime, timedelta\nfrom functools import reduce\nfrom math import degrees\n\nfrom concurrent.futures import ThreadPoolExecutor\nimport concurrent.futu...
[ [ "sklearn.cluster.DBSCAN" ] ]
aeverall/tensorflow
[ "7992bf97711919f56f80bff9e5510cead4ab2095" ]
[ "tensorflow/python/framework/func_graph.py" ]
[ "# Copyright 2018 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.eager.tape.push_new_tape", "tensorflow.python.framework.ops.convert_to_tensor_or_indexed_slices", "tensorflow.python.eager.tape.pop_tape", "tensorflow.python.util.tf_decorator.make_decorator", "tensorflow.python.util.nest.flatten", "tensorflow.python.eager.graph_only_ops...
qbxlvnf11/graph-neural-networks-for-graph-classification
[ "5d69ead58c786aa8e472ab0433156fe09fe6ca4b" ]
[ "models/GraphUNet.py" ]
[ "import os\nimport sys\nsys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))\n\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n#from layers.graph_convolution_layer import GraphConvolutionLayer\nfrom layers.graph_unet_layer import GraphUNetLayer\nfrom readouts.basic_readout import ...
[ [ "torch.nn.Linear", "torch.nn.functional.dropout" ] ]
supertopdev/data-science
[ "9534085236a79e123b97f0771a4641289039d93b" ]
[ "ISR/utils/datahandler.py" ]
[ "import os\nimport imageio\nimport numpy as np\nfrom ISR.utils.logger import get_logger\n\n\nclass DataHandler:\n \"\"\"\n DataHandler generate augmented batches used for training or validation.\n\n Args:\n lr_dir: directory containing the Low Res images.\n hr_dir: directory containing the Hi...
[ [ "numpy.rot90", "numpy.all", "numpy.flip", "numpy.sort", "numpy.std", "numpy.random.randint", "numpy.array" ] ]
vaibhav016/TensorFlowASR
[ "2c90f67f284be6c8a6c182223b9f517a73bc766f" ]
[ "tensorflow_asr/utils/env_util.py" ]
[ "# Copyright 2020 Huy Le Nguyen (@usimarit)\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 ...
[ [ "tensorflow.config.list_logical_devices", "tensorflow.get_logger", "tensorflow.distribute.experimental.TPUStrategy", "tensorflow.distribute.cluster_resolver.TPUClusterResolver", "tensorflow.distribute.MirroredStrategy", "tensorflow.tpu.experimental.initialize_tpu_system", "tensorflow.c...
yjc9696/biobert-my
[ "ffc11c91f7032cffbcc7d9526159f0ff8e08c1f3" ]
[ "helpData_n2c2.py" ]
[ "import json\n\nimport numpy as np\n\nimport metrics\nimport tokenization\nimport utils\nfrom config import opt\n\n\ndef write2file(data, path):\n with open(path, 'w') as f:\n f.write(json.dumps(data, ensure_ascii=False))\ndef get_BIO(self, tag):\n return self.id2tag[tag]\n # if tag == 0:\n # ...
[ [ "numpy.array" ] ]
jdieter31/riemannian-nlp
[ "75ef47608c81ec6e925fe24d16c67985e4b987c6" ]
[ "riemann/data/data_ingredient.py" ]
[ "from math import floor\n\nimport numpy as np\n\nfrom .graph import load_edge_list, load_adjacency_matrix\nfrom .graph_dataset import BatchedDataset\nfrom ..config_loader import get_config\n\n\ndef load_dataset():\n data_config = get_config().data\n\n if graph_data_type == \"edge\":\n idx, objects, wei...
[ [ "numpy.arange", "numpy.random.shuffle", "numpy.random.seed" ] ]
dpopadic/arpmRes
[ "ddcc4de713b46e3e9dcb77cc08c502ce4df54f76", "ddcc4de713b46e3e9dcb77cc08c502ce4df54f76", "ddcc4de713b46e3e9dcb77cc08c502ce4df54f76" ]
[ "scripts/sources/s_checklist_scenariobased_step07.py", "functions_legacy/GraphicalLasso.py", "scripts/sources/S_PricingEquityTaylor.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n# ---\n# jupyter:\n# jupytext:\n# text_representation:\n# extension: .py\n# format_name: light\n# format_version: '1.4'\n# jupytext_version: 1.2.0\n# kernelspec:\n# display_name: Python 3\n# language: python\n# name: pytho...
[ [ "pandas.Series", "numpy.squeeze", "pandas.read_csv", "numpy.exp", "numpy.log" ], [ "numpy.ones", "matplotlib.pyplot.style.use", "numpy.zeros", "numpy.array", "numpy.cov" ], [ "numpy.ones", "matplotlib.pyplot.style.use", "matplotlib.pyplot.legend", "n...
SayanGhoshBDA/code-backup
[ "8b6135facc0e598e9686b2e8eb2d69dd68198b80" ]
[ "python/data_sutram/scraper/appl_map.py" ]
[ "\"\"\"\nhttps://sat-cdn1.apple-mapkit.com/tile?style=7&size=1&scale=1&z=19&x=84135&y=202065&v=4002&accessKey=1549129912_6641142575737855346_%2F_9%2F4MX0U5yhJDc3LDXazhcQj3xjCJU%2BYsiKcviN%2FnWxE%3D&emphasis=standard&tint=dark\n\nhttps://sat-cdn4.apple-mapkit.com/tile?style=7&size=1&scale=1&z=19&x=84135&y=202061&v=4...
[ [ "numpy.arange" ] ]
gerardrbentley/peak-weather
[ "2880184c99c2d30075665f76a9e8b815906a55e5" ]
[ "streamlit_app/streamlit_app.py" ]
[ "from copy import deepcopy\nimport asyncio\nimport json\n\nimport pandas as pd\nimport streamlit as st\nfrom structlog import get_logger\n\nfrom helpers import (\n fromtimestamp,\n show_weather,\n WeatherItem,\n gather_one_call_weather_data,\n clean_time,\n)\n\nlog = get_logger()\nst.set_page_config(...
[ [ "pandas.read_csv" ] ]
ErwindeGelder/ScenarioRiskQuantification
[ "ee351b7bd3629af0c1d1d800dcc5ac5426b9b804" ]
[ "simulation/acc_idmplus.py" ]
[ "\"\"\" Model of ACC with FCW and IDM+ to take over from Xiao et al. (2017).\n\nCreation date: 2020 08 12\nAuthor(s): Erwin de Gelder\n\nModifications:\n\"\"\"\n\nimport numpy as np\nfrom .acc import ACC, ACCParameters, ACCState\nfrom .idm import IDMParameters\nfrom .idmplus import IDMPlus\n\n\nclass ACCIDMPlusPara...
[ [ "numpy.exp" ] ]
yqshao/PiNN
[ "464034dda44ce053cf1255a3e7d367c636d6b9f3" ]
[ "pinn/models/base.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"Basic functions for PiNN models\"\"\"\nimport tensorflow as tf\nfrom pinn.utils import pi_named\n\ndef export_model(model_fn):\n # default parameters for all models\n from pinn.optimizers import default_adam\n default_params = {'optimizer': default_adam}\n def pinn_model(...
[ [ "tensorflow.reshape", "tensorflow.abs", "tensorflow.reduce_sum", "tensorflow.stack", "tensorflow.compat.v1.metrics.mean", "tensorflow.cast", "tensorflow.gradients", "numpy.prod", "tensorflow.boolean_mask", "tensorflow.compat.v1.metrics.mean_absolute_error", "tensorflow....
danielabler/glimslib
[ "3d345bf3ed2d364e83a00ad9297dd5f81d7193db" ]
[ "glimslib/simulation_helpers/test_unit_timeSeriesMultiData.py" ]
[ "from unittest import TestCase\nimport os\nimport numpy as np\n\nimport glimslib.utils.file_utils as fu\nfrom glimslib import fenics_local as fenics, config\nfrom glimslib.simulation_helpers.helper_classes import FunctionSpace, TimeSeriesMultiData\n\n\nclass TestTimeSeriesMultiData(TestCase):\n\n def setUp(self)...
[ [ "numpy.allclose" ] ]
linthieda/DeepFEH
[ "273b5c695674e0d22bc7f701a5d64113034b04de" ]
[ "model/a2c.py" ]
[ "import numpy as np\n\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt\n\nfrom reinforce import Reinforce\nfrom model import CriticNet\n\nimport feh_simulator.simulator as gym\n\nclass A2C(Reinforce):\n # Implementation of N-step Advantage Actor Critic.\n # This class inherits the Re...
[ [ "matplotlib.use", "numpy.array", "numpy.zeros" ] ]
janosh/mnf-bnn
[ "955b083027d8757716e1cdb6baaf908964546e6d" ]
[ "tf_mnf/flows/rnvp.py" ]
[ "import tensorflow as tf\n\n\nclass RNVP(tf.Module):\n \"\"\"Affine half (aka Real Non-Volume Preserving) flow (x = z * exp(s) + t),\n where a randomly selected half z1 of the dimensions in z are transformed as an\n affine function of the other half z2, i.e. scaled by s(z2) and shifted by t(z2).\n\n Fro...
[ [ "tensorflow.math.log", "tensorflow.shape", "tensorflow.sigmoid", "tensorflow.keras.Sequential", "tensorflow.keras.layers.Dense" ] ]
masasin/spirit
[ "c8366e649eb105a8a579fb7a47dcc5aaeae6a0d8" ]
[ "src/visualization/plot_thesis.py" ]
[ "from functools import partial\nfrom pathlib import Path\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\nimport seaborn.apionly as sns\n\nfrom ..analysis.csv_analysis import analyze_data, load_surveys\nfrom ..data.survey_utils import ExperimentType\nfrom .latexify import latexify, figur...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.gca", "matplotlib.pyplot.subplots", "numpy.arange", "matplotlib.pyplot.title", "matplotlib.pyplot.subplot", "matplotlib.pyplot.cm.get_cmap", "matplotlib.pyplot.ylabel", "pandas.melt", "numpy.log10", "matplotlib.pyplot.ylim"...
sunandita/ICAPS_Summer_School_RAE_2020
[ "a496b62185bcfdd2c76eb7986ae99cfa85708d28" ]
[ "problems/OF/auto/problem80_OF.py" ]
[ "__author__ = 'mason'\n\nfrom domain_orderFulfillment import *\nfrom timer import DURATION\nfrom state import state\nimport numpy as np\n\n'''\nThis is a randomly generated problem\n'''\n\ndef GetCostOfMove(id, r, loc1, loc2, dist):\n return 1 + dist\n\ndef GetCostOfLookup(id, item):\n return max(1, np.random...
[ [ "numpy.random.beta", "numpy.random.normal" ] ]
ruanchaves/Dual-encoder-Entity-Retrieval-with-BERT
[ "ff8c7933afaf0b2c40a7df0250f4b82a5868dc2a" ]
[ "data_reader.py" ]
[ "import numpy as np\nfrom tqdm import tqdm\nimport torch\nimport pdb\nfrom typing import Iterator\nfrom allennlp.data import Instance\nfrom allennlp.data.dataset_readers import DatasetReader\nfrom allennlp.data.token_indexers import TokenIndexer, SingleIdTokenIndexer, PretrainedTransformerIndexer\nfrom allennlp.dat...
[ [ "numpy.array", "torch.manual_seed", "numpy.random.seed" ] ]
sanjitjain2/soundnet_tf
[ "ba8d85246dbf14f2573ad5b46355ae512bb630de" ]
[ "util.py" ]
[ "import numpy as np\nimport librosa\n# import pdb\nimport wget\n\nlocal_config = {\n 'batch_size': 64, \n 'load_size': 22050*20,\n 'phase': 'extract'\n }\n\ndef get_audio(audio_link):\n file_name = audio_link.split('/')[-1]\n save_location = \"/Users/sanjitjain/proj...
[ [ "numpy.tile", "numpy.zeros", "numpy.reshape", "numpy.max", "numpy.min" ] ]
aaalgo/aardvark
[ "cdd42acdc20e85f4b3070dd1486f3dc9c9a9b905" ]
[ "cxray/predict-cls-vis.py" ]
[ "#!/usr/bin/env python3\nimport os\nimport sys\nos.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'\nsys.path.append('..')\nimport numpy as np\nimport cv2\nimport tensorflow as tf\nfrom tensorflow.python.framework import meta_graph\nfrom mold import Scaling\nfrom gallery import Gallery\nfrom chest import *\n\nclass Model:\n ...
[ [ "tensorflow.python.framework.meta_graph.read_meta_graph_file", "tensorflow.placeholder", "tensorflow.app.run", "tensorflow.global_variables_initializer", "tensorflow.local_variables_initializer", "numpy.argmax", "numpy.copy", "numpy.clip", "tensorflow.import_graph_def", "te...
shippingwang/models
[ "a92e212932b764e500a833527e0fb772ac9a491a" ]
[ "PaddleCV/PaddleDetection/tools/face_eval.py" ]
[ "# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re...
[ [ "numpy.zeros", "numpy.maximum", "numpy.row_stack", "numpy.column_stack", "numpy.prod", "numpy.array", "numpy.minimum" ] ]
DequanZhu/facenet
[ "78f32c2fa43217489f5b340826991780b3276fe2" ]
[ "src/train.py" ]
[ "from __future__ import division\r\nimport os\r\nimport sys\r\nimport numpy as np\r\nimport tensorflow as tf\r\nfrom tensorflow.keras.optimizers import schedules, Adam\r\nfrom tensorflow.python.keras.losses import SparseCategoricalCrossentropy\r\nfrom tensorflow.python.keras.metrics import SparseCategoricalAccuracy...
[ [ "tensorflow.summary.scalar", "tensorflow.keras.optimizers.Adam", "tensorflow.math.l2_normalize", "tensorflow.python.keras.losses.SparseCategoricalCrossentropy", "tensorflow.python.keras.metrics.SparseCategoricalAccuracy", "tensorflow.GradientTape", "tensorflow.train.CheckpointManager",...
huzq/scikit-learn
[ "f862129f36786acbae3d9f2d161bbb72d77b87ec" ]
[ "sklearn/decomposition/tests/test_incremental_pca.py" ]
[ "\"\"\"Tests for Incremental PCA.\"\"\"\nimport numpy as np\nimport pytest\nimport warnings\n\nfrom sklearn.utils._testing import assert_almost_equal\nfrom sklearn.utils._testing import assert_array_almost_equal\nfrom sklearn.utils._testing import assert_allclose_dense_sparse\nfrom numpy.testing import assert_array...
[ [ "numpy.sum", "numpy.eye", "numpy.sign", "sklearn.utils._testing.assert_almost_equal", "numpy.abs", "sklearn.utils._testing.assert_array_almost_equal", "sklearn.utils._testing.assert_allclose_dense_sparse", "numpy.random.randn", "numpy.random.RandomState", "numpy.arange", ...
EVS-ATMOS/precipitation-onset
[ "3c9cf010b5246d17fae2796d271f6a8be892efb1" ]
[ "radar/Amazon Weather Program.py" ]
[ "import boto\nfrom boto.s3.connection import S3Connection\nfrom datetime import timedelta, datetime\nimport os\nimport pyart\nfrom matplotlib import pyplot as plt\nimport tempfile\nimport numpy as np\nimport cartopy\n\n\ndef _nearestDate(dates, pivot):\n return min(dates, key=lambda x: abs(x - pivot))\n\n\ndef g...
[ [ "numpy.arange", "matplotlib.pyplot.figure" ] ]
magnusmel/Serverless-Deep-Learning-with-TensorFlow-and-AWS-Lambda
[ "cc226deb7b46852407900f9fec0caf62638defe2" ]
[ "lesson7.4/tensorflow/contrib/distributions/python/ops/bijectors/affine_impl.py" ]
[ "# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.ops.math_ops.equal", "tensorflow.python.ops.math_ops.abs", "tensorflow.python.ops.array_ops.zeros", "tensorflow.python.ops.array_ops.shape", "tensorflow.contrib.distributions.python.ops.distribution_util.make_tril_scale", "tensorflow.contrib.distributions.python.ops.shap...
bryanblackbee/topic__deep-learning-python
[ "6d916cee3457a886f3bffc7a5dd97a4d627b3c23" ]
[ "chap06/weather_modelv4_stacked_rnn_with_dropout.py" ]
[ "import numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\nfrom tensorflow.keras.backend import clear_session\nfrom tensorflow.keras.optimizers import RMSprop\nfrom tensorflow.keras.preprocessing import sequence\nfrom tensorflow.keras.models import Sequential\nfrom tensorflow.keras.layers import (...
[ [ "tensorflow.keras.models.Sequential", "pandas.read_csv", "tensorflow.keras.optimizers.RMSprop", "pandas.DataFrame", "tensorflow.keras.backend.clear_session", "tensorflow.keras.callbacks.EarlyStopping", "tensorflow.keras.layers.GRU", "tensorflow.keras.layers.Dense", "tensorflow....
Johnny-Wish/fake-news-detection-pipeline
[ "3bdad59d680968375a23d72c80af7d6ef11d7711" ]
[ "model/__main__.py" ]
[ "import os\nimport argparse\nimport heapq\nimport pandas as pd\nimport pickle as pkl\nfrom embedding_utils import EmbeddingLoader\nfrom sklearn.model_selection import RandomizedSearchCV, train_test_split\nfrom sklearn.model_selection._search import BaseSearchCV\n\n\ndef print_cv_result(result, n):\n if isinstanc...
[ [ "pandas.DataFrame", "sklearn.model_selection.RandomizedSearchCV", "sklearn.model_selection.train_test_split" ] ]
naototachibana/chainer-chemistry
[ "04577ba920b46c7141d4f01e212f7040eb91db19" ]
[ "examples/own_dataset/train_own_dataset.py" ]
[ "#!/usr/bin/env python\n\nfrom __future__ import print_function\n\nimport chainer\nimport numpy\nimport os\n\nfrom argparse import ArgumentParser\nfrom chainer.datasets import split_dataset_random\nfrom chainer import functions as F\nfrom chainer import optimizers\nfrom chainer import training\nfrom chainer.iterato...
[ [ "numpy.asarray" ] ]
Tsunaou/Event-Structure-Enumerator
[ "6b8df19517d73d6c144a4395aa9bf33e24bcd8cd" ]
[ "lemma1.py" ]
[ "import numpy as np\nfrom typing import List\nfrom utils import allSubLists, filterPositionsId, setFilterPositionsId, makeAlphas\n\n\ndef cond1(A: np.ndarray, alpha: np.array) -> List[np.array]:\n \"\"\"\n 生成满足条件的 betas\n :param A: 矩阵 n*n\n :param alpha: 行向量 1*n\n :return: 是否可以返回一个符合条件的beta,若存在则返回所有b...
[ [ "numpy.ones", "numpy.zeros" ] ]
juancruzgassoloncan/Udacity-Robo-nanodegree
[ "7621360ce05faf90660989e9d28f56da083246c9" ]
[ "src/rover/ex_4/extra_functions.py" ]
[ "import numpy as np\nimport cv2\nimport matplotlib.image as mpimg\n\n\ndef perspect_transform(img, src, dst):\n\n # Get transform matrix using cv2.getPerspectivTransform()\n M = cv2.getPerspectiveTransform(src, dst)\n # Warp image using cv2.warpPerspective()\n # keep same size as input image\n warped...
[ [ "numpy.zeros_like", "numpy.float32", "matplotlib.image.imread" ] ]
thomas-brth/sentinel
[ "747bd0b9a4a9356be69aae6d6ebbfa500e845218" ]
[ "sentIA/utils/figure/__init__.py" ]
[ "# Plotting tools and utility functions\n# Nested GridSpec : https://matplotlib.org/stable/gallery/subplots_axes_and_figures/gridspec_nested.html#sphx-glr-gallery-subplots-axes-and-figures-gridspec-nested-py\n# GridSpec : https://matplotlib.org/stable/gallery/subplots_axes_and_figures/gridspec_multicolumn.html#sphx...
[ [ "matplotlib.pyplot.figure", "numpy.interp" ] ]
Demonliquid/cars-python-cleaning
[ "91c516a33c4522114dc024cfaf04f1c1d594f973" ]
[ "Bike cleaning/motocicleta_p6.py" ]
[ "# %%\nimport os\nimport pandas as pd\nimport numpy as np\nimport datetime\nfrom googletrans import Translator\nfrom vininfo import Vin\n\n\n# %%\nmotocicleta_p6 = pd.read_excel(r'D:\\Basededatos\\Origen\\MOTOCICLETAS-COLOMBIA\\MOTOCICLETA_P6.xlsx', engine='openpyxl')\n\n\n# %%\nmotocicleta_p6.rename(columns={'MODE...
[ [ "pandas.read_excel", "pandas.concat" ] ]
Taerbit/EXP
[ "b7468ae77bfccd7283cdfc0215af9d1032e472ce" ]
[ "src/run2.py" ]
[ "import Controller\nimport tensorflow as tf\nimport time\nimport efficientnet.tfkeras\n\n# Run pre-loaded pipelines\nstart_time= time.time()\n\n#E0 - G\nmodel = tf.keras.models.load_model(\"..\\\\models\\\\200324_EfficientNetB0NoisyStudent_001.h5\", compile=False)\n\nimage_tags = [\"C:\\\\Users\\\\finnt\\\\OneDrive...
[ [ "tensorflow.keras.models.load_model" ] ]
noe/iterative_expansion_lms
[ "a5533a60f6f749673dae2329eeae0646ee2b740d" ]
[ "src/syntaxd/fairseq/criterion.py" ]
[ "# 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\nfrom argparse import ArgumentParser\nimport math\nimport torch.nn.functional as F\n\nfrom fairseq import utils\n\nfrom fairseq.crite...
[ [ "torch.nn.functional.nll_loss" ] ]
1054/a3cosmos-gas-evolution
[ "66027338602ed2830e289cfbb4db6200739b39d6" ]
[ "a3cosmos_gas_evolution/Common_Python_Code/calc_galaxy_luminosity_function.py" ]
[ "#!/usr/bin/env python\n# \n# 20190222\n# copied from \"calc_stellar_mass_function.py\", this code will superceed \"calc_stellar_mass_function.py\". \n# \n\nfrom __future__ import print_function\n\nimport os, sys, re, json, time, astropy\nimport numpy as np\nfrom astropy.table import Table, Column, hstack\nfrom...
[ [ "numpy.exp", "numpy.log10", "numpy.array", "numpy.isscalar", "numpy.linspace" ] ]
lindsey98/lightly
[ "6a66a38ccd9fc4422f5ebb0a13009abe8266d8e2" ]
[ "mytest/test.py" ]
[ "import torch\nimport torchvision\nimport lightly.models as models\nimport lightly.loss as loss\nimport lightly.data as data\nimport pytorch_lightning as pl\nimport math\nimport os\nimport shutil\nfrom tqdm import tqdm\nimport logging\nos.environ[\"CUDA_VISIBLE_DEVICES\"]=\"1,0\"\n\nexp_name = 'CIFAR10'\nstart_epoc...
[ [ "torch.utils.data.DataLoader", "torch.std", "torch.nn.functional.normalize", "torch.cuda.is_available", "torch.nn.DataParallel" ] ]
bartolkaruza/pytorch-lightning-bolts
[ "2e903c333c37ea83394c7da2ce826de1b82fb356" ]
[ "pl_bolts/models/self_supervised/simclr/transforms.py" ]
[ "import numpy as np\n\nfrom pl_bolts.utils.warnings import warn_missing_pkg\n\ntry:\n import torchvision.transforms as transforms\nexcept ModuleNotFoundError:\n warn_missing_pkg('torchvision') # pragma: no-cover\n _TORCHVISION_AVAILABLE = False\nelse:\n _TORCHVISION_AVAILABLE = True\n\ntry:\n import...
[ [ "numpy.array", "numpy.random.random_sample" ] ]
gibbbone/ohmnet
[ "1b4ee4c146f526ea6e2f4f8607df7e9687204a9e" ]
[ "ohmnet/gensimmod/utils.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# This OhmNet code is adapted from:\n# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>\n# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html\n\nfrom __future__ import with_statement\n\nimport logging\nimport itertools\n\nlogger = lo...
[ [ "numpy.array", "numpy.ascontiguousarray" ] ]
Levi-Armstrong/point_cloud_segmentation
[ "ed0db4f49aa378901860dd2a81897b79e0fe1a66" ]
[ "pcs_detection/src_python/pcs_detection/utils.py" ]
[ "'''\n * @file utils.py\n * @brief Helper functions for viewing images and reading/writing config and label files \n *\n * @author Jake Janssen\n * @date Oct 24, 2019\n * @version TODO\n * @bug No known bugs\n *\n * @copyright Copyright (c) 2019, Southwest Research Institute\n *\n * @par License\n * Software Licens...
[ [ "pandas.DataFrame", "numpy.min", "numpy.argmax", "numpy.zeros" ] ]
izumiya-keisuke/mmle
[ "43dbe281ee591a2d7f7cc1e5386ed04651930205" ]
[ "examples/distributed_data_parallel.py" ]
[ "\"\"\"\nCopyright 2021 Keisuke Izumiya\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to ...
[ [ "torch.utils.data.DataLoader", "torch.distributed.get_rank", "torch.distributed.get_world_size", "torch.utils.data.distributed.DistributedSampler", "torch.randn", "torch.cuda.device_count", "torch.distributed.barrier" ] ]
AlphaJia/faster-rcnn.pytorch
[ "b79a83c84f083495e2edb1a55a970946cb59add2" ]
[ "lib/setup.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n# !/usr/bin/env python\n\nimport glob\nimport os\n\nimport torch\nfrom setuptools import find_packages\nfrom setuptools import setup\nfrom torch.utils.cpp_extension import CUDAExtension\nfrom torch.utils.cpp_extension import CUDA_HOME\nfrom t...
[ [ "torch.cuda.is_available" ] ]
danielaeblancoj/Design-of-experiment-Python
[ "541c00a96fad4a9ef074c4fb4dde9c65a5deb20d" ]
[ "DOE_functions.py" ]
[ "#====================\n# Essential imports\n#====================\nfrom pyDOE import *\nfrom pyDOE_corrected import *\nfrom diversipy import *\nimport pandas as pd\nimport numpy as np\n\n# ===========================================================================================================\n# Function for co...
[ [ "numpy.vectorize", "numpy.zeros", "pandas.DataFrame", "numpy.abs", "numpy.array" ] ]
kidakoji/ImgRecogRecipe
[ "14b9dec4d581c0109539f96072d883ec4f9d64a1" ]
[ "docker-python3-flask-ml-app/app/keras_mnist/kerasPredict.py" ]
[ "# -*- coding: utf-8 -*-\n# -----------------------------------------------------------------------------\n#\n#\nimport os\n\nimport numpy as np\nfrom keras import backend as Keras\nfrom keras.models import load_model\n\n# -----------------------------------------------------------------------------\n#\nKeras.clear...
[ [ "numpy.expand_dims" ] ]
avielfedida/DecisiveML
[ "cf0feceeda0fc4abd4af6cc766c7c14ee655b576" ]
[ "decisiveml/montecarlo.py" ]
[ "import pandas as pd\nimport random\nimport statistics\nimport logging\n\nlogger = logging.getLogger(__name__)\n\n# MonkeyPatch Python 3.6 choices into random 3.5.5\nimport bisect as _bisect\nimport itertools as _itertools\n\n\ndef choices(population, weights=None, cum_weights=None, k=1):\n \"\"\"Return a k size...
[ [ "pandas.Series", "pandas.DataFrame" ] ]
deeplearningunb/NextValue
[ "50c04ea55fa3141009d1f018197e02344fdda327" ]
[ "src/App.py" ]
[ "import tkinter as tk\nfrom os import listdir\nfrom os.path import isfile, join\nfrom pages.StartPage import StartPage\nfrom pages.ConfigurationPage import ConfigurationPage\nfrom pages.TrainingPage import TrainingPage\nfrom pages.ResultPage import ResultPage\nfrom pages.ChooseDatePage import ChooseDatePage\nfrom p...
[ [ "pandas.read_csv", "sklearn.preprocessing.MinMaxScaler", "numpy.reshape", "pandas.merge", "numpy.array" ] ]
brian220/Sketch2PointCloud
[ "17e8657ffc6605804ab4f1da89f446ea4d37665c" ]
[ "models/networks_graphx_refine_no_img_encoder.py" ]
[ "import torch.nn as nn\nimport torch\nimport torch.nn.functional as F\nimport torchvision.models\nimport os\n\nimport utils.network_utils\nfrom utils.pointnet2_utils import PointNetSetAbstraction,PointNetFeaturePropagation\n\nimport cuda.emd.emd_module as emd\n\n# Set the path for pretrain weight\nos.environ['TORCH...
[ [ "torch.stack", "torch.sqrt", "torch.cuda.is_available", "torch.cat", "torch.floor", "torch.nn.functional.sigmoid", "torch.cos", "torch.nn.BatchNorm1d", "torch.sin", "torch.arange", "torch.nn.DataParallel", "torch.unsqueeze", "torch.ceil", "torch.ones_like", ...
escribano89/cartpole-REINFORCE
[ "e2d79ce721a50feea783c368a66c6f80631cdf26" ]
[ "policy.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.distributions import Categorical\n\nclass Policy(nn.Module):\n def __init__(self, s_size=4, h_size=8, a_size=2):\n super(Policy, self).__init__()\n \n self.fc1 = nn.Linear(s_size, h_size)\n self.fc2 = nn...
[ [ "torch.nn.functional.softmax", "torch.from_numpy", "torch.nn.Linear", "torch.distributions.Categorical" ] ]
dpton/tensorflow-attention-rnn
[ "a1b8884640ca49d6fdebc7df2167e4353364a243" ]
[ "utils/reprocessing.py" ]
[ "# _*_ coding:utf-8 _*_\n# !/usr/bin/env python\nfrom __future__ import absolute_import, division, print_function, unicode_literals\nimport numpy as np\nimport logging\nimport nltk\nfrom nltk.corpus import stopwords\nfrom gensim.models.wrappers import FastText\nfrom gensim.models import Word2Vec\nimport random\nimp...
[ [ "tensorflow.placeholder", "tensorflow.PaddingFIFOQueue" ] ]
zzm422/automl
[ "38d6623e0983d6ee1d16bb5b1db5c6b2ccbb3ecf" ]
[ "efficientdet/inference.py" ]
[ "# Copyright 2020 Google Research. 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...
[ [ "tensorflow.compat.v1.RunOptions", "tensorflow.compat.v1.image.combined_non_max_suppression", "tensorflow.python.client.timeline.Timeline", "tensorflow.compat.v1.expand_dims", "tensorflow.compat.v1.shape", "tensorflow.compat.v1.graph_util.convert_variables_to_constants", "tensorflow.co...
marcelodiaz558/BasicSR
[ "1d5138ed567e966965fd1540838d27e6f5082b70" ]
[ "basicsr/ops/upfirdn2d/upfirdn2d.py" ]
[ "# modify from https://github.com/rosinality/stylegan2-pytorch/blob/master/op/upfirdn2d.py # noqa:E501\n\nimport os\nimport torch\nfrom torch.autograd import Function\nfrom torch.nn import functional as F\n\nBASICSR_JIT = os.getenv('BASICSR_JIT')\nif BASICSR_JIT == 'True':\n from torch.utils.cpp_extension impor...
[ [ "torch.nn.functional.conv2d", "torch.nn.functional.pad", "torch.flip" ] ]
tdiethe/MXFusion
[ "fbdba79ca85cb5a9760722ffd932b9ec4c401745" ]
[ "testing/distributions/gp/cond_gp_test.py" ]
[ "import pytest\nimport mxnet as mx\nimport numpy as np\nfrom mxfusion.models import Model\nfrom mxfusion.components.variables.runtime_variable import is_sampled_array, get_num_samples\nfrom mxfusion.components.distributions import ConditionalGaussianProcess\nfrom mxfusion.components.distributions.gp.kernels import ...
[ [ "numpy.allclose", "scipy.linalg.lapack.dtrtrs", "numpy.issubdtype", "numpy.random.randn", "scipy.stats.multivariate_normal.logpdf", "numpy.linalg.cholesky", "numpy.random.rand", "matplotlib.use", "numpy.array" ] ]
irfankhan10/pytket-extensions
[ "8ab33c1dcff91dfc50d471fbc160277e82d2492b" ]
[ "modules/pytket-aqt/tests/convert_test.py" ]
[ "# Copyright 2020-2021 Cambridge Quantum Computing\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appl...
[ [ "numpy.allclose" ] ]
Ipuch/Humanoid2D
[ "3afd3926b9fb2ddc39be9bef99b89f864f41dcb7", "3afd3926b9fb2ddc39be9bef99b89f864f41dcb7" ]
[ "examples/walk_integration.py", "examples/walk10Dof.py" ]
[ "import biorbd\nimport numpy as np\n\nfrom bioptim import OdeSolver, CostType, RigidBodyDynamics\nfrom bioptim import Solver, DefectType\n\nfrom humanoid_2d import Humanoid2D, Integration, add_custom_plots, HumanoidOcp, HumanoidOcpMultiPhase\n\n\ndef torque_driven_dynamics(model: biorbd.Model, states: np.array, con...
[ [ "matplotlib.pyplot.figure", "numpy.hstack", "matplotlib.pyplot.show", "matplotlib.pyplot.plot" ], [ "numpy.array" ] ]