repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
mikehuisman/metadl | [
"61ece0364b08e67412ab87da4a41425b2e88a562"
] | [
"metadl/core/scoring/scoring.py"
] | [
"\"\"\" Runs the scoring procedure for the challenge.\nIt assumes that there exists a ./model_dir folder containing both the \nsubmission code and the saved learner. \nIt will create a folder named ./scoring_output (default) in which a txt file \nwill contain the average score over 600 episodes. You can change the ... | [
[
"numpy.random.seed",
"numpy.arange",
"tensorflow.data.Dataset.from_tensor_slices",
"numpy.linalg.norm",
"tensorflow.expand_dims",
"numpy.random.shuffle",
"tensorflow.metrics.SparseCategoricalAccuracy",
"tensorflow.gather",
"tensorflow.data.Dataset.zip",
"tensorflow.get_logg... |
EnTimeMent/Group-Behavior-Recognition | [
"d6606e9e7bef836a9ccc5b4ada66933a4770171c"
] | [
"Graph-based/processor/recognition.py"
] | [
"#!/usr/bin/env python\n# pylint: disable=W0201\nimport sys\nimport argparse\nimport yaml\nimport numpy as np\n\n# torch\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\n\n# torchlight\nimport torchlight\nfrom torchlight import str2bool\nfrom torchlight import DictAction\nfrom torchlight import im... | [
[
"torch.nn.CrossEntropyLoss",
"sklearn.metrics.confusion_matrix",
"numpy.concatenate",
"numpy.mean",
"torch.no_grad",
"numpy.array",
"sklearn.metrics.accuracy_score"
]
] |
paritoshmittal09/pandas | [
"862d2d89b8fe0a93ec8e714315175e2eba1fa6e5"
] | [
"pandas/core/groupby/groupby.py"
] | [
"\"\"\"\nProvide the groupby split-apply-combine paradigm. Define the GroupBy\nclass providing the base-class of operations.\n\nThe SeriesGroupBy and DataFrameGroupBy sub-class\n(defined in pandas.core.groupby.generic)\nexpose these user-facing objects to provide specific functionailty.\n\"\"\"\n\nimport types\nfro... | [
[
"pandas.core.window.ExpandingGroupby",
"numpy.asarray",
"pandas.core.common.AbstractMethodError",
"numpy.minimum.accumulate",
"pandas.core.groupby.grouper._get_grouper",
"pandas.core.sorting.get_group_index_sorter",
"pandas.core.dtypes.missing.notna",
"numpy.concatenate",
"pand... |
jspaezp/jspp_imageutils | [
"6376e274a1b0675622a7979c181b9effc125aa09"
] | [
"jspp_imageutils/annotations/convert.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# modified from:\n# https://gist.github.com/rotemtam/88d9a4efae243fc77ed4a0f9917c8f6c\n\nimport os\nimport glob\nimport click\n\nimport pandas as pd\nimport xml.etree.ElementTree as ET\n\n\ndef xml_to_csv(path: str) -> pd.DataFrame:\n xml_list = []\n for xml_... | [
[
"pandas.DataFrame"
]
] |
mikkokotola/AdvancedMachineLearning | [
"574e82d4104ac04f1cb9889beb5be7d122bd0d01"
] | [
"Week6/AdvML_Week6_ex2.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\n# In[8]:\n\n\n## Advanced Course in Machine Learning\n## Week 6\n## Exercise 2 / Random forest\n\nimport numpy as np\nimport scipy\nimport pandas as pd\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nimport matplotlib.animation as animation\nfrom numpy import lina... | [
[
"matplotlib.pyplot.figure",
"numpy.add",
"sklearn.tree.DecisionTreeClassifier",
"numpy.argmax",
"numpy.random.randint",
"numpy.insert",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"numpy.zeros",
"matplotlib.pyplot.ylabel"
]
] |
yamaguchi1024/MeshCNN | [
"197530eab2aa4c2419511c1854dcbc662377f340"
] | [
"models/layers/mesh_pool.py"
] | [
"import torch\nimport torch.nn as nn\nfrom threading import Thread\nfrom models.layers.mesh_union import MeshUnion\nimport numpy as np\nfrom heapq import heappop, heapify\n\n\nclass MeshPool(nn.Module):\n \n def __init__(self, target, multi_thread=False):\n super(MeshPool, self).__init__()\n sel... | [
[
"torch.arange",
"torch.sum",
"torch.cat",
"numpy.ones"
]
] |
ldylab/deep_learning_with_pytorch | [
"c86a2e24ee94ade1a78b66f10eb69b6e1fdd4463"
] | [
"pytorch_basic_template/model/model_entry.py"
] | [
"# from model.base.fcn import CustomFcn\n# from model.best.fcn import DeepLabv3Fcn\n# from model.better.fcn import Resnet101Fcn\n# from model.sota.fcn import LightFcn\nfrom model.alexnet.alexnet_model import AlexNet\nfrom model.lenet5.lenet_5_model import LeNet5\nfrom model.vggnet.vggnet16 import VGG16\nfrom model.... | [
[
"torch.nn.DataParallel"
]
] |
gohanlon/nlp | [
"a5cd2303187239799ae0b1597a7c16eb99a97108"
] | [
"examples/sentence_similarity/gensen_train.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\n\"\"\"\nThe GenSen training process follows the steps:\n1. Create or load the dataset vocabulary\n2. Train on the training dataset for each batch epoch (batch size = 48 ... | [
[
"torch.nn.CrossEntropyLoss",
"torch.nn.functional.softmax",
"torch.ones",
"torch.tensor",
"numpy.mean",
"torch.cuda.is_available",
"numpy.float",
"numpy.random.randint"
]
] |
vanttec/vanttec_usv | [
"5c7b45a61728404b4c957028eac7bc361f1b2077"
] | [
"rb_missions/scripts/acoustic_docking.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n'''\n----------------------------------------------------------\n @file: acoustic_docking.py\n @date: Wed Jun 3, 2020\n @author: Alejandro Gonzalez Garcia\n @e-mail: alexglzg97@gmail.com\n @brief: Motion planning. ROS node to follow an acoustic\n ... | [
[
"numpy.array"
]
] |
wiseodd/lula | [
"a52b27c118ed136a62d8d7d1a898067d5ac685fb",
"a52b27c118ed136a62d8d7d1a898067d5ac685fb"
] | [
"lula/util.py",
"eval_CIFAR10C.py"
] | [
"import numpy as np\nimport torch\nfrom torch import nn\nfrom torch.nn import functional as F\n\n\nclass MaskedLinear(nn.Module):\n\n def __init__(self, base_layer, m_in, m_out):\n \"\"\"\n The standard nn.Linear layer, but with gradient masking to enforce the LULA construction.\n \"\"\"\n ... | [
[
"torch.nn.Parameter",
"torch.zeros",
"torch.randn",
"torch.nn.functional.conv2d",
"torch.nn.Conv2d",
"torch.nn.Linear",
"torch.nn.functional.linear"
],
[
"torch.manual_seed",
"torch.cat",
"numpy.random.seed",
"torch.load"
]
] |
jfigui/pyrad | [
"7811d593bb09a7f8a621c0e8ae3f32c2b85a0254",
"7811d593bb09a7f8a621c0e8ae3f32c2b85a0254",
"7811d593bb09a7f8a621c0e8ae3f32c2b85a0254"
] | [
"src/pyrad_proc/pyrad/EGG-INFO/scripts/rewrite_monitoring.py",
"src/pyrad_proc/pyrad/proc/process_aux.py",
"src/pyrad_proc/scripts/common_colocated_gates.py"
] | [
"#!/home/daniel/anaconda3/bin/python\n# -*- coding: utf-8 -*-\n\n\"\"\"\n================================================\nrewrite_monitoring\n================================================\n\nThis program rewrites a monitoring time series files into the correct\ntime order\n\n\"\"\"\n\n# Author: fvj\n# License: ... | [
[
"numpy.ma.asarray"
],
[
"numpy.asarray",
"numpy.all",
"numpy.argmin",
"numpy.mean",
"numpy.where",
"numpy.ma.getmaskarray",
"numpy.arange",
"numpy.ma.zeros",
"numpy.zeros",
"numpy.unravel_index",
"numpy.median",
"numpy.argsort",
"numpy.ma.masked_all",
... |
pistoia/qiskit-aqua | [
"c7900ffdabc1499145739bfab29a392709bee1a0",
"c7900ffdabc1499145739bfab29a392709bee1a0"
] | [
"test/test_mct.py",
"qiskit/aqua/translators/ising/tsp.py"
] | [
"# -*- coding: utf-8 -*-\n\n# Copyright 2018 IBM.\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 appli... | [
[
"numpy.array"
],
[
"numpy.log2",
"numpy.abs",
"numpy.random.seed",
"numpy.random.uniform",
"numpy.zeros",
"numpy.hypot"
]
] |
mogorman/openpilot-1 | [
"1d19166992149a7dea3536644d67e9e0e2e385fd"
] | [
"selfdrive/controls/lib/longitudinal_planner.py"
] | [
"#!/usr/bin/env python3\nimport math\nimport numpy as np\nfrom common.numpy_fast import interp\nfrom common.cached_params import CachedParams\n\nimport cereal.messaging as messaging\nfrom common.realtime import DT_MDL\nfrom selfdrive.modeld.constants import T_IDXS\nfrom selfdrive.config import Conversions as CV\nfr... | [
[
"numpy.sqrt",
"numpy.min",
"numpy.clip",
"numpy.interp",
"numpy.exp",
"numpy.zeros"
]
] |
PlaidCloud/public-utilities | [
"1031cb87580bbe110f56455925e483a0ae177fe1"
] | [
"plaidcloud/utilities/tests/test_remote_dimension.py"
] | [
"#!/usr/bin/env python\n# coding=utf-8\n\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport filecmp\nimport os\nimport unittest\nfrom unittest import TestCase\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.testing import assert_... | [
[
"pandas.testing.assert_frame_equal",
"pandas.DataFrame"
]
] |
psobot/beam | [
"d9da8a4dc818b01a86d2dce2e78c0d78b47038bb"
] | [
"sdks/python/apache_beam/dataframe/pandas_doctests_test.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... | [
[
"pandas.__version__.split",
"pandas.__dict__.items"
]
] |
metacpp/pytorch | [
"1e7a4d6bbe1fac4fb94f6b62f24c6e242db1e952",
"1e7a4d6bbe1fac4fb94f6b62f24c6e242db1e952",
"1e7a4d6bbe1fac4fb94f6b62f24c6e242db1e952",
"1e7a4d6bbe1fac4fb94f6b62f24c6e242db1e952",
"1e7a4d6bbe1fac4fb94f6b62f24c6e242db1e952"
] | [
"test/jit/test_misc.py",
"torch/nn/intrinsic/qat/modules/linear_fused.py",
"torch/ao/quantization/_dbr/quantization_state.py",
"torch/utils/data/datapipes/iter/routeddecoder.py",
"test/distributed/fsdp/test_fsdp_uneven.py"
] | [
"# Owner(s): [\"oncall: jit\"]\n\nfrom typing import Any, Dict, List, Optional, Tuple\n\nfrom torch.testing._internal.jit_utils import JitTestCase, make_global\nfrom torch.testing import FileCheck\nfrom torch import jit\nfrom jit.test_module_interface import TestModuleInterface # noqa: F401\nimport os\nimport sys\... | [
[
"torch.jit.script",
"torch.testing._internal.jit_utils.make_global",
"torch.randn",
"torch.testing.FileCheck",
"torch._C._enable_mobile_interface_call_export",
"torch.jit.export_opnames",
"torch.arange"
],
[
"torch.nn.BatchNorm1d",
"torch.nn.init.uniform_",
"torch.empty... |
LaudateCorpus1/deepmath | [
"b5b721f54de1d5d6a02d78f5da5995237f9995f9",
"b5b721f54de1d5d6a02d78f5da5995237f9995f9",
"b5b721f54de1d5d6a02d78f5da5995237f9995f9"
] | [
"deepmath/deephol/public/proof_assistant.py",
"deepmath/deephol/proof_search_tree.py",
"deepmath/guidance/driver_lib.py"
] | [
"\"\"\"A python client interface for ProofAssistantService.\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\n# Import Type Annotations\nfrom __future__ import print_function\nimport grpc\nimport tensorflow as tf\nfrom deepmath.proof_assistant import proof_assistant_pb2\nfrom deepmat... | [
[
"tensorflow.flags.DEFINE_string"
],
[
"tensorflow.logging.info"
],
[
"tensorflow.Graph",
"tensorflow.concat",
"tensorflow.reshape",
"tensorflow.size",
"tensorflow.placeholder",
"tensorflow.set_random_seed",
"tensorflow.global_variables_initializer",
"tensorflow.trai... |
ASinanSaglam/atomizer_analysis | [
"8dfc1230b2ad0c691885f8fd7119d6169cd7d1ed"
] | [
"run_validation.py"
] | [
"# %matplotlib notebook\nimport os, re, sys, urllib, requests, base64, IPython, io, pickle, glob\nsys.path.append(\"/home/monoid/Development/fresh_atomizer_checks/atomizer/SBMLparser/test/manual\")\nimport itertools as itt\nimport numpy as np\nimport subprocess as sb\nimport pandas as pd\nimport matplotlib.pyplot a... | [
[
"numpy.array"
]
] |
SheffieldAI/pykale | [
"1f5cce57a50f7772520a482e8135a391eb0517f5",
"1f5cce57a50f7772520a482e8135a391eb0517f5"
] | [
"kale/utils/download.py",
"tests/predict/test_losses.py"
] | [
"# ===============================================================================\n# Author: Xianyuan Liu, xianyuan.liu@outlook.com\n# Raivo Koot, rekoot1@sheffield.ac.uk\n# Haiping Lu, h.lu@sheffield.ac.uk or hplu@ieee.org\n# ========================================================================... | [
[
"torch.hub.download_url_to_file"
],
[
"torch.tensor"
]
] |
kingjr/jr-tools | [
"8a4c9c42a9e36e224279566945e798869904c4c8"
] | [
"jr/plot/meg.py"
] | [
"import matplotlib.pyplot as plt\nimport numpy as np\nfrom . import pretty_plot\n\n\ndef plot_butterfly(evoked, ax=None, sig=None, color=None, ch_type=None):\n from mne import pick_types\n if ch_type is not None:\n picks = pick_types(evoked.info, ch_type)\n evoked = evoked.copy()\n evoked... | [
[
"matplotlib.pyplot.gca",
"numpy.hstack",
"numpy.min",
"numpy.max",
"numpy.std",
"numpy.zeros_like",
"numpy.sum"
]
] |
jmsplank/phdhelper | [
"c06dd06669b42dbe4c9e1a6eeec3d0ad3885d2eb"
] | [
"phdhelper/suMMSary/suMMSary.py"
] | [
"import numpy as np\nimport pyspedas\nfrom phdhelper.helpers import title_print\nfrom phdhelper.helpers.CONSTANTS import c, k_B, m_e, m_i, mu_0, q\nfrom pytplot import data_quants\nimport matplotlib.pyplot as plt\nfrom datetime import datetime as dt\nfrom cached_property import cached_property\n\n\nclass EventHandl... | [
[
"matplotlib.pyplot.plot"
]
] |
coderatwork7/AI-algorithms | [
"11e9c012cc2f5fb4493bc1ec6b14ddc9cf0fc2d4"
] | [
"perceptron/perceptron.py"
] | [
"import pandas as pd\n\n# TODO: Set weight1, weight2, and bias\nweight1 = 1.5\nweight2 = 1.5\nbias = -2.0\n\n\n# DON'T CHANGE ANYTHING BELOW\n# Inputs and outputs\ntest_inputs = [(0, 0), (0, 1), (1, 0), (1, 1)]\ncorrect_outputs = [False, False, False, True]\noutputs = []\n\n# Generate and check output\nfor test_inp... | [
[
"pandas.DataFrame"
]
] |
muhanzhang/NestedGNN | [
"a5adccf62d397ad7f83bc73be34eba3765df73fa"
] | [
"kernel/graph_sage.py"
] | [
"import torch\nimport torch.nn.functional as F\nfrom torch.nn import Linear\nfrom torch_geometric.nn import SAGEConv, global_mean_pool\n\n\nclass NestedGraphSAGE(torch.nn.Module):\n def __init__(self, dataset, num_layers, hidden, use_z=False, use_rd=False):\n super(NestedGraphSAGE, self).__init__()\n ... | [
[
"torch.nn.functional.log_softmax",
"torch.nn.functional.dropout",
"torch.cat",
"torch.nn.ModuleList",
"torch.nn.Embedding",
"torch.nn.Linear"
]
] |
Fryguy/py2rb | [
"0d2fbc5a86b82707a1d83241a21af6b2cc22c0b8"
] | [
"tests/numpy/asarray.py"
] | [
"import numpy as np\n\ndef print_matrix(data):\n data_i = []\n for i in list(data):\n data_j = []\n for j in i:\n data_j.append(int(\"%d\" % j))\n data_i.append(data_j)\n print(data_i)\n\ndef print_array(data):\n datas = []\n for i in data:\n datas.append(float(... | [
[
"numpy.asarray"
]
] |
piraaa/VideoDigitalWatermarking | [
"6439881dc88fb7257a3dd9856b185e5c667b89b4"
] | [
"src/msequence.py"
] | [
"#\n# msequence.py\n# Created by pira on 2017/07/28.\n#\n\n#coding: utf-8\nu\"\"\"For M-Sequence.\"\"\"\n\nimport numpy as np\n\ndef generateM(N):\n\tu\"\"\"Create M-Sequence.\n \t@param N : length 2**N-1\n \t@return m : M-Sequence\n\t\"\"\"\n\n\tp = pow(2, N)\n\tm = [0] * (p-1)\n\n\tfor i in np.arange(1,p,2): \n\... | [
[
"numpy.arange"
]
] |
gnes-ai/hub | [
"94cff9011ff6447ce1af51c5307813ab6fbbb156"
] | [
"encoder/i3d/i3d_encoder.py"
] | [
"# Tencent is pleased to support the open source community by making GNES available.\n#\n# Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.\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 ... | [
[
"tensorflow.Graph",
"tensorflow.placeholder",
"tensorflow.train.import_meta_graph",
"tensorflow.ConfigProto",
"tensorflow.global_variables_initializer",
"tensorflow.Session",
"tensorflow.variable_scope",
"numpy.array",
"numpy.zeros"
]
] |
Mohammedaabdu/pytorch-segmentation | [
"9fdf927d345146247f039042ee37612157e26582"
] | [
"models/ deeplabv3_plus_xception.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Wed Apr 21 15:16:18 2021\r\n\r\n@author: Administrator\r\n\"\"\"\r\n\r\nfrom base import BaseModel\r\nimport torch\r\nimport math\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nfrom torchvision import models\r\nimport torch.utils.model_zoo as model_zo... | [
[
"torch.nn.Sequential",
"torch.nn.Dropout",
"torch.nn.ReLU6",
"torch.clamp",
"torch.nn.Dropout2d",
"torch.load",
"torch.cat",
"torch.nn.Conv2d",
"torch.nn.MaxPool2d",
"torch.nn.AdaptiveAvgPool2d",
"torch.nn.functional.interpolate",
"torch.nn.BatchNorm2d",
"torch.... |
nguyenvo09/EACL2021 | [
"6860c87425619954cacbf5a14ad20befd18ec818"
] | [
"pytorch_transformers/utils_glue.py"
] | [
"# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.\n# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may... | [
[
"scipy.stats.spearmanr",
"sklearn.metrics.f1_score",
"sklearn.metrics.matthews_corrcoef",
"scipy.stats.pearsonr"
]
] |
Dopamine0717/mmdetection | [
"96abfd90cf0e38c5ce398795f949e9328eb85c1b",
"40a6fddae20978de98a335cbb45e227db782f72b"
] | [
"mmdet/models/dense_heads/reppoints_head.py",
"plt_test.py"
] | [
"# Copyright (c) OpenMMLab. All rights reserved.\nimport numpy as np\nimport torch\nimport torch.nn as nn\nfrom mmcv.cnn import ConvModule\nfrom mmcv.ops import DeformConv2d\n\nfrom mmdet.core import (build_assigner, build_sampler, images_to_levels,\n multi_apply, unmap)\nfrom mmdet.core.anch... | [
[
"torch.linspace",
"numpy.sqrt",
"torch.Tensor",
"torch.cat",
"torch.zeros",
"numpy.arange",
"torch.nn.ReLU",
"torch.nn.Conv2d",
"torch.nn.ModuleList",
"numpy.tile",
"torch.zeros_like",
"numpy.stack",
"torch.exp",
"torch.tensor",
"torch.std",
"torch.s... |
liquidpizza/gpxo | [
"4f8eb43a4d6b879f51a7e688dfa80b4aa5558889"
] | [
"gpxo/track.py"
] | [
"\"\"\"General tools for gpx data processing based on gpxpy.\"\"\"\n\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\nimport gpxpy\nfrom vincenty import vincenty\nimport mplleaflet\n\nfrom .general import smooth, closest_pt\n\n\n# =============================== Misc. Config ============... | [
[
"numpy.radians",
"numpy.degrees",
"numpy.cumsum",
"matplotlib.pyplot.subplots",
"numpy.sin",
"numpy.arctan2",
"numpy.cos",
"numpy.diff",
"numpy.interp",
"numpy.array"
]
] |
JayanthRR/ConCURL_NCE | [
"5471b022a571ae61bd891783084512c3a227829b"
] | [
"losses.py"
] | [
"import torch\nimport torch.nn as nn\nimport time\nimport sys\n\nsoftmax = nn.Softmax(dim=1).cuda()\n\n\ndef distributed_sinkhorn(Q, nmb_iters):\n with torch.no_grad():\n sum_Q = torch.sum(Q)\n # dist.all_reduce(sum_Q)\n Q /= sum_Q\n\n u = torch.zeros(Q.shape[0]).cuda(non_blocking=Tru... | [
[
"torch.nn.functional.normalize",
"torch.nn.Softmax",
"torch.ones",
"torch.zeros",
"torch.sum",
"torch.tensor",
"torch.exp",
"torch.no_grad",
"torch.log"
]
] |
LucaAngioloni/ProteineSecondaryStructure-CNN | [
"c85571bbcdf17b4a753dce6ed0e4346111ea43a0"
] | [
"Whole Protein Prediction CNN/dataset.py"
] | [
"# MIT License\n#\n# Copyright (c) 2017 Luca Angioloni\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, copy... | [
[
"numpy.random.seed",
"numpy.reshape",
"numpy.random.shuffle",
"numpy.load",
"numpy.zeros"
]
] |
18463105800/ssd.pruning.pytorch | [
"39592ee00e02f28742028a97592beec18d07258c"
] | [
"pruning/prune_resnet_tools.py"
] | [
"'''\r\n This file contains functions for pruning resnet-like model in layer level\r\n 1. prune_resconv_layer (resnet: conv layers)\r\n 2. prune_resnet_lconv_layer (resnet: lconv means identity layer)\r\n 3. prune_rbconv_by_indices (resnet: rbconv means right path's bottom layer)\r\n 4. prune_rbconv_... | [
[
"torch.abs",
"torch.nn.Sequential",
"torch.nn.Conv2d",
"torch.sum",
"torch.from_numpy",
"numpy.delete",
"torch.nn.BatchNorm2d",
"numpy.zeros"
]
] |
Mu-L/pytorch | [
"b0bdf588ea575928a94264c30999385d5ff2bc32"
] | [
"test/test_linalg.py"
] | [
"# -*- coding: utf-8 -*-\n# Owner(s): [\"module: linear algebra\"]\n\nimport torch\nimport numpy as np\n\nimport unittest\nimport itertools\nimport warnings\nimport math\nfrom math import inf, nan, isnan\nimport random\nfrom random import randrange\nfrom itertools import product\nfrom functools import reduce\n\nfro... | [
[
"torch.all",
"torch.addmv",
"torch.lu_unpack",
"torch.randint",
"torch.testing._internal.common_utils.random_sparse_matrix",
"torch.zeros",
"torch.testing._internal.common_utils.iter_indices",
"torch.linalg.householder_product",
"torch.device",
"torch.linalg.eigvalsh",
... |
AIDefender/Tianshou-ReMPER | [
"297ba383fc1e4e19cd52bd89df7d0d3148bd4e68"
] | [
"examples/minigrid/eval_maze.py"
] | [
"import seaborn as sns\nimport matplotlib.pyplot as plt\nimport pickle\nimport argparse\nimport numpy as np\nimport os\nsns.set_context('paper', font_scale=1.5)\nparser = argparse.ArgumentParser()\nparser.add_argument(\"-n\", type=int)\nparser.add_argument('--resume-path', type=str, default=None)\nparser.add_argume... | [
[
"matplotlib.pyplot.imread",
"matplotlib.pyplot.subplots",
"numpy.max",
"numpy.average",
"numpy.argsort",
"numpy.array",
"numpy.where"
]
] |
Roninkoi/Scicodes | [
"97eb4dc017ad4cd494b545aecaa9fdd7c501a9b7"
] | [
"anova.py"
] | [
"import numpy as np\nfrom scipy.stats import f\n\n# Does analysis of variance for a number of sets x.\n# Each set in x is an array containing mean, variance\n# and number [mean, var, n].\ndef anova(x):\n mean = np.mean(x[:, 0]) # overall mean\n n = np.sum(x[:, 2]) # total N\n r = len(x) # number of sets\n\... | [
[
"numpy.mean",
"numpy.sum",
"scipy.stats.f.cdf"
]
] |
dudeperf3ct/lightning-flash | [
"a855cd14cf1cd0301b4a2f82c0c95e4d8d986650"
] | [
"flash/image/data.py"
] | [
"# Copyright The PyTorch Lightning team.\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... | [
[
"numpy.load",
"torch.from_numpy"
]
] |
iamansoni/MSS | [
"69bc8fc61ab277697ca691119f911382a63860c0",
"69bc8fc61ab277697ca691119f911382a63860c0",
"69bc8fc61ab277697ca691119f911382a63860c0"
] | [
"mslib/mswms/dataaccess.py",
"mslib/_tests/test_thermolib.py",
"mslib/msui/mpl_qtwidget.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\n\n mslib.mswms.dataaccess\n ~~~~~~~~~~~~~~~~~~~~~~\n\n This module provides functions to access data\n\n This file is part of mss.\n\n :copyright: Copyright 2008-2014 Deutsches Zentrum fuer Luft- und Raumfahrt e.V.\n :copyright: Copyright 2011-2014 Marc Rautenhaus... | [
[
"numpy.allclose"
],
[
"numpy.arange",
"numpy.array"
],
[
"matplotlib.rcParams.get",
"numpy.linspace",
"matplotlib.figure.Figure",
"numpy.asarray",
"numpy.arange",
"matplotlib.cbook._topmost_artist"
]
] |
jenhaoyang/datumaro | [
"add81ddb59502362fa65fa07e5bc4d8c9f61afde",
"add81ddb59502362fa65fa07e5bc4d8c9f61afde",
"add81ddb59502362fa65fa07e5bc4d8c9f61afde"
] | [
"tests/test_dataset.py",
"tests/test_voc_format.py",
"tests/test_icdar_format.py"
] | [
"from unittest import TestCase\nimport os\nimport os.path as osp\n\nimport numpy as np\n\nfrom datumaro.components.annotation import (\n AnnotationType, Bbox, Caption, Label, LabelCategories, Mask, Points,\n Polygon, PolyLine,\n)\nfrom datumaro.components.converter import Converter\nfrom datumaro.components.d... | [
[
"numpy.array",
"numpy.ones"
],
[
"numpy.ones",
"numpy.array",
"numpy.zeros",
"numpy.unique"
],
[
"numpy.array",
"numpy.zeros",
"numpy.ones"
]
] |
chriamue/protoseg | [
"4ddc7d613aadcb9d25b5773eff688214349ab23f"
] | [
"protoseg/report.py"
] | [
"\nimport os\nimport numpy as np\nimport cv2\nimport json\nimport pandas as pd\nimport tensorflow as tf\nfrom tensorboard.backend.event_processing import event_accumulator as ea\n\nfrom matplotlib import pyplot as plt\nfrom matplotlib import colors as colors\nfrom matplotlib.backends.backend_agg import FigureCanvas... | [
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.title",
"matplotlib.colors.to_rgba",
"matplotlib.pyplot.subplots",
"pandas.DataFrame",
"matplotlib.pyplot.plot",
"tensorflow.image.decode_image",
"tensorflow.Session",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.close",
"m... |
sahara2001/editsql | [
"d4325ac996d1ed0069def6d349e43e2a1914e761"
] | [
"model/model.py"
] | [
"\"\"\" Class for the Sequence to sequence model for ATIS.\"\"\"\n\nimport os\n\nimport torch\nimport torch.nn.functional as F\nfrom . import torch_utils\nfrom . import utils_bert\n\nfrom data_util.vocabulary import DEL_TOK, UNK_TOK\n\nfrom .encoder import Encoder, Encoder_Gnn\nfrom .embedder import Embedder\nfrom ... | [
[
"torch.optim.Adam",
"torch.zeros",
"torch.load",
"torch.cat",
"torch.cuda.FloatTensor"
]
] |
ankit9437/MNIST | [
"bf620e7779a5383c2ad87cf89cd11651963bd7c5"
] | [
"MNISTT.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Sun Dec 15 10:58:44 2019\r\n\r\n@author: DELL\r\n\"\"\"\r\n\r\nfrom __future__ import print_function, division\r\n\r\nimport numpy as np\r\nimport pandas as pd\r\nimport matplotlib.pyplot as plt\r\n\r\n\r\n\r\ndef d(u, v):\r\n diff = u - v\r\n return diff.dot(d... | [
[
"matplotlib.pyplot.imshow",
"pandas.read_csv",
"numpy.random.choice",
"numpy.random.shuffle",
"matplotlib.pyplot.show",
"numpy.empty"
]
] |
shivangraikar/Twitter-Data-Mining-For-Targeted-Marketing | [
"d12fe807187d438041b4497cbb82ad9ef14d4dbf"
] | [
"email-finder.py"
] | [
"import string\nimport time\nimport threading\nimport urllib\nimport re\nimport io\nimport sys\nfrom time import sleep\nimport pickle\nimport pandas as pd\nimport psycopg2\n\n\n\ndef formats(first, middle, last, domain):\n \"\"\"\n Create a list of 30 possible email formats combining:\n - First name: ... | [
[
"pandas.read_sql"
]
] |
ganesh2583/Python-Data_Science | [
"233586491d3863176a008b938b0946c472940a6d"
] | [
"genderPredictScript.py"
] | [
"from sklearn import tree\nfrom sklearn import neighbors\nfrom sklearn import gaussian_process\n\n#[height, weight, shoe size]\nX = [[181,80,10],[161,70,6],[171,66,7],[176,88,7],[189,100,8],[141,80,5],[156,78,6],[161,50,6],[171,60,7],[151,78,7],[171,40,7]]\n#Gender\nY = ['male','male','male','male','male','female',... | [
[
"sklearn.tree.DecisionTreeClassifier",
"sklearn.gaussian_process.GaussianProcessClassifier",
"sklearn.neighbors.KNeighborsClassifier"
]
] |
Ow-woo/stable-baselines | [
"ece376f62b0eaa3b58e90593b7db5fb9de3d82c5",
"ece376f62b0eaa3b58e90593b7db5fb9de3d82c5",
"ece376f62b0eaa3b58e90593b7db5fb9de3d82c5"
] | [
"stable_baselines/trpo_mpi/trpo_mpi.py",
"stable_baselines/td3/policies.py",
"stable_baselines/ppo2/ppo2.py"
] | [
"import time\nfrom contextlib import contextmanager\nfrom collections import deque\n\nimport gym\nfrom mpi4py import MPI\nimport tensorflow as tf\nimport numpy as np\n\nimport stable_baselines.common.tf_util as tf_util\nfrom stable_baselines.common.tf_util import total_episode_reward_logger\nfrom stable_baselines.c... | [
[
"tensorflow.reduce_sum",
"tensorflow.RunMetadata",
"numpy.concatenate",
"numpy.mean",
"tensorflow.summary.scalar",
"tensorflow.Graph",
"numpy.allclose",
"numpy.empty_like",
"tensorflow.summary.image",
"tensorflow.gradients",
"tensorflow.square",
"tensorflow.RunOptio... |
carlosal1015/scikit-fem | [
"1e73a417e9b43fe0a36e29807792c41fa289b77d",
"1e73a417e9b43fe0a36e29807792c41fa289b77d",
"1e73a417e9b43fe0a36e29807792c41fa289b77d",
"1e73a417e9b43fe0a36e29807792c41fa289b77d"
] | [
"skfem/element/element_tet/element_tet_p2.py",
"docs/examples/ex28.py",
"docs/examples/ex02.py",
"skfem/assembly/global_basis/mortar_basis.py"
] | [
"import numpy as np\nfrom ..element_h1 import ElementH1\n\n\nclass ElementTetP2(ElementH1):\n nodal_dofs = 1\n edge_dofs = 1\n dim = 3\n maxdeg = 2\n dofnames = ['u', 'u']\n doflocs = np.array([[0., 0., 0.],\n [1., 0., 0.],\n [0., 1., 0.],\n ... | [
[
"numpy.array"
],
[
"matplotlib.pyplot.subplots",
"numpy.intersect1d",
"numpy.argsort",
"numpy.where",
"numpy.zeros"
],
[
"numpy.concatenate",
"numpy.array"
],
[
"numpy.array",
"numpy.tile",
"numpy.nonzero"
]
] |
nathanmartins/Son-Of-Anton | [
"d45eec2b9263dbd981f468219c9d0fb049bd481d"
] | [
"son.py"
] | [
"import logging\nimport math\nimport os\nimport pickle\nimport re\n\nimport PIL.Image\nimport numpy as np\nfrom mtcnn import MTCNN\nfrom numpy import expand_dims\nfrom sklearn import preprocessing, neighbors\nfrom tensorflow_core.python.keras.models import load_model\n\nBASE_DIR = os.path.dirname(os.path.abspath(__... | [
[
"sklearn.preprocessing.LabelEncoder",
"numpy.expand_dims",
"numpy.asarray",
"sklearn.neighbors.KNeighborsClassifier"
]
] |
IGx89/scrypted | [
"577b00a090393f31aaa81de67f5fd4555995921a"
] | [
"plugins/opencv/src/opencv/__init__.py"
] | [
"from __future__ import annotations\nfrom time import sleep\nfrom detect import DetectionSession, DetectPlugin\nfrom typing import Any, List\nimport numpy as np\nimport cv2\nimport imutils\nfrom gi.repository import GLib, Gst\nfrom scrypted_sdk.types import ObjectDetectionModel, ObjectDetectionResult, ObjectsDetect... | [
[
"numpy.ndarray",
"numpy.floor"
]
] |
liqimai/GraphConvForSSL | [
"ef94a897292275680b1058685f2de9d4a8a6449c"
] | [
"gcn/lp.py"
] | [
"import numpy as np\nfrom gcn.graphconv import ap_approximate\n\n\ndef Model17(adj, alpha, y_train, y_test):\n k = int(np.ceil(4 * alpha))\n prediction, time = ap_approximate(adj, y_train, alpha, k)\n predicted_labels = np.argmax(prediction, axis=1)\n prediction = np.zeros(prediction.shape)\n predict... | [
[
"numpy.arange",
"numpy.ceil",
"numpy.argmax",
"numpy.zeros",
"numpy.sum"
]
] |
onlyphantom/elangdev | [
"bdb80e10e98f98ef6510c313cda55daf9464d5c4",
"bdb80e10e98f98ef6510c313cda55daf9464d5c4"
] | [
"build/lib/elang/plot/utils/embedding.py",
"elang/word2vec/scraper/scrape_01.py"
] | [
"import sys, os.path\nimport gensim\nfrom gensim.models import Word2Vec\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom sklearn.decomposition import PCA\n\n\ndef plot2d_demo(model, words=None):\n assert (\n model.vector_size >= 2\n ), \"This function expects a model of size 2 (2-dimension ... | [
[
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.style.context",
"matplotlib.pyplot.text",
"numpy.array",
"sklearn.decomposition.PCA",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
],
[
"pandas.DataFrame"
]
] |
weikhor/tensorflow | [
"ce047fc05c7b5ff54868ba53d724d9c171c4adbb",
"17ac2bd078dcc8c4cf064c0e977b4e2dd061b011"
] | [
"tensorflow/python/data/experimental/kernel_tests/snapshot_test.py",
"tensorflow/lite/python/convert.py"
] | [
"# Copyright 2019 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.data.ops.dataset_ops.Dataset.from_tensors",
"tensorflow.python.data.experimental.ops.snapshot.snapshot",
"tensorflow.python.ops.string_ops.substr_v2",
"tensorflow.python.data.ops.dataset_ops.Dataset.from_tensor_slices",
"tensorflow.python.data.kernel_tests.test_base.default_... |
kradical/cluster-analysis-udemy | [
"e2101bdb08ae3b9ed0ed8c4c1c488e3a75a1b7c5"
] | [
"src/prereq/exercise8.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\n\n# Plot a spiral dataset\n\ndef generateArm(rotation, step):\n theta = np.random.rand(500) * step\n r = np.exp(theta) - 1\n\n x = r * np.cos(theta) + (np.random.rand(500) - 0.5) / 7\n y = r * np.sin(theta) + (np.random.rand(500) - 0.5) / 7\n\n x,... | [
[
"matplotlib.pyplot.scatter",
"numpy.cos",
"numpy.sin",
"numpy.random.rand",
"numpy.exp",
"matplotlib.pyplot.show"
]
] |
lisapm/mlpiper | [
"74ad5ae343d364682cc2f8aaa007f2e8a1d84929",
"74ad5ae343d364682cc2f8aaa007f2e8a1d84929",
"74ad5ae343d364682cc2f8aaa007f2e8a1d84929"
] | [
"mlops/parallelm/mlops/stats/health/categorical_hist_stat.py",
"reflex-algos/components/Python/test-python-train/main.py",
"mlops/parallelm/mlops/channels/python_channel_health.py"
] | [
"\"\"\"\nThe Code contains functions to calculate univariate statistics for categorical features, given a dataset.\n\n\"\"\"\n\nimport numpy as np\n\nfrom parallelm.mlops.stats.health.histogram_data_objects import CategoricalHistogramDataObject\n\n\nclass CategoricalHistogram(object):\n \"\"\"\n Class is resp... | [
[
"numpy.asarray",
"numpy.sum",
"numpy.unique"
],
[
"tensorflow.FixedLenFeature"
],
[
"numpy.max",
"numpy.array",
"numpy.mean",
"numpy.min"
]
] |
jsdussanc/luminoth | [
"dc1c1203a40e1ecf2aaca9647f3008ab72b41438",
"dc1c1203a40e1ecf2aaca9647f3008ab72b41438"
] | [
"luminoth/utils/bbox_transform_tf.py",
"luminoth/models/fasterrcnn/rpn_test.py"
] | [
"import tensorflow as tf\n\n\ndef get_width_upright(bboxes):\n with tf.name_scope('BoundingBoxTransform/get_width_upright'):\n bboxes = tf.cast(bboxes, tf.float32)\n x1, y1, x2, y2 = tf.split(bboxes, 4, axis=1)\n width = x2 - x1 + 1.\n height = y2 - y1 + 1.\n\n # Calculate up r... | [
[
"tensorflow.concat",
"tensorflow.unstack",
"tensorflow.stack",
"tensorflow.cast",
"tensorflow.minimum",
"tensorflow.placeholder",
"tensorflow.exp",
"numpy.all",
"tensorflow.name_scope",
"tensorflow.Session",
"tensorflow.log",
"tensorflow.split"
],
[
"numpy.u... |
JayeshSukhija/ga-learner-dsmp-repo | [
"4c05d980462dde423b6be41cca1218d6d98e8e48"
] | [
"Numpy/code.py"
] | [
"# --------------\n# Importing header files\r\nimport numpy as np\r\n\r\n#New record\r\nnew_record=[[50, 9, 4, 1, 0, 0, 40, 0]]\r\n\r\n#Code starts here\r\n\r\n#Loading data file and saving it into a new numpy array \r\ndata = np.genfromtxt(path, delimiter=\",\", skip_header=1)\r\n\r\nprint(data.shape)\r\n\r\... | [
[
"numpy.min",
"numpy.genfromtxt",
"numpy.concatenate",
"numpy.max",
"numpy.std",
"numpy.mean"
]
] |
NateLol/BAM_A_lightweight_but_efficient_Balanced_attention_mechanism_for_super_resolution | [
"4c977ea1586e7836248acb5cbd648e124b43aca3"
] | [
"EDSR/common.py"
] | [
"import math\r\n\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\n\r\nfrom torch.autograd import Variable\r\n\r\ndef default_conv(in_channels, out_channels, kernel_size, bias=True):\r\n return nn.Conv2d(\r\n in_channels, out_channels, kernel_size,\r\n padding=(kernel_s... | [
[
"torch.nn.Sequential",
"torch.Tensor",
"torch.nn.PReLU",
"torch.nn.Conv2d",
"torch.eye",
"torch.nn.PixelShuffle",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
]
] |
siddgoel/ray | [
"7f3031f451de410b71a5fcb18e04452bfa7351d6"
] | [
"python/ray/ml/tests/test_preprocessors.py"
] | [
"import warnings\nfrom unittest.mock import patch\n\nimport numpy as np\nimport pandas as pd\nimport pytest\n\nimport ray\nfrom ray.ml.preprocessor import PreprocessorNotFittedException\nfrom ray.ml.preprocessors import (\n BatchMapper,\n StandardScaler,\n MinMaxScaler,\n OrdinalEncoder,\n OneHotEnco... | [
[
"pandas.DataFrame.from_dict"
]
] |
alexanu/pyqstrat | [
"ec62a1a7b048df05e8d1058a37bfe2cf113d2815"
] | [
"pyqstrat/account.py"
] | [
"from collections import defaultdict\nfrom sortedcontainers import SortedDict\nimport math\nimport pandas as pd\nimport numpy as np\nfrom pyqstrat.pq_types import ContractGroup, Trade, Contract\nfrom types import SimpleNamespace\nfrom typing import Sequence, Any, Tuple, Callable, Union, MutableSet, MutableSequence,... | [
[
"pandas.concat",
"numpy.nonzero",
"numpy.unique",
"numpy.isfinite",
"numpy.isnan",
"numpy.nan_to_num",
"numpy.datetime64",
"numpy.timedelta64",
"numpy.concatenate",
"numpy.append",
"numpy.diff",
"numpy.searchsorted",
"numpy.array",
"numpy.isreal",
"numpy... |
jjjkkkjjj/pytorch.dl | [
"d82aa1191c14f328c62de85e391ac6fa1b4c7ee3",
"d82aa1191c14f328c62de85e391ac6fa1b4c7ee3",
"d82aa1191c14f328c62de85e391ac6fa1b4c7ee3",
"d82aa1191c14f328c62de85e391ac6fa1b4c7ee3"
] | [
"debug/ssd/test_ssd300.py",
"debug/ssd/train_ssd300.py",
"dl/data/utils/boxes.py",
"dl/models/fots/modules/featextr.py"
] | [
"from dl.data.objdetn import datasets, utils, target_transforms\nfrom dl.data import transforms\n\nfrom dl.models.ssd.ssd300 import SSD300\nfrom dl.data.utils.converter import toVisualizeRectLabelRGBimg\nfrom torch.utils.data import DataLoader\nimport cv2\n\nif __name__ == '__main__':\n augmentation = None\n\n ... | [
[
"torch.utils.data.DataLoader"
],
[
"torch.utils.data.DataLoader"
],
[
"numpy.expand_dims",
"numpy.minimum",
"torch.max",
"torch.cat",
"numpy.concatenate",
"numpy.zeros_like",
"numpy.cross",
"numpy.clip",
"numpy.arange",
"torch.tensor",
"torch.arange",
... |
lsieun/learn-AI | [
"0a164bc2e6317de3aa03c747c0e6f15d93e7f49a",
"0a164bc2e6317de3aa03c747c0e6f15d93e7f49a",
"0a164bc2e6317de3aa03c747c0e6f15d93e7f49a",
"0a164bc2e6317de3aa03c747c0e6f15d93e7f49a"
] | [
"code/learn-AI/matplotlib/graph/sigmoid_function.py",
"ML_Chinahadoop/05/code/lesson/5.3.stat05.py",
"ML_Chinahadoop/04/code/lesson/4.1.intro18.py",
"Tensorflow_InAction_Google/code/004/tensorflow/001.clip_by_value.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\n\ndef func(x):\n return 1 / (1 + np.exp(-x))\n\n# Return evenly spaced numbers over a specified interval.\nxdata = np.linspace(-8, 8, 960,endpoint=True)\nydata = func(xdata)\n\nplt.plot(xdata,ydata)\n\nplt.show()",
"# coding:utf-8\n#\n\nimport math\nimport ... | [
[
"matplotlib.pyplot.plot",
"matplotlib.pyplot.show",
"numpy.linspace",
"numpy.exp"
],
[
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.title",
"numpy.arange",
"numpy.histogramdd",
"numpy.std",
"numpy.random.randn",
"numpy.mean",
"scipy.stats.kurtosis",
... |
Max-astro/A2Project | [
"5d40263742133f214936b06b622d08092e694aed",
"5d40263742133f214936b06b622d08092e694aed",
"5d40263742133f214936b06b622d08092e694aed"
] | [
"DownData/Link_down.py",
"history/il1_Frac_plot.py",
"history/gitcode.py"
] | [
"import requests\r\nimport sys\r\nimport h5py\r\nimport numpy as np\r\nimport os\r\n\r\ndef get(path, params=None, savedir=None):\r\n # make HTTP GET request to path\r\n headers = {\"api-key\":\"27d44ba55cd115b10f2dd9153589aff0\"}\r\n r = requests.get(path, params=params, headers=headers)\r\n\r\n # rais... | [
[
"numpy.load",
"numpy.array",
"numpy.save"
],
[
"numpy.load",
"numpy.log10",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.figure"
],
[
"numpy.sum",
"numpy.vstack",
"numpy.cross"
]
] |
j-woz/Benchmarks | [
"d518162fdafb7cfa26071b6a30a3b456dad024f6",
"d518162fdafb7cfa26071b6a30a3b456dad024f6",
"d518162fdafb7cfa26071b6a30a3b456dad024f6"
] | [
"Pilot1/Combo/combo_dose.py",
"Pilot2/P2B1/p2b1_baseline_keras2.py",
"common/darts/modules/linear/mixed_layer.py"
] | [
"#! /usr/bin/env python\n\nfrom __future__ import division, print_function\n\nimport argparse\nimport collections\nimport logging\nimport os\nimport random\nimport threading\n\nimport numpy as np\nimport pandas as pd\n\nfrom itertools import cycle, islice\n\nimport keras\nfrom keras import backend as K\nfrom keras ... | [
[
"pandas.merge",
"sklearn.metrics.r2_score",
"sklearn.metrics.mean_absolute_error",
"sklearn.metrics.mean_squared_error",
"matplotlib.pyplot.plot",
"numpy.digitize",
"numpy.arange",
"scipy.stats.stats.pearsonr",
"sklearn.model_selection.StratifiedKFold",
"matplotlib.pyplot.f... |
salvacarrion/nmt-continual-learning | [
"302147ac9c270f3341a68a72c803c457f05ff37b"
] | [
"mt/preprocess/1_process_raw.py"
] | [
"import os\nimport pandas as pd\nfrom pathlib import Path\nimport numpy as np\n\nfrom mt import RAW_PATH\nfrom mt import utils\n\nSUFFLE = True\nCONSTRAINED = True\n\nTR_DATA_PATH = \"/home/salva/Documents/Programming/Datasets/scielo/originals/scielo-gma/scielo-gma\"\nTR_RAW_FILES = [\"es-en-gma-biological.csv\", \... | [
[
"numpy.random.shuffle",
"pandas.read_csv",
"numpy.random.seed"
]
] |
JakobHavtorn/es-rl | [
"30d81ad908a30e78d03c83d37454dbe8e05d1452"
] | [
"data-analysis/analyze_E017+020.py"
] | [
"import os\nfrom distutils.dir_util import copy_tree\nimport warnings\n\nimport IPython\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\nimport scipy as sp\nimport torch\n\nfrom context import utils\nimport utils.filesystem as fs\nimport utils.plotting as plot\nfrom util... | [
[
"matplotlib.pyplot.gca",
"numpy.isnan",
"numpy.append",
"matplotlib.rcParams.update",
"matplotlib.pyplot.close",
"numpy.array"
]
] |
RosettaCommons/RFDesign | [
"b404b8b2c57f89c047529c30259aeeb8f6012b61",
"b404b8b2c57f89c047529c30259aeeb8f6012b61",
"9fea2bafbbb7cbf702c9884e8b3ec69ed50ff2f5"
] | [
"se3_transformer/model/layers/linear.py",
"inpainting/model/ss_features.py",
"scripts/RosettaTR/utils.py"
] | [
"# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the \"Software\"),\n# to deal in the Software without restriction, including without limitation\n# t... | [
[
"torch.randn",
"numpy.sqrt"
],
[
"torch.mean",
"torch.erfinv",
"torch.ones",
"numpy.sqrt",
"torch.full",
"torch.cat",
"torch.load",
"torch.randperm",
"torch.clone",
"torch.zeros",
"torch.multinomial",
"torch.tensor",
"torch.sort",
"torch.cuda.is_... |
chrisluedtke/divvy-data-analysis | [
"441fa9028ed4bb77ad47e8109a8be749ea1d30b1",
"441fa9028ed4bb77ad47e8109a8be749ea1d30b1"
] | [
"divvydata/historical_data.py",
"nb_utils/data_processing.py"
] | [
"\"\"\"\nPulls data from:\nhttps://www.divvybikes.com/system-data\nhttps://s3.amazonaws.com/divvy-data/tripdata\n\"\"\"\nfrom io import BytesIO\nimport os\nimport re\nimport requests\nfrom zipfile import ZipFile\nfrom typing import List\n\nfrom lxml import html\nimport pandas as pd\n\nfrom .stations_feed import Sta... | [
[
"pandas.concat",
"pandas.to_datetime"
],
[
"pandas.DataFrame"
]
] |
hoangdzung/dgl | [
"738b75f41e5d3229e5ccda52d76e1297d7b0520d"
] | [
"python/dgl/distributed/graph_partition_book.py"
] | [
"\"\"\"Define graph partition book.\"\"\"\n\nimport pickle\nfrom abc import ABC\nimport numpy as np\n\nfrom .. import backend as F\nfrom ..base import NID, EID\nfrom .. import utils\nfrom .shared_mem_utils import _to_shared_mem, _get_ndata_path, _get_edata_path, DTYPE_DICT\nfrom .._ffi.ndarray import empty_shared_m... | [
[
"numpy.maximum",
"numpy.zeros",
"numpy.cumsum"
]
] |
zpwithme/zzzzpppp | [
"0f5df647f1e9d6cb8c01b3fc7df25ee543714af3",
"0f5df647f1e9d6cb8c01b3fc7df25ee543714af3",
"0f5df647f1e9d6cb8c01b3fc7df25ee543714af3",
"0f5df647f1e9d6cb8c01b3fc7df25ee543714af3",
"0f5df647f1e9d6cb8c01b3fc7df25ee543714af3"
] | [
"deep-learning-for-image-processing-master/pytorch_object_detection/train_coco_dataset/network_files/boxes.py",
"deep-learning-for-image-processing-master/others_project/readPbFile/readPb.py",
"deep-learning-for-image-processing-master/pytorch_object_detection/train_coco_dataset/backbone/feature_pyramid_network... | [
"import torch\nfrom typing import Tuple\nfrom torch import Tensor\nimport torchvision\n\n\ndef nms(boxes, scores, iou_threshold):\n # type: (Tensor, Tensor, float) -> Tensor\n \"\"\"\n Performs non-maximum suppression (NMS) on the boxes according\n to their intersection-over-union (IoU).\n\n NMS iter... | [
[
"torch.ge",
"torch.max",
"torch.empty",
"torch.min",
"torch.ops.torchvision.nms",
"torch.tensor",
"torch.where",
"torch.stack"
],
[
"tensorflow.Graph",
"tensorflow.import_graph_def",
"tensorflow.gfile.GFile",
"tensorflow.Session",
"tensorflow.GraphDef"
],
... |
talk2sunil83/UpgradLearning | [
"70c4f993c68ce5030e9df0edd15004bbb9fc71e7",
"70c4f993c68ce5030e9df0edd15004bbb9fc71e7",
"70c4f993c68ce5030e9df0edd15004bbb9fc71e7",
"70c4f993c68ce5030e9df0edd15004bbb9fc71e7",
"70c4f993c68ce5030e9df0edd15004bbb9fc71e7"
] | [
"zExtraLearning/MLPrep/tf2.0/NbExtracts/23tf2_0_mirrored_strategy.py",
"03Machine Learning 1/02Logistic Regression/04Logistic Regression - Industry Applications - Part II/temp.py",
"02Statistics Essentials/03Hypothesis Testing/02Concepts of Hypothesis Testing - II/Concepts of Hypothesis Testing - II.py",
"06D... | [
"# -*- coding: utf-8 -*-\n\"\"\"TF2.0 Mirrored Strategy.ipynb\n\nAutomatically generated by Colaboratory.\n\nOriginal file is located at\n https://colab.research.google.com/drive/1e7_N_vVQGyfa3Wz9ND0smWnnsHsQUs_k\n\"\"\"\n\n# Commented out IPython magic to ensure Python compatibility.\nfrom tensorflow.keras.mode... | [
[
"tensorflow.keras.models.Model",
"tensorflow.distribute.MirroredStrategy",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.BatchNormalization",
"tensorflow.keras.layers.Dropout",
"tensorflow.keras.layers.MaxPooling2D",
"tensorflow.keras.l... |
a1rb4Ck/auto-sklearn | [
"cdf48b82632927ec56c8c14258c0bfc4c6b2e7d1"
] | [
"autosklearn/smbo.py"
] | [
"import json\nimport os\nimport time\nimport traceback\nimport warnings\n\nimport numpy as np\nimport pynisher\n\nfrom smac.facade.smac_facade import SMAC\nfrom smac.optimizer.objective import average_cost\nfrom smac.runhistory.runhistory import RunHistory\nfrom smac.runhistory.runhistory2epm import RunHistory2EPM4... | [
[
"numpy.array"
]
] |
suchir/passenger_screening_algorithm_challenge | [
"65e3e3ce1889e9a100f6b9b6a53fe5c785a84612"
] | [
"model_v2/synthetic_data.py"
] | [
"from common.caching import read_input_dir, cached, read_log_dir\nfrom common.dataio import get_aps_data_hdf5, get_passenger_clusters, get_data\n\nfrom . import dataio\n\nfrom collections import defaultdict\nimport numpy as np\nimport skimage.transform\nimport skimage.io\nimport skimage.color\nimport glob\nimport o... | [
[
"numpy.abs",
"numpy.random.seed",
"numpy.argmin",
"numpy.random.uniform",
"numpy.array"
]
] |
laurallu/imbalanced-learn | [
"321b751f90ef8faaec6b39218f8c531893e9e79f",
"9a1191e1369f688903649b4342b24e0041c6cf33",
"321b751f90ef8faaec6b39218f8c531893e9e79f"
] | [
"imblearn/under_sampling/_prototype_selection/tests/test_instance_hardness_threshold.py",
"imblearn/over_sampling/tests/test_adasyn.py",
"imblearn/under_sampling/_prototype_generation/_cluster_centroids.py"
] | [
"\"\"\"Test the module .\"\"\"\n# Authors: Guillaume Lemaitre <g.lemaitre58@gmail.com>\n# Christos Aridas\n# License: MIT\n\nimport pytest\nimport numpy as np\n\nfrom sklearn.ensemble import GradientBoostingClassifier\n\nfrom imblearn.under_sampling import InstanceHardnessThreshold\n\nRND_SEED = 0\nX = np.... | [
[
"numpy.array",
"sklearn.cluster.KMeans",
"sklearn.ensemble.GradientBoostingClassifier"
],
[
"sklearn.utils._testing.assert_array_equal",
"numpy.array",
"sklearn.utils._testing.assert_allclose",
"sklearn.neighbors.NearestNeighbors"
],
[
"numpy.hstack",
"sklearn.utils._sa... |
christian-jacobsen/hypernet | [
"9f62e1531eb152cc08af0b0c6b09d6fde8d42400"
] | [
"hypernet/src/thermophysicalModels/chemistry/reactions/reactionRate/arrhenius.py"
] | [
"import numpy as np\n\nfrom hypernet.src.thermophysicalModels.chemistry.reactions.reactionRate import Basic\n\n\nclass Arrhenius(Basic):\n\n # Initialization\n ###########################################################################\n def __init__(\n self,\n reactionsDatabase,\n *ar... | [
[
"numpy.exp",
"numpy.power"
]
] |
lopa23/flim_optcrf | [
"2d9a1dba37a7e5e6beae66c536b07bb7ae4bdfe9",
"2d9a1dba37a7e5e6beae66c536b07bb7ae4bdfe9"
] | [
"qpth/qp.py",
"qpth/solvers/pdipm/batch.py"
] | [
"import torch\nfrom torch.autograd import Function\n\nfrom .util import bger, expandParam, extract_nBatch\nfrom . import solvers\nfrom .solvers.pdipm import batch as pdipm_b\nfrom .solvers.pdipm import spbatch as pdipm_spb\n# from .solvers.pdipm import single as pdipm_s\n\nfrom enum import Enum\n\n\nclass QPSolvers... | [
[
"torch.all",
"torch.Size",
"torch.Tensor",
"torch.zeros",
"torch.eig",
"torch.clamp"
],
[
"torch.norm",
"torch.lu_unpack",
"torch.ones",
"torch.Tensor",
"torch.cat",
"torch.zeros",
"torch.min",
"torch.sum",
"torch.eye",
"torch.bmm"
]
] |
intact-solutions/pysparse | [
"f3dca3ae9d02ab3f49486fbae5d9d68059a318ab"
] | [
"examples/poisson_test.py"
] | [
"import numpy as np\nimport math\nfrom pysparse.sparse import spmatrix\nfrom pysparse.itsolvers.krylov import pcg, qmrs\nfrom pysparse.precon import precon\nimport time\n\ndef poisson2d(n):\n L = spmatrix.ll_mat(n*n, n*n)\n for i in range(n):\n for j in range(n):\n k = i + n*j\n L... | [
[
"numpy.linalg.norm",
"numpy.empty",
"numpy.ones"
]
] |
ryuzakyl/data-bloodhound | [
"ae0413e748e55a0d2dbae35bbe96a672f313a64b",
"ae0413e748e55a0d2dbae35bbe96a672f313a64b",
"ae0413e748e55a0d2dbae35bbe96a672f313a64b",
"ae0413e748e55a0d2dbae35bbe96a672f313a64b"
] | [
"datasets/raman_tablets/__init__.py",
"measures/corr_shape_dissimilarity.py",
"measures/correlation_coefficient.py",
"measures/minkowski_distance.py"
] | [
"#!/usr/bin/env\n# -*- coding: utf-8 -*-\n# Copyright (C) Victor M. Mendiola Lau - All Rights Reserved\n# Unauthorized copying of this file, via any medium is strictly prohibited\n# Proprietary and confidential\n# Written by Victor M. Mendiola Lau <ryuzakyl@gmail.com>, February 2017\n\nimport os\n\nimport scipy.io ... | [
[
"scipy.io.loadmat"
],
[
"numpy.convolve",
"scipy.spatial.distance.correlation",
"numpy.fliplr",
"numpy.arange",
"numpy.exp",
"scipy.ndimage.filters.gaussian_filter1d",
"numpy.array",
"numpy.zeros"
],
[
"scipy.spatial.distance.correlation"
],
[
"numpy.array",... |
ethanabrooks/oyster | [
"08b758b15ca19c50c43a137cba733b79be55654a"
] | [
"rlkit/core/eval_util.py"
] | [
"\"\"\"\nCommon evaluation utilities.\n\"\"\"\n\nfrom collections import OrderedDict\nfrom numbers import Number\nimport os\nimport numpy as np\n\n\ndef dprint(*args):\n # hacky, but will do for now\n if int(os.environ[\"DEBUG\"]) == 1:\n print(args)\n\n\ndef get_generic_path_information(paths, stat_pr... | [
[
"numpy.hstack",
"numpy.min",
"numpy.concatenate",
"numpy.max",
"numpy.std",
"numpy.mean",
"numpy.vstack"
]
] |
qzlvyh/sassoftware-python-dlpy | [
"9bf8cc4ffd5ae235e377004644ef70398431e09c"
] | [
"dlpy/timeseries.py"
] | [
"#!/usr/bin/env python\n# encoding: utf-8\n#\n# Copyright SAS Institute\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# U... | [
[
"matplotlib.dates.DateFormatter",
"pandas.to_datetime",
"numpy.issubdtype",
"matplotlib.pyplot.subplots",
"pandas.Timestamp"
]
] |
GBillotey/Fractalshades | [
"e100b12db031f016bf1a8a1f4fad9ca1c64a0302",
"e100b12db031f016bf1a8a1f4fad9ca1c64a0302"
] | [
"examples/batch_mode/14-burning_ship-deeper_DEM.py",
"examples/interactive_deepzoom/D02_run_BS_interactive.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\n============================\n14 - Burning ship deeper DEM\n============================\n\nPlotting of a distance estimation for the Burning ship (power-2).\nThis zoom is deeper, featuring a miniship at 1.e-101\n\nReference:\n`fractalshades.models.Perturbation_burning_ship`\n\"\"\... | [
[
"numpy.log",
"numpy.array",
"numpy.isinf",
"numpy.clip"
],
[
"numpy.log",
"numpy.array",
"numpy.isinf",
"numpy.clip"
]
] |
jmacdonald2010/mean-variance-standard-deviation-calculator | [
"badae42c099081610fd55ea5a788867c352da6c0"
] | [
"mean_var_std.py"
] | [
"import numpy as np\n\ndef calculate(list):\n if len(list) != 9:\n raise ValueError('List must contain nine numbers.')\n input_array = np.array([[list[0], list[1], list[2]], [list[3], list[4], list[5]], [list[6], list[7], list[8]]])\n calculations = dict()\n print(input_array)\n\n # calc mean\... | [
[
"numpy.amax",
"numpy.amin",
"numpy.std",
"numpy.mean",
"numpy.var",
"numpy.array",
"numpy.sum"
]
] |
semohr/pymc3 | [
"198d13e2ed6f32b33fd8f4b591a47dc8dd8fe2df",
"198d13e2ed6f32b33fd8f4b591a47dc8dd8fe2df"
] | [
"pymc3/tests/test_distributions.py",
"pymc3/sampling_jax.py"
] | [
"# Copyright 2020 The PyMC Developers\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli... | [
[
"numpy.sqrt",
"numpy.all",
"numpy.exp",
"scipy.stats.distributions.triang.logcdf",
"scipy.stats.distributions.invgauss.logpdf",
"scipy.stats.distributions.geom.pmf",
"scipy.stats.distributions.nbinom.logpmf",
"numpy.log1p",
"scipy.stats.distributions.norm.logcdf",
"numpy.ze... |
Naghipourfar/TraderBot | [
"2604c9df7af7394dfab6a54ea9a65a1b0df6a0ce"
] | [
"Code/finance.py"
] | [
"import numpy as np\nimport pandas as pd\nfrom pandas_datareader import data\n\nimport tensorflow as tf\nimport matplotlib.pyplot as plt\nimport keras\n\nfrom keras.layers import Input, Dense, Dropout, BatchNormalization\nfrom keras.models import Model\nfrom keras.callbacks import History, CSVLogger\n\n\"\"\"\n ... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots",
"pandas.date_range"
]
] |
linkserendipity/deep-person-reid | [
"564ccf307336af1b3343fa42c55f9d53df0fa20a"
] | [
"samplers.py"
] | [
"from __future__ import absolute_import\nfrom collections import defaultdict\nimport numpy as np\n\nimport torch\nfrom torch.utils.data.sampler import Sampler\n\nclass RandomIdentitySampler(Sampler):\n \"\"\" \n Randomly sample N identities, then for each identity,\n randomly sample K instances, therefore ... | [
[
"torch.randperm",
"numpy.random.choice"
]
] |
woutergins/satlas2 | [
"51afdc445c8c603372bb26abe19d1eb7bd3f3f24"
] | [
"src/satlas2/models/hfsModel.py"
] | [
"from satlas2.core import Model, Parameter\n\nimport numpy as np\nfrom scipy.special import wofz\nfrom sympy.physics.wigner import wigner_6j, wigner_3j\n\n__all__ = ['HFS']\n\nsqrt2 = 2 ** 0.5\nsqrt2log2t2 = 2 * np.sqrt(2 * np.log(2))\nlog2 = np.log(2)\n\nclass HFS(Model):\n def __init__(self, I, J, A=[0, 0], B=... | [
[
"numpy.log",
"scipy.special.wofz",
"numpy.isfinite",
"numpy.math.factorial"
]
] |
mcuiteallen/stock | [
"06c56db6c712ab88fabdc67a8812869ad4180f6f"
] | [
"collect/TwHistory.py"
] | [
"import calendar\nimport math\nimport pandas as pd\nimport time\nimport twstock\nimport requests\nfrom datetime import datetime, timedelta\nfrom dateutil import relativedelta\nfrom db.Connection import session\nfrom enum import Enum\nfrom model.StockHistory import StockHistory\nfrom sys import float_info\nfrom tali... | [
[
"pandas.to_datetime"
]
] |
naomi172839/pandas | [
"c5f11ab79e5553a28a91fc7036c8dcbfc8cbc697",
"c5f11ab79e5553a28a91fc7036c8dcbfc8cbc697"
] | [
"pandas/tests/arithmetic/test_datetime64.py",
"pandas/tests/frame/conftest.py"
] | [
"# Arithmetic tests for DataFrame/Series/Index/Array classes that should\n# behave identically.\n# Specifically for datetime64 and datetime64tz dtypes\nfrom datetime import datetime, timedelta\nfrom itertools import product, starmap\nimport operator\nimport warnings\n\nimport numpy as np\nimport pytest\nimport pytz... | [
[
"pandas.to_datetime",
"pandas.Series",
"pandas.offsets.Day",
"pandas.tests.arithmetic.common.assert_invalid_addsub_type",
"pandas.offsets.DateOffset",
"numpy.all",
"pandas.tests.arithmetic.common.get_upcast_box",
"pandas._testing.box_expected",
"pandas._testing.makeDateIndex",
... |
argriffing/matplotlib | [
"5555f5463fb5f995a59f7651c0034a5d6a4c7e84",
"5555f5463fb5f995a59f7651c0034a5d6a4c7e84",
"330aefbd031ee227213afe655c5158320015d45b",
"330aefbd031ee227213afe655c5158320015d45b",
"5555f5463fb5f995a59f7651c0034a5d6a4c7e84",
"330aefbd031ee227213afe655c5158320015d45b",
"330aefbd031ee227213afe655c5158320015d45... | [
"examples/pylab_examples/contour_corner_mask.py",
"lib/matplotlib/spines.py",
"examples/pylab_examples/psd_demo_complex.py",
"examples/pylab_examples/image_demo.py",
"examples/pylab_examples/logo.py",
"examples/pylab_examples/tripcolor_demo.py",
"examples/mplot3d/mixed_subplots_demo.py",
"examples/pyl... | [
"#!/usr/bin/env python\n\"\"\"\nIllustrate the difference between corner_mask=False and corner_mask=True\nfor masked contour plots.\n\"\"\"\nimport matplotlib.pyplot as plt\nimport numpy as np\n\n# Data to plot.\nx, y = np.meshgrid(np.arange(7), np.arange(10))\nz = np.sin(0.5*x)*np.cos(0.52*y)\n\n# Mask various z v... | [
[
"matplotlib.pyplot.contourf",
"numpy.arange",
"numpy.cos",
"numpy.sin",
"matplotlib.pyplot.subplot",
"numpy.zeros_like",
"matplotlib.pyplot.contour",
"matplotlib.pyplot.grid",
"numpy.ma.array",
"matplotlib.pyplot.show"
],
[
"matplotlib.transforms.Affine2D.from_value... |
JulienStanguennec-Leddartech/leddar_ros2 | [
"15f2674d8e7c472bc56c4be9cfd41f0d8d39c0bf"
] | [
"leddar_ros2/leddar_sensor.py"
] | [
"\nimport sys\nimport os\nimport time\n\n#Import ros2 py\nimport rclpy \nfrom rclpy.node import Node\n\n#Import messages \nimport sensor_msgs.msg as sensor_msgs\nimport std_msgs.msg as std_msgs\n\n#Import parameters (to read parameters)\nfrom rclpy.parameter import Parameter\n\nimport numpy as np\nimport leddar\n\n... | [
[
"numpy.bitwise_and",
"numpy.array",
"numpy.dtype"
]
] |
powerfulbean/StellarWave | [
"877d5113054f391f605c8e39f1a0f60f7bfeeee1",
"877d5113054f391f605c8e39f1a0f60f7bfeeee1"
] | [
"StimRespFlow/DataStruct/WaveData.py",
"StimRespFlow/DataProcessing/DeepLearning/Factory.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Thu Sep 9 23:21:06 2021\n\n@author: ShiningStone\n\"\"\"\n\nimport datetime\nimport numpy as np\nfrom .Abstract import CWaveData,CTimeStampsGen\n\nclass CDateTimeStampsGen(CTimeStampsGen):\n \n def __init__(self,start:datetime.datetime,delta:datetime.timedelta,nLe... | [
[
"numpy.concatenate",
"numpy.array"
],
[
"torch.utils.data.DataLoader"
]
] |
SimonAltrogge/brian2 | [
"c212a57cb992b766786b5769ebb830ff12d8a8ad",
"c212a57cb992b766786b5769ebb830ff12d8a8ad",
"c212a57cb992b766786b5769ebb830ff12d8a8ad"
] | [
"brian2/codegen/generators/numpy_generator.py",
"brian2/utils/arrays.py",
"brian2/monitors/statemonitor.py"
] | [
"\nimport itertools\n\nimport numpy as np\n\nfrom brian2.parsing.bast import brian_dtype_from_dtype\nfrom brian2.parsing.rendering import NumpyNodeRenderer\nfrom brian2.core.functions import DEFAULT_FUNCTIONS, timestep\nfrom brian2.core.variables import ArrayVariable\nfrom brian2.utils.stringtools import get_identi... | [
[
"numpy.clip",
"numpy.int32",
"numpy.random.poisson",
"numpy.ceil",
"numpy.random.randn",
"numpy.random.rand",
"numpy.floor"
],
[
"numpy.hstack",
"numpy.logical_not",
"numpy.cumsum",
"numpy.zeros_like",
"numpy.argsort",
"numpy.array"
],
[
"numpy.asarr... |
skywolf829/CSE5559_Final_Project | [
"c7b29e6fc0cbfd81252edbadaa0d733a0c24bee7"
] | [
"CNN/extract.py"
] | [
"## Basic Python libraries\nimport os\nfrom PIL import Image\n\n## Deep learning and array processing libraries\nimport numpy as np \nimport torch\nimport torch.nn.functional as F \nimport torchvision\nimport torchvision.transforms as transforms \n\n## Inner-project imports\nfrom model import EncoderCNN, DecoderRNN... | [
[
"torch.device",
"torch.cuda.is_available",
"torch.load"
]
] |
Saibo-creator/Text-Summrize-Project | [
"d5ce54193110452a18cc0b223360c2bd004b4b28",
"d5ce54193110452a18cc0b223360c2bd004b4b28"
] | [
"checkpoints/sum/train/hotel_mask/batch_size_16-notes_new_subword/code_snapshot/generate_from_lm.py",
"data_loaders/mask_asp_1_with_summ_dataset.py"
] | [
"# generate_from_lm.py\n\n\"\"\"\nLoad a trained language model and generate text\n\nExample usage:\nPYTHONPATH=. python generate_from_lm.py \\\n--init=\"Although the food\" --tau=0.5 \\\n--sample_method=gumbel --g_eps=1e-5 \\\n--load_model='checkpoints/lm/mlstm/hotel/batch_size_64/lm_e9_2.93.pt' \\\n--dataset='hot... | [
[
"torch.LongTensor",
"torch.load",
"torch.cuda.is_available",
"torch.cat"
],
[
"numpy.random.seed",
"numpy.random.choice",
"torch.utils.data.DataLoader",
"numpy.mean",
"torch.cuda.device_count"
]
] |
jxhe/fairseq | [
"214e3fed5619733efa4f1f82c61db58e5ce08ad8",
"3ba384cc6c58a139f0ccfbc4e7f183e7c4dfd839"
] | [
"fairseq/progress_bar.py",
"tests/speech_recognition/asr_test_base.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\n\"\"\"\nWrapper around various loggers and progress bars (e.g., tqdm).\n\"\"\"\n\nfrom collections import OrderedDict\nfrom contextl... | [
[
"torch.is_tensor"
],
[
"torch.div",
"torch.zeros",
"torch.randn",
"torch.from_numpy",
"torch.is_tensor",
"torch.tensor",
"numpy.random.randn",
"torch.arange",
"numpy.random.randint"
]
] |
wsyCUHK/cogdl | [
"7a0e36326fc653d85378e3845ec14ebd9425a9b6"
] | [
"cogdl/models/emb/netsmf.py"
] | [
"import numpy as np\nimport networkx as nx\nimport scipy.sparse as sp\nfrom sklearn import preprocessing\nfrom sklearn.utils.extmath import randomized_svd\nfrom multiprocessing import Pool\nfrom tqdm import tqdm\nimport time\n\nfrom cogdl.utils import alias_draw, alias_setup\nfrom .. import BaseModel\n\n\nclass Net... | [
[
"scipy.sparse.csc_matrix",
"numpy.log",
"sklearn.utils.extmath.randomized_svd",
"numpy.sqrt",
"numpy.random.seed",
"numpy.arange",
"scipy.sparse.csgraph.laplacian",
"scipy.sparse.csr_matrix",
"sklearn.preprocessing.normalize",
"numpy.random.randint",
"numpy.random.rand"... |
quidditymaster/thimbles | [
"b122654a012f0eb4f043d1ee757f884707c97615"
] | [
"thimbles/charts/radar_chart.py"
] | [
"\"\"\"\nhttp://matplotlib.org/examples/api/radar_chart.html\n\nExample of creating a radar chart (a.k.a. a spider or star chart) [1]_.\n\nAlthough this example allows a frame of either 'circle' or 'polygon', polygon\nframes don't have proper gridlines (the lines are circles instead of polygons).\nIt's possible to ... | [
[
"matplotlib.projections.polar.PolarAxes._gen_axes_spines",
"numpy.random.random",
"matplotlib.projections.register_projection",
"numpy.linspace",
"matplotlib.path.Path",
"numpy.cos",
"numpy.sin",
"matplotlib.pyplot.Circle",
"matplotlib.pyplot.Polygon",
"matplotlib.spines.Sp... |
NetKet/netket | [
"96758e814fc3128e6821564d6cc2852bac40ecf2",
"96758e814fc3128e6821564d6cc2852bac40ecf2",
"96758e814fc3128e6821564d6cc2852bac40ecf2"
] | [
"netket/sampler/metropolis_numpy.py",
"Examples/Legacy/CustomSampler/exchange_kernel.py",
"netket/hilbert/abstract_hilbert.py"
] | [
"# Copyright 2021 The NetKet 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... | [
[
"numpy.asarray",
"numpy.copy",
"numpy.exp",
"numpy.zeros",
"numpy.empty"
],
[
"numpy.random.randint"
],
[
"numpy.iinfo"
]
] |
Anurag14/Inflow-prediction-Bhakra | [
"d440ec552032084991878877ba5154ea2c452264"
] | [
"LSTM/graphs/graph1.py"
] | [
"import os\nimport seaborn as sns\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\ndf=pd.read_csv('../data1.csv')\ndf=df.values\n#time series vs reservoir levels(ft) graph\nsns.set_style('darkgrid')\nplt.plot(df[:,0],df[:,1],label=\"\")\nplt.plot(df[:,0],df[:,2])\nplt.xlabel('Time Series')\nplt.ylabel('Rese... | [
[
"pandas.read_csv",
"matplotlib.pyplot.title",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.show",
"matplotlib.pyplot.ylabel"
]
] |
junjihashimoto/wav2vec-2-nix | [
"f104280586cf78d0fc5f280ea013f6bc676cd05e"
] | [
"src/main-ja.py"
] | [
"\n# https://huggingface.co/vumichien/wav2vec2-large-xlsr-japanese\n\nimport torch\nimport torchaudio\nimport librosa\nfrom datasets import load_dataset\nimport MeCab\nfrom transformers import Wav2Vec2ForCTC, Wav2Vec2Processor\nimport re\n\n# config\nwakati = MeCab.Tagger(\"-Owakati\")\nchars_to_ignore_regex = '[\\... | [
[
"torch.no_grad",
"torch.argmax"
]
] |
CheukNgai/estimator | [
"673a50bd5ffa70d0672ce47e40f5075f1cbe0a62"
] | [
"tensorflow_estimator/contrib/estimator/python/estimator/rnn.py"
] | [
"# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.python.ops.math_ops.range",
"tensorflow.python.ops.array_ops.concat",
"tensorflow.python.ops.array_ops.shape",
"tensorflow.contrib.feature_column.python.feature_column.sequence_feature_column.sequence_input_layer",
"tensorflow.python.training.training_util.get_global_step",
"te... |
Mirofil/nasbench-1shot1 | [
"c34bf9c0222f07a30ba1518b3e52e120a3560aa4",
"c34bf9c0222f07a30ba1518b3e52e120a3560aa4"
] | [
"optimizers/bohb_one_shot/plots/util.py",
"experiments/analysis/experiment_database.py"
] | [
"import os\nimport pickle\nimport collections\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nfrom IPython import embed\n\n\ncolors={\n 'BOHB-PC-DARTS': 'darkorange',\n 'BOHB-DARTS': 'dodgerblue',\n 'BOHB-GDAS' : 'forestgreen',\n 'RE': 'crimson',\n\t\t'RS': '... | [
[
"numpy.median",
"pandas.DataFrame",
"numpy.copy",
"numpy.array",
"numpy.where",
"numpy.sum"
],
[
"numpy.stack"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.