repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
possible_versions
list
ianthomas23/mapshader
[ "3a29f9f2ad355df193896a598825cef12c1e0dae", "3a29f9f2ad355df193896a598825cef12c1e0dae" ]
[ "mapshader/tests/common.py", "mapshader/overview.py" ]
[ "import math\nimport numpy as np\nimport os\nimport rioxarray # noqa: F401\nimport xarray as xr\n\n\ndef check_and_create_large_geotiff():\n directory = os.path.join(\"examples\", \"large_geotiff\")\n filename = \"large_geotiff.tif\"\n full_filename = os.path.join(directory, filename)\n\n if os.path.is...
[ [ "numpy.expand_dims", "numpy.linspace", "numpy.cos", "numpy.sin", "numpy.random.default_rng" ], [ "numpy.isfinite" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
haitaozhao/PRSL
[ "c81d64d1d2968af8ba5f34ce0ecfed32007822f1" ]
[ "2. Naive Bayes/my_nb.py" ]
[ "import numpy as np\n\ndef my_nb(x,gnd):\n a,b = x.shape\n my_lab = np.unique(gnd)\n NumOfClass = my_lab.size\n pw = np.zeros([NumOfClass])\n my_m = np.zeros([a,NumOfClass,1])\n my_std = np.zeros([a,NumOfClass,1])\n for i in range(NumOfClass):\n temp = np.sum(gnd==my_lab[i])\n pw[...
[ [ "numpy.unique", "numpy.std", "numpy.mean", "numpy.where", "numpy.zeros", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sudsj/jax
[ "4c30c0285c509764f3b1b937b8a6bc9f9b8dd061" ]
[ "jax/lax/lax.py" ]
[ "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "numpy.take", "numpy.sqrt", "numpy.asarray", "numpy.cumsum", "numpy.dtype", "numpy.all", "numpy.max", "numpy.zeros_like", "numpy.any", "numpy.negative", "numpy.where", "numpy.swapaxes", "numpy.greater", "numpy.less", "numpy.arange", "numpy.subtract",...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Zi-Ao-Huang/Udacity_Image_classifier_for_flowers
[ "a142c6e0c8ee60926982939f22af32e770849b56" ]
[ "train.py" ]
[ "import argparse\nimport numpy as np\nimport torch\nfrom torch import nn\nfrom torch import optim\nfrom torch.autograd import Variable\nimport torchvision\nfrom torchvision import datasets, models, transforms\nimport torch.nn.functional as F\nfrom collections import OrderedDict\nfrom PIL import Image\nimport json\n...
[ [ "torch.device", "torch.cuda.is_available" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
normanius/group-lasso
[ "5602f535c1ce79e74f7d276e73d3dec3087f11cd" ]
[ "examples/example_logistic_group_lasso.py" ]
[ "\"\"\"\nGroupLasso for logistic regression\n==================================\n\nA sample script for group lasso regression\n\"\"\"\n\n###############################################################################\n# Setup\n# -----\n\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nfrom group_lasso import...
[ [ "numpy.random.seed", "matplotlib.pyplot.scatter", "numpy.random.standard_normal", "numpy.linalg.norm", "matplotlib.pyplot.plot", "numpy.exp", "matplotlib.pyplot.ylabel", "numpy.random.randint", "numpy.random.randn", "numpy.random.binomial", "matplotlib.pyplot.xlabel", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
LiuHao-THU/frame2d
[ "c2b923aa45bf2e523e281d1bc36c7f3e70f9fb2b" ]
[ "fcn16/fcn16_vgg.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport logging\nfrom math import ceil\nimport sys\n\nimport numpy as np\nimport tensorflow as tf\n\nVGG_MEAN = [103.939, 116.779, 123.68]\n\n\nclass FCN16VGG:\n\n def __init__(self, vgg16...
[ [ "tensorflow.get_variable", "tensorflow.concat", "tensorflow.nn.max_pool", "tensorflow.stack", "tensorflow.nn.conv2d_transpose", "tensorflow.nn.l2_loss", "numpy.mean", "tensorflow.nn.conv2d", "tensorflow.truncated_normal_initializer", "tensorflow.add", "tensorflow.name_s...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
sparseinference/steppingstones
[ "4989d12694c9135cea6946e4319743f535cb66d1" ]
[ "cifar10.py" ]
[ "\"\"\"\nFile: cifar10.py\nBy Peter Caven, peter@sparseinference.com\n\nDescription:\n\nClassify the CIFAR-10 test set by learning a Neural Network classifier \nusing the Stepping Stone Search Algorithm.\n\n\"\"\"\n\nimport numpy\nfrom numpy import *\nfrom random import sample\nimport time\n\nimport torch\nimport t...
[ [ "torch.nn.CrossEntropyLoss", "torch.load", "torch.utils.data.DataLoader", "torch.from_numpy", "torch.nn.Linear", "torch.no_grad", "torch.argmax" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zeyger/test_zeyger_homedepot_helpers
[ "1d825f1f5ea57748b3a61f16d033ad0caa732625" ]
[ "main.py" ]
[ "import numpy as np\nimport pandas as pd\nfrom multiprocessing import Pool\nfrom functools import partial\nfrom difflib import SequenceMatcher\n\ndef parallelize(data, func, num_of_processes=8):\n data_split = np.array_split(data, num_of_processes)\n pool = Pool(num_of_processes)\n data = pd.concat(pool.ma...
[ [ "numpy.array_split" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
schreibm/sweet
[ "a1b97e5862c3871177dff877dff825fd4b98a085" ]
[ "benchmarks_sphere/paper_jrn_jfm_ppeixoto/lib_modal_analysis.py" ]
[ "# ---------------------------------------------\n# Class to setup spherical modes post-processing\n# author: Pedro Peixoto <ppeixoto@usp.br>\n# Oct 2021\n# ----------------------------------------\nimport numpy as np\nimport pickle\nfrom numpy.lib.function_base import append\nimport pandas as pd\nimport re\nimpor...
[ [ "matplotlib.pyplot.legend", "numpy.linspace", "matplotlib.pyplot.MaxNLocator", "matplotlib.pyplot.rc", "matplotlib.pyplot.plot", "matplotlib.pyplot.tight_layout", "pandas.read_csv", "numpy.insert", "matplotlib.pyplot.close", "pandas.to_pickle", "matplotlib.ticker.Scalar...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
WNoxchi/JupyterWorkFlow
[ "b264f14719ebb5157963de9dba0edc03b076b2e0" ]
[ "jworkflow/data.py" ]
[ "import os\nimport pandas as pd\nfrom urllib.request import urlretrieve\n\nFREMONT_URL = \"https://data.seattle.gov/api/views/65db-xm6k/rows.csv?accessType=DOWNLOAD\"\n\ndef get_fremont_data(filename='Fremont.csv', url=FREMONT_URL, force_download=False):\n\t\"\"\"Download and cache the fremont data\n\n\tParameters\...
[ [ "pandas.read_csv", "pandas.to_datetime" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
iamhosseindhv/LSTM-Classification
[ "5f0f5377e5e9ac1f502b65d4a8482eab02587fb1" ]
[ "plots/plot_tags.py" ]
[ "import pandas as pd \nimport numpy as np\n\nimport matplotlib.pyplot as plt\nimport matplotlib.gridspec as gridspec \nimport seaborn as sns\ntrain = pd.read_csv(\"../datasets/train.csv\", encoding=\"latin-1\")\n\nrowsums = train.iloc[:,2:].sum(axis=1)\nx = rowsums.value_counts()\n#plot\nplt.figure(figsize=(8,4))\n...
[ [ "pandas.read_csv", "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
dallal9/keyphrase
[ "9709d5120fcbb78c17123ffdb9553978ff2b8e26" ]
[ "Datasets/ProcessText.py" ]
[ "from utils import append_to_parquet_table\nfrom utils import labels as parsed_labels\n\nimport codecs\nfrom tqdm import tqdm\nimport json\nimport pandas as pd\n\n\nconv = {'-LRB-':'(',\n '-RRB-':')',\n '-LCB-':'{',\n '-RCB-':'}',\n '-LSB-':'[',\n '-RSB-':']'}\n\n\ndef extract(f):...
[ [ "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
Ourwlsg/vit-pytorch
[ "147903b37aee648c33d138a0eb88dbd2a33361fc" ]
[ "lib/optimizer/adam_series.py" ]
[ "import math\nimport torch\nfrom torch.optim.optimizer import Optimizer\n\n\nclass RAdam(Optimizer):\n\n def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weight_decay=0, degenerated_to_sgd=True):\n if not 0.0 <= lr:\n raise ValueError(\"Invalid learning rate: {}\".format(lr))\n...
[ [ "torch.zeros_like" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
bihani-g/Fuzzy_Intents
[ "f76472aae483d234dfe8c091c9dba825b17db9f7" ]
[ "codes/multi_to_single_map_SNIPS.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# In[1]:\n\n\nfrom fuzzywuzzy import fuzz\nfrom fuzzywuzzy import process\nfrom statistics import mean\nimport pandas as pd\nfrom pandas import read_csv\nfrom fuzzywuzzy import fuzz\nfrom fuzzywuzzy import process\nfrom collections import Counter\nfrom sklearn.feature_extr...
[ [ "pandas.read_csv", "sklearn.metrics.pairwise.cosine_similarity", "sklearn.feature_extraction.text.TfidfVectorizer" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
vishalbelsare/mogptk
[ "4f7001fbfacea778bd62a1e4e6c5b404c473e313" ]
[ "mogptk/gpr/model.py" ]
[ "import sys\nimport torch\nimport numpy as np\nfrom IPython.display import display, HTML\nfrom . import Parameter, Mean, Kernel, MultiOutputKernel, Likelihood, GaussianLikelihood, config\nfrom functools import reduce\nimport operator\n\ndef prod(iterable):\n return reduce(operator.mul, iterable, 1)\n\nclass Chol...
[ [ "numpy.log", "torch.linalg.cholesky", "torch.ones", "torch.triangular_solve", "torch.max", "torch.zeros", "torch.min", "torch.cholesky_solve", "torch.eye", "torch.tensor", "torch.no_grad", "torch.diagflat" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
dendaxD/QAOA-MaxCut-amplitudes
[ "02f070b7113770cfccc28b8870a394c3883c2ad1" ]
[ "thesis-deadline-version/rings/exp_decay/rings-exp-pokles-python.py" ]
[ "import subprocess\nfrom os import system, remove, chdir\nfrom tabulate import tabulate\nfrom sympy import *\nimport numpy as np\nfrom math import pi\n\n\ndef edges(n):\n\tlocation = 0\n\tedges = [[0,n-1]]\n\tfor i in range(n-1):\n\t\tedges.append([location, location+1])\n\t\tlocation += 1\n\treturn edges\n\n\ndef...
[ [ "numpy.arange" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
josedab/udacity-ai-flower-image-classification
[ "9670fc7c8ca0572749a6fedfc1cafd0bdd6b0a0e" ]
[ "prediction_utils.py" ]
[ "import torch\nfrom images import process_image\n\n\ndef predict(image_path, model, topk=5, is_gpu_enabled=False):\n ''' Predict the class (or classes) of an image using a trained deep learning model.\n '''\n\n model.eval()\n\n if is_gpu_enabled:\n model = model.cuda()\n else:\n model =...
[ [ "torch.exp", "torch.no_grad", "torch.from_numpy" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
lhmtriet/MSR2019
[ "ff5100c9ae3c8180852df92134a0b090d9b420ab", "ff5100c9ae3c8180852df92134a0b090d9b420ab" ]
[ "Reproduction package/RQ1-2_Time-Validation.py", "Reproduction package/RQ1_Non-Temporal-Validation.py" ]
[ "# Import libraries\n\nimport pandas as pd\nimport numpy as np\nimport time\n\nfrom sklearn.feature_extraction.text import TfidfVectorizer\n\nfrom sklearn.metrics import accuracy_score, f1_score\n\nfrom sklearn.ensemble import RandomForestClassifier\nfrom xgboost import XGBClassifier\nfrom sklearn.linear_model impo...
[ [ "pandas.read_csv", "sklearn.linear_model.LogisticRegression", "sklearn.ensemble.RandomForestClassifier", "numpy.asarray", "sklearn.naive_bayes.MultinomialNB", "numpy.std", "numpy.mean", "sklearn.svm.LinearSVC", "sklearn.metrics.f1_score", "numpy.where", "sklearn.feature...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1...
noelmcloughlin/linkml-model-enrichment
[ "529f1623af9cc766b1fd119ba704445fc21e9846" ]
[ "linkml_model_enrichment/annotators/enum_annotator.py" ]
[ "# import linkml\nimport logging\nimport random\nimport re\n# urllib? urllib3? pure requests?\nimport urllib\n\nimport click\nimport click_log\nimport linkml.utils.rawloader as rl\nimport linkml_runtime\nimport pandas as pd\nimport requests\nimport yaml\nfrom linkml_runtime.dumpers import yaml_dumper\n# cosine? SIF...
[ [ "pandas.set_option", "pandas.concat", "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.3", "0.19", "1.1", "1.5", "0.24", "0.20", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
clukan99/AMPL
[ "a1e6a9da5d5b82700570000219be5d5c1fa13a3d" ]
[ "atomsci/ddm/pipeline/diversity_plots.py" ]
[ "\"\"\"\nPlotting routines for visualizing chemical diversity of datasets\n\"\"\"\n\nimport os\nimport sys\nimport pandas as pd\nimport numpy as np\nimport seaborn as sns\nimport umap\nfrom scipy.stats.kde import gaussian_kde\nfrom scipy.cluster.hierarchy import linkage\nimport matplotlib\nimport matplotlib.pyplot ...
[ [ "matplotlib.backends.backend_pdf.PdfPages", "pandas.concat", "pandas.read_csv", "numpy.random.choice", "scipy.stats.kde.gaussian_kde", "scipy.cluster.hierarchy.linkage", "matplotlib.pyplot.subplots", "pandas.DataFrame", "pandas.DataFrame.from_records", "scipy.spatial.distan...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [ "0.13", "1.6", "0.14", "0.15", "1.4", "0.16", "0.19", "1.5", "0.18", "1.2", "1.7", "0.12...
BerenMillidge/inferactively
[ "110ba5f01c1c302ecde40b4d7e555d1da535e372" ]
[ "scratch/test.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# pylint: disable=no-member\n\n\"\"\" Generic functions\n__author__: Conor Heins, Alexander Tschantz, Brennan Klein\n\"\"\"\n\nimport itertools\nimport numpy as np\nimport torch\nfrom scipy import special\nfrom inferactively.core import utils\nfrom inferactively.dist...
[ [ "numpy.log", "numpy.asscalar", "torch.Tensor", "numpy.squeeze", "numpy.issubdtype", "numpy.empty", "numpy.ones", "numpy.ndim", "numpy.copy", "numpy.delete", "numpy.shape", "numpy.prod", "scipy.special.gammaln", "numpy.array", "numpy.exp", "numpy.sum"...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.18", "0.19" ], "tensorflow": [] } ]
burhanmudassar/models_noise
[ "64693490ce241ce0cacc79743a8223e7949ee32d" ]
[ "research/object_detection/core/box_predictor.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.image.resize_bilinear", "tensorflow.transpose", "tensorflow.range", "tensorflow.shape", "tensorflow.reduce_mean", "tensorflow.stack", "tensorflow.reshape", "tensorflow.sigmoid", "tensorflow.ones", "tensorflow.squeeze", "tensorflow.constant_initializer", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
oncebasun/nn4nlp19-hw1
[ "86dfacc3c2faa4ff256f5168e7c01e57bb15260e" ]
[ "code/model/cnn2.py" ]
[ "import codecs\nimport numpy as np\nimport torch\nimport torch.nn as nn\nfrom torch.autograd import Variable\nfrom torch import optim\nimport torch.nn.functional as F\n\n\ndef load_external_embeddings(emb_layer, extern_emb, text_field):\n with codecs.open(extern_emb) as f:\n next(f)\n for line in f...
[ [ "torch.nn.BatchNorm1d", "torch.nn.Dropout", "torch.nn.Embedding", "torch.nn.MaxPool1d", "torch.nn.Linear", "torch.nn.Conv1d", "torch.nn.ReLU", "torch.nn.functional.pad" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
arunprakash16/code-2021-11-27-arunprakash
[ "67f23d88f0cbd7803fe7ed90210d36495e1d5335" ]
[ "src/pybmi/bmicategory.py" ]
[ "import pandas as pd\n\n\nclass BmiCategory:\n \"\"\"PyBmiCategory class - acts as an interface to fetch health category & risk for the passed on bmi value\"\"\"\n\n def __init__(self):\n \"\"\"Initialize bmi category and risk data as dataframe\"\"\"\n\n bmi_category_risk = [{\"category\": \"Und...
[ [ "pandas.DataFrame.from_dict" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
william-dawson/NTPoly-SPEC
[ "7ea1becec6dfdb05ab7c92f8216a18917b63c63b" ]
[ "Examples/GraphTheory/visualize.py" ]
[ "##########################################################################\nimport sys\nimport scipy\nimport scipy.io\nimport numpy\nfrom matplotlib import pyplot as plt\nfrom matplotlib.colors import LogNorm\n\n##########################################################################\nif __name__ == \"__main__\"...
[ [ "numpy.abs", "scipy.io.mmread", "matplotlib.pyplot.subplots", "numpy.seterr", "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "1.6", "0.14", "1.10", "0.15", "1.4", "0.16", "1.9", "0.19", "1.5", "0.18", "1.2", "1.7", "0.12", "1.0", "0.17", "1.3", "1.8" ...
DevwratJoshi/ur-o2as
[ "265249c27908a79a301014168394db0c0dc2204c" ]
[ "catkin_ws/src/o2as_xela_sensor/scripts/demo.py" ]
[ "#!/usr/bin/env python\nimport sys\nimport os\nimport cv2\nimport copy\nimport numpy as np\n\nimport rospy\nimport rospkg\nrospack = rospkg.RosPack()\nimport actionlib\nfrom o2as_xela_sensor.msg import *\nimport o2as_xela_sensor.srv\n\ntaxel_rows = 4\ntaxel_cols = 4\ntaxel_num = taxel_rows*taxel_cols\n\nclass XelaS...
[ [ "numpy.array", "numpy.zeros", "numpy.clip" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
claforte/vaex
[ "adf0d9280c6a931465dd65f1ead6d0466eceb637" ]
[ "packages/vaex-core/vaex/test/dataset.py" ]
[ "# -*- coding: utf-8 -*-\nfrom __future__ import print_function\nimport os\nimport vaex.dataset as dataset\nimport numpy as np\nimport unittest\nimport vaex as vx\nimport tempfile\nimport vaex.webserver\nimport astropy.io.fits\nimport astropy.units\nimport pandas as pd\nimport vaex.execution\nimport contextlib\na =...
[ [ "numpy.sqrt", "numpy.dtype", "numpy.concatenate", "numpy.all", "numpy.mean", "numpy.any", "numpy.ma.array", "numpy.var", "numpy.arange", "numpy.std", "numpy.nansum", "numpy.zeros", "numpy.testing.assert_array_almost_equal", "numpy.isnan", "numpy.median",...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
nixgnef/akshare
[ "042b62f37a2f289ee970db7173b09bd713229397" ]
[ "akshare/fx/currency_investing.py" ]
[ "# -*- coding:utf-8 -*-\n# /usr/bin/env python\n\"\"\"\nDate: 2020/9/9 11:56\nDesc: 英为财情-外汇-货币对历史数据\nhttps://cn.investing.com/currencies/\nhttps://cn.investing.com/currencies/eur-usd-historical-data\n\"\"\"\nimport re\n\nimport pandas as pd\nimport requests\nfrom bs4 import BeautifulSoup\n\nfrom akshare.index.cons ...
[ [ "pandas.read_html", "pandas.to_datetime", "pandas.DataFrame", "pandas.DataFrame.from_dict" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.3", "0.19", "1.1", "1.5", "0.24", "0.20", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
yuvalmarciano/pandas
[ "a9cacd9efee31e6cff28125ffbad00fad1617833" ]
[ "pandas/core/internals/array_manager.py" ]
[ "\"\"\"\nExperimental manager based on storing a collection of 1D arrays\n\"\"\"\nfrom __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Any, Callable, List, Optional, Tuple, TypeVar, Union\n\nimport numpy as np\n\nfrom pandas._libs import algos as libalgos, lib\nfrom pandas._typing import ArrayLik...
[ [ "pandas.util._validators.validate_bool_kwarg", "pandas.core.dtypes.common.is_extension_array_dtype", "pandas.core.dtypes.common.is_dtype_equal", "numpy.any", "pandas.core.dtypes.common.is_numeric_dtype", "numpy.arange", "pandas._libs.lib.is_integer", "pandas.core.internals.managers...
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
allaccountstaken/fdic_banks_eda
[ "92442e354a822094248bde7fd8a5a236861458fa" ]
[ "GUI/UserGui.py" ]
[ "from tkinter import *\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport matplotlib\nfrom matplotlib.figure import Figure\nfrom matplotlib.backends.backend_tkagg import (FigureCanvasTkAgg, \nNavigationToolbar2Tk)\n\n'''\nDeveloper Notes: \nYear Range is from 2000-2020, User can determine year range with...
[ [ "pandas.to_datetime", "pandas.read_csv", "matplotlib.pyplot.subplots", "pandas.DataFrame", "matplotlib.backends.backend_tkagg.FigureCanvasTkAgg" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
InigoMoreno/deep-ga
[ "87735aa5b6900b9797be02933ab397ff2e7b8bd0" ]
[ "deep_ga/callbacks.py" ]
[ "import deep_ga\nimport tensorflow as tf\nfrom tensorflow import keras\nimport os\nimport matplotlib.pyplot as plt\n\n\nclass AssertWeightsFinite(keras.callbacks.Callback):\n def __init__(self):\n super(AssertWeightsFinite, self).__init__()\n\n def on_epoch_end(self, epoch, logs=None):\n for wei...
[ [ "tensorflow.math.is_finite", "matplotlib.pyplot.title", "matplotlib.pyplot.scatter", "matplotlib.pyplot.ylim", "matplotlib.pyplot.xlim", "matplotlib.pyplot.clf", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Wiselnn570/machine-learning
[ "2cfadddab758abba721ed2fba6b5d8f12585945f" ]
[ "cm/disease.py" ]
[ "# coding:utf-8\n# 状态:\n# S0表示易感者S\n# S1表示感染者I\n# S2表示治愈者R\n# S3表示潜伏者E\n\n# 规则:\n# 1. 当S=S0时,为易感者,被感染率为p=k*(上下左右邻居的感染者)/4+l*(左上左下右上右下邻居的感染者)/4,概率c1变为潜伏者,概率1-c1变为感染者\n# 2. 当S=S1时,为感染者,具有一定的感染能力,等待t_max时间,会自动变为S2治愈者,染病时间初始化为0\n# 3. 当S=S2时,为治愈者,[具有一定的免疫能力,等待T_max时间,会自动变为S0易感者,免疫时间初始化为0],改为永久免疫\n# 4. 当S=S3时,为潜伏者,等待t1_m...
[ [ "matplotlib.pyplot.legend", "numpy.random.seed", "matplotlib.pyplot.plot", "matplotlib.pyplot.clf", "matplotlib.pyplot.xlabel", "numpy.array", "matplotlib.pyplot.pause", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
romanbsd/QuantSoftwareToolkit
[ "6b7e15fa3c0ba483a30674ff5acf30c77b91b877", "6b7e15fa3c0ba483a30674ff5acf30c77b91b877", "6b7e15fa3c0ba483a30674ff5acf30c77b91b877" ]
[ "QSTK/qstklearn/kdtknn.py", "Examples/Basic/tutorial3.py", "Legacy/Legacy/qstkoptimizers/curveFittingOptimizer.py" ]
[ "\"\"\"\n(c) 2011, 2012 Georgia Tech Research Corporation\nThis source code is released under the New BSD license. Please see\nhttp://wiki.quantsoftware.org/index.php?title=QSTK_License\nfor license details.\n\nA simple wrapper for scipy.spatial.kdtree.KDTree for doing KNN\n\"\"\"\nimport math,random,sys,bisect,ti...
[ [ "numpy.median", "numpy.append", "numpy.mean", "numpy.array", "numpy.zeros", "scipy.spatial.cKDTree" ], [ "matplotlib.pyplot.legend", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "numpy.cumprod", "matplotlib.pyplot.clf", "matplotlib.pyplot.ylabel", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sarahESL/CLEFeHealth2020-multilabel-bert
[ "57c83c3a138b5179cdbe788c9f4aceb26629e9aa" ]
[ "src/augment_data.py" ]
[ "import pandas as pd\nimport random\nfrom tqdm import tqdm\nfrom nltk.corpus import stopwords\nimport re\nimport pickle\n\n\ndef preprocessor(text):\n text = re.sub('<[^>]*>', '', text)\n text = re.sub('[\\W]+', ' ', text.lower())\n text = text.split()\n return text\n\n\ndata_path = 'path/to/concated/tr...
[ [ "pandas.read_csv", "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
rohit98077/wrldc_mis_weekly_report_generator
[ "13969db6bf6359e1bd9663d289f903c22d8b7e61" ]
[ "src/fetchers/lvNodesInfoFetcher.py" ]
[ "import cx_Oracle\nimport pandas as pd\nimport datetime as dt\nfrom typing import List, Tuple\nfrom src.typeDefs.lvNodesInfo import ILvNodesInfo\n\n\nclass LvNodesInfoFetcher():\n \"\"\"This class fetches LV Nodes info for weekly report\n \"\"\"\n\n def __init__(self, con_string: str):\n \"\"\"const...
[ [ "pandas.read_sql" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
benrhodes26/pyseer
[ "4e1065903ebfae6ba951b73de176b39a87faa37e" ]
[ "tests/cmdscale_test.py" ]
[ "import unittest\nimport numpy as np\nimport pandas as pd\nfrom pyseer.cmdscale import cmdscale\n\n\nclass TestCommandScale(unittest.TestCase):\n input_file = 'tests/distances_smaller.tsv.gz'\n Y_file = 'tests/cmdscale.Y.txt.gz'\n e_file = 'tests/cmdscale.e.txt.gz'\n input_data = pd.read_csv(input_file,...
[ [ "pandas.read_csv", "numpy.loadtxt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
Tiburrs/CS6323_AD-NeRF-Modification
[ "f3fc689d378111f0751b6c692af3ba0618549c81" ]
[ "data_util/face_tracking/convert_BFM.py" ]
[ "import numpy as np\nfrom scipy.io import loadmat\n\noriginal_BFM = loadmat('3DMM/01_MorphableModel.mat')\nsub_inds = np.load('3DMM/topology_info.npy',\n allow_pickle=True).item()['sub_inds']\nshapePC = original_BFM['shapePC']\nshapeEV = original_BFM['shapeEV']\nshapeMU = original_BFM['shapeMU']\n...
[ [ "numpy.load", "scipy.io.loadmat" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "1.7", "1.0", "0.10", "1.2", "0.14", "0.19", "1.5", "0.12", "0.17", "0.13", "1.6", "1.4", "1.9", "1.3", "1.10", "0.15", "0.18", "0.16"...
SensenLiu/aggrecup
[ "0c381ee259b388684205c1fa5fc41265a7e849b3", "0c381ee259b388684205c1fa5fc41265a7e849b3" ]
[ "offb_posctl/scripts/bvp_trial_numba.py", "offb_posctl/scripts/MinimumSnapTimeNode.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# coding=utf-8\n\nfrom scipy.integrate import solve_bvp\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport time\nfrom numba import jit, float64\nclass bvp_class():\n px_ini = -3.23815\n pz_ini = 0.3406\n vx_ini = -0.17139\n vz_ini = 0.18496\n ...
[ [ "matplotlib.pyplot.legend", "scipy.integrate.solve_bvp", "numpy.linspace", "matplotlib.pyplot.plot", "matplotlib.pyplot.subplot", "matplotlib.pyplot.grid", "matplotlib.pyplot.xlabel", "numpy.array", "matplotlib.pyplot.show", "numpy.zeros", "numpy.vstack", "matplotli...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "1.6", "1.10", "1.4", "1.9", "0.19", "1.5", "0.18", "1.2", "1.7", "1.0", "1.3", "1.8" ], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pan...
joaomonteirof/e2e_verification
[ "867f7a2fbdb2ac9154c31e1e63762b9a58b32d7e" ]
[ "imagenet/models/densenet.py" ]
[ "'''DenseNet in PyTorch.'''\nimport math\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom models.losses import AMSoftmax, Softmax\n\n\nclass Bottleneck(nn.Module):\n\tdef __init__(self, in_planes, growth_rate):\n\t\tsuper(Bottleneck, self).__init__()\n\t\tself.bn1 = nn.BatchNorm2d(in_...
[ [ "torch.nn.Sequential", "torch.nn.Dropout", "torch.norm", "torch.cat", "torch.nn.functional.avg_pool2d", "torch.nn.Conv2d", "torch.nn.Sigmoid", "torch.nn.Linear", "torch.no_grad", "torch.nn.LeakyReLU", "torch.nn.BatchNorm2d" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
lcontento/PEtab
[ "768eb5b8c145a5de2ee6e054e61120d140de4be8" ]
[ "tests/test_visualization.py" ]
[ "import warnings\nfrom tempfile import TemporaryDirectory\nimport pytest\nfrom petab.C import *\nfrom petab.visualize import (plot_data_and_simulation,\n plot_measurements_by_observable)\nimport matplotlib.pyplot as plt\n\n\n@pytest.fixture\ndef data_file_Fujita():\n return \"doc/exam...
[ [ "matplotlib.pyplot.close" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Hsins/NTUCourse
[ "5a623a52761ceb649621b4c3f140697c8cdb5d88" ]
[ "2017 Fall/EE5184 - Machine Learning/homework/homework_03/hw3_4.py" ]
[ "import os\nimport sys\nimport argparse\nimport matplotlib.pyplot as plt\nfrom keras.models import load_model\nfrom keras import backend as K\nfrom termcolor import colored,cprint\nimport numpy as np\nfrom utils import * \nimport pandas as pd\nfrom keras.utils import np_utils\n\nfrom sklearn import preprocessing\n\...
[ [ "numpy.expand_dims", "numpy.random.random", "numpy.clip", "numpy.min", "matplotlib.pyplot.subplots", "numpy.max", "numpy.random.normal", "numpy.zeros_like", "numpy.mean", "sklearn.preprocessing.LabelBinarizer", "numpy.load", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
cying9/maddpg
[ "560618a9292689605bda4dfa50c5f501512d66ce" ]
[ "maddpg/common/distributions.py" ]
[ "import torch\nfrom torch import distributions as dist\nfrom torch.nn import functional as F\nfrom functools import partial\n\n\nclass DiagGaussian(dist.Normal):\n def __init__(self, loc, logstd):\n super(DiagGaussian, self).__init__(loc=loc, scale=torch.exp(logstd))\n\n def mode(self):\n return...
[ [ "torch.split", "torch.sum", "torch.exp", "torch.distributions.Categorical", "torch.log", "torch.rand", "torch.unbind", "torch.broadcast_tensors", "torch.argmax" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
dkarunakaran/carnd-capstone-term3-p3
[ "c4e3e88ca47b9b2f217c5a2f434904d253f5065d", "c4e3e88ca47b9b2f217c5a2f434904d253f5065d" ]
[ "ros/src/waypoint_updater/waypoint_search.py", "ros/src/waypoint_updater/controller_tuning.py" ]
[ "from scipy.spatial import KDTree\nimport numpy as np\n\n\nclass WaypointSearch(object):\n \"\"\"Organize waypoints to make it fast to search for the closest to a position\"\"\"\n def __init__(self, waypoints):\n # Preprocess waypoints using the k-d tree algorithm\n self.waypoints_2d = [[wp.pose...
[ [ "numpy.dot", "numpy.array", "scipy.spatial.KDTree" ], [ "numpy.isclose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "1.7", "1.0", "0.10", "1.2", "0.14", "0.19", "1.5", "0.12", "0.17", "0.13", "1.6", "1.4", "1.9", "1.3", "1.10", "0.15", "0.18", "0.16"...
ts2-lescot/mne-python
[ "e4b16dc57a6a188aa06332b73d911e8131972522" ]
[ "tutorials/raw/10_raw_overview.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\n.. _tut-raw-class:\n\nThe Raw data structure: continuous data\n=======================================\n\nThis tutorial covers the basics of working with raw EEG/MEG data in Python. It\nintroduces the :class:`~mne.io.Raw` data structure in detail, including how to\nload, query, sub...
[ [ "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "numpy.array", "numpy.save" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
iboele/lots-iam-gpu
[ "0ae10ef390b296c448aa264822ad40ad65f488d9" ]
[ "LOTS_IM_GPU_FUNction.py" ]
[ "import matplotlib\nmatplotlib.use('Agg')\n\nfrom numba import cuda\nfrom timeit import default_timer as timer\nfrom matplotlib import pylab\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.axes_grid1 import make_axes_locatable\n\nfrom LOTS_IM_GPU_lib import *\n\nimport numpy as np\nimport nibabel as nib\nimport...
[ [ "numpy.rot90", "matplotlib.pyplot.tight_layout", "numpy.multiply", "numpy.min", "matplotlib.use", "matplotlib.pyplot.subplots", "numpy.nan_to_num", "matplotlib.pyplot.ioff", "matplotlib.pyplot.colorbar", "numpy.max", "matplotlib.pyplot.close", "matplotlib.pyplot.sub...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
blackjack2015/once-for-all
[ "f87e61ef7ad94e39bae01438b90d5d3ad43986c1" ]
[ "train_ofa_net.py" ]
[ "# Once for All: Train One Network and Specialize it for Efficient Deployment\n# Han Cai, Chuang Gan, Tianzhe Wang, Zhekai Zhang, Song Han\n# International Conference on Learning Representations (ICLR), 2020.\n\nimport argparse\nimport numpy as np\nimport os\nimport random\n\nimport horovod.torch as hvd\nimport tor...
[ [ "torch.manual_seed", "numpy.random.seed", "torch.cuda.manual_seed_all" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sdebanjana/Final-sensor-fusion-and-object-tracking
[ "8d90854b28f5d8db0a8a623cf068192337fca1f5" ]
[ "misc/objdet_tools.py" ]
[ "# ---------------------------------------------------------------------\n# Project \"Track 3D-Objects Over Time\"\n# Copyright (C) 2020, Dr. Antje Muntzinger / Dr. Andreas Haja.\n#\n# Purpose of this file : Collection of tools for object detection\n#\n# You should have received a copy of the Udacity license togeth...
[ [ "numpy.ones_like", "numpy.einsum", "numpy.linspace", "numpy.logical_and", "numpy.cos", "numpy.stack", "numpy.sin", "numpy.zeros_like", "numpy.broadcast_to", "numpy.column_stack", "numpy.array", "numpy.flip", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
vivivum/SPGPylibs
[ "29b3ecd4de522fe98dd423928a861d9bc75f2c18" ]
[ "SPGPylibs/PHItools/phi_gen.py" ]
[ "#=============================================================================\n# Project: SoPHI\n# File: phi_gen.py\n# Author: David Orozco Suárez (orozco@iaa.es)\n# Contributors: \n#-----------------------------------------------------------------------------\n# Description: \n#------------------------------...
[ [ "matplotlib.pyplot.imshow", "numpy.sqrt", "numpy.linspace", "numpy.issubdtype", "numpy.cumsum", "numpy.arctan2", "numpy.max", "numpy.mean", "numpy.zeros_like", "numpy.min_scalar_type", "numpy.ifftshift", "numpy.histogram", "numpy.where", "scipy.signal.savgol...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.14", "1.6", "1.10", "0.15", "1.4", "1.3", "1.9", "0.19", "1.5", "0.18", "1.2", "1.7", "1.0", "0.17", "0.16", "1.8" ], "tensorflow": [] ...
tsingcbx99/pytorch-image-models
[ "1526965d668e07e74073179f9c048aab1c88d314" ]
[ "timm/utils/cuda.py" ]
[ "\"\"\" CUDA / AMP utils\n\nHacked together by / Copyright 2020 Ross Wightman\n\"\"\"\nimport torch\n\ntry:\n from apex import amp\n\n has_apex = True\nexcept ImportError:\n amp = None\n has_apex = False\n\nfrom .clip_grad import dispatch_clip_grad\n\n\nclass ApexScaler:\n state_dict_key = \"amp\"\n\...
[ [ "torch.cuda.amp.GradScaler" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
JEET-123/MOVIEFLIX--Advanced-Movie-Recommendation-System
[ "d39f7b555c8f681ef85ec4112932b85e89765aec" ]
[ "main.py" ]
[ "import numpy as np\nimport pandas as pd\nfrom flask import Flask, render_template, request\nfrom sklearn.feature_extraction.text import CountVectorizer\nfrom sklearn.metrics.pairwise import cosine_similarity\nimport json\nimport bs4 as bs\nimport urllib.request\nimport pickle\nimport requests\n\n# load the nlp mod...
[ [ "sklearn.feature_extraction.text.CountVectorizer", "numpy.array", "pandas.read_csv", "sklearn.metrics.pairwise.cosine_similarity" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
adriennekarnoski/job_scraper
[ "8907de6f1f222733ca812e4cc141b30b69a9b203" ]
[ "src/job_data.py" ]
[ "\"\"\"File for graphing information from CSV file.\"\"\"\nfrom csv import reader\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport datetime\nfrom collections import Counter\n\n\nclass JobData(object):\n \"\"\"JobData class for working with data from CSV file.\"\"\"\n\n def __i...
[ [ "pandas.read_csv", "matplotlib.pyplot.title", "numpy.arange", "matplotlib.pyplot.plot", "matplotlib.pyplot.bar", "matplotlib.pyplot.xticks", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
shovalf/QGCN-better
[ "9d4f0bc3b08b08ebd7915ba31dda862e42727214", "9d4f0bc3b08b08ebd7915ba31dda862e42727214" ]
[ "QGCN/QGCN_model/qgcn_activator.py", "QGCN/dataset/dataset_external_data.py" ]
[ "\"\"\"\nMain file to run QGCN model. See the main function in the bottom of this file.\n\"\"\"\n\nimport csv\nimport json\nimport os\nfrom sys import stdout\n# import nni\nfrom time import sleep\n\nf = open(\"curr_pwd\", \"wt\")\ncwd = os.getcwd()\nf.write(cwd)\nf.close()\n\nsys.path.insert(1, os.path.join(cwd, \"...
[ [ "sklearn.metrics.roc_auc_score", "numpy.isnan", "numpy.asarray", "torch.utils.data.DataLoader", "torch.matmul", "torch.utils.data.random_split", "numpy.mean", "torch.cuda.is_available", "torch.device" ], [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
xdr940/utils
[ "c4b7b1479956475a7feee90a723541904ec82306" ]
[ "MC_utils/mc_apply/utils/masks.py" ]
[ "\nimport torch\nfrom .erodila import rectify\ndef float8or(t1,t2):\n\n return ((t1 + t2) > 0).float()\n\ndef float8minus(t1,t2):\n pass\ndef VarMask(erro_maps):\n '''\n var mask\n :param erro_maps:\n :return:\n '''\n rhosvar = erro_maps.var(dim=1, unbiased=False) # BHW\n rhosvar_flat = ...
[ [ "torch.min" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
JamesWanglf/yolact-instance-segmentation
[ "d301875f2d37343c5a2147a30ff4242178173ffa" ]
[ "rest_api_server.py" ]
[ "from http.server import BaseHTTPRequestHandler, HTTPServer\nfrom urllib.parse import urlparse, parse_qs\nfrom data import COCODetection, get_label_map, MEANS, COLORS\nfrom yolact import Yolact\nfrom utils.augmentations import BaseTransform, FastBaseTransform, Resize\nfrom utils.functions import MovingAverage, Prog...
[ [ "torch.set_default_tensor_type", "torch.no_grad", "torch.Tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Behrouz-Babaki/NCG4CVRP
[ "87d63366c0b461f44ce8e982159a1e207af77b44", "87d63366c0b461f44ce8e982159a1e207af77b44" ]
[ "experiments/test/src/mlp_policy.py", "experiments/train/src/gcn.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom qpf import QPFunction\n\nclass Policy(nn.Module):\n def __init__(self, learn_quadratic=True, ks=None, \n mlp_emb_size=64,\n A_dim=5):\n \n super(Policy, self).__init__()\n \n se...
[ [ "torch.mv", "torch.cat", "torch.zeros", "torch.eye", "torch.nn.LayerNorm", "torch.tensor", "torch.nn.Linear", "torch.unbind", "torch.stack", "torch.device", "torch.nn.ReLU" ], [ "torch.mean", "torch.ones", "torch.max", "torch.cat", "torch.zeros",...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
wanglaotou/centernet_ncnn
[ "31f82063215ef8391a90a0f6901e4787d71871f7" ]
[ "src/lib/utils/debugger.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport numpy as np\nimport cv2\nfrom .ddd_utils import compute_box_3d, project_to_image, draw_box_3d\n\nclass Debugger(object):\n def __init__(self, ipynb=False, theme='black', \n num_cl...
[ [ "numpy.clip", "numpy.ones", "numpy.concatenate", "numpy.array", "numpy.loadtxt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
shaobinqiu/pyabc
[ "eefd322bdd0bb04ae6d42554d24140c6ffbd5c34" ]
[ "ababe/stru/tests/test_sogen.py" ]
[ "# encoding: utf-8\n# Distributed under the terms of the MIT License.\n\nimport unittest\n\nimport numpy as np\nimport ruamel.yaml as yaml\n#import yaml\nfrom spglib import get_symmetry\nimport ababe.stru.sogen as sogen\nfrom ababe.stru.sogen import OccupyGenerator\nfrom ababe.stru.element import GhostSpecie, Speci...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mihaimorariu/pytorch-neural-renderer-v2
[ "5af83194a418ba0e7c68c5174cbf569968153b1c" ]
[ "neural_renderer_torch/utils.py" ]
[ "import imageio\nimport numpy as np\nimport torch\n\n\ndef to_gpu(data, device=None):\n if isinstance(data, tuple) or isinstance(data, list):\n return [torch.as_tensor(d).cuda(device) for d in data]\n else:\n return torch.as_tensor(data).cuda(device)\n\n\ndef imread(filename):\n return np.asa...
[ [ "torch.abs", "numpy.radians", "torch.max", "torch.zeros", "torch.cat", "numpy.arange", "torch.sin", "numpy.cos", "numpy.ones", "numpy.sin", "numpy.zeros", "torch.cos", "torch.as_tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Varesse0910/monocular_avoidance_drone
[ "a90716f0fe055e8519a94653280b4453a403e036" ]
[ "utils.py" ]
[ "#\n# MIT License\n#\n# Copyright (c) 2018 Matteo Poggi m.poggi@unibo.it\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the righ...
[ [ "numpy.uint8", "matplotlib.cm.get_cmap" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
TommyWongww/Sentiment-Text-Classification-Pytorch
[ "2246c4e96d11bf2ce2ee17b0e3037cf56ac0fcc4" ]
[ "utils.py" ]
[ "# @Time : 2019/4/17 20:08\r\n# @Author : shakespere\r\n# @FileName: utils.py\r\n#-*- coding : utf-8 -*-\r\n# coding:utf-8\r\nimport string\r\nimport torch\r\ndef load_stopwords(path = \"./data/stopwords.txt\"):\r\n with open(path,\"r\") as f:\r\n stop_words = [word.strip('\\n') for word in f]\r\n ...
[ [ "torch.LongTensor", "torch.ones", "torch.Tensor", "torch.zeros", "torch.randn" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
tayfuntuna/cs224u
[ "4368090c679d869f21ed2393b9ca0ef217b5c404" ]
[ "test/test_vsm.py" ]
[ "import numpy as np\nimport os\nimport pandas as pd\nimport pytest\nimport torch\nfrom transformers import BertModel, BertTokenizer\n\nimport vsm\nimport utils\n\n__author__ = \"Christopher Potts\"\n__version__ = \"CS224u, Stanford, Spring 2022\"\n\n\nutils.fix_random_seeds()\n\n\nDATA_HOME = os.path.join('data', '...
[ [ "torch.LongTensor", "numpy.array_equal", "torch.Tensor", "torch.equal", "pandas.DataFrame", "torch.tensor", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
fbinz/lsys
[ "052d5bae4b5af168f94e04a88cfd265b78d65618" ]
[ "dol.py" ]
[ "from PyQt5.QtCore import *\nfrom PyQt5.QtWidgets import *\nfrom PyQt5.QtGui import *\nimport vispy\nimport vispy.scene\nimport vispy.visuals\nimport numpy as np\nimport math\n\nclass MainWindow(QMainWindow):\n\n def __init__(self, parent=None):\n super(MainWindow, self).__init__(parent)\n\n splitt...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
bayeslabs/AiGym
[ "b1eae8430acf9ca3dc1d2fd86e090c193b271121" ]
[ "NLP/assignment2/q2_parser_model.py" ]
[ "import pickle\nimport os\nimport time\nimport tensorflow as tf\n\nfrom model import Model\nfrom q2_initialization import xavier_weight_init\nfrom utils.parser_utils import minibatches, load_and_preprocess_data\n\n\nclass Config(object):\n \"\"\"Holds model hyperparams and data information.\n\n The config cla...
[ [ "tensorflow.matmul", "tensorflow.keras.utils.Progbar", "tensorflow.Graph", "tensorflow.Variable", "tensorflow.zeros", "tensorflow.reshape", "tensorflow.placeholder", "tensorflow.global_variables_initializer", "tensorflow.Session", "tensorflow.nn.softmax_cross_entropy_with_l...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
anthonycaterini/hvae-nips
[ "a53e54b21ed75ca7a051a7f272ef89baf59488b9" ]
[ "gaussian/experiment_classes.py" ]
[ "import numpy as np\nimport tensorflow as tf\nimport time\nimport pickle\nimport pdb\nimport os\n\nfrom conf import params\n\nclass BaseModel():\n \"\"\" Base model containing generic methods for running the tests \"\"\"\n\n def __init__(self, var_names, var_inits, model_name, d):\n \"\"\" \n In...
[ [ "tensorflow.zeros", "tensorflow.reduce_sum", "tensorflow.diag", "tensorflow.tanh", "numpy.exp", "tensorflow.Variable", "numpy.zeros", "tensorflow.matmul", "numpy.log", "tensorflow.train.RMSPropOptimizer", "tensorflow.placeholder", "tensorflow.exp", "tensorflow.c...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
danielballan/intake-pcap
[ "96b7f2a98cff1ecbaa3265e993003a907785f05c" ]
[ "examples/read-live.py" ]
[ "import sys\n\nimport pandas as pd\n\nfrom intake_pcap.stream import LiveStream\n\n\nif __name__ == '__main__':\n pd.set_option('display.max_columns', 10)\n pd.set_option('display.width', 1000)\n\n lstream = LiveStream(sys.argv[1])\n if len(sys.argv) > 2:\n lstream.set_filter(sys.argv[2])\n wh...
[ [ "pandas.set_option" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
souryadey/speed-tests
[ "62d7b141b597eb9bed60ff4756b6d3f613ff620f" ]
[ "sparsemats_denseroutines_torch/main.py" ]
[ "'''\nSourya Dey, USC\n\nCompare multiplication time of sparse x sparse (both densities varying individually)\nusing only regular dense routines in Pytorch, i.e. special sparse routines are NOT used\n'''\n\nimport timeit\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n\ndef matmult_random(a=1000,b=1000,c=10...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.yticks", "matplotlib.pyplot.semilogx", "numpy.savez_compressed", "matplotlib.pyplot.grid", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.xticks", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
davidBoertjes/oopt-gnpy
[ "83768480eb9aedad560ab9a722493f04cfe80c9c" ]
[ "tests/test_propagation.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n# @Author: Jean-Luc Auge\n# @Date: 2018-02-02 14:06:55\n\nfrom gnpy.core.elements import Edfa\nimport numpy as np\nfrom json import load, dumps\nimport pytest\nfrom gnpy.core.elements import Transceiver, Fiber, Edfa\nfrom gnpy.core.utils import lin2db, db2lin\nfro...
[ [ "numpy.mean" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
siddharth9820/pipedream
[ "00931df56bd2137267637c31d254d47740533a98" ]
[ "profiler/image_classification/models/wikitext-2/transformer.py" ]
[ "import torch \nimport math \n\nclass PositionalEncoding(torch.nn.Module):\n def __init__(self, d_model, dropout=0.1, max_len=5000):\n super(PositionalEncoding, self).__init__()\n self.dropout = torch.nn.Dropout(p=dropout)\n\n pe = torch.zeros(max_len, d_model)\n position = torch.aran...
[ [ "torch.nn.Sequential", "torch.nn.Dropout", "torch.ones", "torch.sin", "torch.zeros", "torch.nn.Embedding", "torch.nn.LayerNorm", "torch.nn.TransformerEncoderLayer", "torch.nn.Linear", "torch.no_grad", "torch.arange", "torch.cos" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Andesha/ViewClust
[ "9bb77c783e5839264e0acae56ce6c334409fe903" ]
[ "viewclust/slurm/mem_info.py" ]
[ "import subprocess\nimport pandas as pd\nimport plotly.graph_objects as go\n\n\ndef mem_info(d_from, account, fig_out='', debugging=False):\n \"\"\"Script for profiling the memory usage of an account via sacct.\n\n DEPRECATION WARNING.\n\n Always outputs various statistical measures to stdout, but can\n ...
[ [ "pandas.to_datetime", "pandas.to_numeric" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.3", "0.19", "1.1", "1.5", "0.24", "0.20", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
kjhall01/learning_machines
[ "fe40a2852658aeca304262a211d46b8d4e304e85" ]
[ "src/deterministic/pruned_elm.py" ]
[ "import numpy as np\nfrom scipy.spatial.distance import cdist\nfrom sklearn.feature_selection import mutual_info_regression\nfrom sklearn.metrics import r2_score\n\nclass PrunedRegressor:\n\t\"\"\"Extreme Learning Machine\"\"\"\n\tdef __init__(self, hidden_layer_size=500, activation='sigm'):\n\t\tself.hidden_layer_...
[ [ "numpy.dot", "numpy.log", "sklearn.metrics.r2_score", "numpy.asarray", "numpy.squeeze", "scipy.spatial.distance.cdist", "numpy.linalg.pinv", "numpy.argmax", "numpy.argmin", "numpy.random.randn", "numpy.transpose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "1.6", "0.14", "1.10", "0.15", "1.4", "0.16", "1.9", "0.19", "1.5", "0.18", "1.2", "1.7", "0.12", "1.0", "0.17", "1.3", "1.8" ...
jrapin/qprojects
[ "85cee49f9606e61214711d47c585602a419a87ac" ]
[ "qprojects/_representations.py" ]
[ "import numpy as np\nfrom . import _deck\n\n\nclass ExplicitRepresentation:\n\n shape = (34, 36)\n # representation: (1 initial cards and order + 1 trump + 32 played cards) x (32 cards + 4 order)\n\n @classmethod\n def create(cls, board, player, no_last=False):\n # player specific\n repres...
[ [ "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
takuyats/ngboost
[ "620586ce706c9034714ff05d4c49d85b4d2f3a10" ]
[ "ngboost/distns/normal.py" ]
[ "from ngboost.distns import RegressionDistn\nfrom ngboost.scores import LogScore, CRPScore\nimport scipy as sp\nimport numpy as np\nfrom scipy.stats import norm as dist\n\n\nclass NormalLogScore(LogScore):\n def score(self, Y):\n return -self.dist.logpdf(Y)\n\n def d_score(self, Y):\n D = np.zer...
[ [ "numpy.log", "numpy.ones_like", "numpy.sqrt", "scipy.stats.norm.cdf", "scipy.stats.norm.pdf", "scipy.stats.norm.fit", "scipy.stats.norm", "numpy.zeros_like", "numpy.exp", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
AnHerbWorm/DataAnalysis
[ "1d0514d0dfd14c8bd2fb86db95b77c7cda3e967d" ]
[ "python/pandas_util.py" ]
[ "\"\"\"\npandas_util.py\n\nUtility classes and functions for working with pandas library.\n\nColumnEnumerator\n----------------\nClass to provide attribute access to column names and common operations for\nworking with DataFrames in larger projects.\nSmaller projects or .ipynb files will benefit more from the attri...
[ [ "pandas.concat" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "0.19", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
mathy/mathy_envs
[ "41d82cca881ff9d3d3fe576d0e75100116a0e4da", "41d82cca881ff9d3d3fe576d0e75100116a0e4da" ]
[ "mathy_envs/state.py", "mathy_envs/time_step.py" ]
[ "from enum import IntEnum\nfrom typing import Any, Dict, List, NamedTuple, Optional\n\nimport numpy as np\nfrom mathy_core.expressions import ConstantExpression, MathExpression, MathTypeKeys\nfrom mathy_core.parser import ExpressionParser\n\nfrom zlib import adler32\n\nfrom .types import ActionType\nfrom .util impo...
[ [ "numpy.asfarray" ], [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
OmegaDING/MCM_GOLD_BTC_speculation
[ "c2fcb719396964aa25ac6dd9a0d7918de9d88a93" ]
[ "tranProbability.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd\n\ndef gold_probability(start_day = 0 ,current_day = 1264):\n pd_reader = pd.read_csv(\"./LBMA-GOLD.csv\")\n x = [x for x in range(start_day, current_day+1)]\n y = pd_reader['USD (PM)'][start_day:current_day+1]\n if pd_reader['USD...
[ [ "numpy.polyder", "matplotlib.pyplot.legend", "numpy.polyfit", "numpy.poly1d", "pandas.read_csv", "matplotlib.pyplot.title", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
mihaic/brainiak
[ "2cae2778691343968aa10df8077573ba9c137209" ]
[ "brainiak/utils/utils.py" ]
[ "# Copyright 2016 Intel Corporation, Princeton University\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re...
[ [ "numpy.diag", "numpy.asarray", "numpy.cumsum", "numpy.concatenate", "numpy.all", "scipy.fftpack.fft", "numpy.round", "numpy.mean", "numpy.exp", "numpy.where", "numpy.arange", "numpy.size", "numpy.zeros", "scipy.fftpack.ifft", "numpy.triu_indices_from", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "1.7", "1.0", "0.10", "1.2", "0.14", "0.19", "1.5", "0.12", "0.17", "0.13", "1.6", "1.4", "1.9", "1.3", "1.10", "0.15", "0.18", "0.16"...
mouse36872/tensorflow
[ "64228599fdeeec0bf504485901a8c8e558a5a9ad" ]
[ "tensorflow/python/keras/saving/saved_model/load.py" ]
[ "# Copyright 2018 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.training.tracking.base.no_automatic_dependency_tracking_scope", "tensorflow.python.keras.saving.saved_model.serialized_attributes.CommonEndpoints.all_functions.union", "tensorflow.python.keras.saving.saving_utils.compile_args_from_training_config", "tensorflow.python.keras.savin...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "2.3", "2.2", "2.4" ] } ]
hajime9652/observations
[ "2c8b1ac31025938cb17762e540f2f592e302d5de" ]
[ "observations/snli.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport json\nimport numpy as np\nimport os\n\nfrom observations.util import maybe_download_and_extract\n\n\ndef snli(path):\n \"\"\"Load the Stanford Natural Language Inference (SNLI) corpus\n [@bowm...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
anupgp/astron
[ "5ef1b113b5025f5e0477a1fb2b5202fadbc5335c" ]
[ "analysis/open_dynpars_file.py" ]
[ "import csv\nimport numpy as np\nimport os\nfrom matplotlib import pyplot as plt\n\n# fpath1 = \"/home/anup/data/glu1to100000nM2s/dynparam/\"\nfpath1 = \"/home/anup/goofy/codes/astron/stimparams/\"\nfname = \"stimparams_dhpg100000nM2s.isfdp\"\ndypar = np.genfromtxt(os.path.join(fpath1,fname),dtype=float,skip_header...
[ [ "matplotlib.pyplot.axes", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Matze77/MetPy
[ "5418bdbda0e38143638ce9f8d21acf56c80b5333", "5418bdbda0e38143638ce9f8d21acf56c80b5333" ]
[ "src/metpy/plots/_mpl.py", "src/metpy/interpolate/points.py" ]
[ "# Copyright (c) 2016,2017,2019 MetPy Developers.\n# Distributed under the terms of the BSD 3-Clause License.\n# SPDX-License-Identifier: BSD-3-Clause\n\"\"\"Functionality that we have upstreamed or will upstream into matplotlib.\"\"\"\n\n# See if we should monkey-patch Barbs for better pivot\nimport matplotlib.tra...
[ [ "matplotlib.text.Text.__init__", "matplotlib.transforms.Bbox.null", "matplotlib.cbook.delete_masked_points", "matplotlib.transforms.Affine2D", "numpy.vstack" ], [ "scipy.spatial.ConvexHull", "scipy.spatial.Delaunay", "scipy.interpolate.Rbf", "scipy.spatial.cKDTree", "sc...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "1.7", "1.0", "0.10", "1.2", "0.14", "0.19", "1.5", "0.12", "0.17", "0.13", ...
ibpme/NeuralNetworkFromScratch
[ "831871104737f0d5f2ba1d3631628bb945f581cc" ]
[ "src/load_mnist.py" ]
[ "import tensorflow_datasets as tfds\nimport numpy as np\n\ndef load_data(validation_size = 10000):\n mnist_train, mnist_test = tfds.load('mnist', split=['train', 'test'], shuffle_files=True , as_supervised=True)\n mnist_validation = mnist_train.take(validation_size)\n mnist_train = mnist_train.skip(10000)\...
[ [ "numpy.reshape", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jlehrer1/comparative-organoids
[ "91b34db5bf8692cdab75874b7a4a450b9be8e27f" ]
[ "src/models/train_classical_models.py" ]
[ "import pathlib \nimport os\nimport argparse\n\nimport numpy as np\nimport sklearn \n\nimport dask.dataframe as dd\nfrom sklearn.svm import SVC\nfrom dask_ml.model_selection import train_test_split, RandomizedSearchCV\n\nclass GeneClassifier:\n def __init__(self, est, params):\n self.est = est\n se...
[ [ "sklearn.svm.SVC", "numpy.linspace" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
thalesmaoa/pyleecan
[ "c4fdc6362fdeba3d0766d5d1df3ff9c97c3f9fa3" ]
[ "pyleecan/Methods/Simulation/EEC_PMSM/solve_EEC.py" ]
[ "# -*- coding: utf-8 -*-\n\nfrom numpy import array, pi\nfrom scipy.linalg import solve\n\n\ndef solve_EEC(self):\n \"\"\"Compute the parameters dict for the equivalent electrical circuit\n cf \"Advanced Electrical Drives, analysis, modeling, control\"\n Rik de doncker, Duco W.J. Pulle, Andre Veltman, Spri...
[ [ "numpy.array", "scipy.linalg.solve" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "0.12", "0.14", "0.15" ], "tensorflow": [] } ]
UBC-MDS/hypepy
[ "9b51737852a9e3698ec4f0fa2909040c7b2f41e8" ]
[ "tests/test_conf_int.py" ]
[ "import numpy as np\nimport pytest\nfrom hypepy import conf_int\n\n\ndef test_type():\n '''\n This tests whether there are incompatible data types in the input array. This includes the following:\n Strings, booleans, NA values.\n This should return a typeError.\n '''\n with pytest.raises(TypeError...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
PiotrZiolo/deep-rl-nn-udacity
[ "7ad63e251c1353ea94ee689a81c0886da1242dbe" ]
[ "p1_navigation/prioritized_ddqn_agent.py" ]
[ "import numpy as np\nfrom collections import namedtuple, deque\n\nfrom ddqn_agent import DDQNAgent\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\n\nBUFFER_SIZE = int(1e5) # replay buffer size\nBATCH_SIZE = 64 # minibatch size\nGAMMA = 0.99 #...
[ [ "numpy.power", "numpy.vstack", "numpy.max", "torch.cuda.is_available", "numpy.array", "numpy.random.RandomState" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
SinginAlong/omf
[ "5c2a56f4ea49ee943e6f3f2eb609d46c046cf7ce" ]
[ "omf/serializers.py" ]
[ "\"\"\"serializers.py: array and image serializers/deserializers for OMF file IO\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nfrom io import BytesIO\nimport zlib\n\nimport numpy as np\nfrom six impor...
[ [ "numpy.isnan", "numpy.frombuffer" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mssung94/daishin-trading-system
[ "d6682495afb7a08e68db65537b1d1789f2996891" ]
[ "tutorial/27.py" ]
[ "# 대신증권 API\r\n# 종목별 투자자 매매동향 (잠정)데이터\r\n\r\n# CpSysDib.CpSvr7210d 를 통해 \"종목별 투자자 매매동향(잠정)데이터\" 를 조회 합니다.\r\n#\r\n# ■ 사용된 PLUS OBJECT\r\n# - CpSysDib.CpSvr7210d - 투자자 매매 동향(잠정) 데이터 조회\r\n#\r\n# ■ 화면 설명\r\n# - 기관계 상위 : 기간계 상위 순으로 조회\r\n# - 외국인상위 : 외국인상위 순으로 조회\r\n# - print : 조회 내용 print\r\n# - 엑셀 내보내기 :...
[ [ "pandas.DataFrame", "pandas.ExcelWriter" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.3", "0.19", "1.1", "1.5", "0.24", "0.20", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
ADTHAD/ATHAD
[ "a892c049698a468319b02473642d7402e4680bdc" ]
[ "heart.py" ]
[ "from flask import request\nfrom sklearn.externals import joblib\nimport pandas as pd\nimport numpy as np\n\ndef prediction():\n model_svm = joblib.load(\"models/heart_disease_models/heart_svm_model.pkl\")\n model_rfc = joblib.load(\"models/heart_disease_models/heart_rfc_model.pkl\")\n\n age = int(request....
[ [ "pandas.concat", "pandas.read_csv", "numpy.min", "numpy.max", "sklearn.externals.joblib.load", "pandas.get_dummies" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
deinal/aerosol-modeling
[ "d778458619929cc52d3170640b71239d936b10bb" ]
[ "plots/plots.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Feb 24 22:25:13 2020\n\n\"\"\"\n\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport os\nfrom scipy.stats import binned_statistic,binned_statistic_2d\n\ndatadir=\"aerosol-modeling-master/data/final\"\n\ndata=pd.Da...
[ [ "matplotlib.pyplot.semilogy", "pandas.concat", "matplotlib.pyplot.pcolormesh", "numpy.linspace", "scipy.stats.binned_statistic_2d", "pandas.DataFrame", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlabel", "scipy.stats.binned_statistic", "ma...
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.3", "0.19", "1.1", "1.5", "0.24", "0.20", "1.0", "0.25", "1.2" ], "scipy": [ "0.13", "1.6", "0.14", "1.10", "0...
mdabrowski-phd/strawberryfields
[ "45064ae195f35ba0402ba8b480127331d2efd475" ]
[ "strawberryfields/backends/states.py" ]
[ "# Copyright 2019 Xanadu Quantum Technologies Inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless required by applica...
[ [ "numpy.dot", "numpy.sqrt", "numpy.einsum", "numpy.trace", "numpy.allclose", "numpy.reshape", "numpy.arange", "numpy.eye", "numpy.sin", "numpy.linalg.det", "numpy.real", "numpy.tensordot", "scipy.special.factorial", "numpy.zeros", "numpy.arccosh", "sc...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "0.14", "0.15", "0.12", "0.10" ], "tensorflow": [] } ]
SaschaMet/melanoma-classification
[ "f9bc568975a86c4ad0e387ca3da3bfc8c56aa7f8" ]
[ "src/model/clr_callback.py" ]
[ "# Source: https://github.com/mhmoodlan/cyclic-learning-rate/blob/master/clr.py\nimport tensorflow as tf\nimport matplotlib.pyplot as plt\nfrom tensorflow.python.framework import ops\nfrom tensorflow.python.ops import math_ops\nfrom tensorflow.python.eager import context\n\n\ndef cyclic_learning_rate(global_step,\n...
[ [ "tensorflow.python.eager.context.executing_eagerly", "tensorflow.python.ops.math_ops.subtract", "tensorflow.python.ops.math_ops.divide", "tensorflow.python.ops.math_ops.pow", "tensorflow.keras.callbacks.LearningRateScheduler", "tensorflow.python.ops.math_ops.add", "tensorflow.python.op...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "2.7", "2.6", "2.4", "2.3", "2.5", "2.2" ] } ]
shansdah/sumo-rl
[ "181e8a2d21aa1fb76a4f2c4c4fc3f3f5e622456e" ]
[ "sumo_rl/memory/replay_buffer.py" ]
[ "import numpy as np\nimport tensorflow as tf\nimport random\n\n\n\nclass Memory:\n\n def __init__(self, rb_agents, rb_memory, rb_batch_size):\n self.exp_num = 0\n self.total_agents = rb_agents\n self.capacity = rb_memory\n self.batch_size = rb_batch_size\n self.buffer = []\n\n\...
[ [ "tensorflow.convert_to_tensor", "numpy.minimum", "numpy.power", "numpy.max", "numpy.random.uniform", "numpy.zeros", "numpy.empty" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
mrwyattii/DeepSpeedExamples
[ "6bd444a7c62e9d7d320dd4c1e1142062f50c861d" ]
[ "BingBertGlue/run_glue_classifier_bert_base.py" ]
[ "# coding=utf-8\r\n# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.\r\n# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\...
[ [ "numpy.squeeze", "sklearn.metrics.matthews_corrcoef", "torch.utils.data.DataLoader", "torch.no_grad", "torch.cuda.manual_seed_all", "torch.cuda.is_available", "torch.device", "torch.distributed.get_rank", "scipy.stats.spearmanr", "sklearn.metrics.f1_score", "torch.nn.Cr...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "1.6", "0.14", "1.10", "0.15", "1.4", "1.3", "1.9", "0.19", "1.5", "0.18", "1.2", "1.7", "0.12", "1.0", "0.17", "0.16", "1.8" ...
edazizovv/news_embedder
[ "c01a93264a8a696b98ffe43a9b0fb62718627f76" ]
[ "old/old/ner_flair_o.py" ]
[ "import numpy\nimport pandas\n\nfrom flair.models import SequenceTagger\nfrom flair.data import Sentence\n\nin_data = pandas.read_excel('./data/source.xlsx')\narray = in_data['Text'].values\n\ntagger = SequenceTagger.load('ner')\n\n# Step 1. We need a global vocabulary\n\ngeneral = {}\ngeneral_columns = []\nfor x i...
[ [ "numpy.concatenate", "pandas.read_excel", "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.3", "0.19", "1.1", "1.5", "0.24", "0.20", "1.0", "0.25", "1.2" ], "scipy": [], "tensorflow": [] } ]
levandosky-k/DeePyMoD
[ "47c33667b6d89b5ca65d9e950773d8ac4a3ca0b9" ]
[ "src/deepymod/data/burgers/burgers.py" ]
[ "\"\"\" Contains several interactive datasets for the Burgers equation including:\n - Burgers with initial delta peak profile\n - Burgers with initial cosine profile\n - Burgers with initial sawtooth profile\"\"\"\n\nimport torch\nfrom numpy import pi\n\nfrom deepymod.data import Dataset\n\n\ndef burgers_d...
[ [ "torch.erfc", "torch.sin", "torch.sqrt", "torch.tensor", "torch.exp", "torch.meshgrid", "torch.cos" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
PKU-DAIR/MFES-HB
[ "a5fbd6063ed18eca00d2dba92dcb4d081554718f" ]
[ "mfeshb/optimizer/base/utils.py" ]
[ "from typing import List\nimport numpy as np\nfrom openbox.utils.config_space import Configuration, ConfigurationSpace\n\n\ndef sample_configuration(configuration_space: ConfigurationSpace, excluded_configs=None,\n max_sample_cnt=1000):\n \"\"\"\n sample one config not in excluded_conf...
[ [ "numpy.std", "numpy.array", "numpy.mean", "numpy.linalg.norm" ] ]
[ { "matplotlib": [], "numpy": [ "1.10", "1.12", "1.11", "1.19", "1.24", "1.13", "1.16", "1.9", "1.18", "1.23", "1.21", "1.22", "1.20", "1.7", "1.15", "1.14", "1.17", "1.8" ], "pandas": [], ...
ice-melt/python-lib
[ "345e34fff7386d91acbb03a01fd4127c5dfed037" ]
[ "sample_code/Python_NLP/nlp-4-8-networkx.py" ]
[ "#!/usr/bin/env python\n# -*- coding:utf-8 -*-\n\"\"\"\n@Author : ice-melt\n@File : nlp-4-8-networkx.py\n@Time : 2019/4/18 17:46\n@Version : 1.0 \n@Desc : None\n\"\"\"\nimport networkx as nx\nimport matplotlib\nfrom nltk.corpus import wordnet as wn\n\n\ndef traverse(g, start, node):\n\tg.d...
[ [ "matplotlib.pyplot.show" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mbignotti/Merlion
[ "195b6828d7c147c42fc62a59c97076b597bd590d" ]
[ "merlion/models/forecast/seq_ar_common.py" ]
[ "#\n# Copyright (c) 2022 salesforce.com, inc.\n# All rights reserved.\n# SPDX-License-Identifier: BSD-3-Clause\n# For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause\n#\nimport numpy as np\nfrom merlion.utils.time_series import TimeSeries\nfrom merlion.transf...
[ [ "numpy.expand_dims", "numpy.min", "numpy.median", "numpy.concatenate", "numpy.atleast_2d", "numpy.max", "numpy.std", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
senecal-jjs/DQN-Keras
[ "511ee52ab089b1a628260d811e9cae115ca3577c" ]
[ "rl/agents/dqn.py" ]
[ "from __future__ import division\nimport warnings\n\nimport keras.backend as K\nfrom keras.models import Model\nfrom keras.layers import Lambda, Input, Layer, Dense\n\nfrom rl.core import Agent\nfrom rl.policy import EpsGreedyQPolicy, GreedyQPolicy\nfrom rl.util import *\n\n\ndef mean_q(y_true, y_pred):\n return...
[ [ "tensorflow.transpose", "tensorflow.concat", "tensorflow.scan", "tensorflow.shape", "tensorflow.gather" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
szkafander/scipy
[ "e26f17b303121eaefb2d66147236696452fcb887" ]
[ "scipy/interpolate/_cubic.py" ]
[ "\"\"\"Interpolation algorithms using piecewise cubic polynomials.\"\"\"\n\nimport numpy as np\n\nfrom . import PPoly\nfrom .polyint import _isscalar\nfrom scipy.linalg import solve_banded, solve\n\n\n__all__ = [\"CubicHermiteSpline\", \"PchipInterpolator\", \"pchip_interpolate\",\n \"Akima1DInterpolator\...
[ [ "numpy.abs", "numpy.isfinite", "numpy.allclose", "numpy.asarray", "numpy.issubdtype", "numpy.sign", "numpy.max", "scipy.linalg.solve", "numpy.diff", "numpy.any", "numpy.zeros_like", "numpy.moveaxis", "numpy.errstate", "numpy.zeros", "scipy.linalg.solve_b...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "0.12", "0.14", "0.15" ], "tensorflow": [] } ]