code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
from __future__ import print_function from builtins import str from builtins import object from lib.common import helpers class Module(object): def __init__(self, mainMenu, params=[]): # Metadata info about the module, not modified during runtime self.info = { # Name for the module t...
[ "lib.common.helpers.keyword_obfuscation", "lib.common.helpers.obfuscate", "lib.common.helpers.obfuscate_module", "builtins.str" ]
[((4517, 4552), 'lib.common.helpers.keyword_obfuscation', 'helpers.keyword_obfuscation', (['script'], {}), '(script)\n', (4544, 4552), False, 'from lib.common import helpers\n'), ((3500, 3596), 'lib.common.helpers.obfuscate_module', 'helpers.obfuscate_module', ([], {'moduleSource': 'module_source', 'obfuscationCommand'...
#!/usr/bin/env python import os from data_visualization import create_app, db from data_visualization.utils import create_chartconfigs app = create_app(os.environ.get('CONFIG')) @app.cli.command('init-db', help='Create a fresh database.') def init_db(): with app.app_context(): db.drop_all() db.c...
[ "data_visualization.db.drop_all", "subprocess.Popen", "unittest.TextTestRunner", "data_visualization.models.User.generate_fake_user", "os.environ.get", "data_visualization.utils.create_chartconfigs", "data_visualization.db.create_all", "unittest.TestLoader" ]
[((155, 179), 'os.environ.get', 'os.environ.get', (['"""CONFIG"""'], {}), "('CONFIG')\n", (169, 179), False, 'import os\n'), ((1205, 1253), 'subprocess.Popen', 'subprocess.Popen', (["['python', './datafactory.py']"], {}), "(['python', './datafactory.py'])\n", (1221, 1253), False, 'import subprocess\n'), ((294, 307), 'd...
import csv from datetime import datetime import requests from bs4 import BeautifulSoup from multiprocessing import Pool def get_html(url): response = requests.get(url) return response.text def get_all_links(html): soup = BeautifulSoup(html, 'lxml') tds = soup.find('tbody').find_all('td', class_="cmc-t...
[ "csv.writer", "requests.get", "bs4.BeautifulSoup", "datetime.datetime.now", "multiprocessing.Pool" ]
[((155, 172), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (167, 172), False, 'import requests\n'), ((235, 262), 'bs4.BeautifulSoup', 'BeautifulSoup', (['html', '"""lxml"""'], {}), "(html, 'lxml')\n", (248, 262), False, 'from bs4 import BeautifulSoup\n'), ((566, 593), 'bs4.BeautifulSoup', 'BeautifulSoup', ...
from django.urls import path from . import views from qa.views import UserAnswerList, UserQuestionList app_name = "user_profile" urlpatterns = [ path("activate/<uidb64>/<token>/", views.EmailVerify.as_view(), name="activate"), path("<int:id>/<str:username>/", views.profile, name="profile"), path( ...
[ "qa.views.UserQuestionList.as_view", "django.urls.path", "qa.views.UserAnswerList.as_view" ]
[((238, 301), 'django.urls.path', 'path', (['"""<int:id>/<str:username>/"""', 'views.profile'], {'name': '"""profile"""'}), "('<int:id>/<str:username>/', views.profile, name='profile')\n", (242, 301), False, 'from django.urls import path\n'), ((562, 588), 'qa.views.UserQuestionList.as_view', 'UserQuestionList.as_view',...
import os import logging import sys def PidFile(path=os.path.curdir, name='pidfile'): if sys.platform == 'linux': return PidFileLinux(path=path, name=name) elif sys.platform.find('win') != -1: return PidFileWin(path=path, name=name) else: raise OSError( f"Class PIdFil...
[ "os.remove", "os.path.join", "logging.debug", "sys.platform.find" ]
[((546, 570), 'os.path.join', 'os.path.join', (['path', 'name'], {}), '(path, name)\n', (558, 570), False, 'import os\n'), ((654, 705), 'logging.debug', 'logging.debug', (['f"""PidFile:open pidfile: {self.path}"""'], {}), "(f'PidFile:open pidfile: {self.path}')\n", (667, 705), False, 'import logging\n'), ((181, 205), '...
import asyncio import gc import time import uuid import elasticsearch import pytest from aiohttp.test_utils import unused_port from docker import from_env as docker_from_env import aioelasticsearch @pytest.fixture def loop(request): asyncio.set_event_loop(None) loop = asyncio.new_event_loop() yield lo...
[ "asyncio.iscoroutinefunction", "elasticsearch.Elasticsearch", "asyncio.new_event_loop", "aioelasticsearch.Elasticsearch", "time.sleep", "uuid.uuid4", "pytest.fail", "pytest.Function", "docker.from_env", "gc.collect", "asyncio.gather", "pytest.fixture", "asyncio.set_event_loop", "aiohttp.te...
[((485, 516), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""session"""'}), "(scope='session')\n", (499, 516), False, 'import pytest\n'), ((619, 650), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""session"""'}), "(scope='session')\n", (633, 650), False, 'import pytest\n'), ((1564, 1595), 'pytest.fixtur...
from datadog import initialize, api options = { 'api_key': '<KEY>', 'app_key': '297428ffc521ba14998cafe35822959dcd7ad3f4' } initialize(**options) title = "My_Metric Timeboard" description = "" graphs = [ { "definition": { "events": [], "requests": [ ...
[ "datadog.api.Timeboard.create", "datadog.initialize" ]
[((137, 158), 'datadog.initialize', 'initialize', ([], {}), '(**options)\n', (147, 158), False, 'from datadog import initialize, api\n'), ((1196, 1312), 'datadog.api.Timeboard.create', 'api.Timeboard.create', ([], {'title': 'title', 'description': 'description', 'graphs': 'graphs', 'template_variables': 'template_varia...
# encoding: utf-8 """ sphinxpapyrus.docxwriter.writer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Custom docutils writer for docx. :copyright: Copyright 2018 by nakandev. :license: MIT, see LICENSE for details. """ import os from docutils.writers import Writer from docx import Document as DocumentLoader fr...
[ "sphinx.util.console.bold", "sphinx.util.logging.getLogger", "os.path.join", "docx.Document" ]
[((525, 552), 'sphinx.util.logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (542, 552), False, 'from sphinx.util import logging\n'), ((1222, 1253), 'docx.Document', 'DocumentLoader', (['style_full_path'], {}), '(style_full_path)\n', (1236, 1253), True, 'from docx import Document as DocumentL...
# -*- coding: utf-8 -*- """ Created on Mon Feb 8 15:17:59 2021 @author: Ashish """ import re, string def custom_preprocessor(text): ''' Make text lowercase, remove text in square brackets,remove links,remove special characters and remove words containing numbers. ''' text = text.lowe...
[ "re.sub", "re.escape", "string.split" ]
[((336, 365), 're.sub', 're.sub', (['"""\\\\[.*?\\\\]"""', '""""""', 'text'], {}), "('\\\\[.*?\\\\]', '', text)\n", (342, 365), False, 'import re, string\n'), ((376, 400), 're.sub', 're.sub', (['"""\\\\W"""', '""" """', 'text'], {}), "('\\\\W', ' ', text)\n", (382, 400), False, 'import re, string\n'), ((434, 478), 're....
#!/usr/bin/python # coding:utf8 """ @author: <NAME> @time: 2019-10-17 16:55 """ import tensorflow as tf import modeling import optimization as optimization # _freeze as optimization import os, math, json from sklearn.metrics import classification_report #使用GPU os.environ['CUDA_VISIBLE_DEVICES'] = '0' # 100167/64 = 1...
[ "tensorflow.reduce_sum", "tensorflow.logging.set_verbosity", "tensorflow.truncated_normal_initializer", "tensorflow.nn.dropout", "tensorflow.gfile.MakeDirs", "tensorflow.zeros_initializer", "tensorflow.reduce_mean", "tensorflow.cast", "tensorflow.variables_initializer", "tensorflow.count_nonzero",...
[((1411, 1451), 'modeling.BertConfig.from_json_file', 'modeling.BertConfig.from_json_file', (['path'], {}), '(path)\n', (1445, 1451), False, 'import modeling\n'), ((1660, 1865), 'modeling.BertModel', 'modeling.BertModel', ([], {'config': 'bert_config', 'is_training': 'is_training', 'input_ids': 'input_ids', 'input_mask...
# -*- coding: utf-8 -*- # Copyright (C) 2012 Anaconda, Inc # SPDX-License-Identifier: BSD-3-Clause from __future__ import absolute_import, division, print_function, unicode_literals from errno import EACCES, ENOENT, EPERM from functools import reduce from logging import getLogger from os import listdir from os.path im...
[ "logging.getLogger", "os.listdir", "os.path.join", "os.path.dirname", "os.path.basename" ]
[((1886, 1905), 'logging.getLogger', 'getLogger', (['__name__'], {}), '(__name__)\n', (1895, 1905), False, 'from logging import getLogger\n'), ((2795, 2880), 'os.path.join', 'join', (['package_cache_record.extracted_package_dir', '"""info"""', '"""repodata_record.json"""'], {}), "(package_cache_record.extracted_package...
import random class Department: def __init__(self, letter_identifier, year): self.letter_identifier = letter_identifier self.year = year self.students = [] def assign_student(self, student): self.students.append(student) return True def __str__(self): ret...
[ "random.randint" ]
[((867, 890), 'random.randint', 'random.randint', (['(1)', '(1000)'], {}), '(1, 1000)\n', (881, 890), False, 'import random\n')]
import torch import time import os from loss import CustomLoss from data import get_data_loader from model import LDOPC from utils import get_model_name, load_config, plot_bev, plot_label_map from evaluate import non_max_suppression import sys import cv2 def inference(): config_name='config.json' config, _, _,...
[ "evaluate.non_max_suppression", "utils.plot_bev", "utils.get_model_name", "torch.masked_select", "cv2.waitKey", "torch.cuda.is_available", "utils.load_config", "model.LDOPC", "torch.no_grad", "time.time", "torch.zeros", "data.get_data_loader" ]
[((325, 349), 'utils.load_config', 'load_config', (['config_name'], {}), '(config_name)\n', (336, 349), False, 'from utils import get_model_name, load_config, plot_bev, plot_label_map\n'), ((357, 382), 'torch.cuda.is_available', 'torch.cuda.is_available', ([], {}), '()\n', (380, 382), False, 'import torch\n'), ((665, 7...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
[ "pulumi.getter", "pulumi.set", "pulumi.get" ]
[((2253, 2295), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""dbClusterIpArrayName"""'}), "(name='dbClusterIpArrayName')\n", (2266, 2295), False, 'import pulumi\n'), ((3172, 3204), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""modifyMode"""'}), "(name='modifyMode')\n", (3185, 3204), False, 'import pulumi\n'...
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from ..networks.deeplab.aspp import build_aspp, ASPP from ..networks.deeplab.backbone.resnet import SEResNet50 class NET_GAmap(nn.Module): # with Indicator encoder def __init__(self, pretrained=1, resfix=False,): ...
[ "torch.nn.ReLU", "torch.nn.Dropout", "torch.max", "torch.exp", "torch.sum", "torch.nn.functional.interpolate", "torch.bmm", "torch.nn.functional.softmax", "torch.nn.BatchNorm2d", "torch.nn.Sigmoid", "torch.mean", "torch.unsqueeze", "torch.nn.AdaptiveAvgPool2d", "numpy.abs", "torch.nn.fun...
[((4173, 4196), 'torch.nn.AdaptiveAvgPool2d', 'nn.AdaptiveAvgPool2d', (['(1)'], {}), '(1)\n', (4193, 4196), True, 'import torch.nn as nn\n'), ((4736, 4799), 'torch.nn.Conv2d', 'nn.Conv2d', (['(3)', '(64)'], {'kernel_size': '(7)', 'stride': '(2)', 'padding': '(3)', 'bias': '(True)'}), '(3, 64, kernel_size=7, stride=2, p...
#!/usr/bin/env python # coding: utf-8 # ### IMPORTING LIBRARIES AND DATASET # In[1]: import os import cv2 import tensorflow as tf import numpy as np from tensorflow.keras import layers, optimizers from tensorflow.keras.applications.resnet50 import ResNet50 from tensorflow.keras.layers import Input, Add, Dense, Acti...
[ "matplotlib.pyplot.ylabel", "tensorflow.keras.preprocessing.image.ImageDataGenerator", "tensorflow.keras.callbacks.EarlyStopping", "tensorflow.keras.layers.Dense", "tensorflow.keras.layers.AveragePooling2D", "numpy.arange", "tensorflow.keras.layers.Input", "os.listdir", "matplotlib.pyplot.xlabel", ...
[((891, 917), 'os.listdir', 'os.listdir', (['XRay_Directory'], {}), '(XRay_Directory)\n', (901, 917), False, 'import os\n'), ((1066, 1125), 'tensorflow.keras.preprocessing.image.ImageDataGenerator', 'ImageDataGenerator', ([], {'rescale': '(1.0 / 255)', 'validation_split': '(0.2)'}), '(rescale=1.0 / 255, validation_spli...
from django.utils import timezone from django.conf import settings from rest_framework_jwt.settings import api_settings expiration_time = api_settings.JWT_REFRESH_EXPIRATION_DELTA def jwt_response_payload_handler(token, user=None, request=None): return { 'token': token, 'user': user.username, ...
[ "django.utils.timezone.now" ]
[((345, 359), 'django.utils.timezone.now', 'timezone.now', ([], {}), '()\n', (357, 359), False, 'from django.utils import timezone\n')]
# Copyright (c) 2021 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, ...
[ "binascii.unhexlify" ]
[((1395, 1430), 'binascii.unhexlify', 'binascii.unhexlify', (["test['pub_key']"], {}), "(test['pub_key'])\n", (1413, 1430), False, 'import binascii\n'), ((2052, 2091), 'binascii.unhexlify', 'binascii.unhexlify', (["test['address_dec']"], {}), "(test['address_dec'])\n", (2070, 2091), False, 'import binascii\n')]
import os import sys import spotipy.util as util library = os.path.abspath(os.path.join(os.path.dirname(__file__), '../')) sys.path.append(library) import util.keys as keys def get_token(): client_id = keys.KEYS['spotify_client_id'] client_secret = keys.KEYS['spotify_client_secret'] username = input('...
[ "os.path.dirname", "sys.path.append", "spotipy.util.prompt_for_user_token" ]
[((125, 149), 'sys.path.append', 'sys.path.append', (['library'], {}), '(library)\n', (140, 149), False, 'import sys\n'), ((407, 533), 'spotipy.util.prompt_for_user_token', 'util.prompt_for_user_token', ([], {'username': 'username', 'client_id': 'client_id', 'client_secret': 'client_secret', 'redirect_uri': 'redirect_u...
import keras from keras.models import Sequential from keras.layers import Dense, Conv2D, Activation, Dropout, Reshape, UpSampling2D, Conv2DTranspose, Flatten model = Sequential([ Conv2D(filters=16, kernel_size=3, strides=2, padding='same', input_shape=(14, 28, 1)), Conv2D(filters=32, kernel_size=3, strides=2, ...
[ "keras.layers.Conv2D", "keras.layers.Flatten", "keras.layers.Conv2DTranspose", "keras.layers.Dense", "keras.layers.Reshape", "keras.layers.Dropout" ]
[((184, 274), 'keras.layers.Conv2D', 'Conv2D', ([], {'filters': '(16)', 'kernel_size': '(3)', 'strides': '(2)', 'padding': '"""same"""', 'input_shape': '(14, 28, 1)'}), "(filters=16, kernel_size=3, strides=2, padding='same', input_shape=(\n 14, 28, 1))\n", (190, 274), False, 'from keras.layers import Dense, Conv2D, ...
import io import aiohttp from PIL import Image from plugin_system import Plugin plugin = Plugin('Зеркало', usage=["отзеркаль <прикреплённые фото> - отзеркаливает прикреплённое фото"]) FAIL_MSG = 'К сожалению, произошла какая-то ошибка :(' @plugin.on_command('отзеркаль') async def mirror(msg, args): photo = Fa...
[ "aiohttp.ClientSession", "io.BytesIO", "plugin_system.Plugin" ]
[((92, 191), 'plugin_system.Plugin', 'Plugin', (['"""Зеркало"""'], {'usage': "['отзеркаль <прикреплённые фото> - отзеркаливает прикреплённое фото']"}), "('Зеркало', usage=[\n 'отзеркаль <прикреплённые фото> - отзеркаливает прикреплённое фото'])\n", (98, 191), False, 'from plugin_system import Plugin\n'), ((1067, 107...
import numpy as np import cv2 from mlpipe.processors.i_processor import IPreProcessor class PreProcessData(IPreProcessor): def process(self, raw_data, input_data, ground_truth, piped_params=None): ground_truth = np.zeros(10) ground_truth[raw_data["label"]] = 1.0 png_binary = raw_data["img...
[ "numpy.frombuffer", "numpy.zeros", "cv2.imdecode" ]
[((226, 238), 'numpy.zeros', 'np.zeros', (['(10)'], {}), '(10)\n', (234, 238), True, 'import numpy as np\n'), ((341, 376), 'numpy.frombuffer', 'np.frombuffer', (['png_binary', 'np.uint8'], {}), '(png_binary, np.uint8)\n', (354, 376), True, 'import numpy as np\n'), ((398, 437), 'cv2.imdecode', 'cv2.imdecode', (['png_img...
# ava-python : A Python implementation of the AVA API # Author: https://github.com/zefonseca/ # License MIT import avapython import jsrpc caller = avapython.get_caller() def getBlockchainID(alias): data = { "alias": alias } ret = caller("info.getBlockchainID", data) return ret["blockcha...
[ "avapython.get_caller" ]
[((149, 171), 'avapython.get_caller', 'avapython.get_caller', ([], {}), '()\n', (169, 171), False, 'import avapython\n')]
from TikTokApi import TikTokApi import json import pandas as pd verifyFp = "<KEY>" api = TikTokApi.get_instance(custom_verifyFp = verifyFp) count = 200 username = "jongraz" user_videos = api.by_username(username, count=count) def simple_dict(tiktok_dict): to_return = {} to_return['video']['cover'] to_return...
[ "pandas.DataFrame", "TikTokApi.TikTokApi.get_instance" ]
[((91, 139), 'TikTokApi.TikTokApi.get_instance', 'TikTokApi.get_instance', ([], {'custom_verifyFp': 'verifyFp'}), '(custom_verifyFp=verifyFp)\n', (113, 139), False, 'from TikTokApi import TikTokApi\n'), ((1093, 1118), 'pandas.DataFrame', 'pd.DataFrame', (['user_videos'], {}), '(user_videos)\n', (1105, 1118), True, 'imp...
from mxnet import nd from mxnet.gluon import nn from models.pointnet_globalfeat import PointNetfeat from models.pointnet_globalfeat import PointNetfeat_vanilla class PointNetCls_vanilla(nn.Block): def __init__(self, num_points=2500, k=2, routing=None): super(PointNetCls_vanilla, self).__init__() s...
[ "mxnet.gluon.nn.Dense", "mxnet.gluon.nn.BatchNorm", "models.pointnet_globalfeat.PointNetfeat", "mxnet.gluon.nn.Dropout", "models.pointnet_globalfeat.PointNetfeat_vanilla" ]
[((368, 435), 'models.pointnet_globalfeat.PointNetfeat_vanilla', 'PointNetfeat_vanilla', (['num_points'], {'global_feat': '(True)', 'routing': 'routing'}), '(num_points, global_feat=True, routing=routing)\n', (388, 435), False, 'from models.pointnet_globalfeat import PointNetfeat_vanilla\n'), ((455, 468), 'mxnet.gluon....
# -*- coding: UTF-8 -*- """PyRamen Homework Starter.""" # @TODO: Import libraries import csv from pathlib import Path # @TODO: Set file paths for menu_data.csv and sales_data.csv menu_filepath = Path('./Resources/menu_data.csv') sales_filepath = Path('./Resources/sales_data.csv') print(menufilepath) # @TODO: Initia...
[ "csv.DictReader", "pathlib.Path" ]
[((197, 230), 'pathlib.Path', 'Path', (['"""./Resources/menu_data.csv"""'], {}), "('./Resources/menu_data.csv')\n", (201, 230), False, 'from pathlib import Path\n'), ((248, 282), 'pathlib.Path', 'Path', (['"""./Resources/sales_data.csv"""'], {}), "('./Resources/sales_data.csv')\n", (252, 282), False, 'from pathlib impo...
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ "paddle.nn.functional.one_hot", "paddle.acos", "paddle.matmul", "paddle.shape", "paddle.gather", "paddle.cos", "paddle.add", "paddle.square", "paddle.mean", "paddle.distributed.fleet.utils.class_center_sample", "paddle.utils.unique_name.generate", "paddle.reshape", "paddle.divide", "paddle...
[((3805, 3837), 'paddle.divide', 'paddle.divide', (['input', 'input_norm'], {}), '(input, input_norm)\n', (3818, 3837), False, 'import paddle\n'), ((4700, 4734), 'paddle.divide', 'paddle.divide', (['weight', 'weight_norm'], {}), '(weight, weight_norm)\n', (4713, 4734), False, 'import paddle\n'), ((4749, 4777), 'paddle....
# Code by <NAME> from unittest import TestCase from classes.robot import Robot class Test(TestCase): #Test to ensure that toy robot is placed within the board boundaries def test_placetest(self): robot = Robot() robot.place(2, 2, "EAST") self.assertEqual(robot.report(), "(2, 2, EAST)...
[ "classes.robot.Robot" ]
[((223, 230), 'classes.robot.Robot', 'Robot', ([], {}), '()\n', (228, 230), False, 'from classes.robot import Robot\n'), ((655, 662), 'classes.robot.Robot', 'Robot', ([], {}), '()\n', (660, 662), False, 'from classes.robot import Robot\n'), ((992, 999), 'classes.robot.Robot', 'Robot', ([], {}), '()\n', (997, 999), Fals...
#coding=utf-8 #update at 2018-4-20 from http.client import IncompleteRead from acg.items import ImageItem import scrapy import numpy as np import os class acgimages(scrapy.Spider): """docstring for acgimages""" name = 'images' start_urls = [ "http://www.acg.fi/anime/page/1" ] page = 1 count = 0 ...
[ "acg.items.ImageItem", "scrapy.Request" ]
[((354, 365), 'acg.items.ImageItem', 'ImageItem', ([], {}), '()\n', (363, 365), False, 'from acg.items import ImageItem\n'), ((939, 984), 'scrapy.Request', 'scrapy.Request', (['next_url'], {'callback': 'self.parse'}), '(next_url, callback=self.parse)\n', (953, 984), False, 'import scrapy\n'), ((751, 795), 'scrapy.Reque...
#!/usr/bin/env python3 import random from math import pi,sin,cos,exp,log import matplotlib.pyplot as plt from matplotlib import animation xpos=[5] ypos=[0] xpos2=[-5] ypos2=[0] f=plt.figure() ax=plt.gca() ax.set_xlim(-10,10) ax.set_ylim(-10,10) def alpha_exp(t,n): r=log(4)/n return exp(r*(t-n)) def alpha_l...
[ "matplotlib.animation.FuncAnimation", "matplotlib.pyplot.gca", "math.log", "math.cos", "matplotlib.pyplot.figure", "random.random", "math.sin", "math.exp" ]
[((181, 193), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (191, 193), True, 'import matplotlib.pyplot as plt\n'), ((198, 207), 'matplotlib.pyplot.gca', 'plt.gca', ([], {}), '()\n', (205, 207), True, 'import matplotlib.pyplot as plt\n'), ((1255, 1322), 'matplotlib.animation.FuncAnimation', 'animation.Fun...
import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers import tensorflow_addons as tfa from sklearn.metrics import r2_score from functools import partial ''' classification ''' # GRU clip classifier def GRUClassifier(X, k_layers=1, k_hidden=32, k_class=15, l2=0.001,...
[ "tensorflow.keras.layers.Masking", "tensorflow.random.set_seed", "tensorflow.keras.losses.SparseCategoricalCrossentropy", "tensorflow.keras.optimizers.Adam", "tensorflow.keras.layers.Dense", "functools.partial", "tensorflow.keras.models.load_model", "tensorflow.keras.layers.Conv1D", "tensorflow.kera...
[((619, 643), 'tensorflow.random.set_seed', 'tf.random.set_seed', (['seed'], {}), '(seed)\n', (637, 643), True, 'import tensorflow as tf\n'), ((662, 687), 'tensorflow.keras.regularizers.l2', 'keras.regularizers.l2', (['l2'], {}), '(l2)\n', (683, 687), False, 'from tensorflow import keras\n'), ((704, 809), 'functools.pa...
# Copyright 2020 Assent Compliance Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
[ "image_classifier.ImageClassifier", "json.dumps", "io.BytesIO", "base64.b64decode" ]
[((762, 779), 'image_classifier.ImageClassifier', 'ImageClassifier', ([], {}), '()\n', (777, 779), False, 'from image_classifier import ImageClassifier\n'), ((1082, 1113), 'base64.b64decode', 'base64.b64decode', (["event['body']"], {}), "(event['body'])\n", (1098, 1113), False, 'import base64\n'), ((1187, 1207), 'io.By...
__author__ = '<NAME>' from Rota_System.Reporting.HTMLObjects import HTMLObjects from Rota_System.StandardTimes import date_string, time_string def date(an_object): return an_object.date def time(an_object): return an_object.time def role(an_object): return an_object.role def event_title(event): ...
[ "Rota_System.StandardTimes.date_string", "Rota_System.Reporting.HTMLObjects.HTMLObjects.HTMLGroup", "Rota_System.StandardTimes.time_string" ]
[((354, 377), 'Rota_System.StandardTimes.date_string', 'date_string', (['event.date'], {}), '(event.date)\n', (365, 377), False, 'from Rota_System.StandardTimes import date_string, time_string\n'), ((418, 441), 'Rota_System.StandardTimes.time_string', 'time_string', (['event.time'], {}), '(event.time)\n', (429, 441), F...
import unittest from credentials import Credentials import pyperclip class TestCredentials(unittest.TestCase): def setUp(self): ''' setup before a test is run ''' self.new_cred = Credentials("GitHub", "<EMAIL>", "<PASSWORD>") def tearDown(self): ''' clear list b...
[ "credentials.Credentials.find_account", "credentials.Credentials", "pyperclip.paste", "credentials.Credentials.cred_exists", "credentials.Credentials.display_cred", "credentials.Credentials.copy_passlock" ]
[((217, 263), 'credentials.Credentials', 'Credentials', (['"""GitHub"""', '"""<EMAIL>"""', '"""<PASSWORD>"""'], {}), "('GitHub', '<EMAIL>', '<PASSWORD>')\n", (228, 263), False, 'from credentials import Credentials\n'), ((1110, 1156), 'credentials.Credentials', 'Credentials', (['"""Twitter"""', '"""testuser"""', '"""pas...
# -*- coding: utf-8 -*- # # Copyright (c) 2018-2020 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modif...
[ "string.Template", "os.path.join", "os.path.sep.join", "sconstool.util.finder_.ToolFinder", "unittest.mock.patch.object", "unittest.main", "unittest.mock.patch" ]
[((1524, 1548), 'os.path.sep.join', 'os.path.sep.join', (['pieces'], {}), '(pieces)\n', (1540, 1548), False, 'import os\n'), ((16281, 16296), 'unittest.main', 'unittest.main', ([], {}), '()\n', (16294, 16296), False, 'import unittest\n'), ((3731, 3756), 'sconstool.util.finder_.ToolFinder', 'finder_.ToolFinder', (['"""x...
try: from loguru import logger except ImportError: # pragma: no cover import logging logger = logging.getLogger(__name__) import asyncio from typing import Dict, Tuple, Set, Optional from pydispatch import Dispatcher, Property, DictProperty, ListProperty from tslumd import Tally, Screen, TallyKey, Message...
[ "logging.getLogger", "loguru.logger.debug", "loguru.logger.info", "tslumd.Screen", "asyncio.Lock", "asyncio.Event", "tslumd.Message.parse", "asyncio.get_event_loop" ]
[((7422, 7446), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (7444, 7446), False, 'import asyncio\n'), ((106, 133), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (123, 133), False, 'import logging\n'), ((530, 568), 'loguru.logger.debug', 'logger.debug', (['f"""tr...
import sys t = int(sys.stdin.readline()) p = [0] * 110 for idx in range(1, 110): if idx == 1 or idx == 2 or idx == 3: p[idx] = 1 elif idx == 4 or idx == 5: p[idx] = 2 else: p[idx] = p[idx - 5] + p[idx - 1] while t > 0: n = int(sys.stdin.readline()) print(p[n]) t -= 1
[ "sys.stdin.readline" ]
[((20, 40), 'sys.stdin.readline', 'sys.stdin.readline', ([], {}), '()\n', (38, 40), False, 'import sys\n'), ((271, 291), 'sys.stdin.readline', 'sys.stdin.readline', ([], {}), '()\n', (289, 291), False, 'import sys\n')]
# -*- coding: utf-8 -*- # This file is part of pygal # # A python svg graph plotting library # Copyright © 2012-2016 Kozea # # This library is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version...
[ "math.log10", "pygal.util.safe_enumerate" ]
[((1343, 1371), 'pygal.util.safe_enumerate', 'safe_enumerate', (['serie.values'], {}), '(serie.values)\n', (1357, 1371), False, 'from pygal.util import alter, cached_property, decorate, safe_enumerate\n'), ((1516, 1537), 'math.log10', 'log10', (['(self._max or 1)'], {}), '(self._max or 1)\n', (1521, 1537), False, 'from...
import subprocess import unittest class GlobalsPreTest(unittest.TestCase): def test_can_get_uid(self): hiera = subprocess.Popen(['hiera', 'uid'], stdout=subprocess.PIPE) out = hiera.communicate()[0].rstrip() self.assertNotEqual(out, 'nil', 'Could not get "uid" s...
[ "unittest.main", "subprocess.Popen" ]
[((372, 387), 'unittest.main', 'unittest.main', ([], {}), '()\n', (385, 387), False, 'import unittest\n'), ((125, 183), 'subprocess.Popen', 'subprocess.Popen', (["['hiera', 'uid']"], {'stdout': 'subprocess.PIPE'}), "(['hiera', 'uid'], stdout=subprocess.PIPE)\n", (141, 183), False, 'import subprocess\n')]
import unittest from unittest import mock from codecarbon.external.hardware import GPU from tests.testdata import TWO_GPU_DETAILS_RESPONSE @mock.patch("codecarbon.emissions_tracker.is_gpu_details_available", return_value=True) @mock.patch( "codecarbon.external.hardware.get_gpu_details", return_value=TWO_GPU_...
[ "unittest.mock.patch", "codecarbon.external.hardware.GPU.from_utils" ]
[((143, 233), 'unittest.mock.patch', 'mock.patch', (['"""codecarbon.emissions_tracker.is_gpu_details_available"""'], {'return_value': '(True)'}), "('codecarbon.emissions_tracker.is_gpu_details_available',\n return_value=True)\n", (153, 233), False, 'from unittest import mock\n'), ((231, 333), 'unittest.mock.patch', ...
# Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
[ "google.cloud.storage.Client", "tfx.utils.retry.retry", "tfx.orchestration.test_utils.build_docker_image", "os.path.join", "absl.logging.info", "tensorflow.test.main", "tfx.orchestration.test_utils.delete_gcs_files", "google.cloud.aiplatform.init", "tfx.orchestration.test_utils.random_id", "tfx.ut...
[((1165, 1192), 'datetime.timedelta', 'datetime.timedelta', ([], {'hours': '(2)'}), '(hours=2)\n', (1183, 1192), False, 'import datetime\n'), ((2625, 2666), 'tfx.utils.retry.retry', 'retry.retry', ([], {'ignore_eventual_failure': '(True)'}), '(ignore_eventual_failure=True)\n', (2636, 2666), False, 'from tfx.utils impor...
import glob import multiprocessing as mp import os import gdown import tqdm NUM_THREADS = 8 BASE_DIR = "downloads" def make_download_url(drive_url): return "https://drive.google.com/uc?id=%s" % drive_url.split("?id=")[1] def download_and_extract(func_args): id, filename, out_dir = func_args os.makedir...
[ "os.path.exists", "gdown.download", "os.makedirs", "os.chdir", "os.path.dirname", "multiprocessing.Pool", "os.system", "glob.glob", "os.remove" ]
[((310, 345), 'os.makedirs', 'os.makedirs', (['out_dir'], {'exist_ok': '(True)'}), '(out_dir, exist_ok=True)\n', (321, 345), False, 'import os\n'), ((536, 577), 'gdown.download', 'gdown.download', (['url'], {'output': 'download_path'}), '(url, output=download_path)\n', (550, 577), False, 'import gdown\n'), ((585, 614),...
from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC import time from webdriver_manager.chrome import ChromeDriverManager...
[ "selenium.webdriver.chrome.options.Options", "selenium.webdriver.support.wait.WebDriverWait", "time.sleep", "webdriver_manager.chrome.ChromeDriverManager", "csv.reader", "selenium.webdriver.support.expected_conditions.visibility_of_element_located" ]
[((408, 417), 'selenium.webdriver.chrome.options.Options', 'Options', ([], {}), '()\n', (415, 417), False, 'from selenium.webdriver.chrome.options import Options\n'), ((1486, 1499), 'time.sleep', 'time.sleep', (['(3)'], {}), '(3)\n', (1496, 1499), False, 'import time\n'), ((1570, 1583), 'time.sleep', 'time.sleep', (['(...
from ..registry import DETECTORS from .single_stage import SingleStageDetector from mmdet.core import bbox2result @DETECTORS.register_module class SipMask(SingleStageDetector): def __init__(self, backbone, neck, bbox_head, train_cfg=None, ...
[ "mmdet.core.bbox2result" ]
[((975, 1038), 'mmdet.core.bbox2result', 'bbox2result', (['det_bboxes', 'det_labels', 'self.bbox_head.num_classes'], {}), '(det_bboxes, det_labels, self.bbox_head.num_classes)\n', (986, 1038), False, 'from mmdet.core import bbox2result\n')]
import numpy as np from nets import filter_negs from nets import neural_net import train_nets as tn def test_filtering(): assert filter_negs.remove_strings_w_subs(['hello','lets','find','some','substrings'], ['ll','so']) == ['lets','find','substrings'] def test_listcomp(): testvec = [[0],[1],[0],[1],[0],[1]] ...
[ "nets.filter_negs.reverse_complement", "train_nets.encode", "nets.filter_negs.remove_strings_w_subs", "train_nets.get_kmers" ]
[((134, 234), 'nets.filter_negs.remove_strings_w_subs', 'filter_negs.remove_strings_w_subs', (["['hello', 'lets', 'find', 'some', 'substrings']", "['ll', 'so']"], {}), "(['hello', 'lets', 'find', 'some',\n 'substrings'], ['ll', 'so'])\n", (167, 234), False, 'from nets import filter_negs\n'), ((433, 456), 'train_nets...
from pyqode.core.api import encodings def test_convert_to_code_key(): assert encodings.convert_to_codec_key('UTF-8') == 'utf_8'
[ "pyqode.core.api.encodings.convert_to_codec_key" ]
[((83, 122), 'pyqode.core.api.encodings.convert_to_codec_key', 'encodings.convert_to_codec_key', (['"""UTF-8"""'], {}), "('UTF-8')\n", (113, 122), False, 'from pyqode.core.api import encodings\n')]
from __future__ import print_function import sys from PyQt4 import QtCore from PyQt4 import QtGui from startup_dialog_ui import Ui_startupDialog from colorimeter import constants from colorimeter.gui.basic import startBasicMainWindow from colorimeter.gui.plot import startPlotMainWindow from colorimeter.gui.measure impo...
[ "PyQt4.QtGui.QApplication", "PyQt4.QtGui.QApplication.desktop" ]
[((1876, 1904), 'PyQt4.QtGui.QApplication', 'QtGui.QApplication', (['sys.argv'], {}), '(sys.argv)\n', (1894, 1904), False, 'from PyQt4 import QtGui\n'), ((1424, 1452), 'PyQt4.QtGui.QApplication.desktop', 'QtGui.QApplication.desktop', ([], {}), '()\n', (1450, 1452), False, 'from PyQt4 import QtGui\n')]
import torch import torch.autograd as autograd import torch.nn as nn import torch.nn.functional as F from copy import copy from .layers import ConvexQuadratic, View, WeightTransformedLinear class GradNN(nn.Module): def __init__(self, batch_size=1024): super(GradNN, self).__init__() self.ba...
[ "torch.ones_like", "torch.celu", "copy.copy", "torch.nn.functional.softplus", "torch.nn.Linear", "torch.nn.functional.relu", "torch.zeros_like" ]
[((1594, 1638), 'torch.zeros_like', 'torch.zeros_like', (['input'], {'requires_grad': '(False)'}), '(input, requires_grad=False)\n', (1610, 1638), False, 'import torch\n'), ((3245, 3274), 'copy.copy', 'copy', (['self.hidden_layer_sizes'], {}), '(self.hidden_layer_sizes)\n', (3249, 3274), False, 'from copy import copy\n...
""" Command line tools wrapping growlnotify. timer -- ergonomic or productivity timer (e.g., pomodoro technique) todo -- post todos (sticky by default) """ import time import os import click @click.command() @click.version_option() @click.argument('rounds', default=5) @click.option('work', '-w', '--work-time', defa...
[ "click.argument", "click.option", "time.sleep", "click.version_option", "os.system", "click.command" ]
[((196, 211), 'click.command', 'click.command', ([], {}), '()\n', (209, 211), False, 'import click\n'), ((213, 235), 'click.version_option', 'click.version_option', ([], {}), '()\n', (233, 235), False, 'import click\n'), ((237, 272), 'click.argument', 'click.argument', (['"""rounds"""'], {'default': '(5)'}), "('rounds'...
import time from copy import deepcopy as copy import numpy as np from klampt import WorldModel from klampt.model import ik class IK(): def __init__(self): self.world = WorldModel() self.robot = self.world.loadRobot('franka_panda/panda_model_w_table.urdf') self.robot.setJointLimits( [-0.0, -0.0, -0.0, -0.0...
[ "klampt.model.ik.solve", "klampt.WorldModel", "time.sleep", "klampt.model.ik.objective" ]
[((175, 187), 'klampt.WorldModel', 'WorldModel', ([], {}), '()\n', (185, 187), False, 'from klampt import WorldModel\n'), ((579, 592), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (589, 592), False, 'import time\n'), ((863, 932), 'klampt.model.ik.objective', 'ik.objective', (['self.grasptarget_link'], {'local': ...
from django import forms class UploadFileForm(forms.Form): user_email = forms.CharField(max_length=150) image = forms.FileField() class DownloadFileForm(forms.Form): user_email = forms.CharField(max_length=150)
[ "django.forms.FileField", "django.forms.CharField" ]
[((80, 111), 'django.forms.CharField', 'forms.CharField', ([], {'max_length': '(150)'}), '(max_length=150)\n', (95, 111), False, 'from django import forms\n'), ((125, 142), 'django.forms.FileField', 'forms.FileField', ([], {}), '()\n', (140, 142), False, 'from django import forms\n'), ((201, 232), 'django.forms.CharFie...
# -*- coding: utf-8 -*- """Tests for processing.getting module.""" from os.path import expanduser from nose.tools import assert_equal, assert_true from pandas import DataFrame from sosia.establishing import connect_database from sosia.processing.getting import get_authors test_cache = expanduser("~/.sosia/test.sqli...
[ "sosia.processing.getting.get_authors", "os.path.expanduser", "sosia.establishing.connect_database" ]
[((290, 324), 'os.path.expanduser', 'expanduser', (['"""~/.sosia/test.sqlite"""'], {}), "('~/.sosia/test.sqlite')\n", (300, 324), False, 'from os.path import expanduser\n'), ((337, 365), 'sosia.establishing.connect_database', 'connect_database', (['test_cache'], {}), '(test_cache)\n', (353, 365), False, 'from sosia.est...
from __future__ import print_function import re def find_all_replacements(base_molecule, match, replace): indices = [m.start() for m in re.finditer(match, base_molecule)] lm = len(match) return [base_molecule[:i]+replace+base_molecule[i+lm:] for i in indices] molecules = set() test_molecule = 'HOHOHO' mo...
[ "re.finditer" ]
[((142, 175), 're.finditer', 're.finditer', (['match', 'base_molecule'], {}), '(match, base_molecule)\n', (153, 175), False, 'import re\n')]
import sys sys.path.append('/home/jwalker/dynamics/python/atmos-tools') sys.path.append('/home/jwalker/dynamics/python/atmos-read') sys.path.append('/home/jwalker/dynamics/python/monsoon-onset') import os import numpy as np import xarray as xray import pandas as pd import matplotlib.pyplot as plt import collections i...
[ "atmos.mean_over_files", "utils.daily_rel2onset", "atmos.homedir", "xarray.Dataset", "os.path.isfile", "atmos.expand_dims", "xarray.concat", "utils.wrapyear", "atmos.subset", "xarray.open_dataset", "sys.path.append", "atmos.season_days", "numpy.arange" ]
[((11, 71), 'sys.path.append', 'sys.path.append', (['"""/home/jwalker/dynamics/python/atmos-tools"""'], {}), "('/home/jwalker/dynamics/python/atmos-tools')\n", (26, 71), False, 'import sys\n'), ((72, 131), 'sys.path.append', 'sys.path.append', (['"""/home/jwalker/dynamics/python/atmos-read"""'], {}), "('/home/jwalker/d...
import bs4 import json import random import requests from asgiref.sync import async_to_sync from channels.generic.websocket import WebsocketConsumer class RoomConsumer(WebsocketConsumer): def connect(self): self.room_name = self.scope['url_route']['kwargs']['room_name'] self.room_group_name = 'ro...
[ "json.loads", "random.choice", "json.dumps", "bs4.BeautifulSoup", "asgiref.sync.async_to_sync" ]
[((815, 836), 'json.loads', 'json.loads', (['text_data'], {}), '(text_data)\n', (825, 836), False, 'import json\n'), ((2003, 2024), 'json.loads', 'json.loads', (['text_data'], {}), '(text_data)\n', (2013, 2024), False, 'import json\n'), ((3358, 3379), 'json.loads', 'json.loads', (['text_data'], {}), '(text_data)\n', (3...
#-*- coding: utf-8 -*- """ this backend requires the twilio python library: http://pypi.python.org/pypi/twilio/ """ from twilio.rest import TwilioRestClient from django.conf import settings from sendsms.backends.base import BaseSmsBackend TWILIO_ACCOUNT_SID = getattr(settings, 'SENDSMS_TWILIO_ACCOUNT_SID', '') TWILIO_...
[ "twilio.rest.TwilioRestClient" ]
[((475, 530), 'twilio.rest.TwilioRestClient', 'TwilioRestClient', (['TWILIO_ACCOUNT_SID', 'TWILIO_AUTH_TOKEN'], {}), '(TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN)\n', (491, 530), False, 'from twilio.rest import TwilioRestClient\n')]
from tests.utils import W3CTestCase class TestGridMarginsNoCollapse(W3CTestCase): vars().update(W3CTestCase.find_tests(__file__, 'grid-margins-no-collapse-'))
[ "tests.utils.W3CTestCase.find_tests" ]
[((101, 162), 'tests.utils.W3CTestCase.find_tests', 'W3CTestCase.find_tests', (['__file__', '"""grid-margins-no-collapse-"""'], {}), "(__file__, 'grid-margins-no-collapse-')\n", (123, 162), False, 'from tests.utils import W3CTestCase\n')]
from PyQt5.QtWidgets import QPushButton, QLineEdit, QMessageBox, QGridLayout, QLabel, QListWidget from PyQt5 import QtWidgets from src.controllers import MainController from src.assets.Label import Label class UserList(QListWidget): def __init__(self, parent=None): super(UserList, self).__init__(parent)...
[ "PyQt5.QtWidgets.QGridLayout", "PyQt5.QtWidgets.QMessageBox.about", "PyQt5.QtWidgets.QLabel", "PyQt5.QtWidgets.QPushButton", "PyQt5.QtWidgets.QLineEdit" ]
[((898, 911), 'PyQt5.QtWidgets.QGridLayout', 'QGridLayout', ([], {}), '()\n', (909, 911), False, 'from PyQt5.QtWidgets import QPushButton, QLineEdit, QMessageBox, QGridLayout, QLabel, QListWidget\n'), ((985, 1016), 'PyQt5.QtWidgets.QPushButton', 'QPushButton', (['Label.LOGIN_BUTTON'], {}), '(Label.LOGIN_BUTTON)\n', (99...
from gbdxtools import Interface gbdx = None def go(): print(gbdx.task_registry.list()) print(gbdx.task_registry.get_definition('HelloGBDX')) if __name__ == "__main__": gbdx = Interface() go()
[ "gbdxtools.Interface" ]
[((190, 201), 'gbdxtools.Interface', 'Interface', ([], {}), '()\n', (199, 201), False, 'from gbdxtools import Interface\n')]
# Copyright (c) 2021 <NAME> # # coding:utf-8 from mlpm.server import aidserver, run_server class Solver(object): def __init__(self, pretrained_toml=None): self._isReady = False self.bundle = None self._hyperparameters = {} self._enable_train = False self.server = aidserver...
[ "mlpm.server.run_server" ]
[((842, 864), 'mlpm.server.run_server', 'run_server', (['self', 'port'], {}), '(self, port)\n', (852, 864), False, 'from mlpm.server import aidserver, run_server\n')]
"""Run a dummy simulation that outputs tab-separated values """ import random import csv import sys writer = csv.writer(sys.stdout, delimiter='\t') for i in range(10000): writer.writerow([ i, i*i, i+i, ])
[ "csv.writer" ]
[((111, 149), 'csv.writer', 'csv.writer', (['sys.stdout'], {'delimiter': '"""\t"""'}), "(sys.stdout, delimiter='\\t')\n", (121, 149), False, 'import csv\n')]
import os from subaligner.predictor import Predictor from subaligner.subtitle import Subtitle if __name__ == "__main__": examples_dir = os.path.dirname(os.path.abspath(__file__)) output_dir = os.path.join(examples_dir, "tmp") os.makedirs(output_dir, exist_ok=True) video_file_path = os.path.join(example...
[ "subaligner.subtitle.Subtitle.export_subtitle", "os.makedirs", "subaligner.predictor.Predictor", "os.path.join", "os.path.abspath" ]
[((201, 234), 'os.path.join', 'os.path.join', (['examples_dir', '"""tmp"""'], {}), "(examples_dir, 'tmp')\n", (213, 234), False, 'import os\n'), ((239, 277), 'os.makedirs', 'os.makedirs', (['output_dir'], {'exist_ok': '(True)'}), '(output_dir, exist_ok=True)\n', (250, 277), False, 'import os\n'), ((300, 370), 'os.path....
import sys from setuptools import setup from setuptools.command.test import test as TestCommand class PyTest(TestCommand): user_options = [('pytest-args=', 'a', "Arguments to pass to pytest")] def initialize_options(self): TestCommand.initialize_options(self) self.pytest_args = '' def run...
[ "setuptools.command.test.test.initialize_options", "os.path.join", "shlex.split", "sys.exit" ]
[((241, 277), 'setuptools.command.test.test.initialize_options', 'TestCommand.initialize_options', (['self'], {}), '(self)\n', (271, 277), True, 'from setuptools.command.test import test as TestCommand\n'), ((503, 518), 'sys.exit', 'sys.exit', (['errno'], {}), '(errno)\n', (511, 518), False, 'import sys\n'), ((464, 493...
import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from scipy.spatial.transform import Rotation from tadataka.matrix import motion_matrix from tadataka.rigid_transform import (inv_transform_all, transform_all, transform_each, Transform, tra...
[ "tadataka.matrix.motion_matrix", "tadataka.rigid_transform.transform_all", "numpy.random.random", "tadataka.rigid_transform.Transform", "numpy.array", "numpy.dot", "tadataka.rigid_transform.transform_each", "tadataka.rigid_transform.transform_se3", "numpy.random.uniform", "tadataka.rigid_transform...
[((374, 407), 'numpy.array', 'np.array', (['[[1, 2, 5], [4, -2, 3]]'], {}), '([[1, 2, 5], [4, -2, 3]])\n', (382, 407), True, 'import numpy as np\n'), ((448, 534), 'numpy.array', 'np.array', (['[[[1, 0, 0], [0, 0, -1], [0, 1, 0]], [[0, 0, -1], [0, 1, 0], [1, 0, 0]]]'], {}), '([[[1, 0, 0], [0, 0, -1], [0, 1, 0]], [[0, 0,...
#!/usr/bin/env python3 """Common library for working with numerical vectors and matrices. This module provides functions for operating one-dimensional sequences (vectors) and two-dimensional collections (matrices) of numbers. Examples include calculating dot and cross products and finding the optimal assignment in a ...
[ "copy.deepcopy" ]
[((9592, 9618), 'copy.deepcopy', 'copy.deepcopy', (['cost_matrix'], {}), '(cost_matrix)\n', (9605, 9618), False, 'import copy\n')]
# # Stuff related to actual reader pane # # Looks like we need a subclass of xbmcgui.WindowXMLDialog to be able to have # a scrollbar and to have access to various components (such as the textfield holding # the actual book text) # import xbmcgui import resources.lib.kodiutils as kodi # Some useful defintions for int...
[ "resources.lib.kodiutils.whereami" ]
[((1958, 1973), 'resources.lib.kodiutils.whereami', 'kodi.whereami', ([], {}), '()\n', (1971, 1973), True, 'import resources.lib.kodiutils as kodi\n')]
#!/usr/bin/env python """ Evaluate the stability (i.e. agreement) between a set of partitions generated on the same dataset, using Pairwise Normalized Mutual Information (PNMI). Sample usage: python eval-partition-stability.py models/base/*partition*.pkl """ import os, sys import logging as log from optparse import O...
[ "logging.basicConfig", "prettytable.PrettyTable", "os.path.exists", "numpy.median", "logging.debug", "numpy.digitize", "os.walk", "os.path.join", "optparse.OptionParser", "numpy.array", "sklearn.metrics.cluster.normalized_mutual_info_score", "os.path.isdir", "sys.exit", "logging.info", "...
[((584, 659), 'optparse.OptionParser', 'OptionParser', ([], {'usage': '"""usage: %prog [options] partition_file1|directory1 ..."""'}), "(usage='usage: %prog [options] partition_file1|directory1 ...')\n", (596, 659), False, 'from optparse import OptionParser\n'), ((1152, 1199), 'logging.basicConfig', 'log.basicConfig', ...
import tkinter as tk root = tk.Tk() root.title("CodingPrivacy") root.geometry("300x150") def func(): print("Button is clicked!!") btn = tk.Button(root, text="click here", command = func) btn.pack(side="top") root.mainloop()
[ "tkinter.Tk", "tkinter.Button" ]
[((29, 36), 'tkinter.Tk', 'tk.Tk', ([], {}), '()\n', (34, 36), True, 'import tkinter as tk\n'), ((143, 191), 'tkinter.Button', 'tk.Button', (['root'], {'text': '"""click here"""', 'command': 'func'}), "(root, text='click here', command=func)\n", (152, 191), True, 'import tkinter as tk\n')]
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2020-09-01 09:50 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('commercialoperator', '0088_auto_20200828_1343'), ] operations = [ migration...
[ "django.db.models.DecimalField", "django.db.migrations.RemoveField", "django.db.models.CharField" ]
[((311, 389), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""applicationtype"""', 'name': '"""filming_fee_4days"""'}), "(model_name='applicationtype', name='filming_fee_4days')\n", (333, 389), False, 'from django.db import migrations, models\n'), ((434, 526), 'django.db.migrations...
# USAGE # python detection.py --input videos/sample1.mp4 --yolo yolo-coco import numpy as np import argparse import imutils import time import cv2 import os ap = argparse.ArgumentParser() ap.add_argument("-i", "--input", required=True, help="path to input video") ap.add_argument("-y", "--yolo", default="yolo-coco", h...
[ "cv2.rectangle", "imutils.is_cv2", "numpy.int32", "cv2.imshow", "numpy.array", "os.path.sep.join", "cv2.warpPerspective", "cv2.destroyAllWindows", "cv2.dnn.NMSBoxes", "cv2.setMouseCallback", "argparse.ArgumentParser", "numpy.random.seed", "cv2.VideoWriter_fourcc", "cv2.perspectiveTransform...
[((164, 189), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (187, 189), False, 'import argparse\n'), ((632, 678), 'os.path.sep.join', 'os.path.sep.join', (["[args['yolo'], 'coco.names']"], {}), "([args['yolo'], 'coco.names'])\n", (648, 678), False, 'import os\n'), ((733, 751), 'numpy.random.se...
# summary function for drawing graph # ref : https://github.com/yunjey/pytorch-tutorial/blob/master/tutorials/04-utils/tensorboard/logger.py # Code referenced from https://gist.github.com/gyglim/1f8dfb1b5c82627ae3efcfbbadb9f514 import os import tensorflow as tf import numpy as np import scipy.misc import torch from to...
[ "StringIO.StringIO", "numpy.prod", "numpy.histogram", "tensorflow.Summary", "tensorflow.HistogramProto", "os.makedirs", "torch.utils.data.DataLoader", "torch.max", "io.BytesIO", "numpy.max", "numpy.sum", "ImageLoader.ImageLoader", "torchvision.transforms.transforms.Normalize", "torchvision...
[((1700, 1731), 'tensorflow.Summary', 'tf.Summary', ([], {'value': 'img_summaries'}), '(value=img_summaries)\n', (1710, 1731), True, 'import tensorflow as tf\n'), ((1964, 1995), 'numpy.histogram', 'np.histogram', (['values'], {'bins': 'bins'}), '(values, bins=bins)\n', (1976, 1995), True, 'import numpy as np\n'), ((206...
from autograd import numpy as npy from functools import reduce from scipy.optimize import minimize from autograd import grad def generate_Givens_rotation(i, j, theta, size): g = npy.eye(size) c = npy.cos(theta) s = npy.sin(theta) g[i, i] = 0 g[j, j] = 0 g[j, i] = 0 g[i, j] = 0 ii_mat =...
[ "autograd.numpy.zeros_like", "autograd.numpy.sum", "autograd.numpy.cos", "autograd.numpy.sin", "autograd.grad", "autograd.numpy.eye", "autograd.numpy.max" ]
[((184, 197), 'autograd.numpy.eye', 'npy.eye', (['size'], {}), '(size)\n', (191, 197), True, 'from autograd import numpy as npy\n'), ((206, 220), 'autograd.numpy.cos', 'npy.cos', (['theta'], {}), '(theta)\n', (213, 220), True, 'from autograd import numpy as npy\n'), ((229, 243), 'autograd.numpy.sin', 'npy.sin', (['thet...
import platform import subprocess shell_opt = True if platform.system() == "Windows" else False def Popen(opts): return subprocess.Popen( opts, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, stdin=subprocess.PIPE, universal_newlines=True, shell=shell_opt ) ...
[ "subprocess.Popen", "platform.system", "subprocess.run" ]
[((127, 268), 'subprocess.Popen', 'subprocess.Popen', (['opts'], {'stdout': 'subprocess.PIPE', 'stderr': 'subprocess.STDOUT', 'stdin': 'subprocess.PIPE', 'universal_newlines': '(True)', 'shell': 'shell_opt'}), '(opts, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,\n stdin=subprocess.PIPE, universal_newlines=True,...
# -*- coding:utf-8 -*- """ """ import re import time import numpy as np import pandas as pd from lightgbm import LGBMRegressor, LGBMClassifier from sklearn.impute import SimpleImputer from sklearn.metrics import log_loss, mean_squared_error from sklearn.model_selection import train_test_split from sklearn.preprocessi...
[ "numpy.clip", "sklearn.preprocessing.LabelEncoder", "numpy.log", "lightgbm.LGBMRegressor", "lightgbm.LGBMClassifier", "numpy.iinfo", "numpy.array", "numpy.searchsorted", "tabular_toolbox.utils.logging.get_logger", "numpy.stack", "numpy.min", "pandas.DataFrame", "sklearn.utils.validation.chec...
[((662, 690), 'tabular_toolbox.utils.logging.get_logger', 'logging.get_logger', (['__name__'], {}), '(__name__)\n', (680, 690), False, 'from tabular_toolbox.utils import logging, infer_task_type\n'), ((887, 997), 'sklearn.metrics.mean_squared_error', 'mean_squared_error', (['y_true', 'y_pred'], {'sample_weight': 'sampl...
import subprocess import sys import face_recognition import cv2 import os import numpy as np def read_img(path): img = cv2.imread(path) (h, w) = img.shape[:2] width = 500 ratio = width / float(w) height = int(h * ratio) return cv2.resize(img, (width, height)) Known_encodings = [] known_names...
[ "os.listdir", "face_recognition.compare_faces", "face_recognition.face_encodings", "cv2.resize", "cv2.imread" ]
[((374, 395), 'os.listdir', 'os.listdir', (['known_dir'], {}), '(known_dir)\n', (384, 395), False, 'import os\n'), ((719, 742), 'os.listdir', 'os.listdir', (['Unknown_dir'], {}), '(Unknown_dir)\n', (729, 742), False, 'import os\n'), ((125, 141), 'cv2.imread', 'cv2.imread', (['path'], {}), '(path)\n', (135, 141), False,...
import re import pandas as pd import util as ut import argparse def extract(df, target_col='text', info_type='link', out_dir=''): ut.makedirs(out_dir) df = df[['com_id', target_col]] ut.out('target column: %s, info type: %s' % (target_col, info_type)) if info_type == 'text': ut.out('writing ...
[ "util.out", "pandas.read_csv", "argparse.ArgumentParser", "re.compile", "util.makedirs", "pandas.DataFrame.from_dict" ]
[((136, 156), 'util.makedirs', 'ut.makedirs', (['out_dir'], {}), '(out_dir)\n', (147, 156), True, 'import util as ut\n'), ((198, 266), 'util.out', 'ut.out', (["('target column: %s, info type: %s' % (target_col, info_type))"], {}), "('target column: %s, info type: %s' % (target_col, info_type))\n", (204, 266), True, 'im...
from typing import Union, cast import libcst as cst import libcst.matchers as m from .util import CodeMod, runner """ libcst based transformer to change 'not foo in bar' to 'foo not in bar' constructs. """ __author__ = "<NAME> <<EMAIL>>" __license__ = "MIT" class NotIn(CodeMod): DESCRIPTION: str = "Converts '...
[ "libcst.matchers.Not", "typing.cast", "libcst.matchers.In", "libcst.NotIn" ]
[((818, 863), 'typing.cast', 'cast', (['cst.Comparison', 'updated_node.expression'], {}), '(cst.Comparison, updated_node.expression)\n', (822, 863), False, 'from typing import Union, cast\n'), ((628, 635), 'libcst.matchers.Not', 'm.Not', ([], {}), '()\n', (633, 635), True, 'import libcst.matchers as m\n'), ((1046, 1057...
# System import json from .visualization_project_query import visualization_project_query from SBaaS_base.sbaas_template_io import sbaas_template_io # Resources from io_utilities.base_importData import base_importData from io_utilities.base_exportData import base_exportData from ddt_python.ddt_container import ddt_cont...
[ "io_utilities.base_exportData.base_exportData", "io_utilities.base_importData.base_importData", "ddt_python.ddt_container.ddt_container" ]
[((504, 521), 'io_utilities.base_importData.base_importData', 'base_importData', ([], {}), '()\n', (519, 521), False, 'from io_utilities.base_importData import base_importData\n'), ((762, 779), 'io_utilities.base_importData.base_importData', 'base_importData', ([], {}), '()\n', (777, 779), False, 'from io_utilities.bas...
from django.contrib import admin from django.urls import path from .views import * from django.views.generic import TemplateView urlpatterns = [ path('', home, name="home"), path('graph/', graphPage, name="graph"), path('graph3d/', graphPage3D, name="graph3d"), path('graph/json-editor/', JsonEditor, nam...
[ "django.views.generic.TemplateView.as_view", "django.urls.path" ]
[((149, 176), 'django.urls.path', 'path', (['""""""', 'home'], {'name': '"""home"""'}), "('', home, name='home')\n", (153, 176), False, 'from django.urls import path\n'), ((182, 221), 'django.urls.path', 'path', (['"""graph/"""', 'graphPage'], {'name': '"""graph"""'}), "('graph/', graphPage, name='graph')\n", (186, 221...
from bs4 import BeautifulSoup import requests from prettytable import PrettyTable import time x = PrettyTable() x.field_names = ["Name", "Price", "Time Left"] # List of item names to search on eBay name_list = ["<NAME>"] item_name = [] prices = [] times = [] # Returns a list of urls that search eBay for an item ...
[ "prettytable.PrettyTable", "time.find", "requests.get", "bs4.BeautifulSoup", "time.time" ]
[((101, 114), 'prettytable.PrettyTable', 'PrettyTable', ([], {}), '()\n', (112, 114), False, 'from prettytable import PrettyTable\n'), ((2599, 2610), 'time.time', 'time.time', ([], {}), '()\n', (2608, 2610), False, 'import time\n'), ((2651, 2662), 'time.time', 'time.time', ([], {}), '()\n', (2660, 2662), False, 'import...
## Project: SudokuSolver ## Element: ExtraFunctions -> Additional functions for plotting, and "string-to-dictionary" conversion of the Sudoku from collections import defaultdict rows = 'ABCDEFGHI' cols = '123456789' boxes = [r + c for r in rows for c in cols] def extract_units(unitlist, boxes): """ **Function ...
[ "collections.defaultdict" ]
[((951, 968), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (962, 968), False, 'from collections import defaultdict\n'), ((2080, 2096), 'collections.defaultdict', 'defaultdict', (['set'], {}), '(set)\n', (2091, 2096), False, 'from collections import defaultdict\n')]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import numpy as np def calculate_daylight(day: int, latitude: float = 53.551086) -> float: """ Calculate number of hours of daylight in a day Parameters ---------- day : integer (required) day of the week by number, starting at 0 (Monday) ...
[ "numpy.sin", "numpy.tan", "numpy.cos" ]
[((1056, 1083), 'numpy.cos', 'np.cos', (['(latitude * pi / 180)'], {}), '(latitude * pi / 180)\n', (1062, 1083), True, 'import numpy as np\n'), ((1086, 1095), 'numpy.cos', 'np.cos', (['P'], {}), '(P)\n', (1092, 1095), True, 'import numpy as np\n'), ((998, 1025), 'numpy.sin', 'np.sin', (['(latitude * pi / 180)'], {}), '...
import math from array import array import cPickle class convertcovariancetabletoarray: registered = True #Value to define db operator def __init__(self): self.n = 0 self.data = {} self.mydata1D = [] self.headers = [] self.flag = True def step(self, *args): ...
[ "math.sqrt" ]
[((709, 726), 'math.sqrt', 'math.sqrt', (['self.n'], {}), '(self.n)\n', (718, 726), False, 'import math\n')]
from ..constants import ORG from ..converter import KnowledgePostConverter from knowledge_repo.utils.files import read_text_lines import re def dict_to_yaml(x): yaml = [] for key, value in x.items(): if type(value) == list: yaml += f'{key}:\n' for v in value: ya...
[ "knowledge_repo.utils.files.read_text_lines", "re.compile", "re.match", "re.finditer", "re.sub", "re.search" ]
[((2556, 2581), 'knowledge_repo.utils.files.read_text_lines', 'read_text_lines', (['filename'], {}), '(filename)\n', (2571, 2581), False, 'from knowledge_repo.utils.files import read_text_lines\n'), ((4868, 4897), 're.match', 're.match', (['"""^(\\\\*+)"""', 'new_line'], {}), "('^(\\\\*+)', new_line)\n", (4876, 4897), ...
import argparse import logging import os import numpy as np import torch from torch import distributed from torch.utils.data import DataLoader from torch.utils.tensorboard import SummaryWriter from backbones import get_model from dataset import get_dataloader from losses import CombinedMarginLoss from lr_scheduler im...
[ "utils.utils_distributed_sampler.setup_seed", "torch.distributed.destroy_process_group", "partial_fc.PartialFCAdamW", "torch.distributed.init_process_group", "utils.utils_callbacks.CallBackLogging", "utils.utils_config.get_config", "partial_fc.PartialFC", "argparse.ArgumentParser", "utils.utils_logg...
[((888, 926), 'torch.distributed.init_process_group', 'distributed.init_process_group', (['"""nccl"""'], {}), "('nccl')\n", (918, 926), False, 'from torch import distributed\n'), ((1183, 1206), 'utils.utils_config.get_config', 'get_config', (['args.config'], {}), '(args.config)\n', (1193, 1206), False, 'from utils.util...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # File : pad.py # Author : <NAME> <<EMAIL>> # Date : 01.11.2020 # Last Modified Date: 09.11.2021 # Last Modified By : <NAME> <<EMAIL>> # # Copyright (c) 2020, Imperial College, London # All rights reserved. # Redistribution and use in ...
[ "numpy.issubdtype", "numpy.full", "numpy.asarray", "numpy.max" ]
[((3091, 3158), 'numpy.full', 'np.full', (['((total_samples, maxlen) + sample_shape)', 'value'], {'dtype': 'dtype'}), '((total_samples, maxlen) + sample_shape, value, dtype=dtype)\n', (3098, 3158), True, 'import numpy as np\n'), ((2685, 2700), 'numpy.max', 'np.max', (['lengths'], {}), '(lengths)\n', (2691, 2700), True,...
import os import json from .constants import DATA_PATH class Teamnames: __instance = None def __init__(self): if not Teamnames.__instance: self.reset() try: self.load() except Exception as ex: print("Team name file could not load: {}".format(self.file_path())) print(...
[ "json.load", "json.dump" ]
[((1333, 1352), 'json.dump', 'json.dump', (['data', 'fp'], {}), '(data, fp)\n', (1342, 1352), False, 'import json\n'), ((1429, 1442), 'json.load', 'json.load', (['fp'], {}), '(fp)\n', (1438, 1442), False, 'import json\n')]
import pandas as pd from sklearn.linear_model import LogisticRegressionCV, LogisticRegression from sklearn.metrics import confusion_matrix, accuracy_score, precision_score, recall_score, f1_score from sklearn.feature_extraction.text import CountVectorizer,TfidfVectorizer from sklearn.pipeline import Pipeline from sklea...
[ "traceback.format_exc", "pandas.read_csv", "spacy.load", "sklearn.model_selection.train_test_split", "multiprocessing.cpu_count", "sklearn.feature_extraction.text.TfidfVectorizer", "telegrambotalarm.TelegramBot" ]
[((435, 463), 'spacy.load', 'spacy.load', (['"""en_core_web_sm"""'], {}), "('en_core_web_sm')\n", (445, 463), False, 'import spacy\n'), ((2551, 2575), 'telegrambotalarm.TelegramBot', 'TelegramBot', (['TOKEN', 'MYID'], {}), '(TOKEN, MYID)\n', (2562, 2575), False, 'from telegrambotalarm import TelegramBot\n'), ((853, 100...
from typing import Any, Dict, List, Text from rasa_sdk import Action, Tracker from rasa_sdk.events import SlotSet from rasa_sdk.executor import CollectingDispatcher from covidflow.constants import CONTINUE_CI_SLOT from covidflow.utils.persistence import cancel_reminder from .lib.log_util import bind_logger ACTION_N...
[ "rasa_sdk.events.SlotSet" ]
[((962, 994), 'rasa_sdk.events.SlotSet', 'SlotSet', (['CONTINUE_CI_SLOT', '(False)'], {}), '(CONTINUE_CI_SLOT, False)\n', (969, 994), False, 'from rasa_sdk.events import SlotSet\n')]
from collections import defaultdict from copy import deepcopy from time import time from flatland.envs.agent_utils import RailAgentStatus from flatland.envs.rail_env import RailEnv, RailEnvActions import numpy as np from flatlander.agents.heuristic_agent import HeuristicPriorityAgent from flatlander.submission.helper ...
[ "flatlander.submission.helper.get_agent_pos", "numpy.random.random", "numpy.flatnonzero", "numpy.min", "numpy.count_nonzero", "collections.defaultdict", "copy.deepcopy", "flatlander.submission.helper.is_done", "flatlander.agents.heuristic_agent.HeuristicPriorityAgent", "time.time" ]
[((588, 612), 'flatlander.agents.heuristic_agent.HeuristicPriorityAgent', 'HeuristicPriorityAgent', ([], {}), '()\n', (610, 612), False, 'from flatlander.agents.heuristic_agent import HeuristicPriorityAgent\n'), ((629, 635), 'time.time', 'time', ([], {}), '()\n', (633, 635), False, 'from time import time\n'), ((834, 84...
# load packages import random import yaml from munch import Munch import numpy as np import torch from torch import nn import torch.nn.functional as F import torchaudio import librosa import soundfile import argparse import shutil import os from Utils.ASR.models import ASRCNN from Utils.JDC.model import JDCNet from mo...
[ "torch.from_numpy", "soundfile.write", "librosa.resample", "librosa.effects.trim", "librosa.load", "argparse.ArgumentParser", "models.MappingNetwork", "parallel_wavegan.utils.load_model", "Utils.JDC.model.JDCNet", "torch.randn", "numpy.abs", "random.choice", "shutil.copy", "munch.Munch", ...
[((411, 507), 'torchaudio.transforms.MelSpectrogram', 'torchaudio.transforms.MelSpectrogram', ([], {'n_mels': '(80)', 'n_fft': '(2048)', 'win_length': '(1200)', 'hop_length': '(300)'}), '(n_mels=80, n_fft=2048, win_length=1200,\n hop_length=300)\n', (447, 507), False, 'import torchaudio\n'), ((765, 784), 'munch.Munc...
import collections import subprocess import contextlib import warnings from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord from Bio import SeqIO from Bio import BiopythonExperimentalWarning with warnings.catch_warnings(): warnings.simplefilter('ignore', BiopythonExperimentalWarning) from Bio import Sea...
[ "Bio.SearchIO.read", "Bio.Seq.Seq", "warnings.catch_warnings", "seqseqpan.formatter.Splitter", "subprocess.call", "collections.defaultdict", "Bio.SeqIO.write", "warnings.simplefilter", "contextlib.suppress" ]
[((204, 229), 'warnings.catch_warnings', 'warnings.catch_warnings', ([], {}), '()\n', (227, 229), False, 'import warnings\n'), ((235, 296), 'warnings.simplefilter', 'warnings.simplefilter', (['"""ignore"""', 'BiopythonExperimentalWarning'], {}), "('ignore', BiopythonExperimentalWarning)\n", (256, 296), False, 'import w...
from engine import console from engine.functions import handler from engine.web_server import WebServer @handler.arg(name='server', description='Запускаем процесс "сервер" (на сервере).') def _(): console.log('(MANAGER): Инициализация процесса "сервер"..') WebServer()
[ "engine.web_server.WebServer", "engine.console.log", "engine.functions.handler.arg" ]
[((107, 194), 'engine.functions.handler.arg', 'handler.arg', ([], {'name': '"""server"""', 'description': '"""Запускаем процесс "сервер" (на сервере)."""'}), '(name=\'server\', description=\n \'Запускаем процесс "сервер" (на сервере).\')\n', (118, 194), False, 'from engine.functions import handler\n'), ((203, 262), ...
import pytest from config.app import create_app from config.initializers.errors import RequestErrorHandling from config.db import db as _db @pytest.fixture() def app(): app = create_app() RequestErrorHandling(app) # Router has to be imported at last as it in turns loads the application code with app....
[ "config.app.create_app", "config.router.load_blueprints", "config.initializers.errors.RequestErrorHandling", "config.db.db.create_all", "pytest.fixture", "config.db.db.drop_all" ]
[((143, 159), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (157, 159), False, 'import pytest\n'), ((433, 479), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""function"""', 'autouse': '(True)'}), "(scope='function', autouse=True)\n", (447, 479), False, 'import pytest\n'), ((181, 193), 'config.app.create...
# -*- coding: utf-8 -*- """ Created on Thu Sep 27 17:30:06 2018 @author: kennedy Wiley Online Library Help paper: https://onlinelibrary.wiley.com/doi/full/10.1111/coin.12158 """ __author__ = "<NAME>" __email__ = "<EMAIL>" __version__ = '1.0' import pandas as pd import numpy as np import os from sklear...
[ "pandas.Series", "os.path.exists", "nltk.corpus.stopwords.words", "pandas.read_csv", "sklearn.feature_extraction.text.TfidfVectorizer", "sklearn.feature_selection.SelectPercentile", "re.sub" ]
[((1081, 1106), 'os.path.exists', 'os.path.exists', (['self.path'], {}), '(self.path)\n', (1095, 1106), False, 'import os\n'), ((6343, 6360), 'sklearn.feature_extraction.text.TfidfVectorizer', 'TfidfVectorizer', ([], {}), '()\n', (6358, 6360), False, 'from sklearn.feature_extraction.text import TfidfVectorizer\n'), ((6...
from __future__ import print_function import json from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTClient from iot_config import * def connectIot(): myMQTTClient = AWSIoTMQTTClient(CLIENT_ID) myMQTTClient.configureEndpoint(IOT_ENDPOINT, IOT_PORT) myMQTTClient.configureCredentials(ROOT_CA, PRIVATE_KEY, CERTIFICATE) ...
[ "json.dumps", "AWSIoTPythonSDK.MQTTLib.AWSIoTMQTTClient" ]
[((165, 192), 'AWSIoTPythonSDK.MQTTLib.AWSIoTMQTTClient', 'AWSIoTMQTTClient', (['CLIENT_ID'], {}), '(CLIENT_ID)\n', (181, 192), False, 'from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTClient\n'), ((521, 548), 'json.dumps', 'json.dumps', (['event'], {'indent': '(2)'}), '(event, indent=2)\n', (531, 548), False, 'import jso...
import os import numpy as np import matplotlib.pyplot as plt from shape import Shape from visualize import visualize from normalize import normalize_data, normalize_shape from dataLoader import import_dataset, import_normalised_data from featureExtraction import * from featureMatching import * from utils import pick_f...
[ "os.getcwd", "visualize.visualize", "shape.Shape", "utils.pick_file", "normalize.normalize_shape", "numpy.load" ]
[((1420, 1442), 'normalize.normalize_shape', 'normalize_shape', (['shape'], {}), '(shape)\n', (1435, 1442), False, 'from normalize import normalize_data, normalize_shape\n'), ((2178, 2197), 'visualize.visualize', 'visualize', (['n_shapes'], {}), '(n_shapes)\n', (2187, 2197), False, 'from visualize import visualize\n'),...
# -*- coding: UTF-8 -*- # ------------------------(max to 80 columns)----------------------------------- # author by : (学员ID) # created: 2019.11 # Description: # 初步学习 WinForm 编程 ( Listbox ) # ------------------------(max to 80 columns)----------------------------------- import tkinter as tk from tkinter import tt...
[ "tkinter.Tk", "tkinter.Listbox", "tkinter.Scrollbar" ]
[((354, 361), 'tkinter.Tk', 'tk.Tk', ([], {}), '()\n', (359, 361), True, 'import tkinter as tk\n'), ((768, 789), 'tkinter.Scrollbar', 'tk.Scrollbar', (['top_win'], {}), '(top_win)\n', (780, 789), True, 'import tkinter as tk\n'), ((829, 893), 'tkinter.Listbox', 'tk.Listbox', (['top_win'], {'selectmode': 'tk.BROWSE', 'ys...
from visualization_msgs.msg import Marker from visualization_msgs.msg import MarkerArray from geometry_msgs.msg import Point from geometry_msgs.msg import Quaternion from geometry_msgs.msg import Vector3 from std_msgs.msg import ColorRGBA import rospy from matplotlib.patches import Rectangle class AABB: @staticmet...
[ "matplotlib.patches.Rectangle", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ]
[((1097, 1112), 'matplotlib.pyplot.subplots', 'plt.subplots', (['(1)'], {}), '(1)\n', (1109, 1112), True, 'import matplotlib.pyplot as plt\n'), ((1144, 1154), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (1152, 1154), True, 'import matplotlib.pyplot as plt\n'), ((812, 862), 'matplotlib.patches.Rectangle', 'R...
""" Classes to monitor the training """ from __future__ import absolute_import from __future__ import print_function from __future__ import division from six.moves import xrange from keras import backend as K from keras.callbacks import Callback from keras.models import model_from_json import sys import os import tim...
[ "os.path.isdir", "time.time", "keras.backend.set_value", "os.makedirs" ]
[((988, 999), 'time.time', 'time.time', ([], {}), '()\n', (997, 999), False, 'import time\n'), ((823, 882), 'keras.backend.set_value', 'K.set_value', (['self.model.optimizer.iteration', 'self.iteration'], {}), '(self.model.optimizer.iteration, self.iteration)\n', (834, 882), True, 'from keras import backend as K\n'), (...