repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
rg314/autoballs | [
"21fab5c810f18c0d50c23051928d3bb86fbc6941"
] | [
"autoballs/network/dataloader.py"
] | [
"from autoballs.utils import get_img_from_seg\r\n\r\nimport cv2\r\nfrom PIL import Image\r\nimport numpy as np\r\nimport albumentations as albu\r\n\r\nfrom torch.utils.data import DataLoader\r\nfrom torch.utils.data import Dataset as BaseDataset\r\n\r\nclass Dataset(BaseDataset):\r\n \"\"\"Read images, apply aug... | [
[
"numpy.asarray",
"numpy.zeros"
]
] |
beneisner/pytorch_geometric | [
"53d44a96bd2de2753b1ab1d7153c026c92606a81",
"befb6c616c1069381c0bdff4baf6e023fea587d6",
"53d44a96bd2de2753b1ab1d7153c026c92606a81"
] | [
"torch_geometric/datasets/ged_dataset.py",
"examples/graph_sage_unsup.py",
"torch_geometric/datasets/flickr.py"
] | [
"from typing import Optional, Callable, List\n\nimport os\nimport os.path as osp\nimport glob\nimport pickle\n\nimport torch\nimport torch.nn.functional as F\nimport networkx as nx\nfrom torch_geometric.data import (InMemoryDataset, Data, download_url,\n extract_zip, extract_tar)\nf... | [
[
"torch.empty",
"torch.zeros",
"torch.load",
"torch.tensor",
"torch.save"
],
[
"sklearn.linear_model.LogisticRegression",
"torch.cat",
"torch.nn.functional.dropout",
"torch.nn.ModuleList",
"torch.tensor",
"torch.no_grad",
"torch.cuda.is_available"
],
[
"t... |
mwshinn/paranoidscientist | [
"8dcb745f1f6164c74788c5c4eb003db99c42bbe7"
] | [
"paranoid/types/numeric.py"
] | [
"# Copyright 2018 Max Shinn <max@maxshinnpotential.com>\n# \n# This file is part of Paranoid Scientist, and is available under the\n# MIT license. Please see LICENSE.txt in the root directory for more\n# information.\n\n__all__ = ['Numeric', 'ExtendedReal', 'Number', 'Integer', 'Natural0', 'Natural1', 'Range', 'Ra... | [
[
"numpy.int0",
"numpy.isfinite",
"numpy.reshape",
"numpy.isnan",
"numpy.float16",
"numpy.int8",
"numpy.tile",
"numpy.int16",
"numpy.all",
"numpy.int64",
"numpy.ones",
"numpy.uint16",
"numpy.float64",
"numpy.prod",
"numpy.uint0",
"numpy.zeros"
]
] |
TaehoLi/ssd_pytorch | [
"30554d2211f24770b562a14de12650515613b52a"
] | [
"train.py"
] | [
"from data import *\nfrom utils.augmentations import SSDAugmentation\nfrom layers.modules import MultiBoxLoss\nfrom ssd import build_ssd\nimport os\nimport sys\nimport time\nimport torch\nfrom torch.autograd import Variable\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.backends.cudnn as cudnn\ni... | [
[
"torch.set_default_tensor_type",
"torch.ones",
"torch.Tensor",
"torch.load",
"torch.zeros",
"torch.utils.data.DataLoader",
"torch.cuda.is_available",
"torch.nn.DataParallel",
"torch.nn.init.xavier_uniform",
"torch.autograd.Variable"
]
] |
jrpespinas/numerical-analysis | [
"00fea39c4879893dd60e4a2b7b4dbcb5114234ea"
] | [
"systems_of_linear_equations/gaussian_elimination.py"
] | [
"\"\"\"Gaussian Elimination\"\"\"\n\nimport numpy as np\n\n\ndef gaussian_elimination(matrix: np.ndarray):\n return matrix\n\n\ndef main():\n matrix = np.array([[4, 8, -4, 4],\n [3, 8, 5, -11],\n [-2, 1, 12, -17]])\n\n values = gaussian_elimination(matrix)\n p... | [
[
"numpy.array"
]
] |
sanketsaurav/flytekit | [
"f901aee721847c6264d44079d4fa31a75b8876e1"
] | [
"tests/flytekit/unit/common_tests/types/impl/test_schema.py"
] | [
"from __future__ import absolute_import\n\nimport collections as _collections\nimport os as _os\nimport pytest as _pytest\nimport pandas as _pd\nimport uuid as _uuid\nimport datetime as _datetime\nfrom flytekit.common.types.impl import schema as _schema_impl\nfrom flytekit.common.types import primitives as _primiti... | [
[
"pandas.api.types.is_object_dtype",
"pandas.read_parquet",
"pandas.DataFrame.from_dict",
"pandas.DataFrame.from_records",
"pandas.api.types.is_bool_dtype"
]
] |
vietawake/mmSegmentation | [
"1f643d6d81708ebf5726c48f66d02c70fe99fe00",
"1f643d6d81708ebf5726c48f66d02c70fe99fe00",
"1f643d6d81708ebf5726c48f66d02c70fe99fe00",
"1f643d6d81708ebf5726c48f66d02c70fe99fe00",
"1f643d6d81708ebf5726c48f66d02c70fe99fe00",
"1f643d6d81708ebf5726c48f66d02c70fe99fe00"
] | [
"mmseg/models/decode_heads/decode_head.py",
"mmseg/datasets/pipelines/loading.py",
"mmseg/models/utils/inverted_residual.py",
"mmseg/models/decode_heads/dnl_head.py",
"tests/test_models/test_backbones/test_vit.py",
"mmseg/core/evaluation/metrics.py"
] | [
"from abc import ABCMeta, abstractmethod\r\n\r\nimport torch\r\nimport torch.nn as nn\r\nfrom mmcv.cnn import normal_init\r\nfrom mmcv.runner import auto_fp16, force_fp32\r\n\r\nfrom mmseg.core import build_pixel_sampler\r\nfrom mmseg.ops import resize\r\nfrom ..builder import build_loss\r\nfrom ..losses import acc... | [
[
"torch.nn.Conv2d",
"torch.nn.Dropout2d",
"torch.cat"
],
[
"numpy.zeros",
"numpy.ones"
],
[
"torch.nn.Sequential",
"torch.utils.checkpoint.checkpoint"
],
[
"torch.matmul",
"torch.nn.Conv2d",
"torch.cat"
],
[
"torch.randn"
],
[
"numpy.load",
"t... |
AMLab-Amsterdam/DataAugmentationInterventions | [
"78ce67174db487e9697b9a842e69818305bb41ef"
] | [
"synthetic_data/plot.py"
] | [
"import matplotlib.pyplot as plt\nimport numpy as np\n\nfeat_x2_0_inter = np.array([0.34256017,\t0.31460512,\t0.27144957,\t0.24856855,\t0.22719437])\nfeat_x2_0_inter_ste = np.array([0.004312400818,\t0.003773893416,\t0.002982698083,\t0.00233306855,\t0.002138502002])\nfeat_x2_1_inter = np.array([0.35977444,\t0.330248... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.xticks",
"numpy.array",
"matplotlib.pyplot.ylabel"
]
] |
Githubowy-Juliusz/SRCNN | [
"6306f7fd87809c189f7aadb48c050d4f520a269f"
] | [
"images_utils.py"
] | [
"import numpy as np\nimport cv2 as cv\nfrom psnr import psnr_numpy\n\n\ndef create_low_res_images(images: np.ndarray) -> np.ndarray:\n\timages_low_res = tuple(create_low_res_image(image) for image in images)\n\treturn np.array(images_low_res)\n\ndef create_low_res_image(image: np.ndarray) -> np.ndarray:\n\treturn r... | [
[
"numpy.array",
"numpy.random.random",
"numpy.stack"
]
] |
jbrockmendel/statsmodels | [
"61155fff1883ffb49d252ae22b2638f73b24ab21"
] | [
"statsmodels/tsa/arima_model.py"
] | [
"# Note: The information criteria add 1 to the number of parameters\n# whenever the model has an AR or MA term since, in principle,\n# the variance could be treated as a free parameter and restricted\n# This code does not allow this, but it adds consistency with other\n# packages such as gre... | [
[
"numpy.dot",
"scipy.stats.norm.ppf",
"numpy.sqrt",
"pandas.Series",
"scipy.optimize.fmin_l_bfgs_b",
"numpy.asarray",
"numpy.cumsum",
"pandas.DataFrame",
"numpy.arctan2",
"numpy.zeros_like",
"numpy.roots",
"numpy.diff",
"numpy.column_stack",
"scipy.signal.lfi... |
mraspaud/rioxarray | [
"1f3ed6c5db2475a0d9b9aa9c4985c1b0c558c6e6"
] | [
"test/integration/test_integration_rioxarray.py"
] | [
"import json\nimport os\nimport platform\nimport threading\nfrom functools import partial\n\nimport dask.array as da\nimport numpy\nimport pytest\nimport rasterio\nimport xarray\nfrom affine import Affine\nfrom dask.delayed import Delayed\nfrom numpy.testing import assert_almost_equal, assert_array_equal\nfrom pack... | [
[
"numpy.random.random",
"numpy.linspace",
"numpy.isnan",
"numpy.arange",
"numpy.testing.assert_array_equal",
"numpy.testing.assert_almost_equal",
"numpy.zeros",
"numpy.empty"
]
] |
amitkarn3/PythnSyft | [
"8eaa637e1ca54c963281e847556cb14b4a76b46b",
"8eaa637e1ca54c963281e847556cb14b4a76b46b"
] | [
"test/test_serde.py",
"syft/frameworks/torch/tensors/interpreters/precision.py"
] | [
"\"\"\"\nThis file tests the ability for serde.py to convert complex types into\nsimple python types which are serializable by standard serialization tools.\nFor more on how/why this works, see serde.py directly.\n\"\"\"\nimport warnings\n\nfrom syft.serde import (\n _simplify,\n apply_lz4_compression,\n a... | [
[
"numpy.random.random",
"numpy.array_equal",
"torch.eq",
"numpy.ones",
"torch.tensor",
"numpy.random.rand",
"torch.device"
],
[
"torch.nn.functional.native_linear"
]
] |
praveenpmin/Python | [
"513fcde7430b03a187e2c7e58302b88645388eed",
"513fcde7430b03a187e2c7e58302b88645388eed",
"513fcde7430b03a187e2c7e58302b88645388eed"
] | [
"numpy/broadcasting.py",
"numpy/iterateoverarr.py",
"numpy/arraycreateroutines.py"
] | [
"# The term broadcasting refers to the ability of NumPy to treat arrays of different shapes during \n# arithmetic operations. Arithmetic operations on arrays are usually done on corresponding elements. \n# If two arrays are of exactly the same shape, then these operations are smoothly performed.\n\nimport numpy as ... | [
[
"numpy.array"
],
[
"numpy.arange",
"numpy.array",
"numpy.nditer"
],
[
"numpy.zeros",
"numpy.empty",
"numpy.ones"
]
] |
chomd90/invnet | [
"0d359e57b66f2e738812b5d660563fb4b3ab8f4a"
] | [
"models/checkers.py"
] | [
"\"\"\"\nChecker functions\n\"\"\"\n\nimport numpy as np\nimport torch\n\nPI = 3.1415\nDIM = 64.0\nSCALE = 255.0\nFIXED_CIRCLE = False\n\n\nclass CentroidFunction(torch.nn.Module):\n def __init__(self, bs, ch, sx, sy):\n super(CentroidFunction, self).__init__()\n self.x_lin = torch.nn.Parameter(tor... | [
[
"torch.linspace",
"torch.mul",
"torch.sum"
]
] |
lbcb-sci/tarantula | [
"a7805cbb1c2e9b3378abaaf18c29922b2b787593"
] | [
"misc/plotter.py"
] | [
"#!/usr/bin/env python\nimport argparse\nimport json\nimport numpy\nimport pandas\nimport seaborn\nfrom matplotlib import pyplot\n\nseaborn.set()\nseaborn.set_style(\"white\")\nseaborn.despine()\n\nscpb = seaborn.color_palette(\"Blues\")\nscpr = seaborn.color_palette(\"Reds\")\nscpg = seaborn.cubehelix_palette(rot=... | [
[
"matplotlib.pyplot.legend",
"numpy.clip",
"matplotlib.pyplot.subplots",
"numpy.save",
"numpy.delete",
"matplotlib.pyplot.close",
"numpy.load",
"numpy.zeros"
]
] |
acgardner/plntter | [
"d8d5b8e1fb2d7c1c4e21ec9e66cbb3c7419a7825"
] | [
"tests/test_attitude.py"
] | [
"from plntter.utils.attitude import AttitudeSolver, AttitudeTransform\nfrom plntter.utils.vector import Vector\n\nimport numpy as np\n\n\ndef test_QMethod() -> None:\n r1,r2,r3 = Vector.random(), Vector.random(), Vector.random()\n b1,b2,b3 = Vector.random(), Vector.random(), Vector.random()\n R,B = np.vsta... | [
[
"numpy.vstack"
]
] |
eubr-bigsea/Compss-Python | [
"09ab7c474c8badc9932de3e1148f62ffba16b0b2"
] | [
"tests/benchmark/aggregation/test.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nfrom ddf_library.ddf import DDF\nfrom ddf_library.utils import generate_info\n\nfrom pycompss.api.api import compss_barrier\nfrom pycompss.api.task import task\n\nimport pandas as pd\nimport numpy as np\nimport time\n\n\n@task(returns=2)\ndef generate_partition(si... | [
[
"numpy.random.randint"
]
] |
hamling-ling/ShaRinGan | [
"dbf2a462a07e0473e0a7bb19fe8f3c864d25ce06"
] | [
"src/app/audio_streamer.py"
] | [
"import pyaudio\nimport time\nimport numpy as np\nimport audio_utility as au\n\nclass AudioStreamer():\n def __init__(self, input_device_name, output_device_name):\n self.input_device_name = input_device_name\n self.output_device_name = output_device_name\n self.channels = 1 # mono micriphon... | [
[
"numpy.frombuffer",
"numpy.float32"
]
] |
shanenak/social-data | [
"89d4c6972158df353bc16e3a5403fa53cc255684",
"89d4c6972158df353bc16e3a5403fa53cc255684"
] | [
"run.py",
"queries.py"
] | [
"import os\nimport pandas as pd\nimport streamlit as st\n\nimport data_explorer\nimport eviction_analysis\nimport equity_explorer\nimport queries\nimport analysis\nimport utils\nfrom constants import STATES\n\n# Pandas options\npd.set_option('max_rows', 25)\npd.set_option('max_columns', 12)\npd.set_option('expand_f... | [
[
"pandas.set_option",
"pandas.concat"
],
[
"pandas.concat",
"pandas.merge",
"pandas.read_excel",
"pandas.Series",
"pandas.DataFrame",
"sklearn.preprocessing.MinMaxScaler",
"pandas.read_sql"
]
] |
raalesir/sim | [
"9bd994b1dedd05ca88ab9f25cbca3bc28cadc04b"
] | [
"sim/overlaps.py"
] | [
"\"\"\"\n calculates number of configurations for a ring grid phantom polymer and\n overlap distribution for the chain.\n\"\"\"\n\nimport math\nfrom math import comb\nfrom collections import Counter\nimport json\nimport os\nimport matplotlib.pyplot as plt\n\n\nclass Overlap:\n \"\"\"\n calculating numbe... | [
[
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.yscale",
"matplotlib.pyplot.ylabel"
]
] |
dpressel/ComerNet | [
"db7c93e936f33c814c6dc6bd7b765ab660f59f85"
] | [
"make_emb.py"
] | [
"import torch\nfrom convert_mw import bert,tokenizer,bert_type\nfrom pytorch_pretrained_bert import BertModel\ntorch.cuda.set_device(0)\ntorch.cuda.manual_seed(1234)\ntorch.manual_seed(1234)\nbmodel = BertModel.from_pretrained(bert_type)\nbmodel.eval()\nbmodel.to('cuda')\n\ntgtD=torch.load('data/save_data.tgt.dict'... | [
[
"torch.LongTensor",
"torch.cuda.manual_seed",
"torch.cat",
"torch.cuda.set_device",
"torch.manual_seed",
"torch.load",
"torch.stack",
"torch.save"
]
] |
christinazavou/O-CNN | [
"88cda0aea9bf07e14686fff1fe476e8080296dcf",
"88cda0aea9bf07e14686fff1fe476e8080296dcf"
] | [
"tensorflow/mycode/src/tf_layer_utils.py",
"tensorflow/script/network_ae.py"
] | [
"import tensorflow as tf\n\n\ndef make_weights(shape, name='weights'):\n return tf.Variable(tf.truncated_normal(shape=shape, stddev=0.05), name=name)\n\n\ndef make_biases(shape, name='biases'):\n return tf.Variable(tf.constant(0.05, shape=shape), name=name)\n\n\ndef convolution_layer(prev_layer, f_size, inp_c... | [
[
"tensorflow.nn.relu",
"tensorflow.matmul",
"tensorflow.constant",
"tensorflow.truncated_normal",
"tensorflow.nn.max_pool",
"tensorflow.reshape",
"tensorflow.nn.dropout",
"tensorflow.nn.conv2d"
],
[
"tensorflow.reshape",
"tensorflow.cast",
"tensorflow.squeeze",
"... |
blahster/tf-models | [
"eaa4a000ef8e5f094764c42a590bb1c49b7b6f7c",
"eaa4a000ef8e5f094764c42a590bb1c49b7b6f7c",
"eaa4a000ef8e5f094764c42a590bb1c49b7b6f7c",
"eaa4a000ef8e5f094764c42a590bb1c49b7b6f7c",
"eaa4a000ef8e5f094764c42a590bb1c49b7b6f7c",
"eaa4a000ef8e5f094764c42a590bb1c49b7b6f7c"
] | [
"syntaxnet/dragnn/python/sentence_io_test.py",
"tutorials/image/cifar10/cifar10.py",
"slim/nets/vgg.py",
"slim/download_and_convert_data.py",
"syntaxnet/dragnn/python/spec_builder.py",
"tutorials/image/cifar10/cifar10_multi_gpu_train.py"
] | [
"# Copyright 2017 Google Inc. 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 by appl... | [
[
"tensorflow.python.platform.googletest.main",
"tensorflow.test.get_temp_dir"
],
[
"tensorflow.device",
"tensorflow.get_variable",
"tensorflow.control_dependencies",
"tensorflow.nn.max_pool",
"tensorflow.cast",
"tensorflow.train.ExponentialMovingAverage",
"tensorflow.nn.l2_l... |
scrasmussen/euler-enigma | [
"3faa7acee5cf48d21d081bfb8e1ecf58ef66814a"
] | [
"wse/checkmatches.py"
] | [
"#\n# checkmatches.py\n# A non-spoiler top prowrestling match finder\n# list from http://www.profightdb.com/top-rated-matches.html\n# For copyright see LICENSE.md\n# Author: Soren Rasmussen github: scrasmussen\n#\n\nINTERWEBZ=False\n\nfrom urllib.request import urlopen\nfrom bs4 import BeautifulSoup\nfrom random im... | [
[
"pandas.to_datetime",
"pandas.DataFrame"
]
] |
eshanking/fears | [
"8d69af08c5aba9fefdbf962ab568c2ca58276c0d"
] | [
"figure_code/seascape_v_landscape_fig.py"
] | [
"from fears.utils import plotter, results_manager\nimport matplotlib.pyplot as plt\nimport numpy as np\n\n# data_folder = 'results_10272021_0000'\n# exp_info_file = 'experiment_info_10272021_0000.p'\ndata_folder = 'results_11112021_0000'\nexp_info_file = 'experiment_info_11112021_0000.p'\nexp_folder,exp_info = resu... | [
[
"numpy.arange",
"numpy.array",
"matplotlib.pyplot.subplots"
]
] |
Stonepia/pytorch | [
"82006ba46074226a071c25dd2e03dc4828941544",
"82006ba46074226a071c25dd2e03dc4828941544",
"82006ba46074226a071c25dd2e03dc4828941544"
] | [
"torch/autograd/__init__.py",
"torch/multiprocessing/__init__.py",
"test/distributed/test_distributed_fork.py"
] | [
"\"\"\"\n``torch.autograd`` provides classes and functions implementing automatic\ndifferentiation of arbitrary scalar valued functions. It requires minimal\nchanges to the existing code - you only need to declare :class:`Tensor` s\nfor which gradients should be computed with the ``requires_grad=True`` keyword.\nAs... | [
[
"torch._C._autograd_init",
"torch._C._autograd.kineto_available",
"torch.ones_like",
"torch.tensor"
],
[
"torch._C._multiprocessing_init"
],
[
"torch.utils.cpp_extension.verify_ninja_availability",
"torch.utils.cpp_extension.load",
"torch.distributed.init_process_group",
... |
harshitjindal/BrainNetworksInPython | [
"7b35d0693b5ea05f51a9b7b3e711f82e12c70a24"
] | [
"WRAPPERS/network_analysis_from_corrmat.py"
] | [
"#!/usr/bin/env python\n\n#=============================================================================\n# Created by Kirstie Whitaker\n# at Neurohackweek 2016 in Seattle, September 2016\n# Contact: kw401@cam.ac.uk\n#=============================================================================\n\n#================... | [
[
"numpy.loadtxt",
"pandas.DataFrame"
]
] |
ricklentz/open_model_zoo | [
"8738a4e3056a5e65c52836a14531b01c18f1ba3e"
] | [
"tools/accuracy_checker/openvino/tools/accuracy_checker/postprocessor/crop_segmentation_mask.py"
] | [
"\"\"\"\nCopyright (c) 2018-2022 Intel Corporation\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 http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law ... | [
[
"numpy.array"
]
] |
iamaneek/Artificial-Intelligence | [
"7014f1200d0dc3af7a85da1db611bc0816b89d5b"
] | [
"apriori.py"
] | [
"import numpy as np \nimport matplotlib.pyplot as plt \nimport pandas as pd \nfrom apyori import apriori \nimport time \nimport statistics\nimport argparse\n\ndef csvToList(csvFile):\n\t'''This function reads the csv object and converts to List\n\targs: CSV file object\n\treturn:List'''\n\ttempRecord = [] \n\t\n... | [
[
"pandas.read_csv"
]
] |
forcedotcom/distributions | [
"8d4d8eebbcec14fa9f4c314425f127e1316d9951"
] | [
"distributions/tests/test_util.py"
] | [
"# Copyright (c) 2014, Salesforce.com, Inc. All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# - Redistributions of source code must retain the above copyright\n# notice, this list o... | [
[
"numpy.random.multinomial",
"numpy.random.dirichlet",
"numpy.random.shuffle"
]
] |
pleiszenburg/bulk_lambert | [
"4ce1596970dfe0b1446709d320d3878639dac519"
] | [
"bulk_lambert/util.py"
] | [
"\nimport numpy as np\nfrom numpy import cos, sin\n\nfrom astropy.time import Time\n\nfrom ._jit import jit\n\n\n@jit\ndef rotation_matrix(angle, axis):\n c = cos(angle)\n s = sin(angle)\n if axis == 0:\n return np.array([[1.0, 0.0, 0.0], [0.0, c, -s], [0.0, s, c]])\n elif axis == 1:\n ret... | [
[
"numpy.linspace",
"numpy.arange",
"numpy.cos",
"numpy.sin",
"numpy.array"
]
] |
phoopies/desdeo-tools | [
"d3cb48c16b35114762386ee8368214b4b432eee0"
] | [
"desdeo_tools/utilities/lattice_generators.py"
] | [
"\"\"\"A file to contain different kinds of lattice generation algorithms.\n\n\"\"\"\n\nimport numba\nimport numpy as np\n\n\n@numba.njit()\ndef fibonacci_sphere(samples: int = 1000) -> np.ndarray:\n \"\"\"Generate a very even lattice of points on a 3d sphere using the fibonacci sphere\n or fibonacci spir... | [
[
"numpy.cos",
"numpy.zeros",
"numpy.sqrt",
"numpy.sin"
]
] |
jvmncs/grandma | [
"36b852cdcab6fa5d60b48c6219bb1f3a599671b8"
] | [
"pygrandma/tests/test_one_d_viz.py"
] | [
"\n\nimport pygrandma\n\nimport numpy as np\nfrom one_d_viz import show1D\n\n\ndata = np.array([[0.499], [0.48], [-0.49], [0.0]],dtype=np.float32)\n\ntree = pygrandma.PyGrandma()\ntree.set_scale_base(2)\ntree.set_cutoff(0)\ntree.fit(data)\nshow1D(tree,data)"
] | [
[
"numpy.array"
]
] |
LinghengMeng/lstm_td3 | [
"2306a4f0e84417e92b9d77627abc8a7f1925f2b1"
] | [
"spinup/algos/pytorch/stochastic_td3/core.py"
] | [
"import numpy as np\nimport scipy.signal\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.distributions.normal import Normal\n\n\ndef combined_shape(length, shape=None):\n if shape is None:\n return (length,)\n return (length, shape) if np.isscalar(shape) else (length... | [
[
"torch.nn.Sequential",
"numpy.log",
"torch.cat",
"torch.exp",
"torch.nn.Linear",
"torch.tanh",
"torch.no_grad",
"numpy.isscalar",
"numpy.prod",
"torch.distributions.normal.Normal",
"torch.clamp",
"torch.nn.functional.softplus",
"torch.squeeze"
]
] |
libertyh/mne-python | [
"bf03e17f323341a877dea62963c86cf140757896"
] | [
"mne/dipole.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"Single-dipole functions and classes.\"\"\"\n\n# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>\n# Eric Larson <larson.eric.d@gmail.com>\n#\n# License: Simplified BSD\n\nfrom copy import deepcopy\nfrom functools import partial\nimport re\n\nimport numpy... | [
[
"numpy.diag",
"numpy.dot",
"scipy.linalg.svd",
"numpy.vstack",
"numpy.concatenate",
"numpy.max",
"numpy.cross",
"numpy.where",
"numpy.hstack",
"numpy.arange",
"numpy.eye",
"numpy.full",
"scipy.linalg.eigh",
"numpy.diff",
"scipy.linalg.pinvh",
"scipy.... |
newbe36524/Newbe.Demo | [
"ba59394e78306bd94f8a1526d1d4a0234dcee4e0"
] | [
"src/BlogDemos/Newbe.TextOcr/ocr/mymain.py"
] | [
"import os\nimport cv2\nimport imutils\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n\ndef pre_process_image(img, save_in_file=None, morph_size=(8, 8)):\n # get rid of the color\n pre = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)\n # Otsu threshold\n pre = cv2.threshold(pre, 250, 255, cv2.THRESH_TOZ... | [
[
"matplotlib.pyplot.imshow",
"numpy.ones",
"numpy.copy",
"numpy.array",
"matplotlib.pyplot.show"
]
] |
jwcalder/MachineLearningAnthro | [
"d43d8f7602ffb6c230eb204d9f05bb71375cc65f"
] | [
"accuracy_percentage_plots.py"
] | [
"import matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\n\nplt.rcParams.update({\n \"text.usetex\": True,\n \"font.family\": \"serif\",\n \"font.sans-serif\": [\"Helvetica\"],\n \"font.size\": 12})\nstyles = ['^-', 'o-', 'd-', 's-', 'p-', 'x-', '*-']\n\n#data = pd.read_csv('results/gbl... | [
[
"matplotlib.pyplot.legend",
"pandas.read_csv",
"matplotlib.pyplot.title",
"matplotlib.pyplot.ylim",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.rcParams.update",
"numpy.array",
"matplotlib.pyplot.ylabel"
]
] |
AtoosaParsa/CS387-Assignments | [
"57dfd68dded486a61df247299d93ca0c804a6b98"
] | [
"HW03/q1.py"
] | [
"import pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom sklearn.metrics import r2_score \nimport time\nfrom preprocessing import preprocessing\n\ndef predict(x, y, theta):\n y_predict = np.matmul(x, theta).flatten()\n loss = ((y_predict-y) ** 2).mean()\n return y_predict, loss\n\n# ... | [
[
"pandas.read_csv",
"sklearn.metrics.r2_score",
"matplotlib.pyplot.tight_layout",
"numpy.expand_dims",
"numpy.matmul",
"matplotlib.pyplot.ylabel",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"numpy.zeros",
"matplotlib.pyplot.figure"
... |
knagrecha/hydra | [
"bf0cf55e0b71acd1966e6e9766ac2022b4a39605"
] | [
"examples/customLayers/BertEmbedding.py"
] | [
"import torch.nn as nn\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.nn import Linear, Dropout, LayerNorm, TransformerEncoder\n\nclass PositionalEncoding(nn.Module):\n def __init__(self, d_model, max_len=5000):\n super(PositionalEncoding, self).__init__()\n sel... | [
[
"torch.nn.Dropout",
"torch.zeros",
"torch.nn.Embedding",
"torch.nn.LayerNorm",
"torch.arange"
]
] |
benchenas/BenchENAS | [
"776cd1dd035d73c4af369d0106d010b932f64782",
"776cd1dd035d73c4af369d0106d010b932f64782",
"776cd1dd035d73c4af369d0106d010b932f64782",
"776cd1dd035d73c4af369d0106d010b932f64782"
] | [
"BenchENAS_python_package/test/test_dataloader.py",
"BenchENAS_python_package/algs/nsga_net/genetic/crossover_and_mutation.py",
"BenchENAS_linux_platform/algs/nsga_net/utils/utils.py",
"BenchENAS_linux_platform/algs/evocnn/genetic/crossover_and_mutation.py"
] | [
"import numpy as np\nimport torch\n\nfrom comm.registry import Registry\nfrom compute import Config_ini\nfrom tools import StatusUpdateTool\nfrom train.dataset.dataloader import BaseDataloader\n\n\ndef test_cifar_loader():\n Config_ini.batch_size = 64\n Config_ini.total_epoch = 50\n datasets = ['CIFAR10', ... | [
[
"numpy.ceil"
],
[
"numpy.logical_not",
"numpy.random.random",
"numpy.power",
"numpy.full",
"numpy.copy",
"numpy.random.permutation",
"numpy.repeat",
"numpy.zeros"
],
[
"numpy.max",
"numpy.array",
"numpy.min"
],
[
"numpy.log2",
"numpy.random.rando... |
Harsh-Vavaiya/Stock-prediction-game | [
"fbff899f498f90988082a1ce59978cd02fb6f498"
] | [
"app.py"
] | [
"import requests\nfrom flask import Flask, request, jsonify, send_from_directory\napp = Flask(__name__)\nimport pandas as pd\nimport quandl\nimport math\nimport random\nimport os\nimport numpy as np\nfrom sklearn import preprocessing, cross_validation, svm\nfrom sklearn.linear_model import LinearRegression\n\nif 'O... | [
[
"sklearn.cross_validation.train_test_split",
"numpy.array",
"sklearn.preprocessing.scale",
"sklearn.linear_model.LinearRegression"
]
] |
bashar94/simpletransformers | [
"4a36dde6bd4d049dc1d0e0ecd83dccf5bff1f5b0"
] | [
"simpletransformers/retrieval/retrieval_model.py"
] | [
"import json\nimport logging\nimport math\nimport os\nimport random\nimport warnings\nimport string\nfrom dataclasses import asdict\nfrom multiprocessing import Pool, cpu_count\nfrom pathlib import Path\n\nimport numpy as np\nimport pandas as pd\nimport torch\nimport transformers\nfrom tensorboardX import SummaryWr... | [
[
"torch.max",
"torch.nn.functional.dropout",
"torch.cat",
"torch.utils.data.DataLoader",
"pandas.DataFrame",
"torch.cuda.amp.autocast",
"torch.no_grad",
"torch.cuda.is_available",
"torch.cuda.manual_seed_all",
"torch.device",
"torch.tensor",
"torch.nn.NLLLoss",
"... |
RCBiczok/cmapPy | [
"580b0d656892e72f58047666a94e2769ddf63b3f"
] | [
"cmapPy/math/tests/test_agg_wt_avg.py"
] | [
"import unittest\nimport logging\nimport pandas as pd\nimport cmapPy.pandasGEXpress.setup_GCToo_logger as setup_logger\nimport cmapPy.math.agg_wt_avg as agg_wt_avg\n\nlogger = logging.getLogger(setup_logger.LOGGER_NAME)\n\ntest_mat = pd.DataFrame({'A':[1,2,3], 'B': [2,8,6], 'C': [6,8,9]})\ntest_mat_corr = test_mat.... | [
[
"pandas.util.testing.assert_frame_equal",
"pandas.DataFrame"
]
] |
aicentral/pytorch_cluster | [
"75216b3c22278a3cbc906a1e83f6e4710ff58b41"
] | [
"torch_cluster/knn.py"
] | [
"from typing import Optional\n\nimport torch\n\n\n@torch.jit.script\ndef knn(x: torch.Tensor, y: torch.Tensor, k: int,\n batch_x: Optional[torch.Tensor] = None,\n batch_y: Optional[torch.Tensor] = None, cosine: bool = False,\n num_workers: int = 1) -> torch.Tensor:\n r\"\"\"Finds for each el... | [
[
"torch.stack",
"torch.cumsum",
"torch.ops.torch_cluster.knn",
"torch.ones_like"
]
] |
Asap7772/rail-rl-franka-eval | [
"4bf99072376828193d05b53cf83c7e8f4efbd3ba",
"4bf99072376828193d05b53cf83c7e8f4efbd3ba",
"4bf99072376828193d05b53cf83c7e8f4efbd3ba",
"4bf99072376828193d05b53cf83c7e8f4efbd3ba",
"4bf99072376828193d05b53cf83c7e8f4efbd3ba",
"4bf99072376828193d05b53cf83c7e8f4efbd3ba",
"4bf99072376828193d05b53cf83c7e8f4efbd3b... | [
"railrl/torch/mpc/controller.py",
"experiments/avi/eric_grasp_sac_pixel.py",
"experiments/ashvin/vae/old/pointmass/test_vae_goal2.py",
"railrl/torch/ddpg/multi_step_ql.py",
"visualization/grill/pick_place_baselines.py",
"scripts/compute_rewards_on_video.py",
"experiments/sac/profile.py"
] | [
"import numpy as np\nfrom torch import optim\nimport torch\n\nfrom railrl.policies.base import ExplorationPolicy\nfrom railrl.state_distance.policies import UniversalPolicy, \\\n SampleBasedUniversalPolicy\nfrom railrl.state_distance.util import merge_into_flat_obs, split_flat_obs\nfrom railrl.torch.core import ... | [
[
"torch.optim.Adam",
"torch.clamp",
"numpy.expand_dims",
"matplotlib.pyplot.subplots",
"numpy.ones",
"numpy.argmin",
"numpy.random.uniform",
"numpy.repeat",
"numpy.array"
],
[
"numpy.prod"
],
[
"torch.load"
],
[
"numpy.ascontiguousarray",
"numpy.expan... |
aviplane/runmanager | [
"25fd87ad2fb1232e8484eb8b8643263a81ba588c"
] | [
"runmanager/__init__.py"
] | [
"#####################################################################\n# #\n# /__init__.py #\n# #\n# Copyright 2013, Monash Univer... | [
[
"numpy.iterable",
"numpy.log10",
"numpy.array_equal",
"pandas.DataFrame.from_dict"
]
] |
bartek-bartlomiej/qiskit-terra | [
"247f44ef87b08302514e512e4ed36601e95f33cd"
] | [
"qiskit/opflow/primitive_ops/pauli_op.py"
] | [
"# This code is part of Qiskit.\n#\n# (C) Copyright IBM 2020.\n#\n# This code is licensed under the Apache License, Version 2.0. You may\n# obtain a copy of this license in the LICENSE.txt file in the root directory\n# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.\n#\n# Any modifications or ... | [
[
"numpy.logical_xor",
"numpy.logical_or",
"numpy.real",
"numpy.fromiter",
"numpy.logical_and",
"numpy.sum"
]
] |
axcochrane/gpt-2 | [
"d51d19e74ffb1b2557e952cad6b7f31b5d99af60"
] | [
"train-horovod.py"
] | [
"#!/usr/bin/env python3\n# Usage:\n# PYTHONPATH=src ./train --dataset <file|directory|glob>\n\nimport fire\nimport json\nimport os\nimport numpy as np\nimport tensorflow as tf\nimport random\nimport time\n\nimport horovod.tensorflow as hvd\n\nimport model, sample, encoder\nfrom load_dataset import load_dataset, Sa... | [
[
"tensorflow.compat.v1.ConfigProto",
"tensorflow.compat.v1.train.AdamOptimizer",
"tensorflow.train.latest_checkpoint",
"numpy.random.seed",
"tensorflow.compat.v1.trainable_variables",
"tensorflow.compat.v1.global_variables_initializer",
"tensorflow.compat.v1.Session",
"tensorflow.co... |
valueanalyticslabs/covid-19-germany-gae | [
"75542cdab7df1e2977ca5bbdef2ec8c54c0680a4"
] | [
"tools/plot-compare-sources.py"
] | [
"# MIT License\n\n# Copyright (c) 2020 Dr. Jan-Philip Gehrcke\n\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use... | [
[
"matplotlib.pyplot.tight_layout",
"pandas.read_csv",
"pandas.to_datetime",
"pandas.DateOffset",
"pandas.Series",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.savefig",
"matplotlib.dates.DayLocator",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.style.use",
"matplotli... |
whathisface/Vision-FPGA-SoM | [
"eab5a291983c95bcee844b187addde2d42ffd896"
] | [
"SoM/RTL/vision/sw/read_himax.py"
] | [
"from __future__ import division\nimport serial\nimport time\nimport threading\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom matplotlib.animation import FuncAnimation\n\n\nser = serial.Serial(port='COM17', baudrate=230400, timeout=1.0)\nser.set_buffer_size(rx_size = 25000, tx_size = 12800)\n\nprint(ser... | [
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.show"
]
] |
debojyoti007/OpenCV | [
"6810e2242ce7c9ea5e492d4d951c45cc99782785"
] | [
"Chapter09/create_features.py"
] | [
"import os \nimport sys \nimport argparse \nimport _pickle as pickle \nimport json \n \nimport cv2 \nimport numpy as np \nfrom sklearn.cluster import KMeans \n \nclass DenseDetector(): \n def __init__(self, step_size=20, feature_scale=20, img_bound=20): \n # Create a dense feature detector \n self.... | [
[
"numpy.reshape",
"numpy.zeros",
"numpy.sum"
]
] |
htem/cb2_project_analysis | [
"a677cbadc7e3bf0074975a94ed1d06b4801899c0",
"a677cbadc7e3bf0074975a94ed1d06b4801899c0",
"a677cbadc7e3bf0074975a94ed1d06b4801899c0",
"a677cbadc7e3bf0074975a94ed1d06b4801899c0",
"a677cbadc7e3bf0074975a94ed1d06b4801899c0"
] | [
"analysis/dimensionalty_sim/analysis2.py",
"analysis/gen_db/mf_grc/gen_mf_locs_210518.py",
"analysis/dimensionalty_sim/run_tests_210617.py",
"analysis/dimensionalty_sim/sim_lite2.py",
"analysis/dimensionalty_sim/neurons.py"
] | [
"# from bitarray import bitarray\n# import random\nimport math\nimport statistics\n# import copy\nimport numpy as np\n# import logging\nimport collections\nfrom numpy import linalg as LA\n\ndef get_covariance_matrix(data):\n arr = np.array(data)\n return np.cov(arr, bias=False)\n # return np.cov(arr, bias=... | [
[
"numpy.linalg.eig",
"numpy.cov",
"numpy.array",
"numpy.real"
],
[
"sklearn.cluster.DBSCAN"
],
[
"numpy.random.seed",
"numpy.set_printoptions",
"numpy.random.shuffle",
"numpy.ones",
"numpy.zeros",
"numpy.sum"
],
[
"numpy.ravel",
"numpy.array",
"nu... |
microfluidix/Griottes | [
"31881fcf2c247e0816e1484c3190923c73599674"
] | [
"griottes/analyse/cell_property_extraction.py"
] | [
"import numpy as np\nimport skimage.measure\nimport skimage\nimport pandas\nfrom scipy.spatial import Delaunay\nfrom scipy.spatial import Voronoi\nfrom sklearn.decomposition import PCA\nfrom tqdm import tqdm\n\n# IMPORTANT CONVENTIONS: Following standard practice,\n# all images hvae shapes Z, X, Y, C where C in the... | [
[
"scipy.spatial.Voronoi",
"numpy.sqrt",
"numpy.nonzero",
"numpy.abs",
"scipy.spatial.Delaunay",
"numpy.argwhere",
"numpy.arctan2",
"numpy.shape",
"numpy.zeros_like",
"sklearn.decomposition.PCA"
]
] |
afranck64/keras-easy | [
"a27c0fefe8f9796dc22eca7aa3123548ac5a4646"
] | [
"keras_easy/models/tools/generators.py"
] | [
"import os\nimport numpy as np\nimport pandas as pd\nimport multiprocessing as mp\nfrom keras import backend as K\nfrom keras.preprocessing.image import (ImageDataGenerator as _ImageDataGenerator, \n DirectoryIterator as _DirectoryIterator,\n ... | [
[
"pandas.read_csv",
"numpy.random.randint"
]
] |
mmmats/Projet_final_AJC | [
"cc903331ef6cb7a1144f5c9b1aea74bfbab65e11"
] | [
"web_app/__init__.py"
] | [
"from flask import Flask\nfrom flask import render_template\nfrom flask import request\nfrom flask import jsonify\nfrom flask import send_file\nfrom flask import redirect\nfrom flask import url_for\nimport json\nimport os\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.cuda.amp a... | [
[
"torch.nn.functional.upsample",
"torch.nn.Softmax",
"matplotlib.pyplot.imshow",
"pandas.read_csv",
"torch.sigmoid",
"torch.load",
"torch.nn.ModuleList",
"torch.arange",
"torch.cuda.amp.autocast",
"torch.tensor",
"torch.nn.Linear",
"torch.no_grad",
"matplotlib.py... |
jjkver/deep-learning-from-scratch | [
"29c528a7d714d80bc59f020ff0134c36a9b218e6"
] | [
"common/multi_layer_net_extend.py"
] | [
"# coding: utf-8\nimport sys, os\nsys.path.append(os.pardir) # 부모 디렉터리의 파일을 가져올 수 있도록 설정\nimport numpy as np\nfrom collections import OrderedDict\nfrom common.layers import *\nfrom common.gradient import numerical_gradient\n\nclass MultiLayerNetExtend:\n \"\"\"완전 연결 다층 신경망(확장판)\n 가중치 감소, 드롭아웃, 배치 정규화 구현\n\n ... | [
[
"numpy.sqrt",
"numpy.ones",
"numpy.argmax",
"numpy.random.randn",
"numpy.zeros",
"numpy.sum"
]
] |
dboeckenhoff/tikzplotlib | [
"45ca7fe6c40c547116cf51063f16aa4ce05514f2"
] | [
"tikzplotlib/_patch.py"
] | [
"import matplotlib as mpl\n\nfrom . import _path as mypath\nfrom ._text import _get_arrow_style\n\n\ndef draw_patch(data, obj):\n \"\"\"Return the PGFPlots code for patches.\n \"\"\"\n if isinstance(obj, mpl.patches.FancyArrowPatch):\n data, draw_options = mypath.get_draw_options(\n data,... | [
[
"matplotlib.transforms.Affine2D",
"matplotlib.transforms.IdentityTransform"
]
] |
terhardt/DO-progression | [
"7ac2cdd5fb5ea48a66edb4fffd44285d607b1027"
] | [
"process_ramp_samplers.py"
] | [
"import numpy as np\nimport joblib as jl\nimport xarray as xr\nimport pandas as pd\nimport sys\nfrom os.path import exists\nfrom itertools import product\n\n\ndef get_traces(sampler, nthin):\n \"\"\"Extract traces from emcee.EnsebleSampler and apply\n invers transformation of parameters\n \"\"\"\n # loa... | [
[
"pandas.read_table",
"numpy.array",
"numpy.exp",
"numpy.full"
]
] |
wang93/Decreasing-Momentum-BN | [
"6a8f01f69732085d1c54d7653cff260a5dd0a5a1"
] | [
"special_batchnorm/batchnorm0.py"
] | [
"import torch\nfrom torch.nn.modules.batchnorm import _BatchNorm as origin_BN\n\n'''reimplement BN in module but not function'''\n\n\nclass _BatchNorm(origin_BN):\n @staticmethod\n def expand(stat, target_size):\n if len(target_size) == 4:\n stat = stat.unsqueeze(1).unsqueeze(2).expand(targe... | [
[
"torch.full_like",
"torch.nn.DataParallel",
"torch.var_mean"
]
] |
SConsul/FLITE | [
"7e3f462e66845a5c05e909d6a21dc1862a58579b"
] | [
"scripts/compute_avg_image.py"
] | [
"# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT license.\n\nimport os\nimport glob\nimport argparse\nimport numpy as np\nfrom PIL import Image\n\ndef main():\n\n parser = argparse.ArgumentParser()\n parser.add_argument(\"--data_path\", help=\"Path to ORBIT benchmark dataset root\")\n args... | [
[
"numpy.std",
"numpy.array",
"numpy.mean"
]
] |
rasmus-rudling/degree-thesis | [
"d74581491ec9618149c582059e290dca9957951d"
] | [
"ros_ws/src/crazyswarm/scripts/perceived-safety-study/trajectoryStuff/followTrajectory.py"
] | [
"#!/usr/bin/env python\nimport csv\nimport sys\nimport matplotlib.pyplot as plt\nfrom tracemalloc import start\nimport time\nfrom TrajectoryUtils import TrajectoryUtils\nfrom TrajectoryUtils import euclidianDistance\nsys.path.append(\"../..\")\n\nfrom planner.cbFunctions import heuristicFunction\n\nfrom pycrazyswar... | [
[
"matplotlib.pyplot.gca",
"matplotlib.pyplot.close"
]
] |
thisIsMikeKane/building-controls-simulator | [
"c60ecb706bd3c008ada1d6d08c7f869b36d55ff8"
] | [
"src/python/BuildingControlsSimulator/StateEstimatorModels/LowPassFilter.py"
] | [
"# created by Tom Stesco tom.s@ecobee.com\n\nimport attr\nimport pandas as pd\nimport numpy as np\n\nfrom BuildingControlsSimulator.StateEstimatorModels.StateEstimatorModel import (\n StateEstimatorModel,\n)\nfrom BuildingControlsSimulator.DataClients.DataStates import STATES\nfrom BuildingControlsSimulator.Conv... | [
[
"numpy.arange",
"numpy.full"
]
] |
visualCalculus/neural-style-transfer | [
"96f98a642dc9bf7b1ae59729b3712ff467afa38d"
] | [
"nst/losses.py"
] | [
"import torch \nfrom torch import nn \nimport torch.nn.functional as F \n\nclass ContentLoss(nn.Module):\n \"\"\"\n Content Loss for the neural style transfer algorithm.\n \"\"\"\n def __init__(self, target: torch.Tensor, device: torch.device) -> None:\n super(ContentLoss, self).__init__()\n ... | [
[
"torch.nn.functional.mse_loss",
"torch.matmul"
]
] |
jsenellart/OpenNMT-tf | [
"75f84906c4a5a8a40ed4eaec77bc5f5c1c8c4bff"
] | [
"opennmt/training.py"
] | [
"\"\"\"Training related classes and functions.\"\"\"\n\nimport abc\nimport contextlib\nimport time\n\nimport tensorflow as tf\n\nfrom opennmt.optimizers import utils as optimizer_util\nfrom opennmt.utils import misc\n\n\nclass Trainer(abc.ABC):\n \"\"\"Base class for model trainer.\"\"\"\n\n def __init__(self, ch... | [
[
"tensorflow.config.optimizer.get_experimental_options",
"tensorflow.keras.mixed_precision.experimental.LossScaleOptimizer",
"tensorflow.constant",
"tensorflow.distribute.InputContext",
"tensorflow.reduce_sum",
"tensorflow.summary.create_file_writer",
"tensorflow.cast",
"tensorflow.... |
tianhm/zipline | [
"5343344929558ef42dc6ea75d433218471e91a0d",
"5343344929558ef42dc6ea75d433218471e91a0d"
] | [
"zipline/pipeline/factors/factor.py",
"zipline/lib/labelarray.py"
] | [
"\"\"\"\nfactor.py\n\"\"\"\nfrom functools import wraps\nfrom operator import attrgetter\nfrom numbers import Number\nfrom math import ceil\n\nfrom numpy import empty_like, inf, nan, where\nfrom scipy.stats import rankdata\n\nfrom zipline.errors import BadPercentileBounds, UnknownRankMethod\nfrom zipline.lib.normal... | [
[
"numpy.empty_like",
"numpy.where"
],
[
"numpy.vectorize",
"numpy.where",
"pandas.MultiIndex.from_product",
"numpy.unique"
]
] |
yangkevin2/emnlp2020-stream-beam-semantic | [
"130cc7bac1b9555c4522816daa0a33528250b503",
"130cc7bac1b9555c4522816daa0a33528250b503"
] | [
"seq2seq/geoqueries/attention/util.py",
"seq2tree/atis/attention/main.py"
] | [
"import random\nimport math\nfrom random import randint\nimport pickle as pkl\nimport numpy as np\nimport torch\nimport tree\nfrom operator import itemgetter\n\nrandom.seed(1)\nclass SymbolsManager():\n def __init__(self, whether_add_special_tags):\n self.symbol2idx = {}\n self.idx2symbol = {}\n ... | [
[
"torch.zeros"
],
[
"torch.nn.Softmax",
"torch.nn.NLLLoss",
"torch.nn.LogSoftmax",
"torch.nn.Dropout",
"torch.nn.init.uniform_",
"numpy.random.seed",
"torch.cat",
"torch.zeros",
"torch.manual_seed",
"torch.nn.Embedding",
"torch.nn.Linear",
"torch.nn.functiona... |
jejjohnson/2019_rbig_rs | [
"00df5c623d55895e0b43a4130bb6c601fae84890",
"00df5c623d55895e0b43a4130bb6c601fae84890",
"00df5c623d55895e0b43a4130bb6c601fae84890"
] | [
"src/features/preprocessing.py",
"src/experiments/drought/compare_smadi.py",
"src/experiments/spatemp/entropy_earth.py"
] | [
"from typing import Tuple, Optional\n\nimport pandas as pd\nimport xarray as xr\nfrom sklearn.preprocessing import StandardScaler\n\nLEVELS = [\"time\", \"lat\", \"lon\"]\n\n# @task # get reference cube\ndef get_reference_cube(data: xr.DataArray) -> pd.DataFrame:\n \"\"\"Wrapper Function to get reference cube\"\... | [
[
"sklearn.preprocessing.StandardScaler"
],
[
"sklearn.preprocessing.StandardScaler",
"numpy.arange",
"pandas.concat",
"pandas.DataFrame"
],
[
"sklearn.preprocessing.StandardScaler",
"pandas.DataFrame"
]
] |
idekany/correct_vvv_zp | [
"cc33bbcf5bb56c8f827c188b66e5377fe522b78d"
] | [
"correct_vvv_zp.py"
] | [
"import numpy as np\nimport utils as ut\nimport os\nimport sys\n\n# Read parameters from a file or from the command line:\nparser = ut.argparser()\n# print(len(sys.argv))\nif len(sys.argv) == 1:\n # use default name for the parameter file\n pars = parser.parse_args([ut.default_parameter_file])\nelse:\n par... | [
[
"numpy.rec.fromarrays",
"numpy.genfromtxt"
]
] |
xiangzixuebit/Scipy | [
"9f7ca1ed7be17a7d1dd211722c5cc1eca33bcec0"
] | [
"scipy/optimize/_linprog_simplex.py"
] | [
"\"\"\"Simplex method for linear programming\n\nThe *simplex* method uses a traditional, full-tableau implementation of\nDantzig's simplex algorithm [1]_, [2]_ (*not* the Nelder-Mead simplex).\nThis algorithm is included for backwards compatibility and educational\npurposes.\n\n .. versionadded:: 0.15.0\n\nWarn... | [
[
"numpy.take",
"numpy.less",
"numpy.arange",
"numpy.eye",
"numpy.atleast_1d",
"numpy.delete",
"numpy.ma.masked_where",
"numpy.zeros",
"numpy.vstack",
"numpy.isclose"
]
] |
minds-n-company/CDSS-Sinusitis | [
"34794a516a095f5a8f15ec6c8e4fbb3ee8355413"
] | [
"utils.py"
] | [
"# Author : skjang@mnc.ai\r\n# Date : 2020-12-03\r\n\r\nimport pandas as pd\r\nimport os\r\nimport copy, shutil\r\n\r\nimport torch\r\nimport torch.nn.functional as F\r\n\r\nfrom torch.optim import lr_scheduler\r\nimport torch.optim as optim\r\nimport torch.nn as nn\r\nfrom collections import defaultdict\r\n\r\n# r... | [
[
"torch.sigmoid",
"torch.empty_like",
"torch.nn.functional.softplus",
"torch.where"
]
] |
DIvkov575/python-epipack | [
"f1bf4ec943f71ee922825fe3aa5c05263afef22e"
] | [
"main.py"
] | [
"import pandas as pd\nfrom pandas import DataFrame\nimport os\nimport random\nfrom bisect import bisect_left\n\ndf1 = pd.read_csv(\"Tables/song-list-a.csv\")\n\n\ndef get_asset_names(directory=\"Assets\") -> list:\n # pulls all file paths from director\n # removes spaces from all paths\n return os.listdir(... | [
[
"pandas.concat",
"pandas.read_csv",
"pandas.DataFrame"
]
] |
LautaroParada/variance-test | [
"bc88de3dc324f622560b781aae8a0280f4c99b29"
] | [
"code/price_paths.py"
] | [
"import numpy as np\nfrom scipy.stats import halfnorm\n\nclass PricePaths(object):\n \n def __init__(self, n:int, T:int, s0:float):\n \n self.n = n # number of paths to generate\n self.T = T # number of observations to generate\n self.s0 = ... | [
[
"scipy.stats.halfnorm.rvs",
"numpy.sqrt",
"numpy.abs",
"numpy.random.choice",
"numpy.random.poisson",
"numpy.random.normal",
"numpy.std",
"numpy.mean",
"numpy.random.uniform",
"numpy.exp",
"numpy.zeros"
]
] |
andrewhead/Package-Qualifiers | [
"ac58654ea0463c0986670fdb80fb8d04dd68e2e2"
] | [
"dump/popular_tag_post_stats.py"
] | [
"#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import unicode_literals\nimport logging\nfrom progressbar import ProgressBar, Percentage, Bar, ETA, Counter, RotatingMarker\nimport numpy as np\n\nfrom dump import dump_json\nfrom models import Post, Tag, PostTag\n\n\nlogger = logging.getLogger('da... | [
[
"numpy.array",
"numpy.random.choice"
]
] |
Bingwen-Hu/hackaway | [
"69727d76fd652390d9660e9ea4354ba5cc76dd5c",
"69727d76fd652390d9660e9ea4354ba5cc76dd5c",
"69727d76fd652390d9660e9ea4354ba5cc76dd5c",
"69727d76fd652390d9660e9ea4354ba5cc76dd5c",
"69727d76fd652390d9660e9ea4354ba5cc76dd5c",
"69727d76fd652390d9660e9ea4354ba5cc76dd5c"
] | [
"memos/python/newsparser.py",
"projects/faces/facessh/facessh/model/SSH.py",
"memos/opencv/RGB2BGR.py",
"projects/imwrap/mls/body.py",
"projects/olds/ocr/ocr-tensorflow/preprocess.py",
"projects/faces/pcn/pcn/api.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Mar 7 16:45:41 2017\n\n@author: Mory\n\"\"\"\nimport requests\nimport pandas as pd\nfrom bs4 import BeautifulSoup\nfrom webUtil import character2url, date2timestamp\n\ndefaulttimes = [[2010, 1, 1],\n [2011, 1, 1],\n [2012, 1, 1],\n ... | [
[
"pandas.DataFrame"
],
[
"torch.nn.Softmax",
"torch.nn.ConvTranspose2d",
"torch.cat",
"torch.nn.functional.cross_entropy",
"torch.nn.MaxPool2d",
"numpy.array"
],
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.show"
],
[
"numpy.l... |
atmacvit/meronymnet | [
"47e1a7caadc0f770439bb26a93b885f790f62804",
"47e1a7caadc0f770439bb26a93b885f790f62804",
"47e1a7caadc0f770439bb26a93b885f790f62804",
"47e1a7caadc0f770439bb26a93b885f790f62804"
] | [
"Meronymnet/arch/label2obj/util/util.py",
"baselines/scripts/segvae/models/networks/normalization.py",
"baselines/scripts/layout2im/data/custom_dataloader.py",
"baselines/scripts/lostgans/data/custom_loader.py"
] | [
"\"\"\"\nCopyright (C) 2019 NVIDIA Corporation. All rights reserved.\nLicensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode).\n\"\"\"\n\nimport re\nimport importlib\nimport torch\nfrom argparse import Namespace\nimport numpy as np\nfrom PIL import Image\nimport os\... | [
[
"torch.ByteTensor",
"numpy.expand_dims",
"torch.load",
"numpy.clip",
"numpy.uint8",
"torch.from_numpy",
"numpy.concatenate",
"torch.cuda.is_available",
"numpy.transpose",
"numpy.repeat",
"numpy.array",
"numpy.zeros"
],
[
"torch.nn.Sequential",
"torch.nn.... |
asteroid-team/Libri_VAD | [
"d90f2c7c6e281553290e9171f7cb392c543c4790"
] | [
"scripts/create_VAD_dataset.py"
] | [
"from librosa import resample\nimport tqdm.contrib.concurrent\nimport argparse\nimport os\nimport json\nimport numpy as np\nimport numpy.random as npr\nimport soundfile as sf\nimport random\nimport warnings\nimport pyloudnorm as pyln\nfrom tqdm import tqdm\nfrom itertools import cycle\n\n# eps secures log and divis... | [
[
"numpy.abs",
"numpy.random.seed",
"numpy.concatenate",
"numpy.zeros_like",
"numpy.hanning",
"numpy.array",
"numpy.zeros",
"numpy.random.default_rng"
]
] |
peterk1198/cycle-gan | [
"aaddb24f976b65dd5c7d93e47f374ff2962580de"
] | [
"count_things.py"
] | [
"import pandas as pd\nimport os\n\ndf = pd.read_csv(\"sample_labels.csv\")\n\nmales = 0\nfemales = 0\n\nfor index, row in df.iterrows():\n\tif row[\"Patient Gender\"] == \"M\":\n\t\tmales += 1\n\telse:\n\t\tfemales += 1\n\nprint (males, \" males\")\nprint (females, \" females\")\n\n\nfor index, row in df.iterrows()... | [
[
"pandas.read_csv"
]
] |
diiogofernands/transformers | [
"f5cd27694a0c7d0036954c8350f774a5c1181a57"
] | [
"src/transformers/models/visual_bert/modeling_visual_bert.py"
] | [
"# coding=utf-8\n# Copyright 2021 The UCLA NLP Authors and The HuggingFace Inc. team. 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.apach... | [
[
"torch.nn.Softmax",
"torch.nn.Dropout",
"torch.nn.CrossEntropyLoss",
"torch.ones",
"torch.nn.KLDivLoss",
"torch.nn.LogSoftmax",
"torch.cat",
"torch.zeros",
"torch.nn.Embedding",
"torch.nn.LayerNorm",
"torch.nn.Tanh",
"torch.nn.Linear",
"torch.matmul",
"torch... |
dreadn0ught/mlrose | [
"2a9d604ea464cccc48f30b8fe6b81fe5c4337c80"
] | [
"tests/test_fitness.py"
] | [
"\"\"\" Unit tests for fitness.py\"\"\"\n\n# Author: Genevieve Hayes\n# License: BSD 3 clause\n\nimport unittest\nimport numpy as np\nfrom mlrose import (OneMax, FlipFlop, FourPeaks, SixPeaks, ContinuousPeaks,\n Knapsack, TravellingSales, Queens, MaxKColor,\n CustomFitness)\nfr... | [
[
"numpy.array",
"numpy.sum"
]
] |
BPearlstine/colour | [
"40f0281295496774d2a19eee017d50fd0c265bd8",
"40f0281295496774d2a19eee017d50fd0c265bd8",
"40f0281295496774d2a19eee017d50fd0c265bd8",
"40f0281295496774d2a19eee017d50fd0c265bd8",
"40f0281295496774d2a19eee017d50fd0c265bd8",
"40f0281295496774d2a19eee017d50fd0c265bd8",
"40f0281295496774d2a19eee017d50fd0c265bd... | [
"colour/volume/tests/test_spectrum.py",
"colour/temperature/tests/test_cie_d.py",
"colour/models/rgb/datasets/dji_dgamut.py",
"colour/models/rgb/transfer_functions/tests/test_gamma.py",
"colour/blindness/machado2009.py",
"colour/models/rgb/transfer_functions/tests/test_filmic_pro.py",
"colour/models/rgb... | [
"# -*- coding: utf-8 -*-\n\"\"\"\nDefines unit tests for :mod:`colour.volume.spectrum` module.\n\"\"\"\n\nfrom __future__ import division, unicode_literals\n\nimport numpy as np\nimport unittest\nfrom itertools import permutations\n\nfrom colour.volume import (generate_pulse_waves, XYZ_outer_surface,\n ... | [
[
"numpy.reshape",
"numpy.array",
"numpy.tile"
],
[
"numpy.reshape",
"numpy.array",
"numpy.tile"
],
[
"numpy.array"
],
[
"numpy.reshape",
"numpy.tile"
],
[
"numpy.linalg.inv",
"numpy.array",
"numpy.trapz",
"numpy.searchsorted"
],
[
"numpy.r... |
kingreatwill/penter | [
"2d027fd2ae639ac45149659a410042fe76b9dab0",
"2d027fd2ae639ac45149659a410042fe76b9dab0"
] | [
"third/opencv/gaussian_mix.py",
"ml/sampling/demo.py"
] | [
"#!/usr/bin/env python\n\n# Python 2/3 compatibility\nfrom __future__ import print_function\nimport sys\nPY3 = sys.version_info[0] == 3\n\nif PY3:\n xrange = range\n\nimport numpy as np\nimport cv2 as cv\n\nfrom numpy import random\n\ndef make_gaussians(cluster_n, img_size):\n points = []\n ref_distrs = []... | [
[
"numpy.dot",
"numpy.sqrt",
"numpy.random.multivariate_normal",
"numpy.eye",
"numpy.int32",
"numpy.arctan2",
"numpy.random.rand",
"numpy.zeros",
"numpy.vstack",
"numpy.random.randint"
],
[
"numpy.array",
"matplotlib.pyplot.show"
]
] |
edfong/npl | [
"9e94287a7c253a33addcafb431c384be8a7dd8df"
] | [
"experiments/Toy_GMM/run_NPL_toygmm.py"
] | [
"\"\"\" \nRunning RR-NPL for Toy GMM (set R_restarts = 0 for FI-NPL)\n\n\"\"\"\n\nimport numpy as np\nimport pandas as pd\nimport time\nimport copy\nfrom npl import bootstrap_gmm as bgmm\nfrom npl.maximise_gmm import init_toy\nfrom npl.maximise_gmm import sampleprior_toy\n\ndef load_data(seed):\n #load data and... | [
[
"numpy.load",
"pandas.Series",
"numpy.random.seed"
]
] |
manuelamigotto/Application-of-data-science-and-machine-learning-on-the-one-health-project-combatting-zoonoses | [
"7219feaa44ac1b1fa056be0190fd048af7a89598"
] | [
"geocode_utils.py"
] | [
"import datetime\r\nimport os\r\nimport pyarrow.feather as feather\r\nimport pandas as pd\r\nimport jsonpickle\r\n\r\ndef generate_error_file_name(error_foldername, error_filename):\r\n now = datetime.datetime.now()\r\n year = now.strftime(\"%Y\")\r\n month = now.strftime(\"%m\")\r\n day = now.strftime(... | [
[
"pandas.notnull",
"pandas.read_csv",
"pandas.isnull"
]
] |
Wuyunfan-BUPT/ImageProcess | [
"32c6c12f7f4a7e5493d9791f8be37c9adc6065b3"
] | [
"rawImageProcess/raw_main.py"
] | [
"import imageio\nimport copy as cp\nimport numpy as np\nimport cv2\nfrom PIL import Image\n\n'''\n ###############\n addBoundary(img, kernel)\n convolve1(img, kernel, filter_type, mode='same')\n convolve(img, kernel, filter_type, mode='same')\n wise_element_sum(img, kernel, filter_type)\n 上面四个函数用于... | [
[
"numpy.power",
"numpy.dstack",
"numpy.mean",
"numpy.zeros_like",
"numpy.exp",
"numpy.zeros",
"numpy.double",
"numpy.mat"
]
] |
zelunwu/ECCOv4-py | [
"03b6a1b01fcd17b0b88c25bee205c195df52d7fa",
"03b6a1b01fcd17b0b88c25bee205c195df52d7fa"
] | [
"ecco_v4_py/resample_to_latlon.py",
"ecco_v4_py/test_llc_array_loading_and_conversion.py"
] | [
"#!/usr/bin/env python2\n# -*- coding: utf-8 -*-\n\nfrom __future__ import division,print_function\nimport numpy as np\nimport matplotlib.pylab as plt\nimport xarray as xr\n\n# The Proj class can convert from geographic (longitude,latitude) to native\n# map projection (x,y) coordinates and vice versa, or from one m... | [
[
"numpy.meshgrid",
"numpy.linspace"
],
[
"numpy.unique",
"matplotlib.pylab.draw",
"matplotlib.pylab.figure",
"matplotlib.pylab.imshow",
"matplotlib.pylab.colorbar"
]
] |
tianzheng4/Distributionally-Adversarial-Attack | [
"f6d941b33cc50981b46d0ac40aa071bc25cf3a3e"
] | [
"convex_adversarial-master/examples/cifar.py"
] | [
"# import waitGPU\n# import setGPU\n# waitGPU.wait(utilization=20, available_memory=10000, interval=60)\n# waitGPU.wait(gpu_ids=[1,3], utilization=20, available_memory=10000, interval=60)\n\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.nn.functional as F\nfrom torch.autograd import... | [
[
"torch.manual_seed",
"numpy.random.seed",
"torch.cuda.manual_seed_all",
"torch.optim.lr_scheduler.StepLR"
]
] |
tsadakane/TIGRE | [
"a853cd2d4a6bc9509c01414b85ca75b4448fd700"
] | [
"Python/tigre/utilities/filtering.py"
] | [
"from __future__ import division\r\nfrom __future__ import print_function\r\nfrom numpy.core.arrayprint import dtype_is_implied\r\nfrom tigre.utilities.parkerweight import parkerweight\r\nimport numpy as np\r\nfrom scipy.fft import fft, ifft\r\n\r\nimport warnings\r\n\r\nimport numpy as np\r\nfrom tigre.utilities.... | [
[
"numpy.hstack",
"scipy.fft.ifft",
"numpy.fft.fft",
"numpy.arange",
"numpy.cos",
"numpy.empty",
"numpy.sin",
"numpy.int64",
"numpy.zeros",
"scipy.fft.fft"
]
] |
BrookInternSOMA/UNIT_tensorflow | [
"4d7430a6f0bd3bea72d821e14db6e6442c02ed32"
] | [
"ops.py"
] | [
"import tensorflow as tf\nimport tensorflow.contrib as tf_contrib\nfrom tensorflow.contrib.layers import variance_scaling_initializer as he_init\n\ndef conv(x, channels, kernel=3, stride=2, pad=0, normal_weight_init=False, activation_fn='leaky', scope='conv_0') :\n with tf.variable_scope(scope) :\n x = tf... | [
[
"tensorflow.layers.dropout",
"tensorflow.nn.sigmoid_cross_entropy_with_logits",
"tensorflow.tanh",
"tensorflow.pad",
"tensorflow.contrib.layers.variance_scaling_initializer",
"tensorflow.truncated_normal_initializer",
"tensorflow.square",
"tensorflow.shape",
"tensorflow.zeros_l... |
danielkelshaw/PySwallow | [
"262acd899937715059876e059e1edf2eabae15c0"
] | [
"tests/swallows/test_mo_swallow.py"
] | [
"import numpy as np\nimport pytest\n\nimport pyswallow as ps\nimport pyswallow.handlers.boundary_handler as psbh\n\n\nclass TestMOSwallow:\n\n @pytest.fixture\n def swallow(self):\n bounds = {\n 'x0': [-50.0, 50.0],\n 'x1': [-50.0, 50.0]\n }\n\n swallow = ps.MOSwallo... | [
[
"numpy.array",
"numpy.array_equal"
]
] |
alexgaskell10/encoded_kge | [
"2959c058125515a3e0e0b811ffe8086d6699006c",
"2959c058125515a3e0e0b811ffe8086d6699006c"
] | [
"kge/model/complex.py",
"kge/util/dump.py"
] | [
"import torch\nfrom kge import Config, Dataset\nfrom kge.model.kge_model import RelationalScorer, KgeModel\n\n\nclass ComplExScorer(RelationalScorer):\n r\"\"\"Implementation of the ComplEx KGE scorer.\n\n Reference: Théo Trouillon, Johannes Welbl, Sebastian Riedel, Éric Gaussier and\n Guillaume Bouchard: ... | [
[
"torch.cat"
],
[
"torch.load"
]
] |
giacomo-montibeller/ml-workflow-model-layer | [
"1f875dbf3dc053c2a593c0c6f58ca3630b3e8aa9"
] | [
"main.py"
] | [
"import os\nimport pickle\nimport pandas as pd\nimport numpy as np\nfrom scipy import stats\nfrom sklearn import linear_model\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.preprocessing import PolynomialFeatures\nfrom sklearn.metrics import mean_squared_error\n\nclass Main:\n def __init__(s... | [
[
"pandas.read_csv",
"scipy.stats.zscore",
"sklearn.preprocessing.PolynomialFeatures",
"sklearn.model_selection.train_test_split",
"sklearn.metrics.mean_squared_error",
"sklearn.linear_model.LinearRegression",
"numpy.where"
]
] |
rroliver/gdal | [
"319c1ea20b10d7501e95ad2dcbb4b6a25fa15fa7"
] | [
"autotest/gcore/tiff_write.py"
] | [
"#!/usr/bin/env pytest\n# -*- coding: utf-8 -*-\n###############################################################################\n# $Id$\n#\n# Project: GDAL/OGR Test Suite\n# Purpose: Test read/write functionality for GeoTIFF format.\n# Author: Frank Warmerdam <warmerdam@pobox.com>\n#\n#########################... | [
[
"numpy.zeros"
]
] |
sumiya-NJU/da-faster-rcnn-PyTorch | [
"62a7286d8e40c6625f32de8d49039c7f623909bd"
] | [
"lib/model/faster_rcnn/faster_rcnn.py"
] | [
"import random\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nfrom torch.autograd import Variable\r\nimport torchvision.models as models\r\nfrom torch.autograd import Variable\r\nimport numpy as np\r\nfrom model.utils.config import cfg\r\nfrom model.rpn.rpn import _RPN\r\nfrom model.... | [
[
"torch.nn.functional.softmax",
"torch.nn.functional.cross_entropy",
"torch.stack",
"torch.nn.functional.max_pool2d",
"torch.autograd.Variable"
]
] |
yjc9696/cci_PPP | [
"69cbf059c2f2c2d0de9ecba6865202f7e5e09998"
] | [
"out/production/cci/datasets/tissue.py"
] | [
"import pandas as pd\nimport dgl\nfrom time import time\nimport torch\nfrom sklearn.decomposition import PCA\nimport numpy as np\nfrom torchlight import set_seed\n\n\ndef load_tissue(params=None):\n random_seed = params.random_seed\n dense_dim = params.dense_dim \n set_seed(random_seed)\n # 400 0.7895\n... | [
[
"pandas.read_csv",
"torch.zeros",
"torch.cat",
"torch.randperm",
"torch.FloatTensor",
"sklearn.decomposition.PCA"
]
] |
gozian2811/slic_multilevel | [
"af0b1132e055bb95512f11a28ee55ee51b2f3295"
] | [
"toolbox/View_CT.py"
] | [
"import numpy as np\nfrom CTViewer import view_CT\n\nfilename = \"nodule_cubes/train/npy_random/LKDS-00249_cc_0_random.npy\"\nvolume = np.load(filename)\nview_CT(volume)\n"
] | [
[
"numpy.load"
]
] |
makemebitter/Panorama-UCSD | [
"bdb89d00472e449318dae322eab42b0376d6e1f3"
] | [
"panorama/data/data_splitter.py"
] | [
"# Copyright 2019 Yuhao Zhang\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# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable law or agreed to in writ... | [
[
"sklearn.model_selection.train_test_split"
]
] |
Muktan/pandas | [
"ffa6e20d7dadd262d9035a647dffed9903fc5929"
] | [
"pandas/core/arrays/timedeltas.py"
] | [
"from __future__ import annotations\n\nfrom datetime import timedelta\nfrom typing import (\n List,\n Optional,\n Union,\n)\n\nimport numpy as np\n\nfrom pandas._libs import (\n lib,\n tslibs,\n)\nfrom pandas._libs.tslibs import (\n BaseOffset,\n NaT,\n NaTType,\n Period,\n Tick,\n ... | [
[
"pandas.core.arrays.datetimelike.DatetimeLikeArrayMixin.astype",
"pandas._libs.tslibs.Timestamp",
"numpy.linspace",
"pandas.core.dtypes.common.is_dtype_equal",
"pandas.core.dtypes.dtypes.DatetimeTZDtype",
"pandas._libs.lib.is_scalar",
"numpy.dtype",
"numpy.round",
"pandas.core.... |
idc9/mvlearn | [
"c9d5cd10ac34e0f901a4b0b8804397f2c0d75401"
] | [
"mvlearn/model_selection/validation.py"
] | [
"\"\"\"Validation utils.\"\"\"\n# Copyright 2019 NeuroData (http://neurodata.io)\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... | [
[
"numpy.hstack"
]
] |
vinzmc/AutoEq | [
"e6b1648ea09ae3eade14f92c6f9d5afd87e400ac"
] | [
"measurements/referenceaudioanalyzer/reference_audio_analyzer_crawler.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport os\nimport sys\nimport numpy as np\nimport pandas as pd\nimport re\nimport matplotlib.pyplot as plt\nfrom PIL import Image, ImageDraw\nimport colorsys\nfrom selenium import webdriver\nfrom selenium.webdriver.chrome.options import Options\n\nfrom measurements.name_prompt import Nam... | [
[
"numpy.log",
"pandas.DataFrame",
"numpy.mean",
"matplotlib.pyplot.close",
"numpy.array"
]
] |
Gopalbansal8106/python-machine-learning-book | [
"d0c8598bb499b3c535356da5d1226c39bba85986"
] | [
"code/ch13/mnist_keras_mlp.py"
] | [
"import os\nimport struct\nimport numpy as np\nimport theano\nfrom keras.utils import np_utils\nfrom keras.models import Sequential\nfrom keras.layers.core import Dense\nfrom keras.optimizers import SGD\n\n\ndef load_mnist(path, kind='train'):\n \"\"\"Load MNIST data from `path`\"\"\"\n labels_path = os.path.... | [
[
"numpy.fromfile",
"numpy.sum",
"numpy.random.seed"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.