repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
sichun/lagou_personal_assistant
[ "4a6c8971fe28cd06521675ae5bc84c3996cd03c5" ]
[ "spider/jsonparse.py" ]
[ "# -*- coding: utf-8 -*-\nimport re\nimport demjson\nimport pandas as pd\nfrom spider.setting import col_names\n\nclass JsonParse:\n '''\n 解析网页信息\n '''\n\n def __init__(self, htmlCode):\n self.htmlCode = htmlCode\n self.json = demjson.decode(htmlCode)\n pass\n\n def parseTool(sel...
[ [ "pandas.DataFrame" ] ]
Fanxingye/DeepRS
[ "06b98cf2cb2781656805eafc577fbd088f37d17d" ]
[ "deepctr_torch/layers/utils.py" ]
[ "# -*- coding:utf-8 -*-\n\"\"\"\n\nAuthor:\n Weichen Shen,weichenswc@163.com\n\n\"\"\"\nimport numpy as np\nimport torch\n\n\ndef concat_fun(inputs, axis=-1):\n if len(inputs) == 1:\n return inputs[0]\n else:\n return torch.cat(inputs, dim=axis)\n\n\ndef slice_arrays(arrays, start=None, stop=...
[ [ "torch.cat" ] ]
vaibhavsaxena11/fastMRI
[ "9e1f1574ce25ee56e4c4e35c3b916119d4259ec5" ]
[ "models/unet/train_unet.py" ]
[ "\"\"\"\nCopyright (c) Facebook, Inc. and its affiliates.\n\nThis source code is licensed under the MIT license found in the\nLICENSE file in the root directory of this source tree.\n\"\"\"\n\nimport logging\nimport pathlib\nimport random\nimport shutil\nimport time\n\nimport numpy as np\nimport torch\nimport torch...
[ [ "torch.abs", "numpy.random.seed", "torch.load", "torch.manual_seed", "torch.utils.data.DataLoader", "torch.optim.RMSprop", "torch.nn.functional.mse_loss", "torch.no_grad", "numpy.mean", "torch.nn.DataParallel", "torch.optim.lr_scheduler.StepLR" ] ]
veltzerdoron/quants
[ "68a153e2ada2b9b0c223cef61d863378f836ebef" ]
[ "tests/test_classifiers.py" ]
[ "# Auto Encoder (AE) approach\n\n# imports\n\nimport unittest\n\n# my class imports\nfrom keras.layers import MaxPooling1D, UpSampling1D\nfrom keras.losses import CategoricalCrossentropy\nfrom tensorflow.python.keras.models import Sequential\n\nfrom quants.quantifiers import *\nfrom quants.classifiers import Single...
[ [ "tensorflow.keras.initializers.Constant", "tensorflow.compat.v1.keras.backend.backend", "tensorflow.keras.metrics.Recall", "tensorflow.concat", "tensorflow.keras.models.Model", "tensorflow.config.list_logical_devices", "tensorflow.python.keras.models.Sequential", "tensorflow.config...
salvacarrion/mltests
[ "e4ac9711c1c80171f302edc88011fbe06e754490" ]
[ "translation/custom/trainer.py" ]
[ "import os\nfrom pathlib import Path\n\nimport torch\nfrom translation.custom.dataset import TranslationDataset\nfrom translation.custom import models, search_algorithms\n\n\ndef train(data_path, src_lang, trg_lang, batch_size=128, max_tokens=None, max_epochs=10, learning_rate=1e-3,\n weight_decay=0, clip_...
[ [ "torch.cuda.is_available", "torch.load" ] ]
olivethree/voice_assistant_automation
[ "6dbbf632453c194591e21b94984cb7357333426f" ]
[ "scripts/run_experiment.py" ]
[ "import os\nimport sys\nimport glob\nfrom datetime import datetime\nimport pandas as pd\nfrom mutagen.mp3 import MP3\nfrom playsound import playsound\nimport time\n\n\n# Get project root directory\nROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n\n# Directories of audio filenames\n\n# Voice ...
[ [ "pandas.Series" ] ]
qinr/MRDet
[ "44b608ec6007db204dcb6b82eff9e356fc7b56d0" ]
[ "mmdet/core/bbox/transformer_rbbox.py" ]
[ "import mmcv\r\nimport numpy as np\r\nimport math\r\nimport math\r\nimport torch\r\nimport copy\r\nimport cv2\r\n\r\ndef ndarray2tensor(arrays, device_id):\r\n '''\r\n :param arrays:list(ndarray) \r\n :return: \r\n '''\r\n tensors = []\r\n for i in range(len(arrays)):\r\n tensor = torch.fro...
[ [ "numpy.log", "torch.max", "torch.cat", "torch.sin", "torch.min", "torch.zeros_like", "torch.argmin", "numpy.stack", "torch.tensor", "torch.from_numpy", "torch.log", "torch.stack", "numpy.zeros", "torch.cos" ] ]
Filoteea/dissertation_code
[ "e538320c5c8a6801075c2380e6dedf78a9334a5e" ]
[ "Final Model/plot_scenarios.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Thu Mar 24 18:15:35 2022\r\n\r\nUsed for plottinf future H2 scenarios for Section 3.4\r\n\r\n@author: Filoteea Moldovan\r\n\"\"\"\r\n\r\n\r\n# Standard Library imports\r\nimport argparse\r\nimport gzip\r\nimport matplotlib.dates as mdates\r\nimport matplotlib.pyplot ...
[ [ "matplotlib.dates.DateFormatter", "pandas.to_datetime", "pandas.DateOffset", "matplotlib.dates.WeekdayLocator", "numpy.arange", "matplotlib.pyplot.close", "numpy.array", "matplotlib.pyplot.figure" ] ]
SowmyaLR/models
[ "63251464950dde5728ef7f86062b08f84b8180a2" ]
[ "research/object_finder/model_main.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.estimator.RunConfig", "tensorflow.train.latest_checkpoint", "tensorflow.estimator.train_and_evaluate", "tensorflow.app.run" ] ]
wissamjur/LocalImpact
[ "afb843d1908ed831e3169bb41c27deafc4e020a5", "afb843d1908ed831e3169bb41c27deafc4e020a5" ]
[ "recommenders/models/newsrec/models/npa.py", "recommenders/models/rlrmc/RLRMCdataset.py" ]
[ "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nimport tensorflow.keras as keras\nfrom tensorflow.keras import layers\n\n\nfrom recommenders.models.newsrec.models.base_model import BaseModel\nfrom recommenders.models.newsrec.models.layers import PersonalizedAttenti...
[ [ "tensorflow.keras.layers.Concatenate", "tensorflow.keras.layers.Dropout", "tensorflow.keras.layers.Activation", "tensorflow.keras.Input", "tensorflow.keras.layers.Lambda", "tensorflow.keras.layers.Embedding", "tensorflow.keras.layers.TimeDistributed", "tensorflow.keras.layers.Dense...
Ghasak/Geographical_Basemap
[ "80e9555da46f1a0227f345dc29b60ed7cbe1f5ec" ]
[ "Project_files/Part2_SomeCustomization/2_tutorial.py" ]
[ "import numpy as np\nimport matplotlib\nmatplotlib.use('TkAgg')\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.basemap import Basemap\n\n\nplt.figure(figsize=(8, 8))\n\nm = Basemap(projection='mill',\n llcrnrlat=-60,\n urcrnrlat=90,\n l...
[ [ "matplotlib.use", "matplotlib.pyplot.show", "matplotlib.pyplot.title", "matplotlib.pyplot.figure" ] ]
Tingting-Liu-star/OpenHGNN
[ "020eae19537c48af9de25c0b7b0ffa5a083ed593" ]
[ "openhgnn/dataset/LinkPredictionDataset.py" ]
[ "import dgl\nimport numpy as np\nimport torch as th\nfrom dgl.data.utils import load_graphs\nfrom dgl.data.knowledge_graph import load_data\nfrom . import BaseDataset, register_dataset\nfrom . import AcademicDataset, HGBDataset\nfrom ..utils import add_reverse_edges\n\n\n@register_dataset('link_prediction')\nclass ...
[ [ "torch.LongTensor", "numpy.sum", "numpy.ones_like", "torch.full", "numpy.random.choice", "numpy.unique", "numpy.arange", "numpy.reshape", "torch.cat", "numpy.stack", "numpy.concatenate", "numpy.where", "torch.nonzero", "torch.stack", "numpy.array", "...
unball/strategy
[ "51a9bd0b7c55222712dd655ceaa85fa1099dcf60" ]
[ "simple_strategy/strategy_potential.py" ]
[ "#!/usr/bin/env python\nimport rospy\nimport numpy as np\n\nimport potential_fields as pf\nfrom unball.msg import MeasurementSystemMessage\nfrom communication.msg import target_positions_msg\nfrom subprocess import call\n\nBALL_ATTRACTIVE = 4\nTANGENCIAL_BALL_MAGNITUDE = 0.5\nENEMY_REPULSIVE_RANGE = 0.7\nENEMY_REPU...
[ [ "numpy.array" ] ]
phanxuanphucnd/active-learning
[ "eb16786ff1049d8ca92212c8c2f87d3bfd15fb52" ]
[ "utils/util.py" ]
[ "import os\nimport re\nimport ast\nimport configparser\nimport pandas as pd\nfrom datetime import date\nimport matplotlib.pyplot as plt\nfrom pandas.plotting import table\nfrom unicodedata import normalize as nl\n\n# Function to plot confusion matrics\nimport os\nimport numpy as np\nimport itertools\nimport matplot...
[ [ "matplotlib.pyplot.imshow", "pandas.read_csv", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.yticks", "matplotlib.pyplot.title", "numpy.sum", "matplotlib.pyplot.get_cmap", "matplotlib.pyplot.savefig", "matplotlib.pyplot.colorbar", "matplotlib.pyplot.ylabel", "mat...
soo4826/pytorch-deeplab-xception
[ "e5439e00d2161672a5a26c835519caf8b1d27470" ]
[ "utils/saver.py" ]
[ "import os\nimport shutil\nimport torch\nfrom collections import OrderedDict\nimport glob\n\nclass Saver(object):\n\n def __init__(self, args):\n self.args = args\n self.directory = os.path.join('run', args.dataset, args.checkname)\n self.runs = sorted(glob.glob(os.path.join(self.directory, ...
[ [ "torch.save" ] ]
SDM-TIB/dtreeviz
[ "aeb32b55446eeab2ee4e2c6482891655c7e53874" ]
[ "dtreeviz/trees.py" ]
[ "import os\nimport tempfile\nfrom pathlib import Path\nfrom sys import platform as PLATFORM\nfrom typing import List\nfrom math import ceil\n\nimport numpy as np\nimport pandas as pd\nimport graphviz\nimport matplotlib.patches as patches\nimport matplotlib.pyplot as plt\nfrom colour import Color, rgb2hex\nfrom grap...
[ [ "numpy.linspace", "numpy.dtype", "pandas.DataFrame", "numpy.max", "numpy.mean", "matplotlib.patches.Polygon", "numpy.unique", "numpy.argmax", "matplotlib.pyplot.close", "numpy.count_nonzero", "matplotlib.pyplot.figure", "numpy.nonzero", "numpy.min", "matplot...
jb753/turbogen
[ "632d87e4345fc2de389f6b7f51a58fc9e9e9164d" ]
[ "turbigen/convert_unsteady.py" ]
[ "\"\"\"This script reads a steady TS solution and creates an unsteady input file.\"\"\"\nimport numpy as np\nfrom ts import ts_tstream_reader, ts_tstream_steady_to_unsteady, ts_tstream_type\nfrom ts import ts_tstream_load_balance, ts_tstream_patch_kind\nimport sys\n\n# Set parameters for unsteady data output\n\n# N...
[ [ "numpy.round" ] ]
JWKennington/pynstein
[ "5333a4f90991a0e69be13c68fbe67f172aeb9d85" ]
[ "pystein/geodesic.py" ]
[ "\"\"\"Utilities for solving geodesic equation\n\n\"\"\"\nimport itertools\nimport typing\nfrom collections import namedtuple\n\nimport numpy\nimport pandas\nimport sympy\nfrom scipy import integrate\n\nfrom pystein import metric, curvature, utilities\n\n\nclass Solution:\n\tdef __init__(self, soln: typing.List[sym...
[ [ "pandas.concat", "numpy.arange", "numpy.cos", "pandas.DataFrame", "scipy.integrate.odeint", "numpy.sin" ] ]
mstoelzle/solving-occlusion
[ "34a89bf54f43b40c5e54adff855ad58b95476e49" ]
[ "src/learning/models/vae/unet_vae.py" ]
[ "\"\"\" Full assembly of the parts to form the complete network \"\"\"\n\nimport numpy as np\nfrom torch import nn\nfrom typing import *\n\nfrom .base_vae import BaseVAE\nfrom ..unet.unet_parts import *\nfrom src.dataloaders.dataloader_meta_info import DataloaderMetaInfo\nfrom src.enums import *\nfrom src.datasets....
[ [ "torch.nn.Sequential" ] ]
kmiksa/UVA_AML20
[ "4c6b6b99984f570bc148a73d83828e6f184df9fc" ]
[ "week_1/dataset_utils.py" ]
[ "import os\nimport struct\nimport numpy as np\n\ntry:\n import pickle\nexcept ImportError:\n import cPickle as pickle\n\n\n\ndef load_mnist(dataset = \"training\", path = \".\"):\n \"\"\"\n Python function for importing the MNIST data set. It returns an iterator\n of 2-tuples with the first element ...
[ [ "numpy.fromfile" ] ]
Flyfoxs/DFL-CNN
[ "49ef653488aabbcc2495305d39b63f5f4c5093ea" ]
[ "drawrect.py" ]
[ "from model.DFL import DFL_VGG16\nfrom utils.util import *\nfrom utils.transform import *\nfrom train import *\nfrom validate import *\nfrom utils.init import *\nimport sys\nimport argparse\nimport os\nimport random\nimport shutil\nimport time\nimport warnings\nimport torch\nimport torch.nn as nn\nimport torch.nn.p...
[ [ "numpy.arange" ] ]
kingjr/decod_unseen_maintenance
[ "5f4188934af775a10ec2c7ba8b4bbf47d5143086" ]
[ "scripts/run_plot_subscore_gat.py" ]
[ "# Author: Jean-Remi King <jeanremi.king@gmail.com>\n#\n# Licence: BSD 3-clause\n\n\"\"\"Temporal Generalization Analyses: subscore data (score a subset of the test\nset) and visibility regression (correlation of single trial prediction with\nexperimental condition).\n\nUsed to generate Figure 6.\n\"\"\"\nimport o...
[ [ "numpy.diag", "numpy.linspace", "numpy.squeeze", "matplotlib.pyplot.get_cmap", "numpy.round", "numpy.mean", "numpy.nanmean", "numpy.nanstd", "numpy.where", "numpy.unique", "numpy.arange", "numpy.sin", "numpy.diff", "numpy.zeros", "numpy.median", "sci...
kiteco/kiteco-public
[ "74aaf5b9b0592153b92f7ed982d65e15eea885e3" ]
[ "kite-python/kite_common/kite/canonicalization/utils.py" ]
[ "import numpy as np\nfrom scipy.sparse import csr_matrix\n\ndef save_sparse_csr(filename, array):\n np.savez(filename, data=array.data ,indices=array.indices, indptr=array.indptr, shape=array.shape)\n\ndef load_sparse_csr(filename):\n loader = np.load(filename)\n return csr_matrix((loader['data'], loader['...
[ [ "numpy.load", "numpy.savez", "scipy.sparse.csr_matrix" ] ]
barbarametzler/ClustViz
[ "a460e1ffb5195dfe1e12bca106366901d169a690" ]
[ "tests/test_chameleon2.py" ]
[ "from clustviz.chameleon.graphtools import (\n knn_graph,\n pre_part_graph,\n plot2d_graph,\n plot2d_data,\n)\nfrom clustviz.chameleon.chameleon2 import cluster2, connected_components, prepro_edge\nfrom clustviz.chameleon.chameleon import merge_best\n\nimport pandas as pd\nfrom sklearn.datasets import m...
[ [ "pandas.DataFrame", "sklearn.datasets.make_blobs" ] ]
mnrmja007/my_personal_dl_projects
[ "8fb1e1e6644478e9e97bf116150af1959c6b4fac" ]
[ "Convolutional_Neural_Networks/Autonomous driving application Car detection/Autonomous+driving+application+-+Car+detection+-+v3.py" ]
[ "\n# coding: utf-8\n\n# # Autonomous driving - Car detection\n# \n# Welcome to your week 3 programming assignment. You will learn about object detection using the very powerful YOLO model. Many of the ideas in this notebook are described in the two YOLO papers: Redmon et al., 2016 (https://arxiv.org/abs/1506.02640)...
[ [ "tensorflow.boolean_mask", "matplotlib.pyplot.imshow", "tensorflow.image.non_max_suppression", "tensorflow.variables_initializer", "tensorflow.Session", "tensorflow.random_normal" ] ]
iiscleap/SelfSup_PLDA
[ "8a79cd8011133fab0f72701bcd1c0cde1fcc4022" ]
[ "services/agglomerative.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Dec 30 15:51:43 2019\n\n@author: prachi singh \n@email: prachisingh@iisc.ac.in \n\"\"\"\n\nimport numpy as np\nimport argparse\nimport sys\nimport os\nimport matplotlib.pyplot as plt\nimport pickle\nfrom pdb import set_trace as bp\nimport subp...
[ [ "numpy.dot", "numpy.amax", "numpy.max", "numpy.exp", "numpy.where", "numpy.ix_", "numpy.unique", "numpy.tril_indices", "numpy.arange", "numpy.load", "numpy.triu", "numpy.zeros", "numpy.min", "numpy.delete", "numpy.transpose", "numpy.argsort", "nu...
AbdulRafay98/ivy
[ "308a5397e5be81534bf31eb2a1ed8ba3a3bc8b87" ]
[ "ivy/functional/backends/numpy/elementwise.py" ]
[ "# global\nimport numpy as np\nimport numpy.array_api as npa\n\ntry:\n from scipy.special import erf as _erf\nexcept (ImportError, ModuleNotFoundError):\n _erf = None\n\ndef add(x1: np.ndarray,\n x2: np.ndarray)\\\n -> np.ndarray:\n if not isinstance(x2, np.ndarray):\n x2 = np.asarray(...
[ [ "numpy.logical_xor", "numpy.sqrt", "numpy.arctan", "numpy.asarray", "numpy.promote_types", "numpy.arctan2", "numpy.negative", "numpy.exp", "numpy.square", "numpy.right_shift", "numpy.greater", "numpy.arcsin", "numpy.less", "numpy.subtract", "numpy.greate...
shivi98g/Fair-k-means-Clustering-via-Algorithmic-Fairness
[ "89fd94e84b2b59927e1984a80b65ae658ff1cd4f" ]
[ "SOTA/Variational Fair Clustering (Ziko)/Kmeans_Kmedian/src/bound_update.py" ]
[ "# -*- coding: utf-8 -*-\n\nimport numpy as np\nimport timeit\nfrom src.progressBar import printProgressBar\nfrom numba import jit\nimport numexpr as ne\n\n\n#import random\n#random.seed(0)\n#np.random.seed(0)\n\n\ndef normalize(S_in):\n\n maxcol = S_in.max(1)[:,np.newaxis]\n S_in = ne.evaluate('S_in - maxco...
[ [ "numpy.dot", "numpy.maximum", "numpy.unique", "numpy.argmax", "numpy.exp", "numpy.zeros" ] ]
13060923171/xianmu
[ "3deb9cdcf4ed1d821043ba1d3947ff35697e4aae" ]
[ "爬取房天下的框架/爬取房天下的信息/code/FTXSpider.py" ]
[ "#!/usr/bin/env python\n# encoding: utf-8\n'''\n@author: taiyc\n@file: FTXSpider\n@time: 2019/7/28 0:23\n'''\n\nimport requests, time, re, os, xlsxwriter, openpyxl\nimport pandas as pd\nfrom datetime import datetime\nfrom lxml.html import etree\nfrom requests.cookies import RequestsCookieJar\nfrom multiprocessing.d...
[ [ "pandas.read_excel" ] ]
simonBreumier/3Deye
[ "08b066a099219eb6dcbe789485cd6479d820255c" ]
[ "calibration/chessboard_tools.py" ]
[ "\"\"\"\nVarious usefull function for chessboard calibration\n\"\"\"\nimport cv2\nimport numpy as np\nimport glob\n\n\ndef order_points(pts):\n \"\"\"Returns an ordered list of points\n\n :param pts: initial list of points\n \"\"\"\n rect = np.zeros((4, 2), dtype=\"float32\")\n\n s = pts.sum(axis=1)\...
[ [ "numpy.min", "numpy.reshape", "numpy.max", "numpy.argmax", "numpy.diff", "numpy.argmin", "numpy.array", "numpy.zeros", "numpy.sum" ] ]
a7031x/OpenNRE
[ "d83414178a3efb570f52f49ec7aa0684e329253c" ]
[ "model/rnn_max_adv.py" ]
[ "from framework import Framework\nimport tensorflow as tf\n\nFLAGS = tf.app.flags.FLAGS\n\ndef rnn_max_adv(is_training):\n if is_training:\n with tf.variable_scope('rnn_max_adv', reuse=False): \n framework = Framework(is_training=True)\n word_embedding = framework.embedding.word_embe...
[ [ "tensorflow.variable_scope", "tensorflow.nn.softmax" ] ]
mehulrastogi/genrl
[ "589a3619497b38eaa376168c78b9f84d4ff434e5" ]
[ "genrl/utils/data_bandits/covertype_bandit.py" ]
[ "from pathlib import Path\nfrom typing import Tuple\n\nimport pandas as pd\nimport torch\n\nfrom genrl.utils.data_bandits.base import DataBasedBandit\nfrom genrl.utils.data_bandits.utils import (\n download_data,\n fetch_zipped_data_without_header,\n)\n\nURL = (\n \"https://archive.ics.uci.edu/ml/machine-l...
[ [ "pandas.read_csv", "torch.tensor" ] ]
Zeroto521/twd
[ "ec5b4f8ff3295015c9a9e326dde7b15c2a9bc11b" ]
[ "twd.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\ntwd\n=====\nFirstly the space structure of set pair information granule can be divided into positive granule,\nnegative granule, different granule, which were similar and slightly different with three regions of\ngeneralized three-way decision. The three kinds of information granul...
[ [ "numpy.apply_along_axis", "numpy.where" ] ]
dietmarwo/nevergrad
[ "b366e2bfd5127e034f4942d84f997fc3b8083d06" ]
[ "nevergrad/parametrization/test_parameters_legacy.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\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\"\"\"This test module contains old tests coming from the instrumentation package.\nSome are still relevant, othe...
[ [ "numpy.testing.assert_equal", "numpy.testing.assert_approx_equal", "numpy.random.seed", "numpy.random.normal", "numpy.testing.assert_raises", "numpy.array", "numpy.random.RandomState", "numpy.testing.assert_array_almost_equal" ] ]
nuwandesilva/QCElemental
[ "0396f21164648b50014f676a3098f63721f4f8ae" ]
[ "qcelemental/molparse/to_schema.py" ]
[ "import copy\nfrom typing import Dict\n\nimport numpy as np\n\nfrom ..exceptions import ValidationError\nfrom ..physical_constants import constants\nfrom ..util import unnp\nfrom .to_string import formula_generator\n\n\ndef to_schema(molrec: Dict, dtype: str, units: str='Bohr', *, np_out: int=False) -> Dict:\n \...
[ [ "numpy.arange", "numpy.array" ] ]
garamond/handson-ml2
[ "048e3376f30214921320927f64bbb36797f367c7" ]
[ "exercises/03_classification/ex1/run_grid_search.py" ]
[ "#%%\nimport numpy as np\n#%%\nfrom sklearn.datasets import fetch_openml\nmnist = fetch_openml('mnist_784', version=1)\n# %%\nX, y = mnist[\"data\"], mnist[\"target\"]\n# %%\ny = y.astype(np.uint8)\n# %%\nX_train, X_test, y_train, y_test = X[:60000], X[60000:], y[:60000], y[60000:]\n# %%\nfrom sklearn.neighbors imp...
[ [ "sklearn.model_selection.GridSearchCV", "sklearn.datasets.fetch_openml", "sklearn.neighbors.KNeighborsClassifier" ] ]
symmy596/Polypy
[ "9e9ce03b3e2c287f6d7efb04b31a4e9be7dea396" ]
[ "polypy/msd.py" ]
[ "\"\"\"\nMSD functions included with `polypy`. There are two MSD classes and one class to store the data generated from the MSD calculation.\nThe first class performs a standard MSD calculation for the entire dataset while the second class will perform an MSD calculation\nwithin a specified region of the simulation...
[ [ "numpy.split", "numpy.unique", "numpy.asarray", "numpy.reshape", "numpy.matmul", "pandas.DataFrame", "numpy.append", "scipy.stats.linregress", "numpy.mean", "numpy.column_stack", "numpy.array", "numpy.sum" ] ]
nsushant/AI-For-Trading
[ "f33598ec216e33bd441325f777a48efc3fcd202e" ]
[ "project_5_starter.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# # Project 5: NLP on Financial Statements\n# ## Instructions\n# Each problem consists of a function to implement and instructions on how to implement the function. The parts of the function that need to be implemented are marked with a `# TODO` comment. After implementin...
[ [ "pandas.read_csv", "pandas.to_datetime", "numpy.sqrt", "sklearn.metrics.pairwise.cosine_similarity", "pandas.DataFrame", "pandas.DatetimeIndex", "sklearn.feature_extraction.text.CountVectorizer", "sklearn.feature_extraction.text.TfidfVectorizer" ] ]
flux-project/flux
[ "0e48aaff31b0ee626e3a2ae507af953658dbcd85" ]
[ "examples/line.py" ]
[ "import numpy as np\n\nclass Line():\n def __init__(self):\n # was the line detected in the last iteration?\n self.detected = False \n # x values of the last n fits of the line\n self.recent_xfitted = [] \n #average x values of the fitted line over the last n iterations\n ...
[ [ "numpy.array" ] ]
jelliotthiggins/tskit
[ "24f3d0e5b29c5572ecd0b615d4f56add460d1c85" ]
[ "python/tskit/tables.py" ]
[ "# MIT License\n#\n# Copyright (c) 2018-2020 Tskit Developers\n# Copyright (c) 2017 University of Oxford\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, inclu...
[ [ "numpy.array", "numpy.logical_not", "numpy.array_equal", "numpy.min", "numpy.cumsum", "numpy.logical_or", "numpy.max", "numpy.append", "numpy.bitwise_and", "numpy.diff", "numpy.any", "numpy.fmax", "numpy.repeat", "numpy.logical_and", "numpy.where", "...
latish123/Tcp_Congestion_Control
[ "3a2a7d529674028d5cb195da97e14cfa699df4ca" ]
[ "src/train.py" ]
[ "import numpy as np\nimport os.path\nimport pickle\nfrom sklearn.linear_model import LinearRegression\nfrom sklearn.preprocessing import PolynomialFeatures\n\nfile_path = os.path.join(os.path.dirname(__file__),os.pardir,'data/tcp_data.csv')\n\nX = np.loadtxt(file_path,delimiter=',',skiprows=1,usecols=(0,1,2))\nY = ...
[ [ "numpy.abs", "sklearn.preprocessing.PolynomialFeatures", "sklearn.linear_model.LinearRegression", "numpy.array", "numpy.loadtxt" ] ]
FeroLabs/fero_client
[ "57a8a6d321c6199f723ae123d554217b9a27a971" ]
[ "fero/analysis.py" ]
[ "import time\nimport fero\nimport uuid\nimport io\nimport datetime\nfrom fero import FeroError\nimport pandas as pd\nfrom marshmallow import (\n Schema,\n fields,\n validate,\n validates_schema,\n ValidationError,\n EXCLUDE,\n)\nfrom typing import Union, List, Optional, IO\nfrom .common import Fer...
[ [ "pandas.DataFrame" ] ]
lingsoft/wavenet
[ "53963459ab144a4d32aef0ad2ece51d2eecc8147", "53963459ab144a4d32aef0ad2ece51d2eecc8147" ]
[ "train.py", "wavenet_train.py" ]
[ "\"\"\"Trainining script for WaveNet vocoder\n\nusage: train.py [options]\n\noptions:\n --dump-root=<dir> Directory contains preprocessed features.\n --checkpoint-dir=<dir> Directory where to save model checkpoints [default: checkpoints].\n --hparams=<parmas> Hyper parameters [de...
[ [ "torch.nn.functional.softmax", "torch.load", "torch.nn.parallel.parallel_apply", "torch.zeros", "torch.utils.data.DataLoader", "numpy.concatenate", "numpy.max", "torch.no_grad", "torch.FloatTensor", "torch.cuda.is_available", "torch.device", "torch.nn.CrossEntropyLo...
Ledzy/tsearcher
[ "8071a90fd565445e5341c35984306fe7f2081cb5" ]
[ "search/views.py" ]
[ "import pandas as pd\nimport random\nimport os\nfrom django.shortcuts import render\nfrom django.utils.encoding import escape_uri_path\nfrom django.http import StreamingHttpResponse\nfrom .query import get_documents, get_index, get_slides\nfrom .models import TeachingPlan, Slides, Subject\n\n\nplan_df = pd.read_csv...
[ [ "pandas.read_csv" ] ]
jerryshikanga/sales-processing
[ "5b5016c115b6051cbecda2a69d2bcc072cb6f30f" ]
[ "solution.py" ]
[ "import json\nimport os\nimport time\nimport shutil\n\nimport pandas as pd\n\n\ndef read_and_concatenate_sales_data(directory=\"./Data/Sales\"):\n column_names = ['identifier', 'Network', 'Region', 'Date', 'Product', 'Amount']\n sales_df = pd.DataFrame(columns=column_names)\n\n for file_path in os.listdir(...
[ [ "pandas.merge", "pandas.read_csv", "pandas.DataFrame" ] ]
SamG97/pytorch-OpCounter
[ "b9287a6ee619bf4b9bd2214aee22dce2e7d9d4a4" ]
[ "thop/count_hooks.py" ]
[ "import argparse\nimport logging\n\nimport torch\nimport torch.nn as nn\n\nlogger = logging.getLogger(__name__)\nlogger.setLevel(logging.INFO)\n\nmultiply_adds = 1\n\n\ndef zero_ops(m, x, y):\n m.total_ops += torch.Tensor([int(0)])\n\n\ndef count_convNd(m, x, y):\n x = x[0]\n\n kernel_ops = m.weight.size()...
[ [ "torch.prod", "torch.Tensor" ] ]
mamonu/Astar
[ "8b2529e417f55e247c291535c5e4e07f1b001a3c" ]
[ "mazebotapi.py" ]
[ "import numpy as np\nimport requests\nimport json\n\n\ndef parse_maze(grid):\n\n # This function is called to parse the maze retrieved from MazebotAPI\n # into numpy array format (class 'np.ndarray').\n\n for array in grid:\n index = 0\n for element in array:\n if el...
[ [ "numpy.asarray" ] ]
taochenshh/House3D
[ "f3aaf17d892ff273b8fbc0b8a63aba97a5209760" ]
[ "House3D/build_accurate_map.py" ]
[ "import cv2, ctypes, logging, os, numpy as np, pickle\nimport pyassimp as assimp, json\nfrom collections import OrderedDict\nfrom skimage.morphology import binary_closing, disk\nimport scipy\n\n\ndef sample_points_on_faces(vs, fs, rng, n_samples_per_face):\n idx = np.repeat(np.arange(fs.shape[0]), n_samples_per_...
[ [ "numpy.sqrt", "numpy.all", "numpy.concatenate", "numpy.round", "numpy.max", "numpy.mean", "numpy.cross", "numpy.arange", "numpy.ceil", "numpy.argmax", "numpy.zeros", "numpy.invert", "numpy.min", "scipy.ndimage.label", "numpy.floor", "numpy.array", ...
KaminskyJ/Cornell-Conversational-Analysis-Toolkit
[ "bc893c545e04e7c10af9679639b35cd3d5a10d23" ]
[ "convokit/classifier/bow_classifier.py" ]
[ "from convokit import Corpus, CorpusObject, Transformer\nfrom typing import Callable, List\nfrom sklearn.feature_extraction.text import CountVectorizer as CV\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.linear_model import LogisticRegression\nfrom sklearn.mo...
[ [ "sklearn.preprocessing.StandardScaler", "sklearn.linear_model.LogisticRegression", "scipy.sparse.vstack", "sklearn.model_selection.KFold" ] ]
yangpanyang/DemoPractice
[ "2ab87654030e8fc05899ea684d51b39e3de6ccc4" ]
[ "recsys/learning/tf_distributed/distributed_estimator_example.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n @Time : 2020/11/20 10:17 PM\n @Author : Caroline\n @File : 分布式的estimator实现\n @Description :\n\"\"\"\n\nimport tensorflow as tf\nfrom tensorflow import feature_column\n\n# from tensorflow.python.feature_column import feature_column_v2 as fc\n\n#...
[ [ "tensorflow.train.LoggingTensorHook", "tensorflow.metrics.accuracy", "tensorflow.cast", "tensorflow.train.AdamOptimizer", "tensorflow.estimator.RunConfig", "tensorflow.summary.scalar", "tensorflow.feature_column.embedding_column", "tensorflow.keras.layers.Concatenate", "tensorf...
deltaautonomy/delta_rc_car
[ "398d25704361bc80f94ec4663263182f24cafdc2" ]
[ "delta_perception_rc_car/test/cluster_test.py" ]
[ "# -*- coding: utf-8 -*-\n# @Author: Heethesh Vhavle\n# @Date: Nov 20, 2019\n# @Last Modified by: Heethesh Vhavle\n# @Last Modified time: Nov 20, 2019\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom pyclustering.cluster.dbscan import dbscan\nfrom pyclustering.cluster import cluster_visualizer\n\nfr...
[ [ "matplotlib.pyplot.scatter", "matplotlib.pyplot.get_cmap", "numpy.full_like", "numpy.max", "numpy.mean", "matplotlib.pyplot.grid", "matplotlib.pyplot.show" ] ]
leven03/MatchingNetworks_pytorch
[ "4bde617aa803277c9736ac91024e0a575558577f" ]
[ "experiments/OneShotBuilder.py" ]
[ "##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n## Created by: Albert Berenguel\n## Computer Vision Center (CVC). Universitat Autonoma de Barcelona\n## Email: aberenguel@cvc.uab.es\n## Copyright (c) 2017\n##\n## This source code is licensed under the MIT-style license found in the\n## ...
[ [ "torch.LongTensor", "torch.Tensor", "torch.unsqueeze", "torch.FloatTensor", "torch.cuda.is_available", "torch.cuda.manual_seed_all", "torch.autograd.Variable" ] ]
mark-boer/geomfitty
[ "c72ef861704d8a8db591e3c557517ef3a15e5f35" ]
[ "geomfitty/geom3d.py" ]
[ "from abc import ABC, abstractmethod\n\nimport numpy as np\n\nfrom ._descriptor import Direction, Position, PositiveNumber\nfrom ._util import distance_line_point, distance_plane_point, distance_point_point\n\n\nclass GeometricShape(ABC):\n @abstractmethod\n def distance_to_point(self, point):\n \"\"\"...
[ [ "numpy.atleast_2d", "numpy.dot", "numpy.linalg.norm" ] ]
ElementalAlchemist/wubloader
[ "63d8b1d5047c102ce8011e0ad68f679d0c31ec94" ]
[ "segment_coverage/segment_coverage/main.py" ]
[ "import errno\nimport datetime\nimport itertools\nimport logging\nimport os\nimport signal\nimport uuid\n\nimport argh\nimport gevent.backdoor\nimport matplotlib\nimport matplotlib.image\nimport numpy as np\nimport prometheus_client as prom\n\nimport common\nfrom common import dateutil\nfrom common import database\...
[ [ "matplotlib.image.imsave", "matplotlib.colors.to_rgb", "numpy.arange", "numpy.ones", "numpy.zeros" ] ]
maplejia/keepa
[ "9b97a0e740249f81223f1f1fe7ccf78103104e12" ]
[ "keepa/interface.py" ]
[ "\"\"\"Interface module to download Amazon product and history data from\nkeepa.com\n\"\"\"\nimport json\nimport logging\nimport time\nimport datetime\n\nimport requests\nimport numpy as np\n\nfrom keepa.product_finder_keys import PRODUCT_REQUEST_KEYS\n\nlog = logging.getLogger(__name__)\nlog.setLevel('DEBUG')\n\n#...
[ [ "numpy.asarray", "numpy.array", "numpy.unique", "numpy.datetime64" ] ]
vais-ral/CCPi-ML
[ "ca9baeb0dd5db3a97ac8ab9e33e03aeae42ebfa4", "ca9baeb0dd5db3a97ac8ab9e33e03aeae42ebfa4" ]
[ "TMSegmentation/Pattern-Segmentation/Main.py", "Benchmarking/Keras/Tensorflow/TF_plotting_stuff.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\n@author: lhe39759\n\"\"\"\nimport matplotlib.pyplot as plt\n\nimport numpy as np\nimport sys\nsys.path.append(r'C:\\Users\\minns\\OneDrive\\Documents\\Programming\\GitHub/')\nfrom SliceOPy import NetSlice, DataSlice\nfrom model import u_net as unet\nfrom keras.utils import plot_mod...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ], [ "numpy.arange", "numpy.any", "numpy.transpose", "numpy.where", "numpy.zeros" ] ]
FlorianSeidel/GOL
[ "0f20389fe4de9884bcba2c99edc72db3f92c63c9" ]
[ "gol/goal/utilities.py" ]
[ "'''\nCopyright (c) 2015 FlorianSeidel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish,...
[ [ "numpy.min", "numpy.eye", "numpy.ones", "numpy.concatenate", "numpy.max", "numpy.copy", "numpy.random.randn", "numpy.mean", "numpy.zeros" ] ]
junjungoal/oatomobile
[ "eb3a46c1e1dd63266ada8405b59b07070471e698" ]
[ "oatomobile/baselines/torch/cil/agent.py" ]
[ "# Copyright 2020 The OATomobile Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "numpy.arange", "numpy.arccos", "numpy.linalg.norm", "torch.from_numpy", "numpy.atleast_1d", "numpy.atleast_2d", "torch.cuda.is_available", "numpy.transpose", "numpy.zeros" ] ]
EricSalomaki/PhyloFisher
[ "982b0d1672d27c020021b5aea30def33d263a38d" ]
[ "phylofisher/utilities/taxon_collapser.py" ]
[ "#!/usr/bin/env python\nimport configparser\nimport os\nimport shutil\nimport sys\nimport tarfile\nimport textwrap\nfrom datetime import date\nfrom pathlib import Path\n\nimport pandas as pd\nfrom Bio import SeqIO\nfrom Bio.Seq import Seq\nfrom Bio.SeqRecord import SeqRecord\n\nfrom phylofisher import help_formatte...
[ [ "pandas.read_csv" ] ]
erdem-kose/pyfda
[ "c1600ae7094df1e64e0aae12db742a3657d99e9f", "c1600ae7094df1e64e0aae12db742a3657d99e9f" ]
[ "pyfda/fixpoint_widgets/fir_df.py", "pyfda/plot_widgets/mpl_widget.py" ]
[ "# -*- coding: utf-8 -*-\n#\n# This file is part of the pyFDA project hosted at https://github.com/chipmuenk/pyfda\n#\n# Copyright © pyFDA Project Contributors\n# Licensed under the terms of the MIT License\n# (see file LICENSE in root directory for details)\n\n\"\"\"\nWidget for specifying the parameters of a dire...
[ [ "numpy.abs" ], [ "matplotlib.backends.qt_editor.figureoptions.figure_edit", "matplotlib.figure.Figure" ] ]
dmatrix/ray
[ "927c5467eb7b9f661d01392ac3afd2c782339acf" ]
[ "python/ray/data/impl/pandas_block.py" ]
[ "from typing import Dict, List, Tuple, Any, TypeVar, Optional, TYPE_CHECKING\n\nimport collections\nimport numpy as np\n\ntry:\n import pandas\nexcept ImportError:\n pandas = None\n\nfrom ray.data.block import BlockAccessor, BlockMetadata\nfrom ray.data.impl.table_block import TableBlockAccessor, TableRow, \\...
[ [ "pandas.concat", "pandas.DataFrame" ] ]
k3jackson/odf-ctd-proc
[ "a556e4ddc24b0c19085dc9657e5e844c279eb1e2" ]
[ "ctdcal/sbe_reader.py" ]
[ "#!/bin/bash/env\n'''\nThis module is used to parse the xml config and hex file provided by user. It\ntakes the xml config and extracts the useful settings used during a CTD cast,\nand uses that to check and parse the hex file.\n'''\n\nimport xml.etree.cElementTree as ET\nimport struct\nimport re\nimport sys\nimpor...
[ [ "numpy.array" ] ]
glgerard/MDBN
[ "c5555cb6ef76b0295f9b87c47b2eee0fa521a04f" ]
[ "src/mlp.py" ]
[ "\"\"\"\nCopyright (c) 2016 Gianluca Gerard\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, pub...
[ [ "numpy.zeros", "numpy.sqrt" ] ]
aitikgupta/cupy
[ "0dc6bbafb0cf75bb873531cbf69c6995a72c61a3" ]
[ "cupy/__init__.py" ]
[ "import functools as _functools\nimport sys as _sys\nimport warnings as _warnings\n\nimport numpy as _numpy\n\nfrom cupy import _environment\nfrom cupy import _version\n\n\n_environment._setup_win32_dll_directory() # NOQA\n_environment._preload_libraries() # NOQA\n\n\ntry:\n with _warnings.catch_warnings():\n ...
[ [ "numpy.can_cast", "numpy.asarray", "numpy.dtype", "numpy.binary_repr", "numpy.result_type", "numpy.base_repr", "numpy.ndim", "numpy.isscalar" ] ]
JovaniPink/surfs-up
[ "ed20550a359c05d777f87b89a024251cdffa79be" ]
[ "app.py" ]
[ "\"\"\"\nMain module of the weather server app\n\"\"\"\n\n\n__version__ = \"0.1.0\"\n\n\nfrom datetime import date, timedelta\nimport connexion\nfrom flask import jsonify\nfrom flask.templating import render_template\nfrom sqlalchemy import func\nimport numpy as np\n# Having these separate Python files is good beca...
[ [ "numpy.ravel" ] ]
extinctCoder/thesis
[ "ebe135f343f0c4e66255f3792a515d408db5b627" ]
[ "forign/101/Raspberry pi codes/updated_Display_Run.py" ]
[ "import cv2\nimport _thread\nimport time\nimport socket\nimport base64\nimport numpy\nimport multiprocessing as mp\nfrom luma.core.interface.serial import i2c\nfrom luma.core.render import canvas\nfrom luma.oled.device import ssd1306, ssd1325, ssd1331, sh1106\nfrom time import sleep\nfrom PIL import Image\nfull_Dat...
[ [ "numpy.frombuffer" ] ]
iahsanujunda/feature_engine
[ "46c6bd5a06626b0789fcc1367069d065010794a1" ]
[ "feature_engine/discretisers.py" ]
[ "# Authors: Soledad Galli <solegalli@protonmail.com>\n# License: BSD 3 clause\n\nimport pandas as pd\n\nfrom sklearn.tree import DecisionTreeRegressor, DecisionTreeClassifier\nfrom sklearn.model_selection import GridSearchCV\n\nfrom feature_engine.variable_manipulation import _define_variables\nfrom feature_engine....
[ [ "sklearn.tree.DecisionTreeClassifier", "sklearn.tree.DecisionTreeRegressor", "pandas.qcut", "pandas.cut" ] ]
azmiozgen/FOTS.PyTorch
[ "b1851c170b4f1ad18406766352cb5171648ce603" ]
[ "FOTS/model/model.py" ]
[ "import math\nfrom typing import List, Any\n\nimport cv2\nimport numpy as np\nimport torch.nn as nn\nimport torch\nimport torch.optim as optim\nfrom torch.optim.lr_scheduler import StepLR\nfrom pytorch_lightning.core import LightningModule\n\nfrom ..base import BaseModel\nfrom .modules import shared_conv\nfrom .mod...
[ [ "torch.sigmoid", "torch.ceil", "torch.cat", "torch.nn.Conv2d", "numpy.stack", "numpy.concatenate", "numpy.ceil", "torch.hub.load", "torch.optim.lr_scheduler.StepLR" ] ]
joinee0208/manim
[ "8e1407e7fd5c01258f75748cc947d31d67ffd92b", "8e1407e7fd5c01258f75748cc947d31d67ffd92b" ]
[ "manim/mobject/opengl_geometry.py", "tests/test_set_attr.py" ]
[ "from __future__ import annotations\n\nimport numpy as np\n\nfrom ..constants import *\nfrom ..mobject.mobject import Mobject\nfrom ..mobject.types.opengl_vectorized_mobject import (\n OpenGLDashedVMobject,\n OpenGLVGroup,\n OpenGLVMobject,\n)\nfrom ..utils.color import *\nfrom ..utils.iterables import adj...
[ [ "numpy.hstack", "numpy.dot", "numpy.sqrt", "numpy.linspace", "numpy.cos", "numpy.linalg.norm", "numpy.sin", "numpy.sign", "numpy.tan", "numpy.cross", "numpy.array", "numpy.zeros" ], [ "numpy.array", "numpy.array_equal" ] ]
NicoK/flink
[ "62b20b0c596c77ebf089394d37959c1bec53aee1" ]
[ "flink-python/pyflink/table/tests/test_pandas_conversion.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 lice...
[ [ "numpy.int32", "numpy.int8", "pandas.DataFrame", "numpy.int16", "pandas.util.testing.assert_frame_equal", "numpy.int64", "numpy.float64", "numpy.float32" ] ]
jkvc/modapt
[ "44610e6f03fb151433f2db633e1d23cc0dc470fc" ]
[ "experiments/4.figures_stats/train_from_scratch_v_from_tuned.py" ]
[ "# Usage: python <script_name> <dataset_name> <roberta_arch>\n\n\nimport sys\nfrom os import makedirs\nfrom os.path import join\nfrom random import Random\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom config import FIGURES_DIR, MODELS_DIR, ROBERTA_ADAPT_N_SAMPLES\nfrom experiments.datadef.zoo import ...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.axhline", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.clf", "matplotlib.pyplot.xlabel", "numpy.array", "matplotlib.pyplot.figure" ] ]
valdas-v1/scrape_aruodas
[ "c3bf9b6d38c8308559ae8c291007fbb80c7aa2a8" ]
[ "scrape_aruodas/scraper.py" ]
[ "from bs4 import BeautifulSoup\nimport requests\nimport pandas as pd\nimport pickle\nimport re\nimport time\n\n# Disable Pandas error code\npd.options.mode.chained_assignment = None\n\n\nclass Scraper:\n \"\"\"A Scraper designed to scrape Aruodas.lt apartment listing data\n More info at: https://github.com/va...
[ [ "pandas.DataFrame" ] ]
drewmee/PyEEM
[ "283c01405bf51da6827ba434be53acd580b7642b" ]
[ "pyeem/instruments/base.py" ]
[ "import pandas as pd\n\nfrom . import MIT, agilent, horiba, tecan\n\n\ndef get_supported_instruments():\n \"\"\"Gets list of instruments which are supported by PyEEM. These instruments\n can be passed as arguments to pyeem.datasets.Dataset to load raw data files.\n\n Returns:\n tuple of pandas.DataF...
[ [ "pandas.DataFrame" ] ]
Ocete/mcd-pe-continuo
[ "ec8c6e39453e3089786396252ea4dc83ad4825c1" ]
[ "P2/imports/arrival_process_simulation.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sun Oct 25 13:08:31 2020\n\n@author: alberto\n\"\"\"\n# Load packages\nimport numpy as np\nfrom scipy.optimize import newton\nfrom scipy.integrate import quad\n\ndef simulate_poisson(t0, t1, lambda_rate, M):\n \"\"\" Simulation of homogeneours Poisson process in [t0, ...
[ [ "numpy.linspace", "numpy.arange", "numpy.random.exponential", "numpy.random.poisson", "numpy.random.rand", "scipy.integrate.quad", "numpy.zeros", "scipy.optimize.newton" ] ]
haozhaozhe/test
[ "a934dfe87eac6a52f140f43dccd829b180099040" ]
[ "Fig2_integration_plot_hochgerner1.py" ]
[ "import matplotlib.pyplot as plt\nimport scanpy as sc\n\nimport sys\nsys.path.append('scctools/scctools_1.0')\nfrom scctools import *\n\n#load data\nhoch1_500= sc.read('data/Data_integration/admk_Hoch1_500_finish.h5')\nhoch1_500.obs_names = [x[:-2] for x in list(hoch1_500.obs_names)]\n\n#plot heatmpa\nplot_matrix_H...
[ [ "matplotlib.pyplot.figure" ] ]
cnheider/garage
[ "70956d104ec245bcb3a5deba35a11c565755759d", "70956d104ec245bcb3a5deba35a11c565755759d", "70956d104ec245bcb3a5deba35a11c565755759d" ]
[ "tests/garage/tf/models/test_gaussian_cnn_model.py", "src/garage/torch/algos/ddpg.py", "examples/np/tutorial_cem.py" ]
[ "import pickle\nfrom unittest import mock\n\nimport numpy as np\nimport pytest\nimport tensorflow as tf\n\nfrom garage.tf.models import GaussianCNNModel\n\nfrom tests.fixtures import TfGraphTestCase\n\n\nclass TestGaussianCNNModel(TfGraphTestCase):\n\n def setup_method(self):\n super().setup_method()\n ...
[ [ "numpy.log", "tensorflow.Graph", "numpy.allclose", "numpy.array_equal", "tensorflow.compat.v1.get_variable", "tensorflow.ones_like", "numpy.full", "tensorflow.constant_initializer", "tensorflow.compat.v1.placeholder", "numpy.prod", "numpy.exp", "tensorflow.compat.v1...
animesh/dl-interpretability-compbio
[ "0d4b5c9110ec54388e440a75e9497e00046d280c" ]
[ "depiction/models/tests/models_test.py" ]
[ "from pathlib import Path\nimport shutil\nimport tempfile\nimport unittest\n\nimport pandas as pd\n\nfrom ..celltype import CellTyper\n\n\nclass CellTyperTestCase(unittest.TestCase):\n \"\"\"Test celltype classifier.\"\"\"\n\n def setUp(self):\n \"\"\"Prepare data to predict.\"\"\"\n filepath = ...
[ [ "pandas.read_csv" ] ]
tuenhi2001/Neural_Network
[ "c6ed6e76ae14664d25a2cf83ca729b615766212a" ]
[ "1stneuralnetwork.py" ]
[ "from numpy import exp, array, random, dot\n\n\nclass NeuralNetwork():\n def __init__(self):\n # Seed the random number generator, so it generates the same numbers\n # every time the program runs.\n random.seed(1)\n\n # We model a single neuron, with 3 input connections and 1 output c...
[ [ "numpy.dot", "numpy.random.random", "numpy.random.seed", "numpy.array", "numpy.exp" ] ]
marctimjen/Deep_final
[ "ca4de1e04e00706b53c356e1ccc57c7bdfe715f5" ]
[ "Old functions or files/Onehot_new test.py" ]
[ "import cv2\nimport torch\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n\n\nimg = torch.load(\"C:/Users/Marc/Desktop/Billeder/onehot/one (6).pt\").numpy()\n\ninvcol = {0:\"everything else\", 1:\"curb\", 2:\"road\", 3:\"cars\", 4:\"trucks\", 5:\"motorcycle\", 6:\"humans\"}\n\nplt.imshow(img[1])\nplt.show()...
[ [ "matplotlib.pyplot.imshow", "matplotlib.pyplot.show", "torch.load" ] ]
VisualComputingInstitute/Person_MinkUNet
[ "fa39764245a022740c0a3d8c85026532fff93e74" ]
[ "lidar_det/utils/jrdb_transforms.py" ]
[ "import numpy as np\n\n\"\"\"\nTransformations. Following frames are defined:\n\nbase: main frame where 3D annotations are done in, x-forward, y-left, z-up\nupper_lidar: x-forward, y-left, z-up\nlower_lidar: x-forward, y-left, z-up\nlaser: x-forward, y-left, z-up\n\"\"\"\n\n\ndef _get_R_z(rot_z):\n cs, ss = np.c...
[ [ "numpy.eye", "numpy.cos", "numpy.stack", "numpy.sin", "numpy.arctan2", "numpy.array" ] ]
divenex/scipy
[ "fe0e253165a73bdb922c4da6a107be0474ee60ac" ]
[ "scipy/ndimage/interpolation.py" ]
[ "# Copyright (C) 2003-2005 Peter J. Verveer\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# 1. Redistributions of source code must retain the above copyright\n# notice, this list of conditions and the...
[ [ "numpy.ones_like", "numpy.asarray", "numpy.ascontiguousarray", "numpy.cos", "numpy.sin", "numpy.all", "numpy.deg2rad", "numpy.core.multiarray.normalize_axis_index", "numpy.iscomplexobj", "numpy.array" ] ]
wangg12/libskylark
[ "e8836190be854d0284d38772c48e110b3c6d5e51" ]
[ "python-skylark/skylark/ml/distances.py" ]
[ "import skylark.errors\nimport numpy\nimport scipy.sparse\n\ndef _multiply(X, Y):\n \"\"\"\n Element-wise multipication of X and Y that works with X and Y either numpy\n or scipy csr/csc sparse matrix.\n \"\"\"\n if type(X) != type(Y):\n raise skylark.errors.ParameterMistmatchError(\"X and Y must have same ...
[ [ "numpy.dot", "numpy.multiply", "numpy.ones" ] ]
PengboLiu/OpenNMT-MM
[ "df9e3460f2012f074f3210531975f12a2901c263" ]
[ "onmt/modules/Capsule.py" ]
[ "import torch \nimport torch.nn as nn\n\ndef squash(x, dim=-1):\n squared_norm = (x ** 2).sum(dim=dim, keepdim=True)\n scale = squared_norm / (1 + squared_norm)\n return scale * x / (squared_norm.sqrt() + 1e-8)\n\n\nclass PrimaryCaps(nn.Module):\n \"\"\"Primary capsule layer.\"\"\"\n\n def __init__(s...
[ [ "torch.zeros", "torch.randn", "torch.nn.Conv2d", "torch.nn.Sigmoid", "torch.nn.Linear", "torch.matmul", "torch.nn.ReLU" ] ]
Giorgiobientinesi/Finance1
[ "3fa35c2c7eb64fa36910d126f95d79666ffb1c88" ]
[ "Finance_APP.py" ]
[ "import yfinance as yf\nimport pandas as pd\nimport pandas_datareader.data as web\nimport datetime as dt\nimport streamlit as st\nimport pandas as pd\nfrom scipy import stats\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n\nSymbol = [\"AAPL\", \"MSFT\",\"AMZN\", \"FB\",\"GOOG\", \"GOOGL\", \"TSLA\", \"NVDA...
[ [ "matplotlib.pyplot.pie", "matplotlib.pyplot.figure" ] ]
dilawar/hippo
[ "2ba70df5d8831e71ff1f3635c0cb4caf7496d50b" ]
[ "scripts/schedule_aws.py" ]
[ "#!/usr/bin/env python3\n\nimport sys\nimport csv\nimport networkx as nx\nimport compute_cost\nimport datetime\nimport itertools\nimport numpy as np\nimport random\nimport aws_helper\nfrom db_connect import db_\nfrom collections import defaultdict, Counter\nfrom collections import OrderedDict\n\nrandom.seed('HIPPO'...
[ [ "numpy.mean", "numpy.random.seed" ] ]
iswariyam/Mini-semantic-segmentation-network-pytorch
[ "4b0fb7bee280e4eec4b3e04502e41795149c8214" ]
[ "evaluate.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Sep 3 14:13:47 2018\n\n@author: iswariya\n\"\"\"\nimport numpy as np\nimport torch\n\nfrom metric import Metric\n\n\ndef predict(model, testloader, criterion, **kwargs):\n \"\"\"Function to evaluate the model\n\n Parameters\n -------...
[ [ "numpy.ndarray", "torch.argmax" ] ]
SSripilaipong/string_pattern_summarization
[ "66f9ab38b218996f6e482bd37e552c5b2d836afe" ]
[ "patternsum/core/summarization.py" ]
[ "import pandas as pd\n\nfrom patternsum.data import DataManager\nfrom patternsum.pattern import Pattern\nfrom patternsum.optimizer import Optimizer\nfrom .hook import NoNewSpeciesHook\n\n\nclass PatternSummarization:\n def __init__(self, data, population_size, n_survivors, prob_mutate=0.9, prob_mutate_add=0.20,\...
[ [ "pandas.Series", "pandas.DataFrame" ] ]
wdr123/DARP-SBIR
[ "b8625337c7e31e19edb0817356089cf525295352" ]
[ "main_dqn.py" ]
[ "import torch\n\nimport utils\nimport argparse\n\nfrom SBIR_trainer import Trainer\nfrom config import get_config\nfrom dataset_chairv2 import *\n\n\ndef main(config):\n utils.prepare_dirs(config)\n\n # ensure reproducibility\n torch.manual_seed(config.random_seed)\n kwargs = {}\n if config.use_gpu:\...
[ [ "torch.manual_seed", "torch.cuda.manual_seed", "torch.autograd.set_detect_anomaly" ] ]
flachsenberg/LSLOpt
[ "20dd15b343e117a6b129e3bdeea2ea02f5d7c829" ]
[ "paper_data/scripts/plot_2d.py" ]
[ "#! /usr/bin/env python3\n\nimport argparse\nimport matplotlib.pyplot as plt\nimport matplotlib\nfrom matplotlib.colors import LinearSegmentedColormap\nimport pandas as pd\nimport sys\nimport os\nimport math\n\nmatplotlib.rcParams.update({'font.size': 10})\n\n\nparser = argparse.ArgumentParser()\nparser.add_argumen...
[ [ "matplotlib.pyplot.gca", "pandas.read_csv", "matplotlib.pyplot.scatter", "matplotlib.pyplot.title", "matplotlib.pyplot.rc", "matplotlib.pyplot.savefig", "matplotlib.pyplot.Circle", "matplotlib.pyplot.colorbar", "matplotlib.pyplot.ylabel", "matplotlib.rcParams.update", "...
wojtuss/models
[ "5d1dc2ff7d3355984c469f0906d24447b58a5ffe" ]
[ "fluid/neural_machine_translation/transformer/train.py" ]
[ "import os\nimport time\nimport numpy as np\n\nimport paddle\nimport paddle.fluid as fluid\n\nfrom model import transformer, position_encoding_init\nfrom optim import LearningRateScheduler\nfrom config import TrainTaskConfig, ModelHyperParams, pos_enc_param_names, \\\n encoder_input_data_names, decoder_input...
[ [ "numpy.triu", "numpy.array", "numpy.tile", "numpy.ones" ] ]
codeprentice-org/MP-SPDZ
[ "638cd5cef66729ea27777c57b92a5cb26dea9e75" ]
[ "TensorflowInf/ImgOps/ImgOps.py" ]
[ "import numpy as np\nfrom PIL import Image\n\n# ----------------------------------------------------------------------\n# Get numpy image array\n# imgfile - path to image file\n# RETURNS - numpy image array\ndef getImg(imgfile):\n imgOut = Image.open(imgfile).convert(\"RGB\")\n imgOut = np.asarray(imgOut)\n ...
[ [ "numpy.asarray", "numpy.array", "numpy.dstack", "numpy.clip" ] ]
Dvermetten/nevergrad
[ "850418e9e4d00ee2e4fc12d8fc7a6981b0152641" ]
[ "nevergrad/functions/iohprofiler/core.py" ]
[ "import numpy as np\nfrom IOHexperimenter import IOH_function, W_model_function\nimport nevergrad as ng\nfrom .. import base\n\n\nclass PBOFunction(base.ExperimentFunction):\n \"\"\"\n Pseudo-boolean functions taken from the IOHexperimenter project, adapted for minimization\n\n Parameters\n ----------\n...
[ [ "numpy.sqrt" ] ]
luciancooper/bbmodels
[ "1781c570d229b565163dca3f41f55f666d13e5a4" ]
[ "source.py" ]
[ "import env\nimport sys\nimport os\nimport itertools\nimport numpy as np\nimport pandas as pd\n\ndef data(period):\n files = sorted([f for f in os.listdir(env.COMPILED_PATH) if f.endswith(f'_{period}.csv')])\n return pd.concat([pd.read_csv(os.path.join(env.COMPILED_PATH, f)) for f in files]).sort_values(['gid...
[ [ "numpy.lexsort", "pandas.DataFrame", "numpy.unique" ] ]
ferrine/PerceptualSimilarity
[ "2ff66e86b12dbfbc337991def71b09e3b86d4b12" ]
[ "util/visualizer.py" ]
[ "import numpy as np\nimport os\nimport time\nfrom . import util\nfrom . import html\n\n# from pdb import set_trace as st\nimport matplotlib.pyplot as plt\nimport math\n\n# from IPython import embed\n\n\ndef zoom_to_res(img, res=256, order=0, axis=0):\n # img 3xXxX\n from scipy.ndimage import zoom\n\n zoo...
[ [ "matplotlib.pyplot.legend", "numpy.maximum", "scipy.ndimage.zoom", "matplotlib.pyplot.subplots", "matplotlib.pyplot.close", "matplotlib.pyplot.xlabel", "numpy.array", "matplotlib.pyplot.ylabel" ] ]
HanyinWang/head_ct_classifier
[ "f138cc56a29a24ca8baf76713db0f7798477498d" ]
[ "code/run_pretrained_DenseNet121_fine_tune.py" ]
[ "from torch.utils import data\nimport numpy as np\nimport torch\nfrom torchvision import models, transforms\nimport torch.nn as nn\nfrom torch import optim\nfrom time import time\nimport os\nfrom sklearn.metrics import roc_auc_score, confusion_matrix\nimport pandas as pd\nimport shutil\n\n#### change your input and...
[ [ "numpy.rollaxis", "torch.mean", "sklearn.metrics.roc_auc_score", "torch.utils.data.DataLoader", "sklearn.metrics.confusion_matrix", "pandas.DataFrame", "numpy.concatenate", "torch.nn.BCEWithLogitsLoss", "torch.no_grad", "torch.cuda.is_available", "torch.from_numpy", ...
sergovan79/okama
[ "f65307f91b8667206e7fd21caa6fa6bfef77e941" ]
[ "tests/test_plots.py" ]
[ "import numpy as np\nfrom pytest import mark\nfrom numpy.testing import assert_allclose\n\nfrom .conftest import data_folder\n\n@mark.xfail\n@mark.plots\ndef test_transition_map(init_plots):\n axes_data = init_plots.plot_transition_map(cagr=False, full_frontier=False).lines[0].get_data()\n values = np.genfrom...
[ [ "numpy.testing.assert_allclose", "numpy.genfromtxt" ] ]
social-machines/TweebankNLP
[ "350dc972b994899dee7b8689f4f9d065d587610a" ]
[ "twitter-stanza/stanza/models/depparse/trainer.py" ]
[ "\"\"\"\nA trainer class to handle training and testing of models.\n\"\"\"\n\nimport sys\nimport logging\nimport torch\nfrom torch import nn\n\nfrom stanza.models.common.trainer import Trainer as BaseTrainer\nfrom stanza.models.common import utils, loss\nfrom stanza.models.common.chuliu_edmonds import chuliu_edmond...
[ [ "torch.load", "torch.save" ] ]
alcinos/dask
[ "2a9d34aff0a38be5fc8bfcdec38e5c4a7bafcf0e" ]
[ "dask/dataframe/io/tests/test_parquet.py" ]
[ "import glob\nimport math\nimport os\nimport sys\nimport warnings\nfrom decimal import Decimal\n\nimport numpy as np\nimport pandas as pd\nimport pytest\nfrom packaging.version import parse as parse_version\n\nimport dask\nimport dask.dataframe as dd\nimport dask.multiprocessing\nfrom dask.blockwise import Blockwis...
[ [ "pandas.to_datetime", "pandas.Series", "numpy.linspace", "numpy.isnat", "pandas.RangeIndex", "pandas.DataFrame", "numpy.dtype", "pandas.read_parquet", "numpy.random.randn", "numpy.random.randint", "numpy.unique", "numpy.arange", "pandas.Index", "numpy.full",...
datduong/stylegan2-ada-FovealHypoplasia
[ "f9394d3e81e16466acf3b4ce3645cbb4746c873e" ]
[ "AuxClassifier/GatherProjectedW.py" ]
[ "\nimport os,sys,re,pickle\nimport numpy as np \nimport pandas as pd \n\n# ! need to gather all the Ws together. \n\nfoutpath = '/data/duongdb/WSq22_04202021/Model/00001-ImgTf256-paper256-ada-target0.7-resumeffhq256/ProjFakeImg'\n\nall_w = []\n\n# dlatents_np_array=['/data/duongdb/WSq22_04202021/Model/00001-ImgTf25...
[ [ "numpy.concatenate" ] ]
AntonioGUJ/AirwaySegmentation_Keras
[ "5acf5243da2a0e38041bbbf2ffd033291eff13a4" ]
[ "src/imageoperators/boundingboxes.py" ]
[ "\nfrom typing import Tuple, Union\nimport numpy as np\n\nBoundBox3DType = Tuple[Tuple[int, int], Tuple[int, int], Tuple[int, int]]\nBoundBox2DType = Tuple[Tuple[int, int], Tuple[int, int]]\n\n\nclass BoundingBoxes(object):\n\n @staticmethod\n def get_size_boundbox(in_boundbox: BoundBox3DType) -> Tuple[int, i...
[ [ "numpy.argwhere" ] ]