repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
Epi-Info/Epi-Info-Python-Package
[ "8a089e1ab997676e97ccbb7f9c61ec6f7d1bc8c3" ]
[ "epiinfo/EICSMeans.py" ]
[ "from scipy.stats import t as tdist\nimport math\nimport time\nfrom .randata import randata\nfrom .CSUtilities import *\n\nclass ComplexSampleMeans:\n def __init__(self):\n self.strataVar = None\n self.mainVar = None\n self.crosstabVar = None\n self.domainVar = None\n self.psuVar = None\n self.we...
[ [ "scipy.stats.t.ppf" ] ]
nestle1993/tacotron2
[ "db1085c4bc9026ee3366d70be8e484ef045e38f0" ]
[ "stft.py" ]
[ "\"\"\"\nBSD 3-Clause License\n\nCopyright (c) 2017, Prem Seetharaman\nAll rights reserved.\n\n* Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notic...
[ [ "torch.cos", "torch.sqrt", "torch.sin", "torch.autograd.Variable", "torch.FloatTensor", "numpy.linalg.pinv", "numpy.real", "numpy.eye", "torch.from_numpy", "scipy.signal.get_window", "numpy.imag", "torch.atan2" ] ]
lynsueforever/rsi_tradingview
[ "82d67688ab0f77b71b838987e28b382395c82d75" ]
[ "stoch_rsi.py" ]
[ "import pandas as pd\n\nfrom rsi import rsi_tradingview\n\n\ndef stoch_rsi_tradingview(ohlc: pd.DataFrame, period=14, smoothK=3, smoothD=3):\n \"\"\" Calculating Stochastic RSI (gives the same values as TradingView as of March 20, 2021.\n smoothK = input(3, \"K\", minval=1)\n smoothD = input(3, \"D...
[ [ "pandas.Series" ] ]
bhoang/spectre
[ "4f843d8744262ddbbb74fad676fb5b35ccae4cb4" ]
[ "tests/test_data_loader.py" ]
[ "import unittest\nimport spectre\nimport os\nimport pandas as pd\nimport numpy as np\nfrom numpy.testing import assert_almost_equal\nfrom os.path import dirname\n\ndata_dir = dirname(__file__) + '/data/'\n\n\nclass TestDataLoaderLib(unittest.TestCase):\n def _assertDFFirstLastEqual(self, tdf, col, expected_first...
[ [ "numpy.testing.assert_almost_equal", "pandas.Timestamp" ] ]
youngzhou1999/DI-engine
[ "cf382d7274d328e6fcc5beb9c08bbc11e94a3850" ]
[ "ding/worker/collector/one_vs_one_serial_evaluator.py" ]
[ "from typing import List, Dict, Any, Optional, Callable, Tuple\nfrom collections import namedtuple, deque\nfrom easydict import EasyDict\nfrom functools import reduce\nimport copy\nimport numpy as np\nimport torch\n\nfrom ding.utils import build_logger, EasyTimer, deep_merge_dicts, lists_to_dicts, dicts_to_lists\nf...
[ [ "numpy.max", "numpy.min", "numpy.mean", "numpy.std", "numpy.isscalar" ] ]
KJoke70/deep-visualization-toolbox
[ "b3e9a470c8995494bdafab91a10879e56936af79" ]
[ "find_maxes/find_max_acts.py" ]
[ "#! /usr/bin/env python\n\n# this import must comes first to make sure we use the non-display backend\nimport matplotlib\nmatplotlib.use('Agg')\n\n# add parent folder to search path, to enable import of core modules like settings\nimport os,sys,inspect\ncurrentdir = os.path.dirname(os.path.abspath(inspect.getfile(i...
[ [ "matplotlib.use" ] ]
block4chain/analytics-zoo
[ "ea254a67a26861830831a60a77de68c395b7297f" ]
[ "pyzoo/test/zoo/chronos/autots/model/test_auto_lstm.py" ]
[ "#\n# Copyright 2018 Analytics Zoo Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable ...
[ [ "numpy.random.randn", "torch.nn.MSELoss", "torch.from_numpy" ] ]
eyan02/AirMap
[ "25ed5355beb4f12e8ce7ce96796975a467898bed" ]
[ "src/AirMap.py" ]
[ "import pandas as pd\nimport requests\nimport base64\nimport json\n\nclass airtableDataMapper(object):\n def __init__(self, baseKey, APIkey):\n self.baseKey = baseKey\n self.APIkey = APIkey\n self.headers = {\"Content-type\":\"text/plain\",\"Authorization\":f\"Bearer {self.APIkey}\"}\n ...
[ [ "pandas.DataFrame", "pandas.json_normalize" ] ]
sovaai/sova-devkit
[ "aea08a3c5cefc2d5cdb72e9e573c466a444bbf71" ]
[ "sovaKit/handlers/listener.py" ]
[ "import sys\nsys.path.append(\"../main/\")\n\nimport queue\nfrom functools import partial\n\nimport soundfile\nfrom array import array\nfrom sys import byteorder\nimport threading\nimport asyncio\nimport time\nimport struct\n\nimport numpy as np\nimport pyaudio\nimport wave\nimport webrtcvad\n\nimport params\n\n\n_...
[ [ "numpy.concatenate", "numpy.array", "numpy.delete", "numpy.fromstring" ] ]
ipa-lab/autoML-sampling-public
[ "1642c091b16e27503e31fad7387fff86266ed93e" ]
[ "experiments/run_experiment.py" ]
[ "#!/usr/bin/env python3\n# this file was copied from: https://github.com/josepablocam/ams/tree/master/experiments and adapted for openml data fetching\nimport warnings\n\n# ignore sklearn future warnings\nwarnings.simplefilter(action='ignore', category=FutureWarning)\n# we do not use NN\nwarnings.filterwarnings(act...
[ [ "sklearn.model_selection.StratifiedKFold", "pandas.set_option", "pandas.DataFrame", "pandas.concat", "pandas.read_csv" ] ]
jandreu/chime
[ "997b2769e0555e1c39c790bec8bd0d0abb44c89f" ]
[ "src/penn_chime/charts.py" ]
[ "\nfrom datetime import datetime\nfrom math import ceil\nfrom typing import Dict, Optional\n\nfrom altair import Chart\nimport pandas as pd\nimport numpy as np\n\nfrom .constants import DATE_FORMAT\nfrom .parameters import Parameters\n\n\ndef build_admits_chart(\n *,\n alt,\n admits_df: pd.DataFrame,\n ...
[ [ "numpy.ceil", "numpy.mod" ] ]
ASVG/NeuroM
[ "77a4e1a4d33acc09f0a25d7c42d3f5f01807ba6c" ]
[ "neurom/geom/__init__.py" ]
[ "# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project\n# All rights reserved.\n#\n# This file is part of NeuroM <https://github.com/BlueBrain/NeuroM>\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following cond...
[ [ "numpy.max", "numpy.min", "scipy.spatial.ConvexHull" ] ]
Yinghao-Li/CHMM-ALT
[ "7bb0972b2a3c7b1f1fbbe793c7afa927d083fa45" ]
[ "label_model/chmm-train.py" ]
[ "# coding=utf-8\n\"\"\" Train the conditional hidden Markov model \"\"\"\n\nimport sys\nsys.path.append('..')\n\nimport logging\nimport os\nimport sys\nimport gc\nimport torch\nfrom datetime import datetime\n\nfrom transformers import (\n HfArgumentParser,\n set_seed,\n)\n\nfrom seqlbtoolkit.io import set_log...
[ [ "torch.cuda.empty_cache" ] ]
xgfs/coloropt
[ "f8f5a05783d1ae7852ab78cd4818d7d668f2e165" ]
[ "colortools.py" ]
[ "from colormath import color_diff\nfrom colormath.color_objects import sRGBColor, LabColor, HSVColor, CMYKColor, LCHabColor\nfrom colormath.color_conversions import convert_color\nimport numpy as np\nimport itertools\n\nblack_lab = convert_color(sRGBColor(0, 0, 0), LabColor)\nwhite_lab = convert_color(sRGBColor(1, ...
[ [ "numpy.array", "numpy.sin", "numpy.zeros", "numpy.sum", "numpy.mean", "numpy.eye", "numpy.any", "numpy.power", "numpy.abs", "numpy.clip", "numpy.cos" ] ]
aarpon/qu
[ "a842b25052e9e054beb4d4dcbd529b89de2ccbd6" ]
[ "qu/models/unet_2d_restorer.py" ]
[ "# /********************************************************************************\n# * Copyright © 2020-2021, ETH Zurich, D-BSSE, Aaron Ponti\n# * All rights reserved. This program and the accompanying materials\n# * are made available under the terms of the Apache License Version 2.0\n# * which accomp...
[ [ "torch.device", "torch.no_grad", "torch.nn.L1Loss", "torch.cuda.empty_cache", "torch.cuda.is_available", "torch.utils.tensorboard.SummaryWriter" ] ]
jt-lab/arviz
[ "3706327be0d42630350952a21b8c789cf618923a" ]
[ "arviz/plots/backends/bokeh/violinplot.py" ]
[ "\"\"\"Bokeh Violinplot.\"\"\"\nimport numpy as np\nfrom bokeh.models.annotations import Title\n\nfrom ....stats import hdi\nfrom ....stats.density_utils import get_bins, histogram, kde\nfrom ...plot_utils import _scale_fig_size\nfrom .. import show_layout\nfrom . import backend_kwarg_defaults, create_axes_grid\n\n...
[ [ "numpy.max", "numpy.concatenate", "numpy.zeros_like", "numpy.nanpercentile", "numpy.min", "numpy.diff", "numpy.atleast_2d" ] ]
eatkinson/UKBB-Diverse-pops
[ "8e20c5f235ea8f7a66f401915bbecd9cfed45e7d" ]
[ "heritability/utils/munge_manual.py" ]
[ "#!/usr/bin/env python\n\n__author__ = 'Rahul Gupta'\n\nimport re, logging, argparse\nimport pandas as pd\nimport numpy as np\nfrom scipy.stats import chi2\nfrom itertools import compress\n\n\ndef read_file(filename):\n \"\"\" Read summary statistis file using Pandas. Exports import outcome to log.\n\n Parame...
[ [ "numpy.sign", "pandas.read_csv", "scipy.stats.chi2.isf" ] ]
FerdinandZhong/punctuator
[ "08649e55446116fe2967668bbd3e6c635eb1dfc8" ]
[ "dbpunctuator/utils/model_test.py" ]
[ "import logging\n\nimport torch\nfrom pydantic import BaseModel\nfrom transformers import DistilBertForTokenClassification, DistilBertTokenizerFast\n\nfrom dbpunctuator.utils.utils import register_logger\n\nlogger = logging.getLogger(__name__)\nregister_logger(logger)\n\ndevice = torch.device(\"cuda\") if torch.cud...
[ [ "torch.device", "torch.cuda.is_available" ] ]
SystemsBiologyUniandes/PyEcoLib
[ "3c46a34af51e29a2d5cca1f894606bbc9738f7a0" ]
[ "PyEcoLib/simulator.py" ]
[ "import platform, sys\nimport numpy as np\nimport math\nfrom scipy import integrate\nfrom scipy import optimize as opt\nfrom scipy.stats import gamma\n\nfrom PyEcoLib.models.cell import Cell\n\n\nclass Simulator:\n def __init__(self, ncells, gr, sb, steps, CV2div = 0, CV2gr = 0, lamb=1, V0array=None):\n \...
[ [ "numpy.concatenate", "numpy.zeros_like", "numpy.array", "numpy.int", "numpy.zeros", "numpy.log", "numpy.random.gamma", "numpy.sum", "numpy.exp", "numpy.diff", "scipy.stats.gamma.cdf", "numpy.random.beta", "numpy.trapz", "scipy.optimize.bisect", "scipy.st...
gingkg/man-machine_counteraction
[ "ca61aeee046c1fcf11adba4f7c782a5f71d7de2e" ]
[ "cooperative_action_control/Multi-agents_cooperation/network/maven_net.py" ]
[ "#! /user/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\n@author: gingkg\n@contact: sby2015666@163.com\n@software: PyCharm\n@project: man-machine_counteraction\n@file: maven_net.py\n@date: 2021-07-09 09:50\n@desc: \n\"\"\"\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as f\n\n\n# output prob ...
[ [ "torch.nn.Linear", "torch.cat", "torch.nn.GRU", "torch.bmm", "torch.nn.functional.softmax", "torch.nn.GRUCell" ] ]
johnlees/pyseer
[ "acfdfaa088d57b6f4cba730553f6c8c6a8c9ff3b" ]
[ "pyseer/model.py" ]
[ "# Copyright 2017 Marco Galardini and John Lees\n\n'''Original SEER model (fixed effects) implementations'''\n\nimport os\nimport sys\nfrom .utils import set_env\n# avoid numpy taking up more than one thread\nwith set_env(MKL_NUM_THREADS='1',\n NUMEXPR_NUM_THREADS='1',\n OMP_NUM_THREADS='1')...
[ [ "numpy.concatenate", "numpy.array", "numpy.linalg.norm", "numpy.dot", "numpy.matmul", "numpy.zeros", "scipy.stats.chi2.sf", "scipy.stats.ttest_ind", "numpy.ones", "numpy.mean", "numpy.diagonal", "numpy.multiply", "scipy.stats.chi2_contingency", "numpy.argmax...
jamontol/haystack
[ "83c33222bf3fef864ec5630a3762e5bb0b70625a" ]
[ "haystack/retriever/dense.py" ]
[ "import logging\nfrom typing import Type, List, Union, Tuple, Optional\nimport torch\nimport numpy as np\nfrom pathlib import Path\n\nfrom farm.infer import Inferencer\n\nfrom haystack.database.base import Document, BaseDocumentStore\nfrom haystack.database.elasticsearch import ElasticsearchDocumentStore\nfrom hays...
[ [ "torch.device", "torch.nonzero", "torch.no_grad", "torch.cuda.is_available", "torch.tensor", "torch.zeros_like" ] ]
timsainb/graph_research_notes
[ "9ab35de026ba5857cf316cc33adecd3224010555" ]
[ "wordpress_graph/xml_to_graph.py" ]
[ "import networkx as nx\nimport pandas as pd\nimport feedparser\nimport numpy as np\nfrom tqdm.autonotebook import tqdm\n\n\ndef post_info_from_xml(\n xml_files,\n categories_to_subset=[\n \"Papers\",\n \"Dissertations\",\n \"Paper reviews\",\n \"Blogs\",\n \"Datasets\",\n ...
[ [ "numpy.concatenate", "numpy.log", "pandas.DataFrame", "numpy.sum", "numpy.unique" ] ]
archman/flame-utils
[ "42d78df51a7743ae53143f2086497f2593f7beac" ]
[ "tests/test_core.py" ]
[ "# -*- coding: utf-8 -*-\n\nimport unittest\nimport os\nimport numpy as np\nimport random\n\nfrom flame import Machine\nfrom flame_utils import BeamState\nfrom flame_utils import ModelFlame\nfrom flame_utils import collect_data\nfrom flame_utils import generate_source\nfrom flame_utils import twiss_to_matrix\n\nfro...
[ [ "numpy.dot", "numpy.asarray", "numpy.isnan" ] ]
iAmCorey/CARP
[ "21af683fc8a8fb5161e721343f644afe94ed0a4f" ]
[ "CARP_demo.py" ]
[ "# -*- coding: utf-8 -*-\n# written by mark zeng 2018-11-14\n\nimport multiprocessing as mp\nimport time\nimport sys\nimport numpy as np\n\nclass Worker(mp.Process):\n def __init__ (self, inQ, outQ, random_seed):\n super(Worker, self).__init__(target=self.start)\n self.inQ = inQ\n self.outQ ...
[ [ "numpy.random.seed", "numpy.random.randint" ] ]
LEA0317/incubator-tvm
[ "de21c8f2ef507587fdcc99b851404de5aeeb5a16" ]
[ "python/tvm/relay/backend/contrib/ethosu/te/depthwise.py" ]
[ "# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y...
[ [ "numpy.matmul" ] ]
peternara/conditional-similarity-networks-fashion
[ "1a75e3d9eccebd7570f0183ef195dad075fd85c6" ]
[ "csn.py" ]
[ "import torch\nimport torch.nn as nn\nimport numpy as np\n\nclass ConditionalSimNet(nn.Module):\n def __init__(self, embeddingnet, n_conditions, embedding_size, learnedmask=True, prein=False):\n \"\"\" embeddingnet: The network that projects the inputs into an embedding of embedding_size\n n_co...
[ [ "torch.nn.functional.relu", "torch.Tensor", "torch.nn.Embedding", "numpy.zeros" ] ]
jiangycTarheel/NMN-MultiHopQA
[ "00e16f3fe724d7db44d6594a93b6ab4ae9df8fc3" ]
[ "basic/trainer.py" ]
[ "import tensorflow as tf\nimport math\nfrom basic.model import Model\nfrom my.tensorflow import average_gradients\nimport numpy as np\n\nclass Trainer(object):\n def __init__(self, config, model):\n assert isinstance(model, Model)\n self.config = config\n self.model = model\n self.opt = tf.train.AdamOp...
[ [ "tensorflow.train.AdamOptimizer", "tensorflow.add_n", "tensorflow.constant", "tensorflow.zeros_like", "tensorflow.control_dependencies", "tensorflow.clip_by_global_norm" ] ]
wangqi1996/njunmt
[ "e64873e8f3f94a7f55c759a6dbdf3fb657527ae7" ]
[ "src/models/lightconv.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport math\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom fairseq import options, utils\nfrom fairse...
[ [ "torch.nn.Linear", "torch.nn.ModuleList", "torch.nn.init.constant_", "torch.arange", "torch.nn.functional.dropout", "torch.nn.init.xavier_uniform_", "torch.nn.functional.log_softmax", "torch.unsqueeze", "torch.nn.init.normal_", "torch.nn.functional.linear", "torch.nn.fu...
mjfwest/OpenMDAO-Framework
[ "038e89b06da1c74f00918f4c6fbd8bd365e25657" ]
[ "contrib/testmpi/test_derivatives_assembly.py" ]
[ "\"\"\"\nBasic new method to calculate derivatives across assembly.\n\"\"\"\n\nimport unittest\n\nimport numpy as np\n\nfrom openmdao.main.api import Component, Assembly, set_as_top\nfrom openmdao.main.datatypes.api import Float\nfrom openmdao.main.test.test_derivatives import ArrayComp2D\nfrom openmdao.util.testut...
[ [ "numpy.zeros" ] ]
Intel-tensorflow/SSD_tensorflow_VOC
[ "839c4291926e4c9f2cf5e028d666766daa873b7c" ]
[ "nets/ssd_common.py" ]
[ "# Copyright 2015 Paul Balanca. 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 ap...
[ [ "tensorflow.exp", "tensorflow.ones", "tensorflow.stack", "tensorflow.greater", "tensorflow.cast", "tensorflow.shape", "tensorflow.concat", "tensorflow.argmax", "tensorflow.while_loop", "tensorflow.zeros", "tensorflow.minimum", "tensorflow.where", "tensorflow.exp...
jlgzb/mmpose
[ "0ecf06e3580f141f6ab44645768a0d6d8ba48383" ]
[ "mmpose/models/detectors/multi_task.py" ]
[ "import torch.nn as nn\n\nfrom .. import builder\nfrom ..builder import POSENETS\n\n\n@POSENETS.register_module()\nclass MultiTask(nn.Module):\n \"\"\"Multi-task detectors.\n\n Args:\n backbone (dict): Backbone modules to extract feature.\n heads (List[dict]): heads to output predictions.\n ...
[ [ "torch.nn.Identity", "torch.nn.ModuleList" ] ]
ankye/Tacotron-2
[ "e0cd46ece5d96948d684f29a224d9b7154976752" ]
[ "tacotron/models/multihead_attention.py" ]
[ "import tensorflow as tf\nimport numpy as np\nimport math\nfrom tacotron.utils.ops import shape_list\n\nclass MultiheadAttention():\n '''Computes the multi-head attention as described in\n https://arxiv.org/abs/1706.03762.\n Args:\n num_heads: The number of attention heads.\n query: The sequence of queries...
[ [ "tensorflow.zeros_initializer", "tensorflow.expand_dims", "tensorflow.matmul", "tensorflow.layers.conv1d", "tensorflow.transpose", "tensorflow.reshape", "tensorflow.variable_scope", "tensorflow.get_variable", "tensorflow.nn.softmax", "tensorflow.tanh", "tensorflow.squar...
felipery03/disaster-response
[ "00f894753ac9df234de91412d9ad4cbff4ff76ae" ]
[ "src/train_classifier.py" ]
[ "import sys\nimport pandas as pd\nfrom sqlalchemy import create_engine\nfrom sklearn.preprocessing import OneHotEncoder\nfrom sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer\nfrom sklearn.model_selection import train_test_split, RandomizedSearchCV\nfrom sklearn.pipeline import Pipeline, Fea...
[ [ "sklearn.ensemble.RandomForestClassifier", "pandas.DataFrame", "sklearn.model_selection.RandomizedSearchCV", "sklearn.metrics.precision_recall_fscore_support", "sklearn.linear_model.LogisticRegression", "sklearn.feature_extraction.text.CountVectorizer", "sklearn.model_selection.train_t...
TreeKid/stable-baselines
[ "129c1958160b95962b887c312cd2273aed35df60" ]
[ "stable_baselines/common/vec_env/util.py" ]
[ "\"\"\"\nHelpers for dealing with vectorized environments.\n\"\"\"\n\nfrom collections import OrderedDict\n\nimport gym\nimport numpy as np\n\n\ndef copy_obs_dict(obs):\n \"\"\"\n Deep-copy a dict of numpy arrays.\n\n :param obs: (OrderedDict<ndarray>): a dict of numpy arrays.\n :return (OrderedDict<nda...
[ [ "numpy.copy" ] ]
shlomi-amitai/myDIFFNet
[ "39dead457f10c82caae2a12ea152f2339188014c" ]
[ "networks/pose_decoder.py" ]
[ "from __future__ import absolute_import, division, print_function\n\nimport torch\nimport torch.nn as nn\nfrom collections import OrderedDict\n\n\nclass PoseDecoder(nn.Module):\n def __init__(self, num_ch_enc, num_input_features, num_frames_to_predict_for=None, stride=1):\n super(PoseDecoder, self).__init...
[ [ "torch.nn.ReLU", "torch.nn.Conv2d", "torch.cat" ] ]
halimacc/CS231n-assignments
[ "e2095450c42780a090d596e7790daf59ac80712b" ]
[ "assignment1/cs231n/classifiers/softmax.py" ]
[ "import numpy as np\nfrom random import shuffle\nfrom past.builtins import xrange\n\ndef softmax_loss_naive(W, X, y, reg):\n \"\"\"\n Softmax loss function, naive implementation (with loops)\n\n Inputs have dimension D, there are C classes, and we operate on minibatches\n of N examples.\n\n Inputs:\n - W: A n...
[ [ "numpy.max", "numpy.zeros_like", "numpy.dot", "numpy.log", "numpy.sum", "numpy.exp", "numpy.arange" ] ]
aalto-ics-kepaco/retention_order_prediction
[ "3091e65008ae7a6208c73a14300c6d030fc9bbe6" ]
[ "src/helper_cls.py" ]
[ "####\n#\n# The MIT License (MIT)\n#\n# Copyright 2017, 2018 Eric Bach <eric.bach@aalto.fi>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without ...
[ [ "numpy.random.seed", "numpy.round", "numpy.sum", "numpy.where", "numpy.random.uniform", "numpy.random.get_state", "numpy.random.set_state", "numpy.unique" ] ]
SOVLOOKUP/AgentOCR
[ "1510a2c8f582597243728c803ab85f4ce3d13a1b" ]
[ "agentocr/postprocess/db_postprocess.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 re...
[ [ "numpy.max", "numpy.array", "numpy.reshape", "numpy.zeros", "numpy.round", "numpy.min" ] ]
liuyuzhenn/LISRD
[ "bfd890b81defebea971db0b744be617ed58f5ffa" ]
[ "lisrd/datasets/utils/homographies.py" ]
[ "import numpy as np\nimport cv2\n\nfrom ...models.keypoint_detectors import SIFT_detect\n\n\ndef sample_homography(\n shape, perspective=True, scaling=True, rotation=True, translation=True,\n n_scales=5, n_angles=25, scaling_amplitude=0.1, perspective_amplitude_x=0.1,\n perspective_amplitude_y=...
[ [ "numpy.concatenate", "numpy.random.normal", "numpy.array", "numpy.uint8", "numpy.sin", "numpy.zeros", "numpy.ones", "numpy.tile", "numpy.min", "numpy.mean", "numpy.linalg.lstsq", "numpy.arange", "numpy.random.uniform", "numpy.argsort", "numpy.cos", "...
georgebisbas/devito
[ "8fdc21bac9739a490db4c50419a356820ffa2f69" ]
[ "examples/seismic/tti/wavesolver.py" ]
[ "# coding: utf-8\nfrom devito import TimeFunction, warning\nfrom devito.tools import memoized_meth\nfrom examples.seismic.tti.operators import ForwardOperator, AdjointOperator\nfrom examples.seismic.tti.operators import particle_velocity_fields\nfrom examples.seismic import PointSource, Receiver\nfrom devito import...
[ [ "numpy.array", "numpy.count_nonzero", "numpy.set_printoptions", "numpy.nonzero", "matplotlib.pyplot.subplots", "numpy.where", "matplotlib.pyplot.pause", "numpy.append", "numpy.int32", "matplotlib.pyplot.cm.get_cmap", "numpy.unique" ] ]
sburtch/rg_sound_generation
[ "2ef59fe65c9f477d6c8dc67705347f2092ee67e5" ]
[ "members/amit/z_vae/models.py" ]
[ "import tensorflow as tf\n\nfrom tensorflow.keras.layers import Conv1D, MaxPool1D, Flatten, Dense, Input\nfrom tensorflow.keras.layers import UpSampling1D, Reshape\nfrom layers import SamplingLayer\n\n\ndef create_encoder(latent_dim, num_features):\n def conv_block(inputs, filters, kernel_size, strides):\n ...
[ [ "tensorflow.keras.layers.Conv1D", "tensorflow.exp", "tensorflow.keras.layers.Input", "tensorflow.keras.layers.Flatten", "tensorflow.keras.layers.Reshape", "tensorflow.keras.layers.Dense", "tensorflow.keras.models.Model", "tensorflow.keras.layers.UpSampling1D", "tensorflow.keras...
aujbl/vehicle
[ "d6f9d6b7b90b52f32721510858fc1a01f35a5aeb" ]
[ "svm_train.py" ]
[ "'''\n训练svm\n'''\n\nimport cv2\nimport numpy as np\nfrom numpy.linalg import norm\nimport sys\nimport os\nimport json\n\nSZ = SZ = 20 \nPROVINCE_START = 1000\n\nprovinces = [\n\"zh_cuan\", \"川\",\n\"zh_e\", \"鄂\",\n\"zh_gan\", \"赣\",\n\"zh_gan1\", \"甘\",\n\"zh_gui\", \"贵\",\n\"zh_gui1\", \"桂\",\n\"zh_hei\", \"黑\",\...
[ [ "numpy.array", "numpy.linalg.norm", "numpy.hstack", "numpy.float32", "numpy.sqrt", "numpy.int32" ] ]
pierrepaleo/silx
[ "392930f522e291d096ca29facb652a5c8dcfdbcd" ]
[ "silx/gui/plot/_BaseMaskToolsWidget.py" ]
[ "# coding: utf-8\n# /*##########################################################################\n#\n# Copyright (c) 2017-2018 European Synchrotron Radiation Facility\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Soft...
[ [ "numpy.equal", "numpy.array", "numpy.empty", "numpy.zeros", "numpy.ones", "numpy.logical_and" ] ]
MaxGhenis/enn
[ "d830c31da16ea912ea3700aaf79e5e2f841eba8d" ]
[ "enn/supervised/classification_data.py" ]
[ "# python3\n# pylint: disable=g-bad-file-header\n# Copyright 2021 DeepMind Technologies Limited. 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:/...
[ [ "numpy.random.RandomState", "pandas.DataFrame", "numpy.where", "pandas.concat", "numpy.hstack", "numpy.linspace", "sklearn.datasets.make_moons", "numpy.vstack" ] ]
FrankCuiCN/CTRNet
[ "7ae460b314c79713dc2e6e313c3f5741f6a28222" ]
[ "src/model/ctrnet.py" ]
[ "import os\nimport pickle\nimport time\n\nimport numpy as np\nimport torch\nimport torch.nn as nn\nfrom sklearn.model_selection import GridSearchCV\nfrom sklearn.svm import SVC\n\nfrom model.criterion import Criterion\nfrom model.fpn_resnet import resnet50\nfrom model.pred_decoder import pred_decoder\n\n\ndef basic...
[ [ "torch.sigmoid", "numpy.array", "torch.cuda.synchronize", "torch.no_grad", "torch.optim.lr_scheduler.MultiStepLR", "sklearn.svm.SVC", "torch.load" ] ]
JzHuai0108/kalibr
[ "32d095162408c90ebf0c49522d27732ffec8f35f" ]
[ "aslam_offline_calibration/kalibr/python/kalibr_common/testRotationVector.py" ]
[ "import sm\nimport numpy as np\n\n\ndef testRotationVector():\n \"\"\"\n This test depends on several lines of import_rotational_kinematics_python() in \n kalibr/Schweizer-Messer/sm_python/src/export_rotational_kinematics.cpp, \n which were commented out to disable warnings.\n \"\"\"\n rvi = sm.Ro...
[ [ "numpy.allclose", "numpy.array", "numpy.linalg.norm", "numpy.random.rand" ] ]
sertit/eoreader
[ "da6b1ba4055adba6e8a266552c29003f59d0e51a" ]
[ "CI/SCRIPTS/scripts_utils.py" ]
[ "\"\"\" Utils module for scripts \"\"\"\nimport logging\nimport os\nimport sys\nfrom functools import wraps\nfrom pathlib import Path\nfrom typing import Callable, Union\n\nimport geopandas as gpd\nimport numpy as np\nimport rasterio\nfrom cloudpathlib import AnyPath, CloudPath, S3Client\nfrom sertit import ci, vec...
[ [ "numpy.testing.assert_array_almost_equal" ] ]
perlinm/rey_research
[ "491d1d33cc8d20dc1b72de552ac7c1b65fb3ee63" ]
[ "soc_squeezing/scripts/compute_trunc_vals.py" ]
[ "#!/usr/bin/env python3\n\nimport os, sys, scipy\nimport numpy as np\n\nfrom time import time as system_time\n\nfrom dicke_methods import coherent_spin_state\nfrom correlator_methods import compute_deriv_vals, dec_mat_drive, \\\n mat_zxy_to_pzm, vec_zxy_to_pzm\n\nstart_time = system_time()\n\nif len(sys.argv[1:]...
[ [ "numpy.array", "numpy.sin", "scipy.special.jv" ] ]
JenFuChen/NKUST
[ "bd80a449eddfdaf75709379d2e904ff70d409666" ]
[ "Python/110-1/Midterm Additional HW/003.py" ]
[ "# 003 輸入N,列出N個1-99的亂數,並找出其最小值\r\nfrom random import randint\r\nimport numpy as np\r\nf = open(\"input.txt\",mode='r')\r\nfor line in f.readlines():\r\n num = int(line)\r\n list = np.zeros(num, dtype =int)\r\n for i in range(num):\r\n ans=(randint(1,99))\r\n list[i] = ans\r\n print(ans...
[ [ "numpy.zeros" ] ]
princeton-computational-imaging/nerf_atlas
[ "f66ba284ea440cd816b303cdb7312288901da97e" ]
[ "runner.py" ]
[ "# Global runner for all NeRF methods.\n# For convenience, we want all methods using NeRF to use this one file.\nimport argparse\nimport random\nimport json\nimport math\nimport time\n\nimport numpy as np\nimport torch\nimport torch.optim as optim\nimport torch.nn.functional as F\nimport torchvision.transforms.func...
[ [ "torch.cat", "torch.optim.lr_scheduler.CosineAnnealingLR", "numpy.mean", "torch.cuda.is_available", "torch.load", "torch.nn.DataParallel", "torch.manual_seed", "torch.randn_like", "torch.tensor", "torch.zeros_like", "torch.jit.script", "torch.fft.rfft2", "torch....
RebelTat/examples
[ "2666bdf783d54e42a343babf028b0423ac181f6b" ]
[ "tensorflow_examples/lite/model_maker/third_party/efficientdet/coco_metric.py" ]
[ "# Copyright 2020 Google Research. 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...
[ [ "numpy.concatenate", "numpy.array", "tensorflow.io.gfile.GFile", "numpy.mean", "numpy.where", "tensorflow.name_scope", "tensorflow.numpy_function", "numpy.around" ] ]
felix-engelmann/robotbona
[ "00d36382b82a2b525c87f666a445c6d15cb7830c" ]
[ "tcpjson/mapping.py" ]
[ "import base64\nimport struct\nimport matplotlib.pyplot as plt\n\nm = \"AAAAAAAAZABk0ssAVUDTAAFaw6qUAAVU0QDEqqQABqXQAAHDqqmkABalqNAApsWqpsKqgM8AAsiqkM8ACprHqpDQAArHqpDQACrFqpmqkNQAFVqhqpDWAAFVUND4AA==\"\ntrack = \"AQkhADIxNjEoMSgwOTA4MDgvNS81MisyKzNMM0w0LjQuNUw1TDZINkg3TDdJN0kyQjJDMkMxRjFFMUUwQzBEMEQ2PjZENg==\"\nin...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
SaraLatif99/fire-detection-cnn
[ "dd00971c20c7dde8809cabc1cebc31eababb9b24" ]
[ "superpixel-inceptionV1OnFire.py" ]
[ "################################################################################\n\n# Example : perform live fire detection in video using superpixel localization\n# and the superpixel trained version of the InceptionV1-OnFire CNN\n\n# Copyright (c) 2017/18 - Andrew Dunnings / Toby Breckon, Durham University, UK\n...
[ [ "numpy.zeros", "numpy.unique" ] ]
ml4vision/albumentations
[ "869e9ff620988339acc5efe5cb29e739db2c5db6" ]
[ "albumentations/core/composition.py" ]
[ "from __future__ import division\nfrom collections import defaultdict\n\nimport random\n\nimport numpy as np\n\nfrom albumentations.augmentations.keypoints_utils import KeypointsProcessor\nfrom albumentations.core.serialization import SerializableMeta, get_shortest_class_fullname\nfrom albumentations.core.six impor...
[ [ "numpy.expand_dims" ] ]
HKBU-HPML/FADNet-PP
[ "6e653e8f1fa0f55f10068f5592cbc8b49bb571e4" ]
[ "layers_package/channelnorm_package/setup.py" ]
[ "#!/usr/bin/env python3\nimport os\nimport torch\n\nfrom setuptools import setup\nfrom torch.utils.cpp_extension import BuildExtension, CUDAExtension\n\ncxx_args = ['-std=c++14']\n\nnvcc_args = [\n '-gencode', 'arch=compute_52,code=sm_52',\n '-gencode', 'arch=compute_53,code=sm_53',\n '-gencode', 'arch=com...
[ [ "torch.utils.cpp_extension.CUDAExtension" ] ]
wjp/kernel_tuner
[ "b3b60e6a6b67ba8719ddf3a2a72abc8c84f043cc" ]
[ "kernel_tuner/strategies/simulated_annealing.py" ]
[ "\"\"\" The strategy that uses particle swarm optimization\"\"\"\n\nfrom __future__ import print_function\nimport random\nimport numpy as np\n\nfrom kernel_tuner.strategies.minimize import _cost_func\nfrom kernel_tuner.strategies.genetic_algorithm import random_val\n\n\ndef tune(runner, kernel_options, device_optio...
[ [ "numpy.exp" ] ]
GiovanniPasserello/SHGP
[ "7b8d06eaeb00cb745c4ad449524dfe97d404fd4e" ]
[ "shgp/data/utils.py" ]
[ "import numpy as np\n\n\"\"\"\nGeneral dataset utilities.\n\"\"\"\n\n\ndef standardise_features(data: np.ndarray):\n \"\"\"\n Standardise all features to 0 mean and unit variance.\n\n :param: data - the input data.\n :return: the normalised data.\n \"\"\"\n data_means = data.mean(axis=0) # mean v...
[ [ "numpy.sin", "numpy.random.rand", "numpy.random.randn", "numpy.sqrt", "numpy.abs", "numpy.cos" ] ]
AdvancesInDeepLearning/se3-transformer
[ "5e70738b7bbb17d6695f008b5c6777a85a8f3aff" ]
[ "experiments/nbody/nbody_flags.py" ]
[ "import argparse\nimport torch\nimport numpy as np\n\n\ndef get_flags():\n parser = argparse.ArgumentParser()\n\n # Model parameters\n parser.add_argument('--model', type=str, default='SE3Transformer',\n help=\"String name of model\")\n parser.add_argument('--num_layers', type=int...
[ [ "torch.manual_seed", "torch.device", "torch.cuda.is_available", "numpy.random.seed" ] ]
QS-L-1992/tensorflow
[ "4bd51c0e182715bf94a34bd51b4f89dd5cf46163" ]
[ "tensorflow/python/distribute/failure_handling/failure_handling.py" ]
[ "# Copyright 2022 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required...
[ [ "tensorflow.python.framework.errors.InvalidArgumentError", "tensorflow.python.lib.io.file_io.recursive_create_dir_v2", "tensorflow.python.distribute.failure_handling.gce_util.detect_platform", "tensorflow.python.platform.tf_logging.info", "tensorflow.python.eager.context.context", "tensorf...
TianQi-777/xingtian
[ "9b1678ad6ff12f00c2826a7ec7f42d5350b83b31" ]
[ "zeus/datasets/common/avazu.py" ]
[ "# -*- coding: utf-8 -*-\n\n# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the MIT License.\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; witho...
[ [ "numpy.ceil" ] ]
adaruna3/continual-kge
[ "f85e9eab52a1651ffbe4eb5c34cca0df7edba39b" ]
[ "experiments/standard_setting.py" ]
[ "import numpy as np\nfrom copy import copy\nimport torch\nfrom os.path import basename\nimport __main__ # used to get the original execute module\n\nfrom models import model_utils\nfrom logger.terminal_utils import ExperimentArgParse, logout, log_train, log_test, InteractiveTerminal\nfrom logger.viz_utils import P...
[ [ "torch.device", "torch.cuda.is_available" ] ]
ddempsey/eshelby-inclusion
[ "ae6c6bf230efce3b271feaf56b623e87d5fb1b61" ]
[ "elpinc.py" ]
[ "# Python implementation of the Eshelby ellipsoidal inclusion code presented by Meng et al. (2012)\n# \"Evaluation of the Eshelby solution for the ellipsoidal inclusion and heterogeneity\", Computers & Geosciences 40, 40-48.\n\nimport numpy as np\nfrom copy import copy\nfrom numpy.linalg import inv\nfrom matplotlib...
[ [ "numpy.dot", "numpy.arccos", "numpy.tensordot", "numpy.cos", "scipy.special.ellipkinc", "numpy.logspace", "numpy.concatenate", "numpy.sin", "matplotlib.pyplot.subplots", "numpy.eye", "numpy.isreal", "numpy.prod", "numpy.sqrt", "numpy.log10", "numpy.linal...
mikigom/deeplab-pytorch
[ "48fefca09ea2403e0236830cd016aacb79f35876" ]
[ "libs/colors.py" ]
[ "import numpy as np\n\n\nCOLORS = np.array([\n [0, 0, 0], # Background\n [128, 0, 0], # Building\n [0, 0, 255], # Structures\n [0, 128, 128], # Road\n [128, 128, 128], # Track\n [0, 128, 0], # Trees\n [128, 128, 0], # Crops\n [128, 0, ...
[ [ "numpy.array", "numpy.zeros" ] ]
BrunoMeyer/microbiome_network
[ "542130b8307928c51b1c34541d17ec6050a1ed9b" ]
[ "src/otu_importance.py" ]
[ "\"\"\"\nMIT License\n\nCopyright (c) 2019 Bruno Henrique Meyer\n\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 restriction, including without limitation the rights\nto use, copy...
[ [ "numpy.isnan", "sklearn.linear_model.LinearRegression", "numpy.mean", "sklearn.svm.SVR", "sklearn.feature_selection.RFE", "sklearn.ensemble.ExtraTreesClassifier" ] ]
rshanker779/conways-game-of-life
[ "890eac328c6b13c77cd90ec4651dacc29c612319" ]
[ "conway/conway.py" ]
[ "from collections import Counter\nfrom enum import Enum\n\nimport numpy as np\n\nfrom common.utilities import plotter, GeneralConfig, get_new_grid\n\n\nclass SeedFunctionTypes(Enum):\n GLIDER = \"glider\"\n R_PENTOMINO = \"r_pentomino\"\n RANDOM = \"random\"\n\n def __str__(self):\n return self.v...
[ [ "numpy.random.binomial", "numpy.zeros" ] ]
SIMEXP/fmriprep-lts
[ "1fd298179770c45870e8cc19c9e9036674fb8875" ]
[ "fmriprep-reproducibility/stats/stats.py" ]
[ "import os\nimport glob\nimport re\nimport numpy as np\nimport nibabel as nib\nimport nilearn.plotting\nimport matplotlib.pyplot as plt\nimport pandas as pd\n\ndef compute_mutual_mask(mask_paths):\n \"\"\"Get mutually inclusive mask for each experiment iteration\"\"\"\n all_masks = []\n for mask_path in ma...
[ [ "numpy.quantile", "numpy.array", "numpy.zeros", "pandas.DataFrame", "numpy.sum", "numpy.ones", "matplotlib.pyplot.subplots", "numpy.mean", "numpy.std", "numpy.savez", "numpy.prod", "numpy.abs" ] ]
Johannes-Sahlmann/pystrometry
[ "79dc67369be2ce46ddb0ebc73e5fe3570d20c025" ]
[ "pystrometry/pystrometry.py" ]
[ "\"\"\"\nClasses and functions for high-precision astrometry timeseries analysis.\n\nAuthors\n-------\n\n - Johannes Sahlmann\n\n\nNotes\n-----\n - should support python 2.7 and 3.5 (for the time being)\n\n\n\"\"\"\n\n\nfrom __future__ import print_function\n\nimport copy\nimport os\nimport numpy as np\nfrom ...
[ [ "numpy.arccos", "numpy.dot", "numpy.random.choice", "numpy.random.rand", "numpy.median", "numpy.tan", "numpy.tile", "numpy.min", "numpy.mean", "numpy.where", "numpy.cos", "numpy.deg2rad", "numpy.mat", "numpy.max", "numpy.sin", "numpy.linalg.norm", ...
byewokko/guessing-game
[ "ffca7f68836803e1a2049488227306ec0963e65b" ]
[ "train.py" ]
[ "from utils.set_seed import set_seed\n\nimport datetime\nimport os\n\nimport numpy as np\nimport yaml\nimport sys\nfrom collections import OrderedDict\n\nimport pandas as pd\n\nimport tensorflow.keras.optimizers as optim\nimport tensorflow.keras\n\n\nclass TrainingError(RuntimeError):\n\tpass\n\n\nclass EarlyStoppi...
[ [ "pandas.DataFrame", "pandas.Int32Dtype", "numpy.asarray", "pandas.Float64Dtype" ] ]
mstim/glycresoft
[ "1d305c42c7e6cba60326d8246e4a485596a53513" ]
[ "glycan_profiling/plotting/plot_glycoforms.py" ]
[ "import operator\n\nimport matplotlib\nfrom matplotlib import font_manager\nfrom matplotlib import pyplot as plt\nfrom matplotlib import patches as mpatches\nfrom matplotlib.textpath import TextPath\nfrom matplotlib.transforms import IdentityTransform, Affine2D\n\nimport numpy as np\n\nfrom .svg_utils import ET, By...
[ [ "matplotlib.font_manager.FontProperties", "numpy.array", "matplotlib.patches.PathPatch", "matplotlib.pyplot.close", "matplotlib.pyplot.subplots", "matplotlib.textpath.TextPath", "matplotlib.patches.Rectangle", "matplotlib.transforms.Affine2D" ] ]
liyucheng09/zh_conceptnet
[ "eeaeb8a72ab68790185ddff01b3280c785f918f9" ]
[ "zh-model/wwm-pipeline.py" ]
[ "from transformers import pipeline, AutoModelForMaskedLM, AutoTokenizer\nfrom transformers.pipelines.fill_mask import FillMaskPipeline\nfrom typing import TYPE_CHECKING, Optional, Union\nimport torch\n\nclass MultiMaskFilling(FillMaskPipeline):\n\n def __call__(self, *args, targets=None, top_k: Optional[int] = N...
[ [ "torch.nonzero" ] ]
juhyeonkim95/NovelViewSynthesis
[ "34213c3414bda01a9852303451817e8fe8249fc6" ]
[ "main.py" ]
[ "import tensorflow as tf\nfrom keras.backend.tensorflow_backend import set_session\nfrom model.model_Tatarchenko15_attention import ModelTatarchenko15Attention\nfrom model.model_Zhou16_attention import ModelZhou16Attention\nfrom model.model_interface import ModelInterface\nfrom data_container import *\nimport json\...
[ [ "tensorflow.ConfigProto", "tensorflow.Session", "pandas.DataFrame" ] ]
JohanObluda/ntua-slp-semeval2018
[ "c9c3ad2c05b4b4ea849dee0db13c3f02b52929b6" ]
[ "modules/nn/modules.py" ]
[ "from torch import nn, torch\nfrom torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence\n\nfrom modules.nn.regularization import GaussianNoise\n\n\nclass RNNEncoder(nn.Module):\n def __init__(self, input_size, rnn_size, num_layers,\n bidirectional, dropout):\n \"\"\"\n ...
[ [ "torch.nn.Dropout", "torch.nn.LSTM", "torch.torch.cat", "torch.nn.utils.rnn.pad_packed_sequence", "torch.torch.from_numpy", "torch.nn.Embedding" ] ]
MuhammadAmir5670/face-attendance-app
[ "4a1b3bbdec14045fcb9b4a9b05709d6a17be577e" ]
[ "inference.py" ]
[ "import numpy as np\nimport argparse\nfrom loguru import logger\nfrom collections import defaultdict\nimport os\n\nfrom model.faceNet import FaceNet\nfrom model.detect import FaceDetector\nfrom model.utilities.utils import remove_files, load_attendance\nfrom model.utilities.image import save_image, draw_rectangles,...
[ [ "numpy.argmax" ] ]
jan-rodriguez/UdacityProject1
[ "f12d4bced0bf2f02f1ad8662061670564c3ce57f" ]
[ "Project/serve/predict.py" ]
[ "import argparse\nimport json\nimport os\nimport pickle\nimport sys\nimport sagemaker_containers\nimport pandas as pd\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport torch.utils.data\n\nfrom model import LSTMClassifier\n\nfrom utils import review_to_words, convert_and_p...
[ [ "numpy.hstack", "torch.cuda.is_available", "torch.load", "torch.from_numpy" ] ]
chapipo/pibooth
[ "a1a77e03b383f94c2a4c0406afee8221a75b3090" ]
[ "pibooth/pictures/maker.py" ]
[ "# -*- coding: utf-8 -*-\n\nimport os\nimport os.path as osp\nfrom pibooth import fonts\nfrom pibooth.utils import timeit\nfrom pibooth.pictures import sizing\nfrom PIL import Image, ImageDraw\n\ntry:\n import cv2\n import numpy as np\nexcept ImportError:\n cv2 = None\n\n\nclass PictureMaker(object):\n\n ...
[ [ "numpy.full", "numpy.zeros" ] ]
wenh06/gatk
[ "68f2fb55f76dab77af2d4773f602c3f805954ba2" ]
[ "src/main/python/org/broadinstitute/hellbender/gcnvkernel/models/model_ploidy.py" ]
[ "import argparse\nimport inspect\nimport logging\nfrom typing import List, Dict, Set, Tuple\n\nimport numpy as np\nimport pymc3 as pm\nimport theano as th\nimport theano.tensor as tt\nfrom pymc3 import Normal, Deterministic, DensityDist, Bound, Exponential\n\nfrom . import commons\nfrom .fancy_model import Generali...
[ [ "numpy.log", "numpy.zeros", "numpy.ones", "numpy.tile", "numpy.eye", "numpy.arange" ] ]
ajevnisek/hyperseg
[ "e64fdde9b38179c965463ff22122bf606eede1ec" ]
[ "models/hyperseg_v1_0.py" ]
[ "import numbers\nimport numpy as np\nfrom itertools import groupby\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.nn.modules.utils import _pair\nfrom models.layers.meta_conv import MetaConv2d\nfrom models.layers.meta_sequential import MetaSequential\n\n\nclass HyperGen(nn.Module):...
[ [ "torch.nn.functional.unfold", "torch.nn.modules.utils._pair", "torch.cat", "torch.nn.ModuleList", "torch.nn.BatchNorm2d", "torch.load", "torch.nn.functional.pad", "torch.meshgrid", "torch.flip", "torch.nn.functional.adaptive_avg_pool2d", "numpy.prod", "torch.nn.func...
yamnihcg/NBA-Timeout-Classification
[ "b2624567bbb1c850ee3ea552d3fbcae9d52a201e" ]
[ "phase1/plays.py" ]
[ "import pandas as pd\nfrom lineups import get_players_and_games\nfrom event_codes import get_event_codes\nfrom tester import run_tests\n\ndef main():\n \"\"\" Starting point of the program \"\"\"\n\n games, players = get_players_and_games()\n event_codes = get_event_codes()\n\n # Unit tests to make sure...
[ [ "pandas.DataFrame", "pandas.read_csv" ] ]
daisuke19891023/dl-from-scratch-3
[ "4fb9441cfcceca96ac07c602053e608d92c80838" ]
[ "steps/step35.py" ]
[ "if '__file__' in globals():\n import os\n import sys\n sys.path.append(os.path.join(os.path.dirname(__file__), '..'))\n import numpy as np\n import matplotlib.pyplot as plt\n from dezero import Variable\n from dezero import setup_variable\n from dezero.utils import plot_dot_graph\n impor...
[ [ "numpy.array" ] ]
siddharth17196/snek-classifier-web-app
[ "b92cbaf337544c1aa5648f837413cabf777950c0" ]
[ "getpreds.py" ]
[ "import torch\r\nimport torchvision\r\nimport random\r\nimport matplotlib.pyplot as plt\r\nimport os\r\nimport copy\r\nimport argparse\r\nimport pickle\r\nimport torch.optim as optim\r\nimport numpy as np\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nimport torch.utils.checkpoint as cp\r\nfrom torc...
[ [ "torch.nn.Linear", "torch.cuda.is_available", "torch.load", "torch.max" ] ]
czq142857/NDC
[ "c036901c566f5f5a07c6a2dceafca2b32d097001" ]
[ "data_preprocessing/get_groundtruth_NDC/utils.py" ]
[ "import numpy as np\n\n\n#this is not an efficient implementation. just for testing!\ndef dual_contouring_47_test(int_grid, float_grid):\n all_vertices = []\n all_triangles = []\n\n int_grid = np.squeeze(int_grid)\n dimx,dimy,dimz = int_grid.shape\n vertices_grid = np.full([dimx,dimy,dimz], -1, np.in...
[ [ "numpy.full", "numpy.array", "numpy.ascontiguousarray", "numpy.sum", "numpy.squeeze" ] ]
hwjiang1510/signed-distance-SRN
[ "2e750d3fb71cf7570cf9be9f4a39040b5173795d" ]
[ "options.py" ]
[ "import numpy as np\nimport os,sys,time\nimport torch\nimport random\nimport string\nimport yaml\nfrom easydict import EasyDict as edict\n\nimport util\nfrom util import log\n\n# torch.backends.cudnn.enabled = False\ntorch.backends.cudnn.benchmark = False\ntorch.backends.cudnn.deterministic = True\n\ndef parse_argu...
[ [ "numpy.random.seed", "torch.manual_seed", "torch.cuda.is_available", "torch.cuda.manual_seed_all" ] ]
lindagaw/Eos
[ "a125aca20007fbc55c4a5ae0c7baeb85a1375e1a" ]
[ "datasets/descendant_activations.py" ]
[ "import pickle\nimport torch\nimport numpy as np\nimport torch.utils.data as data\nfrom torch.utils.data import TensorDataset, DataLoader\nimport params\n\nimport os\nimport gzip\nfrom torchvision import datasets, transforms\n\nclass Descendant_Activations(data.Dataset):\n\n def __init__(self, root, train=True, ...
[ [ "numpy.asarray", "numpy.random.shuffle", "numpy.arange", "torch.utils.data.DataLoader", "torch.load" ] ]
ayulockin/SwAV-TF
[ "f2aec06f1db1df50044ca76ec7b746e03556de47" ]
[ "utils/architecture.py" ]
[ "from tensorflow.keras import layers\nfrom tensorflow.keras import models\nimport tensorflow as tf\n\ndef get_resnet_backbone():\n\tbase_model = tf.keras.applications.ResNet50(include_top=False,\n\t\tweights=None, input_shape=(None, None, 3))\n\tbase_model.trainabe = True\n\n\tinputs = layers.Input((None, None, 3))...
[ [ "tensorflow.keras.applications.ResNet50", "tensorflow.keras.layers.Input", "tensorflow.keras.layers.Activation", "tensorflow.keras.models.Model", "tensorflow.keras.layers.Dense", "tensorflow.math.l2_normalize", "tensorflow.keras.layers.GlobalAveragePooling2D", "tensorflow.keras.lay...
KShebek/MINE-Database
[ "49bc6539e99445244eb30447a78f46ee858feab1" ]
[ "minedatabase/filters.py" ]
[ "\"\"\"Definitions of filters for pickaxe.\n\nUse this module to define your own filter classes. All filter classes must\nsubclass Filter. See Filter docstring for more information.\n\nTo use any filter, import it in pickaxe_run.py, initialize it, and append it\nto the .filters property of your pickaxe object.\n\"\...
[ [ "numpy.isinf", "numpy.array", "numpy.isnan", "pandas.DataFrame", "scipy.stats.rv_discrete", "pandas.read_csv", "numpy.array_split" ] ]
wx-b/ibc
[ "2c9202e50cfee1abdcd955d3ac1b9d68b5d81e53" ]
[ "networks/pixel_mdn.py" ]
[ "# coding=utf-8\n# Copyright 2021 The Reach ML 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...
[ [ "tensorflow.shape", "tensorflow.concat", "tensorflow.linspace", "tensorflow.reshape", "tensorflow.keras.layers.Dense", "tensorflow.broadcast_to", "tensorflow.stack", "tensorflow.image.resize" ] ]
darkAlert/impersonator-rt
[ "8a2b879cf60f2094944a0104592d460fee3bda6a" ]
[ "lwganrt/models/holoport_uv_trainer.py" ]
[ "import os\nimport torch\nimport torch.nn.functional as F\nfrom collections import OrderedDict\nimport lwganrt.utils.util as util\nfrom .models import BaseModel\nfrom lwganrt.networks.networks import NetworksFactory, HumanModelRecovery, Vgg19, VGGLoss, FaceLoss, StyleLoss\nfrom lwganrt.utils.nmr import SMPLRenderer...
[ [ "torch.zeros", "torch.cat", "torch.stack", "torch.min", "torch.nn.MSELoss", "torch.max", "torch.no_grad", "torch.ones", "torch.nn.L1Loss", "torch.abs", "torch.nn.functional.grid_sample", "numpy.transpose", "torch.load", "torch.ones_like", "torch.zeros_li...
Damzwan/espnet-mirror
[ "8b0444e377a43ce8f15dbfcb45a8c06a9da0d707" ]
[ "espnet2/tts/gst/style_encoder.py" ]
[ "# Copyright 2020 Nagoya University (Tomoki Hayashi)\n# Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0)\n\n\"\"\"Style encoder of GST-Tacotron.\"\"\"\n\nfrom typeguard import check_argument_types\nfrom typing import Sequence\n\nimport torch\n\nfrom espnet.nets.pytorch_backend.transformer.attention import ...
[ [ "torch.nn.Linear", "torch.nn.Dropout", "torch.nn.GRU", "torch.nn.Sequential", "torch.nn.BatchNorm2d", "torch.nn.Module.__init__", "torch.nn.Parameter", "torch.nn.ReLU", "torch.nn.Conv2d", "torch.tanh", "torch.randn" ] ]
Miso-K/DDCW
[ "aa033e1bf9258eee0a39b6dd69260910179528e0" ]
[ "utils/plot_custom_model_metrics.py" ]
[ "import matplotlib.pyplot as plt\nfrom matplotlib.gridspec import GridSpec\nimport numpy as np\n\ndef get_gradual_metric(metric):\n\n list_metric = []\n sum_perc = 0\n for i in range(len(metric)):\n sum_perc += metric[i]\n if i == 0:\n list_metric.append(metric[i])\n else:\n...
[ [ "numpy.isnan", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.title", "matplotlib.pyplot.legend", "matplotlib.pyplot.figure", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.subplot" ] ]
yizaochen/enmspring
[ "84c9aabeb7f87eda43967d86c763b7d600986215" ]
[ "enmspring/stack_util.py" ]
[ "import matplotlib.pyplot as plt\nimport numpy as np\nfrom enmspring.na_seq import sequences\nfrom enmspring.spring import Spring\nfrom enmspring.k_b0_util import get_df_by_filter_st\n\nclass StackAgent:\n cutoff = 4.7\n type_na = 'bdna+bdna'\n strands = ['STRAND1', 'STRAND2']\n\n def __init__(self, hos...
[ [ "numpy.std", "numpy.mean", "matplotlib.pyplot.subplots" ] ]
cgarciae/simple-mixture-models
[ "05c6239091d47eb373a6cc6ea784def5075110c5" ]
[ "main.py" ]
[ "import typing as tp\n\nimport matplotlib.pyplot as plt\nimport typer\nfrom sklearn.linear_model import LinearRegression\n\n\nimport numpy as np\nimport jax\nimport jax.numpy as jnp\nimport elegy\nimport optax\n\n\nclass MixtureModel(elegy.Module):\n def __init__(self, k: int):\n super().__init__()\n ...
[ [ "numpy.random.normal", "numpy.sin", "sklearn.linear_model.LinearRegression", "matplotlib.pyplot.title", "matplotlib.pyplot.plot", "matplotlib.pyplot.figure", "numpy.random.uniform", "matplotlib.pyplot.show", "matplotlib.pyplot.fill_between", "matplotlib.pyplot.scatter" ] ...
medoli900/word-rnn-tensorflow
[ "ece0d4a0cbce2e573cbea71ca9bc76675ed51790" ]
[ "sample.py" ]
[ "from __future__ import print_function\nimport numpy as np\nimport tensorflow as tf\n\nimport argparse\nimport time\nimport os\nfrom six.moves import cPickle\n\nfrom utils import TextLoader\nfrom model import Model\n\ndef main():\n parser = argparse.ArgumentParser()\n parser.add_argument('--save_dir', type=st...
[ [ "tensorflow.Session", "tensorflow.global_variables_initializer", "tensorflow.train.get_checkpoint_state", "tensorflow.global_variables" ] ]
ToleranceVirtue/seq2seq
[ "068838da3f255a11491f41cad7dfcb40ffc66ac8" ]
[ "bin/train.py" ]
[ "#! /usr/bin/env python\n# Copyright 2017 Google 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 ...
[ [ "tensorflow.logging.set_verbosity", "tensorflow.flags.DEFINE_string", "tensorflow.flags.DEFINE_boolean", "tensorflow.contrib.learn.python.learn.learn_runner.run", "tensorflow.logging.info", "tensorflow.flags.DEFINE_float", "tensorflow.gfile.MakeDirs", "tensorflow.flags.DEFINE_integ...
fferflo/tf-semseg
[ "b392cac2e8cca5389e7a099e8f7a87d72f4a70fc" ]
[ "tf_semseg/predict.py" ]
[ "import math\r\nimport tensorflow as tf\r\nfrom . import aggregator\r\n\r\ndef flip(next_predictor, axis, aggregator_factory=aggregator.sum):\r\n def predict(batch):\r\n aggregator = aggregator_factory()\r\n\r\n batch1 = next_predictor(batch)\r\n aggregator.add(batch1)\r\n\r\n batch2 ...
[ [ "tensorflow.convert_to_tensor", "tensorflow.range", "tensorflow.concat", "tensorflow.debugging.assert_greater_equal", "tensorflow.reverse", "tensorflow.math.maximum", "tensorflow.slice", "tensorflow.stack", "tensorflow.pad", "tensorflow.image.resize" ] ]
rystrauss/symbolic-regression
[ "c0c7e0afbddca30ea77a1d0758962f6349ee222d" ]
[ "srlearn/functions.py" ]
[ "\"\"\"Defines the functions available for inclusion in the genetic algorithm's function set.\n\nFunctions defined here have the closure property, which requires that each of the functions in the\nfunction set be able to accept, as its arguments, any value and data type that may possibly be\nreturned by any functio...
[ [ "numpy.divide", "numpy.errstate", "numpy.tan", "numpy.exp", "numpy.abs" ] ]
AlexandraImbrisca/PipelineDP
[ "ebdbc979ad5a00ba47b1cfb0032da9f5353cd9df" ]
[ "tests/dp_engine_test.py" ]
[ "import collections\nimport numpy as np\nimport unittest\n\nimport pipeline_dp\n\"\"\"DPEngine Test\"\"\"\n\n\nclass dp_engineTest(unittest.TestCase):\n aggregator_fn = lambda input_values: (len(input_values), np.sum(\n input_values), np.sum(np.square(input_values)))\n\n def test_contribution_bounding_...
[ [ "numpy.square", "numpy.sum" ] ]
fangyihao/teamnet
[ "4f906b80f17626b0b2aedf9b6f495dbd0eb47dd6" ]
[ "tensor2tensor/layers/common_layers.py" ]
[ "# coding=utf-8\n# Copyright 2018 The Tensor2Tensor Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requir...
[ [ "tensorflow.space_to_depth", "tensorflow.ones_like", "tensorflow.ones", "tensorflow.contrib.framework.get_name_scope", "tensorflow.zeros_like", "tensorflow.clip_by_value", "tensorflow.stack", "tensorflow.depth_to_space", "tensorflow.tanh", "tensorflow.logging.warning", ...
janniklasrose/chebpy
[ "f69ca920e7c672e4a37e53a7d32f580c536f3462" ]
[ "chebpy/core/chebfun.py" ]
[ "import operator\n\nimport numpy as np\n\nfrom .bndfun import Bndfun\nfrom .settings import _preferences as prefs\nfrom .utilities import Domain, check_funs, generate_funs, compute_breakdata\nfrom .decorators import self_empty, float_argument, cast_arg_to_chebfun, cache\nfrom .exceptions import BadFunLengthArgument...
[ [ "numpy.max", "numpy.full", "numpy.array", "numpy.concatenate", "numpy.ones", "numpy.isscalar", "numpy.arange", "numpy.abs", "numpy.append" ] ]
AWehrhahn/SME
[ "542e880ed779381f7cbbaaacb59475fa6a6d3537" ]
[ "src/pysme/persistence.py" ]
[ "import io\nimport json\nimport logging\nimport os\nimport subprocess\nimport sys\nimport tempfile\nfrom zipfile import ZIP_LZMA, ZIP_STORED, ZipFile\n\nimport numpy as np\nfrom flex.flex import FlexExtension, FlexFile\n\nfrom . import __version__\n\nlogger = logging.getLogger(__name__)\n\n\ndef to_flex(sme):\n ...
[ [ "numpy.isnan", "numpy.zeros", "numpy.load", "numpy.save", "numpy.isscalar", "numpy.size", "numpy.cumsum", "numpy.issubdtype" ] ]