repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
maniospas/pyfop | [
"ca0b06ed3ed7a8bfcba7daa1d3247b5623655193"
] | [
"examples/lazify_imports.py"
] | [
"import numpy as np\nimport pyfop as pfp\n\nx = np.array([[1., 1., 1.], [2., 2., 2.]])\ny = np.array([[1., 1., 1.], [2., 2., 2.]])\n\nwith pfp.Lazifier() as lazifier:\n lazifier.lazify(np.sum)\n lazifier.lazify(np.mean)\n r1 = np.sum(x, axis=pfp.Aspect())\n r2 = np.mean(y, axis=pfp.Aspect())\nprint((r1+... | [
[
"numpy.array"
]
] |
filangelos/random-forest | [
"0fc7a4f74b1120f3e527e824abc1de1aa32f2b18",
"0fc7a4f74b1120f3e527e824abc1de1aa32f2b18"
] | [
"app/3.1a.py",
"app/3.3a.py"
] | [
"# EXECUTION TIME: 28s\n\n# Python 3 ImportError\nimport sys\nsys.path.append('.')\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nfrom matplotlib.ticker import MaxNLocator\n\nimport src as ya\nfrom src.struct import ForestParams\n\n# prettify plots\nplt.rcParams['font.family'] = 'Tim... | [
[
"numpy.random.seed"
],
[
"numpy.random.seed",
"numpy.clip",
"sklearn.ensemble.RandomForestClassifier",
"numpy.arange",
"matplotlib.pyplot.subplots",
"numpy.random.normal",
"numpy.argmin",
"numpy.mean",
"numpy.exp",
"numpy.array"
]
] |
sb-b/BOUN-PARSE | [
"2b529924897d8e2613c4d2193a67796a895da40b",
"2b529924897d8e2613c4d2193a67796a895da40b",
"2b529924897d8e2613c4d2193a67796a895da40b"
] | [
"Parser-hybrid/nparser/misc/mst.py",
"Parser-hybrid/nparser/vocabs/multivocab.py",
"Parser-hybrid/nparser/neural/models/nlp/parsers/gama_parser.py"
] | [
"# !/usr/bin/env python\n# -*- encoding: utf-8 -*-\n\n\n\n\n\nimport sys\nimport numpy as np\n\n#***************************************************************\n#===============================================================\ndef find_cycles(edges):\n \"\"\" \"\"\"\n \n vertices = np.arange(len(edges))\n indi... | [
[
"numpy.pad",
"numpy.max",
"numpy.delete",
"numpy.argmax",
"numpy.zeros_like",
"numpy.random.randn",
"numpy.exp",
"numpy.array",
"numpy.where",
"numpy.sum"
],
[
"tensorflow.add_n"
],
[
"tensorflow.matmul",
"tensorflow.nn.softmax",
"tensorflow.split",
... |
mherde/annotlib | [
"a45dc9d9bebca277cad123f9cb830a3a63231674"
] | [
"annotlib/tests/test_standard.py"
] | [
"import unittest\nimport numpy as np\n\nfrom annotlib.standard import StandardAnnot\n\n\nclass TestStandardAnnot(unittest.TestCase):\n\n def setUp(self):\n self.X = np.arange(10).reshape(5, 2)\n self.y_true = np.asarray([0, 1, 2, 0, 1])\n self.Y = np.asarray([[0, 1, 2, 0, 1], [1, 2, 2, 1, 0]... | [
[
"numpy.logical_and",
"numpy.asarray",
"numpy.arange",
"numpy.testing.assert_array_equal",
"numpy.copy",
"numpy.array"
]
] |
cako/JUDI.jl | [
"0e7a45de917a856563ee93261ea1c49225a9afa0",
"0e7a45de917a856563ee93261ea1c49225a9afa0"
] | [
"src/Python/PySource.py",
"src/Python/JAcoustic_codegen.py"
] | [
"from devito import Dimension\nfrom devito.function import SparseTimeFunction\nfrom devito.logger import error\nimport numpy as np\n\n\n__all__ = ['PointSource', 'Receiver', 'Shot', 'RickerSource', 'GaborSource']\n\n\nclass PointSource(SparseTimeFunction):\n \"\"\"Symbolic data object for a set of sparse point s... | [
[
"numpy.exp",
"numpy.cos"
],
[
"numpy.load",
"numpy.max",
"numpy.floor",
"numpy.random.randint"
]
] |
Uzaaft/acconeer-python-exploration | [
"a3ae5c31d2d5354a57273c4ab4b51b56edbb1225",
"a3ae5c31d2d5354a57273c4ab4b51b56edbb1225"
] | [
"examples/processing/sleep_breathing.py",
"src/acconeer/exptool/recording.py"
] | [
"import numpy as np\nimport pyqtgraph as pg\nfrom scipy import signal\n\nfrom acconeer.exptool import configs, utils\nfrom acconeer.exptool.clients import SocketClient, SPIClient, UARTClient\nfrom acconeer.exptool.pg_process import PGProccessDiedException, PGProcess\n\n\ndef main():\n args = utils.ExampleArgumen... | [
[
"numpy.linspace",
"numpy.squeeze",
"numpy.exp",
"numpy.roll",
"numpy.conjugate",
"numpy.arange",
"numpy.matmul",
"numpy.ceil",
"scipy.signal.butter",
"numpy.size",
"numpy.argmax",
"scipy.signal.lfilter",
"numpy.outer",
"numpy.zeros",
"numpy.log",
"nu... |
Zuricho/kagome_HVQE | [
"bbcb591ac30e81a7b60ce1d2d6c67d92fa25a899"
] | [
"_HVQE.py"
] | [
"\"\"\"\nContains function defs for running HVQE.py\n\"\"\"\nclass Name: # Simple namespace class that is used for dumping and restarting the program.\n pass\n\nimport numpy # For the cases where GPU==True and we still want to use numpy.\nimport qem\nimport chainer as ch\nfrom datetime import datetime\nimport ar... | [
[
"matplotlib.pyplot.title",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"matplotlib.ticker.MaxNLocator",
"numpy.random.rand",
"numpy.array"
]
] |
Piyush987/NLP-basics | [
"22ff656b10e0b04ca41dca97c21468e6372596bf"
] | [
"preprocess.py"
] | [
"import numpy as np\nimport pandas as pd\nimport re\nfrom keras.preprocessing.text import Tokenizer\nfrom keras.preprocessing.sequence import pad_sequences\nfrom gensim.models import Word2Vec, Phrases\nimport nltk\nfrom nltk.corpus import stopwords\nnltk.download('stopwords')\nnltk.download('wordnet')\nfrom nltk.st... | [
[
"numpy.hstack",
"pandas.read_csv",
"numpy.mean"
]
] |
SolitaryKnife/pytorch_dataset | [
"36773064b333d0aafc1c5d0e559271c56516afe7"
] | [
"functional.py"
] | [
"\n#####################################################\n# Basic Functions\n#####################################################\n\n\ndef identity_transform(x):\n return x\n\n\n#####################################################\n# Dataset Operations\n#####################################################\n\n... | [
[
"torch.save",
"torch.load"
]
] |
algrs/polliwog | [
"faa6531e8e2f7d0b52e928d64a4c1914199c4023",
"faa6531e8e2f7d0b52e928d64a4c1914199c4023"
] | [
"polliwog/transform/test_composite.py",
"polliwog/plane/test_plane.py"
] | [
"import numpy as np\nimport vg\nimport pytest\nfrom .composite import CompositeTransform, convert_44_to_33\n\n\ndef create_cube_verts(origin, size):\n # Create a cube. Since CompositeTransform just works on verticies,\n # we don't need a full lace.mesh object.\n origin = np.asarray(origin)\n size = np.r... | [
[
"numpy.asarray",
"numpy.linalg.inv",
"numpy.testing.assert_array_equal",
"numpy.repeat",
"numpy.array",
"numpy.vstack",
"numpy.testing.assert_array_almost_equal"
],
[
"numpy.dot",
"numpy.random.random",
"numpy.random.seed",
"numpy.linalg.norm",
"numpy.testing.as... |
Gummary/Pytorch-Project-Template | [
"56bc5e253627d40fb8771eccdb2bb663c833beb3",
"56bc5e253627d40fb8771eccdb2bb663c833beb3"
] | [
"datasets/rssrai.py",
"get_mean_std.py"
] | [
"\r\nimport logging\r\nimport os\r\n\r\nimport cv2\r\nimport numpy as np\r\nnp.random.seed(0)\r\nimport torch\r\ntorch.manual_seed(0)\r\nfrom torch.utils.data import Dataset\r\n\r\nfrom utils.train_utils import visualize_images\r\n\r\nlogger = logging.getLogger(__name__)\r\n\r\nclass RssraiDataset(Dataset):\r\n\r\n... | [
[
"numpy.random.seed",
"torch.manual_seed",
"torch.utils.data.DataLoader",
"matplotlib.pyplot.show",
"numpy.zeros",
"matplotlib.pyplot.figure"
],
[
"torch.utils.data.DataLoader"
]
] |
codyoss/google-cloud-python | [
"505d55357fbdffc5d55005c58712932c758737bd"
] | [
"automl/tests/unit/gapic/v1beta1/test_gcs_client_v1beta1.py"
] | [
"# -*- coding: utf-8 -*-\n#\n# Copyright 2019 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 ... | [
[
"pandas.DataFrame"
]
] |
Alisa-lisa/conferences | [
"87fcb9f595a244408c015c66283c337d124b358d"
] | [
"EP_2019/py_impl/simple_implementation.py"
] | [
"from uuid import uuid4\nimport numpy as np\n\n\nclass Request:\n def __init__(self):\n \"\"\"\n Request constructor\n\n :id: unique identifier\n :driver: assigned driver\n :lifetime: time to cancel the request if not put into progress\n :execution_time: how long a ride ... | [
[
"numpy.random.choice"
]
] |
ahartikainen/cmdstanpy | [
"29cdfee8fa903855f0f13ee67ea42f8159ab1671"
] | [
"test/test_sample.py"
] | [
"\"\"\"CmdStan method sample tests\"\"\"\n\nimport contextlib\nimport io\nimport logging\nimport os\nimport platform\nimport shutil\nimport stat\nimport tempfile\nimport unittest\nfrom multiprocessing import cpu_count\nfrom test import CustomTestCase\nfrom time import time\n\nimport numpy as np\nfrom testfixtures i... | [
[
"numpy.int32"
]
] |
Scriddie/Varsortability | [
"357213d5ceefb6362060c56e12c18b41dc689306"
] | [
"src/sortnregress.py"
] | [
"import numpy as np\nfrom sklearn.linear_model import LinearRegression, LassoLarsIC\n\n\ndef sortnregress(X):\n \"\"\" Take n x d data, order nodes by marginal variance and\n regresses each node onto those with lower variance, using\n edge coefficients as structure estimates. \"\"\"\n LR = LinearRegress... | [
[
"numpy.abs",
"numpy.eye",
"sklearn.linear_model.LassoLarsIC",
"numpy.random.randn",
"sklearn.linear_model.LinearRegression",
"numpy.var",
"numpy.array",
"numpy.zeros"
]
] |
blokeley/forcelib | [
"003fa02c70ee8ac8486db12a388ce67945488069"
] | [
"arraylib.py"
] | [
"# MIT License\n#\n# Copyright (c) 2017 Tom Oakley\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\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, mo... | [
[
"numpy.interp",
"pandas.DataFrame"
]
] |
guptarohit/audax | [
"ad11059145afce150a1af870bee41c38a786d303",
"ad11059145afce150a1af870bee41c38a786d303"
] | [
"audax/training_utils/eval_supervised.py",
"audax/training_utils/data_v2/transforms.py"
] | [
"\"\"\"\nHelper functions for evaluating a given supervised \"Classifier\" model\n\nWritten for audax by / Copyright 2022, Sarthak Yadav\n\"\"\"\nimport json\nimport functools\nimport os\nimport time\nfrom typing import Any\nimport tqdm\nfrom absl import logging\nfrom clu import metric_writers\nfrom clu import peri... | [
[
"numpy.asarray",
"tensorflow.config.get_visible_devices",
"numpy.mean",
"tensorflow.config.set_visible_devices"
],
[
"tensorflow.sparse.to_dense",
"tensorflow.range",
"tensorflow.shape",
"tensorflow.random.uniform",
"tensorflow.cast",
"tensorflow.gather",
"tensorflo... |
ska-telescope/algorithm-reference-library | [
"1b2c8d6079249202864abf8c60cdea40f0f123cb",
"1b2c8d6079249202864abf8c60cdea40f0f123cb"
] | [
"processing_components/visibility/base.py",
"deprecated_code/workflows/mpi/imaging-pipelines_serial.py"
] | [
"\"\"\"\nBase simple visibility operations, placed here to avoid circular dependencies\n\"\"\"\n\nimport os\nimport copy\nimport logging\nfrom typing import Union\n\nimport numpy\nimport re\nfrom astropy import constants as constants\nfrom astropy import units as u\nfrom astropy.coordinates import SkyCoord\nfrom as... | [
[
"numpy.ones_like",
"numpy.abs",
"numpy.array_equal",
"numpy.unique",
"numpy.conj",
"numpy.arange",
"numpy.min",
"numpy.ones",
"numpy.full_like",
"numpy.max",
"numpy.copy",
"numpy.zeros_like",
"numpy.array",
"numpy.zeros",
"numpy.sum",
"numpy.float"
... |
jraffa/tableone | [
"ad1b7e2bc5b8382c281ebf800eb7061d47eb00c0"
] | [
"tableone/tableone.py"
] | [
"\"\"\"\nThe tableone package is used for creating \"Table 1\" summary statistics for\nresearch papers.\n\"\"\"\n\nimport warnings\n\nimport numpy as np\nfrom numpy.linalg import LinAlgError\nimport pandas as pd\nfrom scipy import stats\nfrom statsmodels.stats import multitest\nfrom tabulate import tabulate\n\nfrom... | [
[
"numpy.matrix",
"numpy.nanmax",
"numpy.nanmedian",
"numpy.sqrt",
"numpy.asarray",
"numpy.nanmin",
"pandas.DataFrame",
"numpy.mean",
"numpy.nanmean",
"scipy.stats.fisher_exact",
"numpy.nanstd",
"numpy.where",
"pandas.read_csv",
"scipy.stats.chi2_contingency",... |
mateuszbuda/duke-dbt-detection | [
"cf6a6b623fef24a3f36d3187e9f48b12b0e112bc"
] | [
"transform.py"
] | [
"import numpy as np\nfrom skimage.transform import rescale\nfrom torchvision.transforms import Compose\n\nfrom dataset import TomoDetectionDataset\n\n\ndef transforms(train=True):\n if train:\n return Compose(\n [Crop((TomoDetectionDataset.img_height, TomoDetectionDataset.img_width))]\n ... | [
[
"numpy.max",
"numpy.array",
"numpy.random.rand",
"numpy.random.randint"
]
] |
helloimlixin/AGFVisualization | [
"c35e4b1e88d6fc6da7fdaca3b2d5e9b1b4c5f25f",
"c35e4b1e88d6fc6da7fdaca3b2d5e9b1b4c5f25f"
] | [
"baselines/cnn_layer_visualization.py",
"baselines/deep_dream.py"
] | [
"\"\"\"\nCreated on Sat Nov 18 23:12:08 2017\n\n@author: Utku Ozbulak - github.com/utkuozbulak\n\"\"\"\nimport os\nimport numpy as np\n\nimport torch\nfrom torch.optim import Adam\nfrom torchvision import models\n\nfrom baselines.misc_functions import preprocess_image, recreate_image, save_image\n\n\nclass CNNLayer... | [
[
"torch.optim.Adam",
"numpy.random.uniform",
"torch.mean"
],
[
"torch.mean",
"torch.optim.SGD"
]
] |
flios/Proj | [
"fa95e19853eacbbc07a9ac2982cd4df92f53c338",
"fa95e19853eacbbc07a9ac2982cd4df92f53c338"
] | [
"main.py",
"log_process.py"
] | [
"import argparse\nfrom os.path import dirname, abspath, join, exists\nimport os\n\nimport torch\nfrom torch.optim import Adadelta, Adam, lr_scheduler\nfrom torch import nn\nimport numpy as np\n\nfrom download_dataset import DATASETS\nfrom preprocessors import DATASET_TO_PREPROCESSOR\nimport dictionaries\nfrom datal... | [
[
"torch.optim.lr_scheduler.ReduceLROnPlateau",
"numpy.random.seed",
"torch.load",
"torch.manual_seed",
"torch.cuda.is_available"
],
[
"numpy.array",
"pandas.DataFrame"
]
] |
cnheider/python-acoustics | [
"fbc87454422c41e1a39e282d7680126a6d8014dd"
] | [
"tests/test_bands.py"
] | [
"import numpy as np\nfrom numpy.testing import assert_array_equal, assert_array_almost_equal\n\nimport pytest\n\nfrom acoustics.bands import (octave, octave_high, octave_low, third, third_low, third_high, third2oct, _check_band_type)\n\n\n@pytest.fixture\ndef octave_real():\n return np.array([16, 31.5, 63, 125, ... | [
[
"numpy.testing.assert_array_equal",
"numpy.array",
"numpy.sqrt",
"numpy.testing.assert_array_almost_equal"
]
] |
bergr7/Bertelsmann_Arvato_Project | [
"b88d204ceb48642dcc1b2a03081e466cc5587ce1"
] | [
"preprocessing/supervised_model_data_preprocessing.py"
] | [
"# Data preprocessing for Supervised Learning model\n\n# Import relevant libraries\nimport sys\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.api.types import infer_dtype\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\nfrom sklearn.impute import SimpleImputer\nfrom sklearn.preprocessing import L... | [
[
"sklearn.preprocessing.LabelEncoder",
"pandas.read_csv",
"sklearn.impute.SimpleImputer",
"pandas.DataFrame"
]
] |
msc-acse/acse-9-independent-research-project-L519159123 | [
"90b2399eeb41ea24bfc3f401603225eaf628bc0a"
] | [
"data_process/loss_plotting.py"
] | [
"\"\"\"\nauthor : Yuxuan Liu\ngithub alias: L519159123\n\"\"\"\n\nimport os\nimport numpy as np\nimport pandas as pd\nimport matplotlib\nimport matplotlib.pyplot as plt\n\ndef plot_loss(experiment_name, model='pix2pix'):\n \"\"\"Plot plg loss of the training process\n \n Parameters:\n experiment_nam... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.title",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.tick_params",
"matplotlib.pyplot.ylabel"
]
] |
DMhouping/DataScrapingGlassdoor | [
"8ffef55c98b986f4f9106109bbd386d3a1b54f84"
] | [
"SeleniumGlassdoor.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Apr 10 10:11:34 2021\n\n@author: houping\n\"\"\"\n\nimport os\nimport re\nimport csv\nimport time\nimport json\nimport random\nimport requests\nimport pandas as pd\nimport numpy as np\n\nfrom datetime import date, timedelta, datetime\n\nfrom b... | [
[
"pandas.read_csv"
]
] |
MarinkoBa/Hate-Speech-Classification | [
"72f6bbe93b823daefa138df4f81a3a4df5b34c4c"
] | [
"src/utils/test_map.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nfrom sklearn import metrics\nimport pandas as pd\n\ndef test_map(y_pred,y_test):\n \"\"\"\n Get accurracy, precision and recall and save png of true positive,\n false positive, true negative and false negative for given prediction... | [
[
"matplotlib.pyplot.yticks",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.title",
"sklearn.metrics.accuracy_score",
"sklearn.metrics.precision_score",
"matplotlib.pyplot.subplots",
"sklearn.metrics.confusion_matrix",
"matplotlib.pyplot.savefig",
"pandas.DataFrame",
"... |
monthie/cogmods | [
"62af4b8bf2effb77f26a8877d6a89949164d83f0",
"62af4b8bf2effb77f26a8877d6a89949164d83f0",
"62af4b8bf2effb77f26a8877d6a89949164d83f0",
"62af4b8bf2effb77f26a8877d6a89949164d83f0"
] | [
"moral/student_projects/karkkainen_2020/models/ml/mlp/modelJudgement.py",
"relational/student_projects/2020_karkkainen/models/Baseline/Most-Frequent-Answer/model3ps.py",
"relational/student_projects/2020_karkkainen/models/ml/lstm/model4ps.py",
"fake_news/models/Heuristic/hrlinear.py"
] | [
"# A neural network -based model for predicting moral reasoning. \n\n\n\nimport time\n\nimport collections\n\nimport numpy as np\n\nimport ccobra\n\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torchvision.transforms as transforms\n\n\n\n\n\nclass MLP(nn.Module):\n def __init__(self, ... | [
[
"torch.from_numpy",
"torch.nn.BCELoss",
"torch.nn.Sigmoid",
"torch.nn.Linear",
"numpy.std",
"numpy.mean",
"torch.cuda.is_available",
"torch.nn.ReLU",
"numpy.array"
],
[
"pandas.read_csv"
],
[
"pandas.core.common.flatten",
"torch.nn.CrossEntropyLoss",
"to... |
linhuifj/kaggle-kuzushiji-recognition | [
"dc77389bbec5d66ed8a35242a2ca37bb683b4b04",
"dc77389bbec5d66ed8a35242a2ca37bb683b4b04"
] | [
"line_rec/dsutils/real_image2lmdb_txt.py",
"line_rec/utils.py"
] | [
"import os, sys\nimport os.path as osp\nfrom PIL import Image\nimport six\nimport string\n\nimport lmdb\nimport pickle\n\nimport torch\nimport torch.utils.data as data\nfrom torch.utils.data import DataLoader\nfrom torchvision.transforms import transforms\nfrom torchvision.datasets import ImageFolder\nfrom torchvis... | [
[
"matplotlib.pyplot.imshow",
"torch.utils.data.DataLoader",
"matplotlib.pyplot.savefig",
"torch.tensor",
"matplotlib.pyplot.subplot",
"torch.stack",
"matplotlib.pyplot.show"
],
[
"torch.LongTensor",
"torch.IntTensor"
]
] |
reiinakano/magenta | [
"fbc059dbdd1c70071472e0b0707cb298f78ca9d2"
] | [
"magenta/models/music_vae/data.py"
] | [
"# Copyright 2017 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli... | [
[
"tensorflow.logging.warning",
"numpy.array_equal",
"tensorflow.data.Dataset.from_tensor_slices",
"tensorflow.contrib.data.parallel_interleave",
"numpy.cumsum",
"tensorflow.contrib.data.shuffle_and_repeat",
"numpy.all",
"numpy.ceil",
"tensorflow.data.Dataset.list_files",
"nu... |
zeyiwen/gbdt | [
"35ddc80c6fc2d072478f8505312fd6fc34dcdd9c",
"35ddc80c6fc2d072478f8505312fd6fc34dcdd9c"
] | [
"python/benchmarks/utils/file_utils.py",
"python/benchmarks/model/lightgbm_model.py"
] | [
"import pandas as pd\n\n\ndef add_data(df, algorithm, data, elapsed, metric):\n time_col = (data.name, 'Time(s)')\n metric_col = (data.name, data.metric)\n try:\n df.insert(len(df.columns), time_col, '-')\n df.insert(len(df.columns), metric_col, '-')\n except:\n pass\n\n df.at[al... | [
[
"pandas.MultiIndex.from_tuples"
],
[
"numpy.max"
]
] |
musicinmybrain/probeinterface | [
"8ef28f47193794321c554443e3904d4d99f18eee"
] | [
"tests/test_probe.py"
] | [
"from probeinterface import Probe\n\nimport numpy as np\n\nimport pytest\n\ndef _dummy_position():\n n = 24\n positions = np.zeros((n, 2))\n for i in range(n):\n x = i // 8\n y = i % 8\n positions[i] = x, y\n positions *= 20\n positions[8:16, 1] -= 10\n return positions\n \... | [
[
"numpy.allclose",
"numpy.arange",
"numpy.random.shuffle",
"numpy.ones",
"numpy.random.randn",
"numpy.random.rand",
"numpy.zeros"
]
] |
kaiwalya4850/object-detect | [
"f4c36e025e88ddd70d6ecdd03bee92feae902d8f"
] | [
"scripts/label_image.py"
] | [
"# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.Graph",
"tensorflow.image.resize_bilinear",
"tensorflow.import_graph_def",
"tensorflow.read_file",
"tensorflow.gfile.GFile",
"numpy.squeeze",
"tensorflow.cast",
"tensorflow.image.decode_png",
"tensorflow.expand_dims",
"tensorflow.image.decode_bmp",
"tensorfl... |
eliaskousk/FedML | [
"e30d5dd3cc84c8a369c828a6f6ef097b3cf67b1a"
] | [
"python/fedml/core/distributed/communication/trpc/trpc_comm_manager.py"
] | [
"import csv\nimport decimal\nimport os\nimport threading\nimport time\nfrom typing import List\n\nimport torch\nimport torch.distributed as dist\nimport torch.distributed.rpc as rpc\nimport torch.multiprocessing as mp\nfrom torch.distributed import rpc\n\nfrom .trpc_server import TRPCCOMMServicer\nfrom ..base_com_m... | [
[
"torch.ones",
"torch.multiprocessing.spawn",
"torch.distributed.rpc.ProcessGroupRpcBackendOptions",
"torch.distributed.rpc.TensorPipeRpcBackendOptions",
"torch.distributed.rpc.shutdown"
]
] |
VasuGoel-zz/npro | [
"68c9756954a4d393e1068a65f6466d1eee1e0644",
"68c9756954a4d393e1068a65f6466d1eee1e0644"
] | [
"npro/npro/report/job_applicant_details/job_applicant_details.py",
"npro/npro/report/leads_pipeline_analysis_by_source/leads_pipeline_analysis_by_source.py"
] | [
"# Copyright (c) 2013, GreyCube Technologies and contributors\n# For license information, please see license.txt\n\nfrom __future__ import unicode_literals\nimport frappe\nfrom frappe import _\nfrom frappe.utils import cint\nimport pandas as pd\nimport numpy as np\n\n\ndef execute(filters=None):\n return get_dat... | [
[
"pandas.DataFrame.from_records",
"pandas.merge",
"pandas.pivot_table"
],
[
"pandas.DataFrame.from_records",
"pandas.pivot_table"
]
] |
mikeireland/pfi | [
"3d3cb14a36d4d01c9d04fc10d655785e71872594"
] | [
"pfi/overlap.py"
] | [
"\"\"\"A Script to compute the effective overlap between a laser and a star Airy disk,\nwhen the starlight is dispersed, in a heterodyne laser frequency comb detection\nscheme.\"\"\"\n\nfrom __future__ import print_function\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport scipy.special as sp\n\n#Start w... | [
[
"numpy.abs",
"numpy.conj",
"numpy.arange",
"scipy.special.jn",
"numpy.fft.fftshift",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.clf",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.xlabel",
"numpy.meshgrid",
"numpy.zeros",
"numpy.roll",
"matplotlib.pyplot.ylabel... |
Pearl-UTexas/tensorpack | [
"3ef33a341861769e66995e1630949113404cdd0c",
"3ef33a341861769e66995e1630949113404cdd0c"
] | [
"examples/CaffeModels/load-alexnet.py",
"examples/GAN/DCGAN.py"
] | [
"#!/usr/bin/env python\n# -*- coding: UTF-8 -*-\n# File: load-alexnet.py\n# Author: Yuxin Wu <ppwwyyxxc@gmail.com>\n\nfrom __future__ import print_function\nimport numpy as np\nimport os\nimport cv2\nimport argparse\n\nfrom tensorpack import *\nfrom tensorpack.tfutils.symbolic_functions import *\nfrom tensorpack.tf... | [
[
"numpy.load",
"tensorflow.nn.softmax",
"tensorflow.nn.lrn"
],
[
"tensorflow.get_variable",
"numpy.clip",
"tensorflow.summary.image",
"tensorflow.placeholder_with_default",
"tensorflow.reshape",
"tensorflow.placeholder",
"tensorflow.truncated_normal_initializer",
"te... |
xuanqing94/FLOATER | [
"d788b5e3516f2c2cad351a9464a2436d1df8ab63"
] | [
"fairseq/modules/multihead_attention.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\nimport torch\nfrom torch import nn\nfrom torch.nn import Parameter\nimport torch.nn.functional as F\n\nfrom fairseq import utils\n\n... | [
[
"torch.Size",
"torch.empty",
"torch.Tensor",
"torch.cat",
"torch.nn.init.constant_",
"torch.nn.init.xavier_normal_",
"torch.nn.functional.multi_head_attention_forward",
"torch.nn.Linear",
"torch.bmm",
"torch.nn.init.xavier_uniform_",
"torch.nn.functional.linear"
]
] |
qipengwang/TransPose | [
"2ca260768f3b0afdb92c7a0425c3c28e9cdd379d"
] | [
"lib/models/swin_transpose.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.utils.checkpoint as checkpoint\nfrom timm.models.layers import DropPath, to_2tuple, trunc_normal_\n\nimport logging\nimport math\nimport os\n\nfrom .mobilenet import MobileNetV1, MobileNetV2, MobileNetV3_Large, MobileNetV3_Small\nfrom .googlenet import GoogLeNet\nf... | [
[
"torch.nn.Softmax",
"torch.cat",
"torch.zeros",
"torch.load",
"torch.no_grad",
"torch.flatten",
"torch.nn.Dropout",
"torch.ones",
"torch.randn",
"torch.arange",
"torch.roll",
"torch.nn.Sequential",
"torch.nn.ConvTranspose2d",
"torch.nn.init.constant_",
"... |
weizhonz/hid | [
"3ee3aeeaf12baeadf3d85c1bb86296073bba3fbe"
] | [
"simple_mnist_example.py"
] | [
"# General structure from https://github.com/pytorch/examples/blob/master/mnist/main.py\nfrom __future__ import print_function\nimport argparse\nimport os\nimport math\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\nfrom torchvision import datasets, transforms\n... | [
[
"torch.nn.CrossEntropyLoss",
"torch.nn.Dropout2d",
"torch.optim.lr_scheduler.CosineAnnealingLR",
"torch.nn.functional.log_softmax",
"torch.manual_seed",
"torch.nn.functional.conv2d",
"torch.nn.functional.relu",
"torch.no_grad",
"torch.cuda.is_available",
"torch.flatten",
... |
yanqiangmiffy/stanford-tensorflow-tutorials | [
"97cc43d6e5324816202fdeddb196c0356dce412a"
] | [
"examples/02_placeholder.py"
] | [
"# -*- coding: utf-8 -*-\n# @Author: yanqiang\n# @Date: 2018-05-14 23:01:30\n# @Last Modified by: yanqiang\n# @Last Modified time: 2018-05-14 23:12:22\n\nimport os\nos.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'\n\nimport tensorflow as tf\n\n# Example 1: feed_dict with placeholder\n\n# a is a placeholder for a vector... | [
[
"tensorflow.multiply",
"tensorflow.constant",
"tensorflow.placeholder",
"tensorflow.add",
"tensorflow.Session",
"tensorflow.get_default_graph"
]
] |
prise-3d/figures-generator | [
"3f9aabb4f70a229b3ba3398a37f04a2c720248e2"
] | [
"mon-estimator/run/utils/fonctions.py"
] | [
"import os\nimport numpy as np\n\nfrom skimage.metrics import structural_similarity as ssim\nfrom skimage.metrics import mean_squared_error as mse\nfrom skimage.metrics import peak_signal_noise_ratio as psnr\n\ndef compare_image(metric, ref, target):\n\n if metric == 'ssim':\n return ssim(ref, target, mul... | [
[
"numpy.arange",
"numpy.array"
]
] |
nengo/nengo | [
"55b5c4f7da351dfefd8b40eb14d2e47c1006cff0"
] | [
"nengo/connection.py"
] | [
"import warnings\n\nimport numpy as np\n\nfrom nengo.base import NengoObject, NengoObjectParam, ObjView\nfrom nengo.dists import DistOrArrayParam, Distribution\nfrom nengo.ensemble import Ensemble, Neurons\nfrom nengo.exceptions import ValidationError\nfrom nengo.learning_rules import LearningRuleType, LearningRule... | [
[
"numpy.asarray",
"numpy.array",
"numpy.zeros",
"numpy.unique"
]
] |
alfoa/TEAL | [
"52ef4075d15d14995af92add6f25120b98948afe"
] | [
"tests/HourlyObjectOrientedTest.py"
] | [
"# Copyright 2017 Battelle Energy Alliance, 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# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable ... | [
[
"pandas.to_timedelta",
"pandas.to_datetime",
"pandas.read_csv",
"numpy.zeros"
]
] |
zydeon/uci-statnlp | [
"5f3e39508ba47a4731faec20aeb20f9d5f1568c3"
] | [
"hw3/train.py"
] | [
"import argparse\nimport copy\nimport datetime\nimport json\nimport os\nimport random\nimport sys\nimport time\nfrom tqdm import tqdm\n\nimport torch\nfrom torch.utils.data import DataLoader\n\nfrom dataset import TwitterDataset, Vocabulary\nfrom util import load_object_from_dict\n\n\ndef load_datasets(train_datase... | [
[
"torch.manual_seed",
"torch.utils.data.DataLoader",
"torch.save"
]
] |
plumerai/zoo | [
"55e8ce9a42fb8806503e16fc2340f0fd27948d09"
] | [
"larq_zoo/literature/resnet_e.py"
] | [
"from typing import Optional, Sequence\n\nimport larq as lq\nimport tensorflow as tf\nfrom zookeeper import Field, factory\n\nfrom larq_zoo.core import utils\nfrom larq_zoo.core.model_factory import ModelFactory\n\n\n@factory\nclass BinaryResNetE18Factory(ModelFactory):\n \"\"\"Implementation of [BinaryResNetE18... | [
[
"tensorflow.keras.layers.Activation",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.MaxPool2D",
"tensorflow.keras.Model",
"tensorflow.keras.layers.BatchNormalization",
"tensorflow.keras.layers.AvgPool2D",
"tensorflow.keras.layers.add"
... |
SamuelDodet/challenge-regression | [
"cad1cb5dc36a01c12979edf648bd903f94466af3"
] | [
"app_streamlit.py"
] | [
"import streamlit as st\nfrom utils.preprocessing_model import ModellingData\nfrom utils.utils import change_to_province\nimport pandas as pd\nimport pickle\n\n\ndf = pd.read_csv(\"Dataset.csv\", sep=\",\")\ndel df['Price']\ncolumns = df.columns\n\n\nst.title(\"Belgian Houses Price Prediction\")\nst.markdown(\"Get ... | [
[
"pandas.read_csv",
"pandas.DataFrame"
]
] |
tom00/tensorflow | [
"88238b9004aafde10b2381cd810e0bb0e096b58e"
] | [
"tensorflow/python/tpu/tpu_embedding_v2.py"
] | [
"# Copyright 2020 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.embedding_ops.embedding_lookup_v2",
"tensorflow.python.tpu.tpu.outside_compilation",
"tensorflow.python.ops.array_ops.zeros",
"tensorflow.python.framework.device.DeviceSpec.from_string",
"tensorflow.python.framework.ops.device",
"tensorflow.python.ops.embedding_ops.e... |
willb/spark-rapids | [
"1e1c4ca9eab61383fd7187b937e6da65be402e95"
] | [
"integration_tests/src/main/python/udf_test.py"
] | [
"# Copyright (c) 2020, NVIDIA 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# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable l... | [
[
"pandas.merge_asof"
]
] |
girardea/cours-data | [
"ea25eac12b04d71c72954ccbe49551879562d014"
] | [
"projets/irigo-app/db.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n Modèle de données propre pour les données Irigo, ainsi que les fonctions\n permettant d'importer depuis les données brutes dans le modèle de données\n propre.\n\"\"\"\nfrom sqlalchemy import (Column, Integer, BigInteger, Float, MetaData, Table,\n ... | [
[
"pandas.read_sql_query"
]
] |
norlandrhagen/cmip6-downscaling | [
"45c35c28500067bb4333b7efddd094d17f8fcd07"
] | [
"cmip6_downscaling/disagg/derived_variables.py"
] | [
"import numpy as np\nimport xarray as xr\n\nfrom ..constants import KELVIN, MB_PER_KPA\n\nsat_pressure_0c = 6.112 # [milibar]\nmin_vap = 0.005 # lower limit for vapor pressure\n\n\ndef dewpoint(e):\n \"\"\"Calculate the ambient dewpoint given the vapor pressure.\n\n Parameters\n ----------\n e : scala... | [
[
"numpy.log",
"numpy.exp"
]
] |
gesiscss/IWAAN | [
"8d5b836fdf27750c65f3f98caa6e92d92c11d8c3"
] | [
"external/wikipedia.py"
] | [
"\"\"\"Summary\n\"\"\"\nfrom typing import Union\n\nimport pandas as pd\nimport numpy as np\n\nfrom .api import API, DataView\nfrom .utils import chunks\nfrom itertools import chain\nfrom urllib.parse import quote_plus\n\n\nclass WikipediaDV(DataView):\n \"\"\"Summary\n \"\"\"\n\n def get_page(self, page: ... | [
[
"pandas.Series",
"pandas.DataFrame"
]
] |
7eta/udk_labeler | [
"8cd8a86bc1a78647c0aaf81ca78e6e518fb86ceb",
"8cd8a86bc1a78647c0aaf81ca78e6e518fb86ceb",
"8cd8a86bc1a78647c0aaf81ca78e6e518fb86ceb"
] | [
"engine/retinanet/coco_eval.py",
"engine/utils/confusion_metric.py",
"engine/trainer/train.py"
] | [
"# Original author: Yann Henon\n# Adapted from https://github.com/yhenon/pytorch-retinanet/blob/master/retinanet/coco_eval.py\n# Modified by jsk1107\n\nfrom pycocotools.cocoeval import COCOeval\nimport json\nimport torch\n\n\ndef evaluate_coco(dataset, model, json_path, threshold=0.05):\n \n model.eval()\n ... | [
[
"torch.no_grad"
],
[
"numpy.maximum",
"pandas.DataFrame"
],
[
"torch.__version__.split",
"torch.optim.lr_scheduler.ReduceLROnPlateau",
"torch.load",
"numpy.mean",
"torch.cuda.is_available",
"torch.nn.DataParallel"
]
] |
benayas1/benatools | [
"fb2f6e8982d4bcbe0d52a08ebcd36f2cfcebb50d",
"fb2f6e8982d4bcbe0d52a08ebcd36f2cfcebb50d",
"fb2f6e8982d4bcbe0d52a08ebcd36f2cfcebb50d"
] | [
"src/benatools/torch/fitter.py",
"src/benatools/tf/images.py",
"src/benatools/ct/ct.py"
] | [
"import os\nimport torch\nimport numpy as np\nfrom datetime import datetime\nimport time\nimport pandas as pd\nfrom typing import Iterable, Callable, Dict, Tuple\n\n\nclass AverageMeter(object):\n \"\"\"\n Computes and stores the average and current value\n Attributes\n ----------\n val : float\n ... | [
[
"torch.load",
"numpy.isnan",
"pandas.DataFrame",
"torch.cuda.amp.autocast",
"torch.unsqueeze",
"torch.cuda.amp.GradScaler",
"numpy.argmax",
"torch.no_grad",
"numpy.array",
"numpy.isinf",
"torch.save"
],
[
"tensorflow.concat",
"tensorflow.zeros",
"tensorf... |
nghorbani/body_visualizer | [
"be9cf756f8d1daed870d4c7ad1aa5cc3478a546c"
] | [
"src/body_visualizer/tools/vis_tools.py"
] | [
"# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2019 Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (MPG),\n# acting on behalf of its Max Planck Institute for Intelligent Systems and the\n# Max Planck Institute for Biological Cybernetics. All rights reserved.\n#\n# Max-Planck-Gesellschaft zur Förderung ... | [
[
"numpy.hstack",
"numpy.radians",
"numpy.ones",
"matplotlib.pyplot.axis",
"numpy.array",
"numpy.zeros",
"numpy.vstack",
"matplotlib.pyplot.figure"
]
] |
bmello4688/deep-reinforcement-learning | [
"2337db08e7ea6bd512afa670e8e142b47acd688e"
] | [
"p2_continuous-control/model.py"
] | [
"import numpy as np\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n#copied from pendulum\n\ndef hidden_init(layer):\n fan_in = layer.weight.data.size()[0]\n lim = 1. / np.sqrt(fan_in)\n return (-lim, lim)\n\nclass Actor(nn.Module):\n \"\"\"Actor (Policy) Model.\"\"\"\n\n d... | [
[
"torch.nn.Linear",
"torch.manual_seed",
"numpy.sqrt",
"torch.cat"
]
] |
qnano/photonpy | [
"9c03a1c9f4c2177c9c6fb3f2f16dfec2306006d4",
"4f149d4e6c997954ac862cc5a7a404855b2a0be9",
"9c03a1c9f4c2177c9c6fb3f2f16dfec2306006d4"
] | [
"photonpy/cpp/calib.py",
"photonpy/utils/running_mean.py",
"photonpy/cpp/spotdetect.py"
] | [
"import ctypes as ct\nfrom .lib import SMLM\nimport numpy as np\nimport numpy.ctypeslib as ctl\nfrom .context import Context\n\n#CDLL_EXPORT sCMOS_CalibrationTransform* sCMOS_Calib_Create(int w, int h, \n#const float* offset, const float* gain, const float *variance, Context* ctx);\n#CDLL_EXPORT GainOffsetTransform... | [
[
"numpy.ascontiguousarray",
"numpy.ctypeslib.ndpointer",
"numpy.array_equal"
],
[
"numpy.square",
"numpy.min",
"numpy.arange",
"matplotlib.pyplot.plot",
"numpy.max",
"numpy.size",
"numpy.random.uniform",
"numpy.meshgrid",
"numpy.sum",
"matplotlib.pyplot.figur... |
ethansaxenian/RosettaDecode | [
"8ea1a42a5f792280b50193ad47545d14ee371fb7",
"8ea1a42a5f792280b50193ad47545d14ee371fb7"
] | [
"lang/Python/sum-of-squares-3.py",
"lang/Python/sieve-of-eratosthenes-9.py"
] | [
"import numpy as np\na = np.array([1, 2, 3, 4, 5])\nnp.sum(a ** 2)\n",
"from numpy import array, bool_, multiply, nonzero, ones, put, resize\n#\ndef makepattern(smallprimes):\n pattern = ones(multiply.reduce(smallprimes), dtype=bool_)\n pattern[0] = 0\n for p in smallprimes:\n pattern[p::p] = 0\n ... | [
[
"numpy.array",
"numpy.sum"
],
[
"numpy.put",
"numpy.array",
"numpy.multiply.reduce",
"numpy.nonzero"
]
] |
yunshangyue71/mycodes | [
"54b876004c32d38d9c0363fd292d745fee8dff3c",
"54b876004c32d38d9c0363fd292d745fee8dff3c"
] | [
"projects/unet/net/unet.py",
"scripts_torch/loss/loss_example.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n# 将图片的3通道提升维度\nclass DoubleConv(nn.Module):\n \"\"\"(convolution => [BN] => ReLU) * 2\"\"\"\n def __init__(self, in_channels, out_channels, mid_channels=None):\n super().__init__()\n if not mid_channels:\n mid_ch... | [
[
"torch.nn.ConvTranspose2d",
"torch.cat",
"torch.nn.Conv2d",
"torch.nn.MaxPool2d",
"torch.nn.Upsample",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU",
"torch.nn.functional.pad"
],
[
"torch.pow"
]
] |
DLPerf/kglib | [
"d8f368b35fa06f8beb1c95348974d6e7e465afce"
] | [
"kglib/kgcn/learn/loss.py"
] | [
"#\n# 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# \"Lice... | [
[
"tensorflow.boolean_mask",
"tensorflow.losses.softmax_cross_entropy",
"numpy.array"
]
] |
kpj/rwrap | [
"da885dd518e7cf8eb3c6fa1f03d4816f31f11492"
] | [
"tests/scripts/DESeq2/DESeq2.py"
] | [
"import pandas as pd\n\nfrom rwrap import base, stats, DESeq2\n\n\n# read data\ndf_cts = pd.read_csv(\"count_data.csv\", index_col=0)\ndf_coldata = pd.read_csv(\"col_data.csv\", index_col=0)\n\n# do DEA\ndds = DESeq2.DESeqDataSetFromMatrix(\n countData=df_cts, colData=df_coldata, design=stats.as_formula(\"~ cond... | [
[
"pandas.read_csv"
]
] |
gelnesr/SVD-of-MSAs | [
"681430e4e5f9e43a96676a91c8331df989069a5e"
] | [
"webscraper.py"
] | [
"# Modified source code from https://github.com/Aksh77/Bio-Scraper/blob/master/UniProt-Scraper/scraper.py\nimport os\nimport re\nimport sys\nimport csv\nimport pandas as pd\nimport pprint\nimport time\nimport urllib\nfrom urllib.request import urlopen\nfrom bs4 import BeautifulSoup\n\n#display list\ndef display_lis... | [
[
"pandas.read_csv"
]
] |
kimballh/ShapeShifter | [
"a9897cabec700726629466eea0159e75ba68ba91",
"a9897cabec700726629466eea0159e75ba68ba91"
] | [
"ShapeShifter/StataFile.py",
"ShapeShifter/JSONFile.py"
] | [
"import os\nimport tempfile\n\nimport pandas as pd\n\nfrom SSFile import SSFile\n\n\nclass StataFile(SSFile):\n\n def read_input_to_pandas(self, columnList=[], indexCol=\"Sample\"):\n if self.isGzipped:\n tempFile = super()._gunzip_to_temp_file()\n if len(columnList)>0:\n ... | [
[
"pandas.read_stata"
],
[
"pandas.read_json"
]
] |
volcan01010/tephrange | [
"8268d2ff5e5d9d12fbd79ad2fb30acf28cbd7b1b"
] | [
"tephrange/atmos.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"Functions for calculating the properties of a standard atmosphere at\na given altitude.\"\"\"\n\nimport numpy as np\n\n# Define physics parameters (in SI units):\nG = 9.80665 # Acceleration due to gravity.\nATM_GAS_CONSTANT = 287.05 # Specific gas constant for dry air.\nATM_DENSITY... | [
[
"numpy.exp"
]
] |
binwang-intel/ZeroMQ_test01 | [
"407b28d1d9a5b27984f60b74b65af653328fef56"
] | [
"publisher.py"
] | [
"\"\"\"A test that publishes NumPy arrays.\nUses REQ/REP (on PUB/SUB socket + 1) to synchronize\n\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (c) 2010 Brian Granger\n#\n# Distributed under the terms of the New BSD License. The full license is in\n# the fi... | [
[
"numpy.random.rand"
]
] |
numerology/tfx | [
"4d418c70a030e444cc8b97c6fbd52ee4c72d6eba"
] | [
"tfx/orchestration/airflow/airflow_component_test.py"
] | [
"# Copyright 2019 Google LLC. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appl... | [
[
"tensorflow.test.main"
]
] |
chrisbc/ffe-spark | [
"bda7f4b4a857f432a74a334afd7fa0ea5cc6714f"
] | [
"Fire_network_one_file_run.py"
] | [
"import datetime\nimport glob\nimport math\nimport os\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\nimport geopandas as gpd\nfrom shapely.geometry import box\nimport networkx as nx\nfrom shapely.geometry import Point\nimport imageio\n\npd.options.mode.chained_assignment = None # defaul... | [
[
"numpy.hstack",
"pandas.merge",
"matplotlib.pyplot.tight_layout",
"pandas.concat",
"matplotlib.pyplot.subplots",
"numpy.linalg.norm",
"pandas.DataFrame",
"numpy.arctan2",
"matplotlib.pyplot.close",
"matplotlib.pyplot.show",
"numpy.random.randint"
]
] |
milmor/GPT | [
"e88164eb890c939ea97f83ac1e7792110939b466"
] | [
"train.py"
] | [
"'''\nAuthor: Emilio Morales (mil.mor.mor@gmail.com)\n Mar 2022\n'''\nimport argparse\nimport os\nos.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' # Disable tensorflow debugging logs\nimport time\nimport tensorflow as tf\nimport tensorflow_text as text\nfrom model import GPT\nfrom utils import *\nfrom hparams import... | [
[
"tensorflow.train.CheckpointManager",
"tensorflow.Variable",
"tensorflow.keras.losses.SparseCategoricalCrossentropy",
"tensorflow.keras.optimizers.schedules.CosineDecay",
"tensorflow.data.Dataset.list_files",
"tensorflow.keras.optimizers.Adam",
"tensorflow.GradientTape",
"tensorflo... |
oeway/redner | [
"3bb5541ccd72d2497ac8e5f6bc09990618b317ec"
] | [
"pyredner/camera.py"
] | [
"import torch\nimport pyredner.transform as transform\nimport redner\nimport math\nimport pyredner\nfrom typing import Tuple, Optional, List\n\nclass Camera:\n \"\"\"\n Redner supports four types of cameras\\: perspective, orthographic, fisheye, and panorama.\n The camera takes a look at transform ... | [
[
"torch.ones",
"torch.max",
"torch.cat",
"torch.min",
"torch.zeros_like",
"torch.eye",
"torch.tensor",
"torch.inverse",
"torch.isfinite",
"torch.diag",
"torch.stack",
"torch.ones_like"
]
] |
yanzhenxing123/illegal_fund_raising_forecast | [
"dcff8f3d73c1f1ea3548e8d25afc9fe5233e3f64"
] | [
"forecast/views.py"
] | [
"from django.shortcuts import render\nfrom rest_framework.views import APIView\n\nfrom illegal_fund_raising_forecast import settings\nfrom .serializer import TestDatasetSerializer, TrainDatasetSerializer\nfrom rest_framework.response import Response\nfrom .models import TrainDataset\nfrom utils import Res\nimport j... | [
[
"pandas.read_csv"
]
] |
oshaikh13/fairseq | [
"d81142405076a4d322985936316cfff9d2460273"
] | [
"fairseq/models/nat/levenshtein_transformer.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\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom fairseq.iterative_refinement_generator import DecoderOut\... | [
[
"torch.nn.functional.softmax",
"torch.nn.functional.log_softmax",
"torch.cat",
"torch.zeros_like",
"torch.nn.functional.linear"
]
] |
soumyave/Facial-Attribute-Analysis-and-Handwritten-Digit-Recognition | [
"acd847a27c7a8f0ec6506b614297d20f21fe8d6a"
] | [
"Handwritten Digits Recognition Using Classification/convolutednn.py"
] | [
"import tensorflow as tf\nimport numpy as np\nimport math\n\ndef weight_variable(shape):\n initial = tf.truncated_normal(shape, stddev=0.1)\n return tf.Variable(initial)\n\ndef bias_variable(shape):\n initial = tf.constant(0.1, shape=shape)\n return tf.Variable(initial)\n\ndef conv2d(xl, W):\n retu... | [
[
"tensorflow.matmul",
"tensorflow.nn.softmax_cross_entropy_with_logits",
"tensorflow.constant",
"tensorflow.truncated_normal",
"tensorflow.Variable",
"tensorflow.nn.max_pool",
"tensorflow.reshape",
"tensorflow.cast",
"tensorflow.placeholder",
"tensorflow.global_variables_ini... |
clazaro/sfepy | [
"78757a6989d6aaf85a3fb27957b9179c5e2aa2c7",
"78757a6989d6aaf85a3fb27957b9179c5e2aa2c7",
"78757a6989d6aaf85a3fb27957b9179c5e2aa2c7",
"78757a6989d6aaf85a3fb27957b9179c5e2aa2c7",
"78757a6989d6aaf85a3fb27957b9179c5e2aa2c7",
"78757a6989d6aaf85a3fb27957b9179c5e2aa2c7"
] | [
"sfepy/discrete/iga/io.py",
"examples/navier_stokes/stokes_slip_bc_penalty.py",
"examples/multi_physics/biot_npbc.py",
"sfepy/terms/terms_navier_stokes.py",
"examples/linear_elasticity/modal_analysis.py",
"examples/navier_stokes/stokes_slip_bc.py"
] | [
"\"\"\"\nIO for NURBS and Bezier extraction data.\n\"\"\"\nfrom __future__ import absolute_import\nimport numpy as nm\nimport six\nfrom six.moves import range\nfrom sfepy.base.ioutils import HDF5ContextManager, enc, dec\n\ndef write_iga_data(filename, group, knots, degrees, control_points, weights,\n ... | [
[
"numpy.asarray"
],
[
"numpy.array",
"numpy.zeros_like"
],
[
"numpy.eye",
"numpy.array",
"numpy.zeros",
"numpy.tile"
],
[
"numpy.ascontiguousarray",
"numpy.array",
"numpy.ones"
],
[
"numpy.abs",
"numpy.sqrt",
"numpy.empty"
],
[
"numpy.arra... |
fukien/incubator-singa | [
"ced9e9d44c200d709db5a2354076390788986b77"
] | [
"setup.py"
] | [
"#\n# 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\")... | [
[
"numpy.get_numpy_include",
"numpy.get_include"
]
] |
wfehrnstrom/harmonize | [
"3f1fdcb7693ff152f17623ce549526ec272698b1",
"e5661d24b2021739e8ac4bf1d3a530eda4e155b3",
"e5661d24b2021739e8ac4bf1d3a530eda4e155b3",
"e5661d24b2021739e8ac4bf1d3a530eda4e155b3",
"e5661d24b2021739e8ac4bf1d3a530eda4e155b3",
"e5661d24b2021739e8ac4bf1d3a530eda4e155b3",
"e5661d24b2021739e8ac4bf1d3a530eda4e155b... | [
"lib/python2.7/site-packages/scipy/special/basic.py",
"lib/python2.7/site-packages/sklearn/cross_decomposition/pls_.py",
"lib/python2.7/site-packages/sklearn/datasets/covtype.py",
"lib/python2.7/site-packages/sklearn/neighbors/tests/test_approximate.py",
"lib/python2.7/site-packages/matplotlib/tests/test_pa... | [
"#\n# Author: Travis Oliphant, 2002\n#\n\nfrom __future__ import division, print_function, absolute_import\n\nimport warnings\n\nimport numpy as np\nimport math\nfrom scipy._lib.six import xrange\nfrom numpy import (pi, asarray, floor, isscalar, iscomplex, real,\n imag, sqrt, where, mgrid, sin, p... | [
[
"numpy.deprecate",
"numpy.imag",
"numpy.sqrt",
"numpy.asarray",
"numpy.issubdtype",
"numpy.round",
"numpy.iscomplexobj",
"numpy.where",
"numpy.place",
"numpy.unique",
"numpy.less",
"numpy.empty_like",
"numpy.sin",
"numpy.finfo",
"numpy.real",
"numpy.... |
VIDA-NYU/prida | [
"cb2af13704506abc73d10f5c346ea21f70dd6e65",
"cb2af13704506abc73d10f5c346ea21f70dd6e65"
] | [
"data-generation/generate-stats-from-training-data.py",
"improvement-prediction/helping_feature_selectors/plotting_scripts/plot_crash_variations.py"
] | [
"from hdfs import InsecureClient\nfrom io import StringIO\nimport json\nimport numpy as np\nfrom operator import add\nimport os\nimport pandas as pd\nfrom pyspark import SparkConf, SparkContext, StorageLevel\nimport sys\n\n\ndef list_dir(file_path, hdfs_client=None, use_hdfs=False):\n \"\"\"Lists all the files i... | [
[
"numpy.histogram"
],
[
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.close",
"numpy.array"
]
] |
freedomtan/caffe2 | [
"28523ff1ff33f18eaf8b04cc4e0f308826e1861a",
"8f41717c46d214aaf62b53e5b3b9b308b5b8db91"
] | [
"caffe2/python/operator_test/mod_op_test.py",
"caffe2/python/operator_test/reduce_ops_test.py"
] | [
"# Copyright (c) 2016-present, Facebook, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | [
[
"numpy.fmod",
"numpy.iinfo"
],
[
"numpy.testing.assert_array_equal",
"numpy.max",
"numpy.mean",
"numpy.random.rand",
"numpy.array",
"numpy.sum"
]
] |
BelitK/bigdataodev | [
"ed952c55fce28c5de2a0890ea25b260b5248017c"
] | [
"American_prophet.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# In[1]:\n\n\nfrom fbprophet import Prophet\nimport pandas as pd\nfrom pandas import DataFrame\nfrom matplotlib import pyplot\n#univariate\n\n\n# In[2]:\n\n\nturkey = pd.read_excel(\"datasetler\\ecomretailfixed.xls\",header=0)\n\n\n# In[3]:\n\n\nturkey.columns = ['ds', 'y'... | [
[
"matplotlib.pyplot.legend",
"pandas.read_excel",
"pandas.to_datetime",
"matplotlib.pyplot.scatter",
"sklearn.metrics.mean_squared_log_error",
"sklearn.metrics.mean_absolute_error",
"pandas.DataFrame",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.show"
]
] |
janelia-cosem/scripts | [
"f4bedbfc4ff81ec1b83282908ba6702baf98c734"
] | [
"tests/test_xarray.py"
] | [
"import pytest\nfrom fibsem_tools.io.zarr import zarr_n5_coordinate_inference\nfrom xarray import DataArray\nimport numpy as np\n\n\ndef pixelResolutionAttr(scales, units, **kwargs):\n return {\"pixelResolution\": {\"dimensions\": scales[::-1], \"unit\": units[0]}}\n\n\ndef resolutionAttr(scales, **kwargs):\n ... | [
[
"numpy.arange"
]
] |
sgbaird/CrabNet | [
"9b3966cb7238dd688b84eb3fae9f2c6ae3a4ae47"
] | [
"examples/paper_figures/Paper_FIG_2.py"
] | [
"import numpy as np\nimport pandas as pd\nimport os\n\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as patches\nfrom matplotlib.colors import Normalize\nimport matplotlib.patheffects as path_effects\nimport seaborn as sns\n\nfrom crabnet.kingcrab import CrabNet\nfrom crabnet.model import Model\nfrom c... | [
[
"matplotlib.patheffects.Normal",
"pandas.Series",
"torch.cat",
"torch.zeros",
"pandas.DataFrame",
"numpy.mean",
"numpy.exp",
"pandas.read_csv",
"matplotlib.pyplot.close",
"matplotlib.pyplot.text",
"numpy.log",
"numpy.isnan",
"matplotlib.patches.Rectangle",
"... |
pythonmite/Daily-Coding-Problem | [
"8f758cb8cf0c6a7524c8874116ca9ed08545c773"
] | [
"problem_2_hard.py"
] | [
"\"\"\"\n Company Name : Uber\n \n Problem Statement : \n Given an array of integers, return a new array such that each element at index i of the new array is the product of all \n the numbers in the original array except the one at i.\n\n For example, if our input was [1, 2, 3, 4, 5],... | [
[
"numpy.prod"
]
] |
Project-X-UBC/smoke-detection-net | [
"93efa7651b772ae89eb8a2214183f2a1f1748e85"
] | [
"scripts/video_splitter.py"
] | [
"import cv2\nfrom os import listdir\nimport json\nimport sys\nimport numpy as np\nfrom concurrent.futures import ProcessPoolExecutor\n\n\n# This script splits the videos in the raw_data folder into frames. Since it is a multi-hour long process, it saves the names of the videos it has already split into a json file ... | [
[
"numpy.mean",
"numpy.sum"
]
] |
aivian/robots | [
"6827886916e36432ce1d806f0a78edef6c9270d9",
"6827886916e36432ce1d806f0a78edef6c9270d9",
"6827886916e36432ce1d806f0a78edef6c9270d9",
"6827886916e36432ce1d806f0a78edef6c9270d9"
] | [
"pybots/src/filters/nonlinearities.py",
"pybots/src/geodesy/geoid.py",
"pybots/src/robot_control/states.py",
"pybots/src/filters/window.py"
] | [
"\"\"\"Implement some nonlinearies\n\"\"\"\nimport numpy\n\nimport scipy.interpolate\n\nclass DelayLine(object):\n \"\"\"Delay a signal\n \"\"\"\n def __init__(self, delay=None):\n \"\"\"Constructor\n\n Arguments:\n delay: time to delay the signal by, defaults to no delay (s)\n\n ... | [
[
"numpy.amin",
"numpy.amax"
],
[
"numpy.rad2deg"
],
[
"numpy.isfinite",
"numpy.clip"
],
[
"numpy.squeeze",
"numpy.array",
"numpy.sum",
"numpy.power"
]
] |
TomekTrzeciak/improver | [
"74b7bc0d194c30ea7af426d153e5047ccb67f60c",
"74b7bc0d194c30ea7af426d153e5047ccb67f60c"
] | [
"lib/improver/generate_ancillaries/generate_ancillary.py",
"lib/improver/tests/utilities/test_rescale.py"
] | [
"# -*- coding: utf-8 -*-\n# -----------------------------------------------------------------------------\n# (C) British Crown Copyright 2017-2019 Met Office.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following c... | [
[
"numpy.logical_not",
"numpy.ma.masked_less",
"numpy.ma.masked_where",
"numpy.ma.default_fill_value",
"numpy.ma.masked_greater",
"numpy.mean",
"numpy.ma.logical_and",
"numpy.array",
"numpy.zeros"
],
[
"numpy.full_like",
"numpy.arange",
"numpy.ones"
]
] |
ysa2106/geco_data | [
"4f0319c01a5cc066b13511ed3f34df87ace822c2",
"4f0319c01a5cc066b13511ed3f34df87ace822c2"
] | [
"geco_diagnostic_plot_pages.py",
"geco_irig_decode.py"
] | [
"#!/usr/bin/env python\n# (c) Stefan Countryman 2017\n\nDESC=\"\"\"Plot a list of timing diagnostic channels, which will be read from\nstdin as a newline-delimited channel list, for a time window around a given\nGPS time. This script can also generate a summary webpage for easy viewing of\nplot results. Use this sc... | [
[
"matplotlib.use"
],
[
"numpy.all",
"numpy.arange",
"numpy.array",
"numpy.zeros"
]
] |
1335654481ren/openpilot | [
"68485aa4e40d28a5d411e7494817f7b749ddc500"
] | [
"selfdrive/controls/lib/adaptivecruise.py"
] | [
"import math\nimport numpy as np\nfrom common.numpy_fast import clip, interp\nimport selfdrive.messaging as messaging\n\n# lookup tables VS speed to determine min and max accels in cruise\n_A_CRUISE_MIN_V = [-1.0, -.8, -.67, -.5, -.30]\n_A_CRUISE_MIN_BP = [ 0., 5., 10., 20., 40.]\n\n# need fast accel at very l... | [
[
"numpy.vstack",
"numpy.clip"
]
] |
NunoEdgarGFlowHub/edward | [
"298fb539261c71e34d5e7aa5a37ed8a029df0820",
"298fb539261c71e34d5e7aa5a37ed8a029df0820",
"298fb539261c71e34d5e7aa5a37ed8a029df0820"
] | [
"examples/factor_analysis.py",
"tests/test-inferences/test_map.py",
"examples/pp_dirichlet_process.py"
] | [
"#!/usr/bin/env python\n\"\"\"Logistic factor analysis on MNIST. Using Monte Carlo EM, with HMC\nfor the E-step and MAP for the M-step. We fit to just one data\npoint in MNIST.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport edward as... | [
[
"tensorflow.zeros",
"tensorflow.ones",
"tensorflow.global_variables_initializer",
"tensorflow.contrib.slim.fully_connected",
"tensorflow.contrib.slim.flatten",
"tensorflow.train.AdamOptimizer",
"tensorflow.examples.tutorials.mnist.input_data.read_data_sets",
"tensorflow.random_norm... |
ProjectAGI/aha | [
"53a98ea42526dca56517dc97fffad874772f10f2",
"53a98ea42526dca56517dc97fffad874772f10f2"
] | [
"aha/datasets/omniglot_lake_dataset.py",
"aha/components/hopfieldlike_component.py"
] | [
"# Copyright (C) 2019 Project AGI\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 agr... | [
[
"tensorflow.read_file",
"tensorflow.gfile.Exists",
"tensorflow.image.resize_images",
"tensorflow.data.Dataset.from_tensor_slices",
"tensorflow.contrib.image.translate",
"tensorflow.reshape",
"numpy.random.shuffle",
"tensorflow.gfile.MakeDirs",
"tensorflow.image.convert_image_dt... |
Gavin-Hoang/mindspore | [
"f745ae0799a0840ebba18021c250f0089325a414",
"f745ae0799a0840ebba18021c250f0089325a414"
] | [
"tests/ut/python/dataset/test_concatenate_op.py",
"tests/st/ops/gpu/test_resize_nearest_neighbor_op.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.testing.assert_array_equal",
"numpy.array"
],
[
"numpy.array"
]
] |
rdutra/multi-class-text-classification-cnn | [
"bdb4403166e8b350fbc2b1073276755e46af9603"
] | [
"train.py"
] | [
"import os\nimport sys\nimport json\nimport time\nimport logging\nimport data_helper\nimport numpy as np\nimport tensorflow as tf\nfrom text_cnn import TextCNN\nfrom tensorflow.contrib import learn\nfrom sklearn.model_selection import train_test_split\n\nlogging.getLogger().setLevel(logging.INFO)\n\ndef train_cnn()... | [
[
"tensorflow.train.global_step",
"tensorflow.Graph",
"tensorflow.all_variables",
"tensorflow.Variable",
"sklearn.model_selection.train_test_split",
"tensorflow.ConfigProto",
"tensorflow.initialize_all_variables",
"tensorflow.Session",
"tensorflow.train.AdamOptimizer",
"numpy... |
cnzeki/DeepLoader | [
"cec3f47692bc77fbdcb397ad7ec21c994328fc00",
"cec3f47692bc77fbdcb397ad7ec21c994328fc00"
] | [
"deeploader/eval/extractor.py",
"deeploader/util/alignment.py"
] | [
"# -*- coding:utf-8 -*-\r\nfrom __future__ import print_function\r\nimport math\r\nimport numpy as np\r\nimport logging\r\nimport time\r\nimport os\r\nimport argparse\r\nimport cv2\r\nimport sys\r\n\r\nfrom deeploader.eval.run_verify import *\r\n \r\n \r\ndef _extract_feature_each(extractor, img_list)... | [
[
"numpy.float32",
"numpy.stack"
],
[
"numpy.dot",
"numpy.array",
"numpy.zeros",
"numpy.transpose"
]
] |
nikhil12-cmd/nikhil12345678 | [
"1aa14b385b6a18b8b4c7e323642448e9bb0ff41b"
] | [
"anprLabelProcessor.py"
] | [
"# import the necessary packages\nimport numpy as np\nfrom sklearn.preprocessing import LabelBinarizer\n\nclass AnprLabelProcessor:\n # init the label binarizers. Maps classes to a set of one-hot vectors\n def __init__(self, plateChars, plateLens):\n # convert the labels from integers to vectors\n self.plat... | [
[
"numpy.array",
"sklearn.preprocessing.LabelBinarizer"
]
] |
CC1st/step-by-step-mindspore | [
"df37ffa60a17d4951814c2bce675809f6aff8f21"
] | [
"src/emb/fact_network.py"
] | [
"\"\"\"\n Copyright (c) 2018, salesforce.com, inc.\n All rights reserved.\n SPDX-License-Identifier: BSD-3-Clause\n For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause\n \n Fact scoring networks.\n Code adapted from https://github.com/TimDettmers/ConvE/blob/m... | [
[
"torch.nn.BatchNorm1d",
"torch.nn.Dropout",
"torch.load",
"torch.cat",
"torch.zeros",
"torch.nn.Conv2d",
"torch.sum",
"torch.nn.Linear",
"torch.nn.functional.sigmoid",
"torch.nn.functional.relu",
"torch.nn.BatchNorm2d"
]
] |
XZ-X/rose6icse | [
"5710dc0e39509f79e42535e0b5ca5e41cbd90fc2"
] | [
"submissions/available/CPC/CPC-what-property/classification/getCommentVecByMean.py"
] | [
"from cleanSent import cleanSentence\nimport numpy as np\nimport pandas as pd\n\n\ndef sent2vec(s, model):\n res = np.zeros(200)\n # sent = cleanSentence(s)\n words = s.split()\n num = 0\n for w in words:\n if model.__contains__(w):\n res += model[w]\n else:\n res ... | [
[
"numpy.zeros"
]
] |
mardillu/gps-polygon-smoothers | [
"7f6c3dd9daa379c4b1c9d4816d489bd3f81b59f1"
] | [
"PolygonSmoother.py"
] | [
"from geopy import distance\nfrom trianglesolver import solve\nfrom RDP import rdp\nfrom math import degrees\nfrom scipy.spatial import ConvexHull\n\n\n\ndef remove_duplicates(coords = []):\n '''Steps through the list of coordinates to find and remove coordinates that appear more than once\n\n Parameters\n ... | [
[
"scipy.spatial.ConvexHull"
]
] |
77loopin/ray | [
"c18caa4db36d466718bdbcb2229aa0b2dc03da1f",
"9322f6aab53f4ca5baf5a3573e1ffde12feae519",
"c18caa4db36d466718bdbcb2229aa0b2dc03da1f",
"c18caa4db36d466718bdbcb2229aa0b2dc03da1f",
"9322f6aab53f4ca5baf5a3573e1ffde12feae519",
"9322f6aab53f4ca5baf5a3573e1ffde12feae519",
"c18caa4db36d466718bdbcb2229aa0b2dc03da1... | [
"release/tune_tests/scalability_tests/create_test_data.py",
"python/ray/data/impl/lazy_block_list.py",
"python/ray/util/collective/tests/single_node_cpu_tests/test_allgather.py",
"python/ray/util/sgd/torch/examples/pytorch_pbt_failure.py",
"python/ray/util/horovod/tests/test_horovod.py",
"python/ray/tune/... | [
"import argparse\nimport numpy as np\nimport os\n\nfrom xgboost_ray.tests.utils import create_parquet\n\nif __name__ == \"__main__\":\n if \"OMP_NUM_THREADS\" in os.environ:\n del os.environ[\"OMP_NUM_THREADS\"]\n\n parser = argparse.ArgumentParser(description=\"Create fake data.\")\n parser.add_arg... | [
[
"numpy.random.seed"
],
[
"numpy.array_split"
],
[
"torch.ones",
"numpy.ones"
],
[
"numpy.random.uniform",
"torch.utils.data.DataLoader"
],
[
"torch.LongTensor",
"torch.randn",
"torch.nn.functional.cross_entropy",
"torch.nn.Linear",
"torch.cuda.is_availab... |
suryaavala/tfx | [
"c315e7cf75822088e974e15b43c96fab86746733"
] | [
"tfx/components/transform/executor.py"
] | [
"# Lint as: python2, python3\n# Copyright 2019 Google LLC. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\... | [
[
"tensorflow.io.FixedLenFeature"
]
] |
pasinb/tensorflow_object_counting_api | [
"db7f2f985783220311d11075af594ced7693f7d2"
] | [
"smurf_counting.py"
] | [
"#----------------------------------------------\n#--- Author : Ahmet Ozlu\n#--- Mail : ahmetozlu93@gmail.com\n#--- Date : 27th July 2019\n#----------------------------------------------\n\n# Imports\nimport tensorflow.compat.v1 as tf\ntf.disable_v2_behavior()\n\n# Object detection impor... | [
[
"tensorflow.compat.v1.disable_v2_behavior"
]
] |
cvmlarun/RANet | [
"3f67a3f36aaacd9cc7fb98ec79f77db8f1ebdc60"
] | [
"codes/RANet_model.py"
] | [
"# ************************************\n# Author: Ziqin Wang\n# Email: ziqin.wang.edu@gmail.com\n# Github: https://github.com/Storife\n# ************************************\nimport torch\nimport torch.nn as nn\nimport numpy as np\nfrom numpy.random import normal\nfrom numpy.linalg import svd\nfrom math import sqr... | [
[
"torch.nn.functional.upsample",
"torch.cat",
"torch.nn.PReLU",
"torch.nn.functional.avg_pool2d",
"torch.nn.Conv2d",
"torch.nn.functional.conv2d",
"torch.nn.UpsamplingBilinear2d",
"torch.nn.functional.adaptive_avg_pool2d",
"torch.nn.functional.sigmoid",
"torch.nn.functional.... |
thomaslu2000/Incremental-Parsing-Representations | [
"1b0ec638e85f0e521a12b53d8b309191c40fe0d3"
] | [
"src/benepar/integrations/nltk_plugin.py"
] | [
"import dataclasses\nimport itertools\nfrom typing import List, Optional, Tuple\n\nimport nltk\nimport torch\n\nfrom .downloader import load_trained_model\nfrom ..parse_base import BaseParser, BaseInputExample\nfrom ..ptb_unescape import ptb_unescape, guess_space_after\n\n\nTOKENIZER_LOOKUP = {\n \"en\": \"engli... | [
[
"torch.cuda.is_available"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.