repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
possible_versions
list
sparshk/movie_recommender_system
[ "473409f4d569291ab1badccd16c92e575ca487a5" ]
[ "movie_rs/item_item.py" ]
[ "import pandas as pd\nimport numpy as np\nimport sqlite3\nfrom sqlalchemy import create_engine\nengine=create_engine(\"postgres://postgres:25736534@localhost:5432/postgres\")\n\ndef calculateitem(x):\n db=sqlite3.connect('db.sqlite3')\n movies = pd.read_sql_query(\"SELECT * FROM movies\", engine)\n ratings...
[ [ "pandas.read_sql_query", "pandas.Series" ] ]
[ { "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": [] } ]
lanetszb/dfvm
[ "c6154ba23c4e145fa6889c04f97b69972163f59c" ]
[ "cfd.py" ]
[ "# MIT License\n#\n# Copyright (c) 2020 Aleksandr Zhuravlyov and Zakhar Lanets\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 th...
[ [ "numpy.arange", "matplotlib.pyplot.subplots", "numpy.tile", "numpy.random.rand", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
GautierArcin/SAMI
[ "1c262a18de57dd7d1d059cc21e4a7aaac54fe6a9" ]
[ "tools/pase_score.py" ]
[ "import itertools\nimport torch\nimport torch.nn.functional as F\nimport numpy as np\nimport pickle\n\nfrom tools.functional import PreProcess\n\n\ndef pase_score(model, dataloader, al_gt, norm=\"l1\", norm_approach=\"all\", device=\"cpu\", save_controls_parameters=True):\n \"\"\"Inspired from the inception scor...
[ [ "torch.nn.functional.softmax", "numpy.unique", "torch.cat", "torch.no_grad", "torch.log" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ReneHollander/elastiknn
[ "d86eecc7bb319cd8a1d6b9aa6279f299cec2e556" ]
[ "client-python/elastiknn/utils.py" ]
[ "\nfrom random import Random\nfrom typing import List, Iterator, Union\n\nimport numpy as np\nfrom scipy.sparse import csr_matrix\n\nfrom elastiknn.api import Vec\n\n_rng = Random(0)\n\nvalid_metrics_algos = [\n ('exact', 'l1'),\n ('exact', 'l2'),\n ('exact', 'angular'),\n ('exact', 'hamming'),\n ('e...
[ [ "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
blchu/sockeye
[ "28044a44ee409c9b3df1711c0b16bdebdd463b2e" ]
[ "sockeye/scoring_pt.py" ]
[ "# Copyright 2018--2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You may not\n# use this file except in compliance with the License. A copy of the License\n# is located at\n#\n# http://aws.amazon.com/apache2.0/\n#\n# or in t...
[ [ "torch.zeros_like", "torch.jit.trace", "torch.inference_mode", "torch.cat" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
gabrielarpino/grouptesting
[ "32e48a019ccf099b8672a3e0daba3313dd3b6512" ]
[ "grouptesting/algorithms.py" ]
[ "import numpy as np\nfrom scipy.stats import bernoulli\n\n# Outline of algorithms: https://www.wikiwand.com/en/Group_testing\n\ndef NDD(X, y, pi=0.5, alpha=0.5, T = 100, d = 10):\n \"\"\" NDD for z-channel noise as in http://export.arxiv.org/pdf/1808.09143.\n Pi has to be in (rho, 1). \"\"\"\n\n sigma_hat = np.z...
[ [ "numpy.reshape", "numpy.arange", "numpy.setdiff1d", "numpy.ones", "numpy.where", "numpy.zeros", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Sharry-zai/tensorflow_makefile
[ "7d9ab3eb485e6eb1778bad4ef01a1cd95b2d22d9", "7d9ab3eb485e6eb1778bad4ef01a1cd95b2d22d9" ]
[ "tensorflow/examples/skflow/mnist.py", "tensorflow/contrib/learn/python/learn/utils/checkpoints_test.py" ]
[ "# Copyright 2015-present The Scikit Flow 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# ...
[ [ "tensorflow.contrib.learn.TensorFlowEstimator", "tensorflow.nn.max_pool", "tensorflow.reshape", "tensorflow.contrib.learn.models.logistic_regression", "tensorflow.contrib.learn.ops.dnn", "tensorflow.contrib.learn.TensorFlowLinearClassifier", "tensorflow.variable_scope", "tensorflow...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
tcastrosantos/biotas
[ "f1bec5a2f018a4a2b008116add59f29663df6211" ]
[ "scripts/Classify_3.py" ]
[ "# import modules required for function dependencies\nimport time\nimport os\nimport sqlite3\nimport pandas as pd\nimport biotas\nimport warnings\nwarnings.filterwarnings('ignore')\ntS = time.time()\n#set script parameters\nclass_iter= 5 #Enter the iteration number here--start at 2\nsite = '14' ...
[ [ "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": [] } ]
ridgei/MCD_DA
[ "d8d40774aeabd72df73190c9dc1980f9239df128" ]
[ "classification/model/syn2gtrsb.py" ]
[ "import torch.nn as nn\nimport torch.nn.functional as F\nfrom classification.model.grad_reverse import grad_reverse\n\n\nclass Feature(nn.Module):\n def __init__(self):\n super(Feature, self).__init__()\n self.conv1 = nn.Conv2d(3, 96, kernel_size=5, stride=1, padding=2)\n self.bn1 = nn.Batch...
[ [ "torch.nn.BatchNorm1d", "torch.nn.functional.dropout", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.BatchNorm2d" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
XiaoJake/up-detr
[ "97fee88358ad2bdfcc6e3d4fa6892b4600fae089" ]
[ "util/plot_utils.py" ]
[ "# ------------------------------------------------------------------------\n# UP-DETR\n# Copyright (c) Tencent, Inc. and its affiliates. All Rights Reserved.\n# ------------------------------------------------------------------------\n# Modified from DETR (https://github.com/facebookresearch/detr)\n# Copyright (c)...
[ [ "matplotlib.pyplot.subplots", "torch.load" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ImageGuidedTherapyLab/Mask_RCNN
[ "e95c4b2fc77ad5585f8b39d79aa26dbbeeac9619" ]
[ "samples/shapes/train_shapes.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# # Mask R-CNN - Train on Shapes Dataset\n# \n# \n# This notebook shows how to train Mask R-CNN on your own dataset. To keep things simple we use a synthetic dataset of shapes (squares, triangles, and circles) which enables fast training. You'd still need a GPU, though, be...
[ [ "numpy.logical_not", "numpy.random.seed", "numpy.random.choice", "numpy.arange", "matplotlib.pyplot.subplots", "numpy.ones", "numpy.array", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
bodylabs/lace
[ "75cee6a118932cd027692d6cfe36b3726b3a4a5c" ]
[ "lace/serialization/wrl.py" ]
[ "# pylint: disable=len-as-condition\n__all__ = ['load', 'ParseError']\n\nclass ParseError(Exception):\n pass\n\ndef load(f, existing_mesh=None):\n from baiji.serialization.util.openlib import ensure_file_open_and_call\n return ensure_file_open_and_call(f, _load, mode='rb', mesh=existing_mesh)\n\ndef _load(...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Lorenzo-Perini/TransferContamination
[ "9d366d3f9d5ba222a4db9bcc537456386c344e67" ]
[ "TrADe.py" ]
[ "import matplotlib.pyplot as plt\nimport pandas as pd\nimport numpy as np\nimport random\nfrom scipy.stats.kde import gaussian_kde\nfrom sklearn.metrics import f1_score\nfrom scipy.optimize import differential_evolution\nfrom pyod.models.knn import KNN\nfrom pyod.models.lof import LOF\nfrom pyod.models.iforest impo...
[ [ "numpy.dot", "scipy.optimize.differential_evolution", "numpy.random.seed", "numpy.unique", "scipy.stats.kde.gaussian_kde", "numpy.arange", "numpy.argmin", "numpy.argpartition", "sklearn.metrics.f1_score", "numpy.zeros", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "1.6", "0.15", "1.4", "1.3", "0.19", "1.5", "0.18", "1.2", "1.7", "1.0", "0.17", "0.16" ], "tensorflow": [] } ]
paulinelemenkova/Python-script-006-Strip-Plot
[ "0bbe5b1fa2dbbd04d324476045eafdc49af1bd2f" ]
[ "Script-006-Strip-SUBPLOT-Phil.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\nimport os\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pylab as pylab\nfrom matplotlib import pyplot as plt\nimport matplotlib.artist as martist\nfrom matplotlib.offsetbox import AnchoredText\nimport seaborn as sb\n\nos.chdir('/Users/pauline/Documents/Python')...
[ [ "matplotlib.pyplot.legend", "matplotlib.pylab.rcParams.update", "pandas.read_csv", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.title", "numpy.arange", "matplotlib.pyplot.subplots_adjust", "matplotlib.offsetbox.AnchoredText", "matplotlib.pyplot.xlabel", "matplotlib....
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
schuetzgroup/fret-analysis
[ "a74df8e3ffbfb709e2defa00fea79c94223ebd3c" ]
[ "smfret_analysis/tracker.py" ]
[ "# SPDX-FileCopyrightText: 2020 Lukas Schrangl <lukas.schrangl@tuwien.ac.at>\n#\n# SPDX-License-Identifier: BSD-3-Clause\n\n\"\"\"Provide :py:class:`Tracker` as a Jupyter notebook UI for smFRET tracking\"\"\"\nimport collections\nimport contextlib\nimport itertools\nfrom pathlib import Path\nfrom typing import Any,...
[ [ "pandas.concat", "numpy.nonzero", "numpy.unique", "matplotlib.pyplot.subplots", "pandas.DataFrame", "numpy.array" ] ]
[ { "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": [] } ]
PranavAmarnath/Fatal-Journeys
[ "f3635353fa987f139713e6f483a924c5d2b807dc" ]
[ "FatalJourneys.py" ]
[ "'''Pranav Amarnath - Fatal Journeys Project'''\nimport numpy as np\nfrom mpl_toolkits.basemap import Basemap\nimport matplotlib.pyplot as plt\n#from matplotlib import style # for style (line #12)\nimport pandas as pd\n#from pandas.plotting import register_matplotlib_converters # -> for scatter plots\nimport os\n#...
[ [ "matplotlib.pyplot.imshow", "pandas.read_csv", "matplotlib.pyplot.title", "matplotlib.pyplot.gcf", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.axis", "matplotlib.pyplot.bar", "pandas.DataFrame.from_dict", "matplotlib.pyplot.xlabel", "numpy.array", "matplotlib.pyplot....
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
ymalitsky/graal
[ "c0366e96a0e6ad8463a03ab94db66ebeab0fc55e" ]
[ "sparse_logistic_regression/sparse_logistic_regression.py" ]
[ "# A collection of algorithms to solve sparse logistic regression. The\n# following algorithms are implemented: proximal gradient, FISTA, and\n# adaptive Golden Ratio algorithm.\n\n\n__author__ = \"Yura Malitsky\"\n__license__ = \"MIT License\"\n__email__ = \"y.malitsky@gmail.com\"\n__status__ = \"Development\"\n\...
[ [ "numpy.sqrt", "numpy.clip", "sklearn.datasets.load_svmlight_file", "scipy.sparse.linalg.svds", "numpy.random.randn", "scipy.linalg.norm", "numpy.array", "numpy.exp", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "0.12", "0.14", "0.15" ], "tensorflow": [] } ]
abhinavg97/pytorch-lightning
[ "7c4f80a1afe3d7b0f1e9ee834aacaf8439195cdf" ]
[ "tests/metrics/classification/test_accuracy.py" ]
[ "import numpy as np\nimport pytest\nimport torch\nfrom sklearn.metrics import accuracy_score\n\nfrom pytorch_lightning.metrics.classification.accuracy import Accuracy\nfrom tests.metrics.classification.inputs import (\n _binary_inputs,\n _binary_prob_inputs,\n _multiclass_inputs,\n _multiclass_prob_inpu...
[ [ "torch.manual_seed", "torch.rand", "sklearn.metrics.accuracy_score" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
tigerneil/GraphGym
[ "05f749900ef07029a127dc36e74e43f4d0eb1a06" ]
[ "graphgym/models/feature_augment.py" ]
[ "import logging\nimport networkx as nx\nimport numpy as np\nimport torch\nimport torch.nn as nn\n\nfrom deepsnap.graph import Graph\n\nfrom graphgym.config import cfg\nfrom graphgym.contrib.transform.identity import compute_identity\n\nimport graphgym.models.register as register\n\n\ndef _key(key, as_label=False):\...
[ [ "torch.ones", "numpy.linspace", "torch.cat", "torch.randperm", "numpy.min", "numpy.unique", "numpy.arange", "numpy.sort", "torch.tensor", "numpy.concatenate", "numpy.max", "torch.arange", "numpy.digitize", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
IBM/spatial
[ "215f873f8de9df040e2e28469f4c0ffcc93f1d2a" ]
[ "deep_learning_experiments/functions.py" ]
[ "import pandas as pd\nimport numpy as np\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nimport time\nfrom keras import callbacks\nfrom keras.models import Sequential\nfrom keras.layers import Dense, LSTM, Bidirectional, Conv1D, Conv2D, Flatten, MaxPooling1D, MaxPooling2D, Masking, AveragePooling2D\nimport...
[ [ "matplotlib.pyplot.legend", "scipy.interpolate.UnivariateSpline", "numpy.log", "numpy.abs", "numpy.linspace", "numpy.min", "matplotlib.pyplot.title", "pandas.Series", "matplotlib.pyplot.plot", "numpy.max", "numpy.std", "numpy.mean", "numpy.array", "matplotli...
[ { "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": [ "1.7", "1.0", "0.10", "1.2", "0.1...
Yoctol/ADEM
[ "89b0f3a6497137b88bdaeab80b68dc9497ec94fa" ]
[ "test/test_model_adem_with_encoder.py" ]
[ "import numpy as np\nimport tensorflow as tf\n\nfrom ADEM.model_adem_with_encoder import *\n\n\nclass ModelAdemWithEncoderTest(tf.test.TestCase):\n\n def setUp(self):\n self.context_encoder = {\n 'name': 'lstm_context_encoder',\n 'params': {'utterence_level_state_size': 50,\n ...
[ [ "tensorflow.global_variables_initializer", "numpy.array", "tensorflow.reset_default_graph" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
aelamspychron/pychron
[ "ad87c22b0817c739c7823a24585053041ee339d5", "ad87c22b0817c739c7823a24585053041ee339d5", "1a81e05d9fba43b797f335ceff6837c016633bcf" ]
[ "pychron/mv/locator.py", "pychron/pipeline/plot/plotter/spectrum.py", "pychron/pipeline/plot/plotter/xy_scatter.py" ]
[ "# Copyright 2012 Jake Ross\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to i...
[ [ "numpy.ones_like", "numpy.invert", "numpy.nonzero", "numpy.asarray", "scipy.ndimage.distance_transform_edt", "scipy.ndimage.label", "numpy.max", "numpy.argmax", "numpy.mean", "numpy.array", "numpy.zeros" ], [ "numpy.hstack", "numpy.array" ], [ "numpy...
[ { "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"...
lbin/fast-reid
[ "57ee0ebca4cb67e90806ee988364a58a737a3301" ]
[ "fastreid/modeling/meta_arch/mgn.py" ]
[ "# encoding: utf-8\n\"\"\"\n@author: liaoxingyu\n@contact: sherlockliao01@gmail.com\n\"\"\"\nimport copy\n\nimport torch\nfrom torch import nn\n\nfrom fastreid.layers import GeneralizedMeanPoolingP, get_norm, AdaptiveAvgMaxPool2d, FastGlobalAvgPool2d\nfrom fastreid.modeling.backbones import build_backbone\nfrom fa...
[ [ "torch.nn.Sequential", "torch.nn.AdaptiveMaxPool2d", "torch.Tensor", "torch.cat", "torch.nn.Conv2d", "torch.nn.Identity", "torch.chunk", "torch.nn.ReLU" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
j-pedrofag/SEII-JoaoPedroSilvaFagundes
[ "d3d837fc06281fd189c02fe36713f6c6581ca779" ]
[ "Semana02/matplot01.py" ]
[ "import matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\n\n\nx = [0,1,2,3,4]\ny = [0,2,4,6,8]\n\n# Resize your Graph (dpi specifies pixels per inch. When saving probably should use 300 if possible)\nplt.figure(figsize=(8,5), dpi=100)\n\n# Line 1\n\n# Keyword Argument Notation\n#plt.plot(x,y, label...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "numpy.arange", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.xticks", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ftalbrecht/simdb
[ "30a73f578d64a9ff9ed69cade86331eb7f472432" ]
[ "simdb/run.py" ]
[ "# -*- coding: utf-8 -*-\n# Copyright (c) 2014, 2015, Stephan Rave\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# * Redistributions of source code must retain the above copyright no...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
shirtsgroup/cg_pyrosetta
[ "bf69737e9bd88735e17c48629b9bc420e5ca2024" ]
[ "simulations/benchmarking2021/CG10x3/init.py" ]
[ "import signac\nimport numpy as np\nimport os\nimport shutil as sh\n\nproject = signac.get_project()\n\nnmer_lengths = np.array([3, 4, 5, 6, 7, 8, 9, 10, 11, 12])\nreps = 20\n\nfor nmer_length in nmer_lengths:\n for rep in range(reps):\n job = project.open_job({'nmer' : nmer_length, 'rep' : rep})\n ...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
GuillaumeZahnd/arctic-circle
[ "c8f8a4f1b231da104ad95cddca4c83c18f352161" ]
[ "generate_room.py" ]
[ "import sys\nimport os\nimport numpy as np\nimport random\nimport time\nimport pickle\nimport fitness\nfrom display_room import display_room\nimport fitness\nfrom utils import print_iter_msg\nfrom utils import stopwatch\n\n\n# ----------------------------------------------------------------\n# Generate the room, fr...
[ [ "numpy.ceil", "numpy.ones", "numpy.zeros", "numpy.argwhere" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
georgedeath/egreedy
[ "0dad35e0d584cf7c46c9a8cb0445f225875cfa86" ]
[ "egreedy/test_problems/Exeter_CFD_Problems/data/support.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib.path import Path\nimport re\nfrom stl import mesh\nfrom mpl_toolkits import mplot3d\nimport subprocess\nimport pickle\n#from deap import creator, base\n\nimport shutil\n\n###########################################################################...
[ [ "numpy.dot", "numpy.linspace", "numpy.random.random_sample", "numpy.concatenate", "matplotlib.pyplot.plot", "matplotlib.pyplot.axes", "numpy.max", "numpy.argmin", "numpy.polynomial.chebyshev.Chebyshev", "numpy.arange", "numpy.sin", "matplotlib.pyplot.Circle", "n...
[ { "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" ...
jeffreygrover/Cirq
[ "17d94cf45f6b09ddf40048ddbb173e50fa293995" ]
[ "cirq/ops/clifford_gate.py" ]
[ "# Copyright 2018 The Cirq Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law o...
[ [ "numpy.eye" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Karthik-Ragunath/DDU
[ "b9daae9304bdeb222857884ef8cb3b6b3d004d33" ]
[ "data/ood_detection/cifar10.py" ]
[ "\"\"\"\nCreate train, valid, test iterators for CIFAR-10.\nTrain set size: 45000\nVal set size: 5000\nTest set size: 10000\n\"\"\"\n\nimport torch\nimport numpy as np\nfrom torch.utils.data import Subset\n\nfrom torchvision import datasets\nfrom torchvision import transforms\n\n\ndef get_train_valid_loader(batch_s...
[ [ "numpy.random.seed", "torch.utils.data.DataLoader", "numpy.random.shuffle", "numpy.floor", "torch.utils.data.Subset" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
drtonyr/timeFromNPL
[ "00da1ee81dbf62241396e691d31a34be699e7a0f" ]
[ "MSF60decoder.py" ]
[ "#!/usr/bin/python3\n\n# Extract the MSF time code from a WAV (RIFF WAVE) file\n# Reference: https://en.wikipedia.org/wiki/Time_from_NPL_(MSF)\n\n# Licensed under the Apache License, Version 2.0\n# http://www.apache.org/licenses/LICENSE-2.0\n\nimport os\nimport sys\nimport datetime\nimport numpy as np\nimport scipy...
[ [ "numpy.dot", "numpy.sqrt", "numpy.cos", "numpy.sin", "numpy.empty" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Cedric-LG/zarr-python
[ "89659b2cb72247dd6532dacb889897db78518a95" ]
[ "zarr/creation.py" ]
[ "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, print_function, division\nfrom warnings import warn\n\n\nimport numpy as np\n\n\nfrom zarr.core import Array\nfrom zarr.storage import (DirectoryStore, init_array, contains_array, contains_group,\n default_compressor, normali...
[ [ "numpy.array", "numpy.asanyarray" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jonathanlunt/disdat
[ "645d7544f1061f0cfb432c4d5ae8d8768bead9c1" ]
[ "disdat/db_target.py" ]
[ "#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# dis...
[ [ "pandas.DataFrame.from_records", "pandas.read_sql" ] ]
[ { "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": [] } ]
KevinYuan666/rpg_trajectory_evaluation
[ "fbdf7001c6bab09d89c3219f6b46eba3e843fbb8" ]
[ "scripts/analyze_trajectories.py" ]
[ "#!/usr/bin/env python2\n\nimport os\nimport argparse\nimport yaml\nimport shutil\nimport json\nfrom datetime import datetime\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib import rc\nfrom colorama import init, Fore\n\nimport add_path\nfrom trajectory import Trajectory\nimport plot_utils as...
[ [ "matplotlib.pyplot.legend", "numpy.abs", "numpy.linspace", "matplotlib.pyplot.sca", "matplotlib.pyplot.close", "matplotlib.rc", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
guillaumelorre28/anomaly_detection
[ "cffb91208d7c27b7cbe02a511eb6d4455835d1fd" ]
[ "anomaly_detection/padim.py" ]
[ "import os\nimport json\nimport pickle\nimport numpy as np\nfrom scipy import spatial\nimport matplotlib.pyplot as plt\nfrom sklearn import metrics\nimport imageio\nfrom skimage.transform import resize\n\neps = 0.01\nn_features = 100\npath = '/media/guillaume/Data/data/multiscale_features/resnet50/bottle'\ngt_path ...
[ [ "matplotlib.pyplot.imshow", "numpy.take", "numpy.concatenate", "numpy.max", "numpy.mean", "numpy.reshape", "numpy.arange", "numpy.eye", "scipy.spatial.distance.mahalanobis", "numpy.zeros", "numpy.min", "numpy.linalg.inv", "sklearn.metrics.roc_curve", "numpy....
[ { "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" ...
namanahuja/ParlAI
[ "7c294d523428fa29f8cb9824664752022f534cd7" ]
[ "parlai/agents/transformer/modules.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates.\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\n\"\"\"\nImplements NN code for transformers.\n\nOriginal paper: https://arxiv.org/abs/1706.03762. (Vaswani, 2017). The\n`Annotated Tran...
[ [ "torch.nn.Softmax", "torch.nn.functional.softmax", "numpy.sqrt", "torch.nn.Embedding", "torch.nn.Dropout", "torch.nn.CosineSimilarity", "numpy.sin", "torch.bmm", "torch.arange", "torch.nn.functional.linear", "torch.index_select", "torch.LongTensor", "numpy.power...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
enricsoler/docs
[ "25c6c00b196c274138778c4e8f227a703dec60f6" ]
[ "tools/tensorflow_docs/plots/__init__.py" ]
[ "# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "numpy.convolve", "matplotlib.pyplot.legend", "numpy.ones_like", "numpy.linspace", "matplotlib.pyplot.grid", "numpy.exp", "matplotlib.pyplot.xlabel", "numpy.array", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
godheeran/Machine-Drawing-OCR-CRNN
[ "b9b783036cced7921d46f273471e92e95be194c4" ]
[ "cnn_blstm_otc_ocr.py" ]
[ "\"\"\"\n\"\"\"\n\nimport tensorflow as tf\nimport utils\n\nFLAGS = utils.FLAGS\nnum_classes = utils.num_classes\n\n\nclass LSTMOCR(object):\n def __init__(self, mode):\n self.mode = mode\n # image\n self.inputs = tf.placeholder(tf.float32, [None, FLAGS.image_height, FLAGS.image_width, FLAGS...
[ [ "tensorflow.sparse_placeholder", "tensorflow.nn.max_pool", "tensorflow.nn.ctc_beam_search_decoder", "tensorflow.nn.bidirectional_dynamic_rnn", "tensorflow.train.AdamOptimizer", "tensorflow.group", "tensorflow.summary.scalar", "tensorflow.nn.conv2d", "tensorflow.train.get_or_cre...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.4", "1.5", "1.7", "1.0", "1.2" ] } ]
arcada-uas/intro-to-dl
[ "675741ad123e88158ecab88f887ea31113c99e7a" ]
[ "day2/tf2-dvc-cnn-evaluate.py" ]
[ "# coding: utf-8\n\n# # Dogs-vs-cats classification with CNNs\n# \n# This script is used to evaluate neural networks trained using\n# TensorFlow 2 / Keras to classify images of dogs from images of cats.\n#\n# **Note that using a GPU with this notebook is highly recommended.**\n#\n# First, the needed imports.\n\nimp...
[ [ "tensorflow.keras.models.load_model", "tensorflow.data.Dataset.from_tensor_slices", "tensorflow.keras.utils.custom_object_scope", "tensorflow.keras.backend.backend", "tensorflow.image.resize", "tensorflow.io.read_file", "tensorflow.image.decode_jpeg" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
ryanfobel/grocery-helpers
[ "1b753316cfd6ff6457e05deb8b3fca86b3ac5f5f" ]
[ "src/grocery_helpers/flyers.py" ]
[ "import requests\nimport os\nimport glob\n\nimport pandas as pd\nimport arrow\n\n\nBASE_URL = 'https://flipp.com'\nBACKEND_URL = 'https://backflipp.wishabi.com/flipp'\nSEARCH_URL = '%s/items/search' % BACKEND_URL\nITEM_URL = '%s/items/' % BACKEND_URL\n\n\ndef scrape_item(item_id):\n return requests.get(\n ...
[ [ "pandas.read_csv", "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
kipoujr/no_repetition
[ "f7c881b2140b2607a97b0910acbcb9c86e77b07e" ]
[ "scripts/standard-plots.py" ]
[ "import matplotlib.pyplot as plt\r\nimport numpy as np\r\nimport glob, os\r\n\r\n#nBins = int(input('Give number of bins: '))\r\nnBins = 10000\r\n\r\ni = 0\r\nn = 0\r\nfor fl in glob.glob(\"*.txt\"):\r\n n += 1\r\nprint(str(n) + \" folders/colors.\")\r\ncolor=iter(plt.cm.rainbow(np.linspace(0,1,n))) #set of n colo...
[ [ "matplotlib.pyplot.legend", "numpy.linspace", "numpy.cumsum", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "numpy.histogram" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mtreinish/qiskit-aer
[ "ef2e910b474379bb3a6f45e1b4f42cc3dc39c0c0" ]
[ "test/terra/utils/ref_initialize.py" ]
[ "# -*- coding: utf-8 -*-\n\n# Copyright 2019, IBM.\n#\n# This source code is licensed under the Apache License, Version 2.0 found in\n# the LICENSE.txt file in the root directory of this source tree.\n\n\"\"\"\nTest circuits and reference outputs for initialize instruction.\n\"\"\"\n\nfrom numpy import array, sqrt\...
[ [ "numpy.array", "numpy.sqrt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
oliver306/TREE
[ "fc0d6159c2350d354051e3985357038bb7bf089c" ]
[ "src/Colorizer.py" ]
[ "import networkx as nx\nimport matplotlib.pyplot as plt\nimport matplotlib.colors as colors\nimport matplotlib.cm as cmx\n\ndef mycmap(cm, i):\n if i > 0:\n return cm.colors[i % len(cm.colors)]\n elif i == 0:\n return \"lightgrey\"\n elif i == -1:\n return \"black\"\n\n#plot graph and ...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "matplotlib.pyplot.cm.get_cmap", "matplotlib.pyplot.cla", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Anthchirp/cctbx
[ "b8064f755b1dbadf05b8fbf806b7d50d73ef69bf" ]
[ "xfel/command_line/filter_experiments_by_rmsd.py" ]
[ "#!/usr/bin/env python\n# -*- mode: python; coding: utf-8; indent-tabs-mode: nil; python-indent: 2 -*-\n#\n# filter_experiments_by_rmsd.py\n#\n# Copyright (C) 2016 Lawrence Berkeley National Laboratory (LBNL)\n#\n# Author: Aaron Brewster and David Waterman\n#\n# This code is distributed under the X license, a co...
[ [ "matplotlib.pyplot.boxplot", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
xianpf/CenterMask
[ "287111f4abd58df356e7899a22bf47d23647ee72" ]
[ "maskfirst/old_version_do_train_net/do_train_net_v2.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\nr\"\"\"\nBasic training script for PyTorch\n\"\"\"\n\n# Set up custom environment before nearly anything else is imported\n# NOTE: this should be the first import (no not reorder)\nfrom maskrcnn_benchmark.utils.env import setup_environment #...
[ [ "torch.cat", "torch.nn.SyncBatchNorm.convert_sync_batchnorm", "torch.no_grad", "numpy.mean", "torch.nn.functional.interpolate", "torch.device", "torch.distributed.get_rank", "numpy.where", "torch.distributed.init_process_group", "torch.tensor", "torch.nonzero", "num...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
juice1000/pytorch-A3C
[ "8f16737e4b678d38908c7ff4953be8be44359a24" ]
[ "VIZDOOM/shared_adam.py" ]
[ "\"\"\"\nShared optimizer, the parameters in the optimizer will shared in the multiprocessors.\n\"\"\"\n\nimport torch\n\n\nclass SharedAdam(torch.optim.Adam):\n def __init__(self, params, lr=1e-3, betas=(0.9, 0.99), eps=1e-8,\n weight_decay=0):\n super(SharedAdam, self).__init__(params, l...
[ [ "torch.zeros_like" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kikefdezl/Object-Detection-Metrics
[ "759c1e0d3ced40bb10c1b41b560d2315d3740b39" ]
[ "lib/Evaluator.py" ]
[ "\"\"\"\n30-09-2021\nIoU function modified by Enrique Fernández-Laguilhaot to apply smart IoU, for small detections inside excessively large\ngroundtruths.\n\"\"\"\n\n###########################################################################################\n# ...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.pause", "numpy.linspace", "matplotlib.pyplot.ylim", "numpy.cumsum", "numpy.argwhere", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlim", "matplotlib.pyplot.close", "matplotlib.pyplot.grid", "matplotlib.pyplot.xlabel", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
BasianLesi/Master-Thesis
[ "3417ab9d4f05e23da16203374fe9aaf20e51fab1" ]
[ "src/weatherAPI/weather_data.py" ]
[ "import requests\nimport json\nfrom datetime import datetime\nimport os\nimport sys\nimport pandas as pd\nimport numpy as np\n\nSCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))\nsys.path.append(os.path.dirname(SCRIPT_DIR))\n\nfrom global_variables import config as g\nROOT_DIR = g.ROOT_DIR\nprocessed_data_dir...
[ [ "pandas.read_csv", "pandas.to_datetime", "numpy.cos", "pandas.DataFrame", "numpy.sin" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
anurag9598/ga-learner-dsb-repo
[ "244a8f47b63389f90270e430c4c3be67140c594c" ]
[ "Loan-Approval-Analysis-/code.py" ]
[ "# --------------\n# Import packages\nimport numpy as np\nimport pandas as pd\nfrom scipy.stats import mode \n \n\n\n\n# code starts here\nbank = pd.read_csv(path)\nbank = pd.DataFrame(bank)\n\ncategorical_var = bank.select_dtypes(include = 'object')\nprint(categorical_var)\nnumerical_var = bank.select_dtypes(inclu...
[ [ "pandas.read_csv", "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
Shiien/verify_rl_torch
[ "45866609ac55fcf99aaaa89df94573acf35580d2" ]
[ "utils/ppg_roller.py" ]
[ "from collections import defaultdict\n\nimport numpy as np\nimport torch as th\n#\n# from . import torch_util as tu\n# from .tree_util import tree_map\nfrom envs.vec_monitor import VecMonitor2\n\nclass Roller:\n def __init__(\n self,\n *,\n venv: \"(VecEnv)\",\n act_fn: \"ob, state_in...
[ [ "torch.stack", "numpy.stack", "torch.cat" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zengshh/stanford-tensorflow-tutorial
[ "69b60ae57fe7e320238b496103b6d85081b5a508" ]
[ "examples/07_convnet_mnist_starter.py" ]
[ "\"\"\" Using convolutional net on MNIST dataset of handwritten digits\nMNIST dataset: http://yann.lecun.com/exdb/mnist/\nCS 20: \"TensorFlow for Deep Learning Research\"\ncs20.stanford.edu\nChip Huyen (chiphuyen@cs.stanford.edu)\nLecture 07\n\"\"\"\n\"\"\" \nThis program reveal the whole procedure of building\\tra...
[ [ "tensorflow.nn.softmax_cross_entropy_with_logits", "tensorflow.nn.max_pool", "tensorflow.cast", "tensorflow.train.AdamOptimizer", "tensorflow.get_default_graph", "tensorflow.summary.scalar", "tensorflow.nn.conv2d", "tensorflow.Variable", "tensorflow.truncated_normal_initializer...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
fred-laberge/scilpy
[ "b0055521a87eb803876b8122eddc77608f520e89", "b0055521a87eb803876b8122eddc77608f520e89" ]
[ "scripts/scil_compute_connectivity.py", "scilpy/image/utils.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\nCompute a connectivity matrix from a tractogram and a parcellation.\n\nCurrent strategy is to keep the longest streamline segment connecting\n2 regions. If the streamline crosses other gray matter regions before\nreaching its final connected region, the kep...
[ [ "numpy.zeros", "numpy.mean" ], [ "numpy.absolute", "numpy.count_nonzero" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jamitzky/api_python3
[ "c52f120360529b596cfec56f651aabcd3bfceee4" ]
[ "jcore.py" ]
[ "# routines to access J from python3 - used by jbase.py\n\nfrom jbase import pathbin,pathdll,pathpro\nfrom ctypes import *\nimport numpy as np\n\njt= 0\n\ndef tob(s):\n if type(s) is str:\n s= s.encode('utf-8')\n return s\n\ndef init(loadprofile=True):\n global libj,jt\n if jt!=0:\n raise AssertionError('J: init ...
[ [ "numpy.asarray", "numpy.prod" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
eghouti/SAL
[ "536cbfbbaa10422fa5bceb8a870eac4bdab8e6ea" ]
[ "imagenet/resnet_SAL.py" ]
[ "import torch.nn as nn\nimport torch.utils.model_zoo as model_zoo\nimport parameters\nimport torch.nn.functional as F\nif parameters.args.shared:\n print(\"shared\")\n import satshared as sat\nelse:\n print(\"not shared\")\n import sat\n\n__all__ = ['ResNet', 'resnet18', 'resnetW', 'resnet50', 'resnet10...
[ [ "torch.nn.Sequential", "torch.nn.init.constant_", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.AvgPool2d", "torch.nn.functional.relu", "torch.nn.BatchNorm2d", "torch.nn.ReLU", "torch.utils.model_zoo.load_url", "torch.nn.init.kaiming_normal_" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jpzwolak/quantum-ml
[ "aebe3496516be3bc0fc4392aaf7805ab5faf98dc" ]
[ "cluster_scripts/dd.py" ]
[ "# This is a script to generate a single 2D map of double dot system \n\nimport numpy as np\nimport imp\nimport sys\nimport os\nimport time\n\nsys.path.append('/Users/sandesh/repos/quantum-ml/nanowire_model')\nimport physics\nimport potential_profile\nimport markov\nimport exceptions\nimp.reload(physics)\nimp.reloa...
[ [ "numpy.random.uniform", "numpy.save", "numpy.abs", "numpy.linspace" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jduerholt/botorch
[ "82c9add3e943b28bd0a42438cfcaa1a70440c0c2" ]
[ "botorch/models/gpytorch.py" ]
[ "#!/usr/bin/env python3\n# Copyright (c) Meta Platforms, Inc. and affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nr\"\"\"\nAbstract model class for all GPyTorch-based botorch models.\n\nTo implement your own, simply inhe...
[ [ "torch.Size", "torch.is_tensor", "torch.tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
max-schaefer-dev/cloud_model
[ "914b6f2bf17648edcde646a6f38fbc69c8e01226" ]
[ "train.py" ]
[ "from cloud_model import CloudModel\n\nfrom pytorch_lightning.utilities.seed import seed_everything\n\nimport argparse\nimport yaml\nimport os\nimport pandas as pd\nimport albumentations as A\nimport torch\nfrom pathlib import Path\n\nfrom utils.config import dict2cfg, cfg2dict\nfrom utils.prepare_data import prepa...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
colinsongf/T-DNA
[ "b8ecd55c32762ffcda36e8adfd2041dc349fd279" ]
[ "examples/run_classification.py" ]
[ "# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.\n# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may...
[ [ "torch.distributed.init_process_group", "torch.cuda.set_device", "numpy.squeeze", "torch.from_numpy", "numpy.argmax", "torch.cuda.is_available", "torch.device", "numpy.load", "torch.cuda.device_count" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
drigoni/ComparisonsDGM
[ "0a26e9f9d9aba7df0525a22da6eeab376464d19d" ]
[ "_utils/smile_metrics.py" ]
[ "import pickle\nimport gzip\nfrom rdkit import DataStructs\nfrom rdkit import Chem\nfrom rdkit.Chem import QED\nfrom rdkit.Chem import Crippen\n\nimport math\nimport numpy as np\nimport os\ndir = os.path.dirname(os.path.realpath(__file__))\n\nNP_model = pickle.load(gzip.open(dir + '/../_dataset/QM9/NP_score.pkl.gz'...
[ [ "numpy.ones_like", "numpy.random.choice", "numpy.mean", "numpy.array", "numpy.exp" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ReyhaneAskari/Least_action_daynamics_LEAD_minmax
[ "de2ebf58b9558ba1d6642ab162f9fd9f14684665", "de2ebf58b9558ba1d6642ab162f9fd9f14684665" ]
[ "Fig_2_8Gaussians_compare/Extra_Adam.py", "ResNet/test.py" ]
[ "# ExtraAdam optim from https://github.com/GauthierGidel/Variational-Inequality-GAN\nimport random\nimport numpy as np\nimport torch\nimport torch.nn as nn\nfrom torch.autograd import Variable\nfrom torch.optim import SGD, Adam\nimport torch.autograd as autograd\nfrom scipy.stats import gaussian_kde\nimport matplot...
[ [ "torch.max", "numpy.sqrt", "torch.zeros", "torch.nn.BCEWithLogitsLoss", "scipy.stats.gaussian_kde", "torch.FloatTensor", "numpy.mean", "torch.cuda.manual_seed_all", "numpy.random.randn", "torch.autograd.Variable", "torch.cuda.synchronize", "torch.ones", "torch.r...
[ { "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"...
muellerflorian/corona-fish
[ "6b6769e47460007638415a1d739394e282711007" ]
[ "covfish/segmentation.py" ]
[ "# ---------------------------------------------------------------------------\n# Imports\n# ---------------------------------------------------------------------------\n\n# General purpose libraries\nimport numpy as np\nfrom tqdm import tqdm\nfrom pathlib import Path\n\n# Read annotations\nimport json\n\n# Create ...
[ [ "numpy.rollaxis", "numpy.take_along_axis", "numpy.asarray", "numpy.max", "numpy.zeros_like", "numpy.any", "matplotlib.pyplot.tight_layout", "scipy.ndimage.distance_transform_edt", "numpy.stack", "numpy.copy", "matplotlib.pyplot.close", "numpy.zeros", "numpy.logi...
[ { "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"...
Jeamee/tez
[ "ecbc91412a756e99c3fa79dd735e7ef43d35cbcf" ]
[ "tez/model/pgd.py" ]
[ "import torch\r\n\r\n\r\nclass PGD():\r\n def __init__(self, model):\r\n self.model = model\r\n self.emb_backup = {}\r\n self.grad_backup = {}\r\n\r\n def attack(self, epsilon=1., alpha=0.3, emb_name='emb', is_first_attack=False):\r\n # emb_name这个参数要换成你模型中embedding的参数名\r\n f...
[ [ "torch.norm", "torch.isnan" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
TomaszBialek/PSI_GCP01_zima_2017-2018_Tomasz_Bialek
[ "4191439385d371f3f117a11845e61fb88234fee9" ]
[ "Lab_Cats_vs_Dogs/Cats_vs_Dogs.py" ]
[ "import os, shutil\n\n# Ścieżka katalogu, do którego rozpakowano oryginalny zbiór danych.\noriginal_dataset_dir = './kaggle_original_data'\n\n# Katalog, w którym umieszczone zostaną mniejsze zbiory danych.\nbase_dir = './cats_and_dogs_small'\nif not os.path.isdir(base_dir):\n os.mkdir(base_dir)\n\n# Katalogi pod...
[ [ "matplotlib.pyplot.legend", "tensorflow.keras.preprocessing.image.ImageDataGenerator", "matplotlib.pyplot.title", "tensorflow.keras.preprocessing.image.load_img", "tensorflow.keras.layers.Dense", "tensorflow.keras.preprocessing.image.array_to_img", "tensorflow.keras.layers.Conv2D", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "2.7", "2.4", "2.3", "2.5", "2.6" ] } ]
noahstier/torchsparse
[ "313c9b09db9666c0c5f1e6c2ff48ad645ef31fd0" ]
[ "torchsparse/utils/helpers.py" ]
[ "from collections import Sequence\n\nimport numpy as np\nimport torch\nfrom torchsparse import SparseTensor\n\n__all__ = [\n 'ravel_hash_vec', 'sparse_quantize', 'sparse_collate', 'sparse_collate_fn',\n 'sparse_collate_tensors', 'make_tuple'\n]\n\n\ndef ravel_hash_vec(arr):\n assert arr.ndim == 2\n arr ...
[ [ "torch.ones", "numpy.unique", "torch.cat", "torch.from_numpy", "numpy.isscalar", "torch.stack", "numpy.array", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
CynthiaProtector/helo
[ "2586c6691ca74d2df455a49cad964bcac8e34f25", "7f07ce795833d0c56c72b3a1fb9339bed6d178d1" ]
[ "tests/python/unittest/test_module.py", "nnvm/python/nnvm/_base.py" ]
[ "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y...
[ [ "numpy.all", "numpy.random.seed" ], [ "numpy.frombuffer" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
iVishalr/Recurrent-Networks
[ "088bf4222336e6011e409bb7c96c79ad0a62845e" ]
[ "model/LSTM.py" ]
[ "import os\nos.environ[\"OMP_NUM_THREADS\"] = \"12\" # export OMP_NUM_THREADS=4\n\n\nimport numpy as np\nimport sys\n#read the data from the file\ndata = open(sys.argv[1],'r').read()\ncharacters = list(set(data))\ndata_size, vocab_size = len(data),len(characters)\n\nprint(\"Data has %d characters, %d unique charact...
[ [ "numpy.dot", "numpy.log", "numpy.sqrt", "numpy.multiply", "numpy.clip", "numpy.max", "numpy.copy", "numpy.random.randn", "numpy.zeros_like", "numpy.row_stack", "numpy.exp", "numpy.tanh", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
udhanMti/doc2vec
[ "2442496c44cc3dad00c63f2ac20c85acfa6ef6ef" ]
[ "doc2vec/data/batch_dbow.py" ]
[ "import itertools \nfrom progressbar import progressbar\nimport random\n\nfrom keras.utils import to_categorical\nimport numpy as np\n\n\ndef data_generator(token_ids_by_doc_id, window_size, vocab_size):\n doc_ids = list(token_ids_by_doc_id.keys())\n \n for doc_id in progressbar(itertools.cycle(doc_ids)):\n ...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
SahalaProject/AI
[ "eb9a90db8f0bef6f1886fa29a713a36041d21cbc" ]
[ "tensorflow_/2zhang/9_tf_keras_classification_model_dnn.py" ]
[ "# coding:utf-8\n\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\n# %matplotlib inline\nimport numpy as np\nimport sklearn\nimport pandas as pd\nimport os\nimport sys\nimport time\nimport tensorflow as tf\n\nfrom tensorflow import keras\n\n# 打印name和版本\nprint(tf.__version__)\nprint(sys.version_info)\nfor...
[ [ "tensorflow.keras.callbacks.ModelCheckpoint", "matplotlib.pyplot.gca", "numpy.min", "tensorflow.keras.layers.Dense", "matplotlib.pyplot.show", "pandas.DataFrame", "numpy.max", "matplotlib.pyplot.grid", "tensorflow.keras.callbacks.TensorBoard", "sklearn.preprocessing.Standar...
[ { "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": [ "2.7", "2.6", "2.4", ...
Exdenta/torchsat
[ "70ea3db758757104fb3ba618ddf7997f0f3a75b4", "70ea3db758757104fb3ba618ddf7997f0f3a75b4", "70ea3db758757104fb3ba618ddf7997f0f3a75b4" ]
[ "torchsat_imc/scripts/train_seg_cli.py", "torchsat_imc/models/classification/vgg.py", "tests/test_transform_cls.py" ]
[ "import os\nimport sys\nimport argparse\nimport numpy as np\nroot_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))\nsys.path.append(root_dir)\n\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nfrom torch.utils.data import DataLoader\nfrom torch.utils.tensorboard import SummaryW...
[ [ "torch.nn.Softmax", "torch.load", "torch.round", "torch.utils.data.DataLoader", "torch.cuda.empty_cache", "torch.nn.BCELoss", "torch.exp", "torch.nn.functional.sigmoid", "torch.nn.functional.binary_cross_entropy", "torch.utils.tensorboard.SummaryWriter", "torch.no_grad"...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mikemathwig/incubator-mxnet
[ "7261d8c5917d755f233bb66369812bb2e6e77820" ]
[ "tests/python/quantization/test_quantization.py" ]
[ "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y...
[ [ "numpy.abs", "numpy.min", "numpy.sign", "numpy.max", "numpy.iinfo", "numpy.prod", "numpy.random.uniform", "numpy.array", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
StanfordVL/HRL4IN
[ "547009933f86b3d1618191a946a60f74213ed8af" ]
[ "hrl4in/rl/ppo/ppo.py" ]
[ "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nfrom IPython import embed\n\nEPS_PPO = 1e-5...
[ [ "torch.max", "torch.min", "torch.exp", "torch.arange", "torch.clamp" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
valeman/pedpf
[ "38bb1b022c26c0b7ab10d7f2f355d687936da3ac" ]
[ "experiments/train_epochtime.py" ]
[ "\"\"\"\"\"\"\n\"\"\"\n Copyright (c) 2021 Olivier Sprangers as part of Airlab Amsterdam\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...
[ [ "torch.device", "torch.cuda.synchronize", "torch.set_num_threads", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rajeshyogeshwar/exchange_calendars
[ "a5f2ca17fc4a9195bc56b4b783420b4e9b999fc5", "a5f2ca17fc4a9195bc56b4b783420b4e9b999fc5" ]
[ "tests/test_xshg_calendar.py", "tests/test_xtai_calendar.py" ]
[ "from unittest import TestCase\n\nimport pandas as pd\nfrom pytz import UTC\n\nfrom exchange_calendars.exchange_calendar_xshg import XSHGExchangeCalendar\n\nfrom .test_exchange_calendar import ExchangeCalendarTestBase\nfrom .test_utils import T\n\n\nclass XSHGCalendarTestCase(ExchangeCalendarTestBase, TestCase):\n\...
[ [ "pandas.Timestamp" ], [ "pandas.Timestamp" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
joelosw/Telegram_Bot
[ "c1c60280eac0f67324806c31bf0fba44705da7f9" ]
[ "machine_learning.py" ]
[ "import os\nfrom io import BytesIO\nimport tarfile\nimport tempfile\nfrom six.moves import urllib\nimport matplotlib\nfrom matplotlib import gridspec\nfrom matplotlib import pyplot as plt\nimport numpy as np\nfrom PIL import Image\n\nimport tensorflow as tf\n\nclass DeepLabModel(object):\n \"\"\"Class to load deep...
[ [ "tensorflow.Graph", "tensorflow.import_graph_def", "numpy.asarray", "numpy.arange", "numpy.uint8", "numpy.max", "tensorflow.gfile.MakeDirs", "tensorflow.Session", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
oscarpimentel/astro-lightcurves-classifier
[ "f697b43e22bd8c92c1b9df514be8565c736dd7cc" ]
[ "lcclassifier/experiments/dim_reductions.py" ]
[ "from __future__ import print_function\nfrom __future__ import division\nfrom . import _C\n\nimport torch\nfrom fuzzytorch.utils import TDictHolder, tensor_to_numpy, minibatch_dict_collate\nimport numpy as np\nfrom fuzzytools.progress_bars import ProgressBar, ProgressBarMulti\nimport fuzzytools.files as files\nfrom...
[ [ "torch.nn.functional.softmax", "numpy.linspace", "torch.no_grad", "sklearn.preprocessing.StandardScaler", "torch.argmax" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ratchet-Inc/StreamProcessorUE4
[ "6f9e9369e0fdc54c100d001a099e5256fa3f7328" ]
[ "FrameParser.py" ]
[ "#! C:/Python3\nimport numpy as NP\nfrom PIL import Image\nimport StreamProcessor_PY as SP_FAST\n\nFrameWidth = 640\nFrameHeight = 360\nLossyFrame = 1\n\n\ndef ParseFrame(data: list, w = FrameWidth, h = FrameHeight, lossy = LossyFrame) -> list:\n arr = NP.zeros([h, w, 3], order = \"C\", dtype = NP.uint8)\n te...
[ [ "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
alexpreynolds/clodius
[ "743190017fa9b3be2d1434e9923b0b1c52ac4ab6" ]
[ "test/tsv_to_mrmatrix_test.py" ]
[ "import unittest\nfrom tempfile import TemporaryDirectory\nimport csv\nfrom math import nan\n\nimport numpy as np\nfrom numpy.testing import assert_array_equal\nimport h5py\n\nfrom scripts.tsv_to_mrmatrix import coarsen, parse\n\nclass CoarsenTest(unittest.TestCase):\n def test_5_layer_pyramid(self):\n ti...
[ [ "numpy.testing.assert_array_equal" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
lilong98/dlbenchmark
[ "d0a631c69e57d9f43f131476a08140bf7fd9f10e" ]
[ "models/cnn/alexnet_model.py" ]
[ "# -*- coding:utf-8 -*-\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in wri...
[ [ "tensorflow.image.resize_image_with_crop_or_pad", "tensorflow.transpose", "tensorflow.layers.dropout", "tensorflow.reshape", "tensorflow.layers.max_pooling2d", "tensorflow.initializers.random_uniform" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
PauloRadatz/TimesSeries_OpenDSS
[ "2f252efdf7cb656b73b76c5fbfbf6d89de26f84c" ]
[ "process.py" ]
[ "# -*- coding: utf-8 -*-\n# @Time : 8/9/2021 12:10 PM\n# @Author : Paulo Radatz\n# @Email : pradatz@epri.com\n# @File : process.py\n# @Software: PyCharm\n\nimport py_dss_interface # YouTube videos: https://www.youtube.com/playlist?list=PLhdRxvt3nJ8zlzp6b_-7s3_YwwlunTNRC\nimport pathlib\nimport os\nfrom Me...
[ [ "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": [] } ]
AliceCyber/rnnmorph
[ "adf687c7590f8d2bc3abba56850878e33fc4c3c0" ]
[ "rnnmorph/batch_generator.py" ]
[ "# -*- coding: utf-8 -*-\n# Автор: Гусев Илья\n# Описание: Генератор батчей с определёнными параметрами.\n\nfrom typing import List, Tuple\nfrom collections import namedtuple\n\nimport nltk\nimport numpy as np\nfrom pymorphy2 import MorphAnalyzer\nfrom russian_tagsets import converters\n\nfrom rnnmorph.data_prepara...
[ [ "numpy.zeros", "numpy.zeros_like" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
tkamishima/kamrecsys
[ "62305312f7aaaa8c2985785983c1d2bf68b243c0" ]
[ "kamrecsys/score_predictor/topic_model.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nTopic Model: probabilistic latent semantic analysis\n\"\"\"\n\nfrom __future__ import (\n print_function,\n division,\n absolute_import,\n unicode_literals)\nfrom six.moves import xrange\n\n# =======================================================...
[ [ "numpy.dot", "numpy.log", "numpy.abs", "numpy.ones", "numpy.argmax", "numpy.bincount", "numpy.sum", "numpy.empty" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
berlm/pyalgotrade
[ "3b04efec563d7fa47b482b15347b0fa1aa4e11ec" ]
[ "testcases/common.py" ]
[ "# PyAlgoTrade\n#\n# Copyright 2011-2015 Gabriel Martin Becedillas Ruiz\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unle...
[ [ "matplotlib.use" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
wikar/neural_prophet
[ "bf1da13980f418f8465faf4b938ee9f6b3caab6b" ]
[ "neuralprophet/metrics.py" ]
[ "from abc import abstractmethod\nfrom collections import OrderedDict\nimport numpy as np\nimport pandas as pd\nimport logging\n\nlog = logging.getLogger(\"NP.metrics\")\n\n\nclass MetricsCollection:\n \"\"\"Collection of Metrics that performs action over all\"\"\"\n\n def __init__(self, metrics, value_metrics...
[ [ "numpy.mean", "numpy.abs" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
cenkbircanoglu/SPML
[ "f09e4c30ecf2030d42ac70b2c35e7fdeee9bf468", "f09e4c30ecf2030d42ac70b2c35e7fdeee9bf468" ]
[ "spml/models/backbones/resnet.py", "pyscripts/inference/pseudo_softmax.py" ]
[ "\"\"\"Construct Residual Network.\"\"\"\n\nimport math\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.nn.modules.batchnorm import _BatchNorm\n\n\nclass Bottleneck(nn.Module):\n\n expansion = 4\n\n def __init__(self, inplanes, planes, stride=1,\n dilation=1, down...
[ [ "torch.nn.Sequential", "torch.nn.Conv2d", "torch.nn.MaxPool2d", "torch.nn.BatchNorm2d", "torch.nn.ReLU" ], [ "torch.mean", "torch.nn.functional.softmax", "torch.norm", "torch.cat", "numpy.unique", "torch.sum", "torch.from_numpy", "torch.matmul", "numpy.a...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
biocore/gneiss
[ "5d253d68ef14fa82e26b5f74118ff170f1990585" ]
[ "gneiss/plot/_regression_plot.py" ]
[ "# ----------------------------------------------------------------------------\n# Copyright (c) 2016--, gneiss development team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the file COPYING.txt, distributed with this software.\n# -------------------------------------...
[ [ "pandas.merge", "numpy.log10", "pandas.melt", "numpy.floor" ] ]
[ { "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": [] } ]
w-12-n/customer_churn
[ "724b9b5c5b6468b57f6f8e84b2c8a488f2e15cbf" ]
[ "data_writer.py" ]
[ "import datetime\nfrom dateutil.relativedelta import relativedelta\nfrom functools import reduce\nimport numpy as np\nimport pandas as pd\n\n\nclass ChurnDataWriter(object):\n def __init__(self,\n # if no orders after churn_thresh, then label customer as churned\n churn_thresh=dat...
[ [ "pandas.merge", "pandas.to_datetime", "pandas.read_csv", "numpy.maximum", "numpy.save", "numpy.array", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
ekkrym/CovidTrendModel
[ "26f49b0e3bf18ef2de5f9ec15f85e8148618c135" ]
[ "source/poly.py" ]
[ "import numpy as np\nfrom scipy.optimize import minimize\nfrom sklearn.linear_model import RidgeCV, Ridge\nfrom sklearn.metrics import make_scorer, mean_squared_error, mean_absolute_error\nfrom smoothing import simple_mirroring\n# importing libraries for polynomial transform\nfrom sklearn.preprocessing import Polyn...
[ [ "numpy.log", "numpy.arange", "sklearn.pipeline.Pipeline", "sklearn.preprocessing.PolynomialFeatures", "numpy.cumsum", "sklearn.linear_model.Ridge", "numpy.diff", "numpy.insert", "numpy.array", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
IDl0T/DenseFuseNet
[ "a17f9645d0d1f9ffe0598fde384159f7d61d3376" ]
[ "src/backbones/yaumodel.py" ]
[ "# Encoder\nfrom __future__ import print_function\nimport math\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.nn.modules.utils import _pair, _quadruple\n\nclass Fire(nn.Module):\n \"\"\"\n In channel: inplanes\n Out channel: expand1x1_planes + expand3x3_planes\n \"\"\"\n\n...
[ [ "torch.nn.Dropout2d", "torch.ones", "torch.round", "torch.nn.Conv2d", "torch.nn.modules.utils._quadruple", "torch.nn.MaxPool2d", "torch.nn.modules.utils._pair", "torch.stack", "torch.nn.ReLU", "torch.hub.load", "torch.logical_not" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
wdwvt1/emperor
[ "60965f6709118bef6eb590df661c19f52e2447f7" ]
[ "emperor/format.py" ]
[ "# ----------------------------------------------------------------------------\n# Copyright (c) 2013--, emperor development team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the file COPYING.txt, distributed with this software.\n# ------------------------------------...
[ [ "numpy.abs", "numpy.min", "numpy.max", "numpy.argsort", "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
bmoretz/Python-Machine-Learning
[ "206e7905cdcade7e322cee7e60a642d55ebc8955" ]
[ "samples/ch07/mnist_extra_trees.py" ]
[ "import random, time\n\nfrom sklearn.datasets import fetch_mldata\nfrom sklearn.linear_model import LogisticRegression\nfrom sklearn.tree import DecisionTreeClassifier\nfrom sklearn.ensemble import (RandomForestClassifier, ExtraTreesClassifier, AdaBoostClassifier)\nfrom sklearn.linear_model import SGDClassifier\nfr...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "sklearn.utils.shuffle", "sklearn.ensemble.ExtraTreesClassifier", "sklearn.model_selection.train_test_split", "matplotlib.pyplot.subplot", "sklearn.datasets.fetch_mldata", "numpy.mean", "matplotlib.pyplot.xlabel", "nump...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
deepframwork/TorchBlocks
[ "a5baecb9a2470ff175087475630f2b7db3f7ef51" ]
[ "torchblocks/losses/label_smoothing.py" ]
[ "import torch.nn as nn\r\nimport torch.nn.functional as F\r\n\r\n\r\nclass LabelSmoothingCE(nn.Module):\r\n def __init__(self, eps=0.1, reduction='mean', ignore_index=-100):\r\n super(LabelSmoothingCE, self).__init__()\r\n self.eps = eps\r\n self.reduction = reduction\r\n self.ignore_...
[ [ "torch.nn.functional.nll_loss", "torch.nn.functional.log_softmax" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Pengeace/DGP-PDE-FEM
[ "64b7f42ca7083b05f05c42baa6cad21084068d8c" ]
[ "linsolver/sparse_solver.py" ]
[ "import time\n\nimport numpy as np\n\n\ndef sparse_jacobi(A, b, sparse_input=False, max_iter_time=30000, min_iter_time=500, tolerance=1e-10):\n \"\"\"\n Jacobi iteration (with column compressed sparse matrix method) for solving the linear equations with below form:\n A * u = b\n\n ---------------\n ...
[ [ "numpy.dot", "numpy.nonzero", "numpy.copy", "numpy.array", "scipy.linalg.solve", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "0.12", "0.14", "0.15" ], "tensorflow": [] } ]
kiwi0fruit/jats-semi-supervised-pytorch
[ "67e9bb85f09f8ef02e17e495784d1d9a71c3adec" ]
[ "beta_tcvae_typed/distrib_base.py" ]
[ "# noinspection PyPep8Naming\nfrom typing import Union, Tuple, Optional as Opt, List\nfrom abc import abstractmethod\nfrom torch import Tensor, Size\nimport torch as tr\nfrom normalizing_flows_typed import Flow, SequentialFlow\nfrom .distrib_base_type import DistribBase\n\nFlows = Union[Flow, SequentialFlow]\nSizeT...
[ [ "torch.Size", "torch.exp", "matplotlib.pyplot.plot", "numpy.histogram", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
hitheshr/mobile-segmentation
[ "abb3555021fa7bbf8672ec8c9614c2375b994cc1" ]
[ "dataset/build_ade20k_data.py" ]
[ "\n\"\"\"Converts ADE20K data to TFRecord file format with Example protos.\"\"\"\n\nimport math\nimport os\nimport random\nimport sys\nimport build_data\nimport tensorflow as tf\n\nFLAGS = tf.app.flags.FLAGS\n\ntf.app.flags.DEFINE_string(\n 'train_image_folder',\n './ADE20K/ADEChallengeData2016/images/trainin...
[ [ "tensorflow.python_io.TFRecordWriter", "tensorflow.gfile.MakeDirs", "tensorflow.app.flags.DEFINE_string", "tensorflow.gfile.FastGFile", "tensorflow.app.run" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
ashemag/hate_speech_detection
[ "244165745e9f0a7fa6d4cffc7f5b00a1882bb140" ]
[ "testing-playground/logistic_regression.py" ]
[ "import sys\nsys.path.append(\"..\")\nimport configparser\nfrom data_providers import TextDataProvider\nfrom sklearn.linear_model import LogisticRegressionCV, LogisticRegression\nfrom globals import ROOT_DIR\nimport os\nimport numpy as np\nfrom sklearn.metrics import f1_score, precision_score, recall_score\nimport ...
[ [ "sklearn.linear_model.LogisticRegression", "torch.Tensor", "numpy.around", "sklearn.metrics.precision_score", "sklearn.metrics.f1_score", "numpy.array", "sklearn.metrics.recall_score" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
yashchandak/TensorFlow-fun
[ "d2ec9c6eb52c5d92f417c62f99bc3e9385d43f0d" ]
[ "rnn.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Jun 13 14:10:48 2016\n\nMinimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)\nBSD License\n\"\"\"\nimport numpy as np\n\n# data I/O\ndata = open('input.txt', 'r').read() # should be simple plain text file\n#data = data.split() #for word l...
[ [ "numpy.dot", "numpy.log", "numpy.sqrt", "numpy.clip", "numpy.copy", "numpy.random.randn", "numpy.zeros_like", "numpy.exp", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
aguinot/descwl-shear-sims
[ "a808ffb377b1936964db312e87bd72299268ff2e" ]
[ "descwl_shear_sims/tests/test_randsphere.py" ]
[ "import numpy as np\nimport pytest\n\nfrom ..randsphere import randsphere\n\n\ndef test_randsphere_smoke():\n ra, dec = randsphere(np.random.RandomState(seed=10), 100)\n assert len(ra) == 100\n assert len(dec) == 100\n assert np.all((ra >= 0) & (ra <= 360))\n assert np.all((dec >= -90) & (dec <= 90))...
[ [ "numpy.all", "numpy.random.RandomState" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
cdluminate/MyNotes
[ "cf28f2a3fa72723153147e21fed5e7b598baf44f" ]
[ "python3/demo.numba.py" ]
[ "#!/usr/bin/python3\n# http://numba.pydata.org/numba-doc/0.37.0/user/overview.html\n\nimport numba as nb\nimport numpy as np\nimport time\n\n# jit decorator tells Numba to compile this function.\n# The argument types will be inferred by Numba when function is called.\n@nb.jit\ndef sum2d():\n arr = np.arange(6553...
[ [ "numpy.arange", "numpy.random.rand" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
gargisingh7/BERT-EncoderMLM
[ "148c5d56b4338d5eda54cd5a073c79e981b6e48c" ]
[ "model.py" ]
[ "import torch.nn as nn\nfrom transformers import BertPreTrainedModel, BertModel\n\nfrom transformers.modeling_bert import BertOnlyMLMHead \nfrom torch.nn import CrossEntropyLoss #### db\n#hugginface/transformers github: git checkout c50aa67\n\nclass BertForEncoderMLM(BertPreTrainedModel):\n def __init__(self, c...
[ [ "torch.nn.CrossEntropyLoss", "torch.nn.Dropout" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
StefanKjartansson/py-stadfangaskra
[ "4eabd222a0687b6559aa96fce93b0a056f97e8f0" ]
[ "stadfangaskra/tree.py" ]
[ "from typing import Dict, List, Tuple, Union\n\nimport geopandas\nimport numpy as np\nimport pandas as pd\n\nfrom .matches import iter_matches\nfrom .static import ADMINISTRATIVE_DIVISIONS, POSTCODE_MUNICIPALITY_LOOKUP\nfrom .static import df as STATIC_DF\n\nINDEX_COLS = [\"municipality\", \"postcode\", \"street_no...
[ [ "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": [] } ]