repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
rknop/amuse | [
"85d5bdcc29cfc87dc69d91c264101fafd6658aec",
"3ac3b6b8f922643657279ddee5c8ab3fc0440d5e",
"3ac3b6b8f922643657279ddee5c8ab3fc0440d5e"
] | [
"src/amuse/ic/_limepy/limepy.py",
"examples/syllabus/stellar_simple.py",
"src/amuse/ext/orbital_elements.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport numpy\nimport scipy\nfrom numpy import exp, sqrt, pi, sin\nfrom scipy.interpolate import PiecewisePolynomial, interp1d\nfrom scipy.special import gamma, gammainc, dawsn, hyp1f1\nfrom scipy.integrate import ode, quad, simps\nfrom math import factorial\n\n# Authors: Mark Gieles,... | [
[
"numpy.array",
"scipy.special.gammainc",
"numpy.isnan",
"scipy.special.gamma",
"numpy.zeros",
"scipy.integrate.simps",
"scipy.special.hyp1f1",
"numpy.sum",
"numpy.sin",
"scipy.interpolate.PiecewisePolynomial",
"numpy.exp",
"numpy.interp",
"numpy.sqrt",
"nump... |
toandaominh1997/pipelineservice | [
"2946fc6b61cc73f8695eff03f5d2066e6064ad3f"
] | [
"pipelineservice/tf/tabnet.py"
] | [
"import numpy as np\nimport tensorflow as tf\n\ndef sparsemax(logits, axis: int = -1):\n r\"\"\"Sparsemax activation function.\n For each batch $i$, and class $j$,\n compute sparsemax activation function:\n $$\n \\mathrm{sparsemax}(x)[i, j] = \\max(\\mathrm{logits}[i, j] - \\tau(\\mathrm{logits}[i, :... | [
[
"tensorflow.ones",
"tensorflow.reshape",
"tensorflow.keras.layers.Dense",
"tensorflow.math.sqrt",
"tensorflow.keras.layers.BatchNormalization",
"tensorflow.math.equal",
"tensorflow.cast",
"tensorflow.rank",
"tensorflow.shape",
"tensorflow.math.cumsum",
"tensorflow.keras... |
vishalbelsare/OpenMatch | [
"84b25502bf52c58b9e71bd0754b2fc192d9b448f",
"84b25502bf52c58b9e71bd0754b2fc192d9b448f"
] | [
"train.py",
"OpenMatch/modules/embedders/embedder.py"
] | [
"import argparse\nimport datetime\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.distributions import Categorical\n\nfrom transformers import AutoTokenizer, get_linear_schedule_with_warmup\nimport OpenMatch as om\nfrom transformers import AdamW\n\nimport torch.distributed as dist\... | [
[
"torch.nn.functional.gumbel_softmax",
"torch.nn.MarginRankingLoss",
"torch.cat",
"torch.distributions.Categorical",
"torch.sigmoid",
"torch.nn.DataParallel",
"torch.no_grad",
"torch.nn.parallel.DistributedDataParallel",
"torch.nn.functional.log_softmax",
"torch.utils.data.d... |
thunder95/Paddle | [
"27cb52a4cda29184851a53d63ea45d436c632e59"
] | [
"python/paddle/fluid/tests/unittests/ipu/test_model_parallel_ipu.py"
] | [
"# Copyright (c) 2022 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.allclose",
"numpy.array",
"numpy.tile",
"numpy.random.rand"
]
] |
usuaero/MachUp_Py | [
"381d160afd8bff46cb1d3cd37c5b9b97e1e670e6"
] | [
"test/use_cases/u1_from_file/test_from_file_u1.py"
] | [
"\"\"\"Use Case #1: Read in from .json file\n\nThe following is an example of how to construct an Airplane object from\nan inputfile using the Machup geometry module.\n\nOne of the simplest ways to build an Airplane object is to read in an\nexisting Airplane from a .json file. These files can be exported from\nthe ... | [
[
"numpy.allclose",
"numpy.array"
]
] |
lxc86739795/vehicle_reid_by_parsing | [
"a96496e11124d47d08a478696e0d3deb1e9b0c1a"
] | [
"engine/trainer_selfgcn.py"
] | [
"# encoding: utf-8\n\"\"\"\n@author: l1aoxingyu\n@contact: sherlockliao01@gmail.com\n\"\"\"\n\nimport os\nimport shutil\nimport time\nimport random\n\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\nfrom torch import nn\n\n# Changed by Xinchen Liu\n\nfrom data import get_dataloader_mask\nfrom da... | [
[
"torch.nn.functional.normalize",
"numpy.array",
"torch.cat",
"numpy.matmul",
"numpy.zeros",
"torch.nn.MSELoss",
"numpy.asarray",
"numpy.sum",
"torch.save",
"torch.no_grad",
"torch.from_numpy",
"torch.cuda.empty_cache",
"torch.nn.CrossEntropyLoss",
"torch.nn.... |
marsbroshok/imgaug-doc | [
"7443efbf66263c0c44581ed62501fae6f88b047a"
] | [
"scripts/generate_rtd_images/gen_segmentation_maps.py"
] | [
"from __future__ import print_function, division\n\nfrom .utils import save\n\n\ndef main():\n \"\"\"Generate all example images for the chapter `Examples: Segmentation Maps`\n in the documentation.\"\"\"\n chapter_examples_segmentation_maps_simple()\n # chapter_examples_segmentation_maps_bool_full()\n ... | [
[
"numpy.zeros"
]
] |
Taiki-Ishigaki/ERIC | [
"81a0eb3cbfdadfdb1f4efde711fe1c3b26ba876a"
] | [
"bipedal_robot/lipm/lipm_simulate.py"
] | [
"#!/usr/bin/env python3\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.animation as animation\nimport matplotlib.patches as patches\n\nclass LinearInvertedPendulum(object):\n gravity = 9.8 # gravity\n\n def __init__(self, height = 1.5, weight = 50):\n self.height = height\n ... | [
[
"numpy.array",
"numpy.sin",
"matplotlib.patches.Rectangle",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.figure",
"numpy.radians",
"numpy.sqrt",
"numpy.cos",
"matplotlib.pyplot.show",
"numpy.linspace",
"matplotlib.pyplot.subplot"
]
] |
ttthomaschan/cptn-crnn-pytorch | [
"396ffd8fe92bcc766c0c43e51bb3fb4c339098e7"
] | [
"train_code/train_ctpn/ctpn_train.py"
] | [
"#-*- coding:utf-8 -*-\n#'''\n# Created on 18-12-27 上午10:31\n#\n#'''\nimport os\nos.environ['CUDA_VISIBLE_DEVICES'] = '0'\nimport torch\nfrom torch.utils.data import DataLoader\nfrom torch import optim\nimport torchvision\nimport numpy as np\nimport argparse\n\nimport config\nfrom ctpn_model import CTPN_Model, RPN_... | [
[
"torch.optim.lr_scheduler.StepLR",
"numpy.random.seed",
"torch.save",
"torch.optim.SGD",
"torch.random.manual_seed",
"torch.cuda.empty_cache",
"torch.cuda.is_available",
"torch.utils.data.DataLoader",
"torch.load"
]
] |
HappyKL/mindspore | [
"c3d1f54c7f6d6f514e5748430d24b16a4f9ee9e5"
] | [
"tests/ut/python/parallel/test_reshape_unexpand.py"
] | [
"# Copyright 2020 Huawei Technologies Co., Ltd\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 l... | [
[
"numpy.full",
"numpy.ones"
]
] |
shauncameron/ChatBot | [
"0b3168204788e3e44369c0a96f8e0321f74790ad"
] | [
"venv/Lib/site-packages/nltk/metrics/segmentation.py"
] | [
"# Natural Language Toolkit: Text Segmentation Metrics\n#\n# Copyright (C) 2001-2021 NLTK Project\n# Author: Edward Loper <edloper@gmail.com>\n# Steven Bird <stevenbird1@gmail.com>\n# David Doukhan <david.doukhan@gmail.com>\n# URL: <http://nltk.org/>\n# For license information, see LICENSE.TXT\n\n\n... | [
[
"numpy.arange",
"numpy.empty"
]
] |
lithomas1/fastparquet | [
"089a592ebf9eca72b7ef16134d89749ff5454936"
] | [
"fastparquet/test/test_overwrite.py"
] | [
"\"\"\"\n test_overwrite.py\n Tests for overwriting parquet files.\n\"\"\"\n\nimport pandas as pd\nimport pytest\nfrom fastparquet import write, ParquetFile\nfrom fastparquet.test.util import tempdir\n\n\ndef test_write_with_rgp_by_date_as_index(tempdir):\n\n # Step 1 - Writing of a 1st df, with `row_group_o... | [
[
"pandas.DataFrame"
]
] |
MinRegret/TigerControl | [
"b1ca0617cbb2198f9d5cb37f725f3d7accbab08f"
] | [
"deprecated/environments/pybullet/tests/test_humanoid.py"
] | [
"\"\"\"\nAn example to run of the half cheetah gym environment with random gaits.\n\"\"\"\n\nimport tigercontrol\nimport numpy as np\nimport time\n\ndef test_humanoid(steps=1000, verbose=False):\n environment = tigercontrol.environment(\"PyBullet-Humanoid\")\n environment.reset(render=verbose)\n\n sum_rewa... | [
[
"numpy.random.normal"
]
] |
zqNiu/Rollout_algorithm_for_3D_assignment | [
"a658c5198376e30f2997d907608382c6c5a7a167"
] | [
"Rollout_for_Three_Dimensional_Assignment.py"
] | [
"import numpy as np\r\nimport time\r\nimport gurobipy as gp\r\nfrom gurobipy import GRB\r\n\r\nN=99999\r\ndef rollout_3D_assignment(cost_matrix,maximize=False):\r\n \"\"\"Solve the 3D assignment using the rollout algorithm according to Bertsekas's paper\r\n\r\n parameters\r\n ----------\r\n cost_matrix ... | [
[
"numpy.max",
"numpy.asarray",
"numpy.zeros",
"numpy.ones",
"numpy.min",
"numpy.where",
"numpy.random.randint",
"numpy.transpose",
"numpy.issubdtype",
"numpy.dtype"
]
] |
mimbres/SeqSkip | [
"031add5ba22cad1665d76b2cb21e8f6c1e1357e5",
"031add5ba22cad1665d76b2cb21e8f6c1e1357e5"
] | [
"seqskip_train_S_seq1eH_eMSE.py",
"seqskip_train_seq1H_genlog128.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Dec 29 13:44:03 2018\nStudent Net\nS_seq1eH_e\n\n- non-autoregressive (not feeding predicted labels)\n- instance Norm.\n- G: GLU version\n- H: Highway-net version\n\n@author: mimbres\n\"\"\"\n\nimport torch\nimport torch.nn as nn\nimport torch... | [
[
"torch.zeros",
"torch.optim.lr_scheduler.StepLR",
"torch.nn.Conv1d",
"torch.autograd.Variable",
"numpy.set_printoptions",
"numpy.sum",
"torch.nn.ReLU",
"numpy.arange",
"numpy.array2string"
],
[
"torch.zeros",
"torch.sigmoid",
"torch.cat",
"torch.optim.lr_sch... |
ericchen321/DMGNN | [
"759adf63d97d8b69fb30ccaaed0332e66699a1fa"
] | [
"v-dmgnn-gan_cmu/processor/recognition.py"
] | [
"import os\nimport sys\nimport argparse\nimport yaml\nimport time\nimport numpy as np\n\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt\n\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\n\nimport torchlight\nfrom torchlight import str2bool\nfrom torchlight import DictAct... | [
[
"torch.cat",
"numpy.ones_like",
"numpy.mean",
"numpy.multiply",
"numpy.where",
"torch.nn.BCEWithLogitsLoss",
"torch.exp",
"numpy.random.normal",
"numpy.zeros_like",
"numpy.random.binomial",
"torch.FloatTensor",
"numpy.save",
"numpy.eye",
"torch.abs",
"to... |
luigiberducci/dirl | [
"5f7997aea20dfb7347ebdee66de9bea4e6cd3c62"
] | [
"spectrl/util/io.py"
] | [
"import argparse\nimport os\nimport pathlib\n\nimport cv2\nimport pickle\nimport numpy as np\n\nfrom matplotlib import pyplot as plt\nfrom PIL import Image\nfrom numpy import genfromtxt\n\n\ndef parse_command_line_options(print_options=False):\n parser = argparse.ArgumentParser()\n parser.add_argument(\"-n\",... | [
[
"matplotlib.pyplot.rcParams.update",
"numpy.array",
"matplotlib.pyplot.errorbar",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.legend",
"numpy.mean",
"numpy.std",
"numpy.amax",
"matplotlib.pyplot.fill_between",
"numpy.append",
"matplotlib.pyplot.show",
"matplotlib.p... |
DataBiosphere/data-browser | [
"de981a83a51ad936e184e81727c708b04f94d901"
] | [
"analytics/hdgar-book/analytics_charts.py"
] | [
"import analytics_api as ga\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom google.cloud import bigquery\nimport json\nimport requests\nfrom functools import cache\n# from IPython.core.display import HTML\nimport re\n\n\ndef authenticate_ga():\n\tga.authenticate();\n\n# def display_l... | [
[
"pandas.to_datetime",
"pandas.Index",
"pandas.isna",
"pandas.DataFrame",
"pandas.MultiIndex.from_tuples",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.rc",
"matplotlib.pyplot.barh",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.show",
"pandas.Period"
]
] |
intendo/pygbe | [
"6ac43ebfb3a4d342a380d7938af119cfba587746"
] | [
"pygbe/projection.py"
] | [
"\"\"\"\nIt contains the functions to calculate the different potentials:\n-The single and double layer potential.\n-The adjoint double layer potential.\n-The reaction potential.\n\"\"\"\nimport numpy\nfrom numpy import pi\n\nfrom pygbe.classes import Event\nfrom pygbe.quadrature import getWeights\nfrom pygbe.tree.... | [
[
"numpy.array",
"numpy.zeros",
"numpy.sum",
"numpy.arange",
"numpy.ravel",
"numpy.sqrt",
"numpy.int32"
]
] |
PKU-DAIR/2021_CCF_BDCI_LargeBERT_Rank1st | [
"6382433cda69c655f03c3cc284dc076407f18dc9"
] | [
"code/fused_ops/fused_ops/layernorm_module/fused_layer_norm.py"
] | [
"import math\nimport torch\nimport numbers\nfrom torch.nn.parameter import Parameter\nfrom torch.nn import init\nfrom torch.nn import functional as F\nimport fused_layernorm_fast_cuda\nimport fused_layernorm_backward_gamma_beta_cuda\n\nclass FusedLayerNormFastFunction(torch.autograd.Function):\n\n @staticmethod\n ... | [
[
"torch.Size",
"torch.nn.functional.layer_norm",
"torch.nn.init.ones_",
"torch.nn.init.zeros_",
"torch.Tensor"
]
] |
carterbox/jeweler | [
"9f78a2f5580db613f691061c72c4601a1699e76e"
] | [
"src/jeweler/objective.py"
] | [
"\"\"\"Defines objective functions for rating codes.\"\"\"\n\nimport numpy as np\n\n__all__ = [\n 'spectral_flatness',\n 'minimal_variance',\n 'coded_factor',\n]\n\n\ndef minimal_variance(code, axis=-1):\n \"\"\"Return an objective function that minimizes variance of the FFT.\n\n We chose a code that... | [
[
"numpy.square",
"numpy.fft.rfft",
"numpy.log",
"numpy.min",
"numpy.mean",
"numpy.prod",
"numpy.abs",
"numpy.var"
]
] |
mehtajinesh/MultipurposeChatBot | [
"b51c7f1d91a48cccc3d6f7b9782ec21d0e4fc74b"
] | [
"rasa_test/share/doc/networkx-2.3/examples/drawing/plot_unix_email.py"
] | [
"#!/usr/bin/env python\n\"\"\"\n==========\nUnix Email\n==========\n\nCreate a directed graph, allowing multiple edges and self loops, from\na unix mailbox. The nodes are email addresses with links\nthat point from the sender to the receivers. The edge data\nis a Python email.Message object which contains all of\... | [
[
"matplotlib.pyplot.show"
]
] |
Helicopt/EOD | [
"a45b74430070d82d9248a10fb5e1116bb7ababe1"
] | [
"eod/__init__.py"
] | [
"# flake8: noqa F401\nimport os\nimport sys\nimport importlib\n\n\"\"\"Set matplotlib up.\"\"\"\n# Import from third library\nimport matplotlib\n\n__version__ = \"0.0.1\" # Available for other modules to import\n\n# import for register\n\nfrom .commands import *\nfrom .runner import * \nfrom .data import *\nfrom .... | [
[
"matplotlib.use"
]
] |
idamfadilah/belajarpython | [
"72c5108a7f44d8b8f33dc5d5b1bd4f8a83f8b811"
] | [
"kelas_2b/dyning.py"
] | [
"import sqlite3\nimport csv\nfrom selenium import webdriver \nimport matplotlib.pyplot as plt\nimport requests\n\nclass Dyning(object):\n def __init__(self, kelas, npm, hari):\n self.kelas = kelas\n self.npm = npm\n self.hari = hari\n \n def angkatan(self):\n if len(str(self... | [
[
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.title",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.show"
]
] |
nick-cheatwood7/spotify-recommend-python | [
"5d00756d1d4ff973f74e73841ae5640742c7745e"
] | [
"src/main.py"
] | [
"# Import needed packages\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\n# Import custom module\nimport spotify as sp\n\n\ndef main():\n # Init seaborn\n sns.set()\n\n # Read in data\n data = pd.read_csv(\"./data/tracks.csv\")\n\n # Get metrics on ... | [
[
"pandas.read_csv"
]
] |
rajatvd/rigl | [
"59f6e8351177b62a6dabb8303e4cb371d35eb7c9",
"59f6e8351177b62a6dabb8303e4cb371d35eb7c9"
] | [
"rigl/rigl_tf2/networks.py",
"rigl/sparse_utils_test.py"
] | [
"# coding=utf-8\n# Copyright 2020 RigL 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 applica... | [
[
"tensorflow.compat.v2.keras.layers.MaxPool2D",
"tensorflow.compat.v2.keras.layers.Dense",
"tensorflow.compat.v2.keras.layers.Flatten",
"tensorflow.compat.v2.keras.Sequential",
"tensorflow.compat.v2.keras.layers.Conv2D",
"tensorflow.compat.v2.keras.layers.BatchNormalization"
],
[
"t... |
markpp/pl_bolts | [
"d11b684b9c03dd6ab9dedae034fdf39cf0b8c63f"
] | [
"datamodules/sewer_datamodule.py"
] | [
"import torch\nfrom torch.utils.data import DataLoader\nimport torchvision\nimport pytorch_lightning as pl\n\nimport os, sys\n\nsys.path.append('../')\n\nclass SewerDataModule(pl.LightningDataModule):\n def __init__(self, data_dir, dataset, batch_size, image_size, in_channels, n_workers):\n super().__init... | [
[
"torch.utils.data.DataLoader"
]
] |
justinhchae/app_courts | [
"c46d48c4fa02cec91bda6fc3818ab677d6a83281"
] | [
"analyze_data/network.py"
] | [
"import numpy as np\nimport pandas as pd\nimport sidetable\n\nimport plotly.graph_objects as go\nimport plotly_express as px\nfrom plotly.subplots import make_subplots\n\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\nfrom clean_data.cleaner import Cleaner\nfrom do_data.getter import Reader\nfrom do_data... | [
[
"pandas.to_datetime",
"pandas.Timedelta",
"pandas.merge",
"matplotlib.pyplot.get_cmap",
"matplotlib.pyplot.figure",
"sklearn.preprocessing.MinMaxScaler",
"pandas.concat",
"matplotlib.pyplot.show",
"pandas.read_csv",
"numpy.datetime64"
]
] |
SuccessMary/graduation | [
"0c63d21386442b4b4a1c10e7ddf91da73f723ce8"
] | [
"core/test.py"
] | [
"\"\"\"Test script to classify target data.\"\"\"\r\n\r\nimport torch\r\nimport torch.nn as nn\r\n\r\nfrom utils import make_variable\r\nimport params\r\n\r\n\r\ndef eval_tgt(encoder, classifier, data_loader):\r\n \"\"\"Evaluation for target encoder by source classifier on target dataset.\"\"\"\r\n # set eval... | [
[
"torch.nn.MSELoss"
]
] |
WayGang/DataMining_IMDB_movies | [
"cedc7c3f6c1a1e8aa8b1741da2c9e650055d04de"
] | [
"kmeans.py"
] | [
"# Copyright2019 Gang Wei wg0502@bu.edu\n\nimport random\nfrom copy import deepcopy\nimport numpy as np\nimport time\nfrom numpy.random import choice\n\n\ndef getCluster(X, U):\n \"\"\"\n :param X: X is a set of x\n :param u: u is a set of u\n :return: [category,category,....]\n \"\"\"\n error = 0... | [
[
"numpy.square",
"numpy.array",
"numpy.random.choice"
]
] |
nishanthkoganti-gep/product_classify | [
"75f3cbd23aa508e5ad9b1c0bb59c2dc758530336"
] | [
"data_loader/data_loaders.py"
] | [
"# import modules\nimport torch\nimport pickle\nimport numpy as np\nimport pandas as pd\nfrom os.path import join\nfrom torch.utils.data import Dataset\nfrom sklearn.utils.class_weight import compute_class_weight\n\n# relative imports\nfrom base import BaseDataLoader\nfrom IPython.terminal.debugger import set_trace... | [
[
"torch.is_tensor",
"numpy.unique"
]
] |
retzger/tensorflow | [
"9aaf74d733a38cf587a75f2ffaa05d8a51d8c32b"
] | [
"tensorflow/lite/testing/generate_examples_lib.py"
] | [
"# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"numpy.random.choice",
"tensorflow.nn.conv2d",
"tensorflow.space_to_depth",
"tensorflow.zeros_like",
"tensorflow.lite.testing.generate_examples_report.make_report_table",
"tensorflow.greater",
"tensorflow.stack",
"numpy.random.random",
"tensorflow.assert_greater_equal",
"te... |
mariajcb/migrahack | [
"c4a4728703fe8a68e99c0dbcb71ee5bb5aae5cf9"
] | [
"scrape/ice_clean.py"
] | [
"import pandas as pd\nfrom pandas.tseries.offsets import MonthEnd\nimport csv\nimport json\n\n\ndef clean_for_db(df, lat_key):\n df = df.loc[df.County != \"All\"]\n df = df.loc[df.MonthYear != \"All\"]\n df = df.assign(\n startTime=df.MonthYear.apply(lambda x: pd.to_datetime(x).isoformat()),\n ... | [
[
"pandas.to_datetime",
"pandas.read_csv",
"pandas.tseries.offsets.MonthEnd",
"pandas.merge"
]
] |
ExplorerFreda/ResDAVEnet-VQ | [
"93c5e63bff3a1827b43435461b029b0dc14c9ded",
"93c5e63bff3a1827b43435461b029b0dc14c9ded"
] | [
"run_unit_analysis.py",
"run_ResDavenetVQ.py"
] | [
"# Author: Wei-Ning Hsu, David Harwath\nimport argparse\nimport json\nimport numpy as np\nimport os\nimport pickle\nimport sys\nimport time\nimport torch\n\nimport dataloaders\nimport models\nfrom steps.unit_analysis import (comp_code_to_wordprec, comp_word_to_coderecall,\n get_high_... | [
[
"torch.cuda.is_available"
],
[
"torch.utils.data.dataloader.DataLoader",
"torch.load"
]
] |
codelover-without-talent/GPflow | [
"1af7b1ca7da6687974150a1440d821a106b2159d"
] | [
"gpflow/multioutput/features.py"
] | [
"# Copyright 2018 GPflow 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 or agreed t... | [
[
"tensorflow.shape",
"tensorflow.transpose",
"tensorflow.eye"
]
] |
v-mehta/kapture | [
"b95a15b83032d667282ab96fa5be5327b2c99ec7"
] | [
"kapture/converter/opensfm/import_opensfm.py"
] | [
"# Copyright 2020-present NAVER Corp. Under BSD 3-clause license\n\n\"\"\"\nOpenSfM to kapture import functions.\n\"\"\"\n\nimport logging\nimport os\nimport os.path as path\nimport numpy as np\nimport quaternion\nimport gzip\nimport pickle\nimport json\nfrom tqdm import tqdm\nfrom typing import Any, Dict, Optional... | [
[
"numpy.ones",
"numpy.load"
]
] |
Green-Resilience/wfRunner | [
"df5cff4e51484ac8b8a0fbdb4ec3ad6d05586817"
] | [
"gsr/gs/objects/TransmittedSolar.py"
] | [
"#-------------------------------------------------------------------------------\r\n# Name: TransmittedSolar.py\r\n# Purpose: Green Scale Tool TM Transmitted Solar Module (handles transmittance through a surface)\r\n#\r\n# Author: Holly Tina Ferguson\r\n#\r\n# Created: 15/09/2013\r\n# Copyright... | [
[
"scipy.interpolate.interp1d"
]
] |
aitikgupta/swi-ml | [
"c7a44c71683a9bfb4adb13c7eb6117e652177807"
] | [
"swi_ml/utils/manipulations.py"
] | [
"from itertools import combinations_with_replacement\n\ntry:\n import numpy as np\nexcept ImportError:\n # exception already handled in backend\n pass\n\n\ndef index_combinations(degree, num_features):\n combinations = [\n combinations_with_replacement(range(num_features), i)\n for i in ra... | [
[
"numpy.empty",
"numpy.mean",
"numpy.shape",
"numpy.std",
"numpy.prod"
]
] |
ogomezr/concept-drift-simulator | [
"0de37e816fc57693bcfce1cf53d5719bb3eb207d"
] | [
"modules/GenData.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Jan 27 13:20:01 2020\n\n@author: Oscar\n\"\"\"\nimport numpy as np\n\ndef straighLine(x, m, n):\n y = m * x + n\n return y\n\n\ndef polFunc(x, a, b, c, d):\n y = (a * x**3) + (b * x**2) + c * x + d\n return y\n\n\ndef sinFunc(x, m,... | [
[
"numpy.sin"
]
] |
Musketeer-H2020/MMLL-Robust | [
"ccc0a7674a04ae0d00bedc38893b33184c5f68c6",
"ccc0a7674a04ae0d00bedc38893b33184c5f68c6"
] | [
"MMLL/preprocessors/pca.py",
"MMLL/models/POM1/CommonML/POM1_CommonML.py"
] | [
"# -*- coding: utf-8 -*-\r\n'''\r\nPreprocessing object for PCA extraction\r\n@author: Angel Navia Vázquez\r\n'''\r\n__author__ = \"Angel Navia Vázquez, UC3M.\"\r\n\r\nimport numpy as np\r\n\r\nclass PCA_model():\r\n\r\n def __init__(self):\r\n \"\"\"\r\n Parameters\r\n ----------\r\n ... | [
[
"numpy.dot",
"numpy.linalg.svd"
],
[
"numpy.max",
"numpy.array",
"numpy.copy",
"numpy.min",
"numpy.mean"
]
] |
Potopoles/pgw-python | [
"72b279725d7baf470403005a423a32217cb09402"
] | [
"Preprocess_CCLM/PP_to_P.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport numpy as np\nimport xarray as xr\n\n\"\"\"\nPreprocessing script to convert PP from COSMO-CLM to absolute pressure. This is only necessary if one subsequently wants to compute the mearelative Humidity from Specific humidity. \n\"\"\"\n\n#enter paths\nsuperpath='/project/pr04/robro... | [
[
"numpy.where",
"numpy.asanyarray",
"numpy.exp"
]
] |
qychen13/ClusterAlignReID | [
"9dca1a39b7f1035c9579d80bbb73aa45480a616c"
] | [
"utils/construct_engine.py"
] | [
"import time\nimport os\nimport torch\nimport torch.nn as nn\nfrom torch.utils.tensorboard import SummaryWriter\n\nfrom .engine import Engine\nfrom .evaluation import test\nfrom .center import calculate_id_features, update_id_features\n\n\ndef construct_engine(engine_args, log_freq, log_dir, checkpoint_dir, checkpo... | [
[
"torch.no_grad",
"torch.cuda.is_available",
"torch.utils.tensorboard.SummaryWriter"
]
] |
Hridai/Fantasy-Premier-League | [
"60028688104f7c1ff7eceaa74e42ec7f54b9a6cb"
] | [
"ht_analysis/appTemplate.py"
] | [
"__doc__ = \"\"\"\ncurve_fitter_app.py is a plotly dash dashboard which allows hyperparameter tweaking\n============================================================\nChoose the existing curve and the country for which it has been fitted on for a\ndate and tweak the hyperparameters to see how the curve would behave.... | [
[
"pandas.DataFrame"
]
] |
HappyBall/tacotron | [
"52acd76485f2119475b7323a127beffc97db1074"
] | [
"utils.py"
] | [
"# -*- coding: utf-8 -*-\n'''\nBy kyubyong park. kbpark.linguist@gmail.com.\nhttps://www.github.com/kyubyong/dc_tts\n'''\nfrom __future__ import print_function, division\n\nfrom hyperparams import Hyperparams as hp\nimport numpy as np\nimport tensorflow as tf\nimport librosa\nimport copy\nimport matplotlib\nmatplot... | [
[
"matplotlib.use",
"numpy.append",
"numpy.pad",
"numpy.dot",
"tensorflow.minimum",
"numpy.real",
"matplotlib.pyplot.subplots",
"scipy.signal.lfilter",
"numpy.power",
"numpy.abs",
"numpy.clip",
"tensorflow.cast",
"numpy.maximum"
]
] |
T-Almeida/mmnrm | [
"f67441a4e2cb0a8335b5e96f3ea9ea0a0eba080a"
] | [
"mmnrm/utils.py"
] | [
"import numpy as np\nimport random\nimport tensorflow as tf\nimport h5py\nimport pickle\nimport mmnrm.modelsv2\nimport math\n\nfrom datetime import datetime as dt\n\n\ndef set_random_seed(seed_value=42):\n tf.random.set_seed(seed_value)\n random.seed(seed_value)\n np.random.seed(seed_value)\n \n \nde... | [
[
"tensorflow.random.set_seed",
"tensorflow.keras.preprocessing.sequence.pad_sequences",
"numpy.array",
"numpy.random.seed"
]
] |
mrajart/dlcourse_ai | [
"ff0c82f0e9f6c1abbb1f1daa5e40a480091f79f2"
] | [
"assignments/assignment3/layers.py"
] | [
"import numpy as np\nimport math\n\ndef l2_regularization(W, reg_strength):\n '''\n Computes L2 regularization loss on weights and its gradient\n\n Arguments:\n W, np array - weights\n reg_strength - float value\n\n Returns:\n loss, single value - l2 regularization loss\n gradient, n... | [
[
"numpy.zeros_like",
"numpy.dot",
"numpy.array",
"numpy.matmul",
"numpy.zeros",
"numpy.sum",
"numpy.ones",
"numpy.random.randn",
"numpy.exp",
"numpy.mean",
"numpy.multiply",
"numpy.arange",
"numpy.amax",
"numpy.transpose",
"numpy.greater",
"numpy.dsta... |
ntaylorwss/megatron | [
"a6c572e04583e21715f3eaf35630cb4d75f686f7"
] | [
"megatron/layers/shaping.py"
] | [
"import numpy as np\nimport pandas as pd\nfrom .core import StatelessLayer, StatefulLayer\n\n\nclass Cast(StatelessLayer):\n \"\"\"Re-defines the data type for a Numpy array's contents.\n\n Parameters\n ----------\n new_type : type\n the new type for the array to be cast to.\n \"\"\"\n def ... | [
[
"numpy.concatenate",
"numpy.reshape",
"numpy.zeros",
"numpy.roll",
"numpy.stack",
"numpy.arange",
"numpy.expand_dims",
"numpy.unique"
]
] |
RoyLQ/Advanced_IDE_Recommendation | [
"c1d2739ab9bea701dd8c70db9d63687fbc96e479"
] | [
"src/NN/data_prep.py"
] | [
"#!/usr/bin/python3\nfrom src import storage_connection as sc\nimport numpy as np\n\n\"\"\"\nLast edited by : Shawn\nLast edited time : 29/11/2021\nVersion Status: dev\nTO DO:\nThe functions in this file are for reading and preparing the inputs for the NN.\nRequired: Path to NN_input.txt\n Path to vector... | [
[
"numpy.array"
]
] |
sgowda/brain-python-interface | [
"708e2a5229d0496a8ce9de32bda66f0925d366d9"
] | [
"riglib/motiontracker.py"
] | [
"'''\nBase code for 'motiontracker' feature, compatible with PhaseSpace motiontracker\n'''\n\nimport os\nimport time\nimport numpy as np\n\ntry:\n from OWL import *\nexcept:\n OWL_MODE2 = False\n print(\"Cannot find phasespace driver\")\n\ncwd = os.path.split(os.path.abspath(__file__))[0]\n\nclass Simulate... | [
[
"numpy.array",
"numpy.sin",
"numpy.random.rand",
"numpy.zeros",
"numpy.median",
"numpy.ones",
"numpy.random.randn",
"numpy.savez",
"numpy.cos",
"numpy.cross",
"numpy.dtype"
]
] |
JuliaSun623/dgl | [
"4ca706e1b4e15d6cb8b0df574e44b9d2dd92996e"
] | [
"benchmarks/benchmarks/api/bench_udf_multi_update_all.py"
] | [
"\nimport time\nimport dgl\nimport torch\nimport numpy as np\nimport dgl.function as fn\n\n\nfrom .. import utils\n\n\n@utils.benchmark('time', timeout=600)\n@utils.parametrize('feat_size', [32, 128, 512])\n@utils.parametrize('num_relations', [5, 50, 500])\n@utils.parametrize('multi_reduce_type', [\"sum\", \"stuck\... | [
[
"torch.sum"
]
] |
damo-cv/MMP_Track1_ICCV21 | [
"a71d6067851d41b16b683a4c1b2c2f1ca51964ec"
] | [
"detection/gen_detections.py"
] | [
"import argparse\nimport itertools\nimport json\nimport logging\nimport pickle\nimport sys\nimport os\nfrom collections import defaultdict\nfrom multiprocessing import Pool\nfrom pathlib import Path\nimport numpy as np\nimport torch\nfrom torchvision.ops import nms\nfrom tqdm import tqdm\nimport pandas as pd\n# Add... | [
[
"numpy.zeros",
"pandas.DataFrame",
"torch.from_numpy",
"numpy.unique",
"numpy.hstack",
"numpy.vstack"
]
] |
JeremyCJM/Ensemble | [
"9a68920c68639d4ea8b233bdc497481508cf4745"
] | [
"imagenet_ens_new.py"
] | [
"import numpy as np\nimport torch\nimport pdb\nimport torch.nn as nn\nfrom torch.autograd import Variable\nimport itertools\n\nnum_data = 50000\nnum_classes = 1000\n\n# Temps = [0.001, 0.01, 0.1, 5, 10, 50, 100, 500, 1000, 5000, 10000]\n# Temps = [1.2, 1.4, 1.6, 1.8, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5]\n# Temps = np.aran... | [
[
"torch.zeros",
"torch.min",
"torch.nn.Softmax",
"torch.autograd.Variable",
"torch.save",
"numpy.mean",
"torch.ones",
"torch.load",
"torch.mean",
"torch.sum"
]
] |
AtsushiHashimoto/KinectOnTheCeiling | [
"116448e706da8b4e87e5402310747f46821beb4a",
"116448e706da8b4e87e5402310747f46821beb4a"
] | [
"PoseEstimation/Script/Main/body_part_classification.py",
"PoseEstimation/Script/Preprocessing/RealData/xtion_io.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport time, cv2, os\nimport numpy as np\nimport multiprocessing as mp\nfrom scipy import stats\nimport pandas as pd\nfrom sklearn.externals import joblib\nfrom sklearn.ensemble import RandomForestClassifier\nfrom Modules.data_preparation import prepare_train_data, prepare_test_data, pre... | [
[
"scipy.stats.mode",
"numpy.array",
"numpy.zeros",
"sklearn.ensemble.RandomForestClassifier",
"pandas.DataFrame",
"sklearn.externals.joblib.dump",
"numpy.ones",
"sklearn.externals.joblib.load",
"numpy.ravel"
],
[
"numpy.ndarray"
]
] |
JamesNgo3781/vietocr | [
"9d311bbeb18c51c8ff90022f07c0463b204407dc"
] | [
"vietocr/model/transformer.py"
] | [
"from einops import rearrange\nfrom torchvision import models\nimport math\nimport torch\nfrom torch import nn\n\nclass LanguageTransformer(nn.Module):\n def __init__(self, vocab_size, \n d_model, nhead, \n num_encoder_layers, num_decoder_layers, \n dim_feedforward... | [
[
"torch.nn.Linear",
"torch.zeros",
"torch.nn.Dropout",
"torch.cos",
"torch.sqrt",
"torch.sin",
"torch.nn.Transformer",
"torch.arange",
"torch.ones",
"torch.nn.Embedding"
]
] |
jkx19/MRQA | [
"c4195db7d68002739ed2aeee6fcee718a56bc9f7"
] | [
"model/prefix.py"
] | [
"import torch\nimport torch.nn\nfrom torch.nn import CrossEntropyLoss\nfrom transformers import BertPreTrainedModel, BertModel\nfrom transformers.modeling_outputs import QuestionAnsweringModelOutput\n\nfrom model.deberta import DebertaModel, DebertaPreTrainedModel\n\nclass BertForQuestionAnswering(BertPreTrainedMod... | [
[
"torch.nn.Linear",
"torch.nn.Dropout",
"torch.cat",
"torch.arange",
"torch.nn.CrossEntropyLoss",
"torch.ones",
"torch.nn.Embedding"
]
] |
DingLi23/s2search | [
"54edff4aa21ec4be8891a27d0a04f9f578e771a9"
] | [
"s2search_score.py"
] | [
"from s2search.rank import S2Ranker\nimport os\nimport json\nimport numpy as np\nfrom pathlib import Path\n\n# data_dir = './s2search_data'\ns2_dir = './s2search_data'\nroot_dir = '/Users/ayuee/Documents/GitHub/XAI_PROJECT/data_process/masking'\nfeatures = ['title', 'abstract', 'venue', 'authors', 'year', 'n_citati... | [
[
"numpy.array",
"numpy.save"
]
] |
GautamSridhar/FCN-implementation-on-Pytorch | [
"37a1f24f276ab43928038f899d58813a6c6c5dd3"
] | [
"FCN8s_wVGG_mk2/FCN_VGG.py"
] | [
"\"\"\"\nArchitecture definition for Fully Convolutional Neural Networks (FCN8s)\nInitialised with pretrained VGG weights\nWeights initialised by bilinear upsampling for convolutional transpose layers\n\"\"\"\n\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport numpy as np\nimport math\nimpor... | [
[
"numpy.zeros",
"torch.nn.MaxPool2d",
"torch.nn.ConvTranspose2d",
"torch.cuda.device_count",
"torch.nn.ReLU",
"torch.from_numpy",
"torch.nn.Conv2d",
"torch.cuda.is_available",
"torch.nn.Dropout2d"
]
] |
samaloney/sunpy | [
"89142033a7a76bcd3b2791b779b8b43fac65a7f4"
] | [
"sunpy/sun/sun.py"
] | [
"\"\"\"\nThis module provides Sun-related parameters.\n\"\"\"\nimport numpy as np\n\nimport astropy.units as u\nfrom astropy.coordinates import Angle, Latitude, Longitude\n\nfrom sunpy.sun import constants\nfrom sunpy.time import julian_centuries, parse_time\nfrom sunpy.time.time import _variables_for_parse_time_do... | [
[
"numpy.sin",
"numpy.arctan2",
"numpy.cos"
]
] |
IsaacYangSLA/NVFlare | [
"8c6582894c9a8431f64479bc9f472fefcd71e5a7"
] | [
"tests/integration_test/tf2/trainer.py"
] | [
"# Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unle... | [
[
"numpy.all",
"tensorflow.keras.losses.SparseCategoricalCrossentropy",
"tensorflow.keras.Input",
"tensorflow.keras.datasets.mnist.load_data"
]
] |
coherent17/numpy_practice | [
"c1b3c238a1c9f49b78a10a2e9e7751f077c9a829"
] | [
"np3.py"
] | [
"import numpy as np\n\n#1. numpy calculation\na=np.arange(1,10).reshape(3,3)\nb=np.arange(10,19).reshape(3,3)\nprint(a)\nprint(b)\n#所有元素都加1\nprint(a+1)\n\n#所有元素都平方\nprint(a**2)\n\n#判斷式輸出boolen\nprint(a<5)\n\n#相對應的元素相加\nprint(a*b)\n\n#矩陣內積\nprint(np.dot(a,b))\n\n#2. function i numpy and statistic\nc=np.arange(1,10).... | [
[
"numpy.max",
"numpy.product",
"numpy.dot",
"numpy.random.choice",
"numpy.median",
"numpy.sum",
"numpy.min",
"numpy.mean",
"numpy.std",
"numpy.random.randint",
"numpy.sort",
"numpy.argsort",
"numpy.ptp",
"numpy.arange",
"numpy.var"
]
] |
zhangxinyi0106/graph-convnet-tsp | [
"dabee0764a63d81d2aec643c58d8cacd488381cb"
] | [
"data/generate_tsp_concorde.py"
] | [
"import time\nimport argparse\nimport pprint as pp\nimport os\n\nimport pandas as pd\nimport numpy as np\nfrom concorde.tsp import TSPSolver\n\n\nif __name__ == \"__main__\":\n parser = argparse.ArgumentParser()\n parser.add_argument(\"--num_samples\", type=int, default=10000)\n parser.add_argument(\"--num... | [
[
"numpy.random.random"
]
] |
jooner/lab | [
"b391c80aabfab4d9377147cdf7fcdb31da0029fd"
] | [
"train_embedding.py"
] | [
"\"\"\"\\\n\nWord Embedding Exercise\n\n\"\"\"\n\n\nimport numpy as np\nfrom tqdm import tqdm, tnrange, tqdm_notebook\nfrom pandas import read_csv\nfrom nltk import word_tokenize\n\nimport torch\nfrom torch import optim\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\nwhitepapers = read_csv('whitepapers... | [
[
"torch.nn.Linear",
"numpy.array",
"torch.optim.lr_scheduler.StepLR",
"torch.nn.Softmax",
"torch.norm",
"torch.LongTensor",
"pandas.read_csv",
"torch.nn.Embedding",
"torch.sum"
]
] |
arnakoguzhan/machine-learning | [
"c0df1d1e37d001af7ddc5ae06dd3eba0788d126f"
] | [
"1-simple-linear-regression/slr_sklearn.py"
] | [
"import numpy as np\nimport pandas as pd\nfrom sklearn.linear_model import LinearRegression\nimport matplotlib.pyplot as plt\n\n# Data preprocessing\ndata = pd.read_csv(\"RealEstate.csv\")\n\n# Converting Pandas dataframe to numpy array\nX = data.Size.values.reshape(-1, 1)\nY = data.Price.values.reshape(-1, 1)\n\nm... | [
[
"sklearn.linear_model.LinearRegression",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.legend",
"numpy.mean",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.scatter",
"pandas.read_csv"
]
] |
a-vasenin/scikit-learn-intelex | [
"b81f81098a7f9302c6a052a5d22ecd372682844d",
"b81f81098a7f9302c6a052a5d22ecd372682844d"
] | [
"examples/daal4py/low_order_moms_streaming.py",
"onedal/svm/tests/test_svc.py"
] | [
"#===============================================================================\n# Copyright 2014-2022 Intel Corporation\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# ... | [
[
"numpy.iinfo",
"pandas.read_csv",
"numpy.genfromtxt"
],
[
"numpy.array",
"numpy.dot",
"sklearn.datasets.make_blobs",
"numpy.testing.assert_array_equal",
"sklearn.metrics.pairwise.rbf_kernel",
"numpy.testing.assert_array_almost_equal",
"numpy.sort",
"sklearn.model_se... |
m-naumann/corridor | [
"2acfdf5781d4fc107a32baf6ef372800a741d2aa"
] | [
"python_api/scripts/main_circle_polar_transformation.py"
] | [
"import random\nimport statistics\nimport numpy as np\nimport math\nimport matplotlib.pyplot as plt\nfrom matplotlib.patches import Ellipse\nimport matplotlib.transforms as transforms\nimport corridor\n\n\ndef sample_polar_data(mean, covMat, n_samples=5000):\n r, phi = np.random.multivariate_normal(mean, covMat,... | [
[
"numpy.array",
"numpy.cov",
"numpy.mean",
"matplotlib.pyplot.subplots",
"numpy.unwrap",
"matplotlib.patches.Ellipse",
"numpy.stack",
"numpy.random.multivariate_normal",
"numpy.sqrt",
"numpy.size",
"matplotlib.pyplot.show",
"matplotlib.transforms.Affine2D"
]
] |
nikosavola/cirq-on-iqm | [
"990bb1f3629aaa5a8af14302335ec283dfe4eae1"
] | [
"examples/demo_common.py"
] | [
"# Copyright 2020–2021 Cirq on IQM developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | [
[
"numpy.set_printoptions",
"numpy.abs"
]
] |
LiWentomng/boxlevelset | [
"8cc40bf6ae4a343c482c676c72259cc12c29d31c"
] | [
"mmdet/models/losses/chamfer_loss.py"
] | [
"import torch\nimport torch.nn as nn\n\nfrom mmdet.ops.chamfer_2d import Chamfer2D\nfrom ..registry import LOSSES\n\n\n@LOSSES.register_module\nclass ChamferLoss2D(nn.Module):\n def __init__(self, use_cuda=True, loss_weight=1.0, eps=1e-12):\n super(ChamferLoss2D, self).__init__()\n self.use_cuda = ... | [
[
"torch.norm",
"torch.clamp"
]
] |
Alymostafa/torch-cam | [
"3f30f0db90fba1b921dbe71e979001c954d245da"
] | [
"scripts/cam_example.py"
] | [
"#!usr/bin/python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nCAM visualization\n\"\"\"\n\nimport argparse\nfrom io import BytesIO\n\nimport matplotlib.pyplot as plt\nimport requests\nfrom PIL import Image\nimport torch\nfrom torchvision import models\nfrom torchvision.transforms.functional import normalize, resize, to_ten... | [
[
"torch.device",
"matplotlib.pyplot.savefig",
"torch.cuda.is_available",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.show"
]
] |
ds7788/hello-world | [
"f16466f4d4de8cd412771415a361738ba020e568"
] | [
"pymc3/examples/gelman_schools.py"
] | [
"from pymc3 import HalfCauchy, Normal, sample, Model, loo\nimport numpy as np\n\n'''Original Stan model\n\ndata {\n int<lower=0> J; // number of schools \n real y[J]; // estimated treatment effects\n real<lower=0> sigma[J]; // s.e. of effect estimates \n}\nparameters {\n real mu; \n real<lower=0> tau;\n real ... | [
[
"numpy.array"
]
] |
rajeevsrao/onnx | [
"355a4954ea4e5836a5e943589509951c44feb6b4",
"781545783a4e2bbbda48fc64318fb2c6d8bbb3cc"
] | [
"onnx/backend/test/case/node/asinh.py",
"onnx/backend/test/case/node/sum.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport numpy as np # type: ignore\n\nimport onnx\nfrom ..base import Base\nfrom . import expect\n\n\nclass Asinh(Base):\n\n @staticmethod\n def export():... | [
[
"numpy.array",
"numpy.random.randn",
"numpy.arcsinh"
],
[
"numpy.array",
"numpy.add"
]
] |
JALVARADORUIZ/DataAnalytic-PJUD | [
"cd063efd619eca3b7bf583f1fb00383f6f774818"
] | [
"src/pjud/data/jurisdicciones.py"
] | [
"import re\nimport os\nimport pandas as pd\nimport numpy as np\nimport click\n\nfrom tqdm import tqdm\nfrom unicodedata import normalize\n\nfrom pjud import data\n\ndef load_article_cot(article: str, src_path = './data/raw/cot'):\n tqdm.pandas()\n with open(f'{src_path}/{article}.txt', 'r') as file:\n ... | [
[
"pandas.concat",
"pandas.DataFrame",
"pandas.read_feather"
]
] |
mkollo/chiminey | [
"a31f41d94c3725abef879269b64eb63f4f21f213"
] | [
"slurm_filter.py"
] | [
"# ___ _ _ ___ __ __ _____ __\n# / __| || |_ _| \\/ | _ \\ \\ / /\n# | (__| __ || || |\\/| | _/\\ V / \n# \\___|_||_|___|_| |_|_| |_| \n# \n# Copyright (c) 2020 Mihaly Kollo. All rights reserved.\n# \n# This work is licensed under the terms of the MIT license. \n# For a copy, see <https://opensou... | [
[
"numpy.array",
"numpy.delete",
"numpy.empty",
"scipy.signal.butter",
"numpy.arange",
"numpy.array_split"
]
] |
MatthieuSarkis/criticality | [
"2939d7408bcd5d3bf7f237cfe56c836cf361e64f"
] | [
"src/CNN_classification/train.py"
] | [
"import os\nimport numpy as np\n\nos.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' # for ignoring the some of tf warnings\nimport tensorflow as tf\nfrom tensorflow.keras.callbacks import EarlyStopping, ModelCheckpoint, TensorBoard\nfrom sklearn.model_selection import train_test_split\n\nfrom src.CNN_classification import ... | [
[
"tensorflow.keras.callbacks.TensorBoard",
"tensorflow.keras.callbacks.ModelCheckpoint",
"sklearn.model_selection.train_test_split",
"tensorflow.keras.optimizers.Adam",
"tensorflow.keras.callbacks.ReduceLROnPlateau",
"numpy.unique",
"tensorflow.keras.callbacks.EarlyStopping"
]
] |
s-weigand/work-tracker | [
"fe5e2c8c292ae4e040abc96897b16fcd1ffc5508"
] | [
"tests/conftest.py"
] | [
"import os\nfrom shutil import copyfile\n\nimport pandas as pd\nimport pytest\n\nfrom work_tracker.functions.helpfer_functions import get_abs_path\n\n\n# ###########################\n# # DATA FIXTURES #\n# ###########################\n@pytest.fixture(scope=\"module\")\ndef data_test_calc():\n\n test_da... | [
[
"pandas.read_csv"
]
] |
chncwang/mindspore | [
"bc38590e5300588aa551355836043af0ea092a72",
"bc38590e5300588aa551355836043af0ea092a72",
"bc38590e5300588aa551355836043af0ea092a72",
"6dac92aedf0aa1541d181e6aedab29aaadc2dafb"
] | [
"model_zoo/official/cv/faster_rcnn/src/FasterRcnn/faster_rcnn_r50.py",
"tests/ut/python/pipeline/parse/test_tuple_index_by_negative.py",
"tests/ut/python/parallel/test_pack.py",
"mindspore/dataset/engine/samplers.py"
] | [
"# Copyright 2020-2021 Huawei Technologies Co., Ltd\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 applica... | [
[
"numpy.concatenate",
"numpy.ones",
"numpy.zeros"
],
[
"numpy.ones"
],
[
"numpy.full",
"numpy.ones"
],
[
"numpy.array"
]
] |
imskr/Machine-Learning-with-Maths | [
"ca8e7565bb01a2164fba1a1dc3de617b81c88116"
] | [
"Linear Regression/univariate_Linear_Regression.py"
] | [
"import numpy as np\n\nclass univariate_Linear_Regression:\n # initialize slope and intercept\n def __init__(self):\n self.m = 0.0 # slope\n self.b = 0.0 # intercept\n\n# sum of square deviation for single variable\n def ss_x(self, x):\n return sum((x-np.mean(x))**2)\n\n # sum of ... | [
[
"numpy.array",
"numpy.mean"
]
] |
bigfoolliu/liu_aistuff | [
"aa661d37c05c257ee293285dd0868fb7e8227628"
] | [
"ai/opencv/image_processing/edge_dectection.py"
] | [
"#!/usr/bin/env python3\n# -*- coding:utf-8 -*-\n# author: bigfoolliu\n\n\n\"\"\"\n边缘检测\n\"\"\"\n\nimport cv2\nfrom matplotlib import pyplot as plt\n\nimg = cv2.imread(\"../images/person.jpeg\")\n\n# 检测边缘之后的图像\nedge_img = cv2.Canny(img, 100, 200)\nedge_img1 = cv2.Canny(img, 100, 100)\nedge_img2 = cv2.Canny(img, 200... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.subplot"
]
] |
icewing1996/self-attentive-parser | [
"35ba70951eddefa63a294186077373fbe3e74185"
] | [
"src/parser/commands/train.py"
] | [
"# -*- coding: utf-8 -*-\n\nfrom parser import BiaffineParser, Model\nfrom parser.utils import Corpus, TextDataset, Vocab, collate_fn\n\nimport torch\nfrom torch.utils.data import DataLoader\nfrom torch.utils.data.distributed import DistributedSampler\n\nfrom config import Config\n\nimport os\nimport subprocess\nfr... | [
[
"torch.device",
"torch.save",
"torch.cuda.device_count",
"torch.cuda.is_available",
"torch.utils.data.DataLoader",
"torch.utils.data.distributed.DistributedSampler",
"torch.load",
"torch.nn.DataParallel"
]
] |
adamwkraft/imgaug | [
"6c143483810629b7efee13afd8c93bc647b9df35"
] | [
"test/test_imgaug.py"
] | [
"from __future__ import print_function, division, absolute_import\n\nimport time\nimport warnings\n\nimport matplotlib\nmatplotlib.use('Agg') # fix execution of tests involving matplotlib on travis\nimport numpy as np\nimport six.moves as sm\nimport cv2\nimport shapely\nimport shapely.geometry\n\nimport imgaug as ... | [
[
"numpy.ones_like",
"numpy.array_equal",
"numpy.isclose",
"numpy.copy",
"numpy.tile",
"numpy.min",
"numpy.finfo",
"numpy.dtype",
"numpy.max",
"numpy.concatenate",
"numpy.uint8",
"numpy.zeros_like",
"numpy.full",
"numpy.arange",
"numpy.float128",
"nump... |
jcampbell/scipy | [
"a11eef3a29ad200649edd32c0de0d0210001acb4",
"a11eef3a29ad200649edd32c0de0d0210001acb4",
"a11eef3a29ad200649edd32c0de0d0210001acb4"
] | [
"scipy/stats/_stats_mstats_common.py",
"scipy/special/tests/test_hyp2f1.py",
"scipy/signal/_peak_finding.py"
] | [
"import warnings\nimport numpy as np\nimport scipy.stats._stats_py\nfrom . import distributions\nfrom .._lib._bunch import _make_tuple_bunch\n\n\n__all__ = ['_find_repeats', 'linregress', 'theilslopes', 'siegelslopes']\n\n# This is not a namedtuple for backwards compatibility. See PR #12983\nLinregressResult = _mak... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.cov",
"numpy.asarray",
"numpy.median",
"numpy.round",
"numpy.mean",
"numpy.diff",
"numpy.nonzero",
"numpy.amax",
"numpy.sqrt",
"numpy.amin"
],
[
"scipy.special.hyp2f1",
"scipy.special._testutils.check_version",
... |
NixonZ/dnnCompiler | [
"1f3c89248e279c6b5625cd8cb134a4c718eb7764",
"a9df5ab0eefe0f48a1416fe504f50e2bf71aeecc"
] | [
"test/swig/PRelu.py",
"test/swig/Mul.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\") yo... | [
[
"numpy.random.randn",
"numpy.reshape"
],
[
"numpy.multiply",
"numpy.random.randn",
"numpy.reshape"
]
] |
nouraldinkahlous/Molecular_Dynamics_and_Free_Energy_Perturbation | [
"c94b024900a48884dd20a29769b62bf7096795f0"
] | [
"deprecated/Hysterseis.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Jan 6 19:51:16 2020\n\n@author: nour\n\"\"\"\n\nimport math\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nimport itertools\nimport pandas as pd\n\nimport glob\nqfep=[]\nfor filename in glob.glob(\"qfep*.out\"):\... | [
[
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.title",
"pandas.DataFrame",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.ylabel"
]
] |
pratyuksh/PolytopeMeshGen | [
"9eb095de94535fa4018877bd4e0c08c9f620648a"
] | [
"generators/graded_meshes_3d.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nimport dolfin as df\nimport numpy as np\nfrom generators.graded_meshes_base import GradedMeshGeneratorBase\n\n\n# CLASS: Anisotropic Graded Meshes 3d, tetrahedral elements\nclass GradedMeshGenerator3d(GradedMeshGeneratorBase):\n\n def __init__(self, polyhedron)... | [
[
"numpy.zeros"
]
] |
jiaxue1993/pytorch-material-classification | [
"e4a94794b0867abd7d20dfa3bfc8ecd74d5fa76f"
] | [
"experiments/gtos.tean.mobilenet/network.py"
] | [
"import torch\nimport torch.nn as nn\nfrom torch.autograd import Variable\n\n\nclass TEAN(nn.Module):\n def __init__(self, nclass, model1, model2):\n super(TEAN, self).__init__()\n self.model1 = model1\n self.model2 = model2\n self.model1.classifier[1] = nn.Linear(128+128, num_classes... | [
[
"torch.nn.Linear",
"torch.cat",
"torch.nn.AvgPool2d",
"torch.nn.BatchNorm1d",
"torch.randn"
]
] |
JunyeonL/square-attack | [
"624d053baa24084bce61999377db5976dd940e4f"
] | [
"madry_cifar10/pgd_attack.py"
] | [
"\"\"\"\r\nImplementation of attack methods. Running this file as a program will\r\napply the attack to the model specified by the config file and store\r\nthe examples in an .npy file.\r\n\"\"\"\r\nfrom __future__ import absolute_import\r\nfrom __future__ import division\r\nfrom __future__ import print_function\r\... | [
[
"numpy.concatenate",
"tensorflow.train.latest_checkpoint",
"tensorflow.nn.relu",
"numpy.copy",
"tensorflow.Session",
"tensorflow.train.Saver",
"numpy.save",
"tensorflow.gradients",
"tensorflow.ConfigProto",
"tensorflow.reduce_max",
"numpy.random.uniform",
"numpy.sig... |
xu-peng-tao/SSD-Pruning-and-quantization | [
"64b84dfa88a1686593addaa9941cc14579e129ee"
] | [
"quantization/WbWtAb/models/nin_gc.py"
] | [
"import torch.nn as nn\nfrom .util_wt_bab import activation_bin, Conv2d_Q\n\n# 通道混合\ndef channel_shuffle(x, groups):\n \"\"\"shuffle channels of a 4-D Tensor\"\"\"\n batch_size, channels, height, width = x.size()\n assert channels % groups == 0\n channels_per_group = channels // groups\n # split into... | [
[
"torch.nn.MaxPool2d",
"torch.nn.AvgPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU",
"torch.nn.Conv2d"
]
] |
RScottLewis/WampumPy | [
"72ecfc6c90052aa76f61dea3cfee01174f9b4605"
] | [
"lib/plot.py"
] | [
"from PyQt5.QtGui import *\nfrom wampum.i18n import _\n\n\nimport datetime\nfrom collections import defaultdict\nfrom wampum.bitcoin import COIN\n\nimport matplotlib\nmatplotlib.use('Qt5Agg')\nimport matplotlib.pyplot as plt\nimport matplotlib.dates as md\nfrom matplotlib.patches import Ellipse\nfrom matplotlib.off... | [
[
"matplotlib.use",
"matplotlib.pyplot.xlabel",
"matplotlib.dates.DateFormatter",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.gca",
"matplotlib.pyplot.subplots_adjust",
"matplotlib.pyplot.xticks"
]
] |
yuanqing-wang/AFEP | [
"ef19148fa17bf89d0a61ad29a9510f822cd0c1db"
] | [
"afep/test/test.py"
] | [
"\n# coding: utf-8\n\n# In[25]:\n\n\n\"\"\"\ntest_yank_afep.py\n\n\"\"\"\nimport os\nimport sys\nimport numpy as np\nimport matplotlib\nfrom matplotlib import pyplot as plt\nimport pickle\n\nsys.path.append(\"..\")\n# /Users/yuanqingwang/Documents/GitHub/afep/afep/data/abl-imatinib/explicit/experiments/complex.nc\n... | [
[
"numpy.array",
"numpy.sum",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.show",
"matplotlib.pyplot.clf"
]
] |
rylaw/mne-python | [
"aa526c8ed7049046734ca28493d99e841672b0eb",
"aa526c8ed7049046734ca28493d99e841672b0eb",
"aa526c8ed7049046734ca28493d99e841672b0eb",
"aa526c8ed7049046734ca28493d99e841672b0eb",
"aa526c8ed7049046734ca28493d99e841672b0eb"
] | [
"mne/preprocessing/nirs/_beer_lambert_law.py",
"mne/utils/mixin.py",
"mne/io/ctf_comp.py",
"mne/preprocessing/nirs/_scalp_coupling_index.py",
"mne/minimum_norm/_eloreta.py"
] | [
"# Authors: Robert Luke <mail@robertluke.net>\n# Eric Larson <larson.eric.d@gmail.com>\n# Alexandre Gramfort <alexandre.gramfort@inria.fr>\n#\n# License: BSD (3-clause)\n\nimport os.path as op\n\nimport numpy as np\n\nfrom ...io import BaseRaw\nfrom ...io.constants import FIFF\nfrom ...utils impor... | [
[
"scipy.linalg.pinv",
"scipy.interpolate.interp1d",
"scipy.io.loadmat"
],
[
"numpy.array",
"numpy.setdiff1d",
"numpy.where",
"numpy.require",
"numpy.atleast_1d",
"numpy.atleast_2d"
],
[
"numpy.ones"
],
[
"numpy.corrcoef",
"numpy.zeros"
],
[
"numpy... |
s-sajid-ali/comsyl | [
"f2a5d984b1e870d203a9152bbeca804c4304850e"
] | [
"comsyl/mathcomsyl/MatrixBuilder.py"
] | [
"# coding: utf-8\n# /*##########################################################################\n#\n# Copyright (c) 2017 European Synchrotron Radiation Facility\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\... | [
[
"numpy.zeros"
]
] |
PellelNitram/WordDetectorNN | [
"a11f5bf4a69acc58dcf9c900d0caad17fb464d74"
] | [
"src/dataloader.py"
] | [
"from collections import namedtuple\n\nimport cv2\nimport numpy as np\nimport torch\n\nfrom aabb import AABB\nfrom coding import encode\nfrom utils import compute_scale_down, prob_true\n\nDataLoaderItem = namedtuple('DataLoaderItem', 'batch_imgs,batch_gt_maps,batch_aabbs')\n\n\nclass DataLoaderIAM:\n \"\"\"loade... | [
[
"numpy.ones",
"numpy.random.shuffle",
"torch.from_numpy",
"numpy.random.triangular",
"numpy.float32",
"numpy.random.uniform",
"numpy.stack",
"numpy.random.randint"
]
] |
ixcc/federated | [
"3fb48ae6d019ee763c5112d23c3bdbcbaea17948"
] | [
"tensorflow_federated/python/examples/remote_executor_example.py"
] | [
"# Lint as: python3\n# Copyright 2018, The TensorFlow Federated 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# ... | [
[
"tensorflow.keras.optimizers.SGD",
"tensorflow.compat.v1.enable_v2_behavior",
"numpy.random.seed",
"tensorflow.reshape",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.losses.SparseCategoricalCrossentropy",
"tensorflow.keras.metrics.SparseCategoricalAccuracy"
]
] |
debajit15kgp/multiagent-envs | [
"cc5bd1a1015636a07d8e703ee57067b315dde596",
"cc5bd1a1015636a07d8e703ee57067b315dde596",
"cc5bd1a1015636a07d8e703ee57067b315dde596"
] | [
"multiagent/policy.py",
"multiagent/scenarios/food_collect.py",
"multiagent/scenarios/simple.py"
] | [
"import numpy as np\nfrom pyglet.window import key\n\n# individual agent policy\nclass Policy(object):\n def __init__(self):\n pass\n def action(self, obs):\n raise NotImplementedError()\n\n# interactive policy based on keyboard input\n# hard-coded to deal only with movement, not communication\n... | [
[
"numpy.array",
"numpy.zeros"
],
[
"numpy.square",
"numpy.array",
"numpy.asarray",
"numpy.zeros",
"numpy.random.seed",
"numpy.ones",
"numpy.min",
"numpy.random.uniform"
],
[
"numpy.concatenate",
"numpy.square",
"numpy.array",
"numpy.zeros",
"numpy... |
bahattin-urganci/python-training | [
"576956083e4ea95a76480992a022ba3a61681308"
] | [
"MachineLearning/hello-ml-world.py"
] | [
"#from sklearn import tree\n#features=[[140,1],[130,1],[150,0],[170,0]]\n#labels=[0,0,1,1]\n#clf=tree.DecisionTreeClassifier()\n#clf=clf.fit(features,labels)\n#print(clf.predict([[150,0]]))\n\nimport tensorflow as tf\nhello = tf.constant('Hello, TensorFlow!')\nsess = tf.Session()\nprint(sess.run(hello))\n\n"
] | [
[
"tensorflow.constant",
"tensorflow.Session"
]
] |
onucharles/tensorized-rnn | [
"69fc031f1efe169ee88327d10bdf5e5bc24f03cf"
] | [
"experiments/digit_classification/benchmarking.py"
] | [
"\"\"\"\nBenchmarking runtime and memory usage.\nCode uses MNIST_Classifier class (an RNN + FC layer), but otherwise is independent of any experiment.\n\"\"\"\n\nimport torch\nimport torch.optim as optim\nimport torch.nn.functional as F\nimport argparse\nfrom time import time\nimport numpy as np\nfrom mnist_classif... | [
[
"torch.device",
"numpy.array",
"numpy.random.rand",
"torch.no_grad",
"numpy.mean",
"torch.from_numpy",
"numpy.std",
"numpy.arange",
"numpy.random.randint",
"torch.nn.functional.nll_loss"
]
] |
ZhouRR/quotations-gateway-api | [
"ef433fe8e461344a6c59e5edec206ad4ba7eeff6"
] | [
"app/core/gopup/life/charity.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# @Time : 2020/12/10 0010\n# @Author : justin.郑 3907721@qq.com\n# @File : charity.py\n# @Desc : 慈善中国\n\nimport pandas as pd\nimport requests\nfrom tqdm import tqdm\nfrom pyquery import PyQuery as pq\n\n\ndef _get_page_num_charity_organization():\n \"\"\"... | [
[
"pandas.DataFrame",
"pandas.read_html"
]
] |
fluffybird2323/pyro | [
"9e74e499dbda76c28f12528235dac25bd17f0b1b"
] | [
"tests/contrib/test_util.py"
] | [
"from __future__ import absolute_import, division, print_function\n\nfrom collections import OrderedDict\nimport pytest\nimport torch\n\nfrom pyro.contrib.util import (\n get_indices, tensor_to_dict, rmv, rvv, lexpand, rexpand, rdiag, rtril\n)\nfrom tests.common import assert_equal\n\n\ndef test_get_indices_size... | [
[
"torch.tril",
"torch.ones",
"torch.tensor",
"torch.diag",
"torch.dot"
]
] |
mrsempress/mmdetection | [
"cb650560c97a2fe56a9b369a1abc8ec17e06583a"
] | [
"mmdet/core/utils/model_utils.py"
] | [
"from tabulate import tabulate\nfrom termcolor import colored\nfrom graphviz import Digraph\nfrom collections import OrderedDict\nimport numpy as np\nimport torch\nimport torch.nn as nn\n\nfrom mmdet.core.utils import logger\n\n\ndef describe_vars(model):\n headers = ['name', 'shape', '#elements', '(M)', '(MB)',... | [
[
"torch.rand",
"numpy.prod"
]
] |
aikakysymys/transformers | [
"34e11fab167a7beb78fbe6991ff8721dc9208793"
] | [
"src/transformers/modeling_tf_flaubert.py"
] | [
"# coding=utf-8\n# Copyright 2019-present, Facebook, Inc and the HuggingFace Inc. team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICE... | [
[
"tensorflow.not_equal",
"tensorflow.convert_to_tensor",
"tensorflow.range"
]
] |
DavidKatz-il/pdpipe | [
"5ddd066425d99886bfc51cf19ab78b2bf8c7791a"
] | [
"tests/text_stages/test_regex_replace.py"
] | [
"\"\"\"Test the RegexReplace pipeline stage.\"\"\"\n\nimport pandas as pd\nimport pdpipe as pdp\n\n\nDF = pd.DataFrame(\n data=[[4, \"more than 12\"], [5, \"with 5 more\"]],\n index=[1, 2],\n columns=[\"age\", \"text\"],\n)\n\n\ndef test_regex_replace():\n clean_num = pdp.RegexReplace('text', r'\\b[0-9]... | [
[
"pandas.DataFrame"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.