repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list | possible_versions list |
|---|---|---|---|---|---|
changwookjun/pytorch-lightning-bolts | [
"d05d7b5f23f1afc6d51f743826833117c1c9b1e4"
] | [
"pl_bolts/models/autoencoders/basic_ae/basic_ae_module.py"
] | [
"import os\nfrom argparse import ArgumentParser\n\nimport pytorch_lightning as pl\nimport torch\n\nimport torch. nn as nn\nfrom torch.nn import functional as F\n\nfrom pl_bolts.datamodules import (BinaryMNISTDataModule, CIFAR10DataModule,\n ImagenetDataModule, MNISTDataModule,\n ... | [
[
"torch.nn.functional.mse_loss",
"torch.nn.Linear"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
abhishekm47/3DDFA_V2 | [
"1f76a0f441494b5d734de53fe43854c5b59d2d9c"
] | [
"utils/functions.py"
] | [
"# coding: utf-8\n\n__author__ = 'cleardusk'\n\nimport numpy as np\nimport cv2\nfrom math import sqrt\nimport matplotlib.pyplot as plt\n\nRED = (0, 0, 255)\nGREEN = (0, 255, 0)\nBLUE = (255, 0, 0)\n\n\ndef get_suffix(filename):\n \"\"\"a.jpg -> jpg\"\"\"\n pos = filename.rfind('.')\n if pos == -1:\n ... | [
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"numpy.round",
"matplotlib.pyplot.subplots_adjust",
"matplotlib.pyplot.axis",
"matplotlib.pyplot.show",
"numpy.zeros",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
lise1020/pybinding | [
"921d5c2ac0ecc0ef317ba28b0bf68899ea30709a"
] | [
"tests/utils/fuzzy_equal.py"
] | [
"import math\nfrom functools import singledispatch, update_wrapper\n\nimport numpy as np\nfrom scipy.sparse import csr_matrix, coo_matrix\n\nimport pybinding as pb\n\n\ndef _assertdispatch(func):\n \"\"\"Adapted `@singledispatch` for custom assertions\n\n * Works with methods instead of functions\n * Keeps... | [
[
"numpy.logical_not",
"numpy.testing.assert_equal",
"numpy.argwhere",
"numpy.all",
"numpy.testing.assert_almost_equal",
"numpy.sum",
"numpy.isclose"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Guneetconvent2002/pymc3 | [
"55d455a9c873594b233d3e361d0886d9abc21646"
] | [
"pymc3/distributions/simulator.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.log",
"scipy.spatial.cKDTree",
"numpy.random.default_rng"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
amreshd04/model-training-build-deploy-CI-CD-using-CircleCI | [
"9ae69b320de79cf6b98445182df5db51b90ef491"
] | [
"packages/classification_model/classification_model/processing/features.py"
] | [
"import numpy as np\nfrom sklearn.base import BaseEstimator, TransformerMixin\nfrom classification_model.processing.errors import InvalidModelInputError\n\n\nclass LogTransformer(BaseEstimator, TransformerMixin):\n\n\tdef __init__(self, variables=None):\n\t\tif not isinstance(variables, list):\n\t\t\tself.variables... | [
[
"numpy.log"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
smolkelab/promoter_design | [
"c3a04bd7cabc52a04b21adc1d2629925e554bad7"
] | [
"seq_design/seq_gradient_evolution.py"
] | [
"# Given an ensemble of models, evolve a random sequence to fulfill an objective.\n# cf. https://blog.keras.io/how-convolutional-neural-networks-see-the-world.html\n\nimport keras\nfrom keras import backend as K\nfrom functools import partial\n\nimport sys\nimport os\nimport pandas\nimport numpy as np\nimport rando... | [
[
"numpy.swapaxes",
"numpy.multiply",
"numpy.power",
"numpy.clip",
"numpy.min",
"pandas.DataFrame",
"numpy.stack",
"numpy.concatenate",
"numpy.max",
"numpy.apply_along_axis",
"numpy.mean",
"numpy.random.rand",
"numpy.repeat",
"numpy.array",
"numpy.zeros",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
sherlockchou86/target_detector | [
"03d7fd8b263dcfb4cee5d9fe407af3691ed4e80b"
] | [
"yolo.py"
] | [
"#! /usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nRun a YOLO_v3 style detection model on test images.\n\"\"\"\n\nimport colorsys\nimport os\nfrom timeit import default_timer as timer\n\nimport numpy as np\nfrom keras import backend as K\nfrom keras.models import load_model\nfrom keras.layers import Input\nf... | [
[
"numpy.expand_dims",
"numpy.random.seed",
"numpy.asarray",
"numpy.random.shuffle",
"numpy.floor",
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
cunningham-lab/cyclic-gps | [
"b11fa959afb0dc50e83e5c8c679981a74dc28f2a"
] | [
"train_leg.py"
] | [
"from statistics import variance\nimport pandas as pd\nimport torch\nfrom torch.nn import Parameter\nfrom torch.utils.data import DataLoader\nfrom cyclic_gps.models import LEGFamily\nfrom cyclic_gps.data_utils import time_series_dataset, calc_per_element_percentage_diff\nfrom cyclic_gps.plotting_utils import plot_p... | [
[
"matplotlib.pyplot.legend",
"torch.nn.Parameter",
"torch.cat",
"torch.utils.data.DataLoader",
"torch.from_numpy",
"matplotlib.pyplot.show"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
bilal-196/sktime | [
"87e92e51f9c4cd399d9438c5c06e1364ec409134",
"87e92e51f9c4cd399d9438c5c06e1364ec409134"
] | [
"sktime/datatypes/_panel/_convert.py",
"sktime/forecasting/base/_fh.py"
] | [
"# -*- coding: utf-8 -*-\n\nimport numpy as np\nimport pandas as pd\n\n__all__ = [\n \"convert_dict\",\n]\n\nfrom sktime.datatypes._panel._registry import MTYPE_LIST_PANEL\n\n\n# dictionary indexed by triples of types\n# 1st element = convert from - type\n# 2nd element = convert to - type\n# 3rd element = con... | [
[
"pandas.concat",
"pandas.Series",
"numpy.array_equal",
"pandas.RangeIndex",
"numpy.arange",
"pandas.DataFrame",
"numpy.stack",
"pandas.MultiIndex.from_product",
"numpy.array"
],
[
"pandas.Int64Index"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"1.3",
"0.19",
"1.1",
"1.5",
"0.24",
"0.20",
"1.0",
"0.25",
"1.2"
],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"nump... |
TierynnB/LeaguePyBot | [
"2e96230b9dc24d185ddc0c6086d79f7d01e7a643"
] | [
"leaguepybotv2.0/_backup2/templatematch/tm_with_resize2.py"
] | [
"import cv2\nimport numpy as np\n\n# Resizes a image and maintains aspect ratio\ndef maintain_aspect_ratio_resize(image, width=None, height=None, inter=cv2.INTER_AREA):\n # Grab the image size and initialize dimensions\n dim = None\n (h, w) = image.shape[:2]\n\n # Return original image if no need to res... | [
[
"numpy.linspace"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
joselynzhao/One-shot-Person-Re-ID-ATM | [
"d039b1a66410f87cfe931774eba54a5f1a1a0260"
] | [
"atmkf3_pro12.py"
] | [
"#!/usr/bin/python3.6\n# -*- coding: utf-8 -*-\n# @Time : 2020/8/30 下午1:12\n# @Author : Joselynzhao\n# @Email : zhaojing17@forxmail.com\n# @File : atmkf3_pro12.py\n# @Software: PyCharm\n# @Desc :\n\n\n\nfrom my_reid.eug import *\nfrom my_reid import datasets\nfrom my_reid import models\nimport numpy as ... | [
[
"numpy.max",
"numpy.array",
"numpy.min"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
rua-aaa/awesome-python-login-model | [
"f3f761cec50128376a028987bc7404cdf9953ade"
] | [
"liepin/liepinSpecialComJob/liepinSpecialComJob/spiders/lpspecialcomjob.py"
] | [
"import json\n\nimport scrapy\nimport re\nfrom datetime import datetime\nimport pandas as pd\nimport time\nfrom common.util import get_13_time\nt = get_13_time()\nfrom liepinSpecialComJob.items import LiepinspecialcomjobItem\n\n\nclass LiepinSpdier(scrapy.Spider):\n name = 'liepin'\n start_urls = ['https://vi... | [
[
"pandas.read_csv"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
tetutaro/yolo_various_platforms | [
"ad547d1567017990ab03ef6226074128c4174a77"
] | [
"datasets/create_small_dataset.py"
] | [
"#!/usr/bin/env python\n# -*- coding:utf-8 -*-\nimport os\nimport glob\nimport shutil\nfrom collections import defaultdict\nimport numpy as np\nimport simplejson as json\nimport argparse\n\n\ndef create_dataset(number: int, directory: str) -> None:\n # delete old dataset and create new dataset\n if os.path.is... | [
[
"numpy.random.shuffle"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
henryhchchc/MockSniffer | [
"6d6e845616004ca77ce6d73709cff94a1a32c6c5"
] | [
"ASE20_data/evaluation/baselineutil.py"
] | [
"\ndef _run_core(data):\n from classifier import balance_dataset, calculate_performance\n (project_data, baseline, transform_whole_dataset) = data\n bal = balance_dataset(project_data)\n X = bal.drop(['IS_MOCK', 'TC', 'TM', 'L', 'PROJ'], axis=1)\n y = bal['IS_MOCK']\n y_predict = baseline(\n ... | [
[
"numpy.mean",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
PeterBon/yolo3-pytorch | [
"8f2cf7ddc28003017f96002eaa516bb4015d087d"
] | [
"nets/yolo_training.py"
] | [
"import cv2\nfrom random import shuffle\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport math\nimport torch.nn.functional as F\nfrom matplotlib.colors import rgb_to_hsv, hsv_to_rgb\nfrom PIL import Image\nfrom utils.util import bbox_iou\n\ndef jaccard(_box_a, _box_b):\n b1_x1, b1_x2 = _box_a[:, 0... | [
[
"torch.sigmoid",
"torch.linspace",
"numpy.minimum",
"numpy.logical_and",
"torch.zeros_like",
"numpy.random.shuffle",
"torch.exp",
"numpy.concatenate",
"numpy.argmax",
"torch.log",
"numpy.random.rand",
"numpy.transpose",
"torch.clamp",
"numpy.array",
"num... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
BOSUKE/stock_and_python_1st | [
"91beabad4d583342fa3c6e1e51c7eb77f07cd8ba"
] | [
"chapter3/golden_core30.py"
] | [
"# -*- coding: utf-8 -*-\r\nimport simulator as sim\r\nimport pandas as pd\r\nimport sqlite3\r\nimport datetime\r\nfrom collections import defaultdict\r\n\r\n\r\ndef create_stock_data(db_file_name, code_list, start_date, end_date):\r\n \"\"\"指定した銘柄(code_list)それぞれの単元株数と日足(始値・終値)を含む辞書を作成\r\n \"\"\"\r\n stock... | [
[
"pandas.read_sql"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
AbhijeetKrishnan/pandas | [
"6c0e09f148eb1029bfe56495f003b574ad629800"
] | [
"pandas/tests/series/indexing/test_numeric.py"
] | [
"import numpy as np\nimport pytest\n\nimport pandas as pd\nfrom pandas import DataFrame, Index, Series\nimport pandas.util.testing as tm\nfrom pandas.util.testing import assert_series_equal\n\n\ndef test_get():\n # GH 6383\n s = Series(\n np.array(\n [\n 43,\n 4... | [
[
"pandas.Series",
"numpy.arange",
"pandas.util.testing.assert_produces_warning",
"pandas.Index",
"pandas.util.testing.assert_series_equal",
"pandas.DataFrame",
"pandas.util.testing.assert_frame_equal",
"numpy.int64",
"pandas.Float64Index",
"numpy.random.randn",
"numpy.ra... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"0.19",
"1.1",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
bfjei2825401/siamban | [
"c41d58742b146dfc8960053453227c6e9fec1bac"
] | [
"siamban/models/layer/se_block.py"
] | [
"# -*- coding: utf-8 -*\n\nimport torch\nimport torch.nn as nn\nfrom torch.nn.parameter import Parameter\n\n\nclass SELayer(nn.Module):\n def __init__(self, channel, reduction=2):\n super(SELayer, self).__init__()\n self.avg_pool = nn.AdaptiveAvgPool2d(1)\n self.fc = nn.Sequential(\n ... | [
[
"torch.ones",
"torch.zeros",
"torch.nn.Sigmoid",
"torch.nn.Linear",
"torch.no_grad",
"torch.nn.AdaptiveAvgPool2d",
"torch.nn.ReLU"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
developersfox/Visual_Hallucinate | [
"21fcd46a3e95ca4036ccb11d949d72008da9dadd"
] | [
"Genetic.py"
] | [
"from Model import scores, img_sizes\nfrom torch import randn, stack, no_grad\n\nfrom random import random\n# from joblib import delayed, Parallel ; hm_cpu = 4\nfrom multiprocessing import Pool, cpu_count\n\n\ndef create_population(hm):\n return randn(hm, *img_sizes, requires_grad=True)\n\n\ndef mutate_populatio... | [
[
"torch.stack",
"torch.randn",
"torch.no_grad"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Genomicsplc/variantkey | [
"acdc7a6e55f99b2076c2b99d05e316c2779bf0ad"
] | [
"python-class/pyvariantkey/variantkey.py"
] | [
"\"\"\"Vectorized VariantKey.\"\"\"\n\nimport variantkey as pvk\nimport numpy as np\n\n\nclass VariantKey(object):\n \"\"\"VariantKey numpy-vectorized functions.\"\"\"\n\n def __init__(self, genoref_file=None, nrvk_file=None, rsvk_file=None, vkrs_file=None):\n \"\"\"Instantiate a new VariantKey object.... | [
[
"numpy.array",
"numpy.repeat",
"numpy.vectorize",
"numpy.nditer"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
vergilus/NJUNMT-pytorch | [
"85cc8d4f1aae04541d2e30ec2ca2b9b9fe2bea60"
] | [
"reinforces/reinforce_utils.py"
] | [
"#!/usr/bin/env python\n#coding=UTF-8\n\nimport os\n\nfrom yaml.loader import FullLoader\nimport torch\nimport yaml\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport subprocess\nimport time\nimport math\nimport numpy as np\nfrom collections import OrderedDict\nfrom src.data.vocabulary import Vocabular... | [
[
"torch.abs",
"torch.load",
"torch.sum",
"torch.nn.Embedding",
"torch.no_grad",
"torch.distributions.constraints.interval",
"torch.topk",
"numpy.random.randint",
"torch.nn.Dropout",
"torch.ones",
"numpy.full",
"torch.tensor",
"torch.sort",
"torch.nn.functiona... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Ignarius/Rectangular-Concrete-Beam-Capacity-Solver | [
"0609f574806a95d19e82a3e1a9f92f797438f40c"
] | [
"General_Solver (MPa).py"
] | [
"from tkinter import *\r\nfrom tkinter import messagebox\r\nfrom tkinter import ttk\r\nimport numpy as np\r\nimport sympy\r\nfrom sympy.abc import x\r\n\r\ndef solve():\r\n dataT = []\r\n dataC = []\r\n for line in trv1.get_children():\r\n data = []\r\n for value in trv1.item(line)['values']:... | [
[
"numpy.logical_and",
"numpy.min",
"numpy.power",
"numpy.round",
"numpy.array",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
dchurchwell-usgs/groundmotion-processing | [
"57aecdde36d98b5f838b819dc281a47a84351256",
"57aecdde36d98b5f838b819dc281a47a84351256"
] | [
"tests/gmprocess/waveform_processing/lowpass_max_test.py",
"tests/gmprocess/waveform_processing/processing_test.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport pkg_resources\n\nimport numpy as np\nfrom obspy import UTCDateTime\n\nfrom gmprocess.core.streamcollection import StreamCollection\nfrom gmprocess.utils.config import get_config, update_dict\nfrom gmprocess.utils.event import get_event_object\nfro... | [
[
"numpy.testing.assert_allclose"
],
[
"numpy.abs",
"numpy.array",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
yuanl/jina | [
"989d0689353bbbcd2c7bf11928b652224c3d4bf7"
] | [
"tests/unit/flow/test_asyncflow.py"
] | [
"import asyncio\n\nimport numpy as np\nimport pytest\n\nfrom jina import Document\nfrom jina.flow.asyncio import AsyncFlow\nfrom jina.logging.profile import TimeContext\nfrom jina.types.request import Response\n\nfrom tests import validate_callback\n\nnum_docs = 5\n\n\ndef validate(req):\n assert len(req.docs) =... | [
[
"numpy.random.random"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
LIBOL/LSOL | [
"37f2b02a11823eabae2624997a3ee0094e4198b8"
] | [
"ofs/opts/synthetic_100k.py"
] | [
"#! /usr/bin/env python\n#################################################################################\n# File Name : synthetic_100k.py\n# Created By : yuewu\n# Creation Date : [2016-10-25 11:21]\n# Last Modified : [2016-12-06 21:34]\n# Descript... | [
[
"numpy.logspace"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
GuoQuanhao/YOLOv5-Paddle | [
"b4d2758b78aa58d7f7be8fa77e2163c80f736c0a"
] | [
"train.py"
] | [
"# YOLOv5 reproduction 🚀 by GuoQuanhao\n\"\"\"\nTrain a YOLOv5 model on a custom dataset\n\nUsage:\n $ python path/to/train.py --data coco128.yaml --weights yolov5s.pdparams --img 640\n\"\"\"\nimport argparse\nimport logging\nimport math\nimport os\nimport random\nimport sys\nimport time\nfrom pathlib import Pa... | [
[
"numpy.ones",
"numpy.concatenate",
"numpy.interp",
"numpy.array",
"numpy.zeros",
"numpy.loadtxt"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
kautuk-desai/MS-CSE | [
"f29e65e9bbc8aafe4b9411a4b409320fb4ac0fb7"
] | [
"project1/main.py"
] | [
"import os\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom scipy.stats import multivariate_normal\n\n# print the name and person number\nprint('UBitName = ', 'satyasiv')\nprint('personNumber = ', 50248987)\nprint('UBitName = ', 'kautukra')\nprint('personNumber = ', 50247648)\nprint('... | [
[
"pandas.read_excel",
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.subplots",
"pandas.DataFrame",
"numpy.std",
"numpy.cov",
"numpy.mean",
"numpy.random.rand",
"numpy.identity",
"scipy.stats.multivariate_normal.logpdf",
"numpy.var",
"matplotlib.pyplot.xlabel",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"1.3",
"0.19",
"1.1",
"1.5",
"0.24",
"0.20",
"1.0",
"0.25",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
ChrisLiuxp/SSD | [
"c75ca55f9bf456340b9c1283c21cb34c7ffd912a"
] | [
"demo/demo.py"
] | [
"# 使用SSD(Pytorch)进行目标检测\nimport os\nimport sys\nimport torch\nfrom torch.autograd import Variable\nimport numpy as np\nimport cv2\nfrom ssd import build_ssd\nfrom data import VOC_CLASSES as labels\nfrom matplotlib import pyplot as plt\n\n# 定位到ssd.pytorch这个路径\nmodule_path = os.path.abspath(os.path.join('..')) \nif ... | [
[
"matplotlib.pyplot.Rectangle",
"torch.set_default_tensor_type",
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.gca",
"torch.Tensor",
"numpy.linspace",
"torch.from_numpy",
"torch.cuda.is_available",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jquadrino/estimator | [
"b9d599e4f82374be43a9a8a2dcdca34968ddde48",
"b9d599e4f82374be43a9a8a2dcdca34968ddde48"
] | [
"tensorflow_estimator/python/estimator/estimator_test.py",
"tensorflow_estimator/python/estimator/canned/dnn_test_v2.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 requ... | [
[
"tensorflow.python.data.ops.dataset_ops.Dataset.from_tensors",
"tensorflow.python.ops.array_ops.constant",
"numpy.linspace",
"tensorflow.python.platform.gfile.GFile",
"tensorflow.python.ops.state_ops.assign_add",
"tensorflow.python.ops.array_ops.placeholder",
"tensorflow.python.framewo... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"2.7",
"1.12",
"1.4",
"2.2",
"1.13",
"2.3",
"2.4",
"2.6",
"2.9",
"1.5",
"1.7",
"2.5",
"1.0",
"2.8",
"1.2",
"2.... |
for-review-56/jsai-201911 | [
"c1ea20665512e5da5f573b3aa05c51772ce92477"
] | [
"src/module/Suprise_algo_wrapper.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\n\"\"\"\nwrapper function for suprise.alogo to be able to use\n.fit(user_ids, item_ids, rating) and .predict(user_ids, item_ids)\n\"\"\"\n\nimport pandas as pd\nimport numpy as np\n\nfrom surprise import Dataset\nfrom surprise import Reader\n\nclass algo_wrapper:\n... | [
[
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
emilleishida/fink-science | [
"42fe5d4624fc9aadd85b8ab9078307cb6c455cfe"
] | [
"fink_science/random_forest_snia/old/bazin.py"
] | [
"# Author: Alexandre Boucaud and Emille E. O. Ishida\n# Based on initial prototype developed by the CRP #4 team\n#\n# created on 25 January 2018\n#\n# Licensed GNU General Public License v3.0;\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.asarray",
"numpy.exp",
"numpy.zeros",
"scipy.optimize.least_squares"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.6",
"1.10",
"1.4",
"1.9",
"0.19",
"1.5",
"0.18",
"1.2",
"1.7",
"1.0",
"0.17",
"1.3",
"1.8"
],
"tensorflow": []
}
] |
rsmith-nl/numpy | [
"04ac2a13b302a7af6fe2a5ca67e09a0e09a0f8e7"
] | [
"numpy/core/setup_common.py"
] | [
"# Code common to build tools\nimport sys\nimport warnings\nimport copy\nimport binascii\nimport textwrap\n\nfrom numpy.distutils.misc_util import mingw32\n\n\n#-------------------\n# Versioning support\n#-------------------\n# How to change C_API_VERSION ?\n# - increase C_API_VERSION value\n# - record the hash... | [
[
"numpy.distutils.misc_util.mingw32"
]
] | [
{
"matplotlib": [],
"numpy": [
"1.11",
"1.19",
"1.24",
"1.16",
"1.23",
"1.20",
"1.7",
"1.12",
"1.21",
"1.22",
"1.14",
"1.6",
"1.13",
"1.9",
"1.17",
"1.10",
"1.18",
"1.15",
"1.8"
],
"pand... |
fjchange/Anomaly_AR_Net_ICME_2020 | [
"3bdbde9f8cb2ac6c6cd1c36725fdec55cb5e401e"
] | [
"model.py"
] | [
"import torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nimport torch.nn.init as torch_init\r\nfrom utils import fill_context_mask\r\nfrom torch.nn.utils.rnn import pack_padded_sequence\r\nfrom torch.nn.utils.rnn import pad_packed_sequence\r\n\r\ndef weights_init(m):\r\n classname = m.__class... | [
[
"torch.nn.Softmax",
"torch.nn.Dropout",
"torch.cat",
"torch.nn.LSTM",
"torch.nn.utils.rnn.pack_padded_sequence",
"torch.nn.Sigmoid",
"torch.nn.Linear",
"torch.nn.Conv1d",
"torch.nn.AvgPool2d",
"torch.nn.utils.rnn.pad_packed_sequence",
"torch.nn.LeakyReLU",
"torch.nn... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
MingyuLi19910814/DCGAN-Anime-Face-Generator-Pytorch | [
"2dd76934310ac197f149fe28ddfdf396db646254"
] | [
"NaiveDCGAN3.py"
] | [
"import numpy as np\nimport torch\nfrom torch import nn\nfrom config import global_cfg\nfrom tqdm import tqdm\nfrom tools import *\nfrom PIL import Image\nimport os\n\n'''\nNaive DCGAN with 3 convolutional layers\n'''\nclass Discriminator(nn.Module):\n def __init__(self, conv_dim):\n super(Discriminator, ... | [
[
"torch.nn.ConvTranspose2d",
"torch.nn.Conv2d",
"numpy.transpose",
"torch.nn.Linear",
"torch.nn.BCEWithLogitsLoss",
"torch.as_tensor",
"torch.nn.LeakyReLU",
"torch.cuda.is_available",
"torch.nn.BatchNorm2d",
"numpy.random.uniform",
"torch.nn.functional.tanh",
"numpy.... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
fsrlab/src | [
"0e32d7ac04b84dc1a81825c3ffc480236c61ee68"
] | [
"sim2real_ep/ep_detect_and_grasp/setup.py"
] | [
"from distutils.core import setup, Extension\nfrom Cython.Build import cythonize\nimport numpy\n\nsetup(ext_modules=cythonize(\"redmarkerdetection.pyx\"), include_dirs=[numpy.get_include()])"
] | [
[
"numpy.get_include"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Teradata/r-python-sto-orangebook-scripts | [
"c8cff0ea2f2f45520c1025c95270ae326549d85a"
] | [
"scripts/ex5p.py"
] | [
"################################################################################\n# The contents of this file are Teradata Public Content\n# and have been released to the Public Domain.\n# Licensed under BSD; see \"license.txt\" file for more information.\n# Copyright (c) 2021 by Teradata\n########################... | [
[
"numpy.hstack",
"numpy.dot",
"numpy.asarray",
"numpy.linalg.inv",
"pandas.DataFrame",
"numpy.asmatrix",
"numpy.vstack"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
Zibzob/dotfiles | [
"8b71276f63c602a9c8d5040916324e1d90e91a64"
] | [
"Template/Miscellaneous/scikit_learn_tree.py"
] | [
"\"\"\"\nThis module gathers tree-based methods, including decision, regression and\nrandomized trees. Single and multi-output problems are both handled.\n\"\"\"\n\n# Authors: Gilles Louppe <g.louppe@gmail.com>\n# Peter Prettenhofer <peter.prettenhofer@gmail.com>\n# Brian Holt <bdholt1@gmail.com>\... | [
[
"numpy.log",
"numpy.log2",
"scipy.sparse.issparse",
"numpy.sqrt",
"numpy.unique",
"numpy.reshape",
"numpy.ascontiguousarray",
"numpy.atleast_1d",
"numpy.copy",
"numpy.argmax",
"numpy.argsort",
"numpy.array",
"numpy.zeros",
"numpy.sum"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.7",
"1.0",
"0.10",
"1.2",
"0.14",
"0.19",
"1.5",
"0.12",
"0.17",
"0.13",
"1.6",
"1.4",
"1.9",
"1.3",
"1.10",
"0.15",
"0.18",
"0.16"... |
tensorflow/federated | [
"f56f3b71c163e48fb94959090a94c51cf25d1048"
] | [
"tensorflow_federated/python/core/impl/types/computation_types.py"
] | [
"# Copyright 2018, The TensorFlow Federated 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 a... | [
[
"tensorflow.TensorShape",
"tensorflow.dtypes.as_dtype"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
cha-tzi/devito | [
"45b14b7625a21631bd026a0c77911bc46dad9ead"
] | [
"devito/passes/clusters/aliases.py"
] | [
"from collections import OrderedDict, defaultdict\nfrom functools import partial\n\nfrom cached_property import cached_property\nimport numpy as np\n\nfrom devito.ir import (ROUNDABLE, DataSpace, IterationInstance, Interval, IntervalGroup,\n LabeledVector, Scope, detect_accesses, build_interva... | [
[
"numpy.floor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
skvis/Attendance-System-Facial-Recognition | [
"ec63b3defae1ca48204ae55a27d7054da467be9b"
] | [
"asfr.py"
] | [
"import cv2\r\nimport pandas as pd\r\nimport numpy as np\r\nimport os\r\nimport tkinter as tk\r\nimport csv\r\nimport time\r\nimport datetime\r\nimport pickle\r\nfrom PIL import Image\r\n\r\n\r\n\r\nroot = tk.Tk()\r\nroot.title('Attendance System Using Face Recognition')\r\n\r\nlbl = tk.Label(root, text ='Student I... | [
[
"numpy.array",
"pandas.read_csv",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
andygrove/cudf | [
"ba6073a5c390e7c442094cdd236f96985628270c"
] | [
"python/cudf/cudf/core/column/categorical.py"
] | [
"# Copyright (c) 2018-2020, NVIDIA CORPORATION.\n\nimport pickle\n\nimport numpy as np\nimport pandas as pd\nimport pyarrow as pa\n\nimport cudf\nimport cudf._lib as libcudf\nimport cudf._libxx as libcudfxx\nfrom cudf._libxx.transform import bools_to_mask\nfrom cudf.core.buffer import Buffer\nfrom cudf.core.column ... | [
[
"pandas.Categorical.from_codes",
"pandas.Series",
"numpy.isscalar"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"1.3",
"0.19",
"1.1",
"1.5",
"0.24",
"0.20",
"1.0",
"0.25",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
prasannasPitch/Capstone_SDCND | [
"ecf2b9aaf5e9a14a12b88ea77084045f459f6695"
] | [
"ros/src/tl_detector/light_classification/label_map_util.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.gfile.GFile"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
hadware/pyannote-audio | [
"dff09d364a019dff78cafb5d52c8490ab3d937df"
] | [
"pyannote/audio/pipelines/speaker_verification.py"
] | [
"# MIT License\n#\n# Copyright (c) 2021 CNRS\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, modify, ... | [
[
"torch.ones",
"numpy.isnan",
"scipy.spatial.distance.cdist",
"torch.from_numpy",
"numpy.max",
"torch.no_grad",
"torch.rand",
"numpy.array",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"0.13",
"1.6",
"0.14",
"1.10",
"0.15",
"1.4",
"0.16",
"1.9",
"0.19",
"1.5",
"0.18",
"1.2",
"1.7",
"0.12",
"1.0",
"0.17",
"1.3",
"1.8"
... |
doroK/mushroom | [
"47e5b1d09b65da585c1b19a6cc7f0366849d7863"
] | [
"mushroom/features/tensors/gaussian_tensor.py"
] | [
"import torch\nimport torch.nn as nn\nfrom mushroom.utils.features import uniform_grid\n\n\nclass PyTorchGaussianRBF(nn.Module):\n \"\"\"\n Pytorch module to implement a gaussian radial basis function.\n\n \"\"\"\n def __init__(self, mu, scale, dim):\n self._mu = torch.from_numpy(mu)\n sel... | [
[
"torch.sum",
"torch.index_select",
"torch.from_numpy"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
gdasoulas/PGSO | [
"0fa02c626c9c9cf7e046f11ccbfd3bd6dc329a8d"
] | [
"train_sbms.py"
] | [
"from __future__ import division\r\nfrom __future__ import print_function\r\n# import os\r\n# os.environ['KMP_DUPLICATE_LIB_OK']='True'\r\n\r\nimport time\r\nimport argparse\r\nimport numpy as np\r\nimport os\r\nimport os.path as osp\r\nfrom tqdm import trange\r\nimport torch\r\nimport torch.nn.functional as F\r\ni... | [
[
"torch.optim.Adam",
"torch.nn.CrossEntropyLoss",
"torch.cuda.manual_seed",
"numpy.random.seed",
"torch.manual_seed",
"torch.cuda.is_available",
"torch.device",
"torch.optim.lr_scheduler.StepLR"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
sourceperl/pyRRD_Redis | [
"3a3b955c1bf1ffe91a250d50763fc94062b98c8e"
] | [
"flask_rrd_web_service/app.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\nfrom flask import Flask, make_response, request, render_template, jsonify\nfrom pyRRD_Redis import RRD_redis\nimport datetime\nimport csv\nfrom io import BytesIO, StringIO\nfrom matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas\nfrom matplotli... | [
[
"matplotlib.backends.backend_agg.FigureCanvasAgg",
"matplotlib.figure.Figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
michaelbynum/galini | [
"e9d15ab7ebff49f89f643643d3d67fa573290290"
] | [
"galini/pyomo/postprocess.py"
] | [
"# Copyright 2019 Francesco Ceccon\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 ag... | [
[
"numpy.sign",
"numpy.abs"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
sunpar/perspective | [
"acd55a49c527f7c46eda9a60cd631fdba8b9693a"
] | [
"python/perspective/perspective/tests/table/test_table_pandas.py"
] | [
"# *****************************************************************************\n#\n# Copyright (c) 2019, the Perspective Authors.\n#\n# This file is part of the Perspective library, distributed under the terms of\n# the Apache License 2.0. The full license can be found in the LICENSE file.\n#\nimport six\nfrom i... | [
[
"pandas.read_csv",
"pandas.Series",
"pandas.MultiIndex.from_tuples",
"pandas.DataFrame",
"numpy.random.randn",
"pandas.Period",
"numpy.array",
"pandas.Timestamp",
"pandas.pivot_table"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
annanguyen19/genetic-drawing | [
"13b3a31e420744e62b4917e2134de6388feb5c60"
] | [
"genetic_drawing.py"
] | [
"import cv2\nimport numpy as np\nimport time\nimport matplotlib.pyplot as plt\nimport DNA\nfrom IPython.display import clear_output\n\nclass GeneticDrawing:\n def __init__(self, img_path, seed=0, brushesRange=[[0.1, 0.3], [0.3, 0.7]]):\n self.original_img = cv2.imread(img_path)\n self.img_grey = cv... | [
[
"numpy.power",
"numpy.max",
"numpy.copy",
"numpy.float32",
"matplotlib.pyplot.show",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
dbandrews/depthai-experiments | [
"2803061aba241e1fbbcee6026b34d5651fa4637f"
] | [
"gen2-tf-image-classification/main.py"
] | [
"#!/usr/bin/env python3\nimport argparse\nfrom pathlib import Path\nimport sys\nimport cv2\nimport depthai as dai\nimport numpy as np\n\nparser = argparse.ArgumentParser()\nparser.add_argument('-nd', '--no-debug', action=\"store_true\", help=\"Prevent debug output\")\nparser.add_argument('-cam', '--camera', action=... | [
[
"numpy.ascontiguousarray",
"numpy.max",
"numpy.array",
"numpy.argmax"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
aipiano/NOPY | [
"acc17a61adef72d8414c63dcfff7c67002c17e2f"
] | [
"examples/PowellFunction.py"
] | [
"import nopy\nimport numpy as np\nimport math\n\n\ndef f1(x1, x2):\n return x1 + 10*x2\n\n\ndef f2(x3, x4):\n return math.sqrt(5) * (x3 - x4)\n\n\ndef f3(x2, x3):\n y = x2 - 2*x3\n return y[0] * y[0]\n\n\ndef f4(x1, x4):\n y = x1 - x4\n return math.sqrt(10) * y[0] * y[0]\n\n\ndef main():\n x1 =... | [
[
"numpy.array"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
pete-sk/jina | [
"e09ec8204e2e5a42e744898fb0cd74251e989146"
] | [
"tests/distributed/test_local_flow_use_remote_executor/test_integration.py"
] | [
"import os\n\nimport pytest\nimport numpy as np\n\nfrom jina import Flow, Document\nfrom jina.parsers import set_pod_parser\n\ncur_dir = os.path.dirname(os.path.abspath(__file__))\nsingle_compose_yml = os.path.join(cur_dir, 'docker-compose.yml')\nshards_compose_yml = os.path.join(cur_dir, 'docker-compose-shards.yml... | [
[
"numpy.random.random"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
huashen218/pytorch-ialgebra | [
"f498fb2c91c5a48204c66ad5e6dc118cbec69641"
] | [
"ialgebra/interpreters/smoothgrad.py"
] | [
"import numpy as np\nimport cv2\nimport torch\nimport torch.nn as nn\nfrom torch.autograd import Variable\nfrom torch.nn import functional as F\nfrom tqdm import tqdm\n\nfrom ialgebra.utils.utils_interpreter import resize_postfn, generate_map\nfrom ialgebra.utils.utils_data import preprocess_fn\nfrom ialgebra.inter... | [
[
"numpy.min",
"torch.sum",
"torch.from_numpy",
"numpy.max",
"numpy.random.normal",
"numpy.zeros_like"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
MohMehKo/neural_tranfer | [
"04d250c89739cc6757cdaf393ac64fe04f2610a2"
] | [
"neural_tranfer.py"
] | [
"import os\nimport sys\nimport scipy.io\nimport scipy.misc\nimport matplotlib.pyplot as plt\nfrom matplotlib.pyplot import imshow\nfrom PIL import Image\nfrom nst_utils import *\nimport numpy as np\nimport tensorflow as tf\n\n\nmodel = load_vgg_model(\"pretrained-model/imagenet-vgg-verydeep-19.mat\")\nprint(model)\... | [
[
"matplotlib.pyplot.imshow",
"tensorflow.transpose",
"tensorflow.InteractiveSession",
"tensorflow.reshape",
"tensorflow.subtract",
"tensorflow.global_variables_initializer",
"tensorflow.reset_default_graph",
"tensorflow.train.AdamOptimizer"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
psi-rking/optking | [
"6f113db58e733b6a56929a2b890f9dae0092995c"
] | [
"optking/stepAlgorithms.py"
] | [
"# Functions for step algorithms: Newton-Raphson, Rational Function Optimization,\n# Steepest Descent.\n# from .OptParams import Params # this will not cause changes in trust to persist\nimport logging\nfrom math import fabs, sqrt\n\nimport numpy as np\n\nfrom . import optimize\nfrom . import optparams as op\nfrom ... | [
[
"numpy.diag",
"numpy.dot",
"numpy.linalg.solve",
"numpy.linalg.norm",
"numpy.argmax",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Coleridge-Initiative/RichContextMetadata | [
"2b038e69a6cc234dd5354e6e056b5b46fec2f3ba"
] | [
"metadata/BBK_corpus.0_1_5/title_match_calibration.py"
] | [
"import re\nimport sys\nimport codecs\nimport json\nfrom difflib import SequenceMatcher\nfrom pprint import pprint\nfrom fuzzywuzzy import fuzz\nfrom datasketch import MinHashLSHEnsemble, MinHash\nfrom sklearn import metrics\nfrom pathlib import Path\n\nKNOWN = 1\nUNKNOWN = 0\nDEBUG = False\nCALIBRATE_LSH = False\n... | [
[
"sklearn.metrics.precision_score",
"sklearn.metrics.confusion_matrix",
"sklearn.metrics.f1_score",
"sklearn.metrics.recall_score",
"sklearn.metrics.accuracy_score"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
gvijayakumar/PredictSales | [
"aadaa2056842bb047eef6f8f077ca18596c1fc81"
] | [
"02_TensorFlow_Way/08_Evaluating_Models/08_evaluating_models.py"
] | [
"# Evaluating models in TensorFlow\r\n#\r\n# This code will implement two models. The first\r\n# is a simple regression model, we will show how to\r\n# call the loss function, MSE during training, and\r\n# output it after for test and training sets.\r\n#\r\n# The second model will be a simple classification\r\n... | [
[
"matplotlib.pyplot.legend",
"numpy.linspace",
"tensorflow.equal",
"tensorflow.cast",
"tensorflow.nn.sigmoid_cross_entropy_with_logits",
"numpy.round",
"tensorflow.add",
"tensorflow.Session",
"tensorflow.square",
"numpy.repeat",
"tensorflow.python.framework.ops.reset_def... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
vibhorkrishna/Python-Scripts | [
"770ee47be2ae09f21ec1e49582bae50d4aa387fe"
] | [
"Missing Person Poster/poster.py"
] | [
"# load desired font for the poster\nimport matplotlib.font_manager as fm\n\ndef findFont(name='Arial'):\n possiblefonts = fm.findSystemFonts()\n return [f for f in possiblefonts if name in f]\nprop = fm.FontProperties(fname='Arial.ttf')\n\n# set the font to that font\nimport matplotlib\nmatplotlib.rcParams['... | [
[
"matplotlib.font_manager.FontProperties",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.draw",
"matplotlib.font_manager.findSystemFonts",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.subplots_adjust",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
lsrock1/sim2real | [
"23de40eda08623a68251ac5dcf324de1c4e23845"
] | [
"mmdet/datasets/airplane.py"
] | [
"import os.path as osp\nimport xml.etree.ElementTree as ET\n\nimport mmcv\nfrom glob import glob\nimport numpy as np\nfrom PIL import Image\nfrom mmdet.core import eval_map, eval_recalls\n\nfrom .builder import DATASETS\nfrom .custom import CustomDataset\n\n\n@DATASETS.register_module()\nclass AIRPLANEDataset(Custo... | [
[
"numpy.array",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
micanica/ross | [
"7d827093b20088ec3409786da8403edb8e63eaa9"
] | [
"ross/element.py"
] | [
"from abc import ABC, abstractmethod\nfrom collections import namedtuple\n\nimport pandas as pd\nimport toml\n\n\nclass Element(ABC):\n \"\"\"Element class.\n This class is a general class to be called for other files which\n create specific elements for the user\n \"\"\"\n\n def __init__(self, n):\n... | [
[
"pandas.Series"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
atharvjoshi/Unit | [
"ed383c9393e106818b54d1b50c2aa8a89bca3494"
] | [
"tf_pose_estimation/aruco-tracker.py"
] | [
"import numpy as np\nimport cv2\nimport cv2.aruco as aruco\nimport glob\n\ncap = cv2.VideoCapture(0)\n\n# termination criteria\ncriteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.001)\n\n# prepare object points, like (0,0,0), (1,0,0), (2,0,0) ....,(6,5,0)\nobjp = np.zeros((6*7,3), np.float32)\nob... | [
[
"numpy.all",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
WebSpellChecker/tensor2tensor | [
"ea52c76ab411287d4f4867bfdc9e4e55390d58dc"
] | [
"tensor2tensor/trax/rlax/simulated_env_problem.py"
] | [
"# coding=utf-8\n# Copyright 2019 The Tensor2Tensor 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 requir... | [
[
"numpy.array",
"numpy.zeros",
"numpy.roll"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Leon-Francis/DefenceForNamedEntityAttack | [
"59f95171453becc303801aa64788817edfeb6b5c"
] | [
"baseline/baseline_data.py"
] | [
"from transformers import BertTokenizer\nimport spacy\nimport torch\nfrom torch.utils.data import Dataset\nfrom baseline_tools import logging, load_pkl_obj, save_pkl_obj\nfrom baseline_config import Baseline_Config, IMDBConfig, SST2Config, AGNEWSConfig\nimport random\nfrom random import choice\nimport json\nimport ... | [
[
"numpy.asarray",
"numpy.random.normal",
"numpy.ndarray",
"torch.tensor"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
vemonet/CKG | [
"c9e15c4c8ec8d81ca05c67e9a6f346ca385d8fbe"
] | [
"src/analytics_core/viz/viz.py"
] | [
"import os\nimport numpy as np\nimport pandas as pd\nimport ast\nfrom collections import defaultdict\nimport dash_core_components as dcc\nimport dash_html_components as html\nimport matplotlib.pyplot as plt\nimport plotly\nimport plotly.tools as tls\nimport plotly.graph_objs as go\nimport plotly.figure_factory as F... | [
[
"numpy.log2",
"numpy.abs",
"numpy.unique",
"numpy.min",
"pandas.DataFrame",
"matplotlib.pyplot.gcf",
"numpy.max",
"scipy.spatial.distance.pdist",
"scipy.spatial.distance.squareform"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [
"0.13",
"1.6",
"0.14",
"1.10",
"0... |
belindal/exploration | [
"1181128e77f669a6808d4ae8bc77f00d5e234291"
] | [
"models/utils/debug_utils.py"
] | [
"import matplotlib.pyplot as plt\nimport matplotlib as mpl\nimport numpy as np\n\n\ndef plot_mask(M, file_name, vmin=0, vmax=1):\n fig, ax = plt.subplots()\n cmap = mpl.cm.get_cmap()\n cmap.set_bad(color=\"white\")\n im = ax.imshow(M, interpolation=\"nearest\", cmap=cmap, vmin=vmin, vmax=vmax)\n fig.... | [
[
"matplotlib.pyplot.subplots",
"matplotlib.cm.get_cmap"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
stetelepta/setdetection | [
"145b2da27822a76d54c31b6f43fa259581f3a4fe"
] | [
"src/set_cardgame/findsets.py"
] | [
"import itertools\nimport numpy as np\n\n\ndef get_triplets(collection):\n \"\"\"\n return all (n choose k) triplets in collection (n:nr cards in collection, k:three because triplets)\n\n collection: list of card tuples\n \"\"\"\n\n return itertools.combinations(collection, 3)\n\n\ndef sum_attributes... | [
[
"numpy.all"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
fadeawaygod/TensorflowPractice | [
"358cdabee4386fc010a19dfdb57f6c66cdd06276"
] | [
"Tensorflow_Keras_pratice/CH6_MNIST.py"
] | [
"import matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\n\nfrom keras.datasets import mnist\nfrom keras.utils import np_utils\n\nnp.random.seed(10)\n\n(train_data, train_label), (test_data, test_label) = mnist.load_data()\n\ndef plot_image(image):\n fig = plt.gcf()\n fig.set_size_inches(2, 2... | [
[
"matplotlib.pyplot.imshow",
"matplotlib.pyplot.show",
"numpy.random.seed",
"matplotlib.pyplot.gcf"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
heczis/pybeam | [
"b31016697f70addaa7e45cd2833d0b3bc51d2cab"
] | [
"examples/ex01.py"
] | [
"\"\"\"\nExample usage of functions provided by beam module.\n\nSimply supported beam of total length 1.2m with rectangular\ncross-section.\n\nThe loads are:\n* Constant continuous load q = 50kN/m between coordinates\n a = 0.5m and a+b = 0.8m.\n* Two point loads F = -20kN (i.e. in the upwards direction)\n at a = ... | [
[
"matplotlib.pyplot.legend",
"numpy.linspace",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.grid",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
gardenia22/pytorch | [
"33d8769c285b51922c378d11a90a442a28e06762"
] | [
"torch/fx/experimental/fx2trt/converters/acc_ops_converters.py"
] | [
"import math\nimport operator\nfrom typing import Any, Tuple, Sequence, Union, List, Optional\n\n\nimport numpy as np\nimport tensorrt as trt\nimport torch\nimport torch.fx.experimental.fx_acc.acc_ops as acc_ops\nimport torch.fx.experimental.fx_acc.acc_utils as acc_utils\nfrom torch.fx.experimental.fx2trt.fx2trt im... | [
[
"torch.fx.experimental.fx2trt.fx2trt.get_dynamic_dims",
"torch.Size",
"torch.fx.experimental.fx_acc.acc_utils.get_field_from_acc_out_ty",
"numpy.ones_like",
"torch.ge",
"torch.Tensor",
"torch.zeros",
"numpy.ascontiguousarray",
"torch.fx.experimental.fx2trt.fx2trt.tensorrt_conve... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
MILVLG/mt-captioning | [
"b418d4235fea0b95d5a74181a37afb231783f842"
] | [
"models/umv.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import *\nimport utils.utils as utils\n\nimport copy\nimport math\nimport numpy as np\n\nfrom .beam_search impo... | [
[
"torch.nn.functional.softmax",
"torch.max",
"torch.zeros",
"torch.nn.Embedding",
"torch.multinomial",
"torch.FloatTensor",
"torch.nn.Dropout",
"torch.ones",
"torch.from_numpy",
"numpy.load",
"torch.div",
"torch.LongTensor",
"torch.nn.BatchNorm1d",
"torch.exp... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
joaocneves/dropout_ensemble | [
"3b8052fdc362efc9ef220933e7d454439a18540f"
] | [
"models/vgg.py"
] | [
"'''VGG11/13/16/19 in Pytorch.'''\nimport torch\nimport torch.nn as nn\n\n\ncfg = {\n 'VGG11': [64, 'M', 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512, 'M'],\n 'VGG13': [64, 64, 'M', 128, 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512, 'M'],\n 'VGG16': [64, 64, 'M', 128, 128, 'M', 256, 256, 256, 'M', ... | [
[
"torch.nn.Sequential",
"torch.randn",
"torch.nn.Conv2d",
"torch.nn.Linear",
"torch.nn.AvgPool2d",
"torch.nn.MaxPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ClovisChen/LearningCNN | [
"cd9102a3d71f602024558d818039f5b759c92fa5",
"cd9102a3d71f602024558d818039f5b759c92fa5"
] | [
"utils/utils.py",
"test/testGravityFuse.py"
] | [
"from __future__ import division\nimport matplotlib.pyplot as plt\nimport numpy as np\n\n\ndef gray2rgb(im, cmap='gray'):\n cmap = plt.get_cmap(cmap)\n rgba_img = cmap(im.astype(np.float32))\n rgb_img = np.delete(rgba_img, 3, 2)\n return rgb_img\n\n\ndef normalize_depth_for_display(depth, pc=95, crop_pe... | [
[
"tensorflow.concat",
"tensorflow.zeros",
"tensorflow.stack",
"tensorflow.cast",
"matplotlib.pyplot.get_cmap",
"tensorflow.linspace",
"tensorflow.add_n",
"numpy.clip",
"tensorflow.floor",
"tensorflow.squeeze",
"tensorflow.gather",
"tensorflow.to_float",
"tensorfl... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"1.12",
"1.4",
"1.5",
"1.7",
"0.12",
"1.0",
"1.2"
]
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
... |
allenai/ruletaker | [
"ccb445d637a2b6ab301d57f67490929845d68866"
] | [
"theory_generator.py"
] | [
"import argparse\nimport common\nfrom common import Example, Fact, Rule, Theory, TheoryAssertionInstance\nimport json\n\nimport nltk\nfrom nltk import Nonterminal, PCFG\nfrom numpy.random import choice\nimport random\n\nimport problog\nfrom problog.program import PrologString\nfrom problog.core import ProbLog\nfrom... | [
[
"numpy.random.choice"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
ibailey-SCOR/OasisLMF | [
"966b4de4e1e64851970f4291c5bdfe7edc20cb7a"
] | [
"oasislmf/api/client.py"
] | [
"__all__ = [\n 'APIClient',\n 'ApiEndpoint',\n 'API_analyses',\n 'API_models',\n 'API_portfolios',\n 'FileEndpoint',\n]\n\nimport io\nimport json\nimport logging\nimport os\nimport sys\nimport tarfile\nimport time\n\nimport pandas as pd\n\nfrom requests_toolbelt import MultipartEncoder\nfrom reque... | [
[
"pandas.read_csv"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
calico/stimulated_emission_imaging | [
"dca60d2188cfb79527537496c5473ecf80c4bf22"
] | [
"figure_generation/figure_5_crimson.py"
] | [
"import os\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\nfrom matplotlib.ticker import FuncFormatter\r\nimport matplotlib.patches as patches\r\nimport np_tif\r\nfrom stack_registration import bucket\r\n\r\ndef main():\r\n assert os.path.isdir('./../images')\r\n if not os.path.isdir('./../images/... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.imshow",
"numpy.linspace",
"matplotlib.pyplot.axes",
"numpy.max",
"numpy.fft.fftn",
"numpy.sin",
"numpy.fft.ifftn",
"matplotlib.pyplot.axis",
"numpy.zeros",
"matplotlib.pyplot.figure",
"matplotlib.patches.Rectangle",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
mpg-age-bioinformatics/flaski | [
"f56e00dd80d8706ecb8593ba6585a97eed881896"
] | [
"flaski/apps/main/david.py"
] | [
"import pandas as pd\nimport sys\nfrom suds.client import Client as sudsclient\nimport ssl\nimport os\nif \"PYFLASKI\" in os.environ:\n from pyflaski.routines import fuzzy_search\nelse:\n from flaski.routines import fuzzy_search\n\ndavid_categories = [\n 'GOTERM_BP_FAT', 'GOTERM_CC_FAT', 'GOTERM_MF_FAT', 'KEGG_P... | [
[
"pandas.read_csv",
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
PPjaisri/Senior_project | [
"09addef7ba0badfe384178fac5631cd815b3d8f6"
] | [
"News_fetcher/sure_thread.py"
] | [
"import os\nimport re\nimport csv\nimport time\nimport logging\nimport requests\nimport pandas as pd\nfrom bs4 import BeautifulSoup\n\nclass sure_thread(object):\n path = os.getcwd()\n path = os.path.dirname(path)\n path = os.path.dirname(path)\n save_path = os.path.join(path, 'result\\\\Sure\\\\sure_th... | [
[
"pandas.read_csv"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.1",
"1.5",
"1.2",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
paulmtree/Lung-Segmentation-Project | [
"2cffe09ce6a4818200d88b9e4e87155feb594366"
] | [
"Edge Detection.py"
] | [
"from PIL import Image, ImageFilter\nimport numpy as np\nimport glob\nfrom numpy import array\nimport matplotlib.pyplot as plt\nfrom skimage import morphology\nimport scipy.ndimage\n\ndef sample_stack(stack, rows=2, cols=2, start_with=0, show_every=1, display1 = True):\n if (display1):\n new_list = []\n ... | [
[
"matplotlib.pyplot.subplots",
"numpy.save",
"numpy.stack",
"numpy.ones",
"numpy.load",
"numpy.array",
"matplotlib.pyplot.show"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
RTIInternational/ckanext-searchterms | [
"d3b9ec65d86ef6a26a42f1bd9efdeed00be47229"
] | [
"ckanext/searchterms/tests/mockplugin.py"
] | [
"import ckan.plugins as p\nfrom ckanext.searchterms.interfaces import ISearchterms\nimport pandas as pd\n\n\nclass SearchtermsMockPlugin(p.SingletonPlugin):\n \"\"\"\n This plugin is\n - made available as `searchterms_mock_plugin` by the entrypoints list in setup.py\n - included in the plugin list in te... | [
[
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
maberyick/TumorSegmentationHE_UNET | [
"726728391f21dea73209b34ae52064db5e7d8db6"
] | [
"uNettest.py"
] | [
"\n# coding: utf-8\n\n# In[1]:\n\n\nimport os\nos.environ[\"CUDA_VISIBLE_DEVICES\"] = '2' \nfrom __future__ import division, print_function\nget_ipython().run_line_magic('matplotlib', 'inline')\nimport matplotlib.pyplot as plt\nimport matplotlib\nimport numpy as np\n\nfrom tf_unet import image_util\nfrom tf_unet im... | [
[
"numpy.squeeze",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
aisti5/pyGPGO | [
"1c718d7f2bdb95d407b27412b25471c762355832",
"1c718d7f2bdb95d407b27412b25471c762355832"
] | [
"examples/exampleint.py",
"pyGPGO/covfunc.py"
] | [
"#######################################\n# pyGPGO examples\n# exampleint: tests and visualizes an integrated acquisition function.\n#######################################\n\nimport os\n\nimport matplotlib.pyplot as plt\n\nimport numpy as np\nfrom pyGPGO.GPGO import GPGO\nfrom pyGPGO.surrogates.GaussianProcessMCMC... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.axvline",
"numpy.random.seed",
"numpy.linspace",
"numpy.sin",
"matplotlib.pyplot.plot",
"numpy.atleast_1d",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
],
[
"numpy.dot",
"n... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"0.13",
"1.6",
"0.14",
"1.10",
"0.15",
"1.4",
"0.16",
"1.9",
"0.19",
"1.5",
... |
juestr/aoc-2021 | [
"11e31f9dafd234cf4617ff596546cd7a17189f79"
] | [
"aoc20.py"
] | [
"#!/usr/bin/env python3\n\nimport sys\nimport numpy as np\nfrom scipy import ndimage\n\nwith open(sys.argv[1] if len(sys.argv) >= 2 else 'aoc20_input.txt') as f:\n input = f.read().splitlines()\n\n\ndef enhance(img, n):\n kernel = 1 << np.arange(9).reshape(3, 3)\n padded = np.pad(img, n)\n for _ in rang... | [
[
"numpy.arange",
"numpy.array",
"numpy.pad",
"scipy.ndimage.convolve"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.7",
"1.0",
"0.10",
"1.2",
"0.14",
"0.19",
"1.5",
"0.12",
"0.17",
"0.13",
"1.6",
"1.4",
"1.9",
"1.3",
"1.10",
"0.15",
"0.18",
"0.16"... |
lidiwen8/text-classification-cnn-rnn | [
"52c6a2ffd1abef942d43f7fa92d8c00a2a681567"
] | [
"cnn_model.py"
] | [
"# coding: utf-8\n\n\nimport tensorflow.compat.v1 as tf\nimport tensorflow as tf2\ntf.disable_v2_behavior()\n\nclass TCNNConfig(object):\n \"\"\"CNN配置参数\"\"\"\n\n embedding_dim = 64 # 词向量维度\n seq_length = 600 # 序列长度\n num_classes = 10 # 类别数\n num_filters = 256 # 卷积核数目\n kernel_size = 5 # 卷积核尺... | [
[
"tensorflow.compat.v1.nn.softmax_cross_entropy_with_logits",
"tensorflow.compat.v1.device",
"tensorflow.compat.v1.nn.softmax",
"tensorflow.compat.v1.train.AdamOptimizer",
"tensorflow.compat.v1.disable_v2_behavior",
"tensorflow.compat.v1.reduce_mean",
"tensorflow.compat.v1.argmax",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
XDong18/AdelaiDet | [
"5cd38f24c2927975df103ee0dede3081a3d4f239"
] | [
"tools/compute_flops.py"
] | [
"import torch\nfrom detectron2.engine import default_argument_parser, default_setup\n\nfrom adet.config import get_cfg\nfrom adet.utils.measures import measure_model\n\nfrom train_net import Trainer\n\n\ndef setup(args):\n \"\"\"\n Create configs and perform basic setups.\n \"\"\"\n cfg = get_cfg()\n ... | [
[
"torch.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
adagj/ECS_SOconvection | [
"d1bb935b37380f11e021a463c6a807d7527220a6"
] | [
"FIGURE2/figure2.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nYEAR: 2019 - 2021\n\n@author: ADA GJERMUNDSEN\n\nThis script will reproduce FIGURE 2 in Gjermundsen et. al 2021\nThe data used for plotting is generated by scripts \ncontained in the same folder as this (FIGURE2) \n\"\"\"\nimport xarray as xr\nimport warning... | [
[
"numpy.arange",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.subplots_adjust",
"numpy.array",
"matplotlib.pyplot.figure"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Algorithmic-Alignment-Lab/sco-py | [
"74409d5bc199309c2837ebb5b4287918d53da200"
] | [
"sco_py/sco_osqp/osqp_utils.py"
] | [
"from typing import List\n\nimport numpy as np\nimport osqp\nimport scipy\n\nfrom sco_py.sco_osqp.variable import Variable\n\n\nDEFAULT_MAX_ITER = int(1e05)\nDEFAULT_SIGMA = 5e-10\nDEFAULT_RHO = 1e-01\nDEFAULT_ADAPTIVE_RHO = False\nDEFAULT_EPS_ABS = 1e-06\nDEFAULT_EPS_REL = 1e-09\n\nclass OSQPVar(object):\n \"\"... | [
[
"numpy.isnan",
"scipy.sparse.csc_matrix",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [
"1.7",
"1.0",
"0.10",
"1.2",
"0.14",
"0.19",
"1.5",
"0.12",
"0.17",
"0.13",
"1.6",
"1.4",
"1.9",
"1.3",
"1.10",
"0.15",
"0.18",
"0.16"... |
crisdeodates/AI-OSSDC-VisionAI-Core | [
"17c3b480ef41add5bd58093a59ccea41035791e0"
] | [
"video_processing_ssd_pytorch.py"
] | [
"import traceback\nimport cv2\nimport numpy as np\nimport sys\nimport argparse\nfrom datetime import datetime\nimport os\n\n# SSD algorithm in Python\n# https://github.com/amdegroot/ssd.pytorch\n\n# # Install steps:\n\n# Status: not working\n\n\npathToProject='../ssd.pytorch/'\nsys.path.insert(0, pathToProject)\nos... | [
[
"torch.set_default_tensor_type",
"torch.Tensor",
"torch.from_numpy",
"torch.cuda.is_available"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
dan-ballard/lenstronomy | [
"bf33ba8663d24bbcffbfced80095a011c498082a"
] | [
"lenstronomy/LensModel/Profiles/spp.py"
] | [
"__author__ = 'sibirrer'\n\n\nimport numpy as np\nimport scipy.special as special\nfrom lenstronomy.LensModel.Profiles.base_profile import LensProfileBase\n\n__all__ = ['SPP']\n\n\nclass SPP(LensProfileBase):\n \"\"\"\n class for circular power-law mass distribution\n \"\"\"\n param_names = ['theta_E', ... | [
[
"numpy.empty_like",
"scipy.special.gamma",
"numpy.maximum",
"numpy.sqrt"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
semueller/umap | [
"1fd71e756a3102102accb0f32a29004ad0b51bc2"
] | [
"examples/iris/iris.py"
] | [
"from bokeh.plotting import figure, output_file, show\nfrom bokeh.models import CategoricalColorMapper, ColumnDataSource\nfrom bokeh.palettes import Category10\n\nimport umap\nfrom sklearn.datasets import load_iris\n\niris = load_iris()\nembedding = umap.UMAP(\n n_neighbors=50, # critical!\n ... | [
[
"sklearn.datasets.load_iris"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
Screeen/seld-net | [
"4312dc363b2e12b25406ce5a4c40696b7abc9271"
] | [
"quaternion/qconv.py"
] | [
"#!/usr/bin/env python\r\n# -*- coding: utf-8 -*-\r\n\r\n# Contributors : Titouan Parcollet\r\n# Initial Authors: Chiheb Trabelsi\r\n\r\nfrom keras import backend as K\r\nfrom tensorflow.keras import initializers, activations, constraints, regularizers\r\n# from keras.layers import Lambda, Layer, InputSpec, Convolu... | [
[
"tensorflow.keras.constraints.get",
"tensorflow.keras.activations.serialize",
"tensorflow.keras.constraints.serialize",
"tensorflow.keras.regularizers.get",
"tensorflow.keras.initializers.serialize",
"tensorflow.keras.regularizers.serialize",
"numpy.random.randint",
"tensorflow.pyt... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10",
"2.7",
"2.2",
"2.3",
"2.4",
"2.5",
"2.6"
]
}
] |
jonasgrebe/pt-femb-face-embeddings | [
"8f055a59293d75ad60d4b0a92f86ee6f3f07e950"
] | [
"femb/backbones/networks/iresnet.py"
] | [
"# Taken from: https://github.com/IrvingMeng/MagFace/blob/main/models/iresnet.py\n\nimport torch\nfrom torch import nn\n\n__all__ = ['iresnet18', 'iresnet34', 'iresnet50', 'iresnet100']\n\n\ndef conv3x3(in_planes, out_planes, stride=1, groups=1, dilation=1):\n \"\"\"3x3 convolution with padding\"\"\"\n return... | [
[
"torch.nn.BatchNorm1d",
"torch.nn.Sequential",
"torch.nn.Dropout2d",
"torch.nn.init.constant_",
"torch.nn.PReLU",
"torch.nn.Conv2d",
"torch.nn.Linear",
"torch.nn.AdaptiveAvgPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.init.kaiming_normal_"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
gronerl/stencil_benchmarks | [
"876725124f8ac253c009abad5ec71661d3e169d7"
] | [
"stencil_benchmarks/scripts/sbench_analyze.py"
] | [
"# Stencil Benchmarks\n#\n# Copyright (c) 2017-2020, ETH Zurich and MeteoSwiss\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n#\n# 1. Redistributions of source code must retain the above... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.gca",
"pandas.read_csv",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.gcf",
"matplotlib.pyplot.subplots_adjust",
"matplotlib.pyplot.style.use",
"pandas.concat",
"matplotlib.pyplot.title",
"... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
HarmlessHarm/Heuristieken | [
"01858f786044a7861c3ab7433d1aff28298347f1"
] | [
"modules/AStar.py"
] | [
"from Objects import *\nimport numpy as np\nimport sys\n\nclass AStar(object):\n\n \"\"\"\n Initialize the A* algorithm with a board and net for which to plan a path, \n optional is a bias parameter (either 'vertical' or 'lateral')\n\n Args:\n board (:obj: Board): The board on which to plan a pat... | [
[
"numpy.zeros",
"numpy.full"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
tauriel27/ZEN | [
"2e32c58d711f3c90663df02af6769435ed958f2b"
] | [
"ZEN/modeling.py"
] | [
"# coding: utf-8\n# Copyright 2019 Sinovation Ventures AI 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# Unless... | [
[
"torch.nn.Softmax",
"torch.zeros",
"torch.load",
"torch.nn.Embedding",
"torch.nn.Dropout",
"torch.nn.CrossEntropyLoss",
"torch.ones",
"torch.sqrt",
"torch.from_numpy",
"torch.arange",
"tensorflow.train.list_variables",
"torch.ones_like",
"torch.sigmoid",
"to... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": [
"1.10"
]
}
] |
cmip6moap/project02 | [
"80c2583f920bf72a304d4949c31f5ba2f5ad6022",
"80c2583f920bf72a304d4949c31f5ba2f5ad6022"
] | [
"code/Plot_TRB_indices_all_models_sea_cycle_good_models.py",
"code/Plot_TRB_indices_all_models_sea_cycle.py"
] | [
"#Michael Baidu CMIP6 Hackathon June 2021\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib as mp1\nfrom netCDF4 import Dataset\n#------------------------------------------\n\n#-----------------------------------------------\nimport os\n\n# New package for this week\nimport cartopy.crs as cc... | [
[
"numpy.arange",
"matplotlib.pyplot.plot",
"numpy.nanmean",
"matplotlib.pyplot.rcParams.update",
"matplotlib.pyplot.show",
"numpy.zeros",
"matplotlib.pyplot.figure"
],
[
"numpy.arange",
"matplotlib.pyplot.plot",
"numpy.nanmean",
"matplotlib.pyplot.rcParams.update",
... | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
},
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
johannesnicolaus/celseq2 | [
"0a0873d46aa1889d5389d3faa50ec01c465e85bd"
] | [
"celseq2/qc.py"
] | [
"#!/usr/bin/env python3\nimport argparse\nimport numpy as np\nimport pandas as pd\nfrom plotly import tools\nimport plotly.graph_objs as go\nfrom plotly.offline import plot\n\nfrom celseq2.helper import print_logger, base_name, is_nonempty_file\n\n\ndef plotly_scatter(x, y, mask_by=None, hover_text=None,\n ... | [
[
"pandas.read_csv",
"pandas.Series"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"2.0",
"1.4",
"1.3",
"1.1",
"1.5",
"1.2"
],
"scipy": [],
"tensorflow": []
}
] |
gvvynplaine/PaddleOCR | [
"ec903eb5a0aeed54067739e2e6c3dfa0cdc112c9"
] | [
"ppocr/data/rec/img_tools.py"
] | [
"#copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.\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.sqrt",
"numpy.clip",
"numpy.min",
"numpy.uint8",
"numpy.frombuffer",
"numpy.random.normal",
"numpy.max",
"numpy.append",
"numpy.float32",
"numpy.array",
"numpy.zeros"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
pvonglehn/la-gran-belleza-text-analysis | [
"f789a6932ff6e02fbe0c894efc5c06d88f542431"
] | [
"src/create_frequencies.py"
] | [
"import os\nimport pathlib\nimport spacy\nimport re\nimport pandas as pd\nimport matplotlib.pyplot as plt\nfrom gensim.models.phrases import Phrases, Phraser\n\nROOT_DIR = pathlib.Path(__file__).parent.parent\n\n\n# Set directories and create them if necessary\nplain_text_dir = pathlib.Path().joinpath(ROOT_DIR,\"da... | [
[
"pandas.Series"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
TITAN-PyCompat/ck-tensorflow | [
"6e42c2dc7a98ced05c2e74990b215407f06b542b"
] | [
"program/image-classification-tf-frozen-py/tf_classify.py"
] | [
"#!/usr/bin/env python3\n\n\nimport os\nimport numpy as np\nfrom PIL import Image\nimport tensorflow as tf\n\n\nmodel_path = os.environ['CK_ENV_TENSORFLOW_MODEL_TF_FROZEN_FILEPATH']\ninput_layer_name = os.environ['CK_ENV_TENSORFLOW_MODEL_INPUT_LAYER_NAME']\noutput_layer_name = os.environ['CK_ENV_TENSO... | [
[
"tensorflow.Graph",
"numpy.expand_dims",
"tensorflow.import_graph_def",
"tensorflow.gfile.GFile",
"tensorflow.ConfigProto",
"numpy.concatenate",
"tensorflow.Session",
"numpy.float32",
"tensorflow.GraphDef"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [],
"scipy": [],
"tensorflow": []
}
] |
jojowei-cooler/ad-a1 | [
"120a539d6513a4bcdaf0448cadfefc7855381fde"
] | [
"ad/main.py"
] | [
"# ==================================================================================\n# Copyright (c) 2020 HCL Technologies Limited.\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 Licens... | [
[
"pandas.DataFrame"
]
] | [
{
"matplotlib": [],
"numpy": [],
"pandas": [
"0.23",
"0.21",
"2.0",
"1.4",
"0.19",
"1.1",
"1.5",
"1.2",
"0.24",
"0.20",
"1.0",
"0.25",
"1.3"
],
"scipy": [],
"tensorflow": []
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.