repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
possible_versions
list
Sense-X/UniFormer
[ "e8024703bffb89cb7c7d09e0d774a0d2a9f96c25" ]
[ "image_classification/token_labeling/tlt/models/uniformer.py" ]
[ "# --------------------------------------------------------\n# UniFormer\n# Copyright (c) 2022 SenseTime X-Lab\n# Licensed under The MIT License [see LICENSE for details]\n# Written by Kunchang Li\n# --------------------------------------------------------\n\nfrom collections import OrderedDict\nimport torch\nimpor...
[ [ "torch.nn.Dropout", "torch.nn.GELU", "numpy.random.beta", "numpy.sqrt", "torch.ones", "numpy.clip", "torch.nn.init.constant_", "torch.nn.Conv2d", "torch.nn.LayerNorm", "torch.nn.Tanh", "torch.nn.Linear", "numpy.int", "torch.nn.Identity", "torch.nn.BatchNorm2...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
leafvmaple/machine_learning-decision_tree
[ "925b68c0b56c3b7c3b06ae6ccd652ebc4fb88e45" ]
[ "decision_tree.py" ]
[ "import numpy as np\nfrom sklearn.datasets import load_breast_cancer\nfrom sklearn.model_selection import train_test_split\n\nclass Leaf:\n def __init__(self, data, uncert):\n self.predict = np.sum(data[:,-1]) / float(data.shape[0])\n self.uncert = uncert\n\nclass NodeInfo:\n def __init__(self, ...
[ [ "numpy.log2", "sklearn.datasets.load_breast_cancer", "sklearn.model_selection.train_test_split", "numpy.column_stack", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
izabelcavassim/Noncoding
[ "31b7a9524b7f7dda6d0b9f3c0c48e5445001cde3" ]
[ "scripts/infer_dfe_Bernard.py" ]
[ "#! /usr/bin/env python\n# script for 1000 genomes EUR DFE workflow\n\nimport dadi\nimport numpy\nimport scipy\nimport pickle\nimport sys\nimport Selection #make sure Selection.py is copied into working dir\n\ndef eur_demog(params, ns, pts):\n \"\"\"\n generic european/asian demographic model\n bottleneck ...
[ [ "numpy.log", "numpy.frompyfunc", "numpy.genfromtxt", "numpy.append", "numpy.log10", "numpy.array", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
JasonGUTU/NAA
[ "48a5a75aed9432c9dc83ccc9148333ada97ce844" ]
[ "naa/naa.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nAuthor : JasonGUTU\nEmail : hellojasongt@gmail.com\nPython : anaconda3\nDate : 2016/11/18\n\"\"\"\nimport random\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n\nclass NAA_base(object):\n\n def __init__(self, dimension, bound, iteration, parameters, verbose=None, a...
[ [ "numpy.argsort", "numpy.array", "numpy.random.rand", "numpy.full" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ttslr/gtos
[ "87d313d092b67a1c1494bae4d5682102fb150985" ]
[ "generator/utils.py" ]
[ "import torch\nfrom torch import nn\nimport math\n\ndef move_to_cuda(maybe_tensor, device):\n if torch.is_tensor(maybe_tensor):\n return maybe_tensor.cuda(device)\n elif isinstance(maybe_tensor, dict):\n return {\n key: move_to_cuda(value, device)\n for key, value in maybe_...
[ [ "torch.pow", "torch.is_tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
OpenSourceEconomics/estimagic
[ "85163b4cdc601d60d654c6ca1f42b9db17a130a3" ]
[ "tests/dashboard/test_monitoring_app.py" ]
[ "\"\"\"Test the functions of the monitoring app.\"\"\"\nimport estimagic.dashboard.monitoring_app as monitoring\nimport numpy as np\nimport pandas as pd\nimport pandas.testing as pdt\nimport pytest\nfrom bokeh.document import Document\nfrom bokeh.models import ColumnDataSource\nfrom estimagic.config import EXAMPLE_...
[ [ "pandas.testing.assert_series_equal", "pandas.Series", "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
otakbeku/ALPR-Indonesia
[ "0b495673a4c84faf56db78da91201719ad0416eb" ]
[ "GenData.py" ]
[ "# GenData.py\nimport argparse\nimport os\nimport sys\n\nimport cv2\nimport numpy as np\n\n# module level variables ##########################################################################\nMIN_CONTOUR_AREA = 100\n\nRESIZED_IMAGE_WIDTH = 20\nRESIZED_IMAGE_HEIGHT = 30\n\n\n#########################################...
[ [ "numpy.empty", "numpy.append", "numpy.savetxt", "numpy.array", "numpy.loadtxt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Iceland-Leo/StyleGAN2_PyTorch
[ "3621f5e4ba1c7fde7e2fae1f4700d050656a0b02" ]
[ "utils/libs.py" ]
[ "# -*- coding: utf-8 -*-\n\n\n\"\"\"\n Miscellaneous utility classes and functions For StyleGAN2 Network.\n\"\"\"\nimport torch\nimport numpy as np\n\n\n# TWO = {1: 0, 2: 1, 4: 2, 8: 3, 16: 4, 32: 5,\n# 64: 6, 128: 7, 256: 8, 512: 9, 1024: 10}\n\nTWO = [pow(2, _) for _ in range(11)]\n\ndef _setup_kernel(k...
[ [ "numpy.asarray", "numpy.outer", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ClimBin/models
[ "10989b361732ee5b93f5595f672fd7d0c18e8f93" ]
[ "Transformer/odd_numbers/train_transformer_odd_numbers.py" ]
[ "# https://github.com/Kenneth111/TransformerDemo/blob/master/predict_odd_numbers.py\nimport sys\nimport argparse\nimport os\nimport shutil\nimport numpy as np\n\nimport oneflow as flow\nimport oneflow.nn as nn\n\nsys.path.append(\"../\")\nfrom model import TransformerModel\n\nTO_CUDA = True\n\nparser = argparse.Arg...
[ [ "numpy.arange", "numpy.random.shuffle", "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
rgerum/ElViS
[ "27b8be0769eaf78cfa1be4e320e3dc6bff5973ed" ]
[ "springModule.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nElViS Simulator\r\n\r\nELastic-VIscous-System Simulator\r\n\r\n\"\"\"\r\nimport numpy as np\r\nfrom elements import Spring, Dashpot, Force\r\n\r\nPOINT_static = 0\r\nPOINT_dynamic = 1\r\n\r\n\r\nclass MySim:\r\n big_point_array = None\r\n\r\n def __init__(self):\r\n\r\n ...
[ [ "numpy.min", "numpy.linalg.inv", "numpy.arange", "numpy.asarray", "numpy.concatenate", "numpy.all", "numpy.delete", "numpy.zeros" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Steap/tavolo
[ "4af5f645b5ef4399c3746a3d930c5c8fc0892fb1" ]
[ "tests/seq2vec/yang_attention_test.py" ]
[ "import tensorflow as tf\n\nfrom tavolo.seq2vec import YangAttention\n\n\ndef test_shapes():\n \"\"\" Test input-output shapes \"\"\"\n\n # Inputs shape\n input_shape_3d = (56, 10, 30)\n attention_units = 100\n\n inputs_3d = tf.random.normal(shape=input_shape_3d)\n\n yang_attention = YangAttention...
[ [ "tensorflow.zeros_like", "tensorflow.random.normal", "tensorflow.keras.layers.Masking", "tensorflow.reduce_sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "2.7", "2.6", "2.4", "2.3", "2.5", "2.2" ] } ]
ustyuzhaninky/OSAR-keras
[ "0eacf8d1e49d6e9a0f9ec82799169c4720e67ac2", "0eacf8d1e49d6e9a0f9ec82799169c4720e67ac2" ]
[ "OSAR/helix_memory.py", "OSAR/tfxl/rel_bias.py" ]
[ "# coding=utf-8\n# Copyright 2020 Konstantin Ustyuzhanin.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required...
[ [ "tensorflow.keras.backend.tile", "tensorflow.python.ops.nn.conv1d", "tensorflow.python.ops.nn.avg_pool1d", "tensorflow.keras.constraints.get", "tensorflow.keras.constraints.serialize", "tensorflow.keras.regularizers.get", "tensorflow.keras.initializers.serialize", "tensorflow.keras...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "2.7", "2.2", "2.3", "2.4", "2.5", "2.6" ] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "2.7", "...
kaituohuo/kaldo
[ "537bceea2c3206711a8899d68e1dbd23fb0c38b6" ]
[ "examples/silicon_bulk_LDA_ASE_QE_hiPhive/1_Si_hiPhive_generate_fcs.py" ]
[ "# Example: silicon bulk, LDA pseudo potential \n# Computes: force constant potential for silicon bulk (2 atoms per cell)\n# Uses: hiPhive, ASE, Quantum ESPRESSO (QE)\n# External files: Si.pz-n-kjpaw_psl.0.1.UPF\n\nfrom ase.build import bulk\nfrom ase.calculators.espresso import Espresso\nfrom ase.io import write, ...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
kyuhyoung/differentiable-point-clouds
[ "76f3baf54c18a4aff0e8a593952dda6e63459a60" ]
[ "dpc/nets/pose_net.py" ]
[ "import tensorflow as tf\nimport tensorflow.contrib.slim as slim\n\n\ndef pose_branch(inputs, cfg):\n num_layers = cfg.pose_candidates_num_layers\n f_dim = 32\n t = inputs\n for k in range(num_layers):\n if k == (num_layers - 1):\n out_dim = 4\n act_func = None\n else...
[ [ "tensorflow.concat", "tensorflow.contrib.slim.arg_scope", "tensorflow.contrib.layers.variance_scaling_initializer", "tensorflow.reshape", "tensorflow.truncated_normal_initializer", "tensorflow.contrib.slim.fully_connected", "tensorflow.tanh", "tensorflow.variable_scope" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.4", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
nikibhatt/Groa
[ "31b3624bfe61e772b55f8175b4e95d63c9e67966" ]
[ "Flask/application.py" ]
[ "from flask import Flask, session, render_template, request, flash, redirect, send_file\nfrom flask_session import Session\nfrom time import sleep\nimport pandas as pd\nimport math\nimport numpy as np\nfrom zipfile import ZipFile\nimport json\nimport os, shutil, io\nimport psycopg2\n\n# self import\nfrom psycopg2_b...
[ [ "numpy.random.uniform", "pandas.read_csv", "pandas.read_json", "pandas.DataFrame" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
terrorizer1980/torchrec
[ "824efb76e4a1c8500e5ce976ac01e6bae894e03a" ]
[ "torchrec/modules/tests/test_lazy_extension.py" ]
[ "#!/usr/bin/env python3\n# Copyright (c) Meta Platforms, Inc. and affiliates.\n# All rights reserved.\n#\n# This source code is licensed under the BSD-style license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport inspect\nimport re\nimport unittest\nfrom typing import Tuple\n\nimpo...
[ [ "torch.ones", "torch.zeros", "torch.tensor", "torch.nn.Identity", "torch.no_grad" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
0todd0000/lmfree2d
[ "5c5d398b4dac6d99878068855ad21114d0bba31f" ]
[ "Python/fig_corresp.py" ]
[ "\n'''\nFigure: demonstration of a simple point correspondence algorithm.\n'''\n\n\nimport os\nimport numpy as np\nfrom matplotlib import pyplot as plt\nplt.ion()\nimport lmfree2d as lm\n\n\n\n#(0) Load data:\ndirREPO = lm.get_repository_path()\nnames = ['Bell', 'Comma', 'Device8', 'Face', 'Flatfish', 'Ham...
[ [ "numpy.random.seed", "numpy.linspace", "matplotlib.pyplot.savefig", "matplotlib.pyplot.axes", "matplotlib.pyplot.close", "matplotlib.pyplot.ion", "numpy.roll", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mmiki21/Viola-SV
[ "10fe2c326749024551d3e41f900b37e20dbde35c" ]
[ "tests/vcf/test_to_vcf_like_lumpy.py" ]
[ "import viola\nimport sys, os\nimport pandas as pd\nfrom io import StringIO\nHERE = os.path.abspath(os.path.dirname(__file__))\nHEADER = \"\"\"##fileformat=VCFv4.2\n##source=LUMPY\n##INFO=<ID=SVTYPE,Number=1,Type=String,Description=\"Type of structural variant\">\n##INFO=<ID=STRANDS,Number=.,Type=String,Description...
[ [ "pandas.testing.assert_frame_equal" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "0.23", "0.21", "2.0", "1.4", "1.1", "1.5", "1.2", "0.24", "0.20", "1.0", "0.25", "1.3" ], "scipy": [], "tensorflow": [] } ]
Thanduriel/StableNN
[ "2457fbadee8491eaa3d52ff76d66dc45c27cb84a" ]
[ "evaluation/heat_diff_error.py" ]
[ "import numpy as np\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport math\n\nmatplotlib.style.use('seaborn')\n\ndata = np.genfromtxt(fname=\"../build/mse.txt\",\n dtype=np.float32,\n delimiter=',',\n skip_header=0)\n\nend = 4096\nenergy = ...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.gca", "matplotlib.pyplot.semilogy", "numpy.linspace", "matplotlib.style.use", "numpy.genfromtxt", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
zdaiot/NAIC-Person-Re-identification
[ "762be875b68e85fbaab8b7730b5a857bfcc9e218" ]
[ "models/backbones/resnet.py" ]
[ "import math\nimport torch\nfrom torch import nn\nfrom torchvision import models\n\n\nclass Bottleneck(nn.Module):\n expansion = 4\n\n def __init__(self, inplanes, planes, stride=1, downsample=None):\n super(Bottleneck, self).__init__()\n self.conv1 = nn.Conv2d(inplanes, planes, kernel_size=1, b...
[ [ "torch.nn.Sequential", "torch.load", "torch.nn.Conv2d", "torch.nn.MaxPool2d", "torch.nn.BatchNorm2d", "torch.nn.ReLU" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
4Subsea/evapy
[ "be4f37b73bc22af700b75019dd23f73826e47f39" ]
[ "tests/test_distributions.py" ]
[ "import unittest\n\nimport numpy as np\n\nimport evapy.distributions as dist\n\n\nclass Test_rayleigh_gen(unittest.TestCase):\n def setUp(self):\n self.dist = dist._distns.rayleigh_gen()\n\n def tearDown(self):\n pass\n\n def test_cdf(self):\n calculated = self.dist.cdf(2.5, loc=0.5, s...
[ [ "numpy.log", "numpy.exp", "numpy.sqrt", "numpy.expm1" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
aydogduali/DAPPER
[ "ce59d4cbdff07327be2ef66502eb4ca1d9e7027f" ]
[ "dapper/stats.py" ]
[ "\"\"\"Stats computation for the assessment of DA methods.\"\"\"\n\nimport warnings\n\nimport numpy as np\nimport scipy.linalg as sla\nimport struct_tools\nfrom matplotlib import pyplot as plt\nfrom patlib.std import do_once\nfrom tabulate import tabulate\n\nimport dapper.tools.liveplotting as liveplotting\nimport ...
[ [ "numpy.diag", "numpy.seterrcall", "numpy.sqrt", "numpy.mean", "numpy.nanmean", "numpy.where", "numpy.eye", "scipy.linalg.eigh", "matplotlib.pyplot.figure", "numpy.log", "matplotlib.pyplot.fignum_exists", "numpy.full_like", "numpy.errstate", "numpy.isreal", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [ "0.13", "0.14", "0.15", "0.12", "0.10" ], "tensorflow": [] } ]
SunskyF/EasyPR-python
[ "c35b34876d63dbdee56719ebf419f4e3af99004a" ]
[ "lib/easypr/chars_segment.py" ]
[ "import cv2\nimport numpy as np\n\nfrom lib.easypr.core_func import getPlateType, Color, ThresholdOtsu, clearLiuDingChar\n\n\nclass CharsSegment(object):\n def __init__(self):\n self.LiuDingSize = 7\n self.MatWidth = 136\n\n self.colorThreshold = 150\n self.BluePercent = 0.3\n ...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
isabella232/DBAP-simulation
[ "bdba0b58c4a01e0742e97299ce3bd1587ad2aa25" ]
[ "adept_envs/franka/franka_2element_newcode_withchanges.py" ]
[ "\"\"\"\nCopyright 2021 Google LLC\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in ...
[ [ "torch.nn.Softmax", "numpy.abs", "torch.Tensor", "torch.load", "numpy.clip", "numpy.random.choice", "numpy.linalg.norm", "numpy.ones", "numpy.concatenate", "numpy.binary_repr", "numpy.random.rand", "numpy.array", "numpy.zeros", "numpy.where", "numpy.floa...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
myotheone/cs231n
[ "09d3fb15a3ede03fad97c0dc254e67295a157467" ]
[ "assignment2/cs231n/classifiers/fc_net.py" ]
[ "from builtins import range\nfrom builtins import object\nimport numpy as np\n\nfrom cs231n.layers import *\nfrom cs231n.layer_utils import *\n\n\nclass TwoLayerNet(object):\n \"\"\"\n A two-layer fully-connected neural network with ReLU nonlinearity and\n softmax loss that uses a modular layer design. We ...
[ [ "numpy.random.randn", "numpy.random.normal", "numpy.zeros", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
NuealYoon/deep-learning-from-scratch-master
[ "83ebba46ac599a61bb1d3b8c0c7ee1eb3d11f8af" ]
[ "ch05/train_neuralnet.py" ]
[ "# coding: utf-8\nimport sys, os\nsys.path.append(os.pardir)\n\nimport numpy as np\nfrom dataset.mnist import load_mnist\nfrom two_layer_net import TwoLayerNet\n\n# 데이터 읽기\n(x_train, t_train), (x_test, t_test) = load_mnist(normalize=True, one_hot_label=True)\n# train_data, test_Data = load_mnist(normalize=True, one...
[ [ "numpy.random.choice" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Parall-UD/sallfus
[ "ffe5ba9224c914d1da2e396b4993f59778d16216" ]
[ "sallfus/measures.py" ]
[ "# -*- coding: utf-8 -*-\nimport numpy as np\n\ndef check_images(fusioned, original):\n assert len(fusioned) == len(original), \"Supplied images have different sizes \" + \\\n str(fusioned.shape) + \" and \" + str(original.shape)\n if(len(fusioned.shape) == len(original.shape)):\n estado = 'mtom'\n ...
[ [ "numpy.array" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
NicolasHug/hmmkay
[ "24f5c1b25ef2e4ee2bc401c1a7c6cdbf87de59c6" ]
[ "benchmark.py" ]
[ "from time import time\nfrom warnings import simplefilter\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom hmmkay import HMM\nfrom hmmkay.utils import (\n _get_hmm_learn_model,\n _to_weird_format,\n make_proba_matrices,\n make_observation_sequences,\n)\n\n\nn_hidden_states, n_observable_st...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.subplots" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sys-bio/network-modeling-summer-school-2021
[ "9215861074466c045bdbbe06046c13a388f34c79" ]
[ "src/util.py" ]
[ "import pandas as pd\nimport urllib.request\n\n# Linear pathway data\nBASE_URL = \"https://github.com/sys-bio/network-modeling-summer-school-2021/raw/main/\"\nBASE_DATA_URL = \"%sdata/\" % BASE_URL\nBASE_MODULE_URL = \"%ssrc/\" % BASE_URL\nBASE_MODEL_URL = \"%smodels/\" % BASE_URL\nLOCAL_FILE = \"local_file.txt\"\n...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
alexmlamb/relational-rnn-pytorch
[ "1b16ae32988625b16b95f920b0f6fe55ed4e45e7" ]
[ "train_rmc.py" ]
[ "# copypasta from main.py of pytorch word_language_model code\n# coding: utf-8\nimport argparse\nimport time\nimport math\nimport os\nimport torch\nimport torch.nn as nn\nimport torch.onnx\nimport datetime\nimport shutil\nimport pickle\nimport data\nfrom relational_rnn_models import RelationalMemory\n\n# is it fast...
[ [ "torch.mean", "torch.onnx.export", "torch.cuda.synchronize", "torch.optim.lr_scheduler.ReduceLROnPlateau", "torch.LongTensor", "torch.load", "torch.manual_seed", "torch.no_grad", "torch.cuda.is_available", "torch.device", "torch.nn.DataParallel", "torch.t" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
daevem/tensorflow-research
[ "ebb8e8243889f55affa354c49eb54db4fbcd2c87" ]
[ "src/models/segmentation/satellite_unet_model.py" ]
[ "# https://deepsense.ai/deep-learning-for-satellite-imagery-via-image-segmentation/\nimport tensorflow as tf\nfrom tensorflow.keras import backend as K\nfrom tensorflow.keras.layers import (\n BatchNormalization,\n Conv2D,\n Conv2DTranspose,\n Input,\n MaxPooling2D,\n UpSampling2D,\n concatenat...
[ [ "tensorflow.keras.models.Model", "tensorflow.keras.layers.Conv2DTranspose", "tensorflow.keras.layers.Conv2D", "tensorflow.keras.layers.concatenate", "tensorflow.keras.layers.BatchNormalization", "tensorflow.keras.layers.MaxPooling2D", "tensorflow.keras.layers.Input" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "2.7", "2.2", "2.3", "2.4", "2.5", "2.6" ] } ]
beibeiJ/deep-reinforcement-learning
[ "ab1b0f4ada8da69af2e38d3e2e82e3ae55837c60" ]
[ "p1_navigation/prioritized_memory.py" ]
[ "import random\nimport numpy as np\nimport torch\nfrom collections import namedtuple\nfrom SumTree import SumTree\n\n\n\"\"\"\n Prioritized experience reply buffer\n Get from https://github.com/austinsilveria/Banana-Collection-DQN/blob/master/Banana_DoubleDQN_PER.py which was adjusted from original source: ht...
[ [ "numpy.random.uniform", "numpy.vstack", "torch.cuda.is_available" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
masteropen/machine-learning-flask-api-skeloton
[ "cb8405771450e12079dc9b362504ac3fdf93e92f" ]
[ "src/app/api/main.py" ]
[ "import pandas as pd\nfrom sklearn.linear_model import LinearRegression\nfrom sklearn.model_selection import train_test_split\nfrom joblib import dump\n\n_data_path = '../data/salary_data.csv'\n_dumps_path = '../dumps/salary_model.joblib'\n\ndata = pd.read_csv(_data_path)\nfeatures = data.iloc[:, :-1]\ntarget = dat...
[ [ "sklearn.linear_model.LinearRegression", "pandas.read_csv", "sklearn.model_selection.train_test_split" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
PiterPentester/luminoth
[ "da0186515586291fbb9544c98240979480355f7a" ]
[ "luminoth/datasets/base_dataset.py" ]
[ "import os\nimport tensorflow as tf\nimport sonnet as snt\n\nfrom luminoth.datasets.exceptions import InvalidDataDirectory\n\n\nclass BaseDataset(snt.AbstractModule):\n def __init__(self, config, **kwargs):\n super(BaseDataset, self).__init__(**kwargs)\n self._dataset_dir = config.dataset.dir\n ...
[ [ "tensorflow.FIFOQueue", "tensorflow.gfile.Exists", "tensorflow.train.QueueRunner", "tensorflow.train.add_queue_runner", "tensorflow.RandomShuffleQueue", "tensorflow.train.string_input_producer", "tensorflow.TFRecordReader" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10" ] } ]
vileme/diploma
[ "ae4f01aa5025345d37504b7a993e0bcdbfd33d57" ]
[ "validation.py" ]
[ "import numpy as np\nimport utils\n\nfrom torch import nn\nimport torch\nimport torch.nn.functional as F\nfrom metrics import AllInOneMeter\nimport time\nimport torchvision.transforms as transforms\n\n\ndef validation_binary(model: nn.Module, criterion, valid_loader, device, device_id, num_classes=None):\n with ...
[ [ "torch.nn.functional.binary_cross_entropy_with_logits", "numpy.histogramdd", "torch.nn.functional.sigmoid", "torch.no_grad", "torch.cuda.is_available" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
gwanglee/VisDA2020
[ "23ecc1bb2ce3ce4bece9159ca4ecc420e3e8f34c" ]
[ "devkit/data/collate_batch.py" ]
[ "# encoding: utf-8\n\"\"\"\n@author: liaoxingyu\n@contact: sherlockliao01@gmail.com\n\"\"\"\n\nimport torch\n\n\ndef train_collate_fn(batch):\n imgs, pids, _, _, = zip(*batch)\n pids = torch.tensor(pids, dtype=torch.int64)\n return torch.stack(imgs, dim=0), pids\n\n\ndef val_collate_fn(batch):\n imgs, ...
[ [ "torch.stack", "torch.tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
nollety/joseki
[ "dffc837cff185b0a1c931de7076bbefda7742405" ]
[ "src/joseki/afgl_1986.py" ]
[ "\"\"\"Module to read AFGL 1986 data files.\"\"\"\nimport enum\nimport importlib.resources as pkg_resources\n\nimport numpy as np\nimport pandas as pd\nimport xarray as xr\n\nfrom .data import afgl_1986\nfrom .units import ureg\nfrom .util import make_data_set\n\n\nclass Identifier(enum.Enum):\n \"\"\"AFGL 1986 ...
[ [ "pandas.concat", "numpy.array", "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.3", "1.1", "1.5", "1.2" ], "scipy": [], "tensorflow": [] } ]
Nexus01/zheye-crawler
[ "42a86109c73225866234b91d8d0fd067d270f54e" ]
[ "Slave.py" ]
[ "from Error import NoFolloweeError\nimport random\nimport datetime\nimport urllib\nimport requests\nimport json\nimport re\nimport time\nfrom bs4 import BeautifulSoup\nimport pymongo\nimport os\nimport json\n#from fake_useragent import UserAgent\nimport sys\nimport base64\nfrom PIL import Image\nimport cnn_test_en\...
[ [ "tensorflow.Graph" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "2.7", "1.12", "2.6", "2.2", "1.13", "2.3", "2.4", "1.4", "2.9", "1.5", "1.7", "2.5", "0.12", "1.0", "2.8", "1...
redoclag/plaidml
[ "46d9e8b3f1e1093aab2a0dfa40b2e15e3cc7d314", "46d9e8b3f1e1093aab2a0dfa40b2e15e3cc7d314" ]
[ "networks/keras/examples/reuters_mlp.py", "networks/keras/examples/addition_rnn.py" ]
[ "'''Trains and evaluate a simple MLP\non the Reuters newswire topic classification task.\n'''\nfrom __future__ import print_function\n\nimport numpy as np\nimport keras\nfrom keras.datasets import reuters\nfrom keras.models import Sequential\nfrom keras.layers import Dense, Dropout, Activation\nfrom keras.preproces...
[ [ "numpy.max", "numpy.array" ], [ "numpy.array", "numpy.random.shuffle", "numpy.random.randint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
thomasarmstrong/sstcam-simulation
[ "1da5a1dd0ce23b2a2299db72b7f3a03114689ce5" ]
[ "sstcam_simulation/event/source.py" ]
[ "import numpy as np\nfrom ..camera import Camera\nfrom .photoelectrons import Photoelectrons\nfrom .cherenkov import get_cherenkov_shower_image\n\n__all__ = [\"PhotoelectronSource\"]\n\n\nclass PhotoelectronSource:\n def __init__(self, camera, seed=None):\n \"\"\"\n Collection of methods which simu...
[ [ "numpy.arange", "numpy.repeat", "numpy.random.default_rng" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
DulinkLu/Action-Verification
[ "3f603d0e05c866ce3b62286de511bf3eb7868cad" ]
[ "utils/visualization.py" ]
[ "import torch\nimport torchvision.transforms as tf\nimport os\nimport numpy as np\n\nimport pdb\nfrom PIL import Image\n\nfrom utils.input import frames_preprocess\nfrom data.dataset import action_ids_bank\nfrom tensorboardX import SummaryWriter\nfrom tqdm import tqdm\n\nimport cv2\n\n\n\ndef sample_frames(data_pat...
[ [ "numpy.random.random", "torch.cat", "torch.cuda.device_count", "torch.tensor", "torch.no_grad", "torch.cuda.is_available", "torch.nn.DataParallel" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jingxianwen/e3sm_diags
[ "4409d0da2cb724b44e19dbfb1f132d0ccfbbed1e" ]
[ "acme_diags/plot/cartopy/cosp_histogram_plot.py" ]
[ "from __future__ import print_function\n\nimport os\nimport numpy as np\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt\nimport matplotlib.colors as colors\nfrom acme_diags.driver.utils.general import get_output_dir\nfrom acme_diags.plot import get_colormap\n\nplotTitle = {'fontsize': 11....
[ [ "matplotlib.pyplot.axvline", "matplotlib.colors.BoundaryNorm", "matplotlib.pyplot.axhline", "numpy.linspace", "matplotlib.use", "matplotlib.transforms.Bbox.from_extents", "matplotlib.pyplot.savefig", "matplotlib.pyplot.close", "matplotlib.pyplot.pcolormesh", "matplotlib.pyp...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ChristophReich1996/ToeffiPy
[ "34ca9cd97a488cdc58d2b909ba963edb80ae2b76" ]
[ "autograd/nn/optim.py" ]
[ "from typing import Iterator, Callable\n\nimport numpy as np\n\nfrom .parameter import Parameter\n\n\nclass Optimizer(object):\n \"\"\"\n Super class of optimizer\n \"\"\"\n\n def __init__(self, parameters: Callable[[], Iterator[Parameter]]) -> None:\n \"\"\"\n Constructor method\n ...
[ [ "numpy.zeros_like", "numpy.sqrt" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Saransh-cpp/liionpack
[ "82ab00ad257ccb2bc8dbcb71bc08baa30fa9ed43", "82ab00ad257ccb2bc8dbcb71bc08baa30fa9ed43" ]
[ "tests/unit/test_utils.py", "tests/integration/test_all_solvers.py" ]
[ "import liionpack as lp\nimport pandas as pd\nimport pybamm\nimport unittest\n\n\nclass utilsTest(unittest.TestCase):\n def test_interp_current(self):\n d = {\"Time\": [0, 10], \"Cells Total Current\": [2.0, 4.0]}\n df = pd.DataFrame(data=d)\n f = lp.interp_current(df)\n assert f(5) =...
[ [ "pandas.DataFrame" ], [ "numpy.allclose" ] ]
[ { "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": [] }, { "matplotlib": [], "nump...
joppichristian/tirg
[ "fba0afec562149148bf25099561fe358e8389e74" ]
[ "torch_functions.py" ]
[ "\n# TODO(lujiang): put it into the third-party\n# MIT License\n\n# Copyright (c) 2018 Nam Vo\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...
[ [ "torch.mm", "torch.transpose", "torch.norm", "torch.from_numpy", "torch.FloatTensor", "torch.clamp", "numpy.exp" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
openseg-group/detr
[ "d947cf39ab716aedf7502103fc51b85b9d82822b", "d947cf39ab716aedf7502103fc51b85b9d82822b" ]
[ "util/box_ops.py", "hrnet/hrnet.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n\"\"\"\nUtilities for bounding box manipulation and GIoU.\n\"\"\"\nimport pdb\nimport torch\nfrom torchvision.ops.boxes import box_area\n\n\ndef box_cxcywh_to_xyxy(x):\n x_c, y_c, w, h = x.unbind(-1)\n b = [(x_c - 0.5 * w), (y_c - 0.5 * ...
[ [ "torch.max", "torch.zeros", "torch.min", "torch.arange", "torch.stack", "torch.meshgrid" ], [ "torch.nn.Sequential", "torch.nn.ReLU", "torch.nn.Conv2d", "torch.nn.ModuleList" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sambit-giri/21cmtools
[ "5a5977f918abdc80e8fa9470a58667b58441c20b" ]
[ "src/tools21cm/segmentation.py" ]
[ "\"\"\"\nCreated by Michele Bianco, 9 July 2021\n\"\"\"\n\nimport numpy as np\nimport pkg_resources\nfrom tqdm import tqdm\n\nimport warnings\nwarnings.filterwarnings(\"ignore\")\n\nimport tensorflow as tf\ntry:\n from tensorflow.keras.models import load_model\n from tensorflow.keras import backend as K\nexce...
[ [ "tensorflow.python.ops.nn_ops._ensure_xent_args", "numpy.flipud", "tensorflow.python.ops.math_ops.exp", "numpy.mean", "tensorflow.python.keras.backend.log", "tensorflow.python.keras.backend.square", "numpy.fliplr", "tensorflow.python.ops.array_ops.where", "tensorflow.python.ker...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
Mick-tz/PolynomialPDEs
[ "ecb1b11c1d61f493a66163ef1624efdd3cfbf6ff" ]
[ "PoliticalPricing.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Nov 29 19:38:34 2018\n\n@author: Chino\n\"\"\"\n\nfrom scipy.misc import derivative\nfrom scipy.integrate import quad\n\n\ndef P(t, y, alpha, beta):\n \"\"\"\n penalty function associated with costumer's tendancy to\n wait for the pro...
[ [ "scipy.integrate.quad", "scipy.misc.derivative" ] ]
[ { "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" ...
XAVILLA/nbdt
[ "8016a8a57259cfa9f2cb7f872b44bcfde3eed614" ]
[ "nbdt/data/transforms.py" ]
[ "import torch\n\n\nclass InverseNormalize:\n def __init__(self, mean, std):\n self.mean = torch.Tensor(mean)[None, :, None, None]\n self.std = torch.Tensor(std)[None, :, None, None]\n\n def __call__(self, sample):\n return (sample * self.std) + self.mean\n\n def to(self, device):\n ...
[ [ "torch.Tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
00sapo/ASMD
[ "48e021f98d5fbecd09bed1cdd58024d9b471fad4" ]
[ "asmd/conversion_tool.py" ]
[ "import gzip\nimport json\nimport multiprocessing as mp\nimport os\nimport random\nimport sys\nimport tarfile\nfrom copy import deepcopy\nfrom difflib import SequenceMatcher\nfrom os.path import join as joinpath\nfrom typing import Callable, List, Optional\n\nimport numpy as np\nfrom pretty_midi.constants import IN...
[ [ "numpy.zeros", "numpy.random.default_rng" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ProfessorHuang/2D-UNet-Pytorch
[ "b3941e8dc0ac3e76b6eedb656f943f1bd66fa799" ]
[ "models/unet.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nclass DoubleConv(nn.Module):\n \"\"\"(convolution => [BN] => ReLU) * 2\"\"\"\n\n def __init__(self, in_channels, out_channels, mid_channels=None):\n super().__init__()\n if not mid_channels:\n mid_channels = out_...
[ [ "torch.nn.ConvTranspose2d", "torch.cat", "torch.nn.Conv2d", "torch.nn.MaxPool2d", "torch.nn.BatchNorm2d", "torch.nn.ReLU", "torch.nn.functional.pad" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ChristianSteger/HORAYZON
[ "ba82834d6884909ce4964197eedfb5661ad24188" ]
[ "src/geoid.py" ]
[ "# Copyright (c) 2022 ETH Zurich, Christian R. Steger\n# MIT License\n\n# Load modules\nimport os\nimport numpy as np\nfrom scipy import interpolate\n\n\n###############################################################################\n\ndef geoid_undulation(lon_ip, lat_ip, geoid=\"EGM96\", path=None):\n \"\"\"Co...
[ [ "numpy.hstack", "numpy.fromfile", "scipy.interpolate.RectBivariateSpline", "numpy.linspace", "numpy.flipud", "numpy.append", "numpy.diff" ] ]
[ { "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"...
leanhkhoi/AE_BERT_CROSS_SENTENCES
[ "e8ef8d6482db2e087ef452d2b49527e30a96e44c" ]
[ "src/common.py" ]
[ "import json\nimport os\nimport _locale\n\nfrom collections import namedtuple, deque\n\nimport numpy as np\nimport torch\nfrom torch.utils.data import RandomSampler, TensorDataset, DataLoader, SequentialSampler\n\nFILE_ENCODING = \"utf-8\" #_locale._getdefaultlocale()[1]\n\nSentences = namedtuple('Sentences', [\n ...
[ [ "numpy.unique", "torch.utils.data.TensorDataset", "torch.utils.data.DataLoader", "numpy.stack", "torch.tensor", "numpy.argmax", "torch.no_grad" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
alexcu/argus-bib-detect
[ "883ffcf99230ff83ca88eb8f9361ccc3e7f09bd2" ]
[ "preprocess.py" ]
[ "#!/usr/bin/env python3\n\n\"\"\"\n Script to preprocess OCR output for Tesseract\n\n Usage:\n python3 preprocess.py /path/to/input/dir \\\n /path/to/output/dir\n\"\"\"\n\nfrom glob import glob\nimport os\nimport shutil\nimport sys\nimport cv2\nimport numpy as np\n\ndef preprocess(img):\n \...
[ [ "numpy.median" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
fyangneil/DSFPN
[ "95ba534d451598db7af05b009aec9b40ac675182" ]
[ "detectron/roi_data/cascade_rcnn_deep_sup.py" ]
[ "# Copyright (c) 2017-present, Facebook, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl...
[ [ "numpy.concatenate", "numpy.where", "numpy.unique" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
santanaangel/shap
[ "1c1c4a45440f3475b8544251f9d9e5b43977cd0e" ]
[ "shap/explainers/other/random.py" ]
[ "from ..explainer import Explainer\nimport numpy as np\n\nclass RandomExplainer(Explainer):\n \"\"\" Simply returns random (normally distributed) feature attributions.\n\n This is only for benchmark comparisons. It supports both fully random attributions and random\n attributions that are constant across a...
[ [ "numpy.random.randn", "numpy.tile" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
acdh-oeaw/histogis
[ "cbe90e17a7e4f26849c7b97f453833e094d445b2" ]
[ "analyze/views.py" ]
[ "from django.http import JsonResponse\nfrom collections import Counter\nimport pandas as pd\nimport json\nfrom datetime import date, timedelta\nfrom django.contrib.auth.decorators import login_required\nfrom django.utils.decorators import method_decorator\nfrom django.urls import reverse\nfrom django.db.models impo...
[ [ "pandas.to_timedelta", "pandas.set_option", "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": [] } ]
NithinRama/DeepSpeed
[ "b4e5826a60b275600673a77478ecb749519caaf0" ]
[ "deepspeed/runtime/engine.py" ]
[ "'''\nCopyright 2019 The Microsoft DeepSpeed Team\n'''\nimport os\nimport re\nimport stat\nimport math\nimport torch\nimport warnings\nimport hashlib\nimport torch.distributed as dist\nfrom collections import defaultdict, OrderedDict\nfrom shutil import copyfile\n\nfrom torch.nn.modules import Module\nfrom torch.nn...
[ [ "torch.optim.Adam", "torch.distributed.broadcast", "torch.cuda.set_device", "torch.cat", "torch.load", "torch.utils.data.SequentialSampler", "torch.distributed.all_gather", "torch.distributed.is_initialized", "torch.is_tensor", "torch.distributed.barrier", "torch.optim....
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
KishManani/feature_engine
[ "6474b56aa2e2e61b579f118f656e752d48b169c9" ]
[ "feature_engine/estimator_checks.py" ]
[ "from typing import Tuple\n\nimport pandas as pd\nimport pytest\nfrom sklearn.base import clone\nfrom sklearn.datasets import make_classification\nfrom sklearn.exceptions import NotFittedError\n\n\ndef test_df(\n categorical: bool = False, datetime: bool = False\n) -> Tuple[pd.DataFrame, pd.Series]:\n \"\"\"\...
[ [ "sklearn.datasets.make_classification", "pandas.Series", "pandas.DataFrame", "sklearn.model_selection.KFold", "sklearn.model_selection.StratifiedKFold", "sklearn.base.clone", "pandas.date_range" ] ]
[ { "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": [] } ]
aveek22/tutorialspoint
[ "2a478bb91b38bcee62a857b75620741ea77a47c6" ]
[ "apache-airflow/materials/data-pipelines-with-apache-airflow-master/chapters/chapter15/dags/nyc_dag.py" ]
[ "import io\nimport json\n\nimport airflow.utils.dates\nimport geopandas\nimport pandas as pd\nimport requests\nfrom airflow.hooks.S3_hook import S3Hook\nfrom airflow.hooks.base_hook import BaseHook\nfrom airflow.models import DAG\nfrom airflow.operators.python_operator import PythonOperator\nfrom minio import Minio...
[ [ "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": [] } ]
Chaitya62/NeuralNetworks
[ "db531226a58fc2292c98df9c304b8a54b7bbceea" ]
[ "CNN.py" ]
[ "import numpy as np \nimport scipy\nimport matplotlib.pyplot as plt\n\nfrom sklearn.datasets import load_digits\n\n\n\"\"\"\nCNN with 2 CNN layer \nand one Fully connected layer\n\"\"\"\n\n\n\n\n\ndf = load_digits()\n\nfilter1 = np.random.random(9)\nfilter1 = filter1.reshape(9,1)\nbias1 = np.random.random(1)[0]\n\n...
[ [ "numpy.random.random", "numpy.zeros_like", "sklearn.datasets.load_digits", "numpy.exp", "numpy.array", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
wiekern/GenderPerformance
[ "d69d90a3f0284fb9f547f716eb8a8707d0a18e03", "d69d90a3f0284fb9f547f716eb8a8707d0a18e03" ]
[ "models/GRU/inference.py", "models/GRU/preprocess.py" ]
[ "from pathlib import Path\nimport sys\nsys.path.insert(0, str(Path.cwd().parents[1]))\n\nfrom torch.utils import data\nfrom torch.nn.utils import rnn\nfrom sklearn.metrics import accuracy_score\nfrom nltk.tokenize import word_tokenize\nimport torch\nimport torch.nn as nn\nfrom torch import optim\nimport torch.nn.fu...
[ [ "torch.nn.functional.softmax", "torch.LongTensor", "torch.max", "torch.load", "torch.utils.data.DataLoader", "torch.tensor", "torch.no_grad", "torch.sort", "torch.cuda.is_available" ], [ "numpy.random.uniform", "torch.tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
DaraDadachanji/wordle
[ "aa14f8099b3fa251c050cf54e1b8d89d0df22873" ]
[ "src/guesser.py" ]
[ "from tkinter import W\nimport pandas as pd\nimport numpy as np\nimport copy\nimport game\n\ndef assist_guesses():\n guesser = Guesser()\n while True:\n hint = get_hint()\n guesser.give_hint(hint)\n guesser.print_remaining_answers()\n\n\nclass Guesser:\n def __init__(self) -> None:\n ...
[ [ "pandas.read_csv", "numpy.vectorize" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
amazon-research/gnn-tail-generalization
[ "1ff49e62b8a2e2a7273c50dce59167ea9d9161fb", "1ff49e62b8a2e2a7273c50dce59167ea9d9161fb" ]
[ "Link_prediction_baseline/models/pretrain_masking_gin.py", "GNN_model/drop_tricks.py" ]
[ "import torch\nfrom torch import nn\nimport torch.nn.functional as F\nfrom dgl.nn.pytorch import GraphConv, SAGEConv, GINConv\nfrom dgl.nn.pytorch.glob import SumPooling, AvgPooling, MaxPooling\n\nfrom src.models.MLP import MLP as feat_MLP\n\n\nclass ApplyNodeFunc(nn.Module):\n \"\"\"Update the node feature hv w...
[ [ "torch.nn.BatchNorm1d", "torch.nn.Dropout", "torch.nn.functional.nll_loss", "torch.nn.ModuleList", "torch.nn.Linear", "torch.nn.functional.relu" ], [ "torch.ones", "torch.zeros", "torch.zeros_like", "torch.bernoulli", "torch.arange", "torch.full_like" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
open-risk/correlationMatrix
[ "2ce4ef55e234bf5ff5e4e6a8d6bb373a48147db9" ]
[ "tests/test_utils.py" ]
[ "# encoding: utf-8\n\n# (c) 2019 Open Risk, all rights reserved\n#\n# correlationMatrix is licensed under the Apache 2.0 license a copy of which is included\n# in the source distribution of correlationMatrix. This is notwithstanding any licenses of\n# third-party software included in this distribution. You may not ...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
ayush237/Business-news-scrapper
[ "82bb2c06ab5459e69333bf924c19072267344ba3" ]
[ "code/quick_scraper/quick_scraper/spiders/quick_scraper.py" ]
[ "import scrapy\nfrom bs4 import BeautifulSoup\nimport sys\nimport os\nimport _pickle as pickle\nimport pandas as pd\nfrom .scrape_with_bs4 import *\nimport datetime\nimport os\n\nDATA_DIR = os.path.join(os.getcwd(),'..','..','data')\nprint(DATA_DIR,\"$4$\"*10)\nclass ContentSpider(scrapy.Spider):\n name = \"yolo...
[ [ "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": [] } ]
adamrankin/IPCAI.CNN-US-Needle-Segmentation
[ "c2600917f8b9f13627473776d037506e58cc97c4", "c2600917f8b9f13627473776d037506e58cc97c4" ]
[ "segmentation.py", "manual_seg.py" ]
[ "import numpy as np\nfrom tensorflow.keras.models import load_model\nimport cv2\n\n\n'''\nReturns the (x, y) coordinate of the centroid of the needle in an ultrasound image\nPARAMS:\n- x: A grayscale image of shape (w, h, 1), with pixel intensities normalized to [0.0, 1.0]\nRETURNS: The predicted centroid coordinat...
[ [ "tensorflow.keras.models.load_model", "numpy.squeeze", "numpy.expand_dims" ], [ "matplotlib.pyplot.imshow", "matplotlib.pyplot.scatter", "numpy.squeeze", "matplotlib.pyplot.subplots", "numpy.save", "numpy.delete", "matplotlib.pyplot.clf", "numpy.load", "matplotl...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "2.7", "2.2", "2.3", "2.4", "2.5", "2.6" ] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
tchin-divergent/tacs
[ "34743b370da4ab6ea16d24de7c574c3fec9d333a" ]
[ "tests/constitutive_tests/test_solid_constitutive.py" ]
[ "from tacs import TACS, constitutive\nimport numpy as np\nimport unittest\n\n\nclass ConstitutiveTest(unittest.TestCase):\n def setUp(self):\n # fd/cs step size\n if TACS.dtype is complex:\n self.dh = 1e-50\n self.rtol = 1e-11\n else:\n self.dh = 1e-6\n ...
[ [ "numpy.array", "numpy.zeros", "numpy.ones" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
nikbaya/risk_gradients
[ "8a70a13ee19eef812382066c9ebccae425ad7af9" ]
[ "python/sim_tree_sequences.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Apr 29 07:39:01 2020\n\nRuns large-scale tree sequence simulations using:\n - Flat recombination map\n - Modeling chromosomes as separate tree sequences\n - Hybrid simulations (discrete-time Wright-Fisher for recent past, coalescent f...
[ [ "pandas.read_csv" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [ "2.0", "1.4", "1.1", "1.5", "1.2", "1.3" ], "scipy": [], "tensorflow": [] } ]
shreejitverma/Data-Scientist
[ "f82939a411484311171465591455880c8e354750", "f82939a411484311171465591455880c8e354750" ]
[ "Cluster Analysis in Python/Hierarchical_Clustering.py", "Cluster Analysis in Python/K-Means_Clustering.py" ]
[ "# Hierarchical Clustering\n# This chapter focuses on a popular clustering algorithm - hierarchical clustering - and its implementation in SciPy. In addition to the procedure to perform hierarchical clustering, it attempts to help you answer an important question - how many clusters are present in your data? The ch...
[ [ "scipy.cluster.hierarchy.linkage", "scipy.cluster.hierarchy.dendrogram", "matplotlib.pyplot.show", "scipy.cluster.hierarchy.fcluster" ], [ "numpy.random.seed", "scipy.cluster.vq.vq", "scipy.cluster.vq.kmeans" ] ]
[ { "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" ...
jinlafan/mmt-dropnet
[ "3c14dd3c38274aedf8b463d0c73daa9f50096e51" ]
[ "nmtpytorch/models/amnmtfeats.py" ]
[ "# -*- coding: utf-8 -*-\nimport logging\n\nimport torch\n\nfrom ..datasets import MultimodalDataset\nfrom ..layers import ConditionalMMDecoder, TextEncoder\nfrom .nmt import NMT\n\nlogger = logging.getLogger('nmtpytorch')\n\n\nclass AttentiveMNMTFeatures(NMT):\n \"\"\"An end-to-end sequence-to-sequence NMT mode...
[ [ "torch.cat" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
William-Zhanng/Protein_affinity
[ "8abd12073b182274bf464ff23fd3be406c4e39ac" ]
[ "evaluation.py" ]
[ "import os\r\nimport time\r\nimport random\r\nimport argparse\r\nimport numpy as np\r\nfrom tqdm import tqdm\r\nimport torch\r\nimport torch.nn as nn\r\nimport esm\r\n# For DDP\r\nimport torch.distributed as dist\r\nfrom torch.nn.parallel import DistributedDataParallel as DDP\r\nfrom transformers import AdamW, get_...
[ [ "torch.abs", "torch.nn.CrossEntropyLoss", "torch.distributed.init_process_group", "torch.utils.data.distributed.DistributedSampler", "torch.cuda.set_device", "numpy.random.seed", "torch.manual_seed", "torch.load", "torch.utils.data.DataLoader", "torch.no_grad", "torch.c...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sbrisard/gollum
[ "25d5b9aea63a8f2812c4b41850450fcbead64da7" ]
[ "python/tests/test_hooke.py" ]
[ "import numpy as np\nimport pytest\n\nfrom scapin.hooke import HookeFloat64_2D, HookeFloat64_3D\n\nSQRT2 = np.sqrt(2.0)\n\n_ij2i = {2: np.array([0, 1, 0]), 3: np.array([0, 1, 2, 1, 2, 0])}\n\n_ij2j = {2: np.array([0, 1, 1]), 3: np.array([0, 1, 2, 2, 0, 1])}\n\n\ndef directions_2D(num_theta):\n out = np.empty((nu...
[ [ "numpy.sqrt", "numpy.linspace", "numpy.cos", "numpy.sin", "numpy.testing.assert_allclose", "numpy.array", "numpy.zeros", "numpy.empty" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
maniteja123/numpy
[ "1147490663d36b05fad8dcce1e104601c2724560", "77ce5f48506c6305cd8987683291275726cde623" ]
[ "numpy/polynomial/laguerre.py", "numpy/distutils/fcompiler/gnu.py" ]
[ "\"\"\"\nObjects for dealing with Laguerre series.\n\nThis module provides a number of objects (mostly functions) useful for\ndealing with Laguerre series, including a `Laguerre` class that\nencapsulates the usual arithmetic operations. (General information\non how this module represents and works with such polyno...
[ [ "numpy.rollaxis", "numpy.square", "numpy.linalg.eigvals", "numpy.iterable", "numpy.abs", "numpy.asarray", "numpy.arange", "numpy.sort", "numpy.ones", "numpy.all", "numpy.linalg.lstsq", "numpy.finfo", "numpy.exp", "numpy.linalg.eigvalsh", "numpy.array", ...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [ "1.6", "1.10", "1.11", "1.12", "1.13", "1.16", "1.9", "1.18", "1.7", "1.15", "1.14", "1.17", "1...
sqrhussain/homophily-community-gnn
[ "1d980828c13c577b06c7755a1245eeba31ed699f" ]
[ "src/data/inject_edges_experiment.py" ]
[ "\n\nfrom src.data.create_stochastic_block_model import create_graph_and_node_mappings_from_file, build_stochastic_block_matrix, load_communities\nfrom src.data.create_stochastic_block_model import create_community_id_to_node_id, create_sbm_graph\nimport pandas as pd\nimport numpy as np\nimport networkx as nx\nfrom...
[ [ "numpy.amin", "numpy.ones", "numpy.array", "numpy.random.choice" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
suyashbire1/oocgcm
[ "c9616872077494b14b41915d1b6202aeea545c82" ]
[ "oocgcm/plot/plot1d.py" ]
[ "#!/usr/bin/env python\n\n\"\"\"\noocgcm.plot.plot1d\nDefine nice plotting function for unidimensional data series using matplotlib\n\"\"\"\n\nimport numpy as np\nimport pylab as plt\nimport matplotlib.mlab as mlab\nfrom matplotlib.ticker import MultipleLocator\nimport matplotlib\n\ndef spectrum_plot(ax, x, y, **kw...
[ [ "numpy.arange", "numpy.max", "numpy.abs", "numpy.min" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ashwhall/tvl
[ "78fa8d2908d8eac8a032273d3142ab530cee1a33" ]
[ "benchmarks/read_frames.py" ]
[ "import os\nimport time\n\nimport numpy as np\nimport torch\n\nimport tvl\nfrom tvl_backends.fffr import FffrBackendFactory\nfrom tvl_backends.nvdec import NvdecBackendFactory\nfrom tvl_backends.pyav import PyAvBackendFactory\n\nvideo_file = os.path.join(os.path.dirname(__file__), '../data/board_game-h264.mkv')\n\n...
[ [ "torch.device", "numpy.arange", "torch.cuda.device_count", "torch.empty" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
albacg5/TOML-Project1
[ "4c1a8caa785e1a1c09165f8b870d02db5dc472f9", "4c1a8caa785e1a1c09165f8b870d02db5dc472f9" ]
[ "Exercise_5.py", "Exercise_2.py" ]
[ "from cvxpy import *\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n# Create two scalar optimization variables.\nx = Variable(2, name='x')\n\n# Constraints\nc1 = cvxpy.square((x[0] - 1)) + cvxpy.square((x[1] - 1))\nc2 = cvxpy.square((x[0] - 1)) + cvxpy.square((x[1] + 1))\nconstraints = [c1 <= 1., c2 <= 1.]...
[ [ "matplotlib.pyplot.legend", "numpy.arange", "numpy.meshgrid", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ], [ "matplotlib.pyplot.legend", "numpy.asarray", "numpy.arange", "numpy.array", "numpy.meshgrid", "matplotlib.pyplot.show", "matplotlib.pyplot.fig...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ab-e/nerc-importer
[ "c8b4935173e995dfde3add676a1759c62e22f89b" ]
[ "harvester.py" ]
[ "import argparse\n\nimport requests\nimport configparser\nfrom xml.etree import ElementTree as ET\nimport pandas as pd\nimport numpy as np\nimport logging.config\nimport datetime\nimport json\nimport os\nimport sql_nerc\nimport configparser as ConfigParser\n#from requests.adapters import HTTPAdapter\n\ndef read_xml...
[ [ "pandas.concat", "pandas.to_datetime", "numpy.where", "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": [] } ]
shongi-yd/FEniCSopt
[ "44c7e6a70400b5f0cc84599e20391e1e4032931d" ]
[ "ind_cross_direction_sdfem.py" ]
[ "from dolfin import *\nfrom scipy.optimize import minimize\nimport numpy as np\nimport time as pyt\nimport pprint\ncoth = lambda x: 1./np.tanh(x)\n\nfrom fenicsopt.core.convdif import *\nfrom fenicsopt.examples.sc_examples import sc_setup\nimport fenicsopt.exports.results as rs\n\n##################################...
[ [ "numpy.subtract", "scipy.optimize.minimize", "numpy.transpose", "numpy.add", "numpy.tanh", "numpy.array" ] ]
[ { "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" ...
MrMaik/platformer-ml-game
[ "bbcabe3ddea1e3cfddb01b4cd60c8dd1bd79acac" ]
[ "PlatformerGame/malmopy/summaries.py" ]
[ "# --------------------------------------------------------------------------------------------------\n# Copyright (c) 2018 Microsoft Corporation\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and\n# associated documentation files (the \"Software\"), to deal i...
[ [ "numpy.amax", "numpy.histogram", "numpy.amin", "numpy.median", "numpy.dtype", "numpy.copy", "numpy.std", "numpy.mean", "numpy.isscalar", "numpy.var", "numpy.array", "numpy.zeros", "numpy.sum" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
washreve/hyp3-lib
[ "5e7f11f1de9576a519b25fb56ccdb40e72ca9982" ]
[ "hyp3lib/rasterMask.py" ]
[ "\"\"\"Generate an AOI mask and apply it\"\"\"\n\nfrom __future__ import print_function, absolute_import, division, unicode_literals\n\nimport argparse\nimport os\nimport numpy as np\nfrom osgeo import gdal\nfrom hyp3lib.asf_geometry import geotiff2data, data2geotiff\nfrom hyp3lib.asf_time_series import vector_meta...
[ [ "numpy.rint" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
lol-cubes/cygraph
[ "b8dbfdcfdb81579181a382311649d166b04c768e" ]
[ "examples/cython/setup.py" ]
[ "from setuptools import setup\n\nfrom Cython.Build import cythonize\nimport numpy as np\n\n\nsetup(\n ext_modules=cythonize(['bayesian_network.pyx']),\n include_dirs=[np.get_include()]\n)" ]
[ [ "numpy.get_include" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
GrumpyZhou/pytorch_geometric
[ "a7143b8d9ace60cf2ec1bd14ecc20ff7c3141151" ]
[ "torch_geometric/transforms/sample_points.py" ]
[ "import torch\n\n\nclass SamplePoints(object):\n r\"\"\"Uniformly samples :obj:`num` points on the mesh faces according to\n their face area.\n\n Args:\n num (int): The number of points to sample.\n remove_faces (bool, optional): If set to :obj:`False`, the face tensor\n will not b...
[ [ "torch.rand", "torch.multinomial" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mickare/Deformation-Transfer-for-Triangle-Meshes
[ "fbb3b73c78cf3df529759f7497cc1894be5754bb" ]
[ "meshlib/sparsesolver.py" ]
[ "\"\"\"\nMultithreading sparse solver, that is not needed anymore!\n\"\"\"\nimport multiprocessing\nimport os\nfrom abc import abstractmethod, ABC\nfrom typing import Union, Optional, Dict, Any, Sequence, Callable\n\nimport numpy as np\n\nfrom scipy import sparse\nimport scipy.sparse.linalg\n\n\nclass ComponentSolv...
[ [ "scipy.sparse.linalg.lsqr", "scipy.sparse.linalg.lsmr" ] ]
[ { "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" ...
iremnasir/Lyrics_Classifier
[ "e071077b925893abb6b84ac2e1bdbda2bbb957fc" ]
[ "Lyrics_Classifier/Model.py" ]
[ "import pandas as pd\nimport numpy as np\nimport spacy\nfrom sklearn.naive_bayes import MultinomialNB\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.model_selection import GridSearchCV\nfrom sys import argv\nimport warnings\nwarnings.filterwarnings('ignore')\n\ndef train_test(datafr, size_test)...
[ [ "pandas.concat", "sklearn.model_selection.GridSearchCV", "sklearn.naive_bayes.MultinomialNB", "sklearn.model_selection.train_test_split", "numpy.max" ] ]
[ { "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": [] } ]
xdr940/xdr940_Bian2019
[ "2ab982f531b4bf61593015ceeea3241d33d66963" ]
[ "loss_functions.py" ]
[ "from __future__ import division\nimport torch\nfrom torch import nn\nimport torch.nn.functional as F\nfrom inverse_warp import inverse_warp2\nimport math\n\ndevice = torch.device(\n \"cuda\") if torch.cuda.is_available() else torch.device(\"cpu\")\n\n\n# compute photometric loss (with ssim) and geometry consist...
[ [ "torch.mean", "torch.abs", "torch.max", "torch.cat", "torch.nn.functional.conv2d", "torch.median", "torch.nn.functional.adaptive_avg_pool2d", "torch.no_grad", "torch.cuda.is_available", "torch.nn.functional.interpolate", "torch.device" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
dmike16/study-notes
[ "9c12393f3bb4bacfe7bfa2489500c5129bd375ae" ]
[ "machine-learning/common/plot/discrete_scattered.py" ]
[ "import numpy as np\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\n\n\ndef plot(x1, x2, y=None, ax=None):\n if ax is None:\n ax = plt.gca()\n if y is None:\n y = np.zeros(len(x1))\n\n uy = np.unique(y)\n\n markers = ['o', '^', 'v', 'D', 's', '*', 'p', 'h', 'H', '8', '<', '>'] ...
[ [ "matplotlib.pyplot.gca", "numpy.unique" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
SoftwareDevEngResearch/AutoFunc
[ "f6ee58f00472345029891ac6f6cea585abf15cd9" ]
[ "autofunc/tests/test_get_match_factor.py" ]
[ "from autofunc.get_match_factor import match\nfrom autofunc.get_top_results import get_top_results\nfrom autofunc.find_associations import find_associations\nfrom autofunc.get_data import get_data\nimport os.path\nimport numpy as np\n\n\ndef test_1():\n\n \"\"\"\n Tests that the match factor for a known learn...
[ [ "numpy.allclose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
thunderhoser/GewitterGefahr
[ "41d207d8201dfb7d7e34a7e42d862e7fe6e1ae00" ]
[ "gewittergefahr/dissertation/myrorss/make_sanity_check_figure.py" ]
[ "\"\"\"Makes figure with sanity checks for MYRORSS saliency maps.\"\"\"\n\nimport os\nimport pickle\nimport argparse\nimport numpy\nfrom PIL import Image\nimport matplotlib\nmatplotlib.use('agg')\nfrom matplotlib import pyplot\nfrom gewittergefahr.gg_utils import general_utils\nfrom gewittergefahr.gg_utils import m...
[ [ "numpy.expand_dims", "numpy.sqrt", "matplotlib.pyplot.cm.get_cmap", "matplotlib.use", "matplotlib.pyplot.subplots", "numpy.full", "matplotlib.pyplot.close", "numpy.ravel", "numpy.array", "numpy.flip", "numpy.where" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mikehagerty/mth-inst-resp
[ "69e95bc89f01242ea0d75fe6fedee9f2714630f0" ]
[ "mth_inst_resp/plotResp.py" ]
[ "\nfrom libInst import read_sacpz_file, getResponse\nfrom libPlotResp import plotResponse\nfrom libNominals import getPoleZero\nfrom mth_utils.liblog import getLogger\n\nfrom sys import exit\nimport sys\nimport getopt\nimport numpy as np\n\nlogger = getLogger()\n\nfname = 'plotResp.py'\n\n# Most polezero files - e....
[ [ "numpy.logspace" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
raaperrotta/PySyft
[ "65a4aa120d6f162d6afb08c42ee0c1d29ed38124" ]
[ "tests/syft/core/pointer/pointer_test.py" ]
[ "# third party\nimport pytest\nimport torch as th\n\n# syft absolute\nimport syft as sy\n\n\n@pytest.mark.slow\n@pytest.mark.parametrize(\"with_verify_key\", [True, False])\ndef test_make_pointable(with_verify_key: bool) -> None:\n bob = sy.VirtualMachine(name=\"Bob\")\n root_client = bob.get_root_client()\n ...
[ [ "torch.Tensor", "torch.tensor" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
sudohainguyen/mlflow
[ "5cd6dd575941e48313e0fd686d48805e170d57c1", "1ce3b5eadf6543878a62b070fd06735d471d75d5" ]
[ "tests/statsmodels/test_statsmodels_autolog.py", "tests/pyfunc/test_spark.py" ]
[ "import pytest\nfrom unittest import mock\nimport numpy as np\nfrom statsmodels.tsa.base.tsa_model import TimeSeriesModel\nimport mlflow\nimport mlflow.statsmodels\nfrom tests.statsmodels.model_fixtures import (\n arma_model,\n ols_model,\n failing_logit_model,\n glsar_model,\n gee_model,\n glm_mo...
[ [ "numpy.testing.assert_array_almost_equal" ], [ "pandas.DataFrame", "numpy.ones" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "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", "...
gitter-badger/py-bbn
[ "f1e296ea4bb9d1392ec585fbafe34011ea2f85fd" ]
[ "docs/source/code/generate-singly.py" ]
[ "import numpy as np\n\nfrom pybbn.generator.bbngenerator import generate_singly_bbn, convert_for_exact_inference, convert_for_drawing\n\n# very important to set the seed for reproducible results\nnp.random.seed(37)\n\n# this method generates the graph, g, and probabilities, p\n# note we are generating a singly-conn...
[ [ "numpy.random.seed" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
AI-Huang/Real-NVP-TF1
[ "8f44a6415197c25ba656b5d5827e0cc6b849b2c9" ]
[ "test/test_coupling_layer.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n# @Date : Jan-06-22 07:43\n# @Author : Kan HUANG (kan.huang@connect.ust.hk)\n\n\nimport tensorflow as tf\nfrom models.real_nvp.coupling_layer import CouplingLayerCompression, MaskType\n\n\ndef main():\n in_channels = 4\n mid_channels = 8\n num_blocks = ...
[ [ "tensorflow.global_variables_initializer", "tensorflow.random.uniform", "tensorflow.placeholder", "tensorflow.Session" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
ashwinvaswani/lesion_detection
[ "26246e3954209075c56649dfb2ef565290e6dcb3" ]
[ "alignshift/models/truncated_densenet3d_acs.py" ]
[ "\"\"\"\nDenseNet121\nDifference from densenet in torchvision for higher resolution:\n1. Modify the stride of first convolution layer (7x7 with stride 2) into 1 \n2. Remove the first max-pooling layer\n\"\"\"\n\nimport re\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.utils.mod...
[ [ "torch.nn.AvgPool3d", "torch.cat", "torch.nn.functional.dropout", "torch.nn.init.constant_", "torch.nn.Conv2d", "torch.nn.init.kaiming_uniform_", "torch.nn.MaxPool3d", "torch.nn.Conv3d", "torch.utils.checkpoint.checkpoint", "torch.nn.BatchNorm3d", "torch.nn.functional.i...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
jjgoings/McMurchie-Davidson
[ "e4da94df6845ecf9876130d11fc4d62a17544e1d" ]
[ "tests/test004.py" ]
[ "import numpy as np\nfrom numpy.testing import assert_allclose \nfrom mmd.molecule import Molecule \n\n\nwater = \"\"\"\n0 1\nO 0.000000 -0.075791844 0.000000\nH 0.866811829 0.601435779 0.000000\nH -0.866811829 0.601435779 0.000000\n\"\"\"\n\ndef test_water_DZ():\n mol = Molecule(geom...
[ [ "numpy.array", "numpy.testing.assert_allclose" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
ppeddada97/SDMetrics
[ "3b83f25577292b24099668d0273f3282b61d7542", "3b83f25577292b24099668d0273f3282b61d7542" ]
[ "sdmetrics/timeseries/ml_scorers.py", "sdmetrics/multi_table/detection/parent_child.py" ]
[ "\"\"\"Machine Learning Detection based metrics for Time Series.\"\"\"\n\nimport rdt\nimport torch\nfrom sklearn.pipeline import Pipeline\nfrom sktime.classification.compose import TimeSeriesForestClassifier\n\ntry:\n from sktime.transformers.series_as_features.compose import ColumnConcatenator\nexcept (ImportEr...
[ [ "torch.nn.LSTM", "torch.nn.functional.cross_entropy", "sklearn.pipeline.Pipeline", "torch.nn.Linear", "torch.FloatTensor", "torch.cuda.is_available", "torch.nn.utils.rnn.pack_sequence", "torch.argmax" ], [ "numpy.mean" ] ]
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] }, { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [] } ]
mlcommons/mobile_open
[ "d0c62d5d633cbc6b62aa39fe33a901cc6d555b1a" ]
[ "vision/deeplab/models_and_code/model.py" ]
[ "# Lint as: python2, python3\n# 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/L...
[ [ "tensorflow.TensorShape", "tensorflow.nn.softmax", "tensorflow.concat", "tensorflow.shape", "tensorflow.reduce_mean", "tensorflow.identity", "tensorflow.squeeze", "tensorflow.expand_dims", "tensorflow.truncated_normal_initializer", "tensorflow.logging.info", "tensorflow...
[ { "matplotlib": [], "numpy": [], "pandas": [], "scipy": [], "tensorflow": [ "1.10", "1.12", "1.4", "1.13", "1.5", "1.7", "0.12", "1.0", "1.2" ] } ]
kasmith/rrt
[ "729cf0363136f75bb3eb9fd24857931c2907a462" ]
[ "rrt/rrt_base.py" ]
[ "\"\"\"Contains the basic RRT algorithm\n\nThis is only the most basic RRT algorithm (no star) but contains many of the\nimportant methods that are used for RRT planning\n\n\"\"\"\n\nfrom __future__ import division, print_function\nfrom .tree import *\nfrom .space import EmptySpace\nimport numpy as np\n\n__all__ = ...
[ [ "numpy.isinf", "numpy.array", "numpy.argmin", "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": [], ...