repo_name stringlengths 6 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... | [
[
"torch.randn_like",
"numpy.random.seed",
"torch.cat",
"torch.load",
"torch.manual_seed",
"torch.min",
"pandas.json_normalize",
"numpy.save",
"torch.nn.Linear",
"torch.nn.functional.mse_loss",
"numpy.random.normal",
"torch.no_grad",
"torch.FloatTensor",
"torc... |
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... | [
[
"sklearn.feature_extraction.text.CountVectorizer",
"pandas.read_csv",
"sklearn.neighbors.NearestNeighbors"
]
] |
simra/msrflute | [
"c28e2e6bcfa9464b8640ccd625393bbed28491c3",
"c28e2e6bcfa9464b8640ccd625393bbed28491c3",
"c28e2e6bcfa9464b8640ccd625393bbed28491c3"
] | [
"utils/preprocessing/create-json.py",
"extensions/privacy/__init__.py",
"core/server.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.concat",
"pandas.read_csv",
"pandas.DataFrame"
],
[
"torch.normal",
"numpy.log",
"numpy.minimum",
"numpy.sqrt",
"torch.randint",
"torch.cat",
"torch.randn",
"torch.tensor",
"torch.dot",
"scipy.special.betaln",
"torch.rand",
"torch.nn.function... |
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",
"2d981a1bd3f2982d5d36932d7d5a38e912fcdba3"
] | [
"circletracking/algebraic.py",
"circletracking/find.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.diag",
"numpy.dot",
"numpy.sqrt",
"numpy.linspace",
"numpy.arctan",
"numpy.issubdtype",
"numpy.dtype",
"numpy.max",
"numpy.mean",
"numpy.ones_like",
"numpy.linalg.eig",
"numpy.arange",
"numpy.finfo",
"numpy.sin",
"numpy.argmax",
"numpy.diff",
... |
fengwang/jax | [
"88f888d498ee5a063c7fbdf96ea593ab8bd01849",
"5726be1a9e1d33d8e0052d09104501b19fb6efcf"
] | [
"jax/_src/numpy/lax_numpy.py",
"jax/experimental/jax2tf/jax2tf.py"
] | [
"# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ... | [
[
"numpy.asarray",
"numpy.issubdtype",
"numpy.dtype",
"numpy.concatenate",
"numpy.any",
"numpy.where",
"numpy.arange",
"numpy.uint8",
"numpy.ceil",
"numpy.diff",
"numpy.ravel",
"numpy.load",
"numpy.zeros",
"numpy.log",
"numpy.multiply",
"numpy.ndim",
... |
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 ... | [
[
"torch.device",
"numpy.ones"
]
] |
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.AvgPool3d",
"torch.nn.Dropout",
"torch.nn.ModuleList",
"torch.nn.AdaptiveAvgPool3d",
"torch.nn.Linear",
"torch.nn.Conv3d",
"torch.nn.Identity",
"numpy.prod"
]
] |
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",
"numpy.linspace",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlabel",
"numpy.array",
"matplotlib.pyplot.show",
"numpy.loadtxt",
"matplotlib.pyplot.ylabel"
],
[
"numpy.abs",
"scipy.special.ellipe",
"scipy.special.ellipk"... |
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.absolute",
"numpy.random.choice"
]
] |
OliverT1/gnina_tensorflow | [
"339310c643a85e6df1248d03dbbe4ae78cf59f19",
"339310c643a85e6df1248d03dbbe4ae78cf59f19"
] | [
"layers/layer_functions.py",
"layers/inverse_convolution.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"
],
[
"tensorflow.keras.layers.Conv3D"
]
] |
hologerry/magenta | [
"c08c17a548f97a3f5d294a010c28ea2803718d6f",
"c08c17a548f97a3f5d294a010c28ea2803718d6f",
"c08c17a548f97a3f5d294a010c28ea2803718d6f",
"c08c17a548f97a3f5d294a010c28ea2803718d6f",
"c08c17a548f97a3f5d294a010c28ea2803718d6f",
"c08c17a548f97a3f5d294a010c28ea2803718d6f",
"c08c17a548f97a3f5d294a010c28ea2803718d6... | [
"magenta/models/gansynth/lib/data_helpers.py",
"magenta/common/beam_search_test.py",
"magenta/music/encoder_decoder.py",
"magenta/music/alignment/align_fine_lib.py",
"magenta/models/score2perf/modalities_test.py",
"magenta/models/score2perf/datagen_beam_test.py",
"magenta/models/onsets_frames_transcript... | [
"# 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.add_to_collection",
"tensorflow.compat.v1.shape",
"tensorflow.compat.v1.name_scope"
],
[
"tensorflow.compat.v1.test.main"
],
[
"numpy.log",
"numpy.random.choice",
"tensorflow.compat.v1.t... |
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.Dropout",
"torch.nn.Conv2d",
"torch.nn.Tanh",
"torch.nn.ReLU",
"torch.nn.init.constant",
"torch.nn.init.xavier_uniform"
]
] |
csherstan/DeepRL | [
"fbf8da1f158792a0b9d29728c9d407ae40573070",
"fbf8da1f158792a0b9d29728c9d407ae40573070"
] | [
"aux_0.99_10.0.py",
"aux_0.99_1.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"
],
[
"torch.optim.Adam"
]
] |
wqruan/tf-encrypted | [
"50ee4ae3ba76b7c1f70a90e18f875191adea0a07",
"50ee4ae3ba76b7c1f70a90e18f875191adea0a07",
"50ee4ae3ba76b7c1f70a90e18f875191adea0a07"
] | [
"primitives/tf_encrypted/primitives/paillier/primitives_test.py",
"operations/secure_random/test_secure_random.py",
"tf_encrypted/config.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"
],
[
"tensorflow.constant",
"numpy.testing.assert_array_equal",
"numpy.testing.assert_raises",
"tensorflow.Session",
"tensorflow.load_op_library"
],
[
"tensorflow.matmul",
"tensorflow.Graph",
"tensorflow.train.Server",
"tensorflow.constant",
"tenso... |
guilhermeprokisch/catalyst | [
"21e096b261912d9e905584178d6ee626072c23cb",
"21e096b261912d9e905584178d6ee626072c23cb"
] | [
"catalyst/pipeline/mixins.py",
"catalyst/utils/calendars/exchange_calendar_tsx.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.array",
"numpy.vstack",
"numpy.full"
],
[
"pandas.tseries.holiday.MO",
"pandas.tseries.holiday.Holiday"
]
] |
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",
"c2eba497bebc53e5a03807bdd8873c55f0ec73e1",
"c2eba497bebc53e5a03807bdd8873c55f0ec73e1"
] | [
"udemy/Deep Learning A-Z/Volume 2 - Unsupervised Deep Learning/Part 4 - Self Organizing Maps (SOM)/mega_case_study.py",
"udemy/Machine Learning A-Z/Part 2 - Regression/Section 7 - Support Vector Regression (SVR)/svr.py",
"udemy/Deep Learning A-Z/Volume 2 - Unsupervised Deep Learning/Part 4 - Self Organizing Map... | [
"# 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... | [
[
"numpy.concatenate",
"sklearn.preprocessing.StandardScaler",
"pandas.read_csv",
"sklearn.preprocessing.MinMaxScaler"
],
[
"numpy.array",
"pandas.read_csv",
"matplotlib.pyplot.title",
"matplotlib.pyplot.scatter",
"sklearn.svm.SVR",
"matplotlib.pyplot.xlabel",
"sklear... |
gatling-nrl/scikit-fem | [
"04730d80d612470b7e802eed4c21dd96b89cef61",
"73890816c2142385abf4a9ffcd8d233e2d25e865"
] | [
"skfem/generic_utils.py",
"tests/test_elements.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.asarray",
"numpy.array"
],
[
"numpy.sqrt",
"numpy.nonzero",
"numpy.eye",
"numpy.ones",
"numpy.array",
"numpy.zeros",
"numpy.sum"
]
] |
asears/stanza | [
"f91ca215e175d4f7b202259fe789374db7829395",
"f91ca215e175d4f7b202259fe789374db7829395"
] | [
"stanza/models/parser.py",
"stanza/models/langid/model.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... | [
[
"numpy.argmax",
"torch.cuda.is_available"
],
[
"torch.nn.Dropout",
"torch.nn.CrossEntropyLoss",
"torch.nn.LSTM",
"torch.sum",
"torch.nn.Embedding",
"torch.tensor",
"torch.nn.Linear",
"torch.save",
"torch.cuda.is_available",
"torch.device",
"torch.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.figure",
"matplotlib.pyplot.clf",
"matplotlib.pyplot.stackplot",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] |
Zwysilence/tensorflow | [
"b55001be83da044bb21d539d433dec6231eaec55",
"b55001be83da044bb21d539d433dec6231eaec55",
"b55001be83da044bb21d539d433dec6231eaec55",
"b55001be83da044bb21d539d433dec6231eaec55",
"b55001be83da044bb21d539d433dec6231eaec55",
"b55001be83da044bb21d539d433dec6231eaec55",
"b55001be83da044bb21d539d433dec6231eaec5... | [
"tensorflow/contrib/rnn/python/ops/rnn_cell.py",
"tensorflow/python/ops/image_ops_test.py",
"tensorflow/compiler/tests/momentum_test.py",
"tensorflow/python/ops/boosted_trees_ops.py",
"tensorflow/contrib/framework/python/ops/sort_ops_test.py",
"tensorflow/python/kernel_tests/matrix_exponential_op_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.math_ops.log",
"tensorflow.python.framework.tensor_shape.TensorShape",
"tensorflow.python.ops.array_ops.constant",
"tensorflow.python.ops.array_ops.shape",
"tensorflow.python.ops.array_ops.split",
"tensorflow.contrib.compiler.jit.experimental_jit_scope",
"tensorf... |
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",
"335334fed073f8d14a4c5137eaa0424efcbcac63"
] | [
"maptrainer/model/LinRNNModel.py",
"maptrainer/model/LinearModel.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.Linear",
"torch.nn.Dropout",
"torch.nn.RNN",
"torch.from_numpy"
],
[
"torch.nn.Linear",
"torch.nn.Dropout",
"torch.zeros"
]
] |
sjdv1982/silk | [
"232e759cabfc7a87550d1e50ed9c4de4e0e57bf4",
"232e759cabfc7a87550d1e50ed9c4de4e0e57bf4"
] | [
"tests/silk/test-complex.py",
"tests/mixed/tofromstream2.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"
],
[
"numpy.zeros",
"numpy.dtype"
]
] |
jayzed82/scikit-learn | [
"f52c0d441502117020ac0152cea8e89367f55ed6",
"f52c0d441502117020ac0152cea8e89367f55ed6"
] | [
"sklearn/feature_selection/_univariate_selection.py",
"sklearn/metrics/tests/test_common.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.dot",
"numpy.asarray",
"scipy.special.chdtrc",
"numpy.mean",
"numpy.zeros_like",
"numpy.where",
"scipy.sparse.issparse",
"numpy.unique",
"numpy.arange",
"numpy.finfo",
"scipy.special.fdtrc",
"numpy.zeros",
"numpy.nonzero",
"numpy.isnan",
"numpy.ap... |
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",
"014ea2e5a8a647cfa5e3050a5c1299eb39b293d3"
] | [
"pandas/tests/plotting/test_datetimelike.py",
"pandas/core/dtypes/cast.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.core.indexes.datetimes.DatetimeIndex",
"pandas.to_datetime",
"pandas.Series",
"numpy.asarray",
"pandas.DataFrame",
"pandas.tests.plotting.common.TestPlotBase.setup_method",
"pandas.core.indexes.period.Period",
"pandas.core.indexes.datetimes.date_range",
"numpy.random.ra... |
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.hstack",
"numpy.asarray",
"numpy.full",
"numpy.concatenate",
"numpy.array"
]
] |
guntbert/astropy | [
"f2d2add09e5b1638b2698f19a4d46fcca19e82be",
"f2d2add09e5b1638b2698f19a4d46fcca19e82be",
"f2d2add09e5b1638b2698f19a4d46fcca19e82be"
] | [
"astropy/visualization/wcsaxes/tests/test_display_world_coordinates.py",
"astropy/io/fits/column.py",
"astropy/io/votable/tests/vo_test.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"
],
[
"numpy.uint32",
"numpy.dtype",
"numpy.bitwise_and",
"numpy.char.array",
"numpy.uint16",
"numpy.uint64",
"numpy.ndarray.__setitem__",
"numpy.left_shift",
"numpy.add",
"numpy.min_scalar_type",
... |
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.read_json",
"pandas.DataFrame.from_dict"
]
] |
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.squeeze",
"numpy.linalg.norm",
"numpy.ones",
"numpy.append",
"numpy.argmin",
"numpy.random.rand",
"numpy.array",
"numpy.zeros"
]
] |
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",
"a25af2a2378bc3d4f5ec73b948d048d1b707454c",
"a25af2a2378bc3d4f5ec73b948d048d1b707454c",
"a25af2a2378bc3d4f5ec73b948d048d1b707454c",
"a25af2a2378bc3d4f5ec73b948d048d1b707454c",
"a25af2a2378bc3d4f5ec73b948d048d1b707454c",
"a25af2a2378bc3d4f5ec73b948d048d1b707454... | [
"test/python/quantum_info/test_weyl.py",
"qiskit/visualization/tools/pi_check.py",
"qiskit/quantum_info/operators/channel/kraus.py",
"qiskit/pulse/pulse_lib/continuous.py",
"test/python/quantum_info/operators/channel/test_transformations.py",
"qiskit/pulse/pulse_lib/samplers/decorators.py",
"qiskit/quan... | [
"# -*- 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.identity",
"numpy.sqrt",
"numpy.testing.assert_allclose"
],
[
"numpy.arange",
"numpy.abs"
],
[
"numpy.dot",
"numpy.conj",
"numpy.sqrt",
"numpy.allclose",
"numpy.kron",
"numpy.array"
],
[
"numpy.cosh",
"numpy.asarray",
"n... |
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.Session",
"tensorflow.initialize_all_variables",
"tensorflow.train.GradientDescentOptimizer",
"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",
"58a200c84810f20099265e30200327eefddb3eff"
] | [
"cunet/ftanet/network/ftanet.py",
"cunet/ftanet/evaluator.py",
"cunet/ftanet/loader.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.layers.Concatenate",
"tensorflow.keras.layers.GlobalAveragePooling2D",
"tensorflow.keras.Input",
"tensorflow.keras.layers.Lambda",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv1D",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.UpSampl... |
seungkee/2nd-place-solution-to-facebook-image-similarity-matching-track | [
"716667bf416239f448e4ea2730a2cc5146536719",
"716667bf416239f448e4ea2730a2cc5146536719"
] | [
"code/descriptor_track/train_eval/make_n_perquery_df_gpu.py",
"code/matching_track/train_eval/merge_score2.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... | [
[
"numpy.expand_dims",
"torch.multiprocessing.spawn",
"torch.cat",
"torch.utils.data.DataLoader",
"pandas.DataFrame",
"torch.nn.BCEWithLogitsLoss",
"torch.no_grad",
"torch.device",
"torch.distributed.get_rank",
"torch.save",
"pandas.read_csv",
"torch.utils.data.Distri... |
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... | [
[
"pandas.read_csv",
"numpy.abs",
"numpy.gradient",
"pandas.Panel",
"pandas.DataFrame",
"numpy.testing.assert_array_equal",
"pandas.cut",
"numpy.count_nonzero",
"numpy.testing.assert_allclose",
"pandas.MultiIndex.from_product",
"numpy.array",
"matplotlib.pyplot.show",... |
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.dot",
"numpy.array"
]
] |
xudong-sun/mxnet | [
"fc9e70bf2d349ad4c6cb65ff3f0958e23a7410bf",
"fe42d30d5885dd576cb871fd70594c53efce9b42"
] | [
"example/reinforcement-learning/a3c/a3c.py",
"tests/python/unittest/test_random.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.log",
"numpy.random.choice",
"numpy.reshape",
"numpy.set_printoptions",
"numpy.tile",
"numpy.zeros"
],
[
"scipy.stats.norm.ppf",
"numpy.log",
"scipy.stats.norm.cdf",
"numpy.sqrt",
"scipy.stats.uniform.ppf",
"scipy.stats.nbinom.cdf",
"scipy.stats.gamma... |
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.keras.activations.relu",
"tensorflow.reduce_sum",
"tensorflow.keras.initializers.constant"
]
] |
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[... | [
[
"matplotlib.pyplot.imshow",
"numpy.linspace",
"numpy.meshgrid",
"matplotlib.pyplot.scatter",
"numpy.ones",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.show"
]
] |
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.power",
"numpy.asarray",
"numpy.set_printoptions",
"numpy.matmul",
"numpy.ones"
]
] |
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",
"7992bf97711919f56f80bff9e5510cead4ab2095",
"7992bf97711919f56f80bff9e5510cead4ab2095",
"7992bf97711919f56f80bff9e5510cead4ab2095",
"ae244e6dabeb6b879c5adb9ca4c2a85cb4722dc5",
"7992bf97711919f56f80bff9e5510cead4ab2095",
"7992bf97711919f56f80bff9e5510cead4ab209... | [
"tensorflow/python/framework/func_graph.py",
"tensorflow/python/ops/cond_v2.py",
"tensorflow/python/data/experimental/kernel_tests/scan_test.py",
"tensorflow/python/keras/engine/topology_test.py",
"tensorflow/contrib/saved_model/python/saved_model/keras_saved_model.py",
"tensorflow/python/saved_model/util... | [
"# 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.record_operation",
"tensorflow.python.util.tf_decorator.rewrap",
"tensorflow.python.util.tf_decorator.make_decorator",
"tensorflow.python.eager.context.context",
"tensorflow.python.eager.context.executing_eagerly",
"tensorflow.python.ops.array_ops.identity",
... |
qbxlvnf11/graph-neural-networks-for-graph-classification | [
"5d69ead58c786aa8e472ab0433156fe09fe6ca4b",
"5d69ead58c786aa8e472ab0433156fe09fe6ca4b"
] | [
"models/GraphUNet.py",
"layers/graph_isomorphism_layer.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"
],
[
"torch.nn.BatchNorm1d",
"torch.ones",
"torch.max",
"torch.min",
"torch.nn.ModuleList",
"torch.nn.Linear",
"torch.nn.functional.relu",
"torch.spmm"
]
] |
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.sort",
"numpy.all",
"numpy.std",
"numpy.array",
"numpy.flip",
"numpy.random.randint"
]
] |
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.tpu.experimental.initialize_tpu_system",
"tensorflow.config.list_logical_devices",
"tensorflow.get_logger",
"tensorflow.distribute.cluster_resolver.TPUClusterResolver",
"tensorflow.config.list_physical_devices",
"tensorflow.config.experimental_connect_to_cluster",
"tensorfl... |
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",
"ddcc4de713b46e3e9dcb77cc08c502ce4df54f76",
"ddcc4de713b46e3e9dcb77cc08c502ce4df54f76",
"ddcc4de713b46e3e9dcb77cc08c502ce4df54f76",
"ddcc4de713b46e3e9dcb77cc08c502ce4df54f7... | [
"scripts/sources/s_checklist_scenariobased_step07.py",
"functions_legacy/GraphicalLasso.py",
"scripts/sources/S_PricingEquityTaylor.py",
"scripts/sources/s_estimation_copmarg_ratings.py",
"scripts/sources/S_KolSmirnTestSVI.py",
"functions_legacy/MetrHastAlgo.py",
"scripts/sources/s_mean_var_solution_rob... | [
"#!/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... | [
[
"numpy.log",
"pandas.read_csv",
"pandas.Series",
"numpy.squeeze",
"numpy.exp"
],
[
"numpy.ones",
"numpy.cov",
"numpy.array",
"numpy.zeros",
"matplotlib.pyplot.style.use"
],
[
"matplotlib.pyplot.legend",
"numpy.log",
"numpy.sqrt",
"numpy.linspace",
... |
SayanGhoshBDA/code-backup | [
"8b6135facc0e598e9686b2e8eb2d69dd68198b80",
"8b6135facc0e598e9686b2e8eb2d69dd68198b80",
"8b6135facc0e598e9686b2e8eb2d69dd68198b80"
] | [
"python/data_sutram/scraper/appl_map.py",
"python/python_backup/wisp_old/archives/s_wisp_v3.py",
"python/pyopenGL/ogl2/ogl_14_plot_2.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"
],
[
"pandas.io.json.json_normalize"
],
[
"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.compat.v1.metrics.mean",
"tensorflow.reduce_sum",
"tensorflow.stack",
"tensorflow.cast",
"tensorflow.equal",
"tensorflow.boolean_mask",
"tensorflow.compat.v1.metrics.mean_absolute_error",
"tensorflow.gradients",
"tensorflow.compat.v1.metrics.root_mean_squared_error"... |
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.shape",
"tensorflow.keras.layers.Dense",
"tensorflow.sigmoid",
"tensorflow.keras.Sequential",
"tensorflow.math.log"
]
] |
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.title",
"matplotlib.pyplot.cm.get_cmap",
"numpy.arange",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.subplot",
"numpy.log10",
"matplotlib.pyplot.xlabel",
"numpy.array"... |
sunandita/ICAPS_Summer_School_RAE_2020 | [
"a496b62185bcfdd2c76eb7986ae99cfa85708d28",
"a496b62185bcfdd2c76eb7986ae99cfa85708d28",
"a496b62185bcfdd2c76eb7986ae99cfa85708d28",
"a496b62185bcfdd2c76eb7986ae99cfa85708d28"
] | [
"problems/OF/auto/problem80_OF.py",
"problems/OF/auto/problem52_OF.py",
"problems/OF/auto/problem14_OF.py",
"problems/OF/auto/problem31_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.normal",
"numpy.random.beta"
],
[
"numpy.random.normal",
"numpy.random.beta"
],
[
"numpy.random.normal",
"numpy.random.beta"
],
[
"numpy.random.normal",
"numpy.random.beta"
]
] |
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... | [
[
"torch.manual_seed",
"numpy.array",
"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.min",
"numpy.reshape",
"numpy.tile",
"numpy.max",
"numpy.zeros"
]
] |
aaalgo/aardvark | [
"cdd42acdc20e85f4b3070dd1486f3dc9c9a9b905",
"cdd42acdc20e85f4b3070dd1486f3dc9c9a9b905"
] | [
"cxray/predict-cls-vis.py",
"zoo/slim/nets/resnet_utils.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.import_graph_def",
"tensorflow.constant",
"tensorflow.local_variables_initializer",
"numpy.clip",
"tensorflow.placeholder",
"tensorflow.python.framework.meta_graph.read_meta_graph_file",
"numpy.concatenate",
"tensorflow.ConfigProto",
"numpy.copy",
"numpy.argmax"... |
shippingwang/models | [
"a92e212932b764e500a833527e0fb772ac9a491a",
"a92e212932b764e500a833527e0fb772ac9a491a",
"a92e212932b764e500a833527e0fb772ac9a491a"
] | [
"PaddleCV/PaddleDetection/tools/face_eval.py",
"PaddleCV/Research/danet/utils/voc_data.py",
"PaddleCV/PaddleDetection/inference/tools/vis.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.maximum",
"numpy.minimum",
"numpy.row_stack",
"numpy.prod",
"numpy.column_stack",
"numpy.array",
"numpy.zeros"
],
[
"numpy.array"
],
[
"numpy.array"
]
] |
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.train.CheckpointManager",
"tensorflow.python.keras.metrics.SparseCategoricalAccuracy",
"tensorflow.Variable",
"tensorflow.math.l2_normalize",
"tensorflow.keras.optimizers.schedules.ExponentialDecay",
"tensorflow.GradientTape",
"tensorflow.keras.optimizers.Adam",
"tensor... |
huzq/scikit-learn | [
"f862129f36786acbae3d9f2d161bbb72d77b87ec",
"f862129f36786acbae3d9f2d161bbb72d77b87ec",
"f862129f36786acbae3d9f2d161bbb72d77b87ec",
"f862129f36786acbae3d9f2d161bbb72d77b87ec",
"f862129f36786acbae3d9f2d161bbb72d77b87ec",
"f862129f36786acbae3d9f2d161bbb72d77b87ec",
"f862129f36786acbae3d9f2d161bbb72d77b87e... | [
"sklearn/decomposition/tests/test_incremental_pca.py",
"examples/model_selection/plot_roc_crossval.py",
"sklearn/tree/_classes.py",
"sklearn/feature_extraction/tests/test_feature_hasher.py",
"examples/neural_networks/plot_mnist_filters.py",
"sklearn/decomposition/tests/test_fastica.py",
"sklearn/utils/t... | [
"\"\"\"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.dot",
"sklearn.utils._testing.assert_allclose_dense_sparse",
"numpy.sum",
"numpy.abs",
"sklearn.decomposition.IncrementalPCA",
"numpy.arange",
"numpy.eye",
"sklearn.datasets.load_iris",
"numpy.linalg.norm",
"sklearn.datasets.make_low_rank_matrix",
"numpy.sign",
... |
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",
"cc226deb7b46852407900f9fec0caf62638defe2",
"cc226deb7b46852407900f9fec0caf62638defe2",
"cc226deb7b46852407900f9fec0caf62638defe2",
"cc226deb7b46852407900f9fec0caf62638defe2",
"ec8216568d8cd9810004067558041c11a8356685",
"cc226deb7b46852407900f9fec0caf62638defe... | [
"lesson7.4/tensorflow/contrib/distributions/python/ops/bijectors/affine_impl.py",
"lesson5.4/index.py",
"lesson7.4/tensorflow/contrib/fused_conv/ops/gen_fused_conv2d_bias_activation_op.py",
"lesson7.4/tensorflow/python/ops/gen_set_ops.py",
"lesson7.4/tensorflow/python/ops/gen_string_ops.py",
"lesson7.4/te... | [
"# 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.check_ops.assert_less",
"tensorflow.python.ops.array_ops.shape",
"tensorflow.python.ops.math_ops.abs",
"tensorflow.contrib.distributions.python.ops.shape._DistributionShape",
"tensorflow.python.framework.tensor_util.is_tensor",
"tensorflow.contrib.linalg.LinearOperat... |
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.callbacks.ModelCheckpoint",
"pandas.read_csv",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.optimizers.RMSprop",
"pandas.DataFrame",
"tensorflow.keras.layers.GRU",
"tensorflow.keras.backend.clear_session",
"tensorflow.keras.callbacks.EarlyStopping",
"ten... |
Johnny-Wish/fake-news-detection-pipeline | [
"3bdad59d680968375a23d72c80af7d6ef11d7711",
"3bdad59d680968375a23d72c80af7d6ef11d7711"
] | [
"model/__main__.py",
"model/hypertuned_models.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... | [
[
"sklearn.model_selection.train_test_split",
"sklearn.model_selection.RandomizedSearchCV",
"pandas.DataFrame"
],
[
"sklearn.neural_network.MLPClassifier",
"sklearn.naive_bayes.GaussianNB",
"sklearn.linear_model.LogisticRegression",
"sklearn.ensemble.RandomForestClassifier",
"skl... |
naototachibana/chainer-chemistry | [
"04577ba920b46c7141d4f01e212f7040eb91db19",
"04577ba920b46c7141d4f01e212f7040eb91db19",
"04577ba920b46c7141d4f01e212f7040eb91db19"
] | [
"examples/own_dataset/train_own_dataset.py",
"tests/links_tests/array_tests/test_shape_transformer_to_2d.py",
"chainer_chemistry/models/prediction/regressor.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"
],
[
"numpy.arange",
"numpy.array",
"numpy.allclose"
],
[
"numpy.asscalar",
"numpy.isscalar"
]
] |
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.zeros",
"numpy.ones"
]
] |
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... | [
[
"matplotlib.image.imread",
"numpy.zeros_like",
"numpy.float32"
]
] |
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... | [
[
"numpy.interp",
"matplotlib.pyplot.figure"
]
] |
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.concat",
"pandas.read_excel"
]
] |
Taerbit/EXP | [
"b7468ae77bfccd7283cdfc0215af9d1032e472ce",
"b7468ae77bfccd7283cdfc0215af9d1032e472ce"
] | [
"src/run2.py",
"test/test_container.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"
],
[
"numpy.array_equal"
]
] |
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.linspace",
"numpy.log10",
"numpy.isscalar",
"numpy.array",
"numpy.exp"
]
] |
lindsey98/lightly | [
"6a66a38ccd9fc4422f5ebb0a13009abe8266d8e2",
"6a66a38ccd9fc4422f5ebb0a13009abe8266d8e2"
] | [
"mytest/test.py",
"lightly/active_learning/scorers/classification.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.nn.functional.normalize",
"torch.utils.data.DataLoader",
"torch.std",
"torch.cuda.is_available",
"torch.nn.DataParallel"
],
[
"numpy.partition",
"numpy.log2",
"numpy.ones_like",
"numpy.nan_to_num",
"numpy.concatenate",
"numpy.max",
"numpy.zeros_like",
... |
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.ascontiguousarray",
"numpy.array"
]
] |
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... | [
[
"numpy.argmax",
"numpy.zeros",
"pandas.DataFrame",
"numpy.min"
]
] |
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.distributed.DistributedSampler",
"torch.randn",
"torch.cuda.device_count",
"torch.utils.data.DataLoader",
"torch.distributed.barrier",
"torch.distributed.get_rank",
"torch.distributed.get_world_size"
]
] |
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.abs",
"pandas.DataFrame",
"numpy.vectorize",
"numpy.array",
"numpy.zeros"
]
] |
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",
"cf0feceeda0fc4abd4af6cc766c7c14ee655b576"
] | [
"decisiveml/montecarlo.py",
"tests/test_helpers.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"
],
[
"pandas.to_datetime"
]
] |
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.merge",
"pandas.read_csv",
"numpy.reshape",
"numpy.array",
"sklearn.preprocessing.MinMaxScaler"
]
] |
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.cat",
"torch.sin",
"torch.cuda.is_available",
"torch.clamp",
"torch.sqrt",
"torch.tensor",
"torch.nn.functional.sigmoid",
"torch.arange",
"torch.ones_like",
"torch.cos",
"torch.normal",
"torch.nn.BatchNorm1d",
"torch.floor",
"torch.zeros_like",
"t... |
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.Linear",
"torch.nn.functional.softmax",
"torch.distributions.Categorical",
"torch.from_numpy"
]
] |
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.math.sigmoid",
"tensorflow.compat.v1.concat",
"tensorflow.compat.v1.train.ExponentialMovingAverage",
"tensorflow.compat.v1.io.gfile.glob",
"tensorflow.compat.v1.shape",
"tensorflow.compat.v1.gfile.GFile",
"tensorflow.compat.v1.train.Saver",
"tensorflow.python.... |
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.flip",
"torch.nn.functional.conv2d",
"torch.nn.functional.pad"
]
] |
tdiethe/MXFusion | [
"fbdba79ca85cb5a9760722ffd932b9ec4c401745",
"fbdba79ca85cb5a9760722ffd932b9ec4c401745"
] | [
"testing/distributions/gp/cond_gp_test.py",
"testing/distributions/gp/kernel_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",
"matplotlib.use",
"numpy.issubdtype",
"scipy.linalg.lapack.dtrtrs",
"numpy.random.randn",
"scipy.stats.multivariate_normal.logpdf",
"numpy.random.rand",
"numpy.linalg.cholesky",
"numpy.array"
],
[
"numpy.issubdtype",
"numpy.random.rand",
"numpy... |
irfankhan10/pytket-extensions | [
"8ab33c1dcff91dfc50d471fbc160277e82d2492b",
"8ab33c1dcff91dfc50d471fbc160277e82d2492b"
] | [
"modules/pytket-aqt/tests/convert_test.py",
"modules/pytket-pyquil/pytket/extensions/pyquil/backends/forest.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"
],
[
"numpy.exp"
]
] |
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.plot",
"numpy.hstack",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
],
[
"numpy.array"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.