repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
CMRI-ProCan/CRANE
[ "30539718ca336b3b7d5d5292292a48480e5baf32" ]
[ "case_study-multicenter_dataset/crane_denoise_multicenter_64w_var.py" ]
[ "# ======================================================================\n# In this script a string of digits is used to specify the tuning parameters \n# used to produce each denoised file. Meaning of the digits are as follows,\n# Digit 0 : Artifact filter and Inverse transform setting\n# 0 = Artefact fi...
[ [ "pandas.read_csv" ] ]
yuankaihuo/MedPhysics
[ "94d8c5357b76658b9b161b541a1f195c6550ce55" ]
[ "torchsrc/models/ClssNet_svm.py" ]
[ "import numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.nn.parameter import Parameter\n\n# https://github.com/shelhamer/fcn.berkeleyvision.org/blob/master/surgery.py\ndef get_upsample_filter(size):\n \"\"\"Make a 2D bilinear kernel suitable for upsampling\"\"\"\n ...
[ [ "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.BatchNorm2d", "torch.nn.ConvTranspose2d", "torch.from_numpy", "torch.nn.ReLU", "torch.nn.functional.log_softmax", "torch.nn.Conv2d", "torch.nn.Dropout2d" ] ]
Adityaraj975/detectron2
[ "cfbe3d2149df0f463eecf919bfaa8af83bcc09c6" ]
[ "setup.py" ]
[ "#!/usr/bin/env python\n# Copyright (c) Facebook, Inc. and its affiliates.\n\nimport glob\nimport os\nimport shutil\nfrom os import path\nfrom setuptools import find_packages, setup\nfrom typing import List\nimport torch\nfrom torch.utils.cpp_extension import CUDA_HOME, CppExtension, CUDAExtension\n\ntorch_ver = [i...
[ [ "torch.__version__.split", "torch.cuda.is_available" ] ]
pedroramaciotti/diversity-patterns
[ "82b48d87b9e8d35e6651243d3cbff0400ec9a58a" ]
[ "logdiv/weblogtransform/features.py" ]
[ "import pandas as pd\n\ndef assign_page_classification(weblog,pages,classification_columns,weblog_columns_dict,pages_columns_dict):\n \"\"\"\n Associate each category and topic of requested and referrer pages of weblog using pages.csv file\n \n Parameters\n ----------\n weblog: pandas data...
[ [ "pandas.Series" ] ]
leedongminAI/DL_Tensorflow_Lab
[ "1956429adf29b972ffe638c07db8dd8dde7eabd3" ]
[ "TF_Lab_11_3.py" ]
[ "# CNN class, Layers, Ensemble\r\n\r\nimport tensorflow as tf\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport random\r\nfrom tensorflow.examples.tutorials.mnist import input_data\r\n\r\ntf.set_random_seed(777)\r\n\r\nmnist = input_data.read_data_sets(\"MNIST_data/\", one_hot=True)\r\n\r\n# hyper ...
[ [ "tensorflow.nn.softmax_cross_entropy_with_logits", "tensorflow.nn.conv2d", "tensorflow.contrib.layers.xavier_initializer", "tensorflow.matmul", "tensorflow.reshape", "tensorflow.global_variables_initializer", "tensorflow.random_normal", "tensorflow.cast", "tensorflow.set_random...
Bhanuprakash-ch/spark-1
[ "edc87e18922b98be47c298cdc3daa2b049a737e9" ]
[ "python/pyspark/mllib/linalg/__init__.py" ]
[ "#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); yo...
[ [ "numpy.bincount", "numpy.count_nonzero", "numpy.isnan", "numpy.dot", "numpy.linalg.norm", "numpy.zeros", "numpy.asarray", "numpy.array_equal", "numpy.array", "numpy.nonzero", "numpy.frombuffer", "numpy.searchsorted", "numpy.in1d" ] ]
spacefan/sarpy
[ "2791af86b568c8a8560275aee426a4718d5a4606" ]
[ "sarpy/annotation/afrl_elements/SensorInfo.py" ]
[ "\"\"\"\nDefinition for the SensorInfo AFRL labeling object\n\"\"\"\n\n__classification__ = \"UNCLASSIFIED\"\n__authors__ = \"Thomas McCullough\"\n\n\nfrom typing import Optional\nimport numpy\n\nfrom sarpy.io.xml.base import Serializable, Arrayable\nfrom sarpy.io.xml.descriptors import SerializableDescriptor, Stri...
[ [ "numpy.deg2rad", "numpy.array" ] ]
bilke/snakemake
[ "f25eaa52f77f8b976acba175f877589549a55666" ]
[ "snakemake/utils.py" ]
[ "__author__ = \"Johannes Köster\"\n__copyright__ = \"Copyright 2015-2019, Johannes Köster\"\n__email__ = \"koester@jimmy.harvard.edu\"\n__license__ = \"MIT\"\n\nimport os\nimport json\nimport re\nimport inspect\nimport textwrap\nimport platform\nfrom itertools import chain\nimport collections\nimport multiprocessin...
[ [ "pandas.isnull", "pandas.DataFrame", "pandas.Series" ] ]
JPLMLIA/OWLS-Autonomy
[ "aa3b11451c3c58929e53c45c2b8cd65206f53072" ]
[ "src/helm_dhm/classifier/test/test_classifier.py" ]
[ "import os\nimport os.path as op\nimport pytest\nimport copy\n\nimport yaml\n\nfrom helm_dhm.classifier.classifier import *\nfrom helm_dhm.validate import utils\nfrom utils.dir_helper import get_batch_subdir, get_exp_subdir\nfrom sklearn.ensemble import RandomForestClassifier\n\n\ndef setup_module():\n \"\"\"Ini...
[ [ "sklearn.ensemble.RandomForestClassifier" ] ]
yumemi5k/multiflexxlib
[ "d30c149eebbe40dcf5950e21efed2c4f286859fd" ]
[ "examples/drawing_to_existing_ax.py" ]
[ "# Draws into existing matplotlib axes object, for when you absolutely need to control everything.\nimport multiflexxlib as mfl\nimport matplotlib.pyplot as plt\ndf = mfl.read_and_bin()\nf, axes = plt.subplots(nrows=2, ncols=2, sharex=True, sharey=True)\n\nax = axes[0, 0]\nmfl.draw_voronoi_patch(ax, df.data.loc[2])...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.subplots" ] ]
jackh423/python
[ "4187c16a1d6c1269d188a4a039e0a16020de51d0" ]
[ "CIS41B/test_result_parser/csv_files/combine_csv.py" ]
[ "import os\nimport glob\nimport pandas as pd\n\nos.chdir(\"/Users/jakkus/PycharmProjects/CIS41B/test_result_parser/csv_files\")\n\nextension = 'csv'\nall_filenames = [i for i in glob.glob('*.{}'.format(extension))]\n\n# combine all files in the list\ncombined_csv = pd.concat([pd.read_csv(f) for f in all_filenames ]...
[ [ "pandas.read_csv" ] ]
albertmundu/sgg-benchmark
[ "c947c5e68f19b9c34c96dbb76ae36b58198cc538" ]
[ "scene_graph_benchmark/relation_head/relation_head.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n# Copyright (c) 2021 Microsoft Corporation. Licensed under the MIT license.\n\"\"\"\nRelation head for predicting relationship between object pairs.\n\"\"\"\nimport os.path as op\n\nimport numpy as np\nimport torch\n\nfrom maskrcnn_benchmark....
[ [ "torch.stack", "torch.arange", "torch.no_grad", "numpy.load", "torch.tensor", "torch.log" ] ]
Elite-Volumetric-Capture-Sqad/DDRNet
[ "10340d1bff26c41e429562d8ff42fc15afd9e3d5" ]
[ "src/trainer.py" ]
[ "import os\nimport time\nimport logging\nfrom operator import mul\nfrom functools import reduce\nimport numpy as np\nimport tensorflow as tf\nslim = tf.contrib.slim\n\nimport ops\nimport utils\nimport model\nfrom losses import LOSSES_COLLECTION\n\nclass Trainer(object):\n def __init__(self, filename, config):\n ...
[ [ "tensorflow.reduce_min", "tensorflow.ones_like", "tensorflow.logical_not", "tensorflow.zeros_like", "tensorflow.clip_by_value", "tensorflow.stack", "tensorflow.cast", "tensorflow.trainable_variables", "tensorflow.concat", "tensorflow.less", "tensorflow.train.Saver", ...
gprashmi/Deep-Learning
[ "68ce969ada79cbf216baf702ca8d3c4042105bdb" ]
[ "NN_from_scratch_Titanic_Survival_Prediction/neural_network_model.py" ]
[ "\"\"\"\n\nThis file implements Neural Network from scratch that includes adding multiple layers, different activation functions, feed forward, calculating MSE loss, back propagation, weight and bias updates and finally predicting on the test data.\n\nClass Layer implements different layers, initialization of weigh...
[ [ "numpy.dot", "numpy.random.rand", "numpy.atleast_2d", "numpy.random.seed", "numpy.exp", "sklearn.metrics.accuracy_score", "numpy.tanh", "numpy.maximum" ] ]
eellison/pyctr
[ "056a85cd338d2977f69483d0c735bb695666e2aa" ]
[ "examples/numpy/numpy_to_tf.py" ]
[ "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed t...
[ [ "tensorflow.range", "tensorflow.concat", "tensorflow.transpose", "tensorflow.constant", "tensorflow.reduce_max", "tensorflow.linalg.matmul", "tensorflow.tanh" ] ]
LabForComputationalVision/pooling-windows
[ "96e68879edc52c8817034e16ad26d95c60b4d91b" ]
[ "pooling/utils.py" ]
[ "#!/usr/bin/env python3\nimport numpy as np\nimport warnings\nimport torch\ntry:\n from IPython.display import HTML\nexcept ImportError:\n warnings.warn(\"Unable to import IPython.display.HTML\")\n\n\ndef to_numpy(x):\n r\"\"\"Cast tensor to numpy in the most conservative way possible.\n\n Parameters\n ...
[ [ "torch.atan2", "numpy.power", "torch.arange" ] ]
looooongChen/STNeuroNet
[ "6537096d8b2c05858320703418e2a3e2897be928" ]
[ "Software/STNeuroNet/application_driver.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nThis module defines a general procedure for running applications\nExample usage:\n app_driver = ApplicationDriver()\n app_driver.initialise_application(system_param, input_data_param)\n app_driver.run_application()\n\nsystem_param and input_data_param should be generated u...
[ [ "tensorflow.train.Coordinator", "tensorflow.Graph.finalize", "tensorflow.Graph", "tensorflow.Session", "tensorflow.train.Saver", "tensorflow.logging.info", "tensorflow.train.get_checkpoint_state", "tensorflow.python.client.device_lib.list_local_devices", "tensorflow.ConfigProto...
yudongqiu/gomoku
[ "4a95f2a5008f31fed5cb92c6bd6d55f9669ddd06" ]
[ "swap_start/tf_train/from_random/no_skip/gomoku_train_swap.py" ]
[ "#!/usr/bin/env python\n# -- coding: utf-8 --\n\n#==========================\n#= Gomoku Game =\n#==========================\n\nfrom __future__ import print_function, division\nimport os, sys, time, collections\nfrom functools import update_wrapper\nimport pickle, h5py\nimport numpy as np\nimport random\n...
[ [ "numpy.array", "numpy.empty" ] ]
yjlee22/FedShare
[ "9a8e89b6975cd505005fc79a0b0add72351bab9c" ]
[ "src/nets.py" ]
[ "import torch\nfrom torch import nn\nimport torch.nn.functional as F\nfrom torchvision import transforms\n\nclass MLP(nn.Module):\n def __init__(self, dim_in, dim_hidden, dim_out):\n super(MLP, self).__init__()\n self.layer_input = nn.Linear(dim_in, dim_hidden)\n self.relu = nn.ReLU()\n ...
[ [ "torch.nn.Linear", "torch.nn.Dropout", "torch.nn.AdaptiveAvgPool2d", "torch.nn.MaxPool2d", "torch.nn.ReLU", "torch.nn.Conv2d", "torch.flatten", "torch.nn.functional.max_pool2d" ] ]
microsoft/vision-longformer
[ "c9ce386de3e633bb3c805368d118356fbd696487" ]
[ "src/models/layers/srformer.py" ]
[ "import torch\nfrom torch import nn\n\n\nclass SRSelfAttention(nn.Module):\n def __init__(self, dim, rratio=2, num_heads=8, qkv_bias=False,\n qk_scale=None, attn_drop=0., proj_drop=0.):\n super().__init__()\n assert (dim % num_heads) == 0, 'dimension must be divisible by the number ...
[ [ "torch.nn.Linear", "torch.nn.Dropout", "torch.einsum", "torch.max", "torch.nn.Conv2d", "torch.nn.InstanceNorm2d" ] ]
mgeplf/NeuroM
[ "e21c01979de3db643c309b6bf2fe0b5dc9363c3a", "61a7b5de0c3bf3c07d6eb3270c28d21be6ea7865" ]
[ "neurom/check/neuron_checks.py", "examples/plot_features.py" ]
[ "# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project\n# All rights reserved.\n#\n# This file is part of NeuroM <https://github.com/BlueBrain/NeuroM>\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following cond...
[ [ "numpy.linalg.norm", "numpy.mean" ], [ "scipy.stats.norm.pdf", "numpy.histogram", "numpy.sum", "matplotlib.backends.backend_pdf.PdfPages", "scipy.stats.uniform.pdf", "numpy.linspace" ] ]
SimonKrughoff/squash-bokeh
[ "bc033c176ef044b4cfa743ee93272892ef36405e" ]
[ "app/AMx/amx_base.py" ]
[ "import os\nimport sys\n\nimport numpy as np\n\nfrom bokeh.io import curdoc\nfrom bokeh.models import ColumnDataSource\n\n# This is needed to import the api_helper module\nBASE_DIR = os.path.dirname(\n os.path.dirname(os.path.abspath(__file__))\n)\nsys.path.append(os.path.join(BASE_DIR))\nfrom api_helper import ...
[ [ "numpy.array" ] ]
UMBCvision/CMSF
[ "4aaac1833a0c8cfd67aa05762e43478983d74c08" ]
[ "supervised/util.py" ]
[ "from __future__ import print_function\nimport math\n\nimport torch\nimport numpy as np\n\n\n# NOTE: assumes that the epoch starts with 1\ndef adjust_learning_rate(epoch, opt, optimizer):\n if hasattr(opt, 'cos') and opt.cos:\n # NOTE: since epoch starts with 1, we have to subtract 1\n new_lr = opt...
[ [ "numpy.random.seed", "torch.no_grad", "numpy.asarray" ] ]
jmargeta/pyvista
[ "c49a6abae7cc62d242f12ec45a6b22b524db1ec8" ]
[ "tests/test_dataset.py" ]
[ "\"\"\"Tests for pyvista.core.dataset.\"\"\"\n\nimport pickle\n\nfrom hypothesis import HealthCheck, assume, given, settings\nfrom hypothesis.extra.numpy import array_shapes, arrays\nfrom hypothesis.strategies import composite, floats, integers, one_of\nimport numpy as np\nimport pytest\nimport vtk\nfrom vtk.util.n...
[ [ "numpy.isinf", "numpy.array", "numpy.isnan", "numpy.empty", "numpy.random.rand", "numpy.zeros", "numpy.array_equal", "numpy.sin", "numpy.ones", "numpy.hstack", "numpy.eye", "numpy.allclose", "numpy.any", "numpy.arange", "numpy.cos", "numpy.all", ...
Siddhant021295/Gesture-Recognation-IPN-Hands
[ "cd9bff56b88daa8c9d4397974e96baa599851d59" ]
[ "utils_.py" ]
[ "from __future__ import division\r\nimport math\r\nimport time\r\nimport tqdm\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nfrom torch.autograd import Variable\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nimport matplotlib.patches as patches\r\n\r\n\r\ndef to_cpu(tens...
[ [ "numpy.concatenate", "numpy.zeros_like", "numpy.array", "torch.stack", "torch.min", "numpy.zeros", "torch.max", "torch.nn.init.constant_", "numpy.sum", "torch.clamp", "numpy.where", "torch.nn.init.normal_", "numpy.argsort", "torch.log", "numpy.unique", ...
ZehuiTIAN/QuTorch
[ "f3a504d64aee52056dffcc716a66e66206b88ffa" ]
[ "SelfAttn/Q_attention.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# # Attention - Qutorch\n\n# In[72]:\n\n\nimport numpy as np\nimport math, copy, time\nimport torch.nn as nn\nimport torch\nimport torch.nn.functional as F\n\nfrom torch.autograd import Variable\nimport matplotlib.pyplot as plt\nimport seaborn\nseaborn.set_context(context=...
[ [ "torch.zeros", "torch.nn.Linear", "torch.cat", "torch.nn.Dropout", "torch.cos", "torch.conj", "torch.sin", "torch.no_grad", "torch.ones", "torch.kron", "torch.tensor", "torch.eye", "torch.empty", "torch.exp" ] ]
ZhihaoAIRobotic/meshpy
[ "3ab04b0025be719ad2ac5d63168e9fda96a89b8d" ]
[ "meshpy/stp_file.py" ]
[ "\"\"\"\nContains class that allows reading and writing stable pose data.\nRun this file with the following command: python stp_file.py MIN_PROB DIR_PATH\n\nMIN_PROB -- Minimum Probability of a given pose being realized.\nDIR_PATH -- Path to directory containing .obj files to be converted to .stp files (e.g. ~/obj_...
[ [ "numpy.array" ] ]
Sean1708/uniplot
[ "c4a35b8f5cdbf6d9ecd5ace6a23c17ca76d876d5" ]
[ "uniplot/cli.py" ]
[ "\"\"\"Handles the main running of the program from the command-line.\"\"\"\nimport os\nimport os.path\nimport argparse\nfrom . import parse, plot\nfrom .__about__ import __version__\nfrom matplotlib import pyplot\n\n\ndef arg_setup():\n \"\"\"Setup the argument parser.\"\"\"\n arg_parser = argparse.ArgumentP...
[ [ "matplotlib.pyplot.figure" ] ]
r-barnes/vision
[ "6d459c7b859ee9617f9f619ce58c3118413a0210" ]
[ "torchvision/models/mobilenetv2.py" ]
[ "import warnings\nfrom typing import Callable, Any, Optional, List\n\nimport torch\nfrom torch import Tensor\nfrom torch import nn\n\nfrom .._internally_replaced_utils import load_state_dict_from_url\nfrom ..ops.misc import ConvNormActivation\nfrom ._utils import _make_divisible\n\n\n__all__ = [\"MobileNetV2\", \"m...
[ [ "torch.nn.Linear", "torch.nn.Dropout", "torch.nn.Sequential", "torch.nn.init.kaiming_normal_", "torch.nn.functional.adaptive_avg_pool2d", "torch.nn.init.ones_", "torch.nn.Conv2d", "torch.nn.init.normal_", "torch.flatten", "torch.nn.init.zeros_" ] ]
alvlasov/master-thesis
[ "ab8b702ebd8cc6af30522c5693db7c13adfa2f87" ]
[ "sources/lib.py" ]
[ "import sys\nimport html\nimport logging\nimport shelve\nimport concurrent.futures\n\nimport json\nimport re\n\nfrom operator import itemgetter\nfrom collections import Counter\nfrom datetime import datetime, timedelta\nfrom importlib import reload\n\nimport pandas as pd\nimport numpy as np\nimport scipy as sp\nimp...
[ [ "numpy.set_printoptions", "pandas.set_option" ] ]
KennethNwanoro/PyBaMM
[ "c092252f53220e18eb9cfe07d1f4df7f88fb36ac" ]
[ "pybamm/solvers/solution.py" ]
[ "#\n# Solution class\n#\nimport casadi\nimport numbers\nimport numpy as np\nimport pickle\nimport pybamm\nimport pandas as pd\nfrom scipy.io import savemat\n\n\nclass Solution(object):\n \"\"\"\n Class containing the solution of, and various attributes associated with, a PyBaMM\n model.\n\n Parameters\n...
[ [ "numpy.concatenate", "numpy.array", "pandas.DataFrame", "scipy.io.savemat", "numpy.diff", "numpy.hstack" ] ]
lizhangjie316/PointCloud-Case-Analysis
[ "bdbb62d33ef659a3a0eef81ce16358db45b4c63b" ]
[ "Pointnet2/models/pointnet2_cls_msg.py" ]
[ "import torch.nn as nn\nimport torch.nn.functional as F\nfrom pointnet_util import PointNetSetAbstractionMsg, PointNetSetAbstraction\n\n\nclass get_model(nn.Module):\n def __init__(self,num_class,normal_channel=True):\n super(get_model, self).__init__()\n in_channel = 3 if normal_channel else 0\n ...
[ [ "torch.nn.Linear", "torch.nn.Dropout", "torch.nn.functional.log_softmax", "torch.nn.BatchNorm1d", "torch.nn.functional.nll_loss" ] ]
shikharbahl/neural-dynamic-policies
[ "6c8afe3b1d66850d76edb2bb7f401a0580c77d17" ]
[ "dmp/dmp/utils/mnist_cnn.py" ]
[ "\"\"\"\nDefine a basic MNIST CNN.\n\nBased on the PyTorch example code here:\nhttps://github.com/pytorch/examples/blob/master/mnist/main.py\n\"\"\"\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\nclass CNN(nn.Module):\n def __init__(self):\n super(CNN, self).__init__()\n self.conv1 = ...
[ [ "torch.nn.Linear", "torch.nn.Conv2d", "torch.nn.functional.max_pool2d", "torch.nn.functional.log_softmax" ] ]
saultyevil/Python-scripts
[ "38eaf3c448a509b3751409cae22ecd553cdd2bfc" ]
[ "sv_wind_velocity.py" ]
[ "#!/usr/bin/env python3\n\n\"\"\"\nPlot the velocity law for a Schlosman and Vitello wind for a CV disk wind.\n\"\"\"\n\n\nimport alpha_disc_spectrum\nimport numpy as np\nfrom constants import *\nfrom scipy.optimize import brentq\nfrom matplotlib import pyplot as plt\n\nverbose = False\n\n\nclass SV93wind:\n \"\...
[ [ "numpy.sin", "matplotlib.pyplot.xlim", "numpy.zeros", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.ylim", "numpy.tan", "matplotlib.pyplot.legend", "scipy.optimize.brentq", "matplotlib.pyplot.figure", "matplotlib.pyplot.ylabel", "numpy.sqrt", "numpy.deg2rad", "...
combra-lab/combra_loihi
[ "372193969ec67872374c742b03e6601271fc95db" ]
[ "demos/demo2.py" ]
[ "\"\"\"\nMIT License\n\nCopyright (c) 2018 Guangzhi Tang\nCopyright (c) 2018 Arpit Shah\nCopyright (c) 2018 Computational Brain Lab, Computer Science Department, Rutgers University\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (t...
[ [ "matplotlib.use", "numpy.random.rand", "numpy.random.seed", "matplotlib.pyplot.xlabel", "numpy.ones", "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "numpy.where", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.subplot" ] ]
fmyuan/amanzi
[ "edb7b815ae6c22956c8519acb9d87b92a9915ed4" ]
[ "test_suites/verification/transport/saturated/transient/dual_porosity_1d/amanzi_dual_porosity_1d.py" ]
[ "import matplotlib.pyplot as plt\nimport numpy\nimport math\nfrom amanzi_xml.observations.ObservationXMLv2 import ObservationXMLv2 as ObsXML\nfrom amanzi_xml.observations.ObservationData import ObservationData as ObsDATA\nimport amanzi_xml.utils.search as search\nimport prettytable\n\n# load input xml file\n# -- c...
[ [ "matplotlib.pyplot.figure" ] ]
collab-uniba/ml-api-python-template
[ "1e02847c6432a6cff8f2105949feee67b98d13be" ]
[ "template/data/data.py" ]
[ "\"\"\"\nTrain a scikit-learn model on UCI Wine Quality Dataset\nhttps://archive.ics.uci.edu/ml/datasets/wine+quality\n\"\"\"\n\nfrom pathlib import Path\n\nimport pandas as pd\n\nfrom config.config import DATA_DIR, MODELS_DIR, logger\nfrom template.utils import save_json\n\n\ndef get_features(dataset: pd.DataFrame...
[ [ "pandas.read_csv" ] ]
LukeWood/sota-dqn
[ "2a01afb365f882d15ba127ee4deaa57c42987731" ]
[ "sota_dqn/dqn_base.py" ]
[ "from functools import reduce\nfrom collections import deque\n\nimport numpy as np\n\n\nclass DQNBase:\n def __init__(self,\n input_shape=None,\n frame_buffer_size=None,\n observation_preprocessors=[]):\n self.input_shape = input_shape\n self.frame_bu...
[ [ "numpy.zeros", "numpy.expand_dims" ] ]
mgharbi/hornet
[ "b06d0119e2fb22c62c757161e6d351a304720544" ]
[ "hdrnet/bin/train.py" ]
[ "#!/usr/bin/env python\n# Copyright 2016 Google 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 ap...
[ [ "tensorflow.set_random_seed", "tensorflow.convert_to_tensor", "tensorflow.train.AdamOptimizer", "tensorflow.summary.scalar", "tensorflow.group", "tensorflow.contrib.framework.get_or_create_global_step", "tensorflow.get_collection", "tensorflow.ConfigProto", "tensorflow.variable...
kcw0331/kepler-mapper
[ "be575c8fa4c5de03213e15138d95eb07d60bce2c" ]
[ "examples/plot_breast_cancer.py" ]
[ "\"\"\"\n=============\nBreast Cancer\n=============\n\nThis example generates a Mapper built from the `Wisconsin Breast Cancer Dataset`_.\n\n.. _Wisconsin Breast Cancer Dataset: https://www.kaggle.com/uciml/breast-cancer-wisconsin-data\n\n\nThe reasoning behind the choice of lenses in the demonstration below is:\n...
[ [ "numpy.array", "sklearn.cluster.KMeans", "sklearn.ensemble.IsolationForest", "matplotlib.pyplot.show", "pandas.read_csv" ] ]
hanhan9449/mace
[ "63feaf5055bab6a081d36edfab8f963a624899aa" ]
[ "tools/validate.py" ]
[ "# Copyright 2018 The MACE Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required b...
[ [ "numpy.linalg.norm", "numpy.empty", "numpy.dot", "tensorflow.GraphDef", "tensorflow.reset_default_graph", "tensorflow.import_graph_def", "tensorflow.Session", "numpy.argmax", "numpy.fromfile" ] ]
zhangchenwei115/lightweightopenpose__explain
[ "96bea30913fe7b0f0511fcbc57b3ccecba23d216" ]
[ "demotest.py" ]
[ "import argparse\n\nimport cv2\nimport numpy as np\nimport torch\n\nfrom models.with_mobilenet import PoseEstimationWithMobileNet\nfrom modules.keypoints import extract_keypoints, group_keypoints\nfrom modules.load_state import load_state\nfrom modules.pose import Pose, track_poses\nfrom val import normalize, pad_w...
[ [ "numpy.array", "numpy.ones", "torch.from_numpy", "numpy.float32", "torch.load" ] ]
mhmorta/continual-learning-1
[ "959d5238d4dd015245592993b5d044572ab58c90" ]
[ "data.py" ]
[ "import copy\nimport numpy as np\nfrom torchvision import datasets, transforms\nfrom torch.utils.data import ConcatDataset, Dataset\nimport torch\n\n\ndef _permutate_image_pixels(image, permutation):\n '''Permutate the pixels of an image according to [permutation].\n\n [image] 3D-tensor containing the...
[ [ "numpy.random.permutation", "numpy.floor", "torch.from_numpy" ] ]
elgong/semi-supervised-DL-using-pseduo-label
[ "2259c6ef93939f247f71a9d7f6766224120f2548" ]
[ "cifar10-classification/utils/utils2.py" ]
[ "import torch\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport torchvision.transforms.functional as F\nfrom PIL import Image, ImageOps, ImageEnhance\nfrom torchvision import transforms\n\nmean = [0.485, 0.456, 0.406]\nstd = [0.229, 0.224, 0.225]\n\ndef visualizationImage(imgs):\n for index, img in en...
[ [ "matplotlib.pyplot.subplot", "torch.stack", "torch.as_tensor", "matplotlib.pyplot.axis", "matplotlib.pyplot.imshow" ] ]
martinstefanik/processes
[ "44f95d99995ec0a2dc530f25d3adf69ebfb69841" ]
[ "tests/test_brownian_motion.py" ]
[ "\"\"\"Tests for the BrownianMotion class.\"\"\"\n\n\nimport numpy as np\nimport pytest\n\nfrom processes.processes import BrownianMotion\n\n\n@pytest.fixture(scope=\"module\")\ndef process():\n return BrownianMotion(mu=0.2, sigma=0.1)\n\n\n@pytest.mark.parametrize(\"mu, sigma\", [(1, -2), (1, {}), ({}, 1.2)])\n...
[ [ "numpy.all", "numpy.array" ] ]
wufanyou/growth-ring-detection
[ "27989870e12ab149413363a99080f7684db6cf1a" ]
[ "utils/mean_ap.py" ]
[ "# Copyright (c) OpenMMLab. All rights reserved.\n# Modified by FW\n\nfrom multiprocessing import Pool\nimport numpy as np\n\n\ndef bbox_overlaps(bboxes1, bboxes2, mode=\"iou\", eps=1e-6, use_legacy_coordinate=False):\n \"\"\"Calculate the ious between each bbox of bboxes1 and bboxes2.\n Args:\n bboxes...
[ [ "numpy.zeros_like", "numpy.array", "numpy.empty", "numpy.zeros", "numpy.minimum", "numpy.sum", "numpy.ones", "numpy.finfo", "numpy.any", "numpy.where", "numpy.arange", "numpy.argsort", "numpy.cumsum", "numpy.hstack", "numpy.vstack", "numpy.maximum" ...
samuelreh/rtlive.ca
[ "5ce5d9c9f7469373881ac12e17d87668d5a33d2a" ]
[ "covid/data_processor.py" ]
[ "from dataclasses import dataclass\n\nimport pandas as pd\n\n\ndef factory(region: str):\n if region == \"BC\":\n return BCDataProcessor()\n\n return CanadaDataProcessor(region)\n\n\n@dataclass\nclass CanadaDataProcessor:\n region: str\n\n BASE_URL = \"https://raw.githubusercontent.com/ishaberry/...
[ [ "pandas.to_datetime", "pandas.read_csv", "pandas.merge" ] ]
derong97/keras-frcnn
[ "68de0d32c7dd2672e61fe0f35367dd08a9e35d09" ]
[ "train_frcnn.py" ]
[ "from __future__ import division\nimport random\nimport pprint\nimport sys\nimport time\nimport numpy as np\nfrom optparse import OptionParser\nimport pickle\nimport re\n\nfrom keras import backend as K\nfrom keras.optimizers import Adam, SGD, RMSprop\nfrom keras.layers import Input\nfrom keras.models import Model\...
[ [ "numpy.random.choice", "numpy.zeros", "numpy.mean", "numpy.where", "numpy.random.randint" ] ]
paulWegiel/ViolinOptimalControl
[ "0b9bc7b5ff3249abbf0f971da5c7d1efa8c03c75" ]
[ "analyses/show_optim_control.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\n\nimport biorbd\nfrom BiorbdViz import BiorbdViz\n\nimport analyses.utils as utils\n\n\n# Options\nmodel_name = \"BrasViolon\"\noutput_files = \"RepeatedUpAndDownBow\"\nfun_dyn = utils.dynamics_no_contact\nrunge_kutta_algo = 'rk45'\nnb_intervals = 30\nnb_phases ...
[ [ "numpy.max", "matplotlib.pyplot.ylim", "matplotlib.pyplot.plot", "matplotlib.pyplot.title", "matplotlib.pyplot.sca", "matplotlib.pyplot.figure", "matplotlib.pyplot.tight_layout", "numpy.append", "matplotlib.pyplot.show", "matplotlib.pyplot.subplot" ] ]
aqibmumtaz/CogAlg
[ "36009f456be93833dd44038c8adbd99b6037383c" ]
[ "frame_2D_alg/frame_blobs.py" ]
[ "'''\n 2D version of first-level core algorithm includes frame_blobs, intra_blob (recursive search within blobs), and blob2_P_blob.\n\n Blob is 2D pattern: connectivity cluster defined by the sign of gradient deviation. Gradient represents 2D variation\n per pixel. It is used as inverse measure of partial ...
[ [ "numpy.full", "numpy.zeros_like", "numpy.empty", "numpy.hypot" ] ]
Team-Horus/project-athena
[ "0b59c302cc8fb414607e871a2ae0bc0758ca7400" ]
[ "src/utils/data.py" ]
[ "\"\"\"\n\n@author: Ying Meng (y(dot)meng201011(at)gmail(dot)com)\n\"\"\"\n\nimport os\nimport random\nimport time\n\nimport keras\nimport numpy as np\nfrom keras.datasets import mnist as MNIST\nfrom keras.datasets import cifar100 as CIFAR100\n\nfrom torchvision import datasets, transforms\nimport torch\nfrom torch...
[ [ "numpy.asarray", "numpy.save", "torch.LongTensor", "torch.utils.data.DataLoader", "numpy.transpose", "numpy.argmax", "torch.Tensor" ] ]
HanyuWu/CarND-Capstone
[ "e8d519fd2dd2af2aec3a84d395a3438bbe366115" ]
[ "ros/src/waypoint_updater/waypoint_updater.py" ]
[ "#!/usr/bin/env python\n\nimport rospy\nfrom geometry_msgs.msg import PoseStamped\nfrom std_msgs.msg import Int32\nfrom styx_msgs.msg import Lane, Waypoint\nfrom scipy.spatial import KDTree\nimport numpy as np\n\nimport math\n\n'''\nThis node will publish waypoints from the car's current position to some `x` distan...
[ [ "scipy.spatial.KDTree", "numpy.array", "numpy.dot" ] ]
wanji/hdidx
[ "7b816f651cdb7791e8761ad14b943153a94d4f0a" ]
[ "tests/test_cext.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n#########################################################################\n#########################################################################\n\n\"\"\"\n File Name: test_cext.py\n Author: Wan Ji\n E-mail: wanji@live.com\n Created on: Wed Nov 5 16:41:24...
[ [ "numpy.random.random", "numpy.require", "numpy.random.random_integers", "numpy.abs" ] ]
milesimarco/bvh-parser
[ "6b7e2f6c4400f3696070d93e21297d775a7c35fa" ]
[ "src/bvh_functions.py" ]
[ "import numpy as np\nimport math\nfrom transforms3d.euler import mat2euler\n\ndef print_status(actual, total): # actual : total = % : 100\n print(\"############################## \" + str(int(round(actual * 100 / total))) + \"% ##########\")\n\ndef time_print(start, end, motiv = \"\"):\n elapsed = end - star...
[ [ "numpy.identity" ] ]
vlad17/mips_revisit
[ "0777b37d9727d785487379e5b1f6dcd146d8b17c", "0777b37d9727d785487379e5b1f6dcd146d8b17c" ]
[ "mips_revisit/huggingface/tokenization_transfo_xl.py", "mips_revisit/sync.py" ]
[ "# coding=utf-8\n# Copyright 2018 Google AI, Google Brain and Carnegie Mellon University 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 w...
[ [ "numpy.random.normal", "torch.cat", "torch.save", "numpy.random.shuffle", "torch.LongTensor", "torch.tensor", "torch.load", "numpy.random.random" ], [ "tensorflow.gfile.Exists" ] ]
Hejinzefinance/ASP
[ "afe8a748bbae9c026f020379d0be3e526af08b31" ]
[ "py/HW3/option_models/bsm.py" ]
[ " # -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Sep 19 22:56:58 2017\n\n@author: jaehyuk\n\"\"\"\n\nimport numpy as np\nimport scipy.stats as ss\nimport scipy.optimize as sopt\n\ndef price(strike, spot, texp, vol, intr=0.0, divr=0.0, cp_sign=1):\n div_fac = np.exp(-texp*divr)\n disc_fac = np.exp(-texp*in...
[ [ "numpy.log", "scipy.optimize.brentq", "numpy.fmax", "numpy.exp", "numpy.sqrt", "scipy.stats.norm.cdf" ] ]
VMBoehm/MADLens
[ "3d024515098bb591e5c7f7b4e34b7e1903f8c3ab" ]
[ "MADLens/lightcone_shotnoise.py" ]
[ "from vmad import autooperator, operator\nfrom vmad.core import stdlib\nfrom vmad.lib import fastpm\nfrom vmad.lib import linalg\nfrom vmad.lib.fastpm import FastPMSimulation, ParticleMesh\nimport numpy\nfrom vmad.lib.linalg import sum, mul\nimport scipy \nfrom mpi4py import MPI\nimport numpy as np\nimport MADLens....
[ [ "numpy.zeros_like", "numpy.ceil", "scipy.interpolate.interp1d", "numpy.asarray", "numpy.zeros", "numpy.array", "numpy.random.seed", "numpy.ones", "numpy.linspace", "numpy.shape", "numpy.multiply", "numpy.random.randint", "numpy.einsum", "numpy.arange", "...
AnandIJain/sip
[ "7eadee83a1bf5d447efd42ebab69197a4e73d52a" ]
[ "sips/ml/tf_models/lstm.py" ]
[ "import tensorflow as tf\n\n\nclass TfLSTM(tf.keras.Model):\n \"\"\"\n subclassing model type\n \"\"\"\n\n def __init__(self, in_dim):\n super(TfLSTM, self).__init__()\n # self.e1 = tf.keras.layers.Embedding(input_dim=in_shape, output_dim=64)\n self.l1 = tf.keras.layers.LSTM(\n ...
[ [ "tensorflow.keras.layers.Dense", "tensorflow.keras.Model", "tensorflow.keras.layers.LSTM", "tensorflow.keras.Input", "tensorflow.keras.layers.Softmax" ] ]
AppleHolic/voicefixer
[ "274ed7a78721b4a4d062bc0ad706a9bcee7970b1" ]
[ "voicefixer/tools/base.py" ]
[ "import math\n\nimport numpy as np\nimport torch\nimport os\nimport torch.fft\nos.environ['KMP_DUPLICATE_LIB_OK']='True'\n\ndef get_window(window_size, window_type, square_root_window=True):\n \"\"\"Return the window\"\"\"\n window = {\n 'hamming': torch.hamming_window(window_size),\n 'hanning':...
[ [ "torch.device", "torch.cat", "torch.sqrt", "torch.stack", "torch.cos", "torch.sin", "torch.hann_window", "torch.irfft", "torch.ones", "torch.hamming_window", "torch.eye", "numpy.append", "torch.nn.functional.pad", "torch.nn.functional.conv_transpose1d", ...
SarnadAbhilash/d3rlpy
[ "4a0a18ac1c63be8217b132418c2daa978a3eefdb" ]
[ "cql_train.py" ]
[ "import argparse\n\nfrom sklearn.model_selection import train_test_split\n\nimport d3rlpy\nfrom d3rlpy.algos import CQL\nfrom d3rlpy.datasets import get_pybullet\nfrom d3rlpy.gpu import Device\nfrom d3rlpy.metrics.scorer import evaluate_on_environment\nfrom d3rlpy.metrics.scorer import initial_state_value_estimatio...
[ [ "sklearn.model_selection.train_test_split" ] ]
asyavuz/ppi_dnmt_analysis
[ "980724e13fbe503c190f92cf92a0f3df3ab1872b" ]
[ "analyse_shortest_paths.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nPPI-based gene-list enrichment tool.\nP-value calculation and KEGG enrichment part.\n\"\"\"\n# Author: Ahmet Sinan Yavuz <asinanyavuz@sabanciuniv.edu>\n# BSD-3 License\n\nimport os\nimport sys\nimport math\nimport pickle\nimport warnings\nimport argparse\nim...
[ [ "numpy.asarray", "numpy.minimum.accumulate", "numpy.nonzero", "numpy.take", "numpy.arange", "numpy.argsort", "numpy.empty_like" ] ]
PacktPublishing/TensorFlow-for-Neural-Network-Solutions
[ "94c00cda94a9ec354b53d5ded4d827496891209f" ]
[ "Section02/text_helpers.py" ]
[ "import string\nimport os\nimport urllib.request\nimport io\nimport tarfile\nimport collections\nimport numpy as np\nimport requests\nimport gzip\n\ndef normalize_text(texts, stops):\n texts = [x.lower() for x in texts]\n texts = [''.join(c for c in x if c not in string.punctuation) for x in texts]\n texts...
[ [ "numpy.array" ] ]
elferherrera/polars
[ "c9eb93e496fcc24667a548baa39b485d2d608aa0" ]
[ "py-polars/tests/test_window.py" ]
[ "import numpy as np\nimport pytest\n\nimport polars as pl\n\n\n@pytest.mark.parametrize(\"dtype\", [pl.Float32, pl.Float64, pl.Int32])\ndef test_std(dtype):\n if dtype == pl.Int32:\n values = [1, 2, 3, 4]\n else:\n values = [1.0, 2.0, 3.0, 4.0]\n df = pl.DataFrame(\n [\n pl....
[ [ "numpy.isclose" ] ]
astromancer/graphical
[ "2d72407c53967714953485dd52ad72e34e549ef5", "2d72407c53967714953485dd52ad72e34e549ef5" ]
[ "src/scrawl/sliders.py", "src/scrawl/dualaxes.py" ]
[ "import logging\n# import operator\n\n\nimport numpy as np\nfrom cycler import cycler\nfrom matplotlib.lines import Line2D\n\n# from matplotlib.widgets import AxesWidget, Slider\n# from matplotlib.patches import Circle\n#\n# from matplotlib.transforms import Affine2D\n# from matplotlib.transforms import blended_tra...
[ [ "matplotlib.lines.Line2D", "numpy.linspace", "numpy.mean" ], [ "matplotlib.dates.AutoDateLocator", "matplotlib.ticker.AutoMinorLocator", "matplotlib.scale.ScaleBase.__init__", "matplotlib.transforms.Affine2D.identity", "matplotlib.transforms.IdentityTransform", "matplotlib....
2020-A-Python-GR1/py-sanango-simbana-edison-ubaldo
[ "5ca5a6a8c8596cc76b0d09f3bb700f0c6c1780e8" ]
[ "03 - Pandas/h_group.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Aug 15 09:56:10 2020\n\n@author: edison\n\"\"\"\n\n\nimport pandas as pd \nimport math \nimport numpy as np\n\npath_guardado = \"./data/artwork_data.pickle\"\n\ndf = pd.read_pickle(path_guardado)\n\nseccion_df = df.iloc[49980:50019,:].copy()\n...
[ [ "pandas.read_pickle", "pandas.concat" ] ]
suniipang/PE_Imputation
[ "836b9c687883ac87f091785fc17fded6d122be83" ]
[ "LSTM.py" ]
[ "import numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nfrom sklearn.model_selection import LeaveOneGroupOut\n\nfrom plot_with_PE_imputation import plot_with_PE_imputation\nimport matplotlib.colors as colors\nfrom mpl_toolkits.axes_grid1 import make_axes_locatable\n\nimport tensorflow as tf\nfrom...
[ [ "sklearn.model_selection.LeaveOneGroupOut", "numpy.array", "sklearn.metrics.mean_squared_error", "tensorflow.keras.Input", "numpy.random.seed", "tensorflow.random.set_seed", "tensorflow.config.experimental.set_memory_growth", "sklearn.preprocessing.RobustScaler", "tensorflow.ke...
ElLorans/amz_tool
[ "0c8fd9db3dd53dcfd7207787d4072b8443b188a2" ]
[ "rodeo_query.py" ]
[ "__author__ = \"jabaker\"\r\n\r\n\r\nimport pandas as pd\r\nimport requests\r\nimport urllib3\r\nfrom requests_kerberos import OPTIONAL, HTTPKerberosAuth\r\n\r\nfrom constants import COLOR\r\n\r\n\r\ndef rodeo_query(fc, pallet): # 3.5-4 seconds for 150 elem\r\n \"\"\"\r\n Get pd DataFrame with info from ...
[ [ "pandas.read_html", "pandas.concat" ] ]
zattala/sasmodels
[ "a547aa73d43145b3bd34770b0ea27ba8882170a3" ]
[ "sasmodels/models/guinier_porod.py" ]
[ "r\"\"\"\nCalculates the scattering for a generalized Guinier/power law object.\nThis is an empirical model that can be used to determine the size\nand dimensionality of scattering objects, including asymmetric objects\nsuch as rods or platelets, and shapes intermediate between spheres\nand rods or between rods and...
[ [ "numpy.random.uniform", "numpy.sqrt", "numpy.exp", "numpy.errstate" ] ]
Sam-Armstrong/UFC-Fight-Predictor
[ "d07a869ac00065c59f528e32384ab732dc0e2194" ]
[ "Data.py" ]
[ "\"\"\"\nAuthor: Sam Armstrong\nDate: 2020-2021\n\nDescription: Class that is responsible for handling all the data required for the predictions. These responsibilities include \nscraping the data from the web, storing and interacting with this data in CSV format, and creating the training data for the \ndeep learn...
[ [ "pandas.DataFrame", "pandas.read_csv" ] ]
abeersaqib/crank
[ "0241ef46a618e24212e4a73b399e2293b4ffca08" ]
[ "crank/net/trainer/basetrainer.py" ]
[ "#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n# vim:fenc=utf-8\n#\n# Copyright (c) 2020 K. KOBAYASHI <root.4mac@gmail.com>\n#\n# Distributed under terms of the MIT license.\n\"\"\"\nBaseTrainer class\n\n\"\"\"\n\nimport logging\nimport random\nfrom abc import abstractmethod\nfrom pathlib import Path\n\nimport n...
[ [ "torch.cat", "torch.stack", "torch.save", "numpy.exp", "torch.ones", "torch.tensor", "numpy.hstack" ] ]
gsobala/tensorflow
[ "7eba9315aa7522e516af2de48bd5b5d139ba8d9f", "7eba9315aa7522e516af2de48bd5b5d139ba8d9f" ]
[ "tensorflow/python/keras/backend.py", "tensorflow/contrib/distribute/python/parameter_server_strategy.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...
[ [ "tensorflow.python.ops.array_ops.identity", "tensorflow.python.ops.math_ops.less", "tensorflow.python.ops.state_ops.assign_add", "tensorflow.python.ops.nn.atrous_conv2d_transpose", "tensorflow.python.ops.math_ops.matmul", "tensorflow.python.ops.array_ops.sparse_placeholder", "tensorflo...
waiiinta/object_detection_lab
[ "6af56ab1c0f595181d87163c62e613398ac96af8" ]
[ "detection/models/necks/fpn.py" ]
[ "'''\nFRN model for Keras.\n\n# Reference:\n- [Feature Pyramid Networks for Object Detection](\n https://arxiv.org/abs/1612.03144)\n\n'''\nimport tensorflow as tf\nfrom tensorflow.keras import layers\n\nclass FPN(tf.keras.Model):\n\n def __init__(self, out_channels=256, **kwargs):\n '''\n Fe...
[ [ "tensorflow.keras.layers.UpSampling2D", "tensorflow.random.normal", "tensorflow.TensorShape", "tensorflow.keras.layers.Conv2D", "tensorflow.keras.layers.MaxPooling2D" ] ]
at3e/pymc-examples
[ "6a23dba3ba74199cc10b7fc647761e82328edcf2" ]
[ "examples/case_studies/gelman_bioassay.py" ]
[ "from numpy import array, ones\n\nimport pymc3 as pm\n\n# Samples for each dose level\nn = 5 * ones(4, dtype=int)\n# Log-dose\ndose = array([-0.86, -0.3, -0.05, 0.73])\n\nwith pm.Model() as model:\n\n # Logit-linear model parameters\n alpha = pm.Normal(\"alpha\", 0, sigma=100.0)\n beta = pm.Normal(\"beta\"...
[ [ "numpy.array", "numpy.ones" ] ]
oxcsml/Rmap
[ "5ae74e8b0e110cba578fe19159c0f87ea52fa495", "5ae74e8b0e110cba578fe19159c0f87ea52fa495" ]
[ "dataprocessing/process_uk_cases.py", "dataprocessing/utils.py" ]
[ "import numpy as np\nimport pandas as pd\nfrom covid19_datasets import UKCovid19Data\n\nuk_data = UKCovid19Data(england_area_type=UKCovid19Data.ENGLAND_LOWER_TIER_AUTHORITY)\nuk_cases = uk_data.get_cases_data()\n\n# Combine old LTLAs into Buckinghamshire\nbuckinghamshire_keys = [\n (\"England\", \"Aylesbury Vale...
[ [ "numpy.round", "pandas.MultiIndex.from_tuples", "numpy.maximum" ], [ "matplotlib.backends.backend_pdf.PdfPages", "pandas.concat" ] ]
DingLyu/Investigating-and-Modeling-the-Dynamics-of-Long-Ties
[ "aa37c3d5c85a8d1696db3dda7dcb22782b737d17" ]
[ "utils.py" ]
[ "# /usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\n@author: ding lyu\n@email: dylan_lyu@sjtu.edu.cn\n\"\"\"\n\nimport csv\nimport time\nimport torch\nimport math as mt\nimport numpy as np\nimport scipy as sp\nimport pandas as pd\nimport networkx as nx\nimport seaborn as sns\nimport torch.nn as nn\nimport mat...
[ [ "scipy.stats.sem", "numpy.array", "scipy.stats.t.ppf", "numpy.mean" ] ]
Oumourin/Deep-Learning-Study
[ "85c3a04aaa3af2fcf6a335d9fd8db70c89527b39" ]
[ "Logic/OR.py" ]
[ "import numpy as np\n\ndef OR(x1, x2):\n x = np.array([x1, x2])\n y = np.array([0.5, 0.5])\n b = -0.2\n tmp = np.sum(x*y) + b\n if tmp <= 0:\n return 0\n else:\n return 1\n" ]
[ [ "numpy.sum", "numpy.array" ] ]
giannoier/Emotion-Recognition
[ "26acd270e66f8c2a0e2decf499e39c7ed86a15cb" ]
[ "fer.py" ]
[ "\nimport pandas as pd\nimport numpy as np\nfrom random import shuffle\nimport cv2\nfrom keras.utils.np_utils import to_categorical\n\n\ndef fer2013():\n\n \n # adjust fer data labels to ck+ (emotion_labels(1-5) become (2-6) zero remains )\n data = pd.read_csv('fer2013.csv')\n \n anger = data[(data.e...
[ [ "pandas.read_csv", "numpy.asarray", "numpy.expand_dims" ] ]
donikv/IlluminationBase
[ "4aade52bb8a1065f10b94ffda09645a681d8160c" ]
[ "fc4.py" ]
[ "import tensorflow as tf\nimport efficientnet.tfkeras as efn\n\nfrom tensorflow.keras import layers as l\n\ndef build_model(input_channels=2, h=320, w=640, global_estimate=True, out_channels=2):\n input_size = (h, w, input_channels)\n model = efn.EfficientNetB0(weights='imagenet', include_top=False, input_sha...
[ [ "tensorflow.keras.layers.ReLU", "tensorflow.keras.layers.Input", "tensorflow.expand_dims", "tensorflow.keras.layers.AveragePooling2D", "tensorflow.keras.layers.UpSampling2D", "tensorflow.keras.models.Model", "tensorflow.reshape", "tensorflow.keras.layers.Conv2D", "tensorflow.ke...
suresh-guttikonda/agents
[ "c77168f12b7ca66d7715cf5eb99060f88d4e69e9" ]
[ "tf_agents/networks/encoding_network.py" ]
[ "# coding=utf-8\n# Copyright 2018 The TF-Agents Authors.\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 b...
[ [ "tensorflow.python.util.nest.assert_shallow_structure", "tensorflow.keras.layers.Flatten", "tensorflow.python.util.nest.is_sequence", "tensorflow.nest.map_structure", "tensorflow.nest.flatten", "tensorflow.keras.layers.Dense", "tensorflow.keras.regularizers.l2", "tensorflow.python....
girishponkiya/pytorch-lightning
[ "42d5cfc3b056b4c82a77a7cdcb8eafc63a812b67" ]
[ "pytorch_lightning/trainer/evaluation_loop.py" ]
[ "\"\"\"\nValidation loop\n===============\n\nThe lightning validation loop handles everything except the actual computations of your model.\nTo decide what will happen in your validation loop, define the `validation_step` function.\nBelow are all the things lightning automates for you in the validation loop.\n\n.. ...
[ [ "torch.cuda.amp.autocast", "torch.set_grad_enabled" ] ]
klxu03/SEAP2020
[ "0bcebd4c972be5e6fafcada5eb1f19e8bee671ae" ]
[ "Week 2/src/panel.py" ]
[ "import numpy as np\nfrom pathlib import Path\n\nclass Panel:\n\n def __init__(self, filepath):\n # Importing in the file path (have to add a . because it is in /~/src instead of /~\n self.filepath = '.' + filepath\n\n \"\"\" I/O the 136 HIV panel fasta sequence \"\"\"\n base_path = ...
[ [ "numpy.amax", "numpy.zeros" ] ]
elizabethswann/skypy
[ "e92ed2591178590fa10d69661e37f43861359576" ]
[ "skypy/galaxy/tests/test_redshift.py" ]
[ "import numpy as np\nfrom scipy import stats\nfrom scipy.stats.tests.common_tests import (\n check_normalization, check_moment, check_mean_expect, check_var_expect,\n check_skew_expect, check_kurt_expect, check_edge_support,\n check_random_state_property, check_pickling)\n\nfrom skypy.galaxy.redshift impor...
[ [ "numpy.testing.assert_allclose", "scipy.stats.tests.common_tests.check_edge_support", "scipy.stats.tests.common_tests.check_skew_expect", "numpy.random.rand", "numpy.array", "numpy.broadcast", "scipy.stats.tests.common_tests.check_var_expect", "scipy.stats.tests.common_tests.check_...
FerhatYilmaz1986/pandas
[ "f8b4c57ad1e4f1a105905c53ffcf40a5dc5080c3" ]
[ "pandas/core/sparse/frame.py" ]
[ "\"\"\"\nData structures for sparse float data. Life is made simpler by dealing only\nwith float64 data\n\"\"\"\nimport warnings\n\nimport numpy as np\n\nfrom pandas._libs.sparse import BlockIndex, get_blocks\nfrom pandas.compat.numpy import function as nv\nfrom pandas.util._decorators import Appender\n\nfrom panda...
[ [ "pandas.compat.numpy.function.validate_cumsum", "pandas.io.pickle._unpickle_array", "pandas.core.ops.add_flex_arithmetic_methods", "pandas.core.internals.create_block_manager_from_arrays", "pandas.core.arrays.sparse.SparseArray", "pandas._libs.sparse.get_blocks", "pandas.concat", "...
leomauro/sonnet
[ "cd5b5fa48e15e4d020f744968f5209949ebe750f" ]
[ "sonnet/examples/brnn_ptb_test.py" ]
[ "# Copyright 2017 The Sonnet Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ...
[ [ "tensorflow.compat.v1.test.get_temp_dir", "tensorflow.compat.v1.test.main" ] ]
bakera81/siuba
[ "568729989333193ff38c26ac68604aa8ba9b490b" ]
[ "siuba/tests/test_dply_verbs.py" ]
[ "import pytest\nfrom siuba.dply.verbs import mutate\nfrom siuba.siu import _\n\nimport pandas as pd\nfrom pandas.testing import assert_frame_equal\n\n@pytest.fixture(scope = \"function\")\ndef df1():\n yield pd.DataFrame({\n \"repo\": [\"pandas\", \"dplyr\", \"ggplot2\", \"plotnine\"],\n \"owner\":...
[ [ "pandas.DataFrame", "pandas.testing.assert_frame_equal" ] ]
yazdipour/mlflow
[ "5cd5f61ad0157e8f9a19bac3e4499da34f77d2ea" ]
[ "examples/pytorch/BertNewsClassification/bert_classification.py" ]
[ "# pylint: disable=arguments-differ\n# pylint: disable=unused-argument\n# pylint: disable=abstract-method\n\nimport os\nfrom argparse import ArgumentParser\nimport mlflow.pytorch\nimport numpy as np\nimport pandas as pd\nimport pytorch_lightning as pl\nimport torch\nimport torch.nn.functional as F\nfrom pytorch_lig...
[ [ "torch.nn.Linear", "torch.nn.Dropout", "torch.stack", "sklearn.datasets.fetch_20newsgroups", "numpy.random.seed", "torch.max", "pandas.DataFrame", "torch.manual_seed", "torch.nn.functional.cross_entropy", "torch.tensor", "torch.utils.data.DataLoader", "torch.optim.l...
azarz/buzzard
[ "1b61d0455a3e87808040a1d761de2c8935f3fe4d" ]
[ "buzzard/test/test_datasource_registering.py" ]
[ "# pylint: disable=redefined-outer-name, unused-argument\n\nfrom __future__ import division, print_function\nimport os\nimport tempfile\nimport uuid\nimport string\nimport weakref\nimport gc\n\nimport numpy as np\nfrom osgeo import gdal\nimport pytest\nimport shapely.ops\n\nimport buzzard as buzz\nfrom buzzard.test...
[ [ "numpy.zeros" ] ]
aakanksharathore/yoloTracker
[ "bad7d9eb49bcb73abc65807408a1b5c2f5f4abd2" ]
[ "tracking/localTrack.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Fri Feb 1 15:11:12 2019\n\n@author: aakanksha\n\"\"\"\n\nimport numpy as np\nimport cv2, sys\nimport glob\nimport ntpath\nsys.path.append(\"..\")\nfrom models.yolo_models import get_yolo_model\n\ndef _sigmoid(x):\n return 1. / (1. + np.exp(-x...
[ [ "numpy.zeros", "numpy.sum", "numpy.exp", "numpy.argsort", "numpy.column_stack", "numpy.expand_dims" ] ]
d4glushko/RLGeneralization
[ "788bfbfc54fc3a84bcf930e9546ceff45ade9f59" ]
[ "diploma/noise_learning/metrics_manager.py" ]
[ "import typing\nimport numpy as np\nfrom collections import Counter \n\nfrom .common.serializable import DictSerializable\n\n\nclass Metric(DictSerializable):\n def __init__(self, value: float, iteration: int, noise: float):\n self.value: float = value\n self.iteration: int = iteration\n sel...
[ [ "numpy.array" ] ]
HK3-Lab-Team/pytrousse
[ "59744b3e3c19dd07b43fec3ddaf60bc889a140a9" ]
[ "tests/integration/test_feature_fix.py" ]
[ "import pandas as pd\nimport pytest\nimport sklearn.preprocessing as sk_preproc\n\nimport trousse.feature_fix as ffx\nfrom trousse.dataset import Dataset\n\nfrom ..fixtures import CSV\nfrom ..util import load_expectation\n\n\n@pytest.mark.parametrize(\n \"csv, column, derived_column, expected_csv\",\n (\n ...
[ [ "pandas.testing.assert_frame_equal" ] ]
zackchase/label_shift
[ "0e27d0a1b84135fcf4962d1659b47b86dbe2d6e1" ]
[ "kun_tars.py" ]
[ "# Python API to call the matlab implementation the TargetShift and LS_TargetShift in Kun et. al. ICML'2013\n# author: yu-xiang wang\n# Reference:\n# - Zhang, Scholkopf, Muandet, Wang \"Domain Adaptation under Target and Conditional Shift\" ICML'13\n# URL: http://proceedings.mlr.press/v28/zhang13d.pdf\n# Source co...
[ [ "numpy.array", "numpy.median", "numpy.triu_indices_from", "numpy.prod", "numpy.sqrt", "sklearn.metrics.pairwise.euclidean_distances" ] ]
rohangujarathi/sagemaker-python-sdk
[ "67be6284a0d7184a70b37602c7bb36599eaee5c6" ]
[ "tests/integ/test_local_mode.py" ]
[ "# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#\n# or in the \"licens...
[ [ "numpy.zeros" ] ]
jobreit/COMP0090
[ "c4c42d3b1e1c214709d058714d2c51eb3f02e988" ]
[ "tutorials/img_cls/network_pt.py" ]
[ "# network module\n# adapted from: https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\n\nclass Net(nn.Module):\n def __init__(self):\n super().__init__()\n self.conv1 = nn.Conv2d(3, 6, 5)\n self.pool = ...
[ [ "torch.nn.Linear", "torch.flatten", "torch.nn.Conv2d", "torch.nn.MaxPool2d" ] ]
anonymous-FedMLH/FedMLH
[ "a214cd1c07c6dc0fb1d3d3440398ee8c8c6b702e" ]
[ "main_FedMach.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Python version: 3.6\nfrom itertools import islice\nimport matplotlib\n\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt\nimport copy\nimport numpy as np\nimport sys\nfrom torchvision import datasets, transforms\nimport torch\nimport argparse\nfrom models.Upd...
[ [ "matplotlib.use", "numpy.array", "matplotlib.pyplot.legend", "matplotlib.pyplot.figure", "matplotlib.pyplot.ylabel" ] ]
ttadano/phonopy
[ "8c03955b2636b22b86e9324f5afcfa36396fa988", "8c03955b2636b22b86e9324f5afcfa36396fa988" ]
[ "phonopy/structure/dataset.py", "phonopy/structure/cells.py" ]
[ "# Copyright (C) 2020 Atsushi Togo\n# All rights reserved.\n#\n# This file is part of phonopy.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# * Redistributions of source code must retain the above copyr...
[ [ "numpy.zeros_like" ], [ "numpy.dot", "numpy.argmin", "numpy.rint", "numpy.tile", "numpy.multiply", "numpy.where", "numpy.cos", "numpy.sin", "numpy.zeros_like", "numpy.eye", "numpy.prod", "numpy.arange", "numpy.transpose", "numpy.sqrt", "numpy.lin...
mykiscool/DeepCamera
[ "e77cdbf45ab09895f315aa299bd6ac87b3bb6d66" ]
[ "src/embedding/upload_api-v2.py" ]
[ "# coding=utf-8\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os, json, time, sys, thread, base64\nimport argparse\nimport unicodedata\nimport shutil\nimport subprocess\nimport threading\n# import dlib\nimport math\nimport time\nimport os.p...
[ [ "numpy.asarray", "scipy.misc.imresize", "scipy.misc.imsave" ] ]
bwpriest/neural-tangents
[ "c4642c97607df2ba8acbebedac6b6e1dda169bd9" ]
[ "neural_tangents/utils/utils.py" ]
[ "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "numpy.arange" ] ]
pyb2d/pyb2d
[ "5d0f9f581d93c3681ee4f518a5d7fd6be900e695" ]
[ "tutorials/particles/plot_randomized_linear_emitter.py" ]
[ "\"\"\"\nEmitter\n===========================\n\nCreate a RandomizedLinearEmitter\n\"\"\"\n\n# %%\n# Imports\n# ------------------------\nimport b2d\nimport numpy as np\nimport b2d.plot\nimport matplotlib.pyplot as plt\n\n# %%\n# create world and a particle system\nworld = b2d.world(gravity=(0, -10))\npdef = b2d.pa...
[ [ "matplotlib.pyplot.show" ] ]
nalindas9/neural-network-scratch
[ "0c47bdde2a95be1944c19423527ad26cf2a27210" ]
[ "DNN_scratch/utils.py" ]
[ "\"\"\"\n\n\nAuthors:\nNalin Das (nalindas9@gmail.com)\nGraduate Student pursuing Masters in Robotics,\nUniversity of Maryland, College Park\n\"\"\"\nimport numpy as np\n\ndef initialize_parameters(layer_dims):\n \"\"\"\n Initializes the weights and biases for all the layers in the NN\n Arguments:\n lay...
[ [ "numpy.random.randn", "numpy.zeros" ] ]
melisandeteng/ocp
[ "5f16b64911e0dac3001d4cc7427d60469a967370" ]
[ "tests/models/test_schnet.py" ]
[ "\"\"\"\nCopyright (c) Facebook, Inc. and its affiliates.\n\nThis source code is licensed under the MIT license found in the\nLICENSE file in the root directory of this source tree.\n\"\"\"\n\nimport os\nimport random\n\nimport numpy as np\nimport pytest\nimport torch\nfrom ase.io import read\nfrom torch_geometric....
[ [ "numpy.testing.assert_almost_equal", "torch.matmul", "numpy.array_equal", "numpy.testing.assert_equal" ] ]