repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
Str0ngerCheng/Blog-Back-Up | [
"37b89c37a2b3d652e5eb7c3ab8c8cd31e8badde7"
] | [
"code/rnn/rnn_tensorflow_dynamic_rnn.py"
] | [
"# coding: utf-8\n\nimport numpy as np\nimport tensorflow as tf\nfrom tensorflow.python import debug as tf_debug\nimport matplotlib.pyplot as plt\n\n'''超参数'''\nnum_steps = 5\nbatch_size = 200\nnum_classes = 2\nstate_size = 4\nlearning_rate = 0.1\n\n'''生成数据\n就是按照文章中提到的规则,这里生成1000000个\n'''\ndef gen_data(size=1000000)... | [
[
"tensorflow.nn.dynamic_rnn",
"tensorflow.get_variable",
"tensorflow.zeros",
"matplotlib.pyplot.plot",
"tensorflow.contrib.rnn.BasicRNNCell",
"tensorflow.Session",
"numpy.zeros",
"tensorflow.train.AdagradOptimizer",
"tensorflow.unstack",
"numpy.random.choice",
"tensorflo... |
BandaSaiTejaReddy/sktime | [
"979aed585983fb820ddb0ca8a619d5730dbed4a7"
] | [
"sktime/classification/dictionary_based/_boss.py"
] | [
"\"\"\" BOSS classifiers\ndictionary based BOSS classifiers based on SFA transform. Contains a single\nBOSS and a BOSS ensemble\n\"\"\"\n\n__author__ = \"Matthew Middlehurst\"\n__all__ = [\"BOSSEnsemble\", \"BOSSIndividual\", \"boss_distance\"]\n\nimport math\nimport sys\nimport time\nfrom itertools import compress... | [
[
"numpy.sum",
"numpy.unique",
"numpy.asarray",
"numpy.ones",
"numpy.array",
"numpy.zeros",
"sklearn.utils.check_random_state"
]
] |
grlee77/napari | [
"33b1d475049a85aaac66dc46d70044b33d275f8a"
] | [
"napari/types.py"
] | [
"from functools import partial, wraps\nfrom pathlib import Path\nfrom types import TracebackType\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Callable,\n Dict,\n Iterable,\n List,\n NewType,\n Sequence,\n Tuple,\n Type,\n Union,\n)\n\nimport numpy as np\nfrom typing_extensions im... | [
[
"numpy.__version__.split"
]
] |
a-yastrebov/keratools | [
"6a20564174e11e0a8430edc052b60f3acca2b732"
] | [
"detector_cs/cls_make_patterns.py"
] | [
"##################################################################\n# Make negative patterns for dataset with existing detection cascade\n# \n# Copyright (c) 2017 Alexey Yastrebov\n# MIT License, see LICENSE file.\n##################################################################\n\n#coding=utf-8\nfrom keras.mode... | [
[
"numpy.expand_dims"
]
] |
weiwei718/texar | [
"b4ac155a554db4c82a0b09ea36e85d64b8802644"
] | [
"texar/modules/encoders/bert_encoders.py"
] | [
"# Copyright 2019 The Texar 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 required... | [
[
"tensorflow.shape",
"tensorflow.squeeze",
"tensorflow.ones",
"tensorflow.zeros_like",
"tensorflow.variable_scope",
"tensorflow.get_variable_scope"
]
] |
abc123s/ingredient-phrase-tagger | [
"bed492c55b96aaa9ad89aee3034be13e2bf085a0"
] | [
"partition_data.py"
] | [
"import pandas as pd\n\n# set dev and test set size\ndev_size = 5000\ntest_size = 5000\n\ndata = pd.read_csv('nyt-ingredients-snapshot-2015.csv')\n\n# grab random test set\ntest = data.sample(n=test_size)\ndata = data.drop(test.index)\n\n# grab random dev set from remaining data\ndev = data.sample(n=dev_size)\ndata... | [
[
"pandas.read_csv"
]
] |
hdubbs/keras | [
"b96518a22bfd92a29811e507dec0b34248a8a3f5"
] | [
"keras/mixed_precision/model_test.py"
] | [
"# Copyright 2019 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.compat.v2.data.Dataset.from_tensor_slices",
"tensorflow.compat.v2.executing_eagerly",
"tensorflow.compat.v2.test.main",
"tensorflow.compat.v2.mixed_precision.experimental.DynamicLossScale",
"tensorflow.compat.v2.device",
"tensorflow.compat.v2.reduce_mean",
"tensorflow.compa... |
engomarwasfy/sidechainnet | [
"cb6452689533c6a7fb4c055fb0af9739bc5415e2"
] | [
"sidechainnet/utils/align.py"
] | [
"\"\"\"Functionality for aligning protein sequences in ProteinNet vs SidechainNet.\"\"\"\n\nimport numpy as np\nfrom Bio import Align\n\nfrom sidechainnet.structure.build_info import NUM_COORDS_PER_RES, PRODY_CA_DIST\nfrom sidechainnet.utils.download import ASTRAL_ID_MAPPING, determine_pnid_type\nfrom sidechainnet.... | [
[
"numpy.empty",
"numpy.linalg.norm",
"numpy.vstack"
]
] |
yeyupiaoling/PaddlePaddle-CRNN | [
"6a48d3b03eb79570707635b469f9d76770a551f2"
] | [
"train.py"
] | [
"import paddle\nimport numpy as np\nimport os\nfrom datetime import datetime\nfrom utils.model import Model\nfrom utils.decoder import ctc_greedy_decoder, label_to_string, cer\nfrom paddle.io import DataLoader\nfrom utils.data import collate_fn\nfrom utils.data import CustomDataset\nfrom visualdl import LogWriter\n... | [
[
"numpy.mean"
]
] |
tingard/gzbuilder_results | [
"bbcd95033db333ddd9e7213cbf19032747ff8710"
] | [
"default_parameter_exploration.py"
] | [
"import json\nimport numpy as np\nimport pandas as pd\nimport lib.galaxy_utilities as gu\nfrom pprint import pprint\n\n\ndef get_frac(mask):\n return f'{(mask.sum() / mask.size):.2%} out of {mask.size}'\n\n\nparam_limits = {\n 'disk': {\n 'scale': (0, 2, 1),\n 'I': (0, 1, 0.2),\n },\n 'bul... | [
[
"numpy.isin",
"pandas.read_pickle",
"numpy.loadtxt"
]
] |
zhenglabuthscsa/PRADA2 | [
"d050971dc6e0a8ab11f8575787b2f4848502ed21"
] | [
"Filters.py"
] | [
"\"\"\"\ncreated by Juechen Yang at 1/14/19\n\n\"\"\"\nimport numpy as np\ndef switchDonorAcceptor(donorF, acceptorF, df):\n df[donorF], df[acceptorF], = np.where(df['switchOrNot'] == 'switch',\n [df[acceptorF], df[donorF]],\n ... | [
[
"numpy.where"
]
] |
sotetsuk/reinforce | [
"8d98de1d42134c7184625e70f2c3d54153636069"
] | [
"reinforce/vector_env.py"
] | [
"# Copyright (c) 2021 Sotetsu KOYAMADA\n# https://github.com/sotetsuk/reinforce/blob/master/LICENSE\n\n# This implementation is based on a fork from github.com/openai/gym\n# Copyright (c) 2016 OpenAI (https://openai.com)\n# https://github.com/openai/gym/blob/master/LICENSE.md\n\nfrom copy import deepcopy\n\nimport ... | [
[
"numpy.copy",
"numpy.zeros"
]
] |
stephen447/CS7IS2-Artificial-Intelligence-AI---Group-project | [
"59a2a00af3a0bbf84ba5932ebd9efe362201ea89"
] | [
"game_func_q.py"
] | [
"# 2048.py\n\n# importing the logic.py file\n# where we have written all the\n# logic functions used.\nimport logic # Modified this to\nimport numpy as np\n\ndef game(current_matrix, x, curr_score):\n # we have to move up\n if (x == 'W' or x == 'w'):\n\n # call the move_up function\n mat, flag,... | [
[
"numpy.max"
]
] |
Ly0n/cepton_sdk_redist | [
"5b4bf24edadb4fdaf9b8149a70c60d207922a1ad"
] | [
"python/cepton_sdk/settings.py"
] | [
"import copy\nimport json\n\nimport numpy\n\nimport cepton_sdk.common.transform\nfrom cepton_sdk.common import *\n\n_all_builder = AllBuilder(__name__)\n\n\ndef _convert_keys_to_int(d, ignore_invalid=False):\n d_int = {}\n for key, value in d.items():\n try:\n key = int(key)\n except:... | [
[
"numpy.logical_and.reduce",
"numpy.full",
"numpy.logical_or.reduce",
"numpy.any",
"numpy.array"
]
] |
winterstory/selfsphnet | [
"98810deec0dc0608f2511251e3e2ceb4471a2d46"
] | [
"utils/helper.py"
] | [
"import cv2\nimport matplotlib.pyplot as plt\nimport math\nimport numpy as np\nimport os\nimport tensorflow as tf\n\nfrom tqdm import tqdm\nfrom keras import backend as K\n\n\nclass datasource(object):\n def __init__(self, images, poses):\n self.images = images\n self.poses = poses\n\n\ndef preproc... | [
[
"tensorflow.convert_to_tensor",
"matplotlib.pyplot.legend",
"tensorflow.stack",
"tensorflow.reduce_sum",
"numpy.arctan2",
"matplotlib.pyplot.plot",
"tensorflow.contrib.distributions.percentile",
"tensorflow.nn.depthwise_conv2d",
"numpy.arcsin",
"tensorflow.extract_image_pat... |
jonathanvanschenck/pyEMLearn | [
"dc58e41c08c33681d4a7bacde97ad296880ea638"
] | [
"pyEMLearn/catalog/dielectrics.py"
] | [
"from numpy import array\r\nfrom os import path\r\n\r\nfrom pyEMLearn.materials import SellmeierIndex, SellmeierIndexSquare,\\\r\n DiscreteIndex, CauchyIndex, Material, \\\r\n LorentzIndex2\r\n\r\n\r\nAir = SellmeierIndex(\r\n [0.0579210... | [
[
"numpy.array"
]
] |
HuangJingGitHub/PracMakePert_py | [
"1e947b0804fdcd50b2a3afc0af9d824cb55978cd"
] | [
"RLAnIntro/RLAnIntro_Chap5_infinite_variance.py"
] | [
"#######################################################################\r\n# Copyright (C) #\r\n# 2016-2018 Shangtong Zhang(zhangshangtong.cpp@gmail.com) #\r\n# 2016 Kenta Shimada(hyperkentakun@gmail.com) #\r\n# Permission gi... | [
[
"numpy.asarray",
"matplotlib.pyplot.xscale",
"numpy.arange",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.close",
"numpy.random.binomial",
"matplotlib.pyplot.xlabel",
"numpy.add.accumulate",
"matplotlib.pyplot.ylabel"
]
] |
oiseth/TKT4108StructuralDynamics2 | [
"826929e055d9b1457fa0b4c1c8537afa06dc98dd"
] | [
"python/Exercises/ForStudents/Exercise3_task4_timedomainsimulation.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\n\n\"\"\"\n\n#%% Import necessary modules and packages\nimport numpy as np\nfrom scipy import linalg\nfrom matplotlib import pyplot as plt\n\nimport time_integration as ti\nimport time_simulation as ts\n\n#%% Create signal in time domain\n\nplt.close('all')\n\n# Establish system\nL=... | [
[
"numpy.diag",
"numpy.sqrt",
"matplotlib.pyplot.plot",
"numpy.max",
"numpy.mean",
"numpy.arange",
"scipy.linalg.eigh",
"numpy.std",
"matplotlib.pyplot.close",
"numpy.zeros",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.title",
"numpy.array",
"matplotlib.pyp... |
celis/B_decays_clustering- | [
"d73739edaf7fa82a0041d9567d27cd490232b75c",
"d73739edaf7fa82a0041d9567d27cd490232b75c"
] | [
"examples/1909.11088v3/jsd_all_points.py",
"clusterking/cluster/hierarchy_cluster.py"
] | [
"#!/usr/bin/env python3\n\n\"\"\" This script takes the output files from ClusterKinG that corresponded to\nthe results shown in the paper and performs toy experiments as described in\nAppendix C of 1909.11088v3.\n\nYou will need to generate these output files first and put them in this\ndirectory.\n\"\"\"\n\n# std... | [
[
"numpy.hstack",
"numpy.linspace",
"matplotlib.pyplot.subplots",
"numpy.save",
"numpy.zeros_like",
"numpy.load",
"numpy.histogram"
],
[
"matplotlib.pyplot.subplots"
]
] |
manojc/flask-poc | [
"9c6cdf0af1cac086703d6d158f16d0d9f825286d"
] | [
"src/app/ml/models/autotrader_budget_model.py"
] | [
"from numpy import nan, array as numpy_array\r\nfrom pandas import read_csv, merge, DataFrame\r\n\r\nbands_df = read_csv(\"./bands.csv\")\r\ndf = read_csv(\"./slider.csv\")\r\n\r\n\r\ndef add_band_id(x):\r\n band_df = bands_df.apply(lambda y: (y[6], y[7]) if\r\n (x[\"price\"] >= y[\"s... | [
[
"numpy.array",
"pandas.read_csv",
"pandas.DataFrame"
]
] |
cognitobuoy/Optimization-Search-Python | [
"fdebe9e143c97736cdf715e8da51b59002899950"
] | [
"simulated-annealing.py"
] | [
"import sys\nimport copy\nimport math\nimport graph\nimport random\nimport tkinter\nimport numpy as np\n\nfrom state import State\n\nWINDOW_WIDTH = 400\nWINDOW_HEIGHT = 400\nCANVAS_WIDTH = 400\nCANVAS_HEIGHT = 400\n\ndef distance(a, b):\n return math.sqrt(abs((a[0] - b[0]) ** 2 - (a[1] - b[1]) ** 2))\n\ndef crea... | [
[
"numpy.exp"
]
] |
yan-duarte/yan-duarte.github.io | [
"63288c0e81db1f88d1688d39b44dc33e55e003a6"
] | [
"archives/rmp-assignment2.py"
] | [
"\r\nimport pandas as pandas\r\nimport statsmodels.api as sm\r\nimport statsmodels.formula.api as smf\r\nimport seaborn\r\nimport matplotlib.pyplot as plt\r\nimport statistics\r\n\r\n# bug fix for display formats to avoid run time errors\r\npandas.set_option('display.float_format', lambda x:'%.2f'%x)\r\n\r\n\r\n# I... | [
[
"pandas.read_csv",
"matplotlib.pyplot.title",
"matplotlib.pyplot.xlabel",
"pandas.set_option",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] |
yoyololicon/variational-diffwave | [
"b3edc2f1c3dc13fb72c068fb1dd0b24a2b9b423a"
] | [
"models/model.py"
] | [
"# Copyright 2020 LMNT, 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... | [
[
"torch.sigmoid",
"torch.ceil",
"torch.randint",
"torch.floor",
"torch.nn.ConvTranspose2d",
"torch.randn",
"torch.arange",
"torch.exp",
"torch.nn.Linear",
"torch.rand",
"torch.nn.LeakyReLU",
"torch.nn.Conv1d",
"torch.nn.ReLU"
]
] |
TaoLv/Theano | [
"5ee7ff1b75488fac89ec3b26eff0eb4f5b3dfbfd"
] | [
"theano/sandbox/mkl/tests/test_concatenate.py"
] | [
"from __future__ import absolute_import, print_function, division\n\nimport numpy\nimport unittest\nfrom nose.plugins.skip import SkipTest\n\nimport theano\nimport theano.tensor as T\nfrom theano import function\nfrom theano.tests import unittest_tools as utt\nfrom theano.sandbox import mkl\nfrom theano.sandbox.mkl... | [
[
"numpy.concatenate",
"numpy.random.RandomState"
]
] |
pandov/cups-mail | [
"f6370860b440e2ac88bfb36ee79dfea7f8617386"
] | [
"src/nn/metrics.py"
] | [
"import torch\nimport numpy as np\nfrom catalyst.contrib.utils.confusion_matrix import calculate_confusion_matrix_from_tensors, calculate_tp_fp_fn\neps = 1e-7\n\nclass DiceLoss(torch.nn.Module):\n\n def forward(self, y_pred, y_true):\n assert y_pred.size() == y_true.size(), 'Size mismatch'\n inters... | [
[
"numpy.logical_or",
"numpy.logical_and"
]
] |
thededlier/hyperopt | [
"686a0844d7b763312370d63cb0c5083d6b6aa61a"
] | [
"hyperopt/vectorize.py"
] | [
"from __future__ import print_function\nfrom __future__ import absolute_import\nfrom builtins import str\nfrom builtins import zip\nfrom builtins import range\nfrom builtins import object\nimport sys\n\nimport numpy as np\n\nfrom .pyll import Apply\nfrom .pyll import as_apply\nfrom .pyll import dfs\nfrom .pyll impo... | [
[
"numpy.asarray"
]
] |
xwen99/temporal_context_aggregation | [
"0ba11b2c2fff57d484bf2f788072c75f457c804e"
] | [
"pre_processing/feature_post_processing.py"
] | [
"import glob\nimport os\nimport pickle as pk\n\nimport h5py\nimport numpy as np\nfrom tqdm import tqdm\n\n\ndef get_feature_list(root='~/datasets/', dataset='vcdb', feat='imac'):\n if dataset == 'vcdb':\n dataset = 'vcdb'\n elif dataset == 'ccweb':\n dataset = 'CC_WEB_VIDEO'\n elif dataset ==... | [
[
"numpy.load"
]
] |
DevashishJoshi/sugartensor | [
"6eb5b5142b688427b3521f31feda57ffeb8bd6ef"
] | [
"sugartensor/sg_initializer.py"
] | [
"from __future__ import absolute_import\nimport sugartensor as tf\n# noinspection PyPackageRequirements\nimport numpy as np\n\n\n__author__ = 'namju.kim@kakaobrain.com'\n\n\ndef constant(name, shape, value=0, dtype=tf.sg_floatx, summary=True, regularizer=None, trainable=True):\n r\"\"\"Creates a tensor variable ... | [
[
"numpy.linalg.svd",
"numpy.sqrt",
"numpy.eye",
"numpy.random.normal",
"numpy.prod"
]
] |
virtualcell/test_suite | [
"35aeee3edcd8ed937cfce63d13c5d410c5f16143"
] | [
"report_generation/comparator/report_comparator.py"
] | [
"import os\nimport sys\nfrom report_generation.config import Config\nimport libsbml\nimport pandas as pd\n\n\nclass ReportComparator:\n def __init__(self,\n vcell_results_csv_dir=Config.VCELL_RESULTS_CSV_PATH,\n copasi_results_csv_dir=Config.COPASI_RESULTS_CSV_PATH,\n ... | [
[
"pandas.read_csv"
]
] |
cooper-mj/Photocathode-Materials | [
"33e48881617224859856cf22583647118cacf821"
] | [
"Archive/training_labels.py"
] | [
"import pandas as pd\r\nimport numpy as np\r\nimport math\r\n\r\nNUM_MATERIALS = 10000\r\nNUM_MEASUREMENTS = 99 \t# excluding first measurement\r\nNO_EMITTANCE = float('inf')\r\n\r\npath = \"Raw_dataset/\"\r\nmpid_file = \"full_mpid_list_cell_size_sort.txt\"\r\nemittance_file = \"Screening_data/intrinsic_emittance_... | [
[
"numpy.around",
"pandas.DataFrame"
]
] |
Notgnoshi/generative | [
"d9702c18b59553541f0cce706089f9fad501cd33"
] | [
"generative/lsystem/interpreter.py"
] | [
"import io\nimport logging\nfrom typing import Iterable, NewType\n\nimport numpy as np\nfrom shapely.geometry import LineString\n\nfrom .turtle import Turtle\n\nlogger = logging.getLogger(__name__)\n\nToken = NewType(\"Token\", str)\nTokens = Iterable[Token]\nLines = Iterable[LineString]\n\n\nclass LSystemInterpete... | [
[
"numpy.any"
]
] |
cvcomar/pytorch-AdaIN | [
"a0369fbae56f805f27bef3abd0981e0e921c6875"
] | [
"train.py"
] | [
"import argparse\nfrom pathlib import Path\n\nimport torch\nimport torch.backends.cudnn as cudnn\nimport torch.nn as nn\nimport torch.utils.data as data\nfrom PIL import Image, ImageFile\n#from tensorboardX import SummaryWriter\nfrom torchvision import transforms\nfrom tqdm import tqdm\n\nimport net\nfrom sampler i... | [
[
"torch.device",
"torch.load"
]
] |
catalina-bejan/bachelor-graduation-thesis | [
"e3b1bc67c153199a6188fcf1358dac0279b5b9a7"
] | [
"ServerAPI/activity_controller/model_activity/activity_recognition.py"
] | [
"import tensorflow as tf\r\ntf.get_logger().setLevel('ERROR') # Suppress TensorFlow logging (2)\r\nimport os\r\nos.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' # Suppress TensorFlow logging (1)\r\nimport numpy as np\r\nimport cv2\r\nfrom model_activity.activity_recognition_class import ActivityRecognition\r\n... | [
[
"numpy.expand_dims",
"numpy.asarray",
"tensorflow.get_logger",
"numpy.argmax",
"numpy.transpose",
"numpy.array"
]
] |
Yonoi/Data_Mining_Contest | [
"51f5d2e67aed974d2bcdd6c65808dae76193a7b6"
] | [
"packages/diffusion_rate.py"
] | [
"'''\n1. 分析事件传播速率和传播规模\n作者: Mingjie\n时间: 2021年4月4日\n'''\n\nimport time\nimport matplotlib.pyplot as plt \nimport matplotlib.dates as mdates\n\nfrom datetime import datetime\nfrom itertools import groupby\n\ndef calculate_diffusion_rate(filename, df):\n '''\n 计算单位时间(1 hour)内原创和转发总数\n (按照重复记录条目的多少, 可以在引用该函数之... | [
[
"matplotlib.pyplot.gca",
"matplotlib.dates.DateFormatter",
"matplotlib.pyplot.gcf",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show"
]
] |
arthcampos/devito | [
"6abd441e3f5f091775ad332be6b95e017b8cbd16"
] | [
"devito/types/basic.py"
] | [
"import abc\nfrom collections import namedtuple\nfrom ctypes import POINTER, Structure, byref\nfrom functools import reduce\nfrom operator import mul\n\nimport numpy as np\nimport sympy\nfrom sympy.core.assumptions import _assume_rules\nfrom cached_property import cached_property\nfrom cgen import Struct, Value\n\n... | [
[
"numpy.add"
]
] |
Dugnom/cookie-clicker-1-million-optimal | [
"acb20f8904c9d8069dd78fcd2b83ce136cfd68c7"
] | [
"neverclick.py"
] | [
"import networkx as nx\nimport numpy as np\nimport ast\nimport time\nimport matplotlib.pyplot as plt\n\nbasecost_Unit = [15, 100, 1100, 12000, 130000]\ncost_Upgrade = [\n [100, 500, 10000, 100000],\n [1000, 5000, 50000],\n [11000, 55000, 550000],\n [120000, 600000],\n [1300000],\n]\nprerequisites_Upg... | [
[
"matplotlib.pyplot.draw",
"numpy.round",
"matplotlib.pyplot.plot",
"numpy.ceil",
"matplotlib.pyplot.subplot",
"numpy.floor",
"matplotlib.pyplot.ion",
"matplotlib.pyplot.pause",
"matplotlib.pyplot.show"
]
] |
slowy07/clifter_pixel | [
"ad54a9d9275334e74b6b0ecf548b684731f64ab0"
] | [
"slip.py"
] | [
"import sys\nimport os\nfrom collections import OrderedDict\n\nimport torch\nimport torch.nn as nn\nfrom torchvision import transforms\n\nfrom clip import clip\n\nall_slip_models = [\n \"SLIP_VITS16\",\n \"SLIP_VITB16\",\n \"SLIP_VITL16\",\n \"SLIP_CC3M\",\n \"SLIP_CC12M\",\n \"SIMCLR_VITS16\",\n ... | [
[
"torch.load"
]
] |
simonzabrocki/Anticipe | [
"ad0e0aa39217a7e38ed10e1b3eb5be8e47d0e965"
] | [
"data/indicator/EE3/preprocess.py"
] | [
"import pandas as pd\nimport numpy as np\nfrom sklearn.preprocessing import MinMaxScaler\n\n# def preprocess():\n# df = (\n# pd.read_csv('data/indicator/EE3/raw/logistics_index.M.csv')\n# .dropna(axis=1).rename(columns={'Value': 'Logistic index'})\n# .set_index('Country')\n# )\n\... | [
[
"pandas.read_excel"
]
] |
bowang-lab/shape-attentive-unet | [
"20e968e1d42217c89cdf4fc304ed2d8717697eec"
] | [
"data/augmentations.py"
] | [
"import math\nimport numbers\nimport random\nimport numpy as np\nimport torchvision.transforms.functional as tf\n\nfrom PIL import Image, ImageOps\n\nclass Compose(object):\n def __init__(self, augmentations):\n self.augmentations = augmentations\n self.PIL2Numpy = False\n\n def __call__(self, i... | [
[
"numpy.amax",
"numpy.expand_dims",
"numpy.clip",
"numpy.concatenate",
"numpy.array"
]
] |
singlaaditya/BehaviouralCloningSelfDrivingCar | [
"e8c78f5fc31731160760be8a13fbef1235fbd200"
] | [
"model.py"
] | [
"import os\nimport csv\nfrom scipy.ndimage import imread\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport tensorflow as tf\nfrom sklearn.model_selection import train_test_split\nfrom keras.models import Sequential\nfrom keras.layers import Cropping2D, Flatten, Dense, Lambda, Conv2D\nfrom keras.callbacks... | [
[
"numpy.array",
"scipy.ndimage.imread",
"sklearn.model_selection.train_test_split",
"numpy.flip"
]
] |
dykim1222/mlproject | [
"fb05e3072b10c8063239ff9ef8f76cc07c115a38"
] | [
"main.py"
] | [
"import copy\nimport glob\nimport os\nimport time\nimport pdb\nfrom collections import deque\n\nimport gym\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\n\nfrom a2c_ppo_acktr import algo\nfrom a2c_ppo_acktr.arguments import get_args\nfrom a2c_... | [
[
"numpy.log",
"numpy.sqrt",
"numpy.min",
"torch.manual_seed",
"numpy.median",
"numpy.max",
"torch.set_num_threads",
"torch.FloatTensor",
"torch.cuda.is_available",
"torch.cuda.manual_seed_all",
"torch.device",
"torch.no_grad",
"numpy.mean",
"torch.save"
]
] |
ajouellette/phase-transitions | [
"6f737683839d53242e9772dd2784768e532caf8a"
] | [
"metropolis.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nimport time\nfrom numba import jit, prange, float64, int64\n\n# Function to calculate energy of a given configuration\n# if atom_i is specified, then the energy is calculated by updating\n# prev_energy due to atom_i moving by pos_change=[dx,dy]\n@jit(nopytho... | [
[
"numpy.abs",
"numpy.random.seed",
"numpy.linspace",
"numpy.arange",
"numpy.rint",
"matplotlib.pyplot.subplots",
"numpy.linalg.norm",
"numpy.cos",
"numpy.sin",
"numpy.random.randint",
"numpy.random.rand",
"numpy.mean",
"numpy.floor",
"numpy.exp",
"matplot... |
zeeshanalam39/dip-opencv-python | [
"03e99b7a34ca2cf33f58a19820f4eec9b35cddf9",
"03e99b7a34ca2cf33f58a19820f4eec9b35cddf9"
] | [
"9 morphological operations/erosion.py",
"14 local binary patterns/lbp_and_histogram.py"
] | [
"import cv2 as cv # Importing packages\nimport numpy as np\nimport math\n\nIMAGE = cv.imread('D:\\@Semester 06\\Digital Image Processing\\Lab\\Manuals\\Figures\\lab9\\_img1.jpg', 0) # Reading img\ncv.imshow('Original Image', IMAGE) # Showing img\ncv.waitKey(0)\ncv.destroyAllWindows()\n\n\ndef convert_to_binary(... | [
[
"numpy.pad",
"numpy.ones",
"numpy.shape",
"numpy.floor",
"numpy.zeros",
"numpy.sum"
],
[
"numpy.pad",
"numpy.shape",
"numpy.array",
"numpy.sum",
"matplotlib.pyplot.show"
]
] |
lthurlow/Boolean-Constrained-Routing | [
"d60a648d17d5dadaa0fb5ef9961fcea9d9784dfe"
] | [
"networkx-1.8.1/networkx/linalg/laplacianmatrix.py"
] | [
"\"\"\"\nLaplacian matrix of graphs.\n\"\"\"\n# Copyright (C) 2004-2013 by\n# Aric Hagberg <hagberg@lanl.gov>\n# Dan Schult <dschult@colgate.edu>\n# Pieter Swart <swart@lanl.gov>\n# All rights reserved.\n# BSD license.\nimport networkx as nx\nfrom networkx.utils import require, not_implemented_for... | [
[
"numpy.diag",
"numpy.dot",
"numpy.sqrt",
"numpy.isinf",
"numpy.linalg.eig",
"numpy.asmatrix",
"numpy.identity",
"numpy.errstate",
"numpy.array",
"numpy.zeros",
"numpy.sum"
]
] |
nekithockey75/graph-rcnn.pytorch | [
"776e01764fec8fbf1eb3c8c1ee2636e326402792"
] | [
"lib/scene_parser/rcnn/modeling/rpn/inference.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\nimport torch\n\nfrom lib.scene_parser.rcnn.modeling.box_coder import BoxCoder\nfrom lib.scene_parser.rcnn.structures.bounding_box import BoxList\nfrom lib.scene_parser.rcnn.structures.boxlist_ops import cat_boxlist\nfrom lib.scene_parser.rcnn... | [
[
"torch.topk",
"torch.zeros_like",
"torch.arange",
"torch.cat"
]
] |
utahnlp/layer_augmentation_qa | [
"a3dd2d7af6f45b2aa500ff7612f77c31fb879cf0"
] | [
"encoder.py"
] | [
"import sys\n\nimport torch\nfrom torch import nn\nfrom torch.autograd import Variable\nfrom view import *\nfrom holder import *\nfrom util import *\nfrom highway import *\nfrom join_table import *\nfrom dropout_lstm import *\nfrom locked_dropout import *\nfrom char_cnn import *\nfrom char_rnn import *\n\n# encoder... | [
[
"torch.nn.Dropout",
"torch.ones",
"torch.nn.LSTM",
"torch.nn.GRU",
"torch.nn.Linear",
"torch.autograd.Variable"
]
] |
qiaozhijian/vLPD-Net | [
"106f317df8500e38d3e603c23d3e160967d0b1ea"
] | [
"dataloader/samplers.py"
] | [
"# Author: Jacek Komorowski\n# Warsaw University of Technology\n\nimport copy\nimport random\n\nfrom torch.utils.data import DataLoader, Sampler\n\nfrom dataloader.oxford import OxfordDataset\nfrom misc.log import log_string\n\nVERBOSE = False\n\n\nclass BatchSampler(Sampler):\n # Sampler returning list of indic... | [
[
"torch.utils.data.DataLoader"
]
] |
fafusha/dice | [
"f0a501d042004dfa6f54dc6a0736dbe4df8eb081"
] | [
"plot_pot.py"
] | [
"import matplotlib.pyplot as plt\nimport numpy as np\n\nplayer_num = 20\navg_pot = [0.1062, 0.1698, 0.2392, 0.3115, 0.3897, 0.48615, 0.602, 0.7240, 0.827,\n 0.969, 1.155, 1.3039, 1.4595, 1.635, 1.9, 2.2423, 2.3067, 2.66665, 2.935]\nx_val = [str(i) for i in range(2, player_num + 1)]\n\nfig = plt.figure()\n... | [
[
"matplotlib.pyplot.title",
"matplotlib.pyplot.figure",
"numpy.arange",
"matplotlib.pyplot.bar",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] |
xuhao1/mgmetis | [
"35ff409f6d6d94103a122a8aec8c86788e20b1c6"
] | [
"tests/test_part_kway.py"
] | [
"# -*- coding: utf-8 -*-\nimport numpy as np\nimport pytest\n\ntry:\n from mgmetis.parmetis import part_kway\n from mpi4py import MPI\n\n comm = MPI.COMM_WORLD\n has_mpi = True\nexcept (ImportError, ModuleNotFoundError):\n has_mpi = False\n\n\ndef create_graph(dtype=None):\n # NOTE: test the examp... | [
[
"numpy.asarray",
"numpy.append",
"numpy.where"
]
] |
parkerwray/tmm | [
"8c27a56163d33de5955611eee35864c4485d1b2b"
] | [
"pw_RadCool_0_1B_IR_v2.py"
] | [
"\"\"\"\nImport relevant modules\n\"\"\"\n \nfrom __future__ import division, print_function, absolute_import\n\n#from tmm.tmm_core import (coh_tmm, unpolarized_RT, ellips,\n# position_resolved, find_in_structure_with_inf)\nfrom wptherml.wptherml.datalib import datalib\nimport tmm.tmm_core as ... | [
[
"matplotlib.pyplot.legend",
"numpy.imag",
"numpy.linspace",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.tight_layout",
"scipy.interpolate.InterpolatedUnivariateSpline",
"numpy.stack",
"numpy.real",
"scipy.interpolate.interp1d",
"numpy.argmax",
"matplotlib.pyplot.figure... |
Jwuthri/gtfstools | [
"d0db0c89588f936f02d4e6cccb70034ec1e4b9b1"
] | [
"mixer/gtfs/normalizer/model.py"
] | [
"\"\"\"Normalize a gtfs to agree with our needed.\"\"\"\r\nimport logging\r\n\r\nimport pandas as pd\r\n\r\nimport utilities.utils as tools\r\nimport utilities.datetime_time as dt\r\nfrom utilities.decorator import logged\r\nfrom utilities.file_dir import hashfile\r\nfrom utilities.pandas_tools import change_nan_va... | [
[
"pandas.merge",
"pandas.concat",
"pandas.DataFrame"
]
] |
JacobRawling/BayesianOptimization | [
"716f2f01b183319de2c7dbe392c4b91cf1606b04"
] | [
"BayesianOptimization/kernels.py"
] | [
"\"\"\"\n\"\"\"\nfrom scipy.spatial.distance import cdist \nimport numpy as np \n\nclass RBF:\n \"\"\"\n A stationary kernel also known as the squared exponential kernel\n Parameterized by a length scale \n k(x_i, x_j) = exp(-1 / 2 d(x_i / length_scale, x_j / length_scale)^2)\n\n\n ... | [
[
"numpy.squeeze",
"numpy.eye",
"scipy.spatial.distance.cdist",
"numpy.ndim",
"numpy.atleast_2d",
"numpy.exp",
"numpy.zeros"
]
] |
yoselalberto/ia_proyecto_final | [
"00abf18b2c7f744c1d4b355c54dce6cf131b7639"
] | [
"utils.py"
] | [
"# dependencies\nimport numpy as np\nimport pandas as pd\nfrom sklearn.impute import SimpleImputer\nfrom sklearn.preprocessing import OneHotEncoder, StandardScaler\nfrom sklearn.model_selection import GridSearchCV\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.tree ... | [
[
"sklearn.preprocessing.StandardScaler",
"sklearn.preprocessing.OneHotEncoder",
"sklearn.impute.SimpleImputer",
"pandas.DataFrame"
]
] |
yochaiedlitz/T2DM_UKB_predictions | [
"1e6b22e3d51d515eb065d7d5f46408f86f33d0b8"
] | [
"PRS_UKBB.py"
] | [
"from .PRS import PRS_sumstats as PRS\nimport os\nimport pandas as pd\nimport numpy as np\nfrom addloglevels import sethandlers\n\nJob_Name = 'No_UKBB_PRS'\ndbg = True\n\nif dbg:\n USE_FAKE_QUE = True\n Job_Name = Job_Name+\"dbg\"\n Num_of_Chrs = 2\nelse:\n USE_FAKE_QUE = False\n Num_of_Chrs = 22\n\n... | [
[
"numpy.arange",
"pandas.DataFrame"
]
] |
mattroz/yatopi | [
"278bac6f3d2f13916ae9d43309b9f38b608426bd"
] | [
"tool/inference.py"
] | [
"import os\nimport torch\nfrom argparse import ArgumentParser\nimport torch.nn as nn\nfrom torch.utils.data import DataLoader\nfrom data_generator import ImageDataLoader, randomSequentialStratifiedSampler, randomSequentialSampler, batchOvertfitSampler\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nimport ... | [
[
"torch.load",
"torch.no_grad",
"torch.cuda.is_available",
"numpy.float32",
"torch.device",
"numpy.array"
]
] |
siwendy/finetune-transformer-lm | [
"a15ba3384090faa656fd591e5b6e3328e25a4fc7"
] | [
"train.py"
] | [
"import os\nimport time\nimport math\nimport json\nimport joblib\nimport random\nimport argparse\nimport numpy as np\nimport tensorflow as tf\n\nfrom tqdm import tqdm\nfrom functools import partial\nfrom sklearn.utils import shuffle\nfrom sklearn.metrics import accuracy_score\n\nfrom opt import adam, warmup_cosine,... | [
[
"tensorflow.get_variable",
"tensorflow.concat",
"tensorflow.reduce_sum",
"tensorflow.cast",
"tensorflow.equal",
"numpy.concatenate",
"numpy.random.randn",
"tensorflow.nn.conv1d",
"numpy.arange",
"tensorflow.gradients",
"tensorflow.ConfigProto",
"tensorflow.gather",
... |
mestery/doorcam | [
"0dfa62f03ea8a1d1c1bae7a0c8f0301b4ad21237"
] | [
"doorcam.py"
] | [
"import face_recognition\nimport cv2\nfrom datetime import datetime, timedelta\nimport numpy as np\nimport platform\nimport pickle\nimport names\n\n\n# Our list of known face encodings and a matching list of metadata about each face.\nknown_face_encodings = []\nknown_face_metadata = []\n\n\ndef save_known_faces():\... | [
[
"numpy.argmin"
]
] |
khaledghobashy/uraeus-nmbd-python | [
"ea2364ed328baeb33693494ec669e992e86c1488"
] | [
"uraeus/nmbd/python/engine/numerics/solvers/temp.py"
] | [
"# Standard library imports.\nimport time\n\n# Third party imports.\nimport numpy as np\nimport scipy as sc\n\n# Local imports.\nfrom .base import abstract_solver, solve, progress_bar\nfrom .integrators import BDF\n\n################################################################\n#################################... | [
[
"numpy.eye",
"numpy.linalg.norm",
"scipy.linalg.lu",
"numpy.concatenate",
"numpy.argmax",
"numpy.array",
"numpy.zeros"
]
] |
inbaroren/improving-compgen-in-semparse | [
"06463b94f3d1b291759c08783d5a8661e2960f2e"
] | [
"text2sql/training/metrics/coverage_loss.py"
] | [
"import numpy as np\n\n\ndef calculate_coverage_loss(data, mask):\n # shape: steps, input\n attention = np.stack([step_info['question_attention'].detach().cpu() for step_info in data])\n if mask is None:\n mask = np.ones_like(attention)\n else:\n # mask is a list that marks what steps prod... | [
[
"numpy.expand_dims",
"numpy.minimum",
"numpy.ones_like",
"numpy.array",
"numpy.sum"
]
] |
jalammar/pandas | [
"bd4332f4bff135d4119291f66e98f76cc5f9a80e"
] | [
"pandas/core/frame.py"
] | [
"\"\"\"\nDataFrame\n---------\nAn efficient 2D container for potentially mixed-type time series or other\nlabeled data series.\n\nSimilar to its R counterpart, data.frame, except providing automatic data\nalignment and a host of useful data manipulation methods having to do with the\nlabeling information\n\"\"\"\nf... | [
[
"pandas.util._validators.validate_bool_kwarg",
"pandas.core.dtypes.common._ensure_int64",
"pandas.compat.lzip",
"pandas.core.common._default_index",
"pandas.core.dtypes.common.is_named_tuple",
"pandas.compat.OrderedDict",
"pandas.core.common.standardize_mapping",
"pandas.core.dtype... |
yqstar/DeepLearningFromScratch | [
"dc03767fcf424d13e9b9f68362a05cfb141a5208"
] | [
"NerualNetwork.py"
] | [
"# -*- coding:utf-8 -*-\n# Author:AndrewYq\n# Date:2020-08-16\n# Email:hfyqstar@163.com\n# Reference: https://mlfromscratch.com/neural-network-tutorial/\n# https://www.freecodecamp.org/news/building-a-neural-network-from-scratch/\n# https://www.jeremyjordan.me/convolutional-neural-networks/\n#... | [
[
"numpy.dot",
"numpy.log",
"numpy.ones_like",
"numpy.random.seed",
"numpy.eye",
"numpy.max",
"numpy.argmax",
"numpy.zeros_like",
"numpy.random.rand",
"numpy.exp",
"numpy.sum"
]
] |
bimtauer/flytekit | [
"3cfbb71779c44cf33866b45b22f71ffc2d607d92"
] | [
"tests/flytekit/unit/core/test_type_hints.py"
] | [
"import dataclasses\nimport datetime\nimport functools\nimport os\nimport random\nimport tempfile\nimport typing\nfrom collections import OrderedDict\nfrom dataclasses import dataclass\nfrom enum import Enum\nfrom textwrap import dedent\n\nimport pandas\nimport pandas as pd\nimport pytest\nfrom dataclasses_json imp... | [
[
"pandas.util.hash_pandas_object",
"pandas.DataFrame"
]
] |
demianzhang/R-C3D | [
"78da577a6c9ed5f928c4f2d08282aea480324423"
] | [
"lib/tdcnn/twin_transform.py"
] | [
"# --------------------------------------------------------\n# R-C3D\n# Copyright (c) 2017 Boston University\n# Licensed under The MIT License [see LICENSE for details]\n# Written by Huijuan Xu\n# --------------------------------------------------------\n\nimport numpy as np\n\ndef twin_transform(ex_rois, gt_rois):... | [
[
"numpy.log",
"numpy.minimum",
"numpy.exp",
"numpy.zeros",
"numpy.vstack"
]
] |
jamesktkim/pycounts_jkim | [
"3c627da06b694aab8099ad69d0d4b2798aaab7fd"
] | [
"src/pycounts_jkim/plotting.py"
] | [
"import matplotlib.pyplot as plt\n\ndef plot_words(word_counts, n=10):\n \"\"\"Plot a bar chart of word counts.\n \n Parameters\n ----------\n word_counts : collections.Counter\n Counter object of word counts.\n n : int, optional\n Plot the top n words. By default, 10.\n\n Returns... | [
[
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.ylabel"
]
] |
subhamoykarmakar224/WindowsThreatAttackAnalyzer | [
"1afd1604b8f6912c6b589d8cb1f02d51dea4fd13"
] | [
"parse.py"
] | [
"import pandas as pd\r\nimport re\r\nimport csv\r\nimport pymongo\r\nimport datetime as dt\r\nimport dateutil\r\n#import analyst\r\nimport numpy as np\r\n\r\ndef windowsLogParse(path, store):\r\n #path = str(path).replace('/', '\\\\\\\\')\r\n# store = 'win-acc-1'\r\n myclient = pymongo.MongoClient(\"mongodb... | [
[
"pandas.read_csv"
]
] |
daigz1224/course-pcd-assignments | [
"7db7c45025265f813d499ede156fbfee35096002"
] | [
"assignment-02/code/benchmark.py"
] | [
"# 对数据集中的点云,批量执行构建树和查找,包括kdtree和octree,并评测其运行时间\n\nimport random\nimport math\nimport numpy as np\nimport time\nimport os\nimport struct\n\nfrom scipy.spatial import KDTree\n\nimport octree as octree\nimport kdtree as kdtree\nfrom result_set import KNNResultSet, RadiusNNResultSet\n\n\nnp.seterr(all='raise')\n\ndef ... | [
[
"numpy.expand_dims",
"numpy.asarray",
"numpy.linalg.norm",
"numpy.seterr",
"scipy.spatial.KDTree",
"numpy.argsort"
]
] |
verystrongjoe/muzero-general | [
"1183e3d79dce3fb02f76d97cc797a71fa8a5bb34"
] | [
"trainer.py"
] | [
"import time\nfrom games.base_classes import MuZeroConfigBase\nfrom threading import Thread\nfrom torch.utils.tensorboard import SummaryWriter\nimport numpy\nimport torch\nimport models\n\n\nclass Trainer:\n \"\"\"\n Class which run in a dedicated thread to train a neural network and save it in the shared sto... | [
[
"torch.nn.LogSoftmax",
"torch.tensor",
"torch.utils.tensorboard.SummaryWriter",
"torch.device",
"torch.nn.MSELoss"
]
] |
floidgilbert/AIX360 | [
"36459f2a585d0e2a2e8582562bf226d4402b57d6",
"36459f2a585d0e2a2e8582562bf226d4402b57d6"
] | [
"aix360/datasets/meps_dataset.py",
"aix360/algorithms/dipvae/dipvae_utils.py"
] | [
"import os\n\nimport pandas as pd\n\n\ndef default_preprocessing(df):\n df = df[df['RACEV2X'].isin(['1','2'])]\n df = df[df['HISPANX'] == 2]\n\n racedict = {1.0: 0.0,2.0: 1.0}\n df = df.assign(RACEV2X = df['RACEV2X'].replace(to_replace = racedict))\n df = df.rename(columns = {'RACEV2X' : 'RACE3'})\n\... | [
[
"pandas.read_csv"
],
[
"torch.mean",
"numpy.linspace",
"torch.sum",
"numpy.round",
"torch.autograd.Variable",
"numpy.arange",
"torch.randn",
"matplotlib.pyplot.close",
"matplotlib.pyplot.subplots_adjust",
"torch.nn.functional.softplus",
"torch.nn.BatchNorm1d",
... |
hackingmaterials/Amset | [
"99d9a7d25f47696820ca704af36c46bad9cc49d4"
] | [
"amset/core/data.py"
] | [
"import logging\nimport time\nfrom collections import defaultdict\nfrom os.path import join as joinpath\nfrom typing import Dict, List, Optional\n\nimport numpy as np\nfrom monty.json import MSONable\nfrom monty.serialization import dumpfn\nfrom pymatgen.core.structure import Structure\nfrom pymatgen.electronic_str... | [
[
"numpy.log",
"numpy.abs",
"numpy.linspace",
"numpy.triu_indices",
"numpy.logspace",
"numpy.min",
"numpy.cumsum",
"numpy.all",
"numpy.max",
"numpy.any",
"numpy.ndindex",
"numpy.where"
]
] |
mina-gaid/scp | [
"38e1cd303d4728a987df117f666ce194e241ed1a"
] | [
"dashboard/create_plots.py"
] | [
"from django.db import models\nimport pandas as pd\nimport os\nimport quandl, math, datetime\nimport time\nimport numpy as np\nimport random\nfrom statistics import mean\nfrom sklearn import preprocessing, model_selection, svm\nfrom sklearn.linear_model import LinearRegression\nimport matplotlib.pyplot as plt\nfrom... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.scatter",
"matplotlib.style.use",
"matplotlib.figure.Figure",
"sklearn.model_selection.train_test_split",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"sklearn.linear_model.LinearRegression",
"matplotlib.pyplot.xlabel",
... |
jorgemauricio/proyectoGranizo | [
"380c8660da2775cc4ac594fcb02a1ee0f37e6503",
"380c8660da2775cc4ac594fcb02a1ee0f37e6503"
] | [
"algoritmos_procesamiento/procesamiento_datos_nasa_area_influencia.py",
"algoritmos_procesamiento/generar_mapa_interpolado.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\n#######################################\n# Script que permite el procesamiento\n# de datos de precipitación de la NASA\n# Author: Jorge Mauricio\n# Email: jorge.ernesto.mauricio@gmail.com\n# Date: 2018-02-01\n# Version: 1.0\n#################################... | [
[
"pandas.concat",
"pandas.read_csv"
],
[
"pandas.read_csv",
"pandas.to_datetime",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.clf",
"numpy.array",
"matplotlib.pyplot.figure"
]
] |
manki11/Machine-Learning-Algos | [
"a6ee9c46dd8843ccb3468031d487dca8995caf9e"
] | [
"Classification/Kernel SVM/kernel.py"
] | [
"#Kernel SVM\n\n# Classification template\n\n# Importing the libraries\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd\n\n# Importing the dataset\ndataset = pd.read_csv('Social_Network_Ads.csv')\nX = dataset.iloc[:, [2, 3]].values\ny = dataset.iloc[:, 4].values\n\n# Splitting the dataset i... | [
[
"matplotlib.pyplot.legend",
"sklearn.cross_validation.train_test_split",
"pandas.read_csv",
"matplotlib.pyplot.title",
"numpy.unique",
"sklearn.metrics.confusion_matrix",
"matplotlib.colors.ListedColormap",
"sklearn.svm.SVC",
"matplotlib.pyplot.xlabel",
"sklearn.preprocessi... |
lcc157/code | [
"8809ca7172582c9ff4a3178cacb6498d22dba457"
] | [
"unisal/models/MobileNetV3.py"
] | [
"\"\"\"\nCreates a MobileNetV3 Model as defined in:\nAndrew Howard, Mark Sandler, Grace Chu, Liang-Chieh Chen, Bo Chen, Mingxing Tan, Weijun Wang, Yukun Zhu, Ruoming Pang, Vijay Vasudevan, Quoc V. Le, Hartwig Adam. (2019).\nSearching for MobileNetV3\narXiv preprint arXiv:1905.02244.\n\"\"\"\nimport torch\nimport to... | [
[
"torch.nn.Sequential",
"torch.nn.ReLU6",
"torch.nn.Dropout2d",
"torch.nn.Conv2d",
"torch.nn.Sigmoid",
"torch.nn.Identity",
"torch.nn.AdaptiveAvgPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.Conv1d",
"torch.nn.ReLU"
]
] |
mmchougule/kedro | [
"6a04ab1f7b6b943008e298d41624a79c04a8ff8c",
"6a04ab1f7b6b943008e298d41624a79c04a8ff8c"
] | [
"features/steps/io_parquet_steps.py",
"tests/io/test_hdf_s3.py"
] | [
"# Copyright 2018-2019 QuantumBlack Visual Analytics Limited\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# THE SOFTWARE IS P... | [
[
"pandas.util.testing.assert_frame_equal",
"pandas.DataFrame"
],
[
"pandas.util.testing.assert_frame_equal"
]
] |
VapeJordan/rss | [
"53c7c98e5f8816618a436aa48ae25fc46ee12cea"
] | [
"rss/forge_client.py"
] | [
"from IPython.display import clear_output\nimport matplotlib\nimport matplotlib.pylab as plt\nimport numpy as np\nimport s3fs\nimport os\nfrom scipy.signal import butter, lfilter, medfilt\nimport zarr\n\ndef parse_silxia_name(line):\n url = line.split(\" \")[-1].rstrip()\n segy_file = os.path.basename(url)\n ... | [
[
"scipy.signal.medfilt",
"numpy.arange",
"numpy.linalg.norm",
"matplotlib.pylab.title",
"numpy.percentile",
"scipy.signal.butter",
"matplotlib.pylab.figure",
"matplotlib.pylab.imshow",
"matplotlib.pylab.ylabel",
"scipy.signal.lfilter",
"matplotlib.pylab.xlabel",
"mat... |
ibrahimgh25/EL-GAN-Implementation | [
"bff0766e682a6441bb27b3a3aa5cf136202564b5"
] | [
"elgan_training.py"
] | [
"import torch\nfrom torch.optim import Adam, SGD\nfrom torch.utils.data import DataLoader\nfrom torch.optim.lr_scheduler import ExponentialLR\n\n# from dense.el_gan import Generator, Discriminator\nfrom training_utils import *\nfrom training_utils.simplified_models import Discriminator, Generator\n\n###############... | [
[
"torch.utils.data.DataLoader",
"torch.tensor",
"torch.utils.tensorboard.SummaryWriter",
"torch.cuda.is_available",
"torch.nn.init.kaiming_normal_"
]
] |
aloyschen/SSD-Pytorch | [
"9032fa4ab9509f5b21f9da08f2b9547db7ede7df"
] | [
"dataset/ImageNetData.py"
] | [
"from utils import config\nimport torchvision.datasets as datasets\nimport torchvision.transforms as transforms\nfrom torch.utils.data import DataLoader\n\nclass DataReader:\n def __init__(self):\n normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406],\n std=[... | [
[
"torch.utils.data.DataLoader"
]
] |
Georeactor/auto-sklearn | [
"458a74c1875c9a2844a7150cec533259f83a48c8"
] | [
"autosklearn/pipeline/components/regression/random_forest.py"
] | [
"import numpy as np\n\nfrom ConfigSpace.configuration_space import ConfigurationSpace\nfrom ConfigSpace.hyperparameters import UniformFloatHyperparameter, \\\n UniformIntegerHyperparameter, CategoricalHyperparameter, \\\n UnParametrizedHyperparameter, Constant\n\nfrom autosklearn.pipeline.components.base impo... | [
[
"sklearn.ensemble.RandomForestRegressor"
]
] |
PiyushMahamuni/roslearning | [
"b16655afef685c42b4ae7930c0952080c8895993"
] | [
"src/Assignment/_03Subscriber.py"
] | [
"#! /usr/bin/env python\n\nimport rospy\nimport cv2\nimport numpy as np\nfrom sensor_msgs.msg import Image\nfrom cv_bridge import CvBridge, CvBridgeError\n\n# CONSTANTS\nIMAGE_TOPIC = \"tennis_ball_image\"\nNODE_NAME = \"tennis_ball_detector\"\n\n# GLOBALS\nbridge = CvBridge()\nimage_sub: rospy.Subscriber = None\n\... | [
[
"numpy.zeros"
]
] |
JASON7033/HAKE-Action-Torch-Activity2Vec | [
"74a70f9d6b286af907c72863ccd25cf0353859bd"
] | [
"activity2vec/dataset/hake_dataset.py"
] | [
"#############################################\n# Author: Hongwei Fan #\n# E-mail: hwnorm@outlook.com #\n# Homepage: https://github.com/hwfan #\n#############################################\nimport torch\nimport torch.utils\nimport cv2\nimport numpy as np\nimport random\... | [
[
"numpy.maximum",
"numpy.minimum",
"numpy.random.choice",
"numpy.asarray",
"numpy.arange",
"numpy.tile",
"numpy.random.permutation",
"numpy.array",
"numpy.zeros"
]
] |
Aetf/fathom | [
"1f0dafa9fe3b7988708522d93ecda7f282cb2090"
] | [
"fathom/dataset.py"
] | [
"from __future__ import absolute_import, print_function, division\n\nimport os\nimport tensorflow as tf\n\n\nclass Dataset(object):\n \"\"\"Simple wrapper for a dataset.\n\n Inspired by David Dao's TensorFlow models code.\n \"\"\"\n\n def __init__(self, subset, record_dir=None, synthesized=False):\n ... | [
[
"tensorflow.TFRecordReader"
]
] |
maksim2042/EMSE-6740 | [
"ef6e70c7828b768e3820755c8d292e4d18017a09"
] | [
"week9/axtell.py"
] | [
"from mesa import Agent, Model\nfrom mesa.time import RandomActivation\nfrom random import random, randint,choice\n\n\nclass Firm(Agent):\n def __init__(self,unique_id, alpha,model):\n super().__init__(unique_id, model)\n self.agents = []\n self.utility=0\n self.alpha = random()\n ... | [
[
"pandas.DataFrame"
]
] |
SandraHernandezH/robi_final_project | [
"9c8fb071f604f92c4864d88768102bf770dedf95"
] | [
"robotics_project/scripts/behaviour_trees/bt_students-2.py"
] | [
"#!/usr/bin/env python\n\nfrom math import *\n\nimport py_trees as pt\nimport py_trees_ros as ptr\nimport rospy\nfrom actionlib import SimpleActionClient\nfrom geometry_msgs.msg import PoseStamped, PoseWithCovarianceStamped, Twist\nfrom move_base_msgs.msg import MoveBaseActionFeedback\nfrom numpy import linalg\nfro... | [
[
"numpy.linalg.norm"
]
] |
dhauge/nionui | [
"7b86b70f9a3048b071684bb841963e02b492fdac"
] | [
"nion/ui/TestUI.py"
] | [
"# standard libraries\nimport collections\nimport copy\nimport enum\nimport json\nimport pathlib\nimport typing\n\n# third party libraries\nimport numpy\n\n# local libraries\nfrom . import CanvasItem\nfrom . import DrawingContext\nfrom . import UserInterface as UserInterfaceModule\nfrom nion.utils import Geometry\n... | [
[
"numpy.zeros"
]
] |
Mopolino8/VortexFitting | [
"b03d30811a5050d16e7bee40ddc4c4d920fd9b08"
] | [
"tests/test_fitting.py"
] | [
"import unittest\nfrom nose import with_setup # optional\n\nimport numpy as np\n\nimport fitting\n\n\"\"\"\ntest using \"nosetests -v tests/test_tools.py\"\n\"\"\"\n\n\n# Dummy field to use\nsample_field = np.array([[1.1, 0.9, 1.3, 0.7],\n [2.1, 1.9, 2.3, 1.7],\n [3.1... | [
[
"numpy.testing.assert_almost_equal",
"numpy.array"
]
] |
PatwinchIR/ultra-sort | [
"09fa26c3c77cb31b98031bdf1f76c54361d75b8e"
] | [
"analysis/analysis.py"
] | [
"from pandas import DataFrame\nimport seaborn as sns\nsns.set(style=\"whitegrid\")\nimport fileinput\n\nresults = []\n\ndef parse_scoreline(line):\n parts = line.split()\n algo = parts[0][1:-1]\n num_elems = parts[1]\n time = parts[-2]\n return [algo, int(num_elems), float(time)]\n\nif __name__ == '_... | [
[
"pandas.merge",
"pandas.DataFrame"
]
] |
nfahlgren/hsi_toolkit_py | [
"3a03c58bbeaf7b323fa345a22531fa00c56e68b6",
"3a03c58bbeaf7b323fa345a22531fa00c56e68b6",
"3a03c58bbeaf7b323fa345a22531fa00c56e68b6"
] | [
"demos/demo_signature_det.py",
"hsi_toolkit/signature_detectors/smf_detector.py",
"hsi_toolkit/anomaly_detectors/cbad_anomaly.py"
] | [
"from scipy.io import loadmat\nimport matplotlib.pyplot as plt\nfrom hsi_toolkit.signature_detectors import *\nfrom hsi_toolkit.util import get_RGB\n\n\"\"\"\nDemo script that runs all signature detectors in hsi_toolkit_py\n\nInputs:\n\thsi_sub - n_row x n_col x n_band hyperspectral image\n\ttgt_spectra - n_band x ... | [
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.title",
"scipy.io.loadmat",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.subplots_adjust",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
],
[
"numpy.cov",
"numpy.mean",
"numpy.sqrt"
],
[
"numpy.cov",
"... |
chao0716/pybullet_ur5_robotiq | [
"cb2870859a482060cbcc745c5f2d0b0dcb657eaa"
] | [
"utilities.py"
] | [
"import pybullet as p\nimport glob\nfrom collections import namedtuple\nfrom attrdict import AttrDict\nimport functools\nimport torch\nimport cv2\nfrom scipy import ndimage\nimport numpy as np\n\n\nclass Models:\n def load_objects(self):\n raise NotImplementedError\n\n def __len__(self):\n raise... | [
[
"numpy.linalg.inv",
"numpy.arange",
"numpy.repeat",
"numpy.array"
]
] |
sdadia/internship | [
"a4180d9f1460b1e7b56f4c65a2b7f8ffbd8d3caf"
] | [
"utility/missing.py"
] | [
"# imports\nimport pandas as pd\n\n\ndef missing_stats(data):\n ''' \n Finds number of missing values for each column of pandas data frame,\n in terms of raw counts and as percentage.\n\n Parameters\n ----------\n data : Pandas dataframe\n The data frame\n\n Returns\n -------\n mis... | [
[
"pandas.DataFrame"
]
] |
nikolasmorshuis/nnUNet | [
"514809072433b4363412db47c174148a8e3657c4"
] | [
"nnunet/inference/segmentation_export.py"
] | [
"# Copyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany\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.min",
"numpy.copy",
"numpy.load",
"numpy.array",
"numpy.zeros"
]
] |
joshbeasley/crowd-counter | [
"980d6f1eb4238b2250984c2ed4379d365a76c651"
] | [
"src/crowd_count.py"
] | [
"import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom src import network\nfrom src import models \n\nclass CrowdCounter(nn.Module):\n def __init__(self, ce_weights=None):\n super(CrowdCounter, self).__init__() \n self.CCN = models.CMTL()\n if ce_weights is not ... | [
[
"torch.nn.functional.softmax",
"torch.nn.MSELoss",
"torch.Tensor",
"torch.nn.BCELoss"
]
] |
zhenduow/fairseq | [
"7953176bff9165a71fd9d18d5b623c2f52fdf9d9"
] | [
"fairseq/models/fconv_self_att.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 logging\nimport math\nimport os\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom fairseq impor... | [
[
"torch.nn.GLU",
"torch.nn.functional.glu",
"torch.Tensor",
"torch.nn.functional.dropout",
"torch.cat",
"torch.nn.ModuleList",
"torch.nn.Embedding",
"torch.nn.Sigmoid",
"torch.nn.Linear",
"torch.nn.functional.pad"
]
] |
rmhyman/DataScience | [
"c839c97c76f104ab298563a5c8b48f6d90be5f60",
"c839c97c76f104ab298563a5c8b48f6d90be5f60"
] | [
"Lesson4/lineplot_compare_with_ggplot.py",
"Lesson3/mann_whitney_subway_data.py"
] | [
"\r\nimport pandas\r\n\r\nfrom ggplot import *\r\n\r\n\r\ndef lineplot_compare(hr_by_team_year_sf_la_csv):\r\n # Write a function, lineplot_compare, that will read a csv file\r\n # called hr_by_team_year_sf_la.csv and plot it using pandas and ggplot.\r\n #\r\n # This csv file has three columns: yearID, ... | [
[
"pandas.read_csv"
],
[
"scipy.stats.mannwhitneyu"
]
] |
vagrantism/airbyte | [
"b072a6d7bd6ea0b843ad7e98ff8f98dd3b8aa824"
] | [
"airbyte-integrations/connectors/source-file/source_file/client.py"
] | [
"#\n# Copyright (c) 2021 Airbyte, Inc., all rights reserved.\n#\n\n\nimport os\nimport json\nimport traceback\nfrom typing import Iterable, Mapping\nfrom urllib.parse import urlparse\n\nimport google\nimport tempfile\nimport smart_open\nimport numpy as np\nimport pandas as pd\nimport tarfile as tf\nfrom airbyte_cdk... | [
[
"pandas.notnull"
]
] |
PhilipVinc/netket | [
"87f63afce0462c3ba80ba6679e8e3cc42393d272"
] | [
"test/variational/test_variational_mixed.py"
] | [
"# Copyright 2021 The NetKet 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 required... | [
[
"numpy.testing.assert_allclose"
]
] |
otivedani/earth-vision | [
"52d1f1019f47c4611345703d381b9cda960afa7f"
] | [
"earthvision/datasets/l7irish.py"
] | [
"from PIL import Image\nimport os\nimport shutil\nimport posixpath\nimport numpy as np\nimport pandas as pd\nimport glob\nimport requests\n\nfrom typing import Any, Callable, Optional, Tuple\nfrom .vision import VisionDataset\nfrom .utils import _urlretrieve, _load_img\nfrom bs4 import BeautifulSoup\n\n\nclass L7Ir... | [
[
"pandas.DataFrame"
]
] |
OpenPerceptionX/PersFormer_3DLane | [
"d1c851e2eb628407fd419ed0806707a3aea39ef1"
] | [
"models/ops/setup.py"
] | [
"# ==============================================================================\n# Binaries and/or source for the following packages or projects are presented under one or more of the following open\n# source licenses:\n# setup.py The PersFormer Authors Apache License, Version 2.0\n#\n# Contact simac... | [
[
"torch.cuda.is_available"
]
] |
czarnobylu/OpenCLGA | [
"c002b5177104db5bcdbb0192db25fbbb45516f27"
] | [
"OpenCLGA/evaluation/ant/ant_tsp.py"
] | [
"#!/usr/bin/python3\nimport math\nimport numpy\nimport os\nimport pyopencl as cl\nimport random\nimport sys\nfrom OpenCLGA import utils\n\nclass AntTSP():\n\n def __init__(self, options):\n self.__iterations = options['iterations']\n self.__ants = options['ants']\n # the option for pheromone... | [
[
"numpy.array",
"numpy.zeros",
"numpy.empty"
]
] |
tyler-w-medlin/SCoRe | [
"963ad13b4cc182ea90e272fb3d4d034d784b4e59"
] | [
"server/code_summarizer.py"
] | [
"\"\"\"\nCode summarizer - loads model, summarizes input code\n\nAuthor: Tyler Medlin\n\"\"\"\n\nimport logging\nfrom pathlib import Path\nfrom keras.models import Model, load_model\nimport tensorflow as tf\nimport os\nimport warnings\nimport sys\nsys.path.append('../utils')\nfrom seq2seq_utils import load_text_pro... | [
[
"tensorflow.get_default_graph",
"tensorflow.logging.set_verbosity"
]
] |
pankaj-pundir/git | [
"edb1a9e4eeced40ed50c457b63aea47c0dbea155"
] | [
"openCV_tutorials/opencv_alvin.py"
] | [
"import cv2\nimport numpy as np\nimport matplotlib.pyplot as plt\n\ndef cuber_effect(image,frame_size=(480,848),kernel_size=(10,14)):\n '''frame_size input size of frame in tuple , kernel size in tuple x and y axis'''\n no_of_cubes=(int(frame_size[0]/kernel_size[0]),int(frame_size[1]/kernel_size[1]))\n for... | [
[
"matplotlib.pyplot.imshow",
"numpy.zeros"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.