repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
jandaa/KPConv-PyTorch
[ "ed66f74eb1c96cfdbdae6b993000974eef918f0f" ]
[ "plot_convergence.py" ]
[ "#\n#\n# 0=================================0\n# | Kernel Point Convolutions |\n# 0=================================0\n#\n#\n# ----------------------------------------------------------------------------------------------------------------------\n#\n# Callable script to test any model on an...
[ [ "numpy.min", "numpy.mean", "numpy.max", "numpy.empty", "torch.nn.Conv1d", "numpy.argmax", "matplotlib.pyplot.yscale", "numpy.vstack", "numpy.array", "numpy.delete", "numpy.savetxt", "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "numpy.loadtxt", ...
raikonenfnu/tensorflow
[ "99b0d28cffba6767dc10e7864265ddcc10f0007f" ]
[ "tensorflow/python/kernel_tests/collective_ops_test.py" ]
[ "# Copyright 2020 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 requi...
[ [ "tensorflow.python.ops.array_ops.identity", "tensorflow.python.eager.context.context", "tensorflow.python.distribute.test_util.set_logical_devices_to_at_least", "tensorflow.python.framework.ops.device", "tensorflow.python.ops.collective_ops.broadcast_recv_v2", "tensorflow.python.platform.t...
zmyqjdsj/DualRL-3
[ "eb47af30010b10920903950a706e4ca46801aca6" ]
[ "nmt/model.py" ]
[ "import tensorflow as tf\nimport opennmt as onmt\nfrom utils import constants\nfrom opennmt.layers.common import embedding_lookup\nfrom utils import optim\n\n\nclass NMT(object): #定义了NMT这个类\n \"\"\"A sequence-to-sequence model.\"\"\"#或许需要在此处进行改动\n\n def __init__(self, mode, params, src_vocab_size, tgt_vo...
[ [ "tensorflow.layers.Dense", "tensorflow.reshape", "tensorflow.cast", "tensorflow.reduce_mean", "tensorflow.trainable_variables", "tensorflow.shape", "tensorflow.contrib.layers.variance_scaling_initializer", "tensorflow.Variable", "tensorflow.train.Saver", "tensorflow.global_...
ronvard/ProjetoFisica-Ondas-Eletromagneticas
[ "4b418b053e8245efdfce1fb9a70bcae77e844879" ]
[ "src/Undulatory/compToFreq.py" ]
[ "from scipy.constants import c\r\nimport ClassOndaCarac as freq\r\nimport numpy as np\r\n\r\ndef analisaUnidade(unidade):\r\n valor = 1\r\n if unidade == \"nm\":\r\n valor = 10 ** -9\r\n elif unidade == \"um\":\r\n valor = 10 ** -6\r\n elif unidade == \"mm\":\r\n valor = 10 ** -3\r\...
[ [ "numpy.float32" ] ]
DimmestP/APAeval
[ "47ad5fdccc3764416289d840b09cb89a5774f5ad" ]
[ "summary_workflows/quantification/corr_with_gt.py" ]
[ "import pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom scipy.stats import pearsonr\nimport json\nimport argparse\n\nparser = argparse.ArgumentParser()\nparser.add_argument('bed', help='The BED file containing predictions merged with ground truth.')\nargs = parser.parse_args()\n\nfname = arg...
[ [ "pandas.read_csv", "scipy.stats.pearsonr" ] ]
kkontras/Sleep_net
[ "a6a83d4624989cc8a79238e491da06dc22d562b8" ]
[ "graphs/models/custom_layers/coattention.py" ]
[ "\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as fn\nimport torch.nn.utils.rnn as rnn\n\n\nclass CoattentionNet(nn.Module):\n \"\"\"\n Predicts an answer to a question about an image using the Hierarchical Question-Image Co-Attention\n for Visual Question Answering (Lu et al, 2017) pap...
[ [ "torch.stack", "torch.nn.Tanh", "torch.t", "torch.matmul", "torch.randn" ] ]
DarkstartsUp/simple-faster-rcnn-pytorch
[ "8106a63faad4a78cefc30655f3958d941e23d4e3" ]
[ "train.py" ]
[ "from __future__ import absolute_import\n# though cupy is not used but without this line, it raise errors...\nimport cupy as cp\nimport os\n\nimport ipdb\nimport matplotlib\nfrom tqdm import tqdm\n\nfrom utils.config import opt\nfrom data.dataset import Dataset, TestDataset, inverse_normalize\nfrom model import Fa...
[ [ "matplotlib.use", "torch.utils.data.DataLoader" ] ]
Team-Squad-Up/multigraph_transformer
[ "04aaf575a5242d44e08910a9583c623f14b61b62", "04aaf575a5242d44e08910a9583c623f14b61b62" ]
[ "dataloader/QuickdrawDataset4dict_fully_connected_stroke_attention_mask.py", "dataloader/QuickdrawDataset4dict_2nn.py" ]
[ "import numpy as np\nfrom PIL import Image\nimport torch\nimport torch.utils.data as data\nimport torchvision.transforms as transforms\nimport os\nimport time\n\n\n\n\ndef detect_ending_points(flag_bits, stroke_len):\n\n assert flag_bits.shape == (100, 1)\n ending_points_index_array = []\n # \n ending_p...
[ [ "numpy.ones", "numpy.arange", "numpy.zeros" ], [ "numpy.ones", "numpy.arange", "numpy.zeros" ] ]
htalebiyan/Dec2py
[ "8c4181eb92d6e52aef8cc804c485865516cee200" ]
[ "Archive/Dynamic_demand/disloc_utils.py" ]
[ "import sys\nimport pandas as pd\nimport numpy as np\nfrom scipy.stats import norm\nimport random\n\ndef census_pga_values(intersect_file, hazard_root, list_scenarios):\n print('Finding PGA values for each census tract')\n mean_pga_census_df = pd.DataFrame()\n intersect_data = pd.read_csv(intersect_file)\n...
[ [ "numpy.log", "pandas.DataFrame", "numpy.exp", "pandas.concat", "pandas.read_csv" ] ]
DanielRAcosta/genetic-algorithm-crew
[ "7d1162763228a7a9a8a28a51008dbadbd3936308" ]
[ "Programa/classSolucao.py" ]
[ "\"\"\"\nDefinição de Escala de Tripulação de Transporte Coletivo Utilizando Algoritmo Genético\nDaniel Rodrigues Acosta\nUniversidade Federal do Rio Grande do Sul\nJunho/2019\n\nClasse Solução\n\"\"\"\n\nimport variaveisGlobais as gl\nimport classServico as sv\n\nimport plotly.figure_factory as ff\nimport datetime...
[ [ "pandas.read_csv", "numpy.random.choice", "numpy.zeros" ] ]
atseng95/fourier_attribution_priors
[ "53f668e315621e4f64f9e11a403f2ea80529eb29" ]
[ "src/extract/make_shap_scores.py" ]
[ "import extract.compute_shap as compute_shap\nimport extract.data_loading as data_loading\nimport model.profile_models as profile_models\nimport model.binary_models as binary_models\nimport model.util as model_util\nimport feature.make_binary_dataset as make_binary_dataset\nimport feature.make_profile_dataset as ma...
[ [ "torch.device", "numpy.ceil", "numpy.empty", "torch.cuda.is_available", "torch.set_grad_enabled" ] ]
adgaudio/MACL-Simulator
[ "67588aa32a91c6af31391a2f882bf45c2a31d44a" ]
[ "engine/display_adapters.py" ]
[ "import numpy as np\nfrom contextlib import ContextDecorator, ExitStack\nfrom pyglet import gl\nimport pyglet\nfrom engine.displays import PygletDisplay\nfrom typing import Tuple\nfrom engine.environments import CartesianEnvironment\n\n\nclass cartesian_display(ContextDecorator):\n ''' Register CartesianEnvironm...
[ [ "numpy.tile" ] ]
Dennis-van-Gils/python-dvg-devices
[ "bfdbd0c37611bf07fa56a8074cb5e2d9602649b2" ]
[ "src/dvg_devices/ThermoFlex_chiller_protocol_RS232.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"RS232 function library for Thermo Scientific ThermoFlex recirculating\nchillers.\n\nCommunication errors will be handled as non-fatal. This means it will struggle\non with the script while reporting error messages to the command line output,\nas opposed to ter...
[ [ "numpy.round", "numpy.uint8", "numpy.unpackbits", "numpy.isnan" ] ]
pignoniG/cognitive_analysis_tool
[ "90568fc83493a10b567c1f957a57b3ef3a1cf69f" ]
[ "pupil_code/pupil_tools/data_tools.py" ]
[ "#!/usr/bin/env python3\n# coding: utf-8\n\n# ---------- #\n# Data Tools #\n# ---------- #\n\n### Modules\n# standard library\nimport os\nfrom bisect import bisect_left\nfrom os.path import join, normpath\nimport csv\nimport json\n\n# dependencies\nimport numpy as np\nfrom scipy.signal import savgol_filter\n\n# cus...
[ [ "numpy.nanvar", "numpy.array", "numpy.nanmean", "numpy.nanstd" ] ]
WinQuant/arsenal
[ "139d604177da3855503643e0fcfa87711ba7e588" ]
[ "util/timeseries.py" ]
[ "'''This file contains utility functions related to TimeSeries manipulation.\n'''\n\n'''\nCopyright (c) 2017, WinQuant Information and Technology Co. Ltd.\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions a...
[ [ "numpy.matrix", "pandas.DataFrame", "pandas.Panel", "pandas.Series", "numpy.linalg.inv" ] ]
Daniel-RPS/House-Rocket-Company-USA
[ "baf2fb0332bb1a58ec0c8fe95a0ab665b1db0ed5" ]
[ "kc_house_st.py" ]
[ "# importar pacotes\r\nimport pandas as pd\r\nimport pydeck as pdk\r\nimport streamlit as st\r\n# import numpy as np\r\nimport seaborn as sns\r\nimport matplotlib.pyplot as plt\r\n# from datetime import date\r\n\r\n\r\n# carregar os meus dados\r\ndf = pd.read_csv('kc_dataset_clean.csv')\r\n\r\n# dashboard\r\nst.tit...
[ [ "pandas.to_datetime", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.title", "matplotlib.pyplot.figure", "matplotlib.pyplot.ylabel", "pandas.read_csv", "matplotlib.pyplot.xticks" ] ]
Mlad-en/COV-BG
[ "dabc6875e49b1fdb113ed691fbf70d5bdcb1846c" ]
[ "code_base/excess_mortality/get_population_eu.py" ]
[ "from os import path\nfrom typing import List, Optional\n\nimport pandas as pd\n\nfrom code_base.excess_mortality.base_eurostat_bulk import (SaveFileMixin,\n UN_LOC_VARS,\n UN_DECODE_AGE_GROUPS,\n ...
[ [ "pandas.read_csv" ] ]
adhankhar24/time-series-stump
[ "0946f1109f19d24ad5b90aafbedbca827d693f1d" ]
[ "stumpy/core.py" ]
[ "# STUMPY\n# Copyright 2019 TD Ameritrade. Released under the terms of the 3-Clause BSD license. # noqa: E501\n# STUMPY is a trademark of TD Ameritrade IP Company, Inc. All rights reserved.\n\nimport numpy as np\n\ntry:\n import pandas as pd\n\n _PANDAS_INSTALLED = True\nexcept ImportError: # pragma: no cov...
[ [ "numpy.square", "numpy.lib.stride_tricks.as_strided", "numpy.array_equal", "numpy.mean", "numpy.flipud", "numpy.std", "numpy.all", "numpy.sqrt", "numpy.cumsum", "numpy.abs", "numpy.issubdtype" ] ]
spaulaus/nuclear_science_toolkit
[ "78520e99e562d2da02b0ff3eaf0d765413cc88ae" ]
[ "nuclear_science_toolkit/positronium_lifetime_analysis.py" ]
[ "\"\"\"\nfile: positronium_lifetime_analysis.py\nbrief:\nauthor: S. V. Paulauskas\ndate: December 24, 2020\n\"\"\"\nfrom math import pi\n\nimport numpy as np\nfrom scipy.optimize import curve_fit\n\n\ndef calibrate_tac(energy):\n return 0.0058817 * energy + 1.61117\n\n\ndef gauss(data, *args):\n \"\"\"\n\n ...
[ [ "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "numpy.exp", "numpy.sqrt", "matplotlib.pyplot.show" ] ]
XinjieInformatik/Energy-Algorithm
[ "b2a43b9f2fbbee48b70ec125d3d073ce4371ac56" ]
[ "models/tunning.py" ]
[ "import pandas as pd\nimport numpy as np \nfrom sklearn import svm\nfrom sklearn import model_selection\nfrom sklearn.model_selection import learning_curve \nfrom sklearn.ensemble import GradientBoostingRegressor\nfrom sklearn.ensemble import RandomForestRegressor \nfrom sklearn.model_selection import cross_val_sco...
[ [ "sklearn.linear_model.RidgeCV", "numpy.mean", "sklearn.preprocessing.RobustScaler", "numpy.where", "pandas.concat", "pandas.read_csv", "sklearn.model_selection.cross_val_score", "sklearn.model_selection.learning_curve", "sklearn.linear_model.LassoCV", "pandas.DataFrame", ...
felix0901/Pytorch-NeuroEvolution
[ "e74fd90dc03343137fbcc47d6a41d9dfc5237c9b" ]
[ "examples/lander/train_pytorch.py" ]
[ "import argparse\nimport copy\nfrom functools import partial\nimport logging\n\nimport time\n\nfrom NeuroEvolution import NeuroEvolution\n\nimport gym\nfrom gym import logger as gym_logger\nimport numpy as np\nimport torch\nfrom torch.autograd import Variable\nimport torch.nn as nn\ngym_logger.setLevel(logging.CRIT...
[ [ "torch.nn.Linear", "torch.autograd.Variable", "torch.from_numpy", "torch.nn.ReLU", "torch.cuda.is_available" ] ]
svandermeulen/advent_of_code
[ "99fe936a564f8ee66f8f28aaac4e36e013ebc28d" ]
[ "solutions/year_2020/day_11/seating_system.py" ]
[ "\"\"\"\n-*- coding: utf-8 -*-\nWritten by: sme30393\nDate: 11/12/2020\n\"\"\"\nimport numpy as np\nimport os\nimport scipy.ndimage as ndimage\n\nfrom collections import Counter\nfrom typing import List\n\nfrom solutions.config import Config\nfrom solutions.year_2020.utils.file_manager import read_txt_file\n\nSEAT_...
[ [ "numpy.array", "numpy.subtract", "numpy.array_equal", "numpy.unique" ] ]
ceos-seo/data_cube_utilities
[ "1979c2a160f2ad306582c60f9ad6be67dfc353ab" ]
[ "data_cube_utilities/plotter_utils.py" ]
[ "from collections import OrderedDict\nimport re\nimport copy\n\nimport numpy as np\nimport pandas as pd\nimport xarray as xr\nimport matplotlib as mpl\nimport matplotlib.patches as mpatches\nimport matplotlib.pyplot as plt\nfrom matplotlib.ticker import FuncFormatter\nfrom matplotlib.colors import LinearSegmentedCo...
[ [ "numpy.tile", "numpy.min", "numpy.invert", "numpy.nanmean", "numpy.cumsum", "matplotlib.ticker.FuncFormatter", "scipy.stats.rankdata", "matplotlib.pyplot.xticks", "numpy.full_like", "numpy.concatenate", "numpy.full", "numpy.max", "pandas.DataFrame", "matplot...
wgurecky/bipymc
[ "065ef0e6fcd996e646d45b7926ad4aaab8b1c02b" ]
[ "tests/test_banana.py" ]
[ "#!/usr/bin/python\n##\n# Description: Tests samplers on a 2d banana shaped distribution\n##\nfrom __future__ import print_function, division\nimport unittest\nimport numpy as np\nfrom six import iteritems\nfrom mpi4py import MPI\nimport matplotlib.pyplot as plt\nimport time\n#\nfrom bipymc.utils import banana_rv\n...
[ [ "matplotlib.pyplot.colorbar", "numpy.count_nonzero", "matplotlib.pyplot.xlim", "matplotlib.pyplot.contourf", "numpy.random.seed", "matplotlib.pyplot.grid", "matplotlib.pyplot.ylim", "matplotlib.pyplot.savefig", "matplotlib.pyplot.close", "matplotlib.pyplot.figure", "mat...
arotare1/myHARK
[ "160284fe999aadfa309ea0f411694e7e1484596e" ]
[ "ConsumptionSaving/ConsMarkovModel.py" ]
[ "'''\nClasses to solve and simulate consumption-savings model with a discrete, exogenous,\nstochastic Markov state. The only solver here extends ConsIndShockModel to\ninclude a Markov state; the interest factor, permanent growth factor, and income\ndistribution can vary with the discrete state.\n'''\nimport sys \n...
[ [ "numpy.max", "numpy.logical_or", "numpy.array", "numpy.dot", "numpy.reshape", "numpy.zeros", "numpy.asarray", "numpy.sum", "numpy.ones", "numpy.min", "numpy.logical_and", "numpy.eye", "numpy.arange", "numpy.cumsum", "numpy.searchsorted", "numpy.inser...
sanjifr3/Narrator
[ "d866bb046406eb9cb72f5090293c35bd0467d6ce" ]
[ "src/utils/VideoDataloader.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nMSR-VTT Dataset Torch Dataloader and Dataset implemention.\n\nget_video_dataloader creates a dataloader with a\nnew MSR-VTT dataset with the specified parameters\n\"\"\"\nfrom __future__ import print_function\nimport os\nimport sys\nimport ast\nimport pickle\nimport numpy as np\nim...
[ [ "torch.zeros", "torch.utils.data.sampler.BatchSampler", "torch.cuda.is_available", "numpy.random.randint", "torch.utils.data.DataLoader", "torch.utils.data.sampler.SubsetRandomSampler", "torch.Tensor", "numpy.vstack", "pandas.read_csv" ] ]
TalLinzen/mne-python
[ "050a49fea804c4b10b8be477d0ba2d9b82399ed5" ]
[ "examples/datasets/plot_spm_faces_dataset.py" ]
[ "\"\"\"\n==========================================\nFrom raw data to dSPM on SPM Faces dataset\n==========================================\n\nRuns a full pipeline using MNE-Python:\n- artifact removal\n- averaging Epochs\n- forward model computation\n- source reconstruction using dSPM on the contrast : \"faces - s...
[ [ "matplotlib.pyplot.show", "numpy.abs", "numpy.unique" ] ]
386jp/ytcomment_trends
[ "e924e3ebe71e67c40bac5f67de2927716d5bc0ac" ]
[ "ytcomment_trends/main.py" ]
[ "from .controllers.google_api import GoogleAPIAuth, get_comments\nfrom .controllers.nlp import OsetiAnalyzer\n\nfrom typing import List, Dict\n\nimport pandas as pd\nimport datetime\n\nclass CommentAnalyzer:\n \"\"\"YouTube comment analyzer\n Args:\n video_id (str): YouTube video ID of the video to get...
[ [ "pandas.to_datetime", "pandas.json_normalize" ] ]
szymonmaszke/AiCorExample
[ "e453e6922bddb612fb5a3feefa62ecf40a2ea719" ]
[ "src/data.py" ]
[ "import torch\nimport torchvision\n\nimport transforms\nimport utils\n\n\nclass Dataset:\n def __init__(self, args):\n self.args = args\n data = torchvision.datasets.FakeData(\n size=args.size,\n image_size=(1, 32, 32),\n num_classes=args.num_classes,\n t...
[ [ "torch.utils.data.DataLoader" ] ]
yingbiaoluo/ocr_pytorch
[ "7d9163f7d6d557d83e2f50a39a3219f330f0cf84" ]
[ "lib/datasets/Rec_dataset.py" ]
[ "import os\nimport cv2\nfrom tqdm import tqdm\nimport numpy as np\nimport torch\nfrom torch.utils.data import Dataset\nfrom lib.utils.general import resize_padding\n\n\ndef create_dataloader(image_path, label_path, imgsz, batch_size, hyp=None, augment=False, workers=8):\n dataset = Dataset_Rec(image_path, label_...
[ [ "torch.stack", "torch.utils.data.DataLoader", "torch.from_numpy" ] ]
sylviawhoa/tensorflow
[ "30f3cdfc420d831e2591cce62fa51164cf8a700a" ]
[ "tensorflow/python/ops/functional_ops.py" ]
[ "# Copyright 2015 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appl...
[ [ "tensorflow.python.framework.ops.RegisterShape", "tensorflow.python.ops.variable_scope.variable_op_scope", "tensorflow.python.framework.ops.convert_to_tensor", "tensorflow.python.ops.control_flow_ops.While", "tensorflow.python.ops.array_ops.shape", "tensorflow.python.ops.constant_op.consta...
tomer1812/pyds
[ "a580663388b2b8da7f5bf1d527a1f9967a80df52" ]
[ "src/pydts/examples_utils/generate_simulations_data.py" ]
[ "import numpy as np\nfrom pydts.examples_utils.simulations_data_config import *\nfrom pydts.config import *\nimport pandas as pd\nfrom scipy.special import expit\nfrom pandarallel import pandarallel\n\n\ndef sample_los(new_patient, age_mean, age_std, bmi_mean, bmi_std, coefs=COEFS, baseline_hazard_scale=8,\n ...
[ [ "numpy.random.lognormal", "numpy.random.choice", "numpy.random.rand", "numpy.random.exponential", "numpy.exp", "pandas.concat", "numpy.random.normal", "numpy.random.binomial", "numpy.log", "pandas.DataFrame", "numpy.random.randint", "numpy.arange", "scipy.specia...
irasus-technologies/EnergyBoost
[ "c5fcd4ed58aedffe0c3c71cdc76f860c64bb1de1" ]
[ "Plot/calculate_solver_bill_new.py" ]
[ "import gym\nimport itertools\nimport matplotlib\nimport numpy as np\nimport pandas as pd\nimport sys\n#import tensorflow as tf\nimport collections\nimport csv\nimport os\nimport pathlib\nfrom environment_bill import EnergyEnvironment\n\nimport matplotlib.pyplot as plt\nimport sklearn.pipeline\nimport sklearn.prepr...
[ [ "matplotlib.style.use", "numpy.clip" ] ]
jboissard/mathExperiments
[ "350a5053fc5d8411b77ea7d084180ef5a8ba24b0" ]
[ "plane.py" ]
[ "\"\"\"\n modelize plan trajectory with spline\n\nSpeed modeled as follow:\n - sin at beginning (0 to Vc)\n - vc\n - sin at end (Vc to 0)\n\nTrajectory is derived by taking integral\n\"\"\"\n\nimport numpy as np\n\n\n\ntf = 10\n\nt1 = 3\nt2 = tf - t1\nw = np.pi/t1\np1 = np.pi + np.pi/2. # phase so we can use only s...
[ [ "numpy.sin", "numpy.vectorize", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.savefig", "matplotlib.pyplot.legend", "matplotlib.pyplot.ylabel", "numpy.cos", "matplotlib.pyplot.show", "numpy.linspace" ] ]
gorex013/LIP_JPPNet
[ "d865e339a65469603eca907ac07be4c78598985c" ]
[ "evaluate_parsing_JPPNet-s2.py" ]
[ "from __future__ import print_function\nimport argparse\nfrom datetime import datetime\nimport os\nimport sys\nimport time\nimport scipy.misc\nimport cv2\nfrom PIL import Image\n\nos.environ[\"CUDA_VISIBLE_DEVICES\"] = \"0\"\n\nimport tensorflow as tf\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom utils...
[ [ "tensorflow.train.start_queue_runners", "tensorflow.shape", "tensorflow.train.Coordinator", "tensorflow.expand_dims", "tensorflow.argmax", "tensorflow.Session", "tensorflow.train.Saver", "tensorflow.global_variables", "tensorflow.ConfigProto", "tensorflow.variable_scope", ...
rjnw/augurv2
[ "0430482297e81288d58a16d43a98ea9d0196d640" ]
[ "experiments/util/logger.py" ]
[ "import numpy as np\nimport os\nimport os.path as op\n\ndef save_np_arr(save_path, file_name, np_arr):\n\t# type: str -> str -> np.array -> ()\n\t\"\"\"\n\tSave np_arr to <save_path/file_name.npy>.\n\t\"\"\"\n\tif not os.path.exists(save_path):\n\t\tos.makedirs(save_path)\n\twith open(os.path.join(save_path, file_n...
[ [ "numpy.load", "numpy.save" ] ]
nationaldronesau/FlirImageExtractor
[ "55cc4e2563e606ea61dd199a8a6d078b352031c2" ]
[ "flir_image_extractor_cli/flir_image_extractor.py" ]
[ "import io\nimport json\nimport os\nimport re\nimport subprocess\nfrom math import sqrt, exp\n\nimport numpy as np\nfrom PIL import Image, ImageEnhance\nfrom loguru import logger\nfrom matplotlib import pyplot as plt, cm\n\n\nclass FlirImageExtractor:\n \"\"\"\n Instance of FlirImageExtractor\n\n \"\"\"\n\...
[ [ "matplotlib.pyplot.subplot", "numpy.array", "numpy.log", "numpy.right_shift", "numpy.bitwise_and", "numpy.amax", "numpy.amin", "matplotlib.pyplot.show", "matplotlib.pyplot.imshow" ] ]
allenlavoie/tensorboard
[ "651adcec9b4552bf54351e8eb7eb68cae44aab43" ]
[ "tensorboard/plugins/histogram/summary_v2.py" ]
[ "# 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/LICENSE-2.0\n#\n# Unless requ...
[ [ "numpy.max", "numpy.array", "numpy.minimum", "numpy.sum", "numpy.min", "numpy.arange", "numpy.linspace", "numpy.floor" ] ]
KelvinYang0320/convmixer
[ "7f4b2340969003ac1edea113c004ba38f61a71a1" ]
[ "pytorch-image-models/timm/models/layers/halo_attn.py" ]
[ "\"\"\" Halo Self Attention\n\nPaper: `Scaling Local Self-Attention for Parameter Efficient Visual Backbones`\n - https://arxiv.org/abs/2103.12731\n\n@misc{2103.12731,\nAuthor = {Ashish Vaswani and Prajit Ramachandran and Aravind Srinivas and Niki Parmar and Blake Hechtman and\n Jonathon Shlens},\nTitle = {Sc...
[ [ "torch.nn.functional.pad", "torch.nn.Conv2d", "torch.randn", "torch.split" ] ]
lushaoan/mmdet
[ "c9e4bfaf0641284a4614ee51e2beae5747b65d5e" ]
[ "mycode/deployment/trttest.py" ]
[ "#!/usr/bin/env python3.6\n# -*- coding:utf-8 -*-\n__author__ = 'Lu ShaoAn'\n__version__ = '1.0'\n__date__ = '2021.08.16'\n__copyright__ = 'Copyright 2021, PI'\n\n\nimport torch\nimport onnx\n\nfrom mmcv.tensorrt import (TRTWrapper, onnx2trt, save_trt_engine,\n is_tensorrt_plugin_loaded)\n...
[ [ "torch.rand", "torch.no_grad" ] ]
paulzhou69/object-recognition-imu
[ "558e07d732b3ea5beca82fc7704cbb236c2aa9f3" ]
[ "imu/raw_data.py" ]
[ "# import h5py\nimport csv\nimport numpy as np\nimport math\nfrom config import *\n\n# this file holds all the variables that need to be changed before using the object recognition-IMU API\n\n\n# to load the data, do:\n# 1. Read the raw data from the file\n# 2. Correct the timestamps by using the following function...
[ [ "numpy.array", "numpy.dot", "numpy.isnan", "numpy.savetxt", "numpy.cross" ] ]
priyanka-raina/Hybrid-RRAM-NEMS
[ "7865ca17f96b80ce3848b76cca36f37948d61374" ]
[ "results/plot.py" ]
[ "import matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd, pylab\n\ndata = pd.read_csv('tt.txt', sep='\\t')\ndata.columns = [column.split('`')[0] for column in data.columns]\n\nfig, (ax1, ax2, ax3, ax4, ax5, ax6) = plt.subplots(nrows=6, sharex=True)\n\n# Set the font dictionaries (for plot title and...
[ [ "matplotlib.pyplot.xlabel", "pandas.read_csv", "matplotlib.pyplot.show", "matplotlib.pyplot.subplots" ] ]
jjmachan/facedetection-aeye
[ "af1bd6fb9e58776b6a37788a8c87d6d966b524b6" ]
[ "facedetection/utils/detect_face.py" ]
[ "import torch\nfrom torch.nn.functional import interpolate\nfrom torchvision.transforms import functional as F\nfrom torchvision.ops.boxes import batched_nms\nimport cv2\nfrom PIL import Image\nimport numpy as np\nimport os\n\n\ndef detect_face(imgs, minsize, pnet, rnet, onet, threshold, factor, device):\n if is...
[ [ "torch.zeros", "torch.cat", "numpy.zeros_like", "numpy.array", "numpy.empty", "torch.stack", "torch.max", "numpy.uint8", "numpy.minimum", "torch.nn.functional.interpolate", "numpy.where", "numpy.float32", "numpy.argsort", "numpy.maximum", "torch.as_tenso...
tuomastik/rotating_projections
[ "9736b06193ebcc9231e94749fb6f40aac074293d" ]
[ "kde.py" ]
[ "import os\n\nimport numpy as np\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nfrom mpl_toolkits.mplot3d import art3d\nfrom tqdm import tqdm\n\nfrom utils import create_3d_figure\n\n\ndef create_animation_frames(gif_frames_output_folder: str) -> None:\n rs = np.random.RandomState(1)\n elev, azim, d...
[ [ "numpy.random.RandomState", "matplotlib.pyplot.savefig", "numpy.sum", "numpy.random.randn", "matplotlib.pyplot.close", "matplotlib.pyplot.draw" ] ]
parkerzf/mlflow
[ "781ce394953c7857b19c84dc937964a806b62798" ]
[ "tests/keras/test_keras_model_export.py" ]
[ "# pep8: disable=E501\n\nfrom __future__ import print_function\n\nimport os\nimport pytest\nfrom keras.models import Sequential\nfrom keras.layers import Dense\nimport sklearn.datasets as datasets\nimport pandas as pd\nimport numpy as np\n\nimport mlflow.keras\nimport mlflow\nfrom mlflow import pyfunc\nfrom tests.h...
[ [ "pandas.DataFrame", "sklearn.datasets.load_iris" ] ]
yuan2z/PipelineDP
[ "54634930374a77c7bb1037b5b771f90acd751b60" ]
[ "tests/combiners_test.py" ]
[ "import unittest.mock as mock\n\nfrom absl.testing import absltest\nfrom absl.testing import parameterized\nimport pipeline_dp\nimport pipeline_dp.combiners as dp_combiners\nimport pipeline_dp.budget_accounting as ba\n\nimport numpy as np\n\n\ndef _create_mechism_spec(no_noise):\n if no_noise:\n eps, delt...
[ [ "numpy.var", "numpy.mean" ] ]
OmidSa75/deep_sort_pytorch
[ "018d5c83de50fa27f51ca68aa397338e1dd46c4b" ]
[ "yolov3_deepsort.py" ]
[ "import os\nimport cv2\nimport time\nimport argparse\nimport torch\nimport warnings\nimport sys\n# sys.path.insert(0, 'detector/ScaledYOLOv4')\n\nfrom mmdet.apis import init_detector, inference_detector\nfrom mmpose.apis import (inference_top_down_pose_model, init_pose_model,\n vis_pose_trac...
[ [ "torch.cuda.is_available", "torch.hub.load" ] ]
AyahnaSyahid/a3plus
[ "36fd388deeb1dbe74f6f3b16506e3ceade27d57f" ]
[ "collator.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nScript untuk menggabungkan 2 file yang terpisah (1 depan 1 belakang)\r\nmenjadi 1 file depan belakang\r\n\"\"\"\r\nfrom PyPDF2.merger import PdfFileMerger as Merger\r\nfrom PyPDF2.merger import PdfFileReader as Reader\r\nfrom PyPDF2.merger import PdfFileWriter as Writer\r\n\r\n...
[ [ "numpy.asarray" ] ]
fstroth/lightning-flash
[ "de3f8517410d82ff4a420b3ee4c5bbfee4defb06" ]
[ "flash/text/seq2seq/core/model.py" ]
[ "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law...
[ [ "torch.ones" ] ]
DevTeamSCH/status-measure-csv
[ "c2f45345df26b4642de7a16c383d115e9404c1c9" ]
[ "analyzer.py" ]
[ "import matplotlib.pyplot as plt\nimport csv\nimport sys\nimport datetime\nfrom matplotlib.dates import date2num \n\ntimestamp = []\nvalue = []\n\nwith open(sys.argv[1]) as csv_file:\n first = True\n machine_data = csv.reader(csv_file, delimiter=',')\n for row in machine_data:\n timestamp.append(dat...
[ [ "matplotlib.pyplot.xlabel", "matplotlib.pyplot.grid", "matplotlib.pyplot.title", "matplotlib.pyplot.plot", "matplotlib.pyplot.subplots", "matplotlib.pyplot.gcf", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.show", "matplotlib.dates.date2num" ] ]
CJWBW/T2I_CL
[ "b0fd4fff65acb2a547c5ac997d90b153979e9cd0" ]
[ "AttnGAN_CL/code/model.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.parallel\nfrom torch.autograd import Variable\nimport torchvision.models as models\nimport torch.utils.model_zoo as model_zoo\nimport torch.nn.functional as F\n\nfrom torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence\n\nfrom .miscc.config impor...
[ [ "torch.nn.Linear", "torch.cat", "torch.nn.LSTM", "torch.nn.GRU", "torch.nn.BatchNorm2d", "torch.nn.LeakyReLU", "torch.utils.model_zoo.load_url", "torch.nn.utils.rnn.pack_padded_sequence", "torch.sigmoid", "torch.nn.functional.avg_pool2d", "torch.autograd.Variable", ...
krynj-dev/road-safety-rater
[ "b23cf1990bcd16a4b633f204a3479649550ab2ae" ]
[ "road_safety_api/road_safety_model/roadsafetymodel.py" ]
[ "import json, math\n\nimport requests\n\nimport pandas as pd\nfrom sklearn.neural_network import MLPClassifier\nfrom sklearn.model_selection import train_test_split\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nclass RoadSafetyModel(object):\n \"\"\"This class is not configured for use with the front e...
[ [ "pandas.json_normalize", "numpy.set_printoptions", "sklearn.neural_network.MLPClassifier", "sklearn.model_selection.train_test_split", "pandas.unique", "pandas.read_csv", "pandas.get_dummies" ] ]
gerritholl/glmtools
[ "d2823e1cec6953af784ba6fbdcd7245d701f61a7" ]
[ "examples/grid/make_GLM_grids.py" ]
[ "import argparse\nparse_desc = \"\"\"Grid GLM flash data. The start and end times can be specified\nindependently, or if not provided they will be inferred from the filenames.\n\nGrid spacing is regular in latitude and longitude with the grid box\nbeing sized to match the requested dx, dy at the center of the grid....
[ [ "numpy.abs", "numpy.arange", "numpy.asarray", "numpy.vstack" ] ]
singular-value/MDF
[ "227216ffb2c9beea8539829b0b891196787d33ee" ]
[ "examples/MDF/scaling.py" ]
[ "\"\"\"\n Example of ModECI MDF - Testing arrays as inputs - this allows graphs of\n various scales/sizes to be generated for testing purposes\n\"\"\"\n\nfrom modeci_mdf.mdf import *\nfrom modeci_mdf.scheduler import EvaluableGraph\nimport numpy as np\nimport sys\n\n\ndef generate_test_model(\n id,\n in...
[ [ "numpy.random.seed", "numpy.random.random_sample" ] ]
kernsuite-debian/katdal
[ "62c5732f0bf1a2b6fa8d275e7405bcb1648534b0" ]
[ "katdal/test/test_chunkstore.py" ]
[ "################################################################################\n# Copyright (c) 2017-2019, National Research Foundation (Square Kilometre Array)\n#\n# Licensed under the BSD 3-Clause License (the \"License\"); you may not use\n# this file except in compliance with the License. You may obtain a co...
[ [ "numpy.full", "numpy.array", "numpy.zeros", "numpy.ones", "numpy.prod", "numpy.arange", "numpy.dtype" ] ]
avanteijlingen/autodE
[ "5353021d1bec65ae9878299eca9ed72b09c8544a" ]
[ "tests/test_conf_gen.py" ]
[ "from autode.atoms import Atom\nfrom autode.conformers import conf_gen\nfrom autode.species.molecule import Molecule\nfrom autode.species.molecule import Reactant, Product\nfrom autode.species.complex import ReactantComplex, ProductComplex\nfrom autode.config import Config\nfrom autode.geom import calc_rmsd\nfrom a...
[ [ "numpy.array", "numpy.isclose", "numpy.linalg.norm", "numpy.std", "numpy.abs", "numpy.average" ] ]
Palspal98/e3d_lstm
[ "c693d067a8132c92182d462d1ef64fdcbf30731c" ]
[ "src/trainer.py" ]
[ "# Copyright 2019 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by app...
[ [ "numpy.concatenate", "numpy.square", "numpy.uint8", "numpy.asarray", "numpy.zeros", "numpy.minimum", "numpy.sum", "numpy.mean", "numpy.split", "numpy.size", "numpy.int32", "numpy.log10", "numpy.maximum" ] ]
ritabratamaiti/covid19-dashboard
[ "c59a83578a79fe1e9eb049b29f14da474f656a0f" ]
[ "processdata/views.py" ]
[ "from django.http import HttpResponse\nfrom django.shortcuts import get_object_or_404, redirect, render\nfrom django.template import loader\n\nimport json\n\nfrom . import getdata, maps\n\n\ndef index(request): \n return render(request, template_name='index.html')\n\n\ndef report(request):\n df = getdata.dail...
[ [ "pandas.to_datetime" ] ]
abufadl/transformers
[ "c84bb6eb92b654e04a82fada26417fcdab45f3af" ]
[ "tests/test_trainer.py" ]
[ "import unittest\n\nimport nlp\nimport numpy as np\n\nfrom transformers import AutoTokenizer, TrainingArguments, is_torch_available\nfrom transformers.testing_utils import get_tests_dir, require_torch\n\n\nif is_torch_available():\n import torch\n from torch.utils.data import IterableDataset\n\n from trans...
[ [ "numpy.random.normal", "numpy.random.seed", "torch.nn.functional.mse_loss", "numpy.allclose", "torch.abs", "torch.tensor", "numpy.abs", "torch.optim.lr_scheduler.LambdaLR" ] ]
ronpandolfi/Xi-cam
[ "f6388c7c44b202403194a04ca2b4d8bcca41cc74" ]
[ "pipeline/remesh.py" ]
[ "#! /usr/bin/env python\n\n# from image_load import *\n# import loader\nimport numpy as np\nfrom pyFAI import geometry\n\nfrom PySide import QtGui\nimport msg\n\n\ntry:\n from cWarpImage import warp_image\nexcept ImportError:\n msg.logMessage(\"Remeshing C extension is NOT LOADED!\",msg.ERROR)\n\n\ndef calc_q...
[ [ "numpy.rot90", "numpy.logical_or", "numpy.int", "numpy.array", "numpy.sin", "numpy.zeros", "numpy.log", "numpy.errstate", "numpy.sign", "numpy.arange", "numpy.sqrt", "numpy.cos", "numpy.deg2rad", "numpy.linspace", "numpy.meshgrid" ] ]
hemil03/Data-Analytics
[ "79ce422f349d7414bb3e1e510316f4c5b976804d" ]
[ "COVID_on_market.py" ]
[ "import pandas as pd\r\nimport matplotlib.pyplot as plt\r\nfrom alpha_vantage.timeseries import TimeSeries\r\n\r\n#defining alpha-vantage API key\r\napi = '888888888'\r\n\r\n#collecting data from API/url\r\ndeaths = pd.read_csv(\"https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/cs...
[ [ "pandas.to_datetime", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "matplotlib.pyplot.title", "matplotlib.pyplot.legend", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.show", "pandas.read_csv" ] ]
celinedurniak/test_nbsphinx
[ "f4bf376b933d5958cb921965cfb1430926fb10a5" ]
[ "tests/test_jump_translational_diffusion.py" ]
[ "import os\nimport sys\nimport unittest\nimport numpy\nfrom os.path import join as pjn\n\nimport QENSmodels\n\n# resolve path to reference_data\nthis_module_path = sys.modules[__name__].__file__\ndata_dir = pjn(os.path.dirname(this_module_path), 'reference_data')\n\n\nclass TestJumpTranslationalDiffusion(unittest.T...
[ [ "numpy.testing.assert_array_almost_equal", "numpy.ones", "numpy.arange", "numpy.zeros" ] ]
hkuadithya/general-dynamics-data-analytics
[ "d3bb2fa8abdc0a8d654941794f65abddc5e85cf1" ]
[ "miscallaneous/Data+Analytics+Work.py" ]
[ "\n# coding: utf-8\n\n# In[3]:\n\n\nimport pandas as pd\nfrom matplotlib import pyplot as plt\nfrom datetime import datetime\nget_ipython().run_line_magic('matplotlib', 'inline')\nimport seaborn as sns\nsns.set()\nfrom matplotlib.backends.backend_pdf import PdfPages\n#from mpl_toolkits.basemap import Basemap\nimpor...
[ [ "pandas.read_csv" ] ]
LSaldyt/pytorch-ntm
[ "eb2e1cbf4e5cd8637c12af9d1e7f6624f70f5bfd" ]
[ "ntm/aio.py" ]
[ "\"\"\"All in one NTM. Encapsulation of all components.\"\"\"\nimport torch\nfrom torch import nn\nfrom .ntm import NTM\nfrom .controller import LSTMController\nfrom .head import NTMReadHead, NTMWriteHead\nfrom .memory import NTMMemory\n\n\nclass EncapsulatedNTM(nn.Module):\n\n def __init__(self, settings):\n ...
[ [ "torch.zeros", "torch.nn.ModuleList" ] ]
BiCroLab/nucleAI
[ "1fa1ea23e5b0f282b51e8a57f428f8e8cfc51589" ]
[ "py/test.covd_2dProjection.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\nimport sys \nsys.path.insert(0, '../py')\nfrom graviti import *\n\nfrom numpy.linalg import norm\nimport numpy as np\nimport os\nimport os.path\nfrom os import path\nimport sys\nimport glob\nimport h5py\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nimport matpl...
[ [ "matplotlib.use", "pandas.read_pickle", "numpy.all" ] ]
douglas-raillard-arm/bart
[ "ee99bdb73ed8ecebc577e01997e2401c1aff99a7" ]
[ "bart/common/Utils.py" ]
[ "# Copyright 2015-2016 ARM 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 License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or...
[ [ "numpy.diff" ] ]
tsauerwein/shapely
[ "d0bdd5f99cc8be9ce6a1022ff971fbd5deff2dad" ]
[ "shapely/tests/test_ndarrays.py" ]
[ "# Tests of support for Numpy ndarrays. See\n# https://github.com/sgillies/shapely/issues/26 for discussion.\n# Requires numpy.\n\nimport unittest\nfrom shapely import geometry\nimport numpy\n\nclass TransposeTestCase(unittest.TestCase):\n def test_multipoint(self):\n a = numpy.array([[1.0, 1.0, 2.0, 2.0,...
[ [ "numpy.array" ] ]
cjliux/mdst.c2f
[ "5617624b25ddaa11ffbc07401d3fe0276ca220d5" ]
[ "scripts/config_lol.py" ]
[ "import os\nimport logging \nimport argparse\nfrom tqdm import tqdm\nimport torch\n\n# PAD_token = 1\n# SOS_token = 3\n# EOS_token = 2\n# UNK_token = 0\n\nif torch.cuda.is_available():\n USE_CUDA = True\nelse:\n USE_CUDA = False\n\nMAX_LENGTH = 10\n\nparser = argparse.ArgumentParser(description='Multi-Domain ...
[ [ "torch.cuda.is_available" ] ]
obitto/relation-network
[ "2cbea587c9d43d6e02dba8ddd79e9ae18eca5356" ]
[ "evaluator.py" ]
[ "import tensorflow as tf\nimport numpy as np\nfrom RelationNetwork import RN\nfrom prepare import SClevrDataset,ClevrDataset\nfrom utils import Config, Config_SClevr\nimport argparse\n\nclass Evaluator(object):\n\t\"\"\"\n\tThis would evaluate some basic metric of the model\n\t\"\"\"\n\tdef __init__(self, config):\...
[ [ "numpy.sum", "numpy.argmax", "numpy.zeros" ] ]
jaehobang/cs7643_project
[ "7ec3d1934fc462ba230bd0615c939e7de00dc10c", "7ec3d1934fc462ba230bd0615c939e7de00dc10c" ]
[ "loaders/decompressionModule.py", "loaders/seattle_loader.py" ]
[ "\"\"\"\nThis file consists of the decompressionModule class that works with compressed videos to make them decompressed.\nSome further optimizations could be possible (such as utilization of multiple threads, but at the moment everything is serial)\n\n@Jaeho Bang\n\"\"\"\n\nimport cv2\nimport numpy as np\nimport o...
[ [ "numpy.ndarray" ], [ "numpy.ndarray", "numpy.array", "torch.load" ] ]
zzhou292/chrono-collision
[ "c2a20e171bb0eb8819636d370887aa32d68547c6" ]
[ "src/demos/python/fea/demo_FEA_shells.py" ]
[ "# =============================================================================\n# PROJECT CHRONO - http:#projectchrono.org\n#\n# Copyright (c) 2014 projectchrono.org\n# All rights reserved.\n#\n# Use of this source code is governed by a BSD-style license that can be found\n# in the LICENSE file at the top level o...
[ [ "numpy.sin", "matplotlib.pyplot.savefig", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "matplotlib.pyplot.ylabel", "numpy.cos", "matplotlib.pyplot.show" ] ]
max-stark/InformationBottleneckDecodingLDPC
[ "033e496b1b5492c9b8f0987f438373104095a2c6" ]
[ "Irregular_LDPC_Decoding/DVB-S2/BER_simulation_OpenCL_min_sum.py" ]
[ "import os\nimport sys\n\nsys.path.append(os.path.join(os.path.dirname(__file__), '../..'))\nimport numpy as np\nfrom AWGN_Channel_Transmission.AWGN_Quantizer_BPSK import AWGN_Channel_Quantizer\nfrom AWGN_Channel_Transmission.LDPC_Transmitter import LDPC_BPSK_Transmitter as transmitter\nfrom Continous_LDPC_Decoding...
[ [ "matplotlib.use", "numpy.array", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.grid", "matplotlib.pyplot.semilogy", "numpy.seterr", "matplotlib.pyplot.figure", "matplotlib.rcParams.update", "matplotlib.pyplot.ylabel", "numpy.append", "matplotlib.pyplot.show", "nump...
khx0/mpl-benchmarks
[ "848a2626ea057a91deb1556c6fc6ad1da3b23e64", "848a2626ea057a91deb1556c6fc6ad1da3b23e64" ]
[ "mpl_annotation_toolbox/mpl_minimal_annotation_clip_snippet.py", "mpl_annotate_alignment/mpl_annotate_alignment_minimal.py" ]
[ "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n##########################################################################################\n# author: Nikolas Schnellbaecher\n# contact: khx0@posteo.net\n# date: 2021-05-09\n# file: mpl_minimal_annotation_clip_snippet.py\n# tested with python 3.7.6 in conjunction with mp...
[ [ "matplotlib.pyplot.xlim", "matplotlib.pyplot.ylim", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show", "numpy.linspace" ], [ "numpy.sin", "numpy.zeros", "matplotlib.pyplot.clf", "matplotlib.pyplot.close", "matplotlib.pyplot.subplots", "matplotlib.pyplot.cla", ...
kotikkonstantin/convasr
[ "3d4d7f3627269372ae1eb7ff7423b29838f47ac0" ]
[ "serve_google_api.py" ]
[ "# pip install google-cloud-speech\n# https://github.com/googleapis/python-speech\n# https://googleapis.dev/python/speech/latest/index.html\n# https://grpc.io/docs/tutorials/basic/python/\n# https://github.com/grpc/grpc/blob/master/examples/python/route_guide/route_guide_server.py\n\nimport argparse\nimport concurr...
[ [ "torch.linspace" ] ]
minaremeli/adversarial-robustness-toolbox
[ "3454f7f11c3ade9317d11637c8c8621c9f44e8fd" ]
[ "tests/attacks/test_carlini.py" ]
[ "# MIT License\n#\n# Copyright (C) The Adversarial Robustness Toolbox (ART) Authors 2018\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the Software without restriction, including without limita...
[ [ "numpy.sum", "numpy.testing.assert_array_almost_equal", "numpy.allclose", "numpy.argmax", "numpy.amax", "numpy.abs", "numpy.amin" ] ]
Morris-Research-Group/NarrowEscapeSimulator
[ "e96cf96348a0d32184e9e9dc0d592a63c4618760" ]
[ "PyEscape/escape_drawing.py" ]
[ "from itertools import product, combinations\nimport numpy as np\nfrom .escape_utility import sphere_vol_to_r, cube_vol_to_r\n\nimport matplotlib.pyplot as plt\n\n\ndef set_axes_equal(ax: plt.Axes):\n \"\"\"Set 3D plot axes to equal scale.\n Functions from @Mateen Ulhaq and @karlo\n\n Make axes of 3D plot ...
[ [ "numpy.sin", "numpy.mean", "numpy.abs", "numpy.cos", "numpy.size", "numpy.linspace" ] ]
gabelstein/parRiemann
[ "466c20570c797f588cbe58f2f93d32180ea1e533" ]
[ "tests/test_utils_mean.py" ]
[ "from numpy.testing import assert_array_almost_equal, assert_array_equal\nimport numpy as np\n\nfrom parriemann.utils.mean import (mean_riemann, mean_euclid, mean_logeuclid,\n mean_logdet, mean_ale, mean_identity,\n mean_covariance, mean_kullback_s...
[ [ "numpy.empty", "numpy.log", "numpy.random.RandomState", "numpy.sum", "numpy.testing.assert_array_equal", "numpy.eye", "numpy.testing.assert_array_almost_equal", "numpy.diag" ] ]
AustenZhu/zipline
[ "52b332919e133750dfd8b726b474179f5a989430" ]
[ "zipline/finance/position.py" ]
[ "#\n# Copyright 2018 Quantopian, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or...
[ [ "numpy.floor" ] ]
Riya-1/py_grama
[ "caafeac418ce0014b477e6feded06ccc1592b94d" ]
[ "grama/eval/eval_pyDOE.py" ]
[ "__all__ = [\"eval_lhs\", \"ev_lhs\"]\n\ntry:\n from pyDOE import lhs\n\nexcept ModuleNotFoundError:\n raise ModuleNotFoundError(\"module pyDOE not found\")\n\nimport warnings\nimport grama as gr\nfrom .. import add_pipe, pipe, custom_formatwarning\nfrom scipy.stats import norm, lognorm\nfrom numbers import I...
[ [ "numpy.random.seed" ] ]
EarthObservationSimulator/orbits
[ "b476762532f8644b9fe0723760b5202ab77a4547" ]
[ "orbitpy/grid.py" ]
[ "\"\"\" \n.. module:: grid\n\n:synopsis: *Module to handle grid (array of geo-coordinates) related operations.*\n\n.. todo:: Revise the module to a factory pattern implementation. \n\n\"\"\"\nimport numpy as np\nimport pandas as pd\nfrom collections import namedtuple\nimport uuid\n\nimport propcov\nfrom instrupy.ut...
[ [ "numpy.array", "numpy.arccos", "numpy.arcsin", "numpy.rad2deg", "numpy.deg2rad", "pandas.read_csv" ] ]
jonaslalin/label-maker
[ "c271189fbfd0f0c198184ef45032e16546e25243" ]
[ "test/integration/test_classification_package.py" ]
[ "\"\"\"Test that the following CLI command returns the expected outputs\nlabel-maker package --dest integration-cl --config test/fixtures/integration/config.integration.json\"\"\"\nimport unittest\nfrom os import makedirs\nfrom shutil import copyfile, copytree, rmtree\nimport subprocess\n\nimport numpy as np\n\n\nc...
[ [ "numpy.sum", "numpy.array", "numpy.load", "numpy.array_equal" ] ]
MikeBao99/NewStock
[ "44b9644ac4df82c85bb8b288837d417b029f7a53" ]
[ "app/news.py" ]
[ "import matplotlib\nmatplotlib.use('Agg')\nimport requests\nimport json\nimport api_client\nimport matplotlib.pyplot as plt\nimport matplotlib.dates as mdates\nimport datetime\nimport numpy as np\nimport io\nimport base64\nimport pandas as pd\nfrom pandas_datareader import data as web\n\npos_events = ['All Time Hig...
[ [ "matplotlib.use", "matplotlib.dates.AutoDateLocator", "matplotlib.pyplot.subplots", "matplotlib.dates.AutoDateFormatter", "matplotlib.dates.date2num" ] ]
ChristopherJDumas/magenta
[ "48a199085e303eeae7c36068f050696209b856bb" ]
[ "magenta/models/coconet/coconet_sample.py" ]
[ "\"\"\"Generate from trained model from scratch or condition on a partial score.\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nimport itertools as it\nimport os\nimport re\nimport time\n# internal imports\nimport numpy as np\nimport pretty_m...
[ [ "numpy.zeros", "tensorflow.gfile.Open", "numpy.ones", "numpy.load", "numpy.save", "tensorflow.gfile.MakeDirs", "tensorflow.app.run" ] ]
mouneem/tysserand
[ "2d7a1d28b5c2e754fdab4005cfeb7e1786fe4370" ]
[ "tysserand/tysserand.py" ]
[ "import numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport matplotlib as mpl\nimport seaborn as sns\nimport os\nimport joblib\nimport itertools\nfrom scipy.spatial import Voronoi\nfrom sklearn.neighbors import BallTree\nfrom skimage import morphology, feature, measure, segmentation, filters, ...
[ [ "matplotlib.cm.ScalarMappable", "scipy.spatial.cKDTree", "numpy.median", "numpy.tile", "numpy.sort", "numpy.random.random", "numpy.random.normal", "numpy.uint8", "pandas.DataFrame", "sklearn.neighbors.BallTree", "matplotlib.pyplot.subplots", "numpy.random.randint", ...
sbjelogr/probatus
[ "71d943515c26dc77957744d0f6b56f5f2725a8be" ]
[ "probatus/utils/arrayfuncs.py" ]
[ "# Copyright (c) 2020 ING Bank N.V.\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, copy, modify, merge, pu...
[ [ "pandas.isnull", "numpy.array", "numpy.nditer", "pandas.DataFrame", "pandas.api.types.is_numeric_dtype", "pandas.Series" ] ]
emanuelevivoli/2021-Master-Thesis-UNIFI
[ "e702795f71ecf0e09fca64e72780f4f6367558c9" ]
[ "src/thesis/datasets/s2orc/preprocessing.py" ]
[ "import pandas as pd\n\n# typing\nfrom typing import Dict, List, Union\n\n# 🤗 Transformers\nfrom transformers import PreTrainedTokenizer\n\n# 🤗 Datasets\nfrom datasets import DatasetDict, Dataset as hfDataset\n\n# torch\nfrom torch.utils.data import Dataset, DataLoader\n\nimport time\nimport numpy as np\n\nfrom t...
[ [ "pandas.DataFrame", "numpy.array", "numpy.asarray" ] ]
magattaca/TeachOpenCADD_JP
[ "b1a2879eba59bc1d218853ea58cf9965e8f8d0b4" ]
[ "10_binding_site_similarity/pymol_scripts/pymol_align_bindingsites.py" ]
[ "'''\nThis script aligns all pairs of input proteins (binding sites).\n'''\n\nimport pymol\nimport pickle\nimport pandas as pd\nimport sys\nimport numpy as np\n\n# Launch PyMol\npymol.finish_launching()\n\n# Get the parameter (radius from ligand)\nradius = sys.argv[1]\n\n# Load PDB IDs\npdb_ids = pickle.load(open(\...
[ [ "pandas.DataFrame" ] ]
weikang9009/geosnap
[ "276c99bf60657bcd2ee18cc207cf1f8344a44422" ]
[ "geosnap/util/cenpy_fetch.py" ]
[ "\"\"\"Utility functions for downloading Census data.\"\"\"\n\nimport pandas\nimport sys\nfrom tqdm.auto import tqdm\nimport os\n\nfrom cenpy import products\nfrom cenpy import set_sitekey\nfrom pathlib import Path\n\n\ndef fetch_acs(\n level=\"tract\",\n state=\"all\",\n year=2017,\n output_dir=None,\n...
[ [ "pandas.to_numeric", "pandas.concat" ] ]
rurz/toqito
[ "a051ff771678b7573dfda4d583dc60eaa8cb541f", "a051ff771678b7573dfda4d583dc60eaa8cb541f" ]
[ "toqito/state_props/is_pure.py", "tests/test_matrix_props/test_is_identity.py" ]
[ "\"\"\"Check if state is pure.\"\"\"\nfrom typing import List, Union\n\nimport numpy as np\n\n\ndef is_pure(state: Union[List[np.ndarray], np.ndarray]) -> bool:\n r\"\"\"\n Determine if a given state is pure or list of states are pure [WikIsPure]_.\n\n A state is said to be pure if it is a density matrix w...
[ [ "numpy.diag", "numpy.linalg.eig" ], [ "numpy.array", "numpy.testing.run_module_suite", "numpy.eye" ] ]
TLouf/esda
[ "620a881232ef5445e88f49c9d49a35e61f032417" ]
[ "esda/join_counts_local_mv.py" ]
[ "import numpy as np\nimport pandas as pd\nfrom scipy import sparse\nfrom sklearn.base import BaseEstimator\nfrom libpysal import weights\nfrom esda.crand import (\n crand as _crand_plus,\n njit as _njit,\n _prepare_univariate\n)\n\n\nPERMUTATIONS = 999\n\n\nclass Join_Counts_Local_MV(BaseEstimator):\n\n ...
[ [ "numpy.array", "pandas.DataFrame", "pandas.Series", "numpy.dstack", "numpy.vstack" ] ]
goroda/Compressed-Continuous-Computation
[ "ecfa401306457b9476c0252dc9cc086ec3fdacfb" ]
[ "setup.py" ]
[ "# adapted from https://stackoverflow.com/a/48015772\nimport sys\nif sys.platform == 'darwin':\n from distutils import sysconfig\n vars = sysconfig.get_config_vars()\n vars['LDSHARED'] = vars['LDSHARED'].replace('-bundle', '-dynamiclib')\n my_link_args=[\"-Wl,-rpath,@loader_path\"]\n my_runtime_dirs ...
[ [ "numpy.get_numpy_include", "numpy.get_include" ] ]
walker-dula/EXOSIMS
[ "8f3fd7fe6b602d008f0aafac9a9c5e8600cc35fd" ]
[ "EXOSIMS/Prototypes/OpticalSystem.py" ]
[ "# -*- coding: utf-8 -*-\r\nfrom EXOSIMS.util.vprint import vprint\r\nfrom EXOSIMS.util.get_dirs import get_cache_dir\r\nimport os.path\r\nimport numbers\r\nimport numpy as np\r\nimport astropy.units as u\r\nimport astropy.io.fits as fits\r\nimport scipy.interpolate\r\nimport scipy.optimize\r\nimport sys\r\n\r\n# P...
[ [ "numpy.max", "numpy.isinf", "numpy.array", "numpy.isnan", "numpy.zeros", "numpy.ones", "numpy.genfromtxt", "numpy.min", "numpy.any", "numpy.where", "numpy.arange", "numpy.sqrt", "numpy.all", "numpy.log10" ] ]
systemsmedicine/Discrete-decay-and-Half-life
[ "4542c532a95073f0f790b673383f24b165f9df1c" ]
[ "code/py_funct_discrete_decay.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Fri 01.03.2019 12:51:45 \r\n\r\n@author: Gustavo Hernandez-Mejia\r\n\"\"\"\r\n\r\n\"\"\"\r\n Function to compute the number individual that remain after a probability of\r\n selection. The discrete decay follows the half-life concept.\r\n \r\n input. \r\n ...
[ [ "numpy.array", "numpy.delete", "numpy.empty", "numpy.log", "numpy.exp" ] ]
ysh329/Paddle
[ "50ad9046c9a440564d104eaa354eb9df83a35678", "50ad9046c9a440564d104eaa354eb9df83a35678", "50ad9046c9a440564d104eaa354eb9df83a35678" ]
[ "python/paddle/fluid/tests/unittests/ngraph/test_activation_ngraph_op.py", "benchmark/tensorflow/mnist.py", "python/paddle/fluid/tests/unittests/test_mean_iou.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.tanh", "numpy.random.uniform", "numpy.abs", "numpy.maximum" ], [ "tensorflow.nn.conv2d", "tensorflow.matmul", "tensorflow.nn.softmax", "tensorflow.local_variables_initializer", "tensorflow.one_hot", "tensorflow.global_variables_initializer", "tensorflow.cast"...
dveni/causal-text-embeddings
[ "82104f3fb6fd540cf98cb4ca0fd5b5d1fb5f757a" ]
[ "src/semi_parametric_estimation/att.py" ]
[ "import numpy as np\nfrom scipy.special import logit, expit\nfrom scipy.optimize import minimize\n\nfrom .helpers import truncate_all_by_g, cross_entropy, mse\n\n\ndef _perturbed_model(q_t0, q_t1, g, t, q, eps):\n # helper function for psi_tmle\n\n h1 = t / q - ((1 - t) * g) / (q * (1 - g))\n full_q = (1.0...
[ [ "numpy.square", "numpy.zeros_like", "numpy.ones_like", "numpy.mean", "scipy.special.logit", "scipy.optimize.minimize" ] ]
LeoGrin/selective_inference_changepoint
[ "ad19e44c6b7e04b82c42d29dc84885ff9ef43665" ]
[ "core_dp_si/penalized_inference.py" ]
[ "import numpy as np\nfrom mpmath import mp\n\nmp.dps = 500\n\nerror_threshold = 1e-10\n\n\ndef intersect(range_1, range_2):\n lower = max(range_1[0], range_2[0])\n upper = min(range_1[1], range_2[1])\n\n if upper < lower:\n return []\n else:\n return [lower, upper]\n\n\ndef intersect_range...
[ [ "numpy.array", "numpy.dot", "numpy.reshape", "numpy.zeros", "numpy.identity", "numpy.sqrt" ] ]
LtcSoar/multiagent-particle-envs
[ "5df7599d681aaaf6a204f773b57d1d1dffd67241" ]
[ "multiagent/scenarios/world_comm_ori.py" ]
[ "import numpy as np\nfrom multiagent.core import World, Agent, Landmark\nfrom multiagent.scenario import BaseScenario\n\n\nclass Scenario(BaseScenario):\n def make_world(self):\n world = World()\n # set any world properties first\n world.dim_c = 4\n #world.damping = 1\n num_goo...
[ [ "numpy.concatenate", "numpy.square", "numpy.array", "numpy.zeros", "numpy.exp", "numpy.random.uniform" ] ]
BlackyYen/Speech_Recognition-PyTorch
[ "0a986f467c540c2be88f65064ebf5ce0f6bcf70a" ]
[ "test.py" ]
[ "import torch\nimport torchaudio\nimport torch.nn as nn\nfrom torch.utils import data\nimport torch.optim as optim\nfrom nets.model import SpeechRecognitionModel\nfrom comet_ml import Experiment\nfrom utils.processing import TextTransform, data_processing, GreedyDecoder\nimport os\nimport torch.nn.functional as F\n...
[ [ "torch.device", "pandas.DataFrame", "torch.no_grad", "torch.nn.functional.log_softmax", "torch.cuda.empty_cache", "torch.cuda.is_available", "torch.load" ] ]
flache/pyAudioAnalysis
[ "f9abbc4f465bdc5220edb3327c63947ed24d8dc6" ]
[ "pyAudioAnalysis/audioVisualization.py" ]
[ "from __future__ import print_function\nimport shutil, struct, simplejson\nfrom scipy.spatial import distance\nfrom pylab import *\nimport ntpath\nfrom pyAudioAnalysis import audioFeatureExtraction as aF\nfrom pyAudioAnalysis import audioTrainTest as aT\nimport sklearn\nimport sklearn.discriminant_analysis\nimport ...
[ [ "sklearn.discriminant_analysis.LinearDiscriminantAnalysis", "scipy.spatial.distance.pdist", "sklearn.decomposition.PCA" ] ]
GregoryAustin/mlgal-unsupervised
[ "a1f211e6bc84fb06494bfde0448267a2ae0f57d1" ]
[ "old news/conv_vae (backup 2).py" ]
[ "from __future__ import print_function\nimport argparse\nimport torch\nimport torch.utils.data\nfrom torch import nn, optim\nfrom torch.autograd import Variable\nimport torch.nn as nn\nfrom torch.nn import functional as F\nfrom torchvision import datasets, transforms\nfrom torchvision.utils import save_image\nimpor...
[ [ "torch.nn.Linear", "torch.cat", "torch.cuda.manual_seed", "torch.nn.Sigmoid", "torch.autograd.Variable", "torch.nn.ConvTranspose2d", "torch.manual_seed", "torch.nn.ReLU", "torch.nn.Conv2d", "torch.cuda.is_available", "torch.utils.data.DataLoader", "torch.randn" ] ...