repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
steffenvan/bachelor-thesis
[ "1472ce1ba32c107e25d4c5cc2ac64edfc04ba1ff" ]
[ "vtrace.py" ]
[ "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "tensorflow.exp", "tensorflow.convert_to_tensor", "tensorflow.minimum", "tensorflow.expand_dims", "tensorflow.zeros_like", "tensorflow.name_scope", "tensorflow.add", "tensorflow.scan", "tensorflow.stop_gradient", "tensorflow.nn.sparse_softmax_cross_entropy_with_logits" ] ...
developfeng/BCM
[ "8eb5ac950a2d67d10fc707519bb66cd9ea4f14f2" ]
[ "libs/models/msc_bcm.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nclass MSC_BCM(nn.Module):\n \"\"\"\n Multi-scale inputs with Box-driven Class-wise Masking(BCM).\n \"\"\"\n\n def __init__(self, base, scales=None, n_classes=21):\n super(MSC_BCM, se...
[ [ "torch.nn.functional.sigmoid", "torch.nn.functional.interpolate", "torch.stack" ] ]
jhancock1975/keras_tutorials
[ "4ff284a57670150ebf894e2aa090a21c4f604046" ]
[ "mlp-ex1.py" ]
[ "import keras\nfrom keras.models import Sequential\nfrom keras.layers import Dense, Dropout, Activation\nfrom keras.optimizers import SGD\nimport numpy as np\nimport jh_util as jh\nimport constants as const\nimport logging\n\nlogging.basicConfig(format='%(asctime)s %(message)s', level=logging.DEBUG)\nlogging.info('...
[ [ "numpy.random.random", "numpy.random.randint" ] ]
mostafaayesh/openpilot
[ "2313ff46f8552dea4835b689fad48ccdda67cc10" ]
[ "selfdrive/controls/lib/latcontrol_model.py" ]
[ "import math\nimport numpy as np\nfrom common.basedir import BASEDIR\nfrom selfdrive.controls.lib.drive_helpers import get_steer_max\nfrom cereal import log\nfrom common.numpy_fast import clip, interp\nfrom common.realtime import DT_CTRL\n\n\nclass LatControlModel:\n def __init__(self, CP):\n # Model generated ...
[ [ "numpy.array", "numpy.dot", "numpy.load", "numpy.where", "numpy.sign" ] ]
henzh/piniverse
[ "77dce494cefc9e8051bb32298a5b32e2397c1634" ]
[ "piniverse/ui/drawer.py" ]
[ "# The MIT License (MIT)\n#\n# Copyright (c) 2019 Henry Zhao\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.show" ] ]
sunpeng1996/DSA2F
[ "22ba0e20ef1c5ace50b748dcfe1b94c9c4d11a87" ]
[ "main.py" ]
[ "\"\"\"\n DSA^2 F: Deep RGB-D Saliency Detection with Depth-Sensitive Attention and Automatic Multi-Modal Fusion\n\"\"\"\nimport os\nimport torch\nfrom torch.autograd import Variable\nfrom torch.utils.data import DataLoader\nimport torch.nn.functional as F\nimport time\nimport torchvision\nimport logging\nimport...
[ [ "torch.cuda.synchronize", "torch.autograd.Variable", "torch.no_grad", "torch.cuda.empty_cache", "torch.nn.functional.softmax" ] ]
antmicro/raw-image-data-previewer
[ "1fc14848a27ce628047cf3e473a9f30f83c9892d" ]
[ "tests/yuv_test.py" ]
[ "import unittest\nimport numpy\nimport os\nfrom unittest.mock import (Mock, patch)\nfrom app.parser.yuv import ParserYUV420, ParserYUV422, ParserYUV420Planar, ParserYUV422Planar\nfrom enum import Enum\n\n\nclass DummyPixelFormat(Enum):\n YUV = 1\n YVU = 2\n UYVY = 3\n YUYV = 4\n\n\nclass DummyEndianness...
[ [ "numpy.array" ] ]
martinbacsi/AlphaZero_Gomoku
[ "a67aeb4a53ede551b69002412952c549356a1220" ]
[ "mcts_alphaZero.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nMonte Carlo Tree Search in AlphaGo Zero style, which uses a policy-value\nnetwork to guide the tree search and evaluate the leaf nodes\n\n@author: Junxiao Song\n\"\"\"\n\nimport numpy as np\nimport copy\n\n\ndef softmax(x):\n probs = np.exp(x - np.max(x))\n probs /= np.sum(pr...
[ [ "numpy.max", "numpy.array", "numpy.random.choice", "numpy.zeros", "numpy.sum", "numpy.sqrt" ] ]
kk49/deca
[ "8a03ea5d1b7ae0d787638f1797b6e2cb46de4bae" ]
[ "deca/db_commands.py" ]
[ "import os\nimport multiprocessing\nimport queue\nimport time\nimport sys\nimport traceback\nimport hashlib\nimport numpy as np\nfrom typing import List, Optional, Callable\n\nfrom .file import ArchiveFile\nfrom .db_core import VfsDatabase, VfsNode, language_codes, node_flag_v_hash_type_4, node_flag_v_hash_type_8\n...
[ [ "numpy.uint64" ] ]
thomasdubdub/so6-airspace-filtering
[ "ad2f240c420d33686a33665ef5f54657cd9e117d" ]
[ "so6_filter.py" ]
[ "from datetime import datetime\nimport pandas as pd\nimport geopandas as gpd\nfrom shapely.geometry import LineString, Polygon, MultiPolygon\n\n\ndef make_time(row):\n datetime_str = str(row[\"date_begin\"]) + str(row[\"time_begin\"])\n return pd.datetime.strptime(datetime_str, \"%y%m%d%H%M%S\")\n\n\ndef make...
[ [ "pandas.datetime.strptime", "pandas.read_csv" ] ]
amareswar-n/repo1
[ "416acf5f480645e43aaa2c1babfce14cf9775673" ]
[ "python/PyParseYml_Sql.py" ]
[ "## Install modules sqlparse and pyyaml for this pkg to work \n\n\nimport os\nimport sqlparse\nimport yaml\nimport pandas as pd\nfrom yaml.loader import SafeLoader\n\n\ndef ParseSql(filePath):\n #filePath = \"/Volumes/MyDrive/src/main/resources/sql/hl/hl_ongoing.sql\"\n if os.path.exists(filePath): \n ...
[ [ "pandas.DataFrame", "pandas.ExcelWriter" ] ]
qsyPython/Python_play_now
[ "278b6d5d30082f8f93b26902c854737c4919405a" ]
[ "yinwei/L3/pm-city.py" ]
[ "#先爬取所有城市以及对应城市的空气质量指标,然后做一个top50的图表\n#http://pm25.in/rank\n\nimport requests\nfrom bs4 import BeautifulSoup\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nplt.rcParams['font.sans-serif'] = ['SimHei']\nplt.rcParams['axes.unicode_minus'] = False # 处理- 显示问题\n\nr = requests.get('http://pm25.in/rank')\nsoup =...
[ [ "numpy.random.rand", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.savefig", "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "numpy.arange", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.show", "matplotlib.pyplot.bar", "matplotlib.pyplot.xticks" ] ]
S73ph4n/octavvs
[ "adbfa3f489b1928281a55de640c64d20afb4f9e1" ]
[ "octavvs/clustering.py" ]
[ "import sys\nimport csv\nimport glob\nimport os\nimport pandas as pd\nimport collections\nimport traceback\nfrom os.path import basename, dirname\nfrom pkg_resources import resource_filename\nimport argparse\n\n#from PyQt5.QtCore import *\n#from PyQt5.QtGui import QFileDialog\n#from PyQt5 import QtWidgets\nfrom PyQ...
[ [ "numpy.min", "numpy.mean", "pandas.concat", "pandas.read_csv", "numpy.concatenate", "numpy.max", "matplotlib.pyplot.colorbar", "pandas.DataFrame", "matplotlib.pyplot.fignum_exists", "matplotlib.pyplot.tick_params", "numpy.mod", "numpy.reshape", "sklearn.cluster....
Omkar-Ranadive/Domain-Adaptation-CycleGAN
[ "85fae5f8b9de568b826d3ba5765c079a9527121a" ]
[ "util/visualizer.py" ]
[ "import numpy as np\nimport os\nimport sys\nimport ntpath\nimport time\nfrom . import util, html\nfrom subprocess import Popen, PIPE\n\n\nif sys.version_info[0] == 2:\n VisdomExceptionBase = Exception\nelse:\n VisdomExceptionBase = ConnectionError\n\n\ndef save_images(webpage, visuals, image_path, aspect_rati...
[ [ "numpy.array" ] ]
TianhongDai/Self_Imitation_Learning
[ "e49003582fa3d875495d84682f2a3332d4922dbc" ]
[ "sil_module.py" ]
[ "import numpy as np\nimport torch\nimport random\nfrom baselines.common.segment_tree import SumSegmentTree, MinSegmentTree\nfrom utils import evaluate_actions_sil\n\n# replay buffer...\nclass ReplayBuffer:\n def __init__(self, size):\n self._storage = []\n self._maxsize = size\n self._next_i...
[ [ "numpy.max", "numpy.array", "numpy.ones_like", "torch.min", "numpy.sum", "torch.clamp", "numpy.sign", "torch.tensor", "torch.sum" ] ]
k-hanawa/criteria_for_instance_based_explanation
[ "bb6ae19a9164748e1fac08f8a7a1ad0adf28a94c" ]
[ "src/torch/mobilenetv2.py" ]
[ "import torch\nimport torch.nn as nn\nimport os\n\nimport torchvision\nimport torchvision.transforms as transforms\n\nfrom tqdm import tqdm as pbar\nimport numpy as np\nimport time\n\nfrom tqdm import tqdm\n\nimport scipy.linalg\n\nimport random\nfrom random import shuffle\n\nis_print = True\ndef _print(*args, **kw...
[ [ "torch.nn.Linear", "torch.cat", "torch.nn.BatchNorm2d", "torch.nn.init.kaiming_normal_", "numpy.load", "torch.load", "torch.nn.CrossEntropyLoss", "numpy.vectorize", "numpy.save", "torch.nn.init.normal_", "torch.utils.data.DataLoader", "torch.nn.init.zeros_", "nu...
varikakasandor/sports-prediction
[ "c7f61b6737684ed60d15eeed68a4fbee3555875e" ]
[ "model_loading.py" ]
[ "import numpy as np\nimport pandas as pd\nimport tensorflow as tf\nfrom pathlib import Path\nimport joblib\n\nfrom tensorflow.keras import models\n\n\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.metrics import mean_absolute_error\n\nfrom custom_utils import DateTransformer, create_integer_sco...
[ [ "pandas.DataFrame", "pandas.read_csv", "sklearn.metrics.mean_absolute_error" ] ]
afizs/jina
[ "52c554c2d593e24129e86dfe3c71bf04f1495082" ]
[ "tests/unit/flow/test_flow_yaml_parser.py" ]
[ "import os\nfrom pathlib import Path\n\nimport numpy as np\nimport pytest\n\nfrom jina import Executor\nfrom jina.excepts import BadFlowYAMLVersion\nfrom jina import Flow\nfrom jina.jaml import JAML\nfrom jina.jaml.parsers import get_supported_versions\nfrom jina.parsers.flow import set_flow_parser\nfrom jina.types...
[ [ "numpy.random.random" ] ]
sissi2017/lpot
[ "968fb136464aa4d89131c62aa5f01a7392571cdf" ]
[ "test/test_metrics.py" ]
[ "\"\"\"Tests for the metrics module.\"\"\"\nimport numpy as np\nimport unittest\nfrom lpot.metric import METRICS\nfrom lpot.experimental.metric.f1 import evaluate\nfrom lpot.experimental.metric import bleu\n\nclass TestMetrics(unittest.TestCase):\n def testmIOU(self):\n metrics = METRICS('tensorflow')\n ...
[ [ "numpy.array", "numpy.sqrt" ] ]
claudiu1989/DeepInterpretablePolynomialNeuralNetwork
[ "6280aa3fd8412d5973b7153659d2df0071ca1c83" ]
[ "src/deep_interpretable_polynomial_neural_network.py" ]
[ "import numpy as np\nfrom scipy.optimize import minimize\nfrom enum import Enum\nfrom itertools import combinations_with_replacement\n\nclass GrowthPolicy(Enum):\n ALL_TERMS = 1\n GROW = 2\n PRUNE_AND_GROW = 3\n\nclass DeepInterpretablePolynomialNeuralNetwork:\n def __init__(self, d_max, lambda_param, b...
[ [ "numpy.array", "numpy.dot", "numpy.zeros", "numpy.log", "numpy.sum", "numpy.exp", "numpy.prod", "numpy.abs", "numpy.around", "scipy.optimize.minimize" ] ]
ed-ortizm/spectra-processing
[ "c25e885746d4344ae095c84c3c0fff093c96b654" ]
[ "sample/train_sets.py" ]
[ "#! /usr/bin/env python3\n####################################################################\n# Idea is to handle everything from the data frame\n####################################################################\nfrom configparser import ConfigParser, ExtendedInterpolation\nimport time\n\nimport numpy as np\ni...
[ [ "numpy.load", "numpy.random.shuffle", "numpy.save", "numpy.invert", "numpy.stack", "pandas.read_csv" ] ]
zereab/PATIENT-Assistant-BOT-main
[ "38d8a43c7f6799f984cd7c8994ae83a716475065" ]
[ "preprocess.py" ]
[ "import nltk\n#nltk.download('wordnet')\nnltk.download('punkt')\nnltk.download('stopwords')\nfrom nltk.tokenize import RegexpTokenizer\nfrom nltk.corpus import stopwords\nimport difflib\n\nimport pandas as pd\n\ndef word_extractor(sentence):\n tokenizer = RegexpTokenizer(r'\\w+')\n tokens =tokenizer.tokenize(...
[ [ "pandas.read_csv" ] ]
chryssa-zrv/UA_COMET
[ "527e7c86bd0a0d8ff90efda58e820108a5666b92", "527e7c86bd0a0d8ff90efda58e820108a5666b92" ]
[ "tests/unit/models/test_rank_model.py", "tests/unit/models/test_comet_estimator.py" ]
[ "# -*- coding: utf-8 -*-\nimport unittest\nfrom argparse import Namespace\nfrom io import StringIO\n\nfrom comet.models import CometRanker\nfrom comet.models.utils import average_pooling, max_pooling\n\nimport torch\n\n\nclass TestCometRanker(unittest.TestCase):\n\n hparams = Namespace(\n **{\"encoder_mod...
[ [ "torch.equal", "torch.tensor" ], [ "numpy.array", "torch.cat", "torch.tensor", "numpy.arange", "torch.equal" ] ]
adriangonz/kserve
[ "a400bd7f6a3b4d40cc0257e55fb20bb4c8967c9f" ]
[ "python/pytorchserver/pytorchserver/example_model/model/cifar10.py" ]
[ "#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# dist...
[ [ "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.Conv2d", "torch.utils.data.DataLoader", "torch.nn.CrossEntropyLoss" ] ]
dav1nci/models
[ "f1a596825b194fa4032e31f7b7e0abad7a28db5f" ]
[ "research/object_detection/exporter.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.contrib.tfprof.model_analyzer.print_model_analysis", "tensorflow.saved_model.utils.build_tensor_info", "tensorflow.import_graph_def", "tensorflow.to_float", "tensorflow.add_to_collection", "tensorflow.identity", "tensorflow.saved_model.signature_def_utils.build_signature_de...
g37502/nsfw-master
[ "347032fc553e549064c5078e8587942296fe8508" ]
[ "nsfw_predict.py" ]
[ "#-*-coding:utf-8-*-\n\nimport os\nimport io\nimport sys\nimport magic\nfrom raids_h import rehis_zero_pic,rehis_zero\nimport numpy as np\nfrom PIL import Image\nimport tensorflow as tf\nimport base64,time\nfrom config import config_h\n_MODEL_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'data/mode...
[ [ "numpy.asarray", "tensorflow.get_default_graph", "tensorflow.Session", "numpy.mean", "numpy.std", "tensorflow.saved_model.loader.load" ] ]
Hanawh/CondInst_mmdetection
[ "16c718f7d17de96d7def85102394beee67cda4b4" ]
[ "mmdet/core/post_processing/mask_nms.py" ]
[ "import torch\n\n\ndef matrix_nms(seg_masks, cate_labels, cate_scores, kernel='gaussian', sigma=2.0, sum_masks=None):\n \"\"\"Matrix NMS for multi-class masks.\n\n Args:\n seg_masks (Tensor): shape (n, h, w)\n cate_labels (Tensor): shape (n), mask labels in descending order\n cate_scores ...
[ [ "torch.exp" ] ]
littlealexchen/Deep-Learning-with-TensorFlow-master
[ "7ea73195922bce6919864352b529b84194ec9d30" ]
[ "Chapter02/Python 3.5/single_neuron_model_1.py" ]
[ "import tensorflow as tf\n\nweight = tf.Variable(1.0, name=\"weight\")\ninput_value = tf.constant(0.5, name=\"input_value\")\nexpected_output = tf.constant(0.0, name=\"expected_output\")\nmodel = tf.multiply(input_value,weight, \"model\")\nloss_function = tf.pow(expected_output - model, 2, name=\"loss_function\")\n...
[ [ "tensorflow.multiply", "tensorflow.summary.scalar", "tensorflow.Session", "tensorflow.Variable", "tensorflow.constant", "tensorflow.summary.merge_all", "tensorflow.summary.FileWriter", "tensorflow.pow", "tensorflow.global_variables_initializer", "tensorflow.train.GradientDe...
zhuyawen/baselines
[ "6d1c6c78d38dd25799145026a590cc584ea22c88" ]
[ "baselines/common/tests/envs/identity_env.py" ]
[ "import numpy as np\nfrom abc import abstractmethod\nfrom gym import Env\nfrom gym.spaces import MultiDiscrete, Discrete, Box\n\n\nclass IdentityEnv(Env):\n def __init__(\n self,\n episode_len=None\n ):\n\n self.observation_space = self.action_space\n self.episode_len = epi...
[ [ "numpy.dot" ] ]
pgxcentre/ExPheWAS
[ "dee85ecea74958431a71e8abd9be8021aa51fa3d" ]
[ "analysis/atc_all_enrichments.py" ]
[ "#!/usr/bin/env python\n\n\"\"\"\nCompute the enrichment of all ATC codes and all outcomes.\n\"\"\"\n\nimport sys\nimport csv\nfrom itertools import product\nimport functools\nimport collections\nimport multiprocessing\n\nimport pandas as pd\nimport numpy as np\nimport scipy.stats\n\nfrom exphewas.utils import qval...
[ [ "pandas.DataFrame", "pandas.read_csv", "pandas.pivot_table" ] ]
Okroshiashvili/feature_engine
[ "e40457ce8b4baa1e146976bf1af1bbdf6eae1305" ]
[ "feature_engine/transformation/reciprocal.py" ]
[ "# Authors: Soledad Galli <solegalli@protonmail.com>\n# License: BSD 3 clause\n\nfrom typing import List, Optional, Union\n\nimport numpy as np\nimport pandas as pd\n\nfrom feature_engine.base_transformers import BaseNumericalTransformer\nfrom feature_engine.variable_manipulation import _define_variables\n\n\nclass...
[ [ "numpy.reciprocal" ] ]
emilyhawkins-drizly/dagster
[ "bfb90e8b0b442f657e5256082d3116aefa8c330b" ]
[ "examples/hacker_news/hacker_news_tests/test_resources/test_snowflake_io_manager.py" ]
[ "import os\nimport uuid\nfrom contextlib import contextmanager\n\nfrom dagster import build_init_resource_context, build_input_context, build_output_context\nfrom hacker_news.resources.snowflake_io_manager import ( # pylint: disable=E0401\n connect_snowflake,\n snowflake_io_manager,\n)\nfrom pandas import Da...
[ [ "pandas.DataFrame" ] ]
gvishal/segmentation
[ "8e2963e7c4c68f68eab9ab7e57f500bfcef8f1bc" ]
[ "code/segmentart.py" ]
[ "import re\nimport sys\n\nimport numpy as np\nimport scipy as sp\nimport matplotlib.pyplot as plt\n\nsys.path.insert(0, '../../')\nfrom segmentation.code import tools, splitters, representations\n\n\npunctuation_pat = re.compile(r\"\"\"([!\"#$%&\\'()*+,-./:;<=>?@[\\\\\\]^_`{|}~])\"\"\")\nhyphenline_pat = re.compile...
[ [ "numpy.array" ] ]
rcbyron/robo-showdown
[ "b9ab239b08519ebe9a58e3eda7422b976bfa22d5" ]
[ "__main__.py" ]
[ "\"\"\"Initialize and start pygame.\"\"\"\nimport pygame\nimport pygame.gfxdraw\nimport random\nimport time\nimport signal\nimport numpy as np\nimport tensorflow as tf\n\nfrom bullet import Bullet\nfrom fighter import Fighter, Vision\nfrom colors import *\nfrom settings import *\nfrom gene_functions import *\n\n\nd...
[ [ "numpy.savetxt", "tensorflow.summary.scalar", "tensorflow.Session", "tensorflow.Variable", "tensorflow.summary.merge_all", "tensorflow.global_variables_initializer" ] ]
SimonUnterstrasser/ColumnModel
[ "8c4e8c105fdfa552938c3dcbe71de99be72243f3" ]
[ "Sedimentation.gcc.py" ]
[ "'''\nComputation of terminal fall speed\n'''\n#GCCif (KERNEL == 1 && LongK_Options == 2) || (COLUMN == 1 && PROCESS != 2) \n# this block is active, if Long kernel values are explicitly computed (and not read from a file) or if sedimentation is switched on in the column model\n\nimport sys\nimport Misc as FK\nimpo...
[ [ "numpy.array", "numpy.zeros" ] ]
samuelduchesne/osmnx
[ "d5ae24aa3f125ee8d7980438525e03d2679fa280" ]
[ "osmnx/buildings.py" ]
[ "################################################################################\n# Module: buildings.py\n# Description: Download and plot building footprints from OpenStreetMap\n# License: MIT, see full license in LICENSE.txt\n# Web: https://github.com/gboeing/osmnx\n##############################################...
[ [ "matplotlib.collections.PatchCollection", "matplotlib.pyplot.subplots" ] ]
caserec2018/CaseRecommender
[ "1b63fe79aa26786c99f35e6b8f0a0dd9e591811b" ]
[ "caserec/recommenders/rating_prediction/matrixfactorization.py" ]
[ "# coding=utf-8\n\"\"\"\n Matrix Factorization Collaborative Filtering Recommender\n [Rating Prediction]\n\n Literature:\n Koren, Yehuda and Bell, Robert and Volinsky, Chris:\n Matrix Factorization Techniques for Recommender Systems\n Journal Computer 2009.\n http://dl.acm.org/c...
[ [ "numpy.dot", "numpy.random.seed", "numpy.multiply", "numpy.fabs", "numpy.sqrt" ] ]
supriya-gdptl/pointnet.pytorch
[ "2b79f2502fca60182ccfd5eb0f5d9bb0f4334820" ]
[ "utils/show_cls.py" ]
[ "from __future__ import print_function\nimport argparse\nimport torch\nimport torch.nn.parallel\nimport torch.utils.data\nfrom torch.autograd import Variable\nfrom pointnet.dataset import HDF5_ModelNetDataset, ModelNetDataset\nfrom pointnet.model import PointNetCls\nimport torch.nn.functional as F\nimport trimesh\n...
[ [ "torch.autograd.Variable", "torch.nn.functional.nll_loss", "torch.utils.data.DataLoader", "torch.load" ] ]
cdj0311/Keras-TextClassification
[ "34746c01ed3976deea108937e023bc6cd4037473" ]
[ "keras_textclassification/m00_Bert/predict.py" ]
[ "# -*- coding: UTF-8 -*-\r\n# !/usr/bin/python\r\n# @time :2019/6/12 14:11\r\n# @author :Mo\r\n# @function :\r\n\r\n\r\n# 适配linux\r\nimport pathlib\r\nimport sys\r\nimport os\r\nproject_path = str(pathlib.Path(os.path.abspath(__file__)).parent.parent.parent)\r\nsys.path.append(project_path)\r\n# 地址\r\nfrom ke...
[ [ "sklearn.metrics.classification_report", "numpy.array" ] ]
deltabravozulu/pytorch
[ "c6eef589971e45bbedacc7f65533d1b8f80a6895", "c6eef589971e45bbedacc7f65533d1b8f80a6895" ]
[ "benchmarks/operator_benchmark/benchmark_pytorch.py", "torch/testing/_internal/dist_utils.py" ]
[ "import time\nimport json\nimport torch\nimport cpp_extension # noqa: F401\n\n\n\"\"\"PyTorch performance microbenchmarks.\n\nThis module contains PyTorch-specific functionalities for performance\nmicrobenchmarks.\n\"\"\"\n\nclass TorchBenchmarkBase(torch.nn.Module):\n \"\"\" This is a base class used to create...
[ [ "torch.cuda.current_device", "torch.jit.script", "torch.ones" ], [ "torch.distributed.is_available", "torch.distributed.init_process_group", "torch.distributed.rpc.backend_registry.construct_rpc_backend_options", "torch.distributed.is_initialized", "torch.distributed.rpc.init_r...
lesley-byte/enviroplus-python
[ "df08c238c8b550c9041ff06a0b6bef6b330af611" ]
[ "lesley-byte/graphpm1.py" ]
[ "from requests import get\nimport matplotlib.pyplot as plt\nimport matplotlib.animation as animation\nimport datetime as dt\n\nfrom pms5003 import PMS5003, ReadTimeoutError as pmsReadTimeoutError\nfig = plt.figure()\nax = fig.add_subplot(1, 1, 1)\nxs = []\nys =[]\npms5003 = PMS5003()\n\ndef animate(i, xs, ys):\n\n ...
[ [ "matplotlib.animation.FuncAnimation", "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.show", "matplotlib.pyplot.subplots_adjust", "matplotlib.pyplot.xticks" ] ]
jeremycfd/conga
[ "204bfd14cab3c4c07fd9b95d072b1b7b79c3d239" ]
[ "scripts/run_conga.py" ]
[ "######################## MAX LINE LENGTH OF ABOUT 120 ##################################################################\nimport argparse\n\nparser = argparse.ArgumentParser(description=\"Run the CoNGA clonotype neighbor-graph analysis pipeline\")\n\n#type is str by default\nparser.add_argument('--gex_data', help=...
[ [ "pandas.concat", "matplotlib.pyplot.xticks", "numpy.max", "numpy.full", "matplotlib.pyplot.savefig", "pandas.DataFrame", "numpy.nonzero", "numpy.arange", "matplotlib.pyplot.tight_layout", "numpy.log10", "matplotlib.pyplot.subplot", "matplotlib.use", "numpy.array...
IIDANGII/mmsegmentation
[ "e383ba2383005e4f8a219e1ade1b95dcb005faea" ]
[ "tools/pytorch2onnx.py" ]
[ "# Copyright (c) OpenMMLab. All rights reserved.\nimport argparse\nimport warnings\nfrom functools import partial\n\nimport mmcv\nimport numpy as np\nimport onnxruntime as rt\nimport torch\nimport torch._C\nimport torch.serialization\nfrom mmcv import DictAction\nfrom mmcv.onnx import register_extra_symbolics\nfrom...
[ [ "torch.cat", "numpy.random.RandomState", "torch.nn.BatchNorm2d", "torch.no_grad", "torch.FloatTensor", "torch.manual_seed", "numpy.stack", "torch.LongTensor", "torch.onnx.export" ] ]
jskim0406/Study
[ "07b559b95f8f658303ee53114107ae35940a6080" ]
[ "2.Model Implementation/0. DNN/jskim_DNN/losses.py" ]
[ "import numpy as np\nfrom numpy import ndarray\n\nfrom jskim_DNN.utils.np_utils import (assert_same_shape,\n softmax,\n normalize,\n #exp_ratios,\n unnormalize)\n\nclass Loss(object):\n '''\n 신경망 모델의 손실을 계산하는 클래스\n '''\n\n...
[ [ "numpy.sum", "numpy.power", "numpy.log", "numpy.clip" ] ]
jroakes/tech-seo-crawler
[ "c60619cb6517069665e229917cfbc4fd0614d36f" ]
[ "lib/bert.py" ]
[ "#! /usr/bin/env python\n# coding: utf-8\n#\n# Copyright (c) 2019 JR Oakes\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the...
[ [ "torch.nn.Linear", "torch.cat", "torch.nn.Tanh", "torch.FloatTensor", "pandas.DataFrame", "torch.no_grad", "torch.nn.CosineSimilarity", "torch.mean" ] ]
itminner/Paddle
[ "1957192f05133c5c15e9c30fb55cffccc39a291d" ]
[ "python/paddle/fluid/tests/unittests/test_variable.py" ]
[ "# Copyright (c) 2018 PaddlePaddle 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 ...
[ [ "numpy.array", "numpy.random.randint", "numpy.array_equal" ] ]
jadecastro/imitation
[ "e05d7f5a4adfb021699647b80576c74ba6bd9443" ]
[ "src/imitation/algorithms/dagger.py" ]
[ "\"\"\"DAgger (https://arxiv.org/pdf/1011.0686.pdf).\n\nInteractively trains policy by collecting some demonstrations, doing BC, collecting more\ndemonstrations, doing BC again, etc. Initially the demonstrations just come from the\nexpert's policy; over time, they shift to be drawn more and more from the imitator's...
[ [ "numpy.array", "numpy.random.RandomState", "numpy.sum", "torch.save", "numpy.load", "torch.utils.data.DataLoader" ] ]
erastorgueva-nv/NeMo
[ "d23ee3e3d5ed2fd17608b736ebae2b415a258a9e" ]
[ "nemo/collections/asr/models/classification_models.py" ]
[ "# Copyright (c) 2020, 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 obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless re...
[ [ "torch.no_grad", "torch.stack" ] ]
windshirely/sparse_mkl
[ "933af0e8c3bc9df7fc6e08a8b2033fbfe833b081" ]
[ "sparse_mkl/tests/test_sparse_sparse.py" ]
[ "import unittest\nimport numpy as np\nimport numpy.testing as npt\nimport scipy.sparse as _spsparse\nfrom sparse_mkl import dot_product_mkl\nfrom sparse_mkl._mkl_interface import _create_mkl_sparse, _export_mkl, sparse_matrix_t, set_debug_mode\nfrom sparse_mkl._sparse_sparse import _matmul_mkl\nfrom sparse_mkl.test...
[ [ "scipy.sparse.coo_matrix", "numpy.dot", "scipy.sparse.bsr_matrix", "scipy.sparse.csc_matrix", "numpy.testing.assert_array_almost_equal" ] ]
stephaneckstein/transport-and-related
[ "e30e1f44e0171237e2187596a69bcac596def642" ]
[ "GAN_Toy/tflib/ops/deconv2d.py" ]
[ "import GAN_Toy.tflib as lib\n\nimport numpy as np\nimport tensorflow as tf\n\n_default_weightnorm = False\ndef enable_default_weightnorm():\n global _default_weightnorm\n _default_weightnorm = True\n\n_weights_stdev = None\ndef set_weights_stdev(weights_stdev):\n global _weights_stdev\n _weights_stdev ...
[ [ "numpy.square", "tensorflow.shape", "numpy.zeros", "tensorflow.expand_dims", "tensorflow.transpose", "tensorflow.pack", "tensorflow.name_scope", "numpy.sqrt", "tensorflow.stack", "tensorflow.nn.conv2d_transpose", "tensorflow.nn.bias_add", "tensorflow.square" ] ]
wecacuee/votenet
[ "e40b4a124e9fad41cddb6b1da5557aee390d64c8" ]
[ "votenet_catkin/src/votenet_service.py" ]
[ "#!/usr/bin/python3\nimport numpy as np\n\nimport rospy\nfrom votenet_catkin.srv import VotenetResponse, Votenet\nfrom ros_numpy.point_cloud2 import pointcloud2_to_array, array_to_pointcloud2\n\nfrom demo import point_cloud_to_detections\n\n\ndef votenet_callback(req):\n points = pointcloud2_to_array(req.pc)\n ...
[ [ "numpy.asarray" ] ]
ReimarBauer/MSS
[ "ddd0f39b0dbe08bebcccf4020ee953f5d04242c0" ]
[ "mslib/msui/kmloverlay_dockwidget.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\n\n mslib.msui.kmloverlay_dockwidget\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n Control widget to configure kml overlays.\n\n This file is part of mss.\n\n :copyright: Copyright 2017 Joern Ungermann\n :copyright: Copyright 2017-2021 by the mss team, see AUTHORS.\n :...
[ [ "matplotlib.patheffects.withStroke" ] ]
taconite/PTF
[ "a8789c9f752aea2944c2a75e04cc2aa21c7e4a00" ]
[ "im2mesh/data/cape_sv.py" ]
[ "import os\nos.environ['PYOPENGL_PLATFORM'] = 'osmesa'\nimport glob\nimport numpy as np\nimport torch\nimport yaml\nimport trimesh\nimport numbers\n\nimport pickle as pkl\n\nfrom torch.utils import data\n\nfrom scipy.spatial import cKDTree as KDTree\nfrom scipy.spatial.transform import Rotation as R\n# from human_b...
[ [ "scipy.spatial.cKDTree", "numpy.dot", "numpy.random.rand", "numpy.random.choice", "numpy.load", "numpy.min", "numpy.cos", "numpy.concatenate", "numpy.max", "numpy.random.normal", "numpy.sin", "numpy.unpackbits", "numpy.eye", "torch.utils.data.items", "nu...
dannadori/selfie2anime_webhooker
[ "37186231e1dbfe8ea89b8a3d84158cc5251d2c24" ]
[ "UGATIT/UGATIT.py" ]
[ "from ops import *\r\nfrom utils import *\r\nfrom glob import glob\r\nimport time\r\nfrom tensorflow.contrib.data import prefetch_to_device, shuffle_and_repeat, map_and_batch\r\nimport numpy as np\r\n\r\nclass UGATIT(object) :\r\n def __init__(self, sess, args):\r\n self.light = args.light\r\n\r\n ...
[ [ "tensorflow.contrib.data.prefetch_to_device", "tensorflow.contrib.data.shuffle_and_repeat", "tensorflow.contrib.data.map_and_batch", "numpy.mod" ] ]
shubham303/Decoupled-attention-network
[ "0dedb621603863adf8ecf0439bbe47dc0589143d" ]
[ "dataset_scene.py" ]
[ "# coding:utf-8\nimport random\nimport torch\nfrom torch.utils.data import Dataset\nfrom torch.utils.data import sampler\nimport torchvision.transforms as transforms\nimport lmdb\nimport six\nimport sys\nfrom PIL import Image\nimport numpy as np\nimport pdb\nimport os\nimport cv2\nfrom abfn import abfn\n\n\nclass l...
[ [ "numpy.array", "numpy.zeros" ] ]
jmodelcxc/eng_archive
[ "04017f062ef1ab023a58b6d9e5bde19992c8398c" ]
[ "Ska/engarchive/tests/test_data_source.py" ]
[ "# Licensed under a 3-clause BSD style license - see LICENSE.rst\nfrom __future__ import print_function, division, absolute_import\n\nimport numpy as np\nimport pytest\n\n\nfrom .. import fetch, fetch_sci, fetch_eng\nfetch_cxc = fetch\n\n\ndate1 = '2016:001:00:00:00.1'\ndate2 = '2016:001:00:00:02.0'\ndate3 = '2016:...
[ [ "numpy.all", "numpy.allclose" ] ]
PKULiuHui/LiveBlogSum
[ "b6a22521ee454e649981d70ddca6c89a1bac5a4c" ]
[ "model/Model3.py" ]
[ "# coding:utf-8\n\n# 层次式encoder + SRL attention\n# 同时预测sent分数和event分数\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport numpy as np\n\nuse_cuda = torch.cuda.is_available()\n\n\nclass Model3(nn.Module):\n def __init__(self, args, embed=None):\n super(Model3, self).__init__()\n...
[ [ "torch.nn.Linear", "torch.zeros", "torch.cat", "torch.nn.GRU", "torch.save", "torch.FloatTensor", "torch.sign", "torch.nn.Bilinear", "torch.cuda.is_available", "torch.t", "numpy.random.random", "torch.nn.Embedding", "torch.dot" ] ]
neiterman21/cheat_detector_keras
[ "a6e9f6e8c55614959ddeeebcaf578ec43edf8d6d" ]
[ "DDetector/Logisticegressiom.py" ]
[ "# model definition (canonical way)\nimport tensorflow as tf\nclass LogisticRegression(tf.keras.Model):\n\n def __init__(self, num_classes):\n super(LogisticRegression, self).__init__()\n self.dense = tf.keras.layers.Dense(num_classes)\n\n def call(self, inputs, training=None, mask=None):\n ...
[ [ "tensorflow.nn.softmax", "tensorflow.device", "tensorflow.keras.layers.Dense" ] ]
manzt/wsireg
[ "7d81b830957cd8e88582727f1f1739a72a48b163" ]
[ "wsireg/reg_images/np_reg_image.py" ]
[ "import warnings\nimport SimpleITK as sitk\nimport numpy as np\nfrom wsireg.reg_images import RegImage\nfrom wsireg.utils.im_utils import (\n std_prepro,\n guess_rgb,\n)\n\n\nclass NumpyRegImage(RegImage):\n def __init__(\n self,\n image,\n image_res,\n mask=None,\n pre_r...
[ [ "numpy.concatenate", "numpy.dot", "numpy.squeeze" ] ]
edsonjunior14/mp_classification
[ "dafbec182afc6e787911ec9cf0948a472477c368" ]
[ "param_grid.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Mar 23 08:50:53 2021\n\n@author: Edson cilos\n\"\"\"\n\n#Standard Packages \nimport numpy as np\n\n#Sklearn API\n\nfrom sklearn.tree import DecisionTreeClassifier\nfrom sklearn.naive_bayes import GaussianNB\nfrom sklearn.neighbors import KNeighborsClassifier\nfrom sk...
[ [ "tensorflow.keras.optimizers.SGD", "sklearn.ensemble.RandomForestClassifier", "sklearn.neighbors.KNeighborsClassifier", "sklearn.naive_bayes.GaussianNB", "tensorflow.keras.layers.Dense", "sklearn.svm.SVC", "sklearn.linear_model.LogisticRegression", "numpy.arange", "sklearn.tree...
kylevedder/second.pytorch
[ "d3995825b7106595df02e586dc2e206d940dda5a" ]
[ "torchplus/tools.py" ]
[ "import functools\nimport inspect\nimport sys\nfrom collections import OrderedDict\n\nimport numba\nimport numpy as np\nimport torch\n\n\ndef get_pos_to_kw_map(func):\n pos_to_kw = {}\n fsig = inspect.signature(func)\n pos = 0\n for name, info in fsig.parameters.items():\n if info.kind is info.PO...
[ [ "numpy.dtype" ] ]
oshToy/Character-Aware-LM-WER
[ "555e04e4ad0acdbc32c7b57a75b0ec72d2d1b762" ]
[ "train.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport time\nimport numpy as np\nimport tensorflow as tf\nimport model\nfrom data_reader import load_data, DataReader, FasttextModel, DataReaderFastText, TestDataReader, load_test_data\nimpo...
[ [ "tensorflow.set_random_seed", "tensorflow.assign", "numpy.random.seed", "pandas.DataFrame", "tensorflow.random_uniform_initializer", "tensorflow.Session", "tensorflow.train.Saver", "tensorflow.Graph", "tensorflow.variable_scope", "tensorflow.variables_initializer", "ten...
asirabrar7/evoMPS
[ "afae13f055ba2352ce0c9b275e4799c7c135b4ff" ]
[ "evoMPS/tests/tdvp_common_tests.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Fri Jan 11 18:11:02 2013\n\n@author: ash\n\"\"\"\nfrom __future__ import absolute_import, division, print_function\n\nimport scipy as sp\nimport evoMPS.matmul as mm\nimport evoMPS.tdvp_common as tc\nimport unittest\n\ndef make_E_noop(A, B):\n res = sp.zeros((A.shape[1...
[ [ "scipy.zeros", "scipy.rand", "scipy.allclose", "scipy.zeros_like" ] ]
yinjunbo/UMA-MOT
[ "46110c3fae15d440cc3e6b1ac49fc1272082c212" ]
[ "UMA-TEST/tracker/Siamese_inference/Siamese_tracker.py" ]
[ "import logging\nimport numpy as np\nfrom tracker.Siamese_utils.infer_utils import convert_bbox_format, Rectangle\nfrom tracker.Siamese_utils.misc_utils import get_center\n\n\nclass TargetState(object):\n \"\"\"Represent the target state.\"\"\"\n\n def __init__(self, bbox, search_pos, scale_idx, his_feature, orig...
[ [ "numpy.dot", "numpy.minimum", "numpy.min", "numpy.mean", "numpy.max", "numpy.linalg.norm", "numpy.arange", "numpy.argmax", "numpy.vstack", "numpy.array", "numpy.reshape", "numpy.floor", "numpy.ceil", "numpy.asarray", "numpy.errstate", "numpy.hanning"...
GkAntonius/abitools
[ "7f42500f5da259117db82b9ac74dbe43be00943e" ]
[ "abitools/io/abinitinput.py" ]
[ "from __future__ import print_function, division\nimport textwrap\nimport numpy as np\n\nfrom ..utils import listify, angstrom_to_bohr, header_line\nfrom ..core.writable import Writable\nfrom .sorting import input_variable_blocks\nfrom .variable import InputVariable\nfrom .structures import structure_to_abivars\n\n...
[ [ "numpy.searchsorted", "numpy.prod" ] ]
euivmar/MinkowskiEngine
[ "1c887bf0c54b9bdd632b9249cac71b275be8b2c2" ]
[ "MinkowskiEngine/SparseTensor.py" ]
[ "# Copyright (c) Chris Choy (chrischoy@ai.stanford.edu).\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy of\n# this software and associated documentation files (the \"Software\"), to deal in\n# the Software without restriction, including without limitation the rights to\n# use, co...
[ [ "torch.IntTensor", "torch.cat", "torch.sparse.DoubleTensor", "torch.sparse.FloatTensor" ] ]
qilei123/mmdetection_rop
[ "cbdbb2b521c94c2f3eeebb2f2069663199f679bc" ]
[ "mmdet/datasets/custom.py" ]
[ "import os.path as osp\n\nimport mmcv\nimport numpy as np\nfrom mmcv.parallel import DataContainer as DC\nfrom torch.utils.data import Dataset\n\nfrom .transforms import (ImageTransform, BboxTransform, MaskTransform,\n Numpy2Tensor)\nfrom .utils import to_tensor, random_scale\nfrom .extra_au...
[ [ "numpy.array", "numpy.random.choice", "numpy.random.rand", "numpy.zeros", "numpy.where", "numpy.hstack" ] ]
highgroundmaster/Image-Super-Resolution-Using-Deep-Convolutional-Networks
[ "b94d1aa212d071fb4d551838b7b4dff3ea9393f7" ]
[ "Bicubic Upsampling/Code/Preprocessing/distort_images.py" ]
[ "\"\"\"\n Functions used for distorting images for training\n\"\"\"\n\n# Import the necessary libraries\nimport numpy as np\nimport torch\n\nfrom scipy.ndimage.filters import gaussian_filter\nfrom PIL import Image\n\n# Import the necessary source codes\nfrom Preprocessing.utils import dct_2d\nfrom Preprocessing....
[ [ "torch.round", "numpy.array", "numpy.zeros", "numpy.copy", "scipy.ndimage.filters.gaussian_filter", "torch.cuda.is_available", "torch.tensor", "torch.empty_like" ] ]
soheeyang/denspi
[ "f540b6a547f012823fc6c2bb10077df6bccc13a6" ]
[ "pre.py" ]
[ "# coding=utf-8\n# Copyright 2018 The Google AI Language Team Authors, The HugginFace Inc. team and University of Washington.\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# ...
[ [ "numpy.concatenate", "torch.device", "torch.tensor" ] ]
NJDFan/fxpmath
[ "a4d67e421c351c3901d62e22c60a5c81d427811d" ]
[ "fxpmath/__init__.py" ]
[ "__version__ = '0.4.0-rc.1'\n\nimport sys\nimport os\n\n_INFO_PRINT_ENABLE = False\n\n# check if __array_function__ methods is enabled in numpy\n# os.environ[\"NUMPY_EXPERIMENTAL_ARRAY_FUNCTION\"] = \"1\"\n_NUMPY_EXPERIMENTAL_ARRAY_FUNCTION_AUTOENABLE = True\nif \"NUMPY_EXPERIMENTAL_ARRAY_FUNCTION\" in os.environ.k...
[ [ "numpy.log2" ] ]
sungyoon-lee/LossLandscapeMatters
[ "b805939c56eea33beda86560a1289c35878d93de" ]
[ "config.py" ]
[ "\nimport os\nimport json\nimport glob\nimport copy\nimport importlib\nimport torch\nimport numpy as np\nfrom datasets import loaders\n\n# from model_defs import add_feature_subsample, remove_feature_subsample\nfrom model_defs import convert_conv2d_dense, save_checkpoint, load_checkpoint_to_mlpany\n\n# Helper funct...
[ [ "torch.zeros", "torch.load" ] ]
yuta-hi/pytorch_bayesian_unet_inference_cpp
[ "390037c244f94457c779e9f79fa2c2dd938a8f46" ]
[ "dump_model.py" ]
[ "import numpy as np\nimport torch\nfrom pytorch_bcnn.models import UNet, BayesianUNet\nfrom pytorch_bcnn.links import MCSampler\n\ndef main():\n\n device='cuda'\n out = 'model.pth'\n\n predictor = BayesianUNet(ndim=2, in_channels=1, nlayer=3, out_channels=10) # NOTE: minimal model\n model = MCSampler(pr...
[ [ "torch.as_tensor", "torch.no_grad", "numpy.ones", "torch.jit.trace" ] ]
jpollmann102/football-predictor
[ "0025f10240467195c6860f11f01e6e95def7a27f" ]
[ "nflPredict.py" ]
[ "import pandas as pd\r\nimport numpy as np\r\nimport sys\r\n\r\nfrom sklearn.model_selection import train_test_split\r\nfrom sklearn.linear_model import LogisticRegression\r\n# from math import exp\r\n\r\ndef meanAbsolutePercentageError(yTrue, yPredict):\r\n yTrue, yPredict = np.array(yTrue), np.array(yPredict)\...
[ [ "numpy.array", "sklearn.linear_model.LogisticRegression", "numpy.abs", "sklearn.model_selection.train_test_split", "pandas.read_csv" ] ]
lrsantana18/BigDL
[ "14b2761616fb0be3872f4a4a92b56e992b504d12" ]
[ "python/orca/src/bigdl/orca/learn/pytorch/pytorch_pyspark_worker.py" ]
[ "#\n# Copyright 2016 The BigDL Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law ...
[ [ "torch.distributed.destroy_process_group" ] ]
Mathieu4141/avalanche
[ "09c922459edcf90441abb6912a73e351dcbd8b49" ]
[ "avalanche/training/strategies/icarl.py" ]
[ "import copy\nimport itertools\nfrom typing import TYPE_CHECKING, Optional, List\nimport torch\nfrom torch.optim import Optimizer\n\nfrom avalanche.benchmarks.utils import AvalancheConcatDataset, \\\n AvalancheTensorDataset, AvalancheSubset\nfrom math import ceil\n\nfrom avalanche.models import TrainEvalModel, N...
[ [ "torch.zeros", "torch.cat", "torch.argmax", "torch.norm", "torch.no_grad", "torch.ones", "torch.where", "torch.tensor", "torch.mean", "torch.flip" ] ]
haginile/pyjstat
[ "fe270a6fbf09e2dee398d7a35e09fc348a6325e1" ]
[ "pyjstat/pyjstat.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"pyjstat is a python module for JSON-stat formatted data manipulation.\n\nThis module allows reading and writing JSON-stat [1]_ format with python,\nusing data frame structures provided by the widely accepted\npandas library [2]_. The JSON-stat format is a simple lightweight JSON form...
[ [ "pandas.isnull", "numpy.array", "pandas.merge", "pandas.concat" ] ]
google/dynamic-video-depth
[ "274f5f59604a10121a2445f7b30df4a9ff075946" ]
[ "datasets/shutterstock.py" ]
[ "# Copyright 2021 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed t...
[ [ "numpy.asarray", "numpy.zeros", "numpy.ones", "numpy.load", "numpy.transpose", "torch.load", "numpy.linalg.inv" ] ]
dbkinghorn/NGC-TF1-nvidia-examples
[ "f3e714c8bb4dcf2b706cca1a4584be52ee91a033" ]
[ "bert/utils/utils.py" ]
[ "# Copyright (c) 2019 NVIDIA CORPORATION. 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 may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless require...
[ [ "tensorflow.estimator.SessionRunArgs", "tensorflow.train.get_global_step" ] ]
jose-gilberto/dml
[ "41f432f6a7b17b9799fdbb6d8124f3b317cdaa20" ]
[ "dml/utils/data.py" ]
[ "from typing import Union\nimport pandas as pd\nimport torch\nfrom torch.utils.data import Dataset\n\n\nclass DiabetesDataset(Dataset):\n\n def __init__(\n self,\n data: Union[str, pd.DataFrame],\n transform = None,\n target_transform = None\n ) -> None:\n super().__init__()...
[ [ "pandas.read_csv", "torch.tensor" ] ]
vfdev-5/models-comparison.pytorch
[ "30a895028b19ee4ee0c3875a27e44286b489b378" ]
[ "scripts/compute_inference_time.py" ]
[ "import argparse\nimport gc\nimport numpy as np\nimport sys\nimport json\nimport time\nimport torch\nimport torch.backends.cudnn as cudnn\n\nsys.path.append('..')\nimport pretrainedmodels\nimport pretrainedmodels.utils as utils\n\nmodel_names = sorted(name for name in pretrainedmodels.__dict__\n\tif not name.starts...
[ [ "numpy.asarray", "torch.cuda.synchronize", "torch.no_grad", "torch.manual_seed", "torch.randn" ] ]
sagieppel/-Finding-relations-between-two-instances-in-an-image-using-a-convolutional-neural-net.
[ "7779250b101538396386affb1e89936927b0942f" ]
[ "RunExample.py" ]
[ "# Run example on single image and two vessel masks (should run out of the box for a the example image and masks)\n#...............................Imports..................................................................\nimport numpy as np\nimport torch\nimport Visuallization as vis\nimport Net as NetBuild\nimport...
[ [ "numpy.concatenate", "torch.no_grad", "numpy.expand_dims", "torch.load" ] ]
andersk/cupy
[ "c73a325dd034ee9abfac2c4af11aa9107ec89042" ]
[ "cupy/linalg/product.py" ]
[ "import numpy\nimport six\n\nimport cupy\nfrom cupy import core\nfrom cupy.core import internal\n\nfrom cupy.linalg.solve import inv\nfrom cupy import util\nfrom cupy.util import collections_abc\n\nmatmul = core.matmul\n\n\ndef dot(a, b, out=None):\n \"\"\"Returns a dot product of two arrays.\n\n For arrays w...
[ [ "numpy.isscalar" ] ]
J-Douglas/Digit-Recognition
[ "0b5c8afff28ea1253b33ffdd07b16c8b4d4cc943" ]
[ "Kaggle/kaggleANN.py" ]
[ "import os\nimport pandas as pd\nimport numpy as np\nimport keras\nfrom keras.models import Sequential\nfrom keras.layers import *\nfrom keras.utils import to_categorical\n\ntrain_dataset = pd.read_csv('datasets/train.csv')\ntest_dataset = pd.read_csv('datasets/test.csv')\n\ntrain_dataset.head()\n\ntrain_images = t...
[ [ "pandas.read_csv" ] ]
tum-msv/mimo-cnn-est
[ "8915a918c08c5ae61dc2208352ebb9676395b3c8" ]
[ "estimators/DiscreteMMSE_mimo.py" ]
[ "import numpy as np\nfrom scipy.linalg import toeplitz\nfrom .Templates import Estimator_mimo, Descriptor\nfrom training_CNN_mimo import pilot_matrix\n\nclass DiscreteMMSE(Estimator_mimo, Descriptor):\n _object_counter = 1\n\n def __init__(self, channel, snr, n_antennas_BS, n_antennas_MS, n_samples, n_pilots,...
[ [ "scipy.linalg.toeplitz", "numpy.trace", "numpy.zeros", "numpy.sum", "numpy.exp", "numpy.eye", "numpy.amax", "numpy.kron" ] ]
YuechengWu/pandas
[ "7f753892eb6b29aaa62176cb9f00ad84c092c09a", "7f753892eb6b29aaa62176cb9f00ad84c092c09a", "7f753892eb6b29aaa62176cb9f00ad84c092c09a", "7f753892eb6b29aaa62176cb9f00ad84c092c09a" ]
[ "pandas/tests/extension/decimal/array.py", "pandas/tests/tseries/offsets/test_offsets.py", "pandas/tests/io/test_excel.py", "pandas/tests/frame/test_mutate_columns.py" ]
[ "import decimal\nimport numbers\nimport random\nimport sys\n\nimport numpy as np\n\nfrom pandas.core.dtypes.base import ExtensionDtype\n\nimport pandas as pd\nfrom pandas.core.arrays import ExtensionArray, ExtensionScalarOpsMixin\n\n\nclass DecimalDtype(ExtensionDtype):\n type = decimal.Decimal\n name = 'deci...
[ [ "numpy.concatenate", "pandas.api.extensions.take", "pandas.api.types.is_list_like", "numpy.asarray" ], [ "pandas.tseries.frequencies.get_offset", "pandas._libs.tslibs.Timedelta", "pandas.tseries.offsets.CBMonthEnd", "pandas.tseries.offsets.WeekOfMonth", "pandas.tseries.freq...
Kludex/thinc
[ "6ac9d908d6d0f32686ba1a6084e015af3007e819" ]
[ "thinc/tests/test_config.py" ]
[ "import pytest\nfrom typing import Iterable, Union, Optional, List, Callable, Dict, Any\nfrom types import GeneratorType\nfrom pydantic import BaseModel, StrictBool, StrictFloat, PositiveInt, constr\nimport catalogue\nimport thinc.config\nfrom thinc.config import ConfigValidationError\nfrom thinc.types import Gener...
[ [ "numpy.array", "numpy.ones", "numpy.asarray", "numpy.zeros" ] ]
oriolmirosa/dash-recipes
[ "c01372292d60c3fd8c1f3a47bca6330c2b268ba4" ]
[ "dash_sqlite.py" ]
[ "import dash\nimport dash_core_components as dcc\nimport dash_html_components as html\nimport pandas as pd\n\nfrom sqlalchemy import create_engine\n\n# Create a simple database\nengine = create_engine('sqlite:///sample.db')\ndf = pd.DataFrame({\n 'a': [1, 2, 3, 4, 5, 6],\n 'b': ['x', 'y', 'x', 'x', 'z', 'y']\...
[ [ "pandas.DataFrame" ] ]
busyyang/DL_21tensorflow
[ "ccac457b66a80f3de80d14d503e6cec8681537eb" ]
[ "L3/slim/train_image_classifier.py" ]
[ "# Copyright 2016 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 required...
[ [ "tensorflow.group", "tensorflow.train.AdagradOptimizer", "tensorflow.control_dependencies", "tensorflow.identity", "tensorflow.app.flags.DEFINE_bool", "tensorflow.train.GradientDescentOptimizer", "tensorflow.trainable_variables", "tensorflow.train.latest_checkpoint", "tensorflo...
ironartisan/Trajectory-Transformer
[ "52b8a1100de1548a6c757372466c232aca36d0b9" ]
[ "baselineUtils.py" ]
[ "from torch.utils.data import Dataset\nimport os, time\nimport pandas as pd\nimport numpy as np\nimport torch\nimport random\nimport scipy.spatial\nimport scipy.io\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.mplot3d import Axes3D\n\ndim = 3\n\n\nplt.rcParams['font.sans-serif'] = [\"SimHei\"]\n# 防止 - 号出错,和上一...
[ [ "numpy.concatenate", "numpy.delete", "numpy.array", "numpy.zeros", "torch.max", "matplotlib.pyplot.clf", "numpy.ones", "matplotlib.pyplot.close", "matplotlib.pyplot.figure", "numpy.stack", "numpy.arange", "matplotlib.pyplot.show", "torch.Tensor", "numpy.expa...
TurtleInMelon/SemanticSegmentationByDeeplabv3plusAndPyQt5
[ "a925d89b9b936dc75b667ba6264cc16d05c272ca" ]
[ "research/deeplab/utils/save_annotation.py" ]
[ "# Lint as: python2, python3\n# Copyright 2018 The TensorFlow Authors All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/L...
[ [ "tensorflow.gfile.Open", "numpy.amax", "numpy.amin" ] ]
PapStatMechMat/SeaPy
[ "1b30792c011a23172a1ce33fe8ebea976561d59a" ]
[ "Tutorials/predict.py" ]
[ "import tensorflow as tf\nimport numpy as np\nimport os,glob,cv2\nimport sys,argparse\n\nparser = argparse.ArgumentParser()\nparser.add_argument(\"--filepath\",help=\"image file path for prediction purposes...\")\nparser.add_argument(\"--trainpath\",help=\"directory where training data is stored...\")\nargs=parser....
[ [ "numpy.array", "tensorflow.train.latest_checkpoint", "tensorflow.get_default_graph", "tensorflow.train.import_meta_graph", "tensorflow.Session", "numpy.multiply" ] ]
limberc/TorchSSL
[ "b78918964bde9a91ba8bb5be58c2b238951949f8" ]
[ "models/pseudolabel/pseudolabel.py" ]
[ "import contextlib\nimport os\nfrom collections import Counter\nfrom copy import deepcopy\n\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\nfrom sklearn.metrics import *\nfrom torch.cuda.amp import GradScaler, autocast\n\nfrom train_utils import Bn_Controller, EMA, ce_loss, wd_loss\nfrom .pseudo...
[ [ "torch.zeros", "torch.cat", "torch.cuda.synchronize", "torch.cuda.Event", "torch.max", "torch.no_grad", "numpy.array_str", "torch.softmax", "torch.cuda.device_count", "torch.nn.functional.cross_entropy", "torch.load", "numpy.clip", "torch.cuda.amp.GradScaler" ...
se4u/DeepNetworks
[ "693db0a0148f425b5dbe8d1c69d069dfcf3b6e76" ]
[ "deep_networks/models/discogan.py" ]
[ "import datetime\nimport functools\nimport operator\nimport os\n\nimport tensorflow as tf\n\nfrom .base import GANModel\nfrom .blocks import BasicGenerator, BasicDiscriminator\nfrom ..ops import dragan_perturb\nfrom ..train import IncrementalAverage\n\n\nclass DiscoGAN(GANModel):\n def __init__(self,\n ...
[ [ "tensorflow.train.AdamOptimizer", "tensorflow.summary.scalar", "tensorflow.summary.histogram", "tensorflow.random_uniform", "tensorflow.ones_like", "tensorflow.train.Saver", "tensorflow.reshape", "tensorflow.nn.sigmoid_cross_entropy_with_logits", "tensorflow.constant", "ten...
harrywang/tutorial-buffe
[ "d71a2e1e71fb85a726da613edbf1cea3a92eca17" ]
[ "streamlit/airbnb.py" ]
[ "import pandas as pd\nimport streamlit as st\nimport plotly.express as px\n\n@st.cache\ndef get_data():\n return pd.read_csv(\"http://data.insideairbnb.com/united-states/ny/new-york-city/2021-04-07/visualisations/listings.csv\") # not avaliable anymore\n\n# df = get_data()\ndf = pd.read_csv(\"listings.csv\")\ns...
[ [ "pandas.read_csv" ] ]
oguzserbetci/generate-time-series
[ "f1e10a47e2adc88664c1930f5d3e0e9acbd8b386" ]
[ "spawn.py" ]
[ "from sklearn.metrics.pairwise import pairwise_distances\nfrom loaddataset import loaddataset, savedataset\nfrom collections import Counter\nfrom functools import partial\nfrom fastdtw import fastdtw\nfrom dtw_mean import ssg\nimport numpy as np\nimport argparse\nimport time\nimport math\nimport os\n\nSEED = 0\nnp....
[ [ "numpy.concatenate", "numpy.array", "sklearn.metrics.pairwise.pairwise_distances" ] ]
metocean/xarray
[ "f87bb0beadd937e3e9657e6d686a20b2bb288d2b" ]
[ "xarray/tests/test_indexing.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nimport numpy as np\nimport pandas as pd\n\nfrom xarray import Dataset, DataArray, Variable\nfrom xarray.core import indexing\nfrom . import TestCase, ReturnItem\n\n\nclass TestIndexers(TestCase):\n de...
[ [ "pandas.to_datetime", "pandas.Index", "numpy.random.rand", "numpy.asarray", "numpy.zeros", "numpy.random.randn", "numpy.arange", "pandas.MultiIndex.from_product", "numpy.int32" ] ]
Chatoyant19/handeye_calibration
[ "590c93eba0fef835d0be6da0d750f71e4891a8fb" ]
[ "hand_eye_calibration/bin/compute_aligned_poses.py" ]
[ "#!/usr/bin/env python\nfrom hand_eye_calibration.time_alignment import (\n calculate_time_offset, compute_aligned_poses, FilteringConfig)\nfrom hand_eye_calibration.quaternion import Quaternion\nfrom hand_eye_calibration.csv_io import (\n write_time_stamped_poses_to_csv_file,\n read_time_stamped_poses_fro...
[ [ "numpy.array" ] ]
ziedbouf/anovos
[ "4cd149fe803f8cec7d49cf1d2ebff5abf6b362ce" ]
[ "src/main/anovos/data_ingest/ts_auto_detection.py" ]
[ "# coding=utf-8\n\n\"\"\"This module help produce the output containing a transformation through auto timestamp / date detection by reading the ingested dataframe from source.\n\nAs a part of generation of the auto detection output, there are various functions created such as -\n\n- regex_date_time_parser\n- ts_loo...
[ [ "pandas.DataFrame" ] ]
Jeminaje/pycaret
[ "b2833e6a4daa1c6286f3c5a3c17fb8404a01d23e" ]
[ "pycaret/internal/preprocess.py" ]
[ "# Module: Preprocess\n# Author: Fahad Akbar <m.akbar@queensu.ca>\n# License: MIT\n\nimport pandas as pd\nimport numpy as np\nimport ipywidgets as wg\nfrom IPython.display import display\nfrom ipywidgets import Layout\nfrom sklearn.base import BaseEstimator, TransformerMixin, clone\nfrom sklearn.impute._base import...
[ [ "scipy.stats.mode", "scipy.stats.binom.sf", "numpy.random.choice", "numpy.median", "numpy.tan", "sklearn.preprocessing.RobustScaler", "numpy.where", "sklearn.preprocessing.MinMaxScaler", "pandas.concat", "numpy.cos", "sklearn.pipeline.Pipeline", "scipy.stats.binom.c...
yizhouzhao/GenMotion
[ "67e73d06155d888eabda1187aa6ed3bbd796a814" ]
[ "genmotion/algorithm/action_conditioned/datasets/dataset.py" ]
[ "import random\n\nimport numpy as np\nimport torch\n\nfrom .tools import parse_info_name\nfrom ..utils.tensors import collate\nfrom ..utils.misc import to_torch\nfrom ..utils import rotation_conversions as geometry\n\nPOSE_REPS = [\"xyz\", \"rotvec\", \"rotmat\", \"rotquat\", \"rot6d\"]\n\n\nclass Dataset(torch.uti...
[ [ "torch.zeros", "torch.cat", "numpy.array", "numpy.random.choice", "numpy.ones", "numpy.mean", "numpy.argmax", "numpy.arange", "numpy.argwhere" ] ]