repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
Ankit-Kumar-Saini/Machine_Learning_Udacity
[ "00655d09ee2074f8f1bc899e90ae7291b6b0ee2d" ]
[ "Plagiarism Detection/source_sklearn/train.py" ]
[ "from __future__ import print_function\n\nimport argparse\nimport os\nimport pandas as pd\n\n# sklearn.externals.joblib is deprecated in 0.21 and will be removed in 0.23. \n# from sklearn.externals import joblib\n# Import joblib package directly\nimport joblib\nfrom sklearn.ensemble import RandomForestClassifier\n\...
[ [ "sklearn.ensemble.RandomForestClassifier" ] ]
FedericoFontana/ray
[ "5a7feae15f8c74d5d196fea6697c1827008018f3" ]
[ "python/ray/rllib/models/action_dist.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nfrom collections import namedtuple\nimport distutils.version\nimport numpy as np\n\nfrom ray.rllib.utils.annotations import override, DeveloperAPI\nfrom ray.rllib.utils import try_import_tf\n\ntf = try...
[ [ "numpy.log", "numpy.sum" ] ]
d-ataman/Char-NMT
[ "6305959d11d7a2efd68b05d3bf867f8193b902de" ]
[ "onmt/Models.py" ]
[ "from __future__ import division\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom torch.autograd import Variable\nfrom torch.nn.utils.rnn import pack_padded_sequence as pack\nfrom torch.nn.utils.rnn import pad_packed_sequence as unpack\n\nimport numpy as np\n\nimport onmt\nfrom onmt.Uti...
[ [ "torch.nn.Dropout", "torch.cat", "torch.nn.utils.rnn.pack_padded_sequence", "torch.nn.Tanh", "torch.nn.Linear", "torch.nn.utils.rnn.pad_packed_sequence", "torch.nn.functional.relu", "torch.stack" ] ]
zhondr/cuda-fft
[ "3d1f29e9cd4e289773cf1a556f853bc94346a768" ]
[ "plot_AWS_FFT.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\n\ndata_file1 = np.loadtxt('CpuTimeData_onlyfft_AWS_c5.txt',delimiter='\t')\ndata_file2 = np.loadtxt('GpuTimeData_onlyfft_AWS_p3.txt',delimiter='\t')\ndata_file3 = np.loadtxt('FpgaTimeData_onlyfft.txt',delimiter='\t')\n\nfftsize = data_file1[:,0]\ncputime = data_...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.semilogy", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "numpy.loadtxt", "matplotlib.pyplot.ylabel" ] ]
wgifford/ray
[ "8acb469b047cd9b327c9477a13b030eb7357860e" ]
[ "python/ray/data/datasource/file_based_datasource.py" ]
[ "import logging\nfrom typing import Optional, List, Tuple, Union, Any, TYPE_CHECKING\nfrom urllib.parse import urlparse\n\nif TYPE_CHECKING:\n import pyarrow\n\nfrom ray.data.impl.arrow_block import (ArrowRow, DelegatingArrowBlockBuilder)\nfrom ray.data.impl.block_list import BlockMetadata\nfrom ray.data.datasou...
[ [ "numpy.array_split" ] ]
WildElaeagnus/Adjustment-calculator
[ "564ab7bd94c5117e93f47ca2579621f9122f1d63" ]
[ "adjustment_calculator.py" ]
[ "# рассчет корректировки из эксель файла\n\nfrom numpy import NaN\nimport pandas as pd\nimport re\nfrom collections import namedtuple\n\nfrom file_browser import *\n\n# DEBUG = True\nDEBUG = False\n\nxl_columns = namedtuple('xl_columns', 'data tu corr')\ncol = xl_columns(2, 8, 10)\n\ncols_names = namedtuple('cols_n...
[ [ "pandas.read_excel", "pandas.ExcelWriter" ] ]
percygautam/arviz
[ "e355c1b0d2dcf0fb0f1914370295915a73bd1dff" ]
[ "arviz/tests/base_tests/test_plots_bokeh.py" ]
[ "# pylint: disable=redefined-outer-name,too-many-lines\n\"\"\"Tests use the 'bokeh' backend.\"\"\"\nfrom copy import deepcopy\n\nimport numpy as np\nimport pytest\nfrom pandas import DataFrame # pylint: disable=wrong-import-position\n\nfrom ...data import from_dict, load_arviz_data # pylint: disable=wrong-import-...
[ [ "numpy.random.beta", "numpy.arange", "numpy.all", "numpy.random.poisson", "numpy.random.normal", "numpy.random.randn", "numpy.any", "numpy.random.uniform", "numpy.array", "numpy.random.randint" ] ]
Yi-Zoey/adversarial-robustness-toolbox
[ "d351b3d33c266b436abbf13b9279f266a3dd3062" ]
[ "art/defences/preprocessor/mp3_compression.py" ]
[ "# MIT License\n#\n# Copyright (C) The Adversarial Robustness Toolbox (ART) Authors 2020\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the Software without restriction, including without limita...
[ [ "numpy.swapaxes", "numpy.expand_dims", "scipy.io.wavfile.write", "numpy.squeeze" ] ]
carlosjimenezmwb/voxceleb_trainer
[ "a5a9118003f3789f583c394ff0971e678d6ff3be" ]
[ "models/tdnn.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\n@author: cvqluu\nrepo: https://github.com/cvqluu/TDNN\n\"\"\"\n\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nclass TDNN(nn.Module):\n \n def __init__(self, input_dim=23, output_dim=512, context_size=5, stride=1, dilation=1, batch_norm=Fal...
[ [ "torch.nn.BatchNorm1d", "torch.nn.Dropout", "torch.nn.Linear", "torch.nn.functional.unfold", "torch.nn.ReLU" ] ]
vemel/pandas
[ "1508491df35039ba2ca8b5c8ceecff28464c3bfe" ]
[ "pandas/tests/test_frame.py" ]
[ "# -*- coding: utf-8 -*-\n\nfrom __future__ import print_function\n# pylint: disable-msg=W0612,E1101\nfrom copy import deepcopy\nfrom datetime import datetime, timedelta, time\nimport sys\nimport operator\nimport re\nimport csv\nimport nose\nimport functools\nimport itertools\nfrom itertools import product\nfrom di...
[ [ "pandas.util.testing.choice", "pandas.merge", "pandas.core.format.set_option", "numpy.sqrt", "pandas.DataFrame.from_csv", "pandas.util.testing.assert_produces_warning", "pandas.MultiIndex.from_tuples", "pandas.compat.lzip", "numpy.where", "pandas.compat.OrderedDict", "p...
zeyh/neural-holography
[ "d2e399014aa80844edffd98bca34d2df80a69c84" ]
[ "main.py" ]
[ "\"\"\"\r\nNeural holography:\r\n\r\nThis is the main executive script used for the phase generation using Holonet/UNET or\r\n optimization using (GS/DPAC/SGD) + camera-in-the-loop (CITL).\r\n\r\nThis code and data is released under the Creative Commons Attributio...
[ [ "torch.load", "torch.utils.tensorboard.SummaryWriter", "torch.rand", "torch.device", "torch.nn.MSELoss" ] ]
perseveranceLX/iterative-dehaze
[ "dc5d56b2bf86460fff9d478e68368d2fffe78ba4" ]
[ "model/IPUDN_Grid.py" ]
[ "import torch\nimport torch.nn as nn\nimport math\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\nimport numpy as np\n\ndef make_model():\n\treturn IPUDN()\n\nclass MeanShift(nn.Conv2d):\n\tdef __init__(self, rgb_range, rgb_mean=(0.4488, 0.4371, 0.4040), rgb_std=(1.0, 1.0, 1.0), sign=-1):\n\t...
[ [ "torch.nn.Sequential", "torch.nn.ConvTranspose2d", "torch.Tensor", "torch.cat", "torch.nn.PReLU", "torch.nn.ModuleDict", "torch.nn.Conv2d", "torch.eye", "torch.zeros", "torch.nn.Sigmoid", "torch.nn.Tanh", "numpy.ones", "torch.tanh", "torch.nn.AdaptiveAvgPool...
ste93ste/ChestXRayClassification
[ "8568580e2d9a6c178dd9c877a4c302b48854c17c" ]
[ "semi-supervised-pytorch-master/semi-supervised/models/dgm.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.nn import init\n\nfrom .vae import VariationalAutoencoder\nfrom .vae import Encoder, Decoder\n\ndrop_rate = 0.2\n\nclass Classifier(nn.Module):\n def __init__(self, dims):\n \"\"\"\n Single hidden layer classifier\n ...
[ [ "torch.nn.BatchNorm1d", "torch.nn.Dropout", "torch.nn.Dropout2d", "torch.cat", "torch.nn.Conv2d", "torch.nn.init.xavier_normal_", "torch.nn.Linear", "torch.nn.BatchNorm2d" ] ]
sephwalker321/DashAnomalyDetection
[ "8e3744d32e762cd6d4258b853ff6254b8b103113" ]
[ "codes/Misc.py" ]
[ "\"\"\"============================================================================\nModule of miscelaneous functions used throughout.\n\nContents:\n- Fitted Parameters Return\n- Useful\n- Time Functions\n- Window Functions\n- ErrorCalcs\n- String Key Search\n\nAuthor: Joseph Walker j.j.walker@durham.ac.uk\n=======...
[ [ "pandas.to_datetime", "numpy.nanmean", "numpy.isfinite" ] ]
hammadkhann/Towards-richer-representation-of-CLS-token-for-Neural-Reranking
[ "8989e9460ee9e7e78269712d536ba818a63b4fe4" ]
[ "ColBERT_mtl/colbert/modeling/colbert.py" ]
[ "import string\nimport torch\nimport torch.nn as nn\nimport numpy as np\n\nfrom transformers import BertPreTrainedModel, BertModel, BertTokenizerFast\nfrom colbert.parameters import DEVICE\n\n\nclass ColBERT(BertPreTrainedModel):\n def __init__(self, config, query_maxlen, doc_maxlen, mask_punctuation, dim=128, s...
[ [ "torch.nn.functional.normalize", "torch.nn.Linear", "numpy.intersect1d", "numpy.count_nonzero" ] ]
StefanTippelt/deep-dream-viz
[ "027ff9132e57900168c058e14e62a2842d7d0bee" ]
[ "src/image_optimize.py" ]
[ "########################################################################\n# Published under the MIT License. See the file LICENSE for details.\n#\n# Copyright 2016 by Magnus Erik Hvass Pedersen\n########################################################################\n\n# Code was adjusted to my own needs by remov...
[ [ "numpy.std", "scipy.ndimage.filters.gaussian_filter" ] ]
beyondacm/carefree-learn
[ "a9c69141163c04a16aba8317febe7a66218510b6" ]
[ "cflearn/pipeline.py" ]
[ "import os\nimport json\nimport torch\nimport shutil\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as mpatch\n\nfrom typing import *\nfrom tqdm import tqdm\nfrom cfdata.tabular import TabularDataset\nfrom cftool.ml import ModelPattern\nfrom cftool.misc import show_or_save\nfrom c...
[ [ "matplotlib.patches.Rectangle", "numpy.save", "numpy.load", "torch.autograd.profiler.profile", "matplotlib.pyplot.figure" ] ]
johnjasa/floris
[ "078fe256463044bebca5ada18c7a9db7a1031b12" ]
[ "floris/tools/optimization/scipy/yaw_wind_rose_parallel.py" ]
[ "# Copyright 2020 NREL\n\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n# use this file except in compliance with the License. You may obtain a copy of\n# the License at http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless required by applicable law or agreed to in writing, soft...
[ [ "numpy.sum", "pandas.DataFrame" ] ]
goodwanghan/ibis
[ "02cbab7f3a3a62b3e0a9107549891823d89a4de9" ]
[ "ibis/backends/pandas/tests/execution/test_timecontext.py" ]
[ "import pandas as pd\nimport pandas.testing as tm\nimport pytest\n\nimport ibis\nimport ibis.common.exceptions as com\nimport ibis.expr.operations as ops\nfrom ibis.backends.pandas.execution import execute\nfrom ibis.backends.pandas.execution.window import trim_window_result\nfrom ibis.expr.scope import Scope\nfrom...
[ [ "pandas.testing.assert_series_equal", "pandas.Index", "pandas.MultiIndex.from_arrays", "pandas.Timedelta", "pandas.testing.assert_frame_equal", "pandas.Timestamp" ] ]
mengjian0502/EEE598_FinalProj
[ "6e4b8d0ec79eb3e7aa982f85ecadb7f36cdd7a84" ]
[ "train.py" ]
[ "\"\"\"\nMNIST classification challenge\n\nEEE598 Spring 2021\n\"\"\"\n\nimport os\nimport logging\nimport time\nimport argparse\nfrom utils import *\nimport torch\nimport torch.optim as optim\nimport models\nimport torch.nn as nn\nfrom collections import OrderedDict, defaultdict\nfrom functools import partial\n\np...
[ [ "torch.nn.CrossEntropyLoss", "torch.cuda.is_available", "torch.load" ] ]
ysawa/zaif-trade-bot
[ "4e5e62d2d03fff773b018ff960e2d9a0587c9a6e" ]
[ "coincheck/price_model.py" ]
[ "from datetime import datetime\nfrom keras.models import Sequential\nfrom keras.layers import Dense, Activation, Dropout\nfrom keras.layers import LSTM\nfrom keras.optimizers import Adam\nfrom keras.utils.data_utils import get_file\nimport numpy as np\nimport random, sys\n\nfrom sklearn import model_selection\n\nfr...
[ [ "numpy.asarray", "numpy.load", "numpy.max", "sklearn.model_selection.train_test_split" ] ]
Syzygianinfern0/espnet
[ "3ea59a0050e8a6a40138ac2365c258825b02f9cd" ]
[ "test/espnet2/main_funcs/test_calculate_all_attentions.py" ]
[ "from collections import defaultdict\n\nimport numpy as np\nimport pytest\nimport torch\n\nfrom espnet.nets.pytorch_backend.rnn.attentions import AttAdd\nfrom espnet.nets.pytorch_backend.transformer.attention import MultiHeadedAttention\nfrom espnet2.asr.decoder.rnn_decoder import RNNDecoder\nfrom espnet2.main_func...
[ [ "torch.randn", "torch.randint", "torch.tensor" ] ]
wmonteiro92/xmoai-examples
[ "0286d57e15cb60693f57cdff386cbb246787442b" ]
[ "tests/sklearn_classification.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Jul 11 16:49:49 2020\n\n@author: wmonteiro92\n\"\"\"\n\nfrom xmoai.setup.configure import generate_counterfactuals_classification_proba, generate_counterfactuals_classification_simple\nfrom sklearn_data.datasets import load_sample_from_dataset...
[ [ "numpy.array" ] ]
stsh224/field-robotics
[ "2729e739e540c4e348fc3181b6191a51ba7d2c40" ]
[ "robotics.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Mon Nov 30 21:05:08 2020\r\n\r\n@author: Tuck\r\n\"\"\"\r\n# dependent modules \r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\n\r\n'''\r\nPosition and Frame Transformation\r\n===============================================================================...
[ [ "numpy.hstack", "numpy.abs", "numpy.arctan", "numpy.linspace", "numpy.float_power", "numpy.array_equal", "numpy.sqrt", "matplotlib.pyplot.subplots", "numpy.arccos", "numpy.sin", "numpy.arctan2", "numpy.tan", "numpy.cos", "numpy.ones", "numpy.shape", ...
d-v-dlee/super_liga_xg
[ "e3054cadf00755a347d31ce335c567db91e433a7" ]
[ "src/xlg.py" ]
[ "import pandas as pd\nfrom json_shot_scraper import flatten_shot, flatten_complete_pass, flatten_corner\nfrom dataframe_cleaner import (pass_to_shot, corner_to_shot, transpose_coordinates,\ncoord_to_yards, shot_distance_angle, drop_own_goals, goal_dummy, dummy_columns)\n\ndef game_to_single_df(game):\n \"\"\"\n ...
[ [ "pandas.DataFrame" ] ]
xdze2/trilobot
[ "bca16bf5ddc5f8977f8a71c6331100a51c909c1a" ]
[ "scripts/liveview.py" ]
[ "import time\n\nimport cv2\nimport numpy as np\nimport zmq\n\n# https://zguide.zeromq.org/docs/chapter2/#Pub-Sub-Message-Envelopes\n\n\ndef main():\n \"\"\"main method\"\"\"\n ip_address = \"192.168.1.72\"\n\n context = zmq.Context()\n subscriber = context.socket(zmq.SUB)\n subscriber.connect(f\"tcp:...
[ [ "numpy.frombuffer" ] ]
tian961214/RFB_ESRGAN-PyTorch
[ "0104e8e9b172065e94ac07bf65d9bb9a1898425e" ]
[ "data/create_dataset_for_kernelGAN.py" ]
[ "# Copyright 2020 Dakewe Biotech Corporation. All Rights Reserved.\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unle...
[ [ "numpy.array", "scipy.io.loadmat" ] ]
k-washi/ita_corpus_recorder
[ "29a551b1647247ef343d15859f47710a63eed9fc" ]
[ "src/record_frame.py" ]
[ "import os\nimport tkinter as tk\nfrom tkinter import ttk\nfrom src.load_corpus import load_corpus, split_corpus\nfrom src.utils import get_eval_index, get_recorded_index\n\nfrom matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk\nfrom matplotlib.figure import Figure\nimport numpy as n...
[ [ "numpy.array", "matplotlib.backends.backend_tkagg.FigureCanvasTkAgg", "numpy.abs", "matplotlib.figure.Figure" ] ]
opensafely/hiv-research
[ "380915bf5dbf4e46f2f9616d7e86211d06423b69" ]
[ "analysis/cohortextractor2/cohortextractor.py" ]
[ "#!/usr/bin/env python3\n\n\"\"\"A cross-platform script to build cohorts, run models, build and\nstart a notebook, open a web browser on the correct port, and handle\nshutdowns gracefully\n\"\"\"\nimport cohortextractor\nimport glob\nimport importlib\nimport os\nimport re\nimport requests\nimport shutil\nimport sy...
[ [ "pandas.api.types.is_categorical_dtype", "pandas.api.types.is_datetime64_dtype", "matplotlib.pyplot.savefig", "pandas.api.types.is_numeric_dtype", "numpy.percentile", "matplotlib.pyplot.close", "matplotlib.pyplot.xticks", "pandas.api.types.is_bool_dtype", "matplotlib.pyplot.fig...
aviolante/python-dlpy
[ "9bf8cc4ffd5ae235e377004644ef70398431e09c" ]
[ "dlpy/model_conversion/write_keras_model_parm.py" ]
[ "#!/usr/bin/env python\n# encoding: utf-8\n#\n# Copyright SAS Institute\n#\n# Licensed under the Apache License, Version 2.0 (the License);\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# ...
[ [ "numpy.zeros", "numpy.transpose", "numpy.ones" ] ]
Akegarasu/auto-derby
[ "e237be7cbbf98d1fc1a9b85b928545977e981a17" ]
[ "auto_derby/single_mode/race/game_data.py" ]
[ "# pyright: strict\n# -*- coding=UTF-8 -*-\nfrom __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Iterator, Text, Tuple\n\nif TYPE_CHECKING:\n from ..context import Context\n\nimport json\nimport logging\nimport os\nimport warnings\n\nimport cast_unknown as cast\nimport cv2\nimport numpy as np\...
[ [ "numpy.percentile" ] ]
bladezzw/DeepQuantInChina
[ "ce74a9bf8db91e3545ccc3e7af81f80796a536fa" ]
[ "Model/BPnet.py" ]
[ "\nimport csvdata\n\n# some import works\nimport pandas as pd\nimport numpy as np\n\nimport torch\n\n\n\nfrom feature.features import features\n\n\n# Generate dummy data\ndatapath = csvdata.csvdatapaths[0] # 输入需要训练的文件\ndata = pd.read_csv(datapath) # 载入csv文件\ndate = np.array(data['date'])\nTime = np.array(data['ti...
[ [ "pandas.read_csv", "torch.utils.data.DataLoader", "numpy.sign", "torch.nn.Linear", "numpy.insert", "torch.nn.SoftMarginLoss", "torch.cuda.is_available", "numpy.array", "torch.optim.lr_scheduler.StepLR" ] ]
LangDaniel/hpv_status
[ "a313631397ba6d6bbb47d0e43197d01f4da6f594" ]
[ "utils/convert.py" ]
[ "import sys\nimport os\nimport caffe.proto.caffe_pb2 as pb2\nimport numpy as np\nimport h5py\n\n# mainly taken from:\n# https://github.com/chuckcho/c3d-keras/blob/master/convert_caffe_model.py\n\nfile_in = sys.argv[1] \nfile_out = os.path.abspath(os.path.join(file_in, os.pardir))\nfile_out = os.path.join(file_out, ...
[ [ "numpy.reshape", "numpy.squeeze", "numpy.zeros_like", "numpy.transpose", "numpy.array" ] ]
mdorier/Benchmarks
[ "793181dd0e793a11d1094101cc6321206c2b06a7" ]
[ "Pilot3/P3B1/p3b1_baseline_keras2.py" ]
[ "from __future__ import print_function\n\nimport numpy as np\n\nfrom keras import backend as K\n\nfrom keras.layers import Input, Dense, Dropout, Activation\nfrom keras.optimizers import SGD, Adam, RMSprop\nfrom keras.models import Model\nfrom keras.callbacks import ModelCheckpoint, CSVLogger, ReduceLROnPlateau\n\n...
[ [ "numpy.max", "sklearn.metrics.f1_score", "numpy.array", "numpy.argmax" ] ]
CySecWee/ML
[ "972f21a70396d2968856799aec1be8b7409bed73" ]
[ "ML2/logical_regression/lable_encoder2.py" ]
[ "import pandas as pd\nimport numpy as np\nfrom sklearn.preprocessing import LabelEncoder\n\n# creating initial dataframe\nbridge_types = ('Arch','Beam','Truss','Cantilever','Tied Arch','Suspension','Cable')\nbridge_df = pd.DataFrame(bridge_types, columns=['Bridge_Types'])\n# creating instance of labelencoder\nlabel...
[ [ "sklearn.preprocessing.LabelEncoder", "pandas.DataFrame" ] ]
qq874938383/CIIC
[ "837f7363c09e71fe1548d8fa94bd5a2fa568074a" ]
[ "maskrcnn_benchmark/data/datasets/cityscapes.py" ]
[ "import os\nimport glob\nimport json\nfrom PIL import Image\n\n\nimport numpy as np\nimport torch\nimport torchvision\n\n\nfrom maskrcnn_benchmark.structures.bounding_box import BoxList\nfrom maskrcnn_benchmark.structures.segmentation_mask import SegmentationMask\nfrom .abstract import AbstractDataset\n\n\n\nclass ...
[ [ "torch.max", "torch.empty", "torch.min", "torch.tensor", "torch.unique" ] ]
NYU-DICE-Lab/open_clip
[ "fd71804b503135fb1c7cc8de3a0d6599741c8ed9" ]
[ "src/training/main.py" ]
[ "import logging\nimport os\nimport random\nfrom datetime import datetime\n\nimport numpy as np\nimport torch\nimport torch.backends.cudnn as cudnn\nfrom torch import optim\nfrom torch.cuda.amp import GradScaler\n\ntry:\n import wandb\nexcept ImportError:\n wandb = None\n\ntry:\n import torch.utils.tensorbo...
[ [ "numpy.random.seed", "torch.load", "torch.manual_seed", "torch.nn.SyncBatchNorm.convert_sync_batchnorm", "torch.cuda.amp.GradScaler", "torch.optim.AdamW", "torch.utils.tensorboard.SummaryWriter", "torch.nn.parallel.DistributedDataParallel" ] ]
AdriBenben/Scrib-AI
[ "bbafeeac3a0ddcf86996b65c4c416703c10fed91" ]
[ "AI/model.py" ]
[ "# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n# Modifications Copyright 2017 Abigail See\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.apach...
[ [ "tensorflow.get_variable", "tensorflow.device", "tensorflow.concat", "numpy.expand_dims", "tensorflow.zeros", "tensorflow.reduce_sum", "tensorflow.stack", "tensorflow.minimum", "tensorflow.nn.bidirectional_dynamic_rnn", "numpy.concatenate", "tensorflow.summary.scalar", ...
magictron/NeMo
[ "aae9e3405b6e78dff864d21ea59331abdadc0217" ]
[ "nemo/collections/nlp/data/datasets/punctuation_capitalization_dataset.py" ]
[ "# =============================================================================\n# Copyright 2020 NVIDIA. 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#...
[ [ "numpy.array" ] ]
craigmax-dev/Mixed-Integer-Linear-Programming-for-Spacecraft-Maneuvers
[ "d14bda5f0dca2bf6b7e25b58e36d10e096b7612f" ]
[ "lib/python/tests/PAPER_03a.py" ]
[ "# # -----------------------------------------------------------------------------\n# # PAPER_03\n# # -----------------------------------------------------------------------------\n# # ISS Remote Camera \n\n# # --------------\n# # Imports\n# # --------------\n# import numpy as np\n\n# # --------------\n# # Model Se...
[ [ "numpy.array", "numpy.ones" ] ]
DeercoderPractice/python
[ "4a32cc8922f47baea390e8167e34f185f67ae0fd" ]
[ "cnn_python_tutorial/numpy/subplot.py" ]
[ "#!/usr/bin/env python\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n# Compute the x and y coordinates for points on sine and cosine curves\nx = np.arange(0, 3 * np.pi, 0.1)\ny_sin = np.sin(x)\ny_cos = np.cos(x)\n\n# Set up a subplot grid that has height 2 and width 1,\n# and set the first such subplot ...
[ [ "matplotlib.pyplot.title", "numpy.arange", "numpy.cos", "numpy.sin", "matplotlib.pyplot.plot", "matplotlib.pyplot.subplot", "matplotlib.pyplot.show" ] ]
gaxler/dataset_agnostic_segmentation
[ "7dd8e68c735c2602ac9bf1c199960f530e9848bc" ]
[ "statistics/segmentation.py" ]
[ "\nimport numpy as np\n\nfrom lib.bbox import bbox_overlaps\n\nfrom utils import get_coverage_mapping, save_stat_page\nfrom lib.show_images import debugShowBoxes\n\n\ndef update_segmentation_stats(meta_images, doc_images, gt_boxes, params, pred_boxes, binary_icdar=True, viz=False, save_path=None, test_phase=False, ...
[ [ "numpy.where", "numpy.ones_like", "numpy.sum", "numpy.vstack" ] ]
wendili-cs/Vehicle-License-Plate-System-by-FCN-CNN
[ "1bd29d73f43af8e973298c7a2aabb3ce082620fd" ]
[ "train_data.py" ]
[ "'''\r\nTensorFlow 1.3\r\nPython 3.6\r\nBy LiWenDi\r\n'''\r\nimport tensorflow as tf\r\nimport input_data\r\nimport os\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\n\r\nCHANNELS = 3 #色彩读取通道\r\nBATCH_SIZE = 10 #训练批次的数量\r\nCAPACITY = 500 #每次随机批次的总数量\r\nIMG_H = 40 #图像的高\r\nIMG_W = 20 #图像的宽\r\nINPUT_DATA ...
[ [ "tensorflow.matmul", "tensorflow.summary.FileWriter", "tensorflow.zeros", "numpy.reshape", "tensorflow.train.start_queue_runners", "tensorflow.train.Coordinator", "tensorflow.placeholder", "tensorflow.subtract", "tensorflow.global_variables_initializer", "tensorflow.train.G...
benjaminhwilliams/screen19
[ "6590aa3b59b488eef78fa9567c4cd0baf56ccaa8" ]
[ "screen19/screen.py" ]
[ "# coding: utf-8\n\nu\"\"\"\nProcess screening data obtained at Diamond Light Source Beamline I19.\n\nThis program presents the user with recommendations for adjustments to beam\nflux, based on a single-sweep screening data collection. It presents an\nupper- and lower-bound estimate of suitable flux.\n • The uppe...
[ [ "matplotlib.use", "matplotlib.pyplot.yscale", "matplotlib.pyplot.savefig", "matplotlib.pyplot.close", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.xticks", "matplotlib.pyplot.ylabel" ] ]
sobotka/colour
[ "aa3fe95fba83ffc0f3ce1eb6aca85e6d8f3bde51" ]
[ "colour/colorimetry/dataset/illuminants/hunterlab.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nHunterLab Dataset\n=================\n\nDefines the *HunterLab* illuminants dataset for the\n*CIE 1931 2 Degree Standard Observer* and\n*CIE 1964 10 Degree Standard Observer*.\n\nThe currently implemented data has been extracted from :cite:`HunterLab2008b`,\nhowever you may want to...
[ [ "numpy.array" ] ]
robertokcanale/ros_workspace_handsnet
[ "09672bf2b4c54d0064f339005dc5eb3ac4f9d80d" ]
[ "src/handsnet_time/src/tactile_image_publisher_1.py" ]
[ "#!/usr/bin/env python\nimport rospy\n#import tensorflow as tf\nfrom PIL import Image\nfrom sensor_msgs.msg import Image as TactileImage\nimport numpy as np\n\n\nif __name__ == '__main__':\n\n pub = rospy.Publisher('tactile_image1', TactileImage, queue_size=10)\n rospy.init_node('tactile_image_publisher1')\n ...
[ [ "numpy.array" ] ]
orionr/R2Plus1D
[ "54d93222f80cd23a87c7dbda6044b3fae07b3fda" ]
[ "tools/extract_features.py" ]
[ "# Copyright 2018-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 applicable la...
[ [ "numpy.concatenate", "numpy.argsort" ] ]
quasiben/cucim
[ "048d53e6f99c2129b9febd08e0ae6d1b37d74451" ]
[ "python/cucim/src/cucim/skimage/restoration/tests/test_restoration.py" ]
[ "import cupy as cp\nimport numpy as np\nimport pytest\nfrom cupy import testing\nfrom cupyx.scipy import ndimage as ndi\nfrom scipy import signal\n\nfrom cucim.skimage import restoration\nfrom cucim.skimage._shared.testing import fetch\nfrom cucim.skimage.color import rgb2gray\nfrom cucim.skimage.restoration import...
[ [ "numpy.random.seed", "numpy.random.standard_normal", "numpy.ones", "numpy.load", "numpy.random.RandomState" ] ]
biofreack/data_scrapper
[ "132edaaafce7f676f27f519883710f5e3345846b" ]
[ "data_scrapper/__main__.py" ]
[ "from bs4 import BeautifulSoup\nimport requests\nimport pandas as pd\n\nfrom .db_config import Session\nfrom .db_models import OhlcvdataModel\nfrom .db_config import engine\n\n#coin_symbols = [\"neo\", \"eos\", \"stellar\", \"tron\", \"cardano\", \"monero\", \"nem\", \"siacoin\", \"verge\", \"digibyte\", \"stratis\...
[ [ "pandas.to_datetime", "pandas.DataFrame" ] ]
raybellwaves/intake
[ "8acc70d9adb19344ca15dee948315828b61e87b2" ]
[ "intake/catalog/tests/test_local.py" ]
[ "#-----------------------------------------------------------------------------\n# Copyright (c) 2012 - 2018, Anaconda, Inc. and Intake contributors\n# All rights reserved.\n#\n# The full license is in the LICENSE file, distributed with this software.\n#--------------------------------------------------------------...
[ [ "pandas.Timestamp", "pandas.DataFrame" ] ]
Kchour/steinerpy
[ "be6206533b7b28cfb67800ee847f0de367dab834" ]
[ "steinerpy/library/animation/animationV2.py" ]
[ "\"\"\"This module provides a helper class for using matplotlib animations \"\"\"\nimport matplotlib.pyplot as plt\nimport time\n\nimport steinerpy.config as cfg\n \nclass AnimateV2:\n \"\"\"Helper class for matplotlib.pyplot animations\n Class instances are used to keep track of different figures and ...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.yticks", "matplotlib.pyplot.fignum_exists", "matplotlib.pyplot.ylim", "matplotlib.pyplot.subplots", "matplotlib.pyplot.xlim", "matplotlib.pyplot.close", "matplotlib.pyplot.xticks", "matplotlib.pyplot.show", "matplotlib.pyplot.p...
malywonsz/txtai
[ "ace1b04161062430887eb2153961abcd819a5afb" ]
[ "src/python/txtai/workflow/task/base.py" ]
[ "\"\"\"\nTask module\n\"\"\"\n\nimport re\n\nimport numpy as np\nimport torch\n\n\nclass Task:\n \"\"\"\n Base class for all workflow tasks.\n \"\"\"\n\n def __init__(\n self,\n action=None,\n select=None,\n unpack=True,\n column=None,\n merge=\"hstack\",\n ...
[ [ "torch.stack", "torch.is_tensor", "numpy.stack" ] ]
hyesungKomet/deep-learning-from-scratch-2
[ "4b60f0b9c9850d0ff987446dbdec18bbdfb5109c" ]
[ "dataset/ptb.py" ]
[ "# coding: utf-8\nimport sys\nimport os\nsys.path.append('..')\ntry:\n import urllib.request\nexcept ImportError:\n raise ImportError('Use Python3!')\nimport pickle\nimport numpy as np\n\n\nurl_base = 'https://raw.githubusercontent.com/tomsercu/lstm/master/data/'\nkey_file = {\n 'train':'ptb.train.txt',\n ...
[ [ "numpy.load", "numpy.array", "numpy.save" ] ]
manimoh/python-neo
[ "fa7b025cb6a3be27d4f1a48bd5f26cb89d8af9c3" ]
[ "neo/test/iotest/test_axographio.py" ]
[ "\"\"\"\nTests of neo.io.axographio\n\"\"\"\n\nfrom datetime import datetime\nimport unittest\n\nfrom neo.io import AxographIO\nfrom neo.test.iotest.common_io_test import BaseTestIO\n\nimport numpy as np\nfrom numpy.testing import assert_equal\nimport quantities as pq\n\n\nclass TestAxographIO(BaseTestIO, unittest....
[ [ "numpy.testing.assert_equal", "numpy.array" ] ]
HypoChloremic/annuc
[ "4d13ce557b16b8d643e2edb39bbf09b97c123f6b" ]
[ "run.py" ]
[ "# Running annuc\r\n# (c) 2017 Ali Rassolie\r\n# Important to note that this has to be run in the command line environment\r\n# bokeh serve --show first_plot.py\r\n\r\n\r\nfrom collections import OrderedDict\r\nfrom bokeh.charts import Bar, output_file, show\r\nfrom bokeh.io import curdoc\r\n\r\nimport matplotlib.p...
[ [ "matplotlib.pyplot.bar", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.xticks", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
NTU-ROSE/fast-reid
[ "f4551a128ba17ef201301ccf3c986edae014cabd" ]
[ "projects/PartialReID/partialreid/dsr_distance.py" ]
[ "\"\"\"Numpy version of euclidean distance, etc.\nNotice the input/output shape of methods, so that you can better understand\nthe meaning of these methods.\"\"\"\n\nimport numpy as np\nimport torch\n\n\ndef normalize(nparray, order=2, axis=0):\n \"\"\"Normalize a N-D numpy array along the specified axis.\"\"\"\...
[ [ "torch.eye", "numpy.linalg.norm", "numpy.finfo", "torch.matmul", "torch.FloatTensor", "numpy.argsort", "torch.pow" ] ]
lbfinkbeiner/spin1_beam_model
[ "bdb5af058ab0430602de6595a2f0cfdb5d26b41f" ]
[ "src/spin1_beam_model/jones_matrix_field.py" ]
[ "import h5py\nimport numba as nb\nimport numpy as np\nimport ssht_numba as sshtn\nfrom scipy.interpolate import Rbf, RectBivariateSpline, interp1d\n\n\nclass AntennaFarFieldResponse:\n \"\"\"\n A model of the farfield response of an antenna specified by the data product\n of a cst_processing.CSTDataProcess...
[ [ "scipy.interpolate.RectBivariateSpline", "numpy.sqrt", "numpy.abs", "numpy.arange", "numpy.flipud", "numpy.cos", "numpy.sin", "scipy.interpolate.Rbf", "numpy.append", "scipy.interpolate.interp1d", "numpy.diff", "numpy.where", "numpy.array", "numpy.flip", ...
PHASTA/vtkpytools
[ "8c387dad3bb33cc6332eaf69346b1c5f4e59e2be" ]
[ "vtkpytools/common.py" ]
[ "import vtk\nimport pyvista as pv\nimport numpy as np\nfrom scipy.io import FortranFile\nfrom pathlib import Path\nimport re\n\ndef unstructuredToPoly(unstructured_grid):\n \"\"\"Convert vtk.UnstructruedGrid to vtk.PolyData\"\"\"\n geom = vtk.vtkGeometryFilter()\n geom.SetInputData(unstructured_grid)\n ...
[ [ "numpy.reshape", "scipy.io.FortranFile" ] ]
lisiqi19971013/Attention-based-Multi-modal-Fusion-Network-for-Semantic-Scene-Completion
[ "046fd7b79af98c482cb56845df13f954c1f4b69b" ]
[ "SemanticSceneCompletion/NYU_RGBD/NYU_RGBD_DataLoader.py" ]
[ "import torch\nimport numpy as np\nimport torch.utils.data as torch_data\nfrom PIL import Image\nimport os\nfrom SemanticSceneCompletion.NYU_RGBD.NYU_Path import *\nfrom torchvision.transforms import Compose, Normalize, ToTensor\nimport random\n\n\ndef PCA_Jittering(img):\n img = np.asanyarray(img, dtype = 'floa...
[ [ "numpy.dot", "numpy.linalg.eig", "numpy.arange", "numpy.ones", "torch.nn.MaxPool3d", "numpy.cov", "numpy.asanyarray", "numpy.transpose", "numpy.array", "numpy.where" ] ]
shanedrinion/GamestonkTerminal
[ "baf36aa7c96de6918911c7a263cf5ac9648b27e3" ]
[ "gamestonk_terminal/technical_analysis/momentum.py" ]
[ "import argparse\nimport matplotlib.pyplot as plt\nimport pandas_ta as ta\nfrom pandas.plotting import register_matplotlib_converters\nfrom gamestonk_terminal.helper_funcs import (\n check_positive,\n parse_known_args_and_warn,\n plot_autoscale,\n)\nfrom gamestonk_terminal.config_plot import PLOT_DPI\nfrom...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.gca", "matplotlib.pyplot.axhline", "matplotlib.pyplot.title", "matplotlib.pyplot.ylim", "matplotlib.pyplot.axhspan", "matplotlib.pyplot.minorticks_on", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlim", "matplotlib.pyplot.subp...
frosty110/Book_Projects
[ "49566d615fbfe686fc8a489345a61a3a480912b6" ]
[ "Data Science/Applied Data science with Python/Resources-python/DecisionTreesIris.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\n-----------------------------------------------------------------------------\n\n Decision Trees : Classifying Iris\n\n Copyright : V2 Maestros @2015\n \nProblem Statement\n*****************\nThe input data is the iris dataset. It contains r...
[ [ "sklearn.tree.export_graphviz", "pandas.read_csv", "sklearn.cross_validation.train_test_split", "matplotlib.pylab.boxplot", "matplotlib.pylab.scatter", "matplotlib.pylab.cla", "sklearn.tree.DecisionTreeClassifier" ] ]
RohitNagraj/SelfDrivingCar
[ "4992ecac64a18de16a4ccc2e3ea27358d70fc8b5" ]
[ "Drive.py" ]
[ "import argparse\nimport base64\nfrom datetime import datetime\nimport os\nimport shutil\nimport numpy as np\nimport socketio\nimport eventlet\nimport eventlet.wsgi\nfrom PIL import Image\nfrom flask import Flask\nfrom io import BytesIO\nfrom keras.models import load_model\nimport utils\n\nsio = socketio.Server()\n...
[ [ "numpy.asarray", "numpy.array" ] ]
JakeConnors376W/ludwig
[ "d16488aed4821cf89642c967e06f8961f2ab53bd" ]
[ "ludwig/data/dataset.py" ]
[ "#! /usr/bin/env python\n# coding=utf-8\n# Copyright (c) 2019 Uber Technologies, 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/LICENS...
[ [ "numpy.argsort" ] ]
mahmoodm2/interpret
[ "b28c858667fd38460a0c850aaa23a2692987f070" ]
[ "python/interpret-core/interpret/glassbox/ebm/test/test_ebm.py" ]
[ "# Copyright (c) 2019 Microsoft Corporation\n# Distributed under the MIT software license\n\n# TODO PK add a test for Regression with interactions\n# TODO PK add a test with a real regression dataset\n# TODO PK add a test with more than 1 multiclass interaction\n\nfrom ....test.utils import (\n synthetic_multicl...
[ [ "sklearn.metrics.roc_auc_score", "numpy.allclose", "numpy.random.seed", "numpy.random.choice", "numpy.isfinite", "sklearn.model_selection.train_test_split", "pandas.DataFrame", "sklearn.datasets.make_multilabel_classification", "numpy.any", "sklearn.model_selection.cross_va...
coleplante16/Bitcoin-Analyzer
[ "e3f1a564fe1e0880dccbef53f05df9e6f49b8c96" ]
[ "Wrangled.py" ]
[ "from termcolor import colored\nimport requests\nfrom bs4 import BeautifulSoup\nimport re\nimport pandas\nimport pyyed\nimport numpy\n\ndef Wrangled(transactions3, transactions, address):\n for i in transactions3:\n transactions += i\n\n# Remove HTML notation\n transactions4 = []\n for i in tran...
[ [ "pandas.DataFrame" ] ]
nirbarazida/NBprocessing
[ "3b020829e9c2ec0ef67b881a69637ac14e635e75" ]
[ "NBprocessing/general/_NBgeneral_class.py" ]
[ "\"\"\"\nGeneric functions to manipulate features in pandas data frame.\n\nThis library include the functions:\n 1. missing_values(database):\n prints a data frame with all columns that have missing values.\n for every column will print the number of missing values and the present of it out of tota...
[ [ "sklearn.model_selection.train_test_split" ] ]
parasKumarSahu/Knolml-Analysis
[ "01dd401a264289d1aeb793bf49fb9da1c84575ba" ]
[ "Text-Segmentation/start_segmentation.py" ]
[ "import os\nimport word2vec\nimport pandas as pd\nimport numpy as np\nfrom sklearn.feature_extraction.text import CountVectorizer\nimport re\nimport nltk\nimport matplotlib\nfrom tools import get_penalty, get_segments\nfrom algorithm import split_optimal, split_greedy, get_total\nimport sys\n\n#Main Function\nif le...
[ [ "sklearn.feature_extraction.text.CountVectorizer", "pandas.DataFrame" ] ]
jordantkohn/ABSA-PyTorch
[ "eece308afb469e319dcef6391535e10d2c498590" ]
[ "test_bayes.py" ]
[ "# -*- coding: utf-8 -*-\n# file: train.py\n# author: songyouwei <youwei0314@gmail.com>\n# Copyright (C) 2018. All Rights Reserved.\n\nimport logging\nimport argparse\nimport math\nimport os\nimport sys\nimport random\nimport numpy\n\nfrom sklearn import metrics\nfrom time import strftime, localtime\n\nfrom transfo...
[ [ "matplotlib.pyplot.boxplot", "torch.nn.init.uniform_", "matplotlib.pyplot.title", "numpy.random.seed", "torch.cuda.manual_seed", "matplotlib.pyplot.figure", "torch.manual_seed", "torch.load", "torch.Tensor", "matplotlib.pyplot.savefig", "torch.tensor", "torch.no_gra...
Praznat/annotationmodeling
[ "014b8b94b2225f947691c18b26eb8a4b148d2c8a" ]
[ "sim_keypoints.py" ]
[ "import json\nimport pandas as pd\nimport numpy as np\nfrom matplotlib import pyplot as plt\nimport simulation\nfrom eval_functions import oks_score_multi\nimport utils\n\ndef alter_location(points, x_offset, y_offset):\n x, y = points.T\n return np.array([x + x_offset, y + y_offset]).T\n\ndef alter_rotation(...
[ [ "numpy.random.beta", "numpy.linspace", "numpy.random.choice", "numpy.reshape", "numpy.arange", "pandas.DataFrame", "numpy.sign", "numpy.random.normal", "numpy.mean", "numpy.exp", "numpy.random.uniform", "numpy.array" ] ]
kennethjwalker/pyglet_game_engine
[ "1b8111f72669afa759f729babecf44f4d0c3dc9a" ]
[ "src/testmap.py" ]
[ "import pandas as pd\r\n\r\n\r\n\r\nTILESET = {\r\n 'stone_brick_1': 0,\r\n 'closed_door': 1,\r\n 'player': 2,\r\n 'rect_gray_0_old': 3,\r\n 'shaft': 4,\r\n}\r\n\r\nGROUNDMAP = []\r\nENVMAP = []\r\nOBJMAP = []\r\n\r\ndef create_testmap():\r\n ground_file = r'resources/tiled_files/maps/csv/first_st...
[ [ "pandas.read_csv" ] ]
cothan/binary-samples
[ "33a682e02cefb3d2a73ef34441f193f17c91df27" ]
[ "TRAIN_DATA/training_keras.py" ]
[ "#!/usr/bin/env python3\nfrom keras.models import Sequential\nfrom keras.layers import Dense, Dropout\nfrom keras.layers import Embedding\nfrom keras.layers import LSTM\nfrom keras.preprocessing.text import Tokenizer\nimport numpy as np \nfrom sklearn.model_selection import train_test_split\n# from keras.utils impo...
[ [ "numpy.array", "sklearn.model_selection.train_test_split" ] ]
GuangYang98/ISTN-Custom
[ "9a1fb7163b5d180a5cb26f9bb835383261ac92fc" ]
[ "data/big_mess_300300/messUpImagesAndMasks.py" ]
[ "import cv2\nimport scipy.ndimage as nd\nimport random\n\nimport numpy as np\nfrom PIL import Image\nimport pickle\nimport os\n\nos.mkdir(\"Test_Images\")\nos.mkdir(\"Test_Masks\")\nos.mkdir(\"Train_Images\")\nos.mkdir(\"Train_Masks\")\n#\nos.mkdir(\"Test_Images_Unaligned\")\nos.mkdir(\"Test_Masks_Unaligned\")\nos....
[ [ "numpy.pad", "scipy.ndimage.rotate" ] ]
jalexvig/anki_imager
[ "2cb8b54ccf92a35779e877ea8754828334bd7780" ]
[ "anki_imager/add_images.py" ]
[ "import os\nimport os.path as osp\nimport shutil\n\nimport pandas as pd\nfrom google_images_download import google_images_download\n\n# SETTINGS\nDPATH_ANKI = osp.join(osp.expanduser('~'), '.local/share/Anki2/User 1/collection.media/')\nDNAME_IMAGES = 'downloads'\nREQUEST_DELAY = 0\n\n\ndef process_notes_file(fpath...
[ [ "pandas.read_csv" ] ]
b01901143/DeepMatchVO
[ "c90481365774fe6fb46008ba129adfeff79fb855" ]
[ "data/cityscapes/cityscapes_loader.py" ]
[ "from __future__ import division\nimport json\nimport os, sys\nimport numpy as np\nimport scipy.misc\nfrom glob import glob\n\nCURDIR = os.path.dirname(__file__)\nsys.path.append(os.path.abspath(os.path.join(CURDIR, '..')))\nsys.path.append(os.path.abspath(os.path.join(CURDIR, '...')))\nfrom geo_utils import scale_...
[ [ "numpy.copy", "numpy.array" ] ]
mmaher22/Instance-based-label-smoothing
[ "015ec25ffdd9a9c3d8c9d1deb373d1ab113cb443" ]
[ "models/resnet_sd.py" ]
[ "import torch.nn as nn\nimport torch.utils.model_zoo as model_zoo\nimport torch\nimport torch.nn.functional as F\nfrom torchvision.models.resnet import conv3x3\nimport math\n\n__all__ = ['ResNet_SD', 'resnet18_SD', 'resnet34_SD', 'resnet50_SD', 'resnet101_SD',\n 'resnet152_SD']\n\n\nmodel_urls = {\n 'r...
[ [ "torch.nn.Sequential", "torch.ones", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.AvgPool2d", "torch.rand", "torch.nn.BatchNorm2d", "torch.nn.ReLU" ] ]
liyu711/SUAS
[ "2f6592fc2ab316475eeabe2f4828e5ba5c1a4b0b" ]
[ "tests/unit_tests/test_sda.py" ]
[ "import unittest\nimport numpy as np\nfrom SDA import *\n\nclass SDATestCase(unittest.TestCase):\n\n def setUp(self):\n self.obstacle_map = ObstacleMap(np.array([0,0,0]), np.array([np.array([[-2000, -2000], [-2000, 2000], [2000, 2000], [2000, -2000]])]))\n\n def test_add_obstacles(self):\n \"\"\...
[ [ "numpy.array" ] ]
mrvollger/SDA
[ "eba7d36d0cadf9eba42053b7d2a3371247eebe1b" ]
[ "scripts/coverageByEnds.py" ]
[ "#!/usr/bin/env python\nimport argparse\nimport os\nimport sys\nimport re\nimport numpy as np\nimport intervaltree\nimport pandas as pd\n\nparser = argparse.ArgumentParser(description=\"\")\nparser.add_argument(\"-a\", \"--reads\", nargs=\"+\", help=\"bed file(s) with read start and end locations\" )\nparser.add_ar...
[ [ "pandas.read_csv" ] ]
giovannidispoto/a-GPUBench
[ "2332fb68247cad347f889c006028385fed4c5c93" ]
[ "apps/tf/slim/nets/alexnet_tf2.py" ]
[ "# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n# Copyright 2021 Giovanni Dispoto\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/license...
[ [ "tensorflow.keras.layers.ReLU", "tensorflow.keras.Input", "tensorflow.keras.regularizers.L2", "tensorflow.keras.layers.Dense", "tensorflow.keras.layers.Conv2D", "tensorflow.keras.Sequential", "tensorflow.keras.layers.MaxPool2D", "tensorflow.keras.layers.BatchNormalization", "te...
Jerome-maker/ensae_teaching_cs
[ "43ea044361ee60c00c85aea354a7b25c21c0fd07" ]
[ "_todo/programme/seance9_d3js_travail.py" ]
[ "#coding:latin-1\nimport sys\nsys.path.append(\"../../../../program/python/pyensae/src\") # ligne inutile\n\nfrom pyensae import download_data\nimport pandas\n\ndownload_data(\"td9_station_travail.zip\", website = 'xd')\nfile1 = \"td9_station_travail.txt\"\ntbl = pandas.read_csv (file1, sep = \"\\t\")\n\n# voir ht...
[ [ "pandas.read_csv" ] ]
carefree0910/carefree-toolkit
[ "f5afe62a0eb3d05ed08a12632adfb168461413cb" ]
[ "cftool/misc.py" ]
[ "import io\nimport os\nimport sys\nimport dill\nimport json\nimport math\nimport time\nimport errno\nimport random\nimport shutil\nimport decimal\nimport inspect\nimport logging\nimport hashlib\nimport zipfile\nimport datetime\nimport operator\nimport threading\nimport unicodedata\n\nimport numpy as np\nimport matp...
[ [ "numpy.split", "numpy.allclose", "numpy.unique", "numpy.asarray", "numpy.load", "numpy.cumsum", "matplotlib.pyplot.savefig", "numpy.save", "numpy.lib.stride_tricks.as_strided", "numpy.random.multinomial", "matplotlib.pyplot.close", "numpy.searchsorted", "numpy.a...
liangstein/ByteNet-Keras
[ "e6722a69a316411fa563011a8ed37b0575d5a2db" ]
[ "ByteNet_train.py" ]
[ "import os;\nimport numpy as np;\nfrom keras.models import Model;\nfrom keras.layers.embeddings import Embedding;\nfrom keras.models import Sequential,load_model;\nfrom keras.optimizers import rmsprop,adam,adagrad,SGD;\nfrom keras.callbacks import EarlyStopping,ModelCheckpoint,ReduceLROnPlateau;\nfrom keras.preproc...
[ [ "numpy.load", "numpy.zeros", "numpy.random.shuffle" ] ]
NimaVahdat/Bio-Inspired-Computation_algorithms
[ "3b04b6f7187f15301f6cf05cb3de2ab0df820ee0" ]
[ "Memetic/MemTSP.py" ]
[ "import random\r\nfrom numpy import vectorize\r\n\r\nclass MemAlgo():\r\n \r\n def __init__(self, hash_map, start, steps = 2, crossover_prob = 0.15, \r\n mutation_prob = 0.15, population_size = 5, iterates = 100, mempop = 5):\r\n self.crossover_prob=crossover_prob\r\n self.mutati...
[ [ "numpy.vectorize" ] ]
XuRuihan/YPPF
[ "b6bed5421441563af8e6b5b2d00a31fc9b410e76" ]
[ "app/data_import.py" ]
[ "import pandas as pd\nimport os\n\nBASE_DIR = \"/Users/rickymac/Documents/20Autmun/ypdev/YPPF/boot/boottest/\"\n\n\ndef load():\n # df_2018 = pd.read_csv(BASE_DIR + 'static/2018.csv')\n df_1819 = pd.read_csv(\"app/append.csv\")\n return df_1819\n" ]
[ [ "pandas.read_csv" ] ]
rmlarose/rigettiVQLS
[ "2b4b2eeac350780d4393aa8458f92fcc5d06a6fe" ]
[ "data/opt10q/plot_params.py" ]
[ "\"\"\"Plots cost vs iteration data from QPU and simulator.\"\"\"\n\nimport matplotlib.pyplot as plt\nimport numpy as np\n\n# ========\n# Get data\n# ========\n\n# Simulated data\nqvm = np.loadtxt(\"ANGLES_QVM_8q_Thu_Feb_6_15:12:02_2020.txt\")\n\n# Aspen-7-5Q-B QPU data\nqpu1 = np.loadtxt(\"ANGLES_8q_Thu_Feb_6_06:3...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.title", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.grid", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.rcParams.update", "matplotlib.pyplot.show", "numpy.loadtxt", "matplotlib.pyplot.figure" ] ]
Tagman/vball
[ "73fdbe0e6a44e6852b5f3bd49d7e316ff40d030f" ]
[ "blobber.py" ]
[ "import math\nfrom typing import Union\n\nimport cv2 as cv\nimport numpy as np\nimport ball_net as bn\nimport sys\n\ncount = 0\n\nR = 60\nEPS = 1e-6\nEPS2 = 0.5\n\nSTATUS_INIT = 0\nSTATUS_STATIC = 1\nSTATUS_DIRECTED = 2\n\n\ndef pt_dist(x1, y1, x2, y2):\n dx = x1 - x2\n dy = y1 - y2\n return math.sqrt(dx *...
[ [ "numpy.polyfit", "numpy.poly1d", "numpy.ones", "numpy.cross", "numpy.array", "numpy.zeros", "numpy.vstack" ] ]
ivallesp/AdaIN
[ "f1928a2662a496402e4541bf96bf26a97fde5995" ]
[ "src/vgg.py" ]
[ "import torch\nimport torch.nn as nn\nfrom torchvision.models.utils import load_state_dict_from_url\nfrom typing import Union, List, Dict, Any, cast\n\n\n__all__ = [\n \"VGG\",\n \"vgg11\",\n \"vgg11_bn\",\n \"vgg13\",\n \"vgg13_bn\",\n \"vgg16\",\n \"vgg16_bn\",\n \"vgg19_bn\",\n \"vgg19...
[ [ "torch.nn.Sequential", "torch.nn.Dropout", "torch.nn.init.constant_", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.AdaptiveAvgPool2d", "torch.nn.init.normal_", "torch.nn.BatchNorm2d", "torch.flatten", "torch.nn.ReLU", "torch.nn.init.kaiming_...
mlz-ictrl/nicos
[ "a6de0bc194ba42e3dc04a033713b41b5499ba8e1" ]
[ "test/nicos_ess/test_devices/test_area_detector.py" ]
[ "# -*- coding: utf-8 -*-\n# *****************************************************************************\n# NICOS, the Networked Instrument Control System of the MLZ\n# Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS)\n#\n# This program is free software; you can redistribute it and/or modify it und...
[ [ "numpy.array", "numpy.random.randint" ] ]
xumeng723/nni
[ "141f24d42d2e86ace3774d931bfab58dca0ef1ad" ]
[ "src/sdk/pynni/nni/metis_tuner/lib_acquisition_function.py" ]
[ "# Copyright (c) Microsoft Corporation\n# All rights reserved.\n#\n# MIT License\n#\n# Permission is hereby granted, free of charge,\n# to any person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the Software without restriction,\n# including without limitati...
[ [ "scipy.stats.norm.cdf", "scipy.stats.norm.pdf", "numpy.errstate", "numpy.ndarray.tolist", "numpy.array" ] ]
Philip-Tremblay/Facial_Keypoints
[ "83ef100f6a08be70e50aabb4f50799a49ea78651" ]
[ "models_4.py" ]
[ "## TODO: define the convolutional neural network architecture\n\nimport torch\nfrom torch.autograd import Variable\nimport torch.nn as nn\nimport torch.nn.functional as F\n# can use the below import should you choose to initialize the weights of your Net\nimport torch.nn.init as I\n\n\nclass Net(nn.Module):\n\n ...
[ [ "torch.nn.Linear", "torch.nn.MaxPool2d", "torch.nn.Dropout", "torch.nn.Conv2d" ] ]
carpentries-incubator/ml4bio-workshop
[ "29fe78b821aa9f411ca9bf7ad5c5e10b9ae2dee0" ]
[ "data/simulated_t_cell/code/sim_tcell_2.py" ]
[ "\"\"\"\nBinary classification:\nCircular pattern\n\"\"\"\n\nimport numpy as np\nimport pandas as pd\nfrom sklearn.datasets import make_circles\nfrom matplotlib import pyplot as plt\n\ndata = make_circles(n_samples=100, noise=0.2, factor=0.5, random_state=1)\nX, y = data\nX = pd.DataFrame(X, columns=['cell_size','t...
[ [ "pandas.concat", "matplotlib.pyplot.scatter", "pandas.DataFrame", "matplotlib.pyplot.savefig", "sklearn.datasets.make_circles", "matplotlib.pyplot.axis", "matplotlib.pyplot.figure" ] ]
seanpars98/HTResearch
[ "026c115fa20cbf3b3f653e8e55d7fd837ec3a345" ]
[ "Beginings_of_model.py" ]
[ "#import data processing module\nimport pandas as pd\n#import ploting and visualization module\nimport matplotlib.pyplot as plt\n#need regular expressions for parsing\nimport re\n#easy counter for lists\nfrom collections import Counter\n\n#read the data into a Pandas dataframe for easy manipulation from the CSV fil...
[ [ "pandas.read_csv" ] ]
Sebastian-Whitehead/Medialogi-P3-02
[ "8fb144c17a10417aa2f5a01fcbc71b4d562d4d27" ]
[ "softwareProgram/connectedComponentsMethod.py" ]
[ "import frameUI, ColorMask, cv2\nfrom BlobTracking import BlobTracking\nimport numpy as np\n\n\n# Blob class which keeps track of each blobs position and dimensions\nclass Blob:\n # Construct getting position and dimension of blob\n def __init__(self, x: int, y: int, w: int, h: int):\n self.x, self.y =...
[ [ "numpy.where" ] ]
sampathweb/model-viz
[ "33673093d42ae67983be5ac11b01f3f6732b27da" ]
[ "shablona/shablona.py" ]
[ "from __future__ import absolute_import, division, print_function\nimport numpy as np\nimport pandas as pd\nimport scipy.optimize as opt\nfrom scipy.special import erf\nfrom .due import due, Doi\n\n__all__ = [\"Model\", \"Fit\", \"opt_err_func\", \"transform_data\", \"cumgauss\"]\n\n\n# Use duecredit (duecredit.org...
[ [ "pandas.read_csv", "numpy.sqrt", "numpy.unique", "scipy.optimize.leastsq", "numpy.where" ] ]
chatcannon/numpy
[ "f1b3f00f7abdd97d59dc5b1c0bb922a692452736" ]
[ "numpy/core/tests/test_scalarmath.py" ]
[ "from __future__ import division, absolute_import, print_function\n\nimport sys\nimport warnings\nimport itertools\nimport operator\n\nimport numpy as np\nfrom numpy.testing.utils import _gen_alignment_data\nfrom numpy.testing import (\n TestCase, run_module_suite, assert_, assert_equal, assert_raises,\n asse...
[ [ "numpy.floating.__subclasses__", "numpy.issubdtype", "numpy.dtype", "numpy.longdouble", "numpy.zeros_like", "numpy.iinfo", "numpy.clongdouble", "numpy.str_", "numpy.where", "numpy.divide", "numpy.square", "numpy.testing.assert_equal", "numpy.ones_like", "num...
sr-murthy/oedtools
[ "f38d7bef1ffb094b09e779db5b741e63926d2d1e" ]
[ "tests/test_schema.py" ]
[ "import builtins\nimport io\nimport json\nimport os\nimport re\nimport string\nimport sys\nimport time\n\nfrom ast import literal_eval\nfrom collections import OrderedDict\nfrom datetime import datetime\nfrom itertools import groupby\nfrom json import JSONDecodeError\nfrom tempfile import NamedTemporaryFile\nfrom u...
[ [ "pandas.read_csv" ] ]
nhh1501/E2E_MLT_VN
[ "dabbc1f7e12b45fbaef965200217cca41793dbc3" ]
[ "train.py" ]
[ "'''\nCreated on Sep 3, 2017\n\n@author: Michal.Busta at gmail.com\n'''\n\nimport torch, os\nimport numpy as np\nimport cv2\ndevice='cuda'\nimport net_utils\nimport data_gen\nfrom data_gen import draw_box_points\nimport timeit\nimport math\nimport random\nimport time\nfrom models import ModelResNetSep2 , ModelResNe...
[ [ "torch.optim.lr_scheduler.ReduceLROnPlateau", "torch.isinf", "torch.isnan", "numpy.asarray", "torch.from_numpy", "numpy.argwhere", "torch.nn.CTCLoss", "numpy.array", "torch.save" ] ]
nicolasm/lastfm-export
[ "43456161c7083b490d09a1d2638a38c9771e1b3f" ]
[ "lfmpandas/artist_counts.py" ]
[ "from datetime import datetime\n\nimport pandas\n\nfrom queries.artist_counts import get_artist_counts_query_overall, \\\n get_artist_counts_query_year\nfrom lfmdb.lfmdb import select\nfrom lfmconf.lfmconf import get_lastfm_conf\n\nconf = get_lastfm_conf()\nstart_year = conf['lastfm']['service']['startYear']\nno...
[ [ "pandas.DataFrame" ] ]
czyssrs/Logic2Text
[ "b17c931844513f0ff08c8a800fc7968899d69912" ]
[ "gpt_base/utils.py" ]
[ "import time, os, sys, shutil, io, subprocess, re\nimport tensorflow as tf\nimport numpy as np\nimport zipfile\nimport json\nimport copy\n\n# Progress bar\n\nTOTAL_BAR_LENGTH = 100.\nlast_time = time.time()\nbegin_time = last_time\nprint(os.popen('stty size', 'r').read())\n_, term_width = os.popen('stty size', 'r')...
[ [ "numpy.array", "numpy.sqrt" ] ]
samjabrahams/tensorflow-workshop
[ "4f1598a342954977e949ce0f5bd65b5994f0bec3" ]
[ "inception_retrain.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.framework.tensor_shape.scalar", "tensorflow.nn.softmax_cross_entropy_with_logits", "tensorflow.gfile.DeleteRecursively", "tensorflow.zeros", "tensorflow.gfile.Exists", "numpy.squeeze", "tensorflow.cast", "tensorflow.python.platform.gfile.Exists", "tensorflow....
cgnik/euler
[ "fe70459a0e0d0272980300a4782872f2e545fea5" ]
[ "src/py/util/cartesian.py" ]
[ "import itertools as it\nfrom operator import mul\n\nimport numpy as np\nfrom functools import reduce\n\nfrom util.factoring import factors\n\n\ndef cartesian(boundary, x, *args, reducer=mul):\n products = x\n last_products = []\n\n def gen():\n yield x\n if args and len(args):\n f...
[ [ "numpy.array", "numpy.where" ] ]