repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
billschereriii/SmartSim
[ "7ef4cffeba23fe19b931bdae819f4de99bb112a3" ]
[ "smartsim/ml/torch/data.py" ]
[ "import numpy as np\nimport torch\n\nfrom smartsim.ml.data import DynamicDataDownloader, StaticDataDownloader\n\n\nclass StaticDataGenerator(StaticDataDownloader, torch.utils.data.IterableDataset):\n \"\"\"A class to download a dataset from the DB.\n\n Details about parameters and features of this class can b...
[ [ "numpy.arange", "torch.utils.data.get_worker_info", "numpy.random.shuffle" ] ]
dwhite54/insightface
[ "ea172e4921c3960c0684404afff6d0d862447eae", "ea172e4921c3960c0684404afff6d0d862447eae", "ea172e4921c3960c0684404afff6d0d862447eae", "ea172e4921c3960c0684404afff6d0d862447eae" ]
[ "detection/RetinaFaceAntiCov/test.py", "recognition/partial_fc/mxnet/evaluation/ijb.py", "gender-age/mtcnn_detector.py", "gender-age/face_model.py" ]
[ "import cv2\nimport sys\nimport numpy as np\nimport datetime\nimport os\nimport glob\nfrom retinaface_cov import RetinaFaceCoV\n\nthresh = 0.8\nmask_thresh = 0.2\nscales = [640, 1080]\n\ncount = 1\n\ngpuid = 0\n#detector = RetinaFaceCoV('./model/mnet_cov1', 0, gpuid, 'net3')\ndetector = RetinaFaceCoV('./model/mnet_...
[ [ "numpy.round", "numpy.max", "numpy.min" ], [ "matplotlib.pyplot.legend", "numpy.linspace", "numpy.flipud", "numpy.mean", "numpy.where", "pandas.read_csv", "numpy.unique", "numpy.fliplr", "numpy.save", "numpy.load", "numpy.zeros", "matplotlib.pyplot.f...
cbs228/nbtschema
[ "1d040229ee608bc5b22d3ec2781ce1a1e173b4a4" ]
[ "nbtschematic/schematic.py" ]
[ "# coding=UTF-8\n\"\"\" Defines an nbtlib schema for schematic files \"\"\"\nfrom typing import Tuple\nimport enum\nimport numpy as np\nimport nbtlib as nbt\n\n\nclass Entity(nbt.CompoundSchema):\n \"\"\"\n Entities describe objects which are not anchored to blocks, like mobs.\n \"\"\"\n schema = {\n ...
[ [ "numpy.all", "numpy.zeros" ] ]
lime-j/YTMT-Strategy-1
[ "aacc38c4e61b91e187cac81aa95500e0422d4d0f" ]
[ "models/opt_ytmt_model_sirs.py" ]
[ "import torch\nfrom torch import nn\nimport torch.nn.functional as F\n\nimport os\nimport numpy as np\nfrom collections import OrderedDict\n\nimport util.util as util\nimport util.index as index\nimport models.networks as networks\nimport models.losses_opt as losses\nfrom models import arch\n\nfrom .base_model impo...
[ [ "torch.abs", "torch.sigmoid", "torch.norm", "torch.cat", "torch.zeros", "numpy.clip", "torch.load", "numpy.tile", "torch.no_grad", "numpy.prod", "numpy.transpose", "torch.nn.functional.interpolate", "torch.cuda.is_available" ] ]
drmaxchen/pyradio
[ "f2e46856425cfb233d29d391199bfb9b85824b06" ]
[ "radiomics/shape.py" ]
[ "import numpy\nimport SimpleITK as sitk\n\nfrom radiomics import base, cShape, deprecated\n\n\nclass RadiomicsShape(base.RadiomicsFeaturesBase):\n r\"\"\"\n In this group of features we included descriptors of the three-dimensional size and shape of the ROI. These features\n are independent from the gray level i...
[ [ "numpy.sqrt", "numpy.linalg.eig", "numpy.tile", "numpy.bitwise_and", "numpy.mean", "numpy.array", "numpy.where", "numpy.sum" ] ]
nehiridil/MLDays_nlp
[ "20d29d01836c82361cb1b656f2e98d7435a93622", "20d29d01836c82361cb1b656f2e98d7435a93622", "20d29d01836c82361cb1b656f2e98d7435a93622" ]
[ "bobo/Lib/site-packages/gensim/models/wrappers/ldavowpalwabbit.py", "bobo/Lib/site-packages/gensim/topic_coherence/aggregation.py", "bobo/Lib/site-packages/gensim/topic_coherence/text_analysis.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) 2015 Dave Challis <dave@suicas.net>\n# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html\n\n\"\"\"Python wrapper for `Vowpal Wabbit's Latent Dirichlet Allocation <https://github.com/JohnLangford/vowpal_wabbit/>`_.\n\nThis use...
[ [ "numpy.exp2", "numpy.zeros" ], [ "numpy.mean" ], [ "numpy.nonzero", "numpy.unique", "numpy.iinfo", "numpy.zeros", "scipy.sparse.lil_matrix" ] ]
eaaskt/nlu
[ "77382be572ce59f15d8ea9c5cd653615c39891d1" ]
[ "capsnet-arch/test.py" ]
[ "import math\nimport os\n\nimport data_loader\nimport model_s2i\nimport flags\nimport util\nimport numpy as np\nimport tensorflow as tf\nfrom seqeval.metrics import accuracy_score\nfrom seqeval.metrics import f1_score\nfrom seqeval.metrics import precision_score\nfrom seqeval.metrics import recall_score\nfrom sklea...
[ [ "tensorflow.train.Saver", "matplotlib.pyplot.tight_layout", "tensorflow.train.latest_checkpoint", "numpy.arange", "matplotlib.pyplot.subplots", "sklearn.metrics.confusion_matrix", "tensorflow.squeeze", "tensorflow.ConfigProto", "matplotlib.pyplot.savefig", "tensorflow.reset...
PACarniglia/Stone-Soup
[ "f190be0bb577650db26cb10d4c86b5c790224d4d" ]
[ "stonesoup/mixturereducer/gaussianmixture.py" ]
[ "# -*- coding: utf-8 -*-\nfrom scipy.spatial import distance as dist\nimport uuid\n\nfrom ..base import Property\nfrom .base import MixtureReducer\nfrom ..types.state import TaggedWeightedGaussianState, WeightedGaussianState\nfrom operator import attrgetter\n\n\nclass GaussianMixtureReducer(MixtureReducer):\n \"...
[ [ "scipy.spatial.distance.mahalanobis" ] ]
CavitationDetection/XGBoost_ASFE
[ "a55bbf2d91b1b30f116bed9eddce62d78bf89b83" ]
[ "feature_extration.py" ]
[ "import os \nimport scipy.io as scio\nimport math\nfrom scipy import stats\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport math\nimport csv\n'''\n1. Central Trend Statistics:\n --- mean \n --- median\n --- low quartile\n --- upper quartile\n2. Dispersion Degree Statistics:...
[ [ "pandas.read_csv", "numpy.abs", "numpy.min", "pandas.DataFrame", "numpy.max", "numpy.std", "numpy.mean" ] ]
ZendriXXX/predict-python
[ "fe0360b4888980421f8f91f158d6523729bfc5f7" ]
[ "src/encoding/declare/declare_mining.py" ]
[ "\"\"\"\nMain file for deviance mining\n\"\"\"\nimport numpy as np\n\nfrom src.encoding.declare.declare_templates import *\n\n\ndef apply_template_to_log(template, candidate, log):\n \"\"\"returns the log with template applied\n\n :param template:\n :param candidate:\n :param log:\n :return:\n \"\...
[ [ "numpy.array" ] ]
tzuliu/Contrastive-Multiple-Correspondence-Analysis-cMCA
[ "a59a5c36dd5d4ac04205627827e792322742462d", "a59a5c36dd5d4ac04205627827e792322742462d" ]
[ "Replication Python and R Codes/Figure_4/cMCA_UTAS2012_LDPDPJ_new2.py", "Replication Python and R Codes/Figure_10/cMCA_UTAS2012_LDPDPJ_loading_2.py" ]
[ "import pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport prince\nfrom sklearn.cluster import DBSCAN\nimport itertools\nfrom cmca import CMCA\nfrom ccmca import CCMCA\nplt.style.use('ggplot')\n\nalpha = r'$ \\alpha $'\n\n## Set up color\ntableau10 = {\n 'blue': '#507AA6',\n 'orange': '...
[ [ "matplotlib.pyplot.legend", "pandas.concat", "pandas.read_csv", "matplotlib.pyplot.gca", "matplotlib.pyplot.scatter", "matplotlib.pyplot.ylim", "matplotlib.pyplot.xlim", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot...
jaesik817/tf-gqn
[ "9ff2142f8817ee571dbc3fc99284311c44f4e48d" ]
[ "tests/test_gqn_objective.py" ]
[ "\"\"\"\nQuick test script to shape-check graph definition of full GQN model with ELBO\nobjective with random toy data.\n\"\"\"\n\nimport os\nimport sys\nSCRIPT_PATH = os.path.dirname(os.path.abspath(__file__))\nTF_GQN_HOME = os.path.abspath(os.path.join(SCRIPT_PATH, '..'))\nsys.path.append(TF_GQN_HOME)\n\nimport t...
[ [ "tensorflow.constant", "tensorflow.placeholder", "tensorflow.global_variables_initializer", "numpy.random.rand", "tensorflow.Session" ] ]
JoanRosell/arviz
[ "0fde5058d5a09469b784972c2197f032eb27238a" ]
[ "arviz/plots/backends/__init__.py" ]
[ "# pylint: disable=no-member,invalid-name,redefined-outer-name\n\"\"\"ArviZ plotting backends.\"\"\"\nimport re\n\nimport numpy as np\nfrom pandas import DataFrame\n\nfrom ...rcparams import rcParams\n\n\ndef to_cds(\n data,\n var_names=None,\n groups=None,\n dimensions=None,\n group_info=True,\n ...
[ [ "numpy.atleast_2d", "numpy.array", "pandas.DataFrame.from_dict" ] ]
quancs/pytorch-lightning
[ "c6478414ee2521d8768afba7dc6699326c056e17" ]
[ "pytorch_lightning/overrides/distributed.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.Generator", "torch.is_grad_enabled" ] ]
ManoelRIos/sorting-algorithm
[ "eea85e2e3a084ac0f3ac4f872adfee3440b5f3f3" ]
[ "bar.py" ]
[ "import matplotlib.pyplot as plt\nimport pandas as pd\nimport numpy as np\n\nalist = [1,2,3,4,5,6,7,8,9,10]\nxlist = [1,2,3,4,5,6,7,8,9,10]\nplt.bar(alist, xlist)\nplt.show()" ]
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.bar" ] ]
MiWeiss/probability
[ "3da47c7c26a83ccb0734461836d127f938586abb", "3da47c7c26a83ccb0734461836d127f938586abb", "3da47c7c26a83ccb0734461836d127f938586abb" ]
[ "tensorflow_probability/python/experimental/vi/surrogate_posteriors.py", "tensorflow_probability/python/sts/structural_time_series.py", "tensorflow_probability/python/sts/forecast_test.py" ]
[ "# Copyright 2019 The TensorFlow Probability 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.compat.v2.Variable", "tensorflow.compat.v2.ones_like", "tensorflow.compat.v2.get_static_value", "tensorflow.compat.v2.nest.flatten", "tensorflow.compat.v2.nest.is_nested", "tensorflow.python.util.nest.flatten", "tensorflow.compat.v2.name_scope", "tensorflow.python.util....
gildas-ev/Game-of-Life
[ "5d101b5f63c2ef201442d2b78909b1ed048dba36" ]
[ "file.py" ]
[ "# Imports\r\nimport numpy as np\r\nfrom scipy.ndimage import convolve\r\nfrom matplotlib import pyplot as plt\r\nfrom matplotlib import animation\r\nimport pickle\r\nimport time\r\n\r\nshape = (300, 300) # Shape of the grid (width x height)\r\ndensity = 0.30 # ~Living cells density at t0\r\nn_steps = 250 # Number ...
[ [ "matplotlib.pyplot.imshow", "scipy.ndimage.convolve", "matplotlib.animation.FuncAnimation", "numpy.random.uniform", "numpy.array", "matplotlib.pyplot.show", "numpy.where", "matplotlib.pyplot.figure" ] ]
isabella232/group_testing
[ "b1023442d3b8ef98c04dd1c406d5cc8349d37da7" ]
[ "group_testing/group_selectors/random.py" ]
[ "# coding=utf-8\n# Copyright 2020 Google LLC.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl...
[ [ "numpy.amax", "numpy.random.choice", "numpy.min", "numpy.delete", "numpy.mean", "numpy.broadcast_to", "numpy.zeros", "numpy.sum" ] ]
sassystacks/TissueMechanicsLab
[ "0f881a57ebf7cbadfeb2041daabd4e4b79b25b91", "0f881a57ebf7cbadfeb2041daabd4e4b79b25b91", "0f881a57ebf7cbadfeb2041daabd4e4b79b25b91" ]
[ "Analysis/CardioVascularLab/Testing/BiaxDataBinning/BinRawBiaxData.py", "Analysis/CardioVascularLab/ExVivo/Analyzer/TransitionProperties.py", "Analysis/CardioVascularLab/ExVivo/uniaxanalysis/getproperties.py" ]
[ "import os\nimport pandas as pd\nimport seaborn as sns\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nclass ReadParams:\n\n def __init__(self):\n self.DotFileHeaders = [ 'FrameTime', 'X0', 'Y0', 'X1', 'Y1', 'X2', 'Y2',\n 'X3', 'Y3', 'X4', 'Y4', 'E11', 'E22', 'E12',\n ...
[ [ "pandas.to_timedelta", "matplotlib.pyplot.show", "pandas.read_csv" ], [ "numpy.sqrt", "numpy.array_equal", "numpy.min", "numpy.abs", "numpy.around", "matplotlib.pyplot.subplots", "numpy.stack", "numpy.empty", "numpy.concatenate", "numpy.max", "numpy.argm...
AIpioneer/paddle2onnx
[ "ba7388bf472347b1cf7de5d79edf8aad5f5c7d47" ]
[ "paddle2onnx/op_mapper/tensor.py" ]
[ "# Copyright (c) 2020 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.ones" ] ]
ThijsHrm/nxviz
[ "2bfdbebd7313b629677aeb91aebf48cd851a05dd" ]
[ "examples/matrix/barbell.py" ]
[ "\"\"\"\nDisplays a NetworkX barbell graph to screen using a CircosPlot.\n\nFeatures of this example:\n- MatrixPlot\n- Styling matrix plot with different colormap.\n\"\"\"\n\nimport matplotlib.pyplot as plt\nimport networkx as nx\n\nfrom nxviz.plots import MatrixPlot\n\nG = nx.barbell_graph(m1=10, m2=3)\n\n# Instan...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.cm.get_cmap" ] ]
magnuel14/test-face
[ "5f3e6016cc7a83aeb96c4ef003760315a448e317" ]
[ "utils/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.io.gfile.GFile" ] ]
IlyaOrson/control_neuralode
[ "4fb10aae2315ace5565f59dbfc04e23efd140f53" ]
[ "plots/plots.py" ]
[ "import numpy as np\nimport pandas as pd\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nfrom pathlib import Path\n\nplt.style.use(\"seaborn-colorblind\") # \"ggplot\"\n\npalette = plt.cm.Dark2.colors\n\nfont = {\"family\": \"STIXGeneral\", \"size\": 16}\nsavefig = {\"dpi\": 600, \"bbox\": \"tight\"}\n...
[ [ "matplotlib.pyplot.legend", "pandas.read_csv", "matplotlib.pyplot.title", "matplotlib.pyplot.subplots", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.pyplot.setp", "matplotlib.cycler", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotli...
KonstantinKlepikov/scikit-fda
[ "93c4ad80aaba8739b4f90932a2a759d6f5960387" ]
[ "tests/test_oneway_anova.py" ]
[ "import unittest\nimport numpy as np\nimport pytest\n\nfrom skfda.representation import FDataGrid\nfrom skfda.representation.basis import Fourier\nfrom skfda.datasets import fetch_gait\nfrom skfda.inference.anova import oneway_anova, v_asymptotic_stat, \\\n v_sample_stat\n\n\nclass OnewayAnovaTests(unittest.Test...
[ [ "numpy.mean", "numpy.sqrt", "numpy.linspace" ] ]
declanmillar/neural-networks-and-deep-learning
[ "e84209e73ea2cbed4b86ff46b4f5676a65a381a9" ]
[ "src/network2.py" ]
[ "\"\"\"\r\nnetwork2.py\r\n~~~~~~~~~~~~~~\r\nAn improved version of network.py, implementing the stochastic\r\ngradient descent learning algorithm for a feedforward neural network.\r\nImprovements include the addition of the cross-entropy cost function,\r\nregularization, and better initialization of network weights...
[ [ "numpy.dot", "numpy.log", "numpy.sqrt", "numpy.linalg.norm", "numpy.argmax", "numpy.random.randn", "numpy.array", "numpy.exp", "numpy.zeros" ] ]
juliusf/Genetic-SRCPSP
[ "0ab31ff9e929576a922eaab4f8d6618cf02e8ce8" ]
[ "deepThought/stats/phase_type.py" ]
[ "__author__ = 'jules'\n\nimport numpy as np\n\nfrom scipy.stats import uniform\n\nfrom customDistributions import Hyperexp2_gen, Erlangk_gen, Gamma, BranchingErlang, TruncatedErlangk_gen, MixtureNormUni, TruncatedHyperexp2\n\nimport math\n\ndef infer_distribution(job):\n\n X = np.array(job.execution_history)\n ...
[ [ "numpy.sqrt", "scipy.stats.uniform", "numpy.mean", "numpy.var", "numpy.array" ] ]
dfface/DoctorKG
[ "6bd6ebec8244a9ce0a2c8c278a704f02b9afaaf8", "6bd6ebec8244a9ce0a2c8c278a704f02b9afaaf8" ]
[ "tools/deepke/relation_extraction/few_shot/lit_models/util.py", "tools/deepke/relation_extraction/multimodal/modules/dataset.py" ]
[ "import numpy as np \r\n\r\n\r\ndef dialog_f1_eval(logits, labels):\r\n def getpred(result, T1=0.5, T2=0.4):\r\n # 使用阈值得到preds, result = logits\r\n # T2 表示如果都低于T2 那么就是 no relation, 否则选取一个最大的\r\n ret = []\r\n for i in range(len(result)):\r\n r = []\r\n maxl, maxj ...
[ [ "numpy.asarray", "numpy.argmax", "numpy.exp" ], [ "torch.stack", "torch.tensor", "torch.zeros", "torch.load" ] ]
carlov93/predictive_maintenance
[ "eb00b82bde02668387d0308571296a82f78abef6" ]
[ "src/ai/utils/data_preperator.py" ]
[ "import pandas as pd\nfrom torch.utils.data import Dataset, DataLoader\nfrom sklearn.preprocessing import StandardScaler\nimport numpy as np\nfrom keras.preprocessing.sequence import TimeseriesGenerator\nimport torch\n\n\nclass DataPreperator:\n \"\"\"\n This class provides methods for pre-processing the sens...
[ [ "pandas.read_csv", "numpy.sqrt", "numpy.subtract", "numpy.concatenate", "sklearn.preprocessing.StandardScaler" ] ]
markcx/pecan-dataport-DB
[ "2b3f628ea9e202bb736d75c49a3ffa50db93729d" ]
[ "module/convert_yaml_to_hdf5.py" ]
[ "from __future__ import print_function, division\n\nfrom copy import deepcopy\nfrom os import listdir\nfrom os.path import isdir, isfile, join, splitext\nfrom sys import stderr\n\nimport pandas as pd\nimport yaml\nfrom six import iteritems\n\nfrom .object_concatenation import get_appliance_types\n# from meta_info i...
[ [ "pandas.HDFStore" ] ]
mitchellvitez/tensorflow
[ "675799d1056fd05acc61ba85bdf8db9b86be0139" ]
[ "tensorflow/python/ops/math_ops.py" ]
[ "# Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "tensorflow.python.ops.gen_math_ops.real", "tensorflow.python.framework.ops.executing_eagerly_outside_functions", "tensorflow.python.ops.gen_math_ops.sign", "tensorflow.python.ops.gen_math_ops.sparse_segment_mean", "tensorflow.python.framework.graph_util.tensor_shape_from_node_def_name", "...
quoniammm/mine-pytorch
[ "09d2e6a4a11b472187012be035600a0c84f4cfa5", "09d2e6a4a11b472187012be035600a0c84f4cfa5" ]
[ "torch_basic/nmt(seq2seq&attention).py", "awsome_implements/attention_is_all_you_need/m-tensorflow/train.py" ]
[ "#%%\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\nfrom torch import optim\n\nimport re\nimport time\nimport jieba\nimport random\nimport math\nimport string\n\n#%%\n# # 1.数据处理部分\nUSE_CUDA = False\npath = 'data/cmn-eng/'\nSOS_token = 0\nEOS_token = 1\nMA...
[ [ "torch.LongTensor", "torch.nn.NLLLoss", "torch.nn.functional.softmax", "torch.zeros", "torch.cat", "torch.nn.GRU", "torch.nn.Embedding", "torch.nn.Linear" ], [ "tensorflow.train.Supervisor" ] ]
tschoi6712/pythonDataAnalysis2nd
[ "63e366d4dee52f7e4df6cf4d988a85d6de5b00e4", "63e366d4dee52f7e4df6cf4d988a85d6de5b00e4", "63e366d4dee52f7e4df6cf4d988a85d6de5b00e4", "63e366d4dee52f7e4df6cf4d988a85d6de5b00e4" ]
[ "Chapter01/ch1-3.gettingStarted.py", "Chapter09/chh9-2.nltk.py", "Chapter11/f2py/fort_demo.py", "Chapter09/chh9-1.nltk.py" ]
[ "\"\"\"\nMatplotlib plots\n\"\"\"\n\nfrom sklearn.datasets import load_iris\nfrom sklearn.datasets import load_boston\nfrom matplotlib import pyplot as plt\n\n\niris = load_iris()\nprint(iris.DESCR)\ndata = iris.data\nplt.plot(data[:, 0], data[:, 1], \".\")\nplt.show()\n\n\nboston = load_boston()\nprint(boston.DESC...
[ [ "matplotlib.pyplot.plot", "matplotlib.pyplot.show", "sklearn.datasets.load_iris", "sklearn.datasets.load_boston" ], [ "matplotlib.pyplot.show", "sklearn.feature_extraction.text.TfidfVectorizer", "pandas.DataFrame", "matplotlib.pyplot.figure" ], [ "numpy.load" ], [ ...
TonySoloProjects/network_log_visualization
[ "bcf1b648009abcd15a3d71a7057610a583ee0dde" ]
[ "network_log_plotter_v02.py" ]
[ "\"\"\"\nNetworkLogPlotter visualizes NetworkLogReader objects to find relationships between\nserver send and receive errors on a network.\n\nCreated by: Tony Held tony.held@gmail.com\nCreated on: 2020/09/10\nCopyright © 2020 Tony Held. All rights reserved.\n\"\"\"\n\nimport numpy as np\nimport matplotlib.pyplot a...
[ [ "matplotlib.pyplot.subplots", "numpy.cumsum", "matplotlib.pyplot.show", "numpy.sum" ] ]
conradbm/streamml2
[ "f2c5cec0c397b348b5faf5ea965ec8dc21518d5f" ]
[ "streamml2/tests/baseline/test_model_selection_flow_classification.py" ]
[ "\"\"\"\n#\n#\n#\n#\n# Model Selection Example (Classification)\n# test_model_selection_flow.py\n#\n#\n#\n#\n#\n#\n\nModel Selection Params:\n def flow(self, \n models_to_flow=[], \n params=None, \n test_size=0.2, \n nfolds=3, \n nrepeats=3,\n ...
[ [ "sklearn.datasets.load_iris", "pandas.DataFrame" ] ]
zhengknight/tensorpack
[ "726747313fb2f189dd195d32087897b16a23be0a", "726747313fb2f189dd195d32087897b16a23be0a", "726747313fb2f189dd195d32087897b16a23be0a", "726747313fb2f189dd195d32087897b16a23be0a", "726747313fb2f189dd195d32087897b16a23be0a", "726747313fb2f189dd195d32087897b16a23be0a" ]
[ "tensorpack/tfutils/summary.py", "tensorpack/callbacks/group.py", "examples/ResNet/resnet_model.py", "tensorpack/tfutils/optimizer.py", "tensorpack/callbacks/inference_runner.py", "examples/HED/hed.py" ]
[ "# -*- coding: utf-8 -*-\n# File: summary.py\n\n\nimport six\nimport tensorflow as tf\nimport re\nfrom six.moves import range\nfrom contextlib import contextmanager\n\nfrom tensorflow.python.training import moving_averages\n\nfrom ..utils import logger\nfrom ..utils.argtools import graph_memoized\nfrom ..utils.nami...
[ [ "tensorflow.python.training.moving_averages.assign_moving_average", "tensorflow.Summary.Image", "tensorflow.reduce_mean", "tensorflow.get_collection", "tensorflow.cast", "tensorflow.nn.zero_fraction", "tensorflow.constant_initializer", "tensorflow.add_to_collection", "tensorflo...
plin1112/cclib
[ "b048c9a60a33dd4d8e0ebe93671c5a35b6c018e3", "b048c9a60a33dd4d8e0ebe93671c5a35b6c018e3" ]
[ "cclib/parser/qchemparser.py", "test/bridge/testpyquante.py" ]
[ "# -*- coding: utf-8 -*-\n#\n# Copyright (c) 2020, the cclib development team\n#\n# This file is part of cclib (http://cclib.github.io) and is distributed under\n# the terms of the BSD 3-Clause License.\n\n\"\"\"Parser for Q-Chem output files\"\"\"\n\nfrom __future__ import division\nfrom __future__ import print_fu...
[ [ "numpy.array", "numpy.empty" ], [ "numpy.testing.assert_array_almost_equal" ] ]
samialperen/adaboost_vs_svm
[ "9967378607dbde936f06214b0fcfd042c60a9759" ]
[ "code/linear_svm.py" ]
[ "# This script contains code for Linear SVMs\n# Author: Sami Alperen Akgun\n# Email: sami.alperen.akgun@gmail.com\n\nimport os\nimport numpy as np\nfrom matplotlib import pyplot as plt \nfrom sklearn import svm #svm library from sklearn Python module\n\ndef read_data(data_path, filename,feature_number):\n \"\"\"...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.gca", "matplotlib.pyplot.title", "numpy.linspace", "numpy.genfromtxt", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylabel", "sklearn.svm.SVC", "matplotlib.pyplot.close", "matplotlib.pyplot.waitforbuttonpress", "matplotlib....
stjordanis/Hyperactive
[ "5acf247d8023ff6761593b9d0954bdd912d20aed" ]
[ "examples/optimization_techniques/ensemble_optimizer.py" ]
[ "from sklearn.datasets import load_iris\nfrom sklearn.neighbors import KNeighborsClassifier\nfrom sklearn.model_selection import cross_val_score\n\nfrom sklearn.svm import SVR\nfrom sklearn.tree import DecisionTreeRegressor\nfrom sklearn.neural_network import MLPRegressor\n\nfrom hyperactive import Hyperactive, Ens...
[ [ "sklearn.model_selection.cross_val_score", "sklearn.tree.DecisionTreeRegressor", "sklearn.datasets.load_iris", "sklearn.neighbors.KNeighborsClassifier", "sklearn.svm.SVR", "sklearn.neural_network.MLPRegressor" ] ]
orclassiq/amazon-braket-sdk-python
[ "69acaf54237ecbee14b5b5f0549fa28e32eba83b" ]
[ "src/braket/circuits/gates.py" ]
[ "# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#\n# or in the \"license...
[ [ "numpy.log2", "numpy.sqrt", "numpy.eye", "numpy.cos", "numpy.sin", "numpy.exp", "numpy.array" ] ]
iwoithe/Gimel-Studio
[ "e2750576e72edee6f2f4c268045b81459df82d89" ]
[ "src/GimelStudio/corenodes/convert/to_normal_map_node.py" ]
[ "# THIS FILE IS A PART OF GIMEL STUDIO AND IS LICENSED UNDER THE SAME TERMS:\n# ----------------------------------------------------------------------------\n# Gimel Studio Copyright 2019-2021 by Noah Rahm and contributors\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use th...
[ [ "numpy.power", "numpy.arange", "numpy.max", "numpy.exp", "numpy.array", "numpy.zeros" ] ]
zacharyCormack/Assortment
[ "52a60f1ec207dfb9a9f154204c0b24cb4b129043" ]
[ "plots/anim.py" ]
[ "#!/usr/bin/python3\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.animation as animation\n\nfig = plt.figure(figsize=(8, 8), facecolor=\"lightgray\")\n\nax = plt.subplot(111, frameon=False)\n\ndata = np.random.normal(.5, .5, (128, 150))\nX = np.linspace(-1.2, 1.2, data.shape[-1])\nG = 1....
[ [ "numpy.linspace", "numpy.sin", "numpy.random.normal", "matplotlib.pyplot.subplot", "matplotlib.animation.FuncAnimation", "numpy.exp", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
andrewkwolek/numpy
[ "cbccbe9dee293ff2bf0167e37443ce4975781562" ]
[ "numpy/f2py/tests/test_array_from_pyobj.py" ]
[ "import os\nimport sys\nimport copy\nimport platform\nimport pytest\n\nimport numpy as np\n\nfrom numpy.core.multiarray import typeinfo\nfrom . import util\n\nwrap = None\n\n\ndef setup_module():\n \"\"\"\n Build the required testing extension module\n\n \"\"\"\n global wrap\n\n # Check compiler avai...
[ [ "numpy.core.multiarray.typeinfo.items", "numpy.intp", "numpy.dtype", "numpy.clongdouble", "numpy.array", "numpy.zeros" ] ]
niazangels/context_attentive_ir
[ "989fbfee5a0ac6b7ac7429bdee36fe6ed93ee234", "989fbfee5a0ac6b7ac7429bdee36fe6ed93ee234" ]
[ "neuroir/inputters/ranker/data.py", "neuroir/models/ranker.py" ]
[ "# src: https://github.com/facebookresearch/DrQA/blob/master/drqa/reader/data.py\r\nimport numpy as np\r\n\r\nfrom torch.utils.data import Dataset\r\nfrom torch.utils.data.sampler import Sampler\r\nfrom .vector import vectorize\r\n\r\n\r\n# ---------------------------------------------------------------------------...
[ [ "numpy.argsort", "numpy.random.random", "numpy.random.shuffle" ], [ "torch.optim.Adam", "torch.nn.functional.softmax", "torch.nn.functional.log_softmax", "torch.load", "torch.optim.Adamax", "torch.nn.functional.readline", "torch.nn.BCEWithLogitsLoss", "torch.optim.S...
Yoshanuikabundi/openff-qcsubmit
[ "c39233d1ad845e7cdcb264a1be8e21b0bd5fcd2b" ]
[ "openff/qcsubmit/datasets/entries.py" ]
[ "\"\"\"\nAll of the individual dataset entry types are defined here.\n\"\"\"\n\nfrom typing import Any, Dict, List, Optional, Tuple\n\nimport numpy as np\nimport openff.toolkit.topology as off\nimport qcelemental as qcel\nfrom pydantic import Field, validator\nfrom simtk import unit\n\nfrom openff.qcsubmit.common_s...
[ [ "numpy.array" ] ]
OMG-ICFP-FTW/icfp2021
[ "91b87968ce3fc6a8b6d6c6e362433f6de2463345", "91b87968ce3fc6a8b6d6c6e362433f6de2463345" ]
[ "aray/scripts/plot_boxlet.py", "aray/scripts/plot_intersect.py" ]
[ "#!/usr/bin/env python\n# boxlet.py - Boxlet class and utilities\n\n# %%\nimport matplotlib.pyplot as plt\nimport random\nfrom collections import namedtuple, defaultdict\nfrom dataclasses import dataclass\nfrom typing import List, Optional, Tuple, Union\nfrom itertools import product\n\nfrom aray.types import Point...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.subplots" ], [ "matplotlib.pyplot.subplots" ] ]
dingobye/TensorComprehensions
[ "0579904b4c812708cc6157c12dddebd4735bdf28" ]
[ "test_python/layers/test_scale.py" ]
[ "# Copyright (c) 2017-present, Facebook, 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 applicabl...
[ [ "torch.randn" ] ]
Lornatang/tensorflow-tutorial
[ "789012d02e800351efd92b3fa4d051ccb5b06ee7" ]
[ "caltech/val.py" ]
[ "import numpy as np\nimport tensorflow as tf\nimport cv2\n\nimport model\nimport input_data\n\n\nBATCH_SIZE = 1\nN_CLASSES = 4\nIMG_SIZE = 224\n\nX = tf.placeholder(tf.float32, shape=[IMG_SIZE, IMG_SIZE, 3])\n\n\ndef get_one_image(filepath):\n \"\"\"Read image to train.\n Args:\n filepath: raw_data di...
[ [ "tensorflow.train.get_checkpoint_state", "tensorflow.nn.softmax", "tensorflow.cast", "tensorflow.reshape", "tensorflow.placeholder", "numpy.argmax", "tensorflow.image.per_image_standardization", "tensorflow.Session", "tensorflow.train.Saver", "numpy.array" ] ]
ArqiSoft/ml-services
[ "0c9beacc4a98c3f55ed56969a8b7eb84c4209c21", "0c9beacc4a98c3f55ed56969a8b7eb84c4209c21", "0c9beacc4a98c3f55ed56969a8b7eb84c4209c21" ]
[ "Source/sds_tools/learner/fingerprints.py", "Source/sds_tools/predict.py", "Source/sds_tools/general_helper.py" ]
[ "\"\"\"\nModule which contain all data needed to calculate fingerprints/descriptors\nparameters. Contain internal codes, names, molstring and header getters.\n\"\"\"\nimport os\nimport pickle\n\nimport keras\nimport numpy as np\nimport tensorflow\nfrom keras.models import load_model\nfrom rdkit import Chem\nfrom rd...
[ [ "tensorflow.get_default_graph", "numpy.zeros" ], [ "sklearn.externals.joblib.load", "numpy.mean", "pandas.DataFrame" ], [ "sklearn.externals.joblib.load", "numpy.arange", "scipy.sparse.load_npz", "numpy.matmul", "numpy.transpose", "numpy.savetxt", "tensorflo...
MattCJones/flightcondition
[ "264df161f1ca9152bc77c9d1a1b8bc29652f8ef4" ]
[ "src/tests/test_flightcondition.py" ]
[ "#!/usr/bin/env python\n\"\"\"\nTest flight condition functionality.\n\nAuthor: Matthew C. Jones\nEmail: matt.c.jones.aoe@gmail.com\n\n:copyright: 2021 Matthew C. Jones\n:license: MIT License, see LICENSE for more details.\n\"\"\"\n\n# flake8: noqa E203\n\nimport pytest\nimport re\n\nfrom shlex import split\nfrom s...
[ [ "numpy.array" ] ]
changhoonhahn/GQP_mock_challenge
[ "831d5423edd9955ee1bda8d41e44d30cd3c6bd4b", "831d5423edd9955ee1bda8d41e44d30cd3c6bd4b", "831d5423edd9955ee1bda8d41e44d30cd3c6bd4b", "831d5423edd9955ee1bda8d41e44d30cd3c6bd4b" ]
[ "run/mocha_P2_provabgs.py", "run/mocha_SP1_tau.py", "run/fm_lgal.py", "gqp_mc/fm.py" ]
[ "'''\n\nP2 test (LGalaxies mocks) using provabgs model \n\n'''\nimport os, sys\nimport pickle \nimport numpy as np\nfrom functools import partial\nfrom multiprocessing.pool import Pool \n# --- gqp_mc ---\nfrom gqp_mc import util as UT \n# --- provabgs ---\nfrom provabgs import infer as Infer\nfrom provabgs import m...
[ [ "numpy.arange", "numpy.save" ], [ "numpy.arange", "numpy.save" ], [ "numpy.sum", "numpy.random.choice", "numpy.min", "numpy.arange", "numpy.max", "scipy.interpolate.interp1d", "numpy.log10", "numpy.random.randn", "numpy.array", "numpy.zeros", "sc...
wangyendt/deeplearning_models
[ "47883b6c65b8d05a0d1c5737f1552df6476ded34" ]
[ "sklearn/sklearn learning/demonstration/auto_examples_python/applications/plot_stock_market.py" ]
[ "\"\"\"\n=======================================\nVisualizing the stock market structure\n=======================================\n\nThis example employs several unsupervised learning techniques to extract\nthe stock market structure from variations in historical quotes.\n\nThe quantity that we use is the daily var...
[ [ "numpy.diag", "numpy.abs", "matplotlib.pyplot.scatter", "sklearn.manifold.LocallyLinearEmbedding", "matplotlib.pyplot.axes", "matplotlib.pyplot.clf", "sklearn.cluster.affinity_propagation", "matplotlib.pyplot.axis", "numpy.triu", "matplotlib.pyplot.show", "numpy.where",...
lkuligin/cs231n
[ "b0749792a845e4ff11bda9204fb8bf7a7dcc99ea", "b0749792a845e4ff11bda9204fb8bf7a7dcc99ea" ]
[ "assignment3/classifiers/squeezenet.py", "assignment1/classifiers/tests/test_knn.py" ]
[ "import tensorflow as tf\n\nNUM_CLASSES = 1000\n\ndef fire_module(x,inp,sp,e11p,e33p):\n with tf.variable_scope(\"fire\"):\n with tf.variable_scope(\"squeeze\"):\n W = tf.get_variable(\"weights\",shape=[1,1,inp,sp])\n b = tf.get_variable(\"bias\",shape=[sp])\n s = tf.nn.co...
[ [ "tensorflow.nn.bias_add", "tensorflow.nn.relu", "tensorflow.get_variable", "tensorflow.concat", "tensorflow.nn.max_pool", "tensorflow.reshape", "tensorflow.placeholder", "tensorflow.nn.avg_pool", "tensorflow.one_hot", "tensorflow.variable_scope", "tensorflow.train.Saver...
jasonZhang892/ncnn
[ "c2fb93b6ff99045dd76aae2d41218a15df189247" ]
[ "tools/pnnx/tests/ncnn/test_squeezenet1_1.py" ]
[ "# Tencent is pleased to support the open source community by making ncnn available.\n#\n# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.\n#\n# Licensed under the BSD 3-Clause License (the \"License\"); you may not use this file except\n# in compliance with the License. You may obtain a...
[ [ "torch.manual_seed", "torch.allclose", "torch.jit.trace", "torch.rand" ] ]
varshiths/scg-augmented
[ "f5188237feb4bc2c4f61351a862bc1b6ce1ce85f" ]
[ "misc/corpus_freq.py" ]
[ "'''\nTo be run from root folder as misc/corpus_freq.py\nGenerates the biases from given corpus and places in data folder\n\nuses spacy backend.\n\nto setup:\npip install -U spacy[cuda92]\npython -m spacy download en\n'''\n\nimport json\nimport numpy as np\nimport sng_parser\nimport codecs\n\nfrom tqdm import tqdm\...
[ [ "numpy.zeros", "numpy.save" ] ]
sillsdev/machine.py
[ "61c0b29e706636a2353a1afc0b3ee372db7e632f" ]
[ "machine/translation/tensorflow/saved_model_nmt_engine.py" ]
[ "from dataclasses import dataclass\nfrom typing import Any, Iterable, Sequence\n\nimport tensorflow as tf\n\nfrom ...annotations import Range\nfrom ...utils.typeshed import StrPath\nfrom ..translation_engine import TranslationEngine\nfrom ..translation_result import TranslationResult\nfrom ..translation_result_buil...
[ [ "tensorflow.argmax", "tensorflow.constant" ] ]
punkdit/bruhat
[ "3231eacc49fd3464542f7eb72684751371d9876c" ]
[ "bruhat/serre_example.py" ]
[ "#!/usr/bin/env python3\n\n\"\"\"\nExercise 13.4 from Serre \"Linear Representations of Finite Groups \", 1977.\n\"\"\"\n\nimport sys, os\n\nimport numpy\n\nfrom element import Linear, Z, Q\nfrom action import mulclose\n\nM = Linear(4, Q)\n\n\ndef quaternion(a, b, c, d):\n # build matrix representation of quater...
[ [ "numpy.array" ] ]
newerZGQ/newerZGQ.github.io
[ "79c9e510c7011b6284022d7880687247c5745e65" ]
[ "2017/12/26/convolution-introduction/figure.py" ]
[ "import matplotlib.pyplot as plt\nimport numpy as np\n\nplt.axis([0,4,0,2])\nplt.xlabel(\"τ\")\n\nX = np.linspace(np.pi/6, np.pi, 256, endpoint = True)\nA = 0.5*np.cos(3 * X) + 1\nplt.plot(X,A)\nplt.plot([1.5,3.5],[0.2,1])\n\nplt.text(2.2,1.5,\"f(τ)\",fontsize = 15)\nplt.text(3.5,1.1,\"h(t-τ)\",fontsize = 15)\n\npl...
[ [ "numpy.linspace", "numpy.cos", "matplotlib.pyplot.plot", "matplotlib.pyplot.axis", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.text", "matplotlib.pyplot.show" ] ]
Axeldnahcram/panel
[ "ac04ed1c08a993cd678fb162deb5fa567184ec40" ]
[ "panel/widgets/slider.py" ]
[ "\"\"\"\nDefines the Widget base class which provides bi-directional\ncommunication between the rendered dashboard and the Widget\nparameters.\n\"\"\"\nfrom six import string_types\n\nimport param\nimport numpy as np\n\nfrom bokeh.models import CustomJS\nfrom bokeh.models.formatters import TickFormatter\nfrom bokeh...
[ [ "numpy.arange" ] ]
napoler/bert-cn
[ "62c18cc03b7fa1831fccb0faa15853952dc15280" ]
[ "bert_server/run/pregenerate_training_data.py" ]
[ "from argparse import ArgumentParser\nfrom pathlib import Path\nfrom tqdm import tqdm, trange\nfrom tempfile import TemporaryDirectory\nimport shelve\n\nfrom random import random, randrange, randint, shuffle, choice, sample\nfrom pytorch_pretrained_bert.tokenization import BertTokenizer\nimport numpy as np\nimport ...
[ [ "numpy.cumsum", "numpy.searchsorted" ] ]
guyongqiangx/construct
[ "72c80035f703d29b1dc62a3e08831d68b29a6e40", "72c80035f703d29b1dc62a3e08831d68b29a6e40" ]
[ "tests/test_core.py", "construct/lib/containers.py" ]
[ "# -*- coding: utf-8 -*-\n\nfrom declarativeunittest import *\nfrom construct import *\nfrom construct.lib import *\n\n\ndef test_bytes():\n d = Bytes(4)\n common(d, b\"1234\", b\"1234\", 4)\n assert d.parse(b\"1234567890\") == b\"1234\"\n assert raises(d.parse, b\"\") == StreamError\n assert raises(...
[ [ "numpy.array" ], [ "numpy.array_equal" ] ]
Simon0xzx/metaworld
[ "2d441eed70b6f5cb1f35883b0517c4bd2812268c", "2d441eed70b6f5cb1f35883b0517c4bd2812268c" ]
[ "metaworld/__init__.py", "metaworld/policies/sawyer_sweep_into_v1_policy.py" ]
[ "\"\"\"Proposal for a simple, understandable MetaWorld API.\"\"\"\nimport abc\nimport pickle\nfrom collections import OrderedDict\nfrom typing import List, NamedTuple, Type\n\nimport metaworld.envs.mujoco.env_dict as _env_dict\nimport numpy as np\n\n\nEnvName = str\n\n\nclass Task(NamedTuple):\n \"\"\"All data n...
[ [ "numpy.array" ], [ "numpy.arange", "numpy.array", "numpy.linalg.norm" ] ]
robinupham/angular_binning
[ "da3f6bf32efd8bad1a7f61a9a457f521ed8ebe87" ]
[ "angular_binning/mask.py" ]
[ "\"\"\"\nFunctions to do with masks and mixing matrices.\n\"\"\"\n\nimport copy\nimport time\nimport warnings\n\nimport healpy as hp\nimport matplotlib.cm\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pymaster as nmt\n\n\ndef generate_mask(wmap_mask_path, nside, target_fsky, mask_save_path):\n \"\...
[ [ "matplotlib.pyplot.gca", "matplotlib.pyplot.imshow", "numpy.amax", "numpy.isfinite", "numpy.clip", "numpy.amin", "matplotlib.pyplot.savefig", "matplotlib.pyplot.colorbar", "numpy.savez_compressed", "numpy.mean", "matplotlib.pyplot.close", "matplotlib.pyplot.rcParams...
kaka-lin/csv-ptool
[ "1e0cc106fd7d58d767427791121bc9ed99fa431f" ]
[ "app/csv_handle.py" ]
[ "# -*- coding: utf-8 -*-\nimport csv\nimport numpy as np\n\nclass CSVHandle():\n def __init__(self):\n pass\n \n def read(self, file):\n data = []\n data_title = []\n\n with open(file, 'r') as csv_file:\n rows = csv.reader(csv_file)\n for row in rows:\n ...
[ [ "numpy.array" ] ]
Songner/image_classfication
[ "c1f15b2b96544e859e14a92373eb57c6a2644a93", "c1f15b2b96544e859e14a92373eb57c6a2644a93", "c1f15b2b96544e859e14a92373eb57c6a2644a93" ]
[ "ImageProcessing-Python/blog06-resize/blog06-image05.py", "ImageProcessing-Python/blog22-fft/blog22-image03.py", "ImageProcessing-Python/blog07-threshold/blog07-image06.py" ]
[ "#encoding:utf-8\r\nimport cv2 \r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\n \r\n#读取图片\r\nimg = cv2.imread('scenery.png')\r\nsrc = cv2.cvtColor(img,cv2.COLOR_BGR2RGB)\r\n\r\n#图像翻转\r\n#0以X轴为对称轴翻转 >0以Y轴为对称轴翻转 <0X轴Y轴翻转\r\nimg1 = cv2.flip(src, 0)\r\nimg2 = cv2.flip(src, 1)\r\nimg3 = cv2.flip(src, -1)\r...
[ [ "matplotlib.pyplot.imshow", "matplotlib.pyplot.yticks", "matplotlib.pyplot.title", "matplotlib.pyplot.subplot", "matplotlib.pyplot.xticks", "matplotlib.pyplot.show" ], [ "matplotlib.pyplot.imshow", "matplotlib.pyplot.yticks", "matplotlib.pyplot.title", "numpy.fft.fftshi...
ajdillhoff/3dhpe-udd
[ "5a77818670060710dff2b1b617a96481e5dc20a0", "5a77818670060710dff2b1b617a96481e5dc20a0", "5a77818670060710dff2b1b617a96481e5dc20a0", "5a77818670060710dff2b1b617a96481e5dc20a0" ]
[ "model/ResNet.py", "model/PoseNet.py", "datasets/LHSynthDataset.py", "model/JointLayer.py" ]
[ "import torch\nimport torch.nn as nn\nfrom torch.hub import load_state_dict_from_url\n\n\n__all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101',\n 'resnet152', 'resnext50_32x4d', 'resnext101_32x8d',\n 'wide_resnet50_2', 'wide_resnet101_2']\n\n\nmodel_urls = {\n 'resnet18': 'htt...
[ [ "torch.nn.Sequential", "torch.nn.init.constant_", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.AdaptiveAvgPool2d", "torch.flatten", "torch.nn.ReLU", "torch.hub.load_state_dict_from_url", "torch.nn.init.kaiming_normal_" ], [ "torch.cat", ...
sixy6e/pygmt
[ "63d23d4e0702edb94234f10d23d210cdf1adb54b" ]
[ "pygmt/clib/session.py" ]
[ "\"\"\"\nDefines the Session class to create and destroy a GMT API session and provides access to\nthe API functions. Uses ctypes to wrap most of the core functions from the C API.\n\"\"\"\nimport sys\nimport ctypes as ctp\nfrom contextlib import contextmanager\n\nfrom packaging.version import Version\nimport numpy...
[ [ "numpy.empty" ] ]
CiaranWelsh/large_study
[ "e8266dafec9e17dea7eb8a16a6ee38a6bb84d1ee", "e8266dafec9e17dea7eb8a16a6ee38a6bb84d1ee" ]
[ "GSS2375_WB_NewDur_Grant/quick_analysis.py", "large_study/regression_analysis.py" ]
[ "import pandas\r\n\r\n\r\nf = r'C:\\Users\\Ciaran\\Documents\\LargeStudy\\GSS2375_WB_NewDur_Grant\\GSS2375_RNA.xlsx'\r\n\r\ndata = pandas.read_excel(f)\r\n\r\nimport matplotlib.pyplot as plt\r\nplt.figure()\r\nplt.hist(data['Yield(ug)'],bins=50)\r\nplt.show()", "from . import parse\nimport os, glob, pandas, numpy...
[ [ "pandas.read_excel", "matplotlib.pyplot.hist", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ], [ "pandas.concat", "pandas.read_csv", "numpy.arange", "pandas.DataFrame", "scipy.stats.mstats.pearsonr", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
KamilDeja/BinPlay
[ "a8626e0bd85ed2f0c064b0c78c95a0bc8c0eb14e" ]
[ "main.py" ]
[ "import sys\nimport argparse\nimport copy\nimport random\nimport torch\nimport torch.utils.data as data\nfrom random import shuffle\nfrom collections import OrderedDict\n\nimport continual_benchmark.dataloaders.base\nimport continual_benchmark.agents as agents\nimport continual_benchmark.dataloaders as dataloaders\...
[ [ "torch.Tensor", "torch.cuda.set_device", "torch.zeros", "torch.manual_seed", "torch.cuda.manual_seed", "torch.cat", "torch.utils.data.DataLoader", "torch.cuda.empty_cache", "torch.load", "torch.device" ] ]
BruceCherniak/blospray
[ "b17cf9d88551b3d8eb3794692d841252a1d55760" ]
[ "render_ospray/__init__.py" ]
[ "# ======================================================================== #\n# BLOSPRAY - OSPRay as a Blender render engine #\n# Paul Melis, SURFsara <paul.melis@surfsara.nl> #\n# Render engine definition #\n# =...
[ [ "numpy.empty" ] ]
quantology/sqwrl
[ "d5f2d822ee3c2343a7b37bca1a8c4328993fe79c" ]
[ "sqwrl/__init__.py" ]
[ "\"\"\"\nTODO - basic:\n - tbl.index.name setting\n - tbl adding data - setting columns, appending, etc.\nTODO - groupby:\n - groupby options - groupby indexing (esp for expr groupbys)\n - groupby push out VirtualTables\n - groupby aggregate multiple agg types, dict agg\n - groupby transform / apply?\nTODO - joins:...
[ [ "pandas.Series", "pandas.MultiIndex.from_tuples", "pandas.Index", "numpy.dtype", "pandas.DataFrame" ] ]
FrancisCrickInstitute/ActiveUnetSegmentation
[ "c54ecb3c9d693ca2b7eead4174921f8ab003af64" ]
[ "src/unetsl/comparisons.py" ]
[ "# -*- coding: utf-8 -*-\n\nimport skimage, numpy \nimport imageio\nimport scipy.ndimage.filters as filters\nimport collections\nimport skimage.morphology\nimport skimage.filters\nimport re\nimport io\n\nimport unetsl.data\n\nDEFAULT_CUTOFFS = ( 0.5, 0.8, 0.95)\n\npoint_kernel = numpy.array( \n ...
[ [ "numpy.reshape", "numpy.all", "scipy.ndimage.filters.gaussian_filter", "scipy.ndimage.filters.gaussian_filter1d", "scipy.ndimage.filters.convolve", "numpy.array", "numpy.where", "numpy.sum", "numpy.zeros" ] ]
tigerneil/scattertext
[ "23351895ada347fae300bf910c2c77f47ac58a35", "23351895ada347fae300bf910c2c77f47ac58a35", "23351895ada347fae300bf910c2c77f47ac58a35" ]
[ "scattertext/features/FeatsFromGeneralInquirer.py", "scattertext/characteristic/DenseRankCharacteristicness.py", "scattertext/ScatterChartData.py" ]
[ "from collections import Counter\nfrom re import split\nfrom sys import version_info\n\nimport pandas as pd\n\nfrom scattertext.Common import GENERAL_INQUIRER_URL\nfrom scattertext.features.FeatsFromSpacyDoc import FeatsFromSpacyDoc\n\n\n\nclass FeatsFromGeneralInquirer(FeatsFromSpacyDoc):\n\tdef __init__(self,\n\t...
[ [ "pandas.read_csv" ], [ "pandas.Series", "scipy.stats.rankdata" ], [ "numpy.random.seed" ] ]
powerbi1/keras-tuner
[ "cfc6e20956cb8554ee29ef2a1ba4635da7d0228b" ]
[ "kerastuner/applications/xception.py" ]
[ "# Copyright 2019 The Keras Tuner 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable l...
[ [ "tensorflow.keras.utils.get_source_inputs", "tensorflow.keras.layers.Activation", "tensorflow.keras.layers.GlobalAveragePooling2D", "tensorflow.keras.layers.Dense", "tensorflow.keras.backend.int_shape", "tensorflow.keras.layers.Conv2D", "tensorflow.keras.Model", "tensorflow.keras.l...
coldenheart/123
[ "798768bba7dfaef051a46d8e1df48bc671de5213" ]
[ "python/contrib/SentimentAnalysis/models/check_output.py" ]
[ "# coding=utf-8\r\n\r\n# Copyright 2020 Huawei Technologies Co., Ltd\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n#\r\n# http://www.apache.org/licenses/LICENSE-2.0\r\n...
[ [ "numpy.fromfile", "numpy.argmax", "numpy.random.seed" ] ]
daivuong7696/tensorflow-open_nsfw
[ "153a24b5e0a7e0acaf84998f983f46207b2dc44a" ]
[ "classify_nsfw.py" ]
[ "#!/usr/bin/env python\nimport sys\nimport os\nimport argparse\nimport tensorflow as tf\nfrom shutil import copyfile\n\nfrom model import OpenNsfwModel, InputType\nfrom image_utils import create_tensorflow_image_loader\nfrom image_utils import create_yahoo_image_loader\n\nimport numpy as np\n\n\nIMAGE_LOADER_TENSOR...
[ [ "numpy.concatenate", "tensorflow.global_variables_initializer", "tensorflow.Session" ] ]
oneandwholly/keras
[ "dc9db6b494a037db15967d8585a8941be46c0b0e" ]
[ "keras/callbacks.py" ]
[ "\"\"\"Callbacks: utilities called at certain points during model training.\n\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport csv\nimport six\n\nimport numpy as np\nimport time\nimport json\nimport warnings\nimport io\n\nfrom...
[ [ "tensorflow.zeros", "numpy.greater", "numpy.less", "tensorflow.summary.image", "tensorflow.squeeze", "tensorflow.Summary", "numpy.isnan", "numpy.median", "tensorflow.placeholder", "tensorflow.summary.merge_all", "tensorflow.contrib.tensorboard.plugins.projector.Projecto...
snakers4/deepspeech.pytorch
[ "4c9e9648fe56247169d73248340f3a60572d3f5b" ]
[ "train.py" ]
[ "import os\nimport gc\nimport json\nimport time\nimport tqdm\nimport argparse\nimport datetime\n\nimport torch.distributed as dist\nimport torch.utils.data.distributed\nfrom warpctc_pytorch import CTCLoss\n\nfrom novograd import (AdamW,\n Novograd)\nfrom linknet import (SemsegLoss,\n ...
[ [ "torch.optim.Adam", "torch.nn.NLLLoss", "torch.cuda.synchronize", "torch.distributed.init_process_group", "torch.Tensor", "torch.load", "torch.zeros", "torch.manual_seed", "torch.isnan", "torch.cuda.empty_cache", "torch.no_grad", "torch.cuda.manual_seed_all", "t...
sdpython/mathenjeu
[ "97fc9140ef89ac9c3c6ba46803121fd5d23eb8d1" ]
[ "_unittests/ut_datalog/test_datalog.py" ]
[ "\"\"\"\n@brief test tree node (time=2s)\n\"\"\"\nimport os\nimport unittest\nimport datetime\nimport pandas\nfrom pyquickhelper.pycode import ExtTestCase\nfrom mathenjeu.datalog import enumerate_qcmlog, enumerate_qcmlogdf\n\n\nclass TestLocalAppData(ExtTestCase):\n\n def test_datalog(self):\n this =...
[ [ "pandas.concat" ] ]
BjoernBiltzinger/threeML
[ "fc3d989173b1613a199633455f260e67fdb50369", "fc3d989173b1613a199633455f260e67fdb50369" ]
[ "threeML/test/test_time_series.py", "threeML/catalogs/Swift.py" ]
[ "import os\nimport numpy as np\nimport pytest\nfrom threeML.io.file_utils import within_directory\nfrom threeML.utils.time_interval import TimeIntervalSet\nfrom threeML.utils.time_series.event_list import EventListWithDeadTime, EventList\nfrom threeML.utils.data_builders.time_series_builder import TimeSeriesBuilder...
[ [ "numpy.loadtxt", "numpy.zeros_like", "numpy.linspace" ], [ "numpy.asarray", "pandas.concat", "numpy.concatenate" ] ]
kschweig/HopfieldOfflineRL
[ "dcb1d475c2406cd0f64ed37d187d0b4f0890f02f" ]
[ "source/process_tensorboard_logs/convert_to_csv.py" ]
[ "import tensorflow as tf\nimport glob\nimport os\nimport re\n\n##########################\n# Settings #\n##########################\n\n# Which experiment to extract\nimport tensorflow.python.framework.errors_impl\n\nex = \"ex4\"\n# Which tag should be extracted\n#'eval/Reward (SMA)' 'eval/Entropy'\nta...
[ [ "tensorflow.compat.v1.train.summary_iterator" ] ]
Jon3sjns/open-source-contribution
[ "b1dc4a90ce3bd5575b74bf2961a9f6867d16aef4" ]
[ "PYTHON/pre-emptive shortest job first.py" ]
[ "import numpy as np\nimport tabulate\nimport matplotlib.pyplot as plt\n\n\ndef display(data):\n print(\"ProcessID\\tArrival Time\\tBurst Time\")\n for i in range(len(data)):\n print(\"{}\\t\\t{}\\t\\t{}\".format(\n data[i][0], data[i][1], data[i][2]))\n print(\"\\n\")\n\n\ndef change(proc...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.subplots" ] ]
alexfikl/pytato
[ "0bf3fdfc35aec5911ca8aabd394c1d7207562edb" ]
[ "pytato/loopy.py" ]
[ "from __future__ import annotations\n\n__copyright__ = \"\"\"\nCopyright (C) 2021 Kaushik Kulkarni\n\"\"\"\n\n__license__ = \"\"\"\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without r...
[ [ "numpy.dtype" ] ]
nju-websoft/HyperKA
[ "cadaf824a739b55211997e73d9948ddbfbe7ce83" ]
[ "src/hyperka/ea_funcs/test_funcs.py" ]
[ "import gc\nimport numpy as np\nimport time\nimport ray\n\nfrom hyperka.ea_funcs.utils import div_list\nfrom hyperka.hyperbolic.metric import compute_hyperbolic_distances, normalization\n\ng = 1000000000\n\n\n@ray.remote(num_cpus=1)\ndef cal_rank(task, sim, top_k):\n mean = 0\n mrr = 0\n num = [0 for k in ...
[ [ "numpy.partition", "numpy.reshape", "numpy.matmul", "numpy.concatenate", "numpy.append", "numpy.row_stack", "numpy.mean", "numpy.repeat", "numpy.array", "numpy.where" ] ]
AmpelProject/Ampel-contrib-sample
[ "99677e434f700fd25dc90b1733ec1944b6cc84fd" ]
[ "ampel/contrib/sample/t2/T2SNcosmoComp.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# File : ampel/contrib/sample/t2/T2SNcosmoComp.py\n# License : BSD-3-Clause\n# Author : jnordin@physik.hu-berlin.de\n# Date : 03.04.2021\n# Last Modified Date: 03.04.2021\n# Last Modified By : jnordin@physik.hu-berlin.d...
[ [ "numpy.log" ] ]
econwang/EconML
[ "4554706bd9f803985e34399b7fc65035598ce195", "4554706bd9f803985e34399b7fc65035598ce195", "4554706bd9f803985e34399b7fc65035598ce195" ]
[ "econml/tests/test_inference.py", "econml/ortho_forest.py", "econml/two_stage_least_squares.py" ]
[ "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nimport numpy as np\nimport unittest\nfrom sklearn.base import clone\nfrom sklearn.preprocessing import PolynomialFeatures\nfrom sklearn.linear_model import LinearRegression, LogisticRegression\nfrom econml.dml import ...
[ [ "sklearn.linear_model.LogisticRegression", "numpy.random.seed", "numpy.isfinite", "numpy.isnan", "numpy.asarray", "numpy.isposinf", "sklearn.preprocessing.PolynomialFeatures", "numpy.testing.assert_array_equal", "numpy.isneginf", "numpy.random.normal", "sklearn.base.clo...
satyajitghana/thetensorclan-backend-heroku
[ "893d4f1f8461934d31b8d6f63b7daaff0f3799d4" ]
[ "helper_repositories/human_pose_estimation_pytorch/pose_lib/core/evaluate.py" ]
[ "# ------------------------------------------------------------------------------\n# Copyright (c) Microsoft\n# Licensed under the MIT License.\n# Written by Bin Xiao (Bin.Xiao@microsoft.com)\n# ------------------------------------------------------------------------------\n\nfrom __future__ import absolute_import\...
[ [ "numpy.less", "numpy.linalg.norm", "numpy.ones", "numpy.not_equal", "numpy.array", "numpy.zeros" ] ]
ViDA-NYU/aws_taxi
[ "e08f2999987aca3b956096f95fa56759e357a7d4" ]
[ "neighborhoods/plot_results.py" ]
[ "import matplotlib, sys\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as m_plot\n\nif __name__=='__main__':\n counts = []\n with open(sys.argv[1], 'r') as f:\n for line in f:\n name, value = line.strip().split('\\t')\n counts.append((int(value), name))\n counts.sort(reverse=...
[ [ "matplotlib.use", "matplotlib.pyplot.yticks", "matplotlib.pyplot.Axes", "matplotlib.pyplot.figure" ] ]
DuMoH112/art-photo
[ "fee4e84ee4f0c7eaa6b17d17aceba1cee45c4010" ]
[ "backend/api/correct_photo.py" ]
[ "import os\n\nimport cv2\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom scipy.stats import itemfreq\n\n\ndef correct_photo(path, filename):\n image = cv2.imread(os.path.join(path, filename))\n\n pallete, image = change_colors_on_photo(image)\n\n image = remove_noise(image)\n\n img_pallet = c...
[ [ "numpy.uint8", "numpy.float32" ] ]
AJB363/PartIA-Flood-Warning-System
[ "713cbb64f272d4a598942cf89292a39a1a05c30a" ]
[ "floodsystem/plot.py" ]
[ "import matplotlib.pyplot as plt\nimport matplotlib.dates as d\nfrom numpy import linspace\nfrom .analysis import polyfit\n\n\ndef plot_water_levels(station, dates, levels):\n \"\"\" Plots the station water level history against time \"\"\"\n\n # Return early if data is invalid\n if len(dates) != len(level...
[ [ "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.plot", "matplotlib.dates.date2num", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.xticks", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
capogluuu/ivy
[ "fc3159a127412f039c7024649b23c89b493b20d2" ]
[ "ivy/functional/backends/mxnet/manipulation.py" ]
[ "# global\nimport mxnet as mx\nimport math\nimport numpy as np\nfrom typing import Union, Tuple, Optional, List\nfrom ivy.functional.backends.mxnet import _flat_array_to_1_dim_array, _handle_flat_arrays_in_out, _handle_flat_arrays_in\n\ndef flip(x: mx.ndarray.ndarray.NDArray,\n axis: Optional[Union[int, Tup...
[ [ "numpy.cumsum" ] ]
MartinKliemank/lettuce
[ "ee1b4dbfdbcf1bd87ac6b867b091a923d033403e", "ee1b4dbfdbcf1bd87ac6b867b091a923d033403e" ]
[ "lettuce/flows/couette.py", "tests/test_simulation.py" ]
[ "\"\"\"\nCouette Flow\n\"\"\"\n\nimport numpy as np\n\nfrom lettuce.unit import UnitConversion\nfrom lettuce.boundary import BounceBackBoundary, EquilibriumBoundaryPU\n\n\nclass CouetteFlow2D(object):\n def __init__(self, resolution, reynolds_number, mach_number, lattice):\n self.resolution = resolution\n...
[ [ "numpy.array", "numpy.meshgrid", "numpy.abs", "numpy.linspace" ], [ "torch.allclose", "numpy.abs" ] ]
jijyisme/ner-cp-cu
[ "6d13247de54e55cbf3ec6856ff3b8bebf7a9d8f2" ]
[ "ner.py" ]
[ "import csv\nimport gc\nimport glob\nimport json\nimport os\nimport shutil\nimport sys\nimport warnings\nfrom collections import Counter\n\nfrom multiprocessing import Process, Queue\nfrom pprint import pprint\n\n# Prevent Keras info message; \"Using TensorFlow backend.\"\nSTDERR = sys.stderr\nsys.stderr = open(os....
[ [ "numpy.argmax" ] ]
bagxi/cocoapi
[ "ef301155c4e8951792ec23bd356d9657feb1a292" ]
[ "pycocotools/cocoeval.py" ]
[ "from collections import defaultdict, OrderedDict\nimport copy\nimport datetime\nimport logging\nimport time\n\nimport numpy as np\n\nfrom . import mask as maskUtils\n\nlogger = logging.getLogger(__name__)\n\n\nclass COCOeval:\n # Interface for evaluating detection on the Microsoft COCO dataset.\n #\n # Th...
[ [ "numpy.logical_not", "numpy.spacing", "numpy.unique", "numpy.cumsum", "numpy.ones", "numpy.concatenate", "numpy.round", "numpy.max", "numpy.mean", "numpy.count_nonzero", "numpy.searchsorted", "numpy.exp", "numpy.argsort", "numpy.repeat", "numpy.array", ...
dhairyashah1/Eklavya20-CatchPracticeBot
[ "f0e625768aa49cd43df9fec379c8d7919be784b9" ]
[ "PycharmProjects/OpenCV/Dhairya_OpenCV/6_VideoFilters.py" ]
[ "import numpy as np\nimport cv2\n#red detection\nvid = cv2.VideoCapture(0) #Webcam=0\nwhile True:\n _, frame = vid.read() #_ is used for those returned things whch are of no use\n # HSV = HUE, SATURATION, VALUE\n hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)\n lower_red = np.array([0,70,50]) #provides ...
[ [ "numpy.array" ] ]
mussard/QCElemental
[ "4ae662b02cd099a5bbadf7e2c03ef2a39b8eee1a" ]
[ "qcelemental/tests/test_molparse_from_schema.py" ]
[ "import copy\n\nimport numpy as np\nimport pytest\nimport qcelemental as qcel\nfrom qcelemental.testing import compare_molrecs\n\n_schema_prov_stamp = {'creator': 'QCElemental', 'version': '1.0', 'routine': 'qcelemental.molparse.from_schema'}\n\n\n@pytest.mark.parametrize(\"inp,expected\", [\n ({\n 'frag_...
[ [ "numpy.array" ] ]
1155107756/pgdrive
[ "708375c8cb6c5ed1950c20d91bd0aec5fd1b1e62", "708375c8cb6c5ed1950c20d91bd0aec5fd1b1e62", "708375c8cb6c5ed1950c20d91bd0aec5fd1b1e62" ]
[ "pgdrive/utils/pg_space.py", "pgdrive/utils/scene_utils.py", "pgdrive/tests/test_env/test_change_friction_density_envs.py" ]
[ "import logging\nimport typing as tp\nfrom collections import namedtuple, OrderedDict\n\nimport numpy as np\n\nfrom pgdrive.utils import get_np_random\n\nPGBoxSpace = namedtuple(\"PGBoxSpace\", \"max min\")\nPGDiscreteSpace = namedtuple(\"PGDiscreteSpace\", \"number\")\nPGConstantSpace = namedtuple(\"PGConstantSpac...
[ [ "numpy.allclose", "numpy.asarray", "numpy.issubdtype", "numpy.dtype", "numpy.full", "numpy.all", "numpy.finfo", "numpy.isscalar", "numpy.floor", "numpy.array", "numpy.empty" ], [ "numpy.argmin" ], [ "numpy.array" ] ]
willfrey/vision
[ "56fb0bf5796ac374d4e353032e418236cd73c554", "56fb0bf5796ac374d4e353032e418236cd73c554", "56fb0bf5796ac374d4e353032e418236cd73c554" ]
[ "test/test_prototype_builtin_datasets.py", "torchvision/models/quantization/inception.py", "torchvision/ops/stochastic_depth.py" ]
[ "import functools\nimport io\nimport pickle\nfrom pathlib import Path\n\nimport pytest\nimport torch\nfrom builtin_dataset_mocks import parametrize_dataset_mocks, DATASET_MOCKS\nfrom torch.testing._comparison import assert_equal, TensorLikePair, ObjectPair\nfrom torch.utils.data.datapipes.iter.grouping import Shard...
[ [ "torch.utils.data.graph.traverse", "torch.load", "torch.save" ], [ "torch.nn.functional.avg_pool2d", "torch.ao.quantization.DeQuantStub", "torch.ao.quantization.QuantStub", "torch.jit.is_scripting", "torch.nn.ReLU", "torch.nn.quantized.FloatFunctional" ], [ "torch.j...
dbstein/field_ops
[ "70359a1be37d911b879746e5c61d6d10da1c0f3b" ]
[ "examples/test22.py" ]
[ "import numpy as np\nimport time\nfrom field_ops import Engine2 as Engine\n\nn = 100\nv = np.linspace(0, 1, n)\nx, y, z = np.meshgrid(v, v, v, indexing='ij')\n\n# setup simulation engine\nsim = Engine()\n\n# allocate variables\nc = sim.zeros([], [n,n,n], float)\nc_hat = sim.zeros([], [n,n,n], complex)\nu = sim.zero...
[ [ "numpy.fft.fftpack.fftn", "numpy.allclose", "numpy.linspace", "numpy.einsum", "numpy.fft.fftn", "numpy.fft.ifftn", "numpy.linalg.eigh", "numpy.random.rand", "numpy.transpose", "numpy.fft.fftpack.ifftn", "numpy.meshgrid", "numpy.empty" ] ]
helloric/pydial3
[ "34988f4592c4e28388b2818de8768d841696efbb", "34988f4592c4e28388b2818de8768d841696efbb", "34988f4592c4e28388b2818de8768d841696efbb" ]
[ "semo/RNNLG/generator/knn.py", "semi/CNetTrain/Classifier.py", "policy/SummaryUtils.py" ]
[ "######################################################################\n######################################################################\n# Copyright Tsung-Hsien Wen, Cambridge Dialogue Systems Group, 2016 #\n######################################################################\n###########################...
[ [ "numpy.set_printoptions", "numpy.random.seed" ], [ "sklearn.linear_model.SGDClassifier", "numpy.zeros", "sklearn.svm.sparse.SVC", "sklearn.svm.SVC" ], [ "scipy.stats.entropy" ] ]
mattgibbs/melbourne2018workshop
[ "c79a2e6dcef9ecfe92fdaac5149e87908ee75a17" ]
[ "iocs/thermo.py" ]
[ "#!/usr/bin/env python3\nfrom caproto.server import pvproperty, PVGroup, ioc_arg_parser, run\nfrom caproto import ChannelType\nimport numpy as np\nimport time\nfrom textwrap import dedent\n\n\nclass Thermo(PVGroup):\n \"\"\"\n Simulates (poorly) an oscillating temperature controller.\n\n Follows :math:`T_{...
[ [ "numpy.exp", "numpy.abs", "numpy.sin" ] ]