code
stringlengths
20
1.04M
apis
list
extract_api
stringlengths
75
9.94M
from PyQt5.Qt import QLabel from PyQt5.Qt import QDialog from PyQt5.Qt import QMessageBox from PyQt5.Qt import QHBoxLayout from PyQt5.Qt import * from PyQt5.QtGui import * from PyQt5.QtCore import * import math from typing import List import numpy as np class CanvasBottomDateRuler: def __init__(self): ...
[ "math.floor" ]
[((1604, 1635), 'math.floor', 'math.floor', (['(mousex / guageWidth)'], {}), '(mousex / guageWidth)\n', (1614, 1635), False, 'import math\n'), ((2084, 2115), 'math.floor', 'math.floor', (['(mousex / guageWidth)'], {}), '(mousex / guageWidth)\n', (2094, 2115), False, 'import math\n'), ((2634, 2665), 'math.floor', 'math....
#! /usr/bin/env python3 # encoding: utf-8 #Python 3.0 import collections as c import time import math as m #import other modules as needed class PageRank: def __init__(self): self.tmatrix = [] def pagerank(self, input_file): # function to implement pagerank algorithm input_file - input file # that follows t...
[ "collections.defaultdict", "time.perf_counter", "math.fabs" ]
[((379, 398), 'time.perf_counter', 'time.perf_counter', ([], {}), '()\n', (396, 398), False, 'import time\n'), ((686, 705), 'time.perf_counter', 'time.perf_counter', ([], {}), '()\n', (703, 705), False, 'import time\n'), ((980, 998), 'collections.defaultdict', 'c.defaultdict', (['int'], {}), '(int)\n', (993, 998), True...
from django.db import models # Create your models here. class PizzaModel(models.Model): pizzaname = models.CharField(max_length = 30) desc = models.CharField(max_length = 100) price = models.FloatField() class CustomerModel(models.Model): userid = models.CharField(max_length = 10) email = models.E...
[ "django.db.models.CharField", "django.db.models.FloatField", "django.db.models.EmailField" ]
[((105, 136), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(30)'}), '(max_length=30)\n', (121, 136), False, 'from django.db import models\n'), ((150, 182), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)'}), '(max_length=100)\n', (166, 182), False, 'from django.db ...
# Copyright 2015 The Switch Authors. All rights reserved. # Licensed under the Apache License, Version 2, which is in the LICENSE file. """ This module describes fuel use with considerations of unit commitment and incremental heat rates using piecewise linear expressions. If you want to use this module directly in a ...
[ "csv.DictReader", "os.path.isfile", "switch_model.utilities.approx_equal", "os.path.join" ]
[((8958, 9008), 'os.path.join', 'os.path.join', (['inputs_dir', '"""gen_inc_heat_rates.csv"""'], {}), "(inputs_dir, 'gen_inc_heat_rates.csv')\n", (8970, 9008), False, 'import os\n'), ((9016, 9036), 'os.path.isfile', 'os.path.isfile', (['path'], {}), '(path)\n', (9030, 9036), False, 'import os\n'), ((11762, 11800), 'csv...
from screen import SWIDTH, SHEIGHT, pg, screen, InGame_FONT class Button: def __init__( self, text: str, center: tuple[int, int] = (SWIDTH // 2, SHEIGHT // 2), font: pg.font.Font = InGame_FONT, color="lightgray", ) -> None: """Initialize a new button Args...
[ "screen.screen.blit" ]
[((1258, 1328), 'screen.screen.blit', 'screen.blit', (['self.selected_surf', 'self.selected_rect_uninflated.topleft'], {}), '(self.selected_surf, self.selected_rect_uninflated.topleft)\n', (1269, 1328), False, 'from screen import SWIDTH, SHEIGHT, pg, screen, InGame_FONT\n'), ((1355, 1403), 'screen.screen.blit', 'screen...
# coding=utf-8 # Copyright (c) 2019, NVIDIA CORPORATION. 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 re...
[ "data_utils.get_tokenizer", "torch.cat", "torch.distributed.get_world_size", "torch.device", "pretrain_gpt2.initialize_distributed", "torch.cuda.current_device", "torch.no_grad", "os.path.join", "torch.distributed.get_rank", "mpu.get_model_parallel_world_size", "os.path.exists", "generation.in...
[((1577, 1592), 'pretrain_gpt2.get_model', 'get_model', (['args'], {}), '(args)\n', (1586, 1592), False, 'from pretrain_gpt2 import get_model\n'), ((2316, 2331), 'data_utils.get_tokenizer', 'get_tokenizer', ([], {}), '()\n', (2329, 2331), False, 'from data_utils import get_tokenizer\n'), ((2451, 2477), 'torch.cuda.Long...
import sys, os, time PACKAGE_PARENT = '../..' SCRIPT_DIR = os.path.dirname(os.path.realpath(os.path.join(os.getcwd(), os.path.expanduser(__file__)))) sys.path.append(os.path.normpath(os.path.join(SCRIPT_DIR, PACKAGE_PARENT))) from master_bot.master import Bot as runeBot player = runeBot(os.path.normpath(os.path.join(S...
[ "os.getcwd", "os.path.join", "os.path.expanduser" ]
[((183, 223), 'os.path.join', 'os.path.join', (['SCRIPT_DIR', 'PACKAGE_PARENT'], {}), '(SCRIPT_DIR, PACKAGE_PARENT)\n', (195, 223), False, 'import sys, os, time\n'), ((306, 346), 'os.path.join', 'os.path.join', (['SCRIPT_DIR', 'PACKAGE_PARENT'], {}), '(SCRIPT_DIR, PACKAGE_PARENT)\n', (318, 346), False, 'import sys, os,...
import json import sys import yaml from ludwig.utils.defaults import render_config inputs = sys.argv[1] with open(inputs, 'r') as handler: params = json.load(handler) config = {} # input features config['input_features'] = [] for ftr in params['input_features']['input_feature']: config['input_features'].appe...
[ "json.load", "yaml.dump", "ludwig.utils.defaults.render_config" ]
[((762, 791), 'ludwig.utils.defaults.render_config', 'render_config', (['config', 'output'], {}), '(config, output)\n', (775, 791), False, 'from ludwig.utils.defaults import render_config\n'), ((154, 172), 'json.load', 'json.load', (['handler'], {}), '(handler)\n', (163, 172), False, 'import json\n'), ((838, 904), 'yam...
"""Tools: np.sqrt() np.random.randn(n values) """ import numpy as np # make an array of 1 row, with 0 to 10 arr = np.arange(11) # take the square root of all values (view only) squareRootView = np.sqrt(arr) #print(squareRootView) # fill with 10 Random Values from a random normal distribution A = np.random.randn(10)...
[ "numpy.minimum", "numpy.maximum", "numpy.random.randn", "numpy.arange", "numpy.add", "numpy.sqrt" ]
[((116, 129), 'numpy.arange', 'np.arange', (['(11)'], {}), '(11)\n', (125, 129), True, 'import numpy as np\n'), ((197, 209), 'numpy.sqrt', 'np.sqrt', (['arr'], {}), '(arr)\n', (204, 209), True, 'import numpy as np\n'), ((301, 320), 'numpy.random.randn', 'np.random.randn', (['(10)'], {}), '(10)\n', (316, 320), True, 'im...
"""Check Python code String Formatting Style (SFS). This is a plugin for the tool flake8 tool for checking Python source code. """ import ast from flake8 import utils as stdin_utils __version__ = "0.0.3" plugin_prefix = "SFS" class StringFormatStyleChecker: """Checker of Python code for string formatting sty...
[ "ast.parse", "flake8.utils.stdin_get_value", "ast.walk" ]
[((1061, 1075), 'ast.walk', 'ast.walk', (['tree'], {}), '(tree)\n', (1069, 1075), False, 'import ast\n'), ((675, 704), 'flake8.utils.stdin_get_value', 'stdin_utils.stdin_get_value', ([], {}), '()\n', (702, 704), True, 'from flake8 import utils as stdin_utils\n'), ((724, 740), 'ast.parse', 'ast.parse', (['lines'], {}), ...
import pytest from .exemplar_generators import EXEMPLAR_CUSTOM_GENERATORS @pytest.mark.parametrize("g", EXEMPLAR_CUSTOM_GENERATORS) def test_spawn_custom_generators(g): """ Test that custom generators can be spawned and the spawned versions produce the same elements. """ num_items = 50 seed = 1234...
[ "pytest.mark.parametrize" ]
[((77, 133), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""g"""', 'EXEMPLAR_CUSTOM_GENERATORS'], {}), "('g', EXEMPLAR_CUSTOM_GENERATORS)\n", (100, 133), False, 'import pytest\n')]
from bisect import bisect_left, bisect_right import numpy from datetime import date, datetime import pytz from affine import Affine from netCDF4 import num2date, date2num, Variable from pyproj import Proj import six from trefoil.geometry.bbox import BBox from trefoil.utilities.window import Window from trefoil.netcdf...
[ "trefoil.geometry.bbox.BBox", "trefoil.utilities.window.Window", "netCDF4.date2num", "datetime.date", "numpy.searchsorted", "datetime.datetime", "numpy.append", "numpy.isclose", "numpy.arange", "numpy.array", "pyproj.Proj", "six.iteritems", "trefoil.netcdf.utilities.get_ncattrs", "netCDF4....
[((5168, 5196), 'six.iteritems', 'six.iteritems', (['self._ncattrs'], {}), '(self._ncattrs)\n', (5181, 5196), False, 'import six\n'), ((7425, 7453), 'six.iteritems', 'six.iteritems', (['self._ncattrs'], {}), '(self._ncattrs)\n', (7438, 7453), False, 'import six\n'), ((9568, 9729), 'trefoil.geometry.bbox.BBox', 'BBox', ...
"""Model (databate table) definitions.""" from . import db import datetime class Desk(db.Model): """Desk model.""" __tablename__ = 'desks' id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(6), unique=True) # One to many relationship to bookings bookings = db.relationship...
[ "datetime.datetime.now" ]
[((1254, 1277), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (1275, 1277), False, 'import datetime\n')]
#!/usr/bin/env python3 import argparse import ast import json import time import serial from bd_tools import boards, comms def parser_args(): parser = argparse.ArgumentParser( description="Upload calibration values to motor driver board(s)" ) parser.add_argument("serial", type=str, help="Serial...
[ "serial.Serial", "bd_tools.boards.loadCalibrationFromJSON", "json.load", "argparse.ArgumentParser", "bd_tools.comms.BLDCControllerClient", "time.sleep", "ast.literal_eval", "bd_tools.boards.initBoards" ]
[((160, 254), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Upload calibration values to motor driver board(s)"""'}), "(description=\n 'Upload calibration values to motor driver board(s)')\n", (183, 254), False, 'import argparse\n'), ((803, 872), 'serial.Serial', 'serial.Serial', ([]...
"""Parse and return mrunner gin-config and set-up Neptune.""" import atexit import datetime import functools import os import pickle import cloudpickle import neptune from alpacka import metric_logging from alpacka.batch_steppers import worker_utils def get_configuration(spec_path): """Get mrunner experiment s...
[ "neptune.init", "atexit.register", "neptune.create_experiment", "os.path.basename", "os.getcwd", "neptune.project.get_experiments", "neptune.get_experiment", "cloudpickle.load", "datetime.datetime.now" ]
[((2436, 2497), 'neptune.init', 'neptune.init', ([], {'project_qualified_name': "specification['project']"}), "(project_qualified_name=specification['project'])\n", (2448, 2497), False, 'import neptune\n'), ((2588, 2756), 'neptune.create_experiment', 'neptune.create_experiment', ([], {'name': "specification['name']", '...
""" simple io.StringIO based log intended to be used with different workers so that work is output in full blocks, where a block is a complete unit of work for the worker. """ import io __buffered_log__ = "" def init_slog(): global __buffered_log__ __buffered_log__ = io.StringIO("") return def slog(*arg...
[ "io.StringIO" ]
[((279, 294), 'io.StringIO', 'io.StringIO', (['""""""'], {}), "('')\n", (290, 294), False, 'import io\n')]
#!/usr/bin/env python # encoding: utf-8 # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache Licens...
[ "ec2stack.helpers.generate_signature", "ec2stack.helpers.read_file", "mock.patch", "mock.Mock" ]
[((1182, 1232), 'ec2stack.helpers.generate_signature', 'generate_signature', (['data', '"""POST"""', '"""localhost"""', '"""/"""'], {}), "(data, 'POST', 'localhost', '/')\n", (1200, 1232), False, 'from ec2stack.helpers import read_file, generate_signature\n'), ((1248, 1259), 'mock.Mock', 'mock.Mock', ([], {}), '()\n', ...
from os.path import dirname, abspath app_path = dirname(abspath(__file__)) app_name = 'DXFImporter' company_name = "Autodesk"
[ "os.path.abspath" ]
[((56, 73), 'os.path.abspath', 'abspath', (['__file__'], {}), '(__file__)\n', (63, 73), False, 'from os.path import dirname, abspath\n')]
#!/usr/bin/env python3 import argparse import os import sys from PIL import Image def cli_to_args(): """ converts the command line interface to a series of args """ cli = argparse.ArgumentParser(description="") cli.add_argument('-input_dir', type=str, required=True, ...
[ "os.listdir", "PIL.Image.new", "argparse.ArgumentParser", "PIL.Image.open" ]
[((189, 228), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '""""""'}), "(description='')\n", (212, 228), False, 'import argparse\n'), ((1173, 1199), 'os.listdir', 'os.listdir', (['args.input_dir'], {}), '(args.input_dir)\n', (1183, 1199), False, 'import os\n'), ((1692, 1752), 'PIL.Image.ne...
''' Created on 07-05-2013 @author: <NAME> <<EMAIL>> ''' import copy from aqopa.model import IdentifierExpression, CallFunctionExpression, TupleExpression,\ BooleanExpression, ComparisonExpression, TupleElementExpression from aqopa.simulator.error import RuntimeException class Populator(): def __init__(s...
[ "aqopa.model.TupleExpression", "aqopa.model.CallFunctionExpression", "copy.copy" ]
[((2135, 2209), 'aqopa.model.CallFunctionExpression', 'CallFunctionExpression', (['expression.function_name', 'arguments', 'qop_arguments'], {}), '(expression.function_name, arguments, qop_arguments)\n', (2157, 2209), False, 'from aqopa.model import IdentifierExpression, CallFunctionExpression, TupleExpression, Boolean...
import threading import time class TimeoutError(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value) class RecursionError(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.val...
[ "threading.RLock", "threading.Condition", "threading.current_thread", "time.time" ]
[((771, 788), 'threading.RLock', 'threading.RLock', ([], {}), '()\n', (786, 788), False, 'import threading\n'), ((814, 844), 'threading.Condition', 'threading.Condition', (['self.lock'], {}), '(self.lock)\n', (833, 844), False, 'import threading\n'), ((1499, 1510), 'time.time', 'time.time', ([], {}), '()\n', (1508, 151...
import smtplib from email.utils import formataddr from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart # Before using your email, please ensure that you have set you gmail account to enable "less secure apps" # Recheck this step that you have enabled the less secure app def send_emai...
[ "email.mime.multipart.MIMEMultipart", "email.utils.formataddr", "email.mime.text.MIMEText", "smtplib.SMTP" ]
[((354, 389), 'smtplib.SMTP', 'smtplib.SMTP', (['"""smtp.gmail.com"""', '(587)'], {}), "('smtp.gmail.com', 587)\n", (366, 389), False, 'import smtplib\n'), ((650, 665), 'email.mime.multipart.MIMEMultipart', 'MIMEMultipart', ([], {}), '()\n', (663, 665), False, 'from email.mime.multipart import MIMEMultipart\n'), ((795,...
# Class for timing functions import time import logging import typing import uuid class Anchor: def __init__(self): self.start = time.time() self.end = None self.id = uuid.uuid4() def end_anchor(self): self.end = time.time() def get_start(self) -> float: return sel...
[ "logging.warning", "logging.error", "uuid.uuid4", "time.time" ]
[((142, 153), 'time.time', 'time.time', ([], {}), '()\n', (151, 153), False, 'import time\n'), ((196, 208), 'uuid.uuid4', 'uuid.uuid4', ([], {}), '()\n', (206, 208), False, 'import uuid\n'), ((255, 266), 'time.time', 'time.time', ([], {}), '()\n', (264, 266), False, 'import time\n'), ((514, 571), 'logging.error', 'logg...
# -*- coding: utf-8 -*- """ Created on 19/11/18 Author : <NAME> Run ellipse into image to determine regions to combine spectra. """ from __future__ import print_function, division import os import numpy as np from astropy.io import fits from astropy.table import Table from astropy.modeling.models import Ellipse2...
[ "os.mkdir", "numpy.nanmedian", "photutils.isophote.Ellipse", "astropy.io.fits.PrimaryHDU", "numpy.isnan", "astropy.io.fits.Header", "numpy.arange", "astropy.io.fits.HDUList", "os.path.join", "os.chdir", "numpy.unique", "numpy.nanmean", "photutils.isophote.build_ellipse_model", "astropy.io....
[((736, 758), 'astropy.io.fits.getdata', 'fits.getdata', (['maskfile'], {}), '(maskfile)\n', (748, 758), False, 'from astropy.io import fits\n'), ((812, 829), 'astropy.io.fits.getdata', 'fits.getdata', (['img'], {}), '(img)\n', (824, 829), False, 'from astropy.io import fits\n'), ((841, 859), 'numpy.nanmedian', 'np.nan...
from datetime import datetime from django.views.generic import TemplateView from elections.models import Election class HomeView(TemplateView): template_name = "home.html" def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) election_qs = Election.public_objec...
[ "elections.models.Election.public_objects.all", "datetime.datetime.today" ]
[((299, 328), 'elections.models.Election.public_objects.all', 'Election.public_objects.all', ([], {}), '()\n', (326, 328), False, 'from elections.models import Election\n'), ((454, 470), 'datetime.datetime.today', 'datetime.today', ([], {}), '()\n', (468, 470), False, 'from datetime import datetime\n')]
# -*- coding: utf-8 -*- # Standard imports import datetime import os import os.path import codecs # Non standard imports (see requirements.txt) import click import jinja2 from shapely.geometry import shape from shapely.ops import unary_union from shapely.ops import transform # Fiona should be imported after shapely -...
[ "yaml.load", "shapely.ops.unary_union", "utils.get_geometry_from_file", "shapely.ops.transform", "click.option", "click.echo", "os.path.isfile", "utils.prettify_xml", "click.Path", "os.path.join", "shapely.geometry.shape", "codecs.open", "os.path.dirname", "click.command", "click.Choice"...
[((542, 557), 'click.command', 'click.command', ([], {}), '()\n', (555, 557), False, 'import click\n'), ((559, 653), 'click.option', 'click.option', (['"""-v"""', '"""--verbose"""'], {'is_flag': '(True)', 'default': '(False)', 'help': '"""Enables verbose mode"""'}), "('-v', '--verbose', is_flag=True, default=False, hel...
# -*- coding: utf-8 -*- """Test for music_services/data_structures""" from __future__ import unicode_literals, print_function from collections import OrderedDict import pytest from mock import PropertyMock, Mock, patch from soco.music_services import data_structures from soco.data_structures import DidlResource # D...
[ "soco.music_services.data_structures.get_class", "soco.music_services.data_structures.MetadataDictBase", "mock.patch", "soco.music_services.data_structures.parse_response", "soco.music_services.data_structures.bool_str", "soco.music_services.data_structures.MusicServiceItem", "soco.music_services.data_s...
[((3258, 3305), 'soco.music_services.data_structures.get_class', 'data_structures.get_class', (['"""MediaMetadataTrack"""'], {}), "('MediaMetadataTrack')\n", (3283, 3305), False, 'from soco.music_services import data_structures\n'), ((3472, 3522), 'soco.music_services.data_structures.get_class', 'data_structures.get_cl...
# Dependencies from io import BytesIO import json import os import requests import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np from PIL import Image #Pytorch import torch import torch.optim as optim from torchvision import transforms, models from flask import request # Flask fro...
[ "torch.mean", "os.remove", "numpy.uint8", "models.VGG", "os.path.dirname", "matplotlib.use", "flask_socketio.emit", "torch.optim.Adam", "matplotlib.pyplot.savefig" ]
[((95, 116), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (109, 116), False, 'import matplotlib\n'), ((417, 422), 'models.VGG', 'VGG', ([], {}), '()\n', (420, 422), False, 'from models import VGG\n'), ((460, 485), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (475, 4...
from datetime import timedelta from django.utils import timezone from quedadas.controllers import firebaseCtrl from quedadas.models import Feed, Meeting, Tracking def ban_request(requestor, user): if user.prof.ban_date is None: user.prof.ban_count.add(requestor) if user.prof.ban_count.count() >=...
[ "quedadas.controllers.firebaseCtrl.un_baned", "django.utils.timezone.now", "quedadas.models.Meeting.objects.filter", "quedadas.models.Feed", "datetime.timedelta", "quedadas.models.Tracking.objects.filter", "quedadas.controllers.firebaseCtrl.baned" ]
[((569, 602), 'quedadas.controllers.firebaseCtrl.un_baned', 'firebaseCtrl.un_baned', (['baned.user'], {}), '(baned.user)\n', (590, 602), False, 'from quedadas.controllers import firebaseCtrl\n'), ((473, 500), 'quedadas.controllers.firebaseCtrl.baned', 'firebaseCtrl.baned', (['user', '(7)'], {}), '(user, 7)\n', (491, 50...
import taskloaf as tsk import logging async def submit(): gang = await tsk.ctx().wait_for_workers(2) X = 3.1 n = 10 pr = tsk.task(lambda: tsk.task(lambda: X)) for i in range(n): pr = pr.then(lambda x: x + 1) async def asum(x): return sum(x) pr = tsk.when_all([pr, tsk.task...
[ "taskloaf.zmq_run", "taskloaf.ctx", "taskloaf.task", "taskloaf.Cfg" ]
[((429, 460), 'taskloaf.Cfg', 'tsk.Cfg', ([], {'log_level': 'logging.WARN'}), '(log_level=logging.WARN)\n', (436, 460), True, 'import taskloaf as tsk\n'), ((465, 495), 'taskloaf.zmq_run', 'tsk.zmq_run', ([], {'cfg': 'cfg', 'f': 'submit'}), '(cfg=cfg, f=submit)\n', (476, 495), True, 'import taskloaf as tsk\n'), ((156, 1...
import os import csv import glob import traceback from cassandra.cluster import Cluster from cql_queries import * #%% Insert data into tables def process_data(data_folder, generated_file): """Process and combine all the CSV files in the directory passed, and save it with the filename passed (generated_file)....
[ "csv.reader", "csv.writer", "os.getcwd", "os.walk", "traceback.format_exc", "cassandra.cluster.Cluster", "csv.register_dialect", "os.path.join" ]
[((719, 736), 'os.walk', 'os.walk', (['filepath'], {}), '(filepath)\n', (726, 736), False, 'import os\n'), ((1121, 1200), 'csv.register_dialect', 'csv.register_dialect', (['"""myDialect"""'], {'quoting': 'csv.QUOTE_ALL', 'skipinitialspace': '(True)'}), "('myDialect', quoting=csv.QUOTE_ALL, skipinitialspace=True)\n", (1...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from maro.cli.utils.details_validity_wrapper import check_details_validity from maro.cli.utils.operation_lock_wrapper import operation_lock @check_details_validity @operation_lock def clean(cluster_name: str, **kwargs): # Late import. ...
[ "maro.cli.grass.executors.grass_azure_executor.GrassAzureExecutor", "maro.cli.utils.details_reader.DetailsReader.load_cluster_details", "maro.utils.exception.cli_exception.BadRequestError" ]
[((547, 608), 'maro.cli.utils.details_reader.DetailsReader.load_cluster_details', 'DetailsReader.load_cluster_details', ([], {'cluster_name': 'cluster_name'}), '(cluster_name=cluster_name)\n', (581, 608), False, 'from maro.cli.utils.details_reader import DetailsReader\n'), ((678, 723), 'maro.cli.grass.executors.grass_a...
#!/usr/local/bin/python3 """ Users Page class. """ # Check if using local environment from os import getenv from admin.users.page_create_user import PageCreateUser from admin.users.page_user_information import PageUserInformation from page_menu import PageMenu from selenium.webdriver.support.ui import WebDriverWait...
[ "selenium.webdriver.support.expected_conditions.visibility_of_element_located", "admin.users.page_create_user.PageCreateUser", "page_menu.PageMenu", "admin.users.page_user_information.PageUserInformation", "selenium.webdriver.support.ui.WebDriverWait" ]
[((1189, 1214), 'selenium.webdriver.support.ui.WebDriverWait', 'WebDriverWait', (['driver', '(10)'], {}), '(driver, 10)\n', (1202, 1214), False, 'from selenium.webdriver.support.ui import WebDriverWait, Select\n'), ((1607, 1685), 'selenium.webdriver.support.expected_conditions.visibility_of_element_located', 'EC.visibi...
# -*- coding: utf-8 -*- # MIT License # # Copyright 2018-2022 New York University <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 t...
[ "unicodedata.category", "emoji.EMOJI_DATA.keys" ]
[((2162, 2189), 'unicodedata.category', 'unicodedata.category', (['x_chr'], {}), '(x_chr)\n', (2182, 2189), False, 'import unicodedata\n'), ((3111, 3128), 'emoji.EMOJI_DATA.keys', 'EMOJI_DATA.keys', ([], {}), '()\n', (3126, 3128), False, 'from emoji import EMOJI_DATA\n')]
### Example script showing how to perform a weighted 2D Total-Variation filtering with proxTV import prox_tv as ptv import numpy as np import matplotlib.pyplot as plt import time import skimage as ski from skimage import io, color, util # Load image X = io.imread('colors.png') X = ski.img_as_float(X) X = color.rgb2gra...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.subplot", "skimage.color.rgb2gray", "matplotlib.pyplot.show", "skimage.util.random_noise", "numpy.ones", "time.time", "skimage.img_as_float", "skimage.io.imshow", "prox_tv.tv1w_2d", "skimage.io.imread" ]
[((255, 278), 'skimage.io.imread', 'io.imread', (['"""colors.png"""'], {}), "('colors.png')\n", (264, 278), False, 'from skimage import io, color, util\n'), ((283, 302), 'skimage.img_as_float', 'ski.img_as_float', (['X'], {}), '(X)\n', (299, 302), True, 'import skimage as ski\n'), ((307, 324), 'skimage.color.rgb2gray',...
import pytest import os.path @pytest.fixture(autouse=True) def ensure_gpg_homedir(monkeypatch): home = FIXTURE = os.path.join( os.path.dirname(__file__), 'secrets', 'tests', 'fixture', 'gnupg') monkeypatch.setitem(os.environ, "GNUPGHOME", home)
[ "pytest.fixture" ]
[((32, 60), 'pytest.fixture', 'pytest.fixture', ([], {'autouse': '(True)'}), '(autouse=True)\n', (46, 60), False, 'import pytest\n')]
import logging import queue import threading from typing import Generator from unittest.mock import Mock import pytest import shared import singletons JOIN_TIMEOUT = 2 THREADS = 8 LOG = logging.getLogger(__name__) @pytest.fixture() def _mock_shared() -> Generator: """Mock ``shared`` fixture.""" shared.setup...
[ "queue.Queue", "threading.Thread", "shared.setup_mock", "pytest.fixture", "logging.getLogger", "shared.global_object", "pytest.raises", "shared.thread_object", "shared.teardown_mock", "pytest.mark.usefixtures" ]
[((188, 215), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (205, 215), False, 'import logging\n'), ((219, 235), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (233, 235), False, 'import pytest\n'), ((566, 605), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""_mock_sha...
""" A pipleline that runs three modules 1. training 2. prediction 3. performance assessment. This script uses triplanar patches with multiple scales as input. """ import os import sys import time import glob import shutil import nibabel as nib from keras.optimizers import ( SGD, Adam, Adagrad, Adadelta...
[ "keras.optimizers.SGD", "shutil.copy2", "train_triplanar.train_triplanar", "os.path.exists", "time.time", "assess_segmentation.compute_performance", "glob.glob", "segmentation_triplanar.segment_triplanar", "shutil.rmtree", "utils.utils.change_parent_dir" ]
[((1184, 1239), 'keras.optimizers.SGD', 'SGD', ([], {'lr': '(0.05)', 'momentum': '(0.5)', 'decay': '(1e-06)', 'nesterov': '(False)'}), '(lr=0.05, momentum=0.5, decay=1e-06, nesterov=False)\n', (1187, 1239), False, 'from keras.optimizers import SGD, Adam, Adagrad, Adadelta\n'), ((2053, 2064), 'time.time', 'time.time', (...
import os import time import json import logging import asyncio import requests # to download iso image from clint.textui import progress # show progress bar while downloading image from aiohttp import web # web-server for ks-file import virtualbox from virtualbox.library import AccessMode, DeviceType, StorageCont...
[ "os.listdir", "os.path.abspath", "asyncio.get_event_loop", "os.path.join", "virtualbox.VirtualBox", "os.path.basename", "os.path.isdir", "os.makedirs", "os.path.exists", "time.sleep", "os.path.normpath", "requests.get", "clint.textui.progress.wait_for_completion", "virtualbox.Session", "...
[((453, 476), 'virtualbox.VirtualBox', 'virtualbox.VirtualBox', ([], {}), '()\n', (474, 476), False, 'import virtualbox\n'), ((2247, 2273), 'os.path.abspath', 'os.path.abspath', (['host_path'], {}), '(host_path)\n', (2262, 2273), False, 'import os\n'), ((3924, 3941), 'aiohttp.web.Application', 'web.Application', ([], {...
import time from math import inf class Node: def __init__(self,board,parent,g,h,f): self.board = tuple(board) self.parent = parent self.g = g # moves so far self.h = h # estimate of distance to goal self.f = f # cost of current node ( g + h) def __lt__(self,other): ...
[ "time.perf_counter" ]
[((10417, 10436), 'time.perf_counter', 'time.perf_counter', ([], {}), '()\n', (10434, 10436), False, 'import time\n'), ((10580, 10599), 'time.perf_counter', 'time.perf_counter', ([], {}), '()\n', (10597, 10599), False, 'import time\n')]
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2018-07-04 09:43:51 # @Author : <NAME> (<EMAIL>) # @Link : http://iridescent.ink # @Version : $1.1$ from matplotlib import pyplot as plt import matplotlib.cm as cm from improc.blkptcs import imgs2ptcs, showblks import numpy as np patchSize = [128, 128, 3...
[ "matplotlib.pyplot.subplot", "improc.blkptcs.showblks", "matplotlib.pyplot.show", "matplotlib.pyplot.imshow", "matplotlib.pyplot.figure", "numpy.random.randint", "improc.blkptcs.imgs2ptcs" ]
[((509, 553), 'improc.blkptcs.imgs2ptcs', 'imgs2ptcs', (['imgspathes', 'patchSize', 'numPatches'], {}), '(imgspathes, patchSize, numPatches)\n', (518, 553), False, 'from improc.blkptcs import imgs2ptcs, showblks\n'), ((597, 610), 'matplotlib.pyplot.figure', 'plt.figure', (['(0)'], {}), '(0)\n', (607, 610), True, 'from ...
# coding:utf-8 import os import fnmatch import errno import shutil import subprocess import json from jinja2 import Environment, FileSystemLoader from config import NGINX_CONF_PATH, DOMAIN from log import logger NGINX_CONFD_BUFFER = os.path.join(NGINX_CONF_PATH, "buffer/conf.d") NGINX_UPSTREAMS_BUFFER = os.path.join(...
[ "log.logger.debug", "os.remove", "os.makedirs", "json.loads", "shutil.rmtree", "os.path.isdir", "log.logger.warning", "os.path.dirname", "log.logger.error", "jinja2.FileSystemLoader", "os.path.isfile", "os.path.islink", "subprocess.call", "fnmatch.fnmatch", "os.path.join", "os.listdir"...
[((235, 281), 'os.path.join', 'os.path.join', (['NGINX_CONF_PATH', '"""buffer/conf.d"""'], {}), "(NGINX_CONF_PATH, 'buffer/conf.d')\n", (247, 281), False, 'import os\n'), ((307, 356), 'os.path.join', 'os.path.join', (['NGINX_CONF_PATH', '"""buffer/upstreams"""'], {}), "(NGINX_CONF_PATH, 'buffer/upstreams')\n", (319, 35...
import cv2 import numpy as np img = cv2.imread(r"1.jpg") # cv2.line(img, (100, 30), (210, 180), color=(0, 0, 255), thickness=2) # cv2.circle(img, (50, 50), 30, (0, 0, 255), 2) # cv2.rectangle(img, (100, 30), (210, 180), color=(0, 0, 255), thickness=2) # cv2.ellipse(img, (100, 100), (100, 50), 0, 0, 360, (255, 0, 0), ...
[ "cv2.waitKey", "cv2.imread", "cv2.imshow", "cv2.putText" ]
[((37, 56), 'cv2.imread', 'cv2.imread', (['"""1.jpg"""'], {}), "('1.jpg')\n", (47, 56), False, 'import cv2\n'), ((476, 592), 'cv2.putText', 'cv2.putText', (['img', '"""beautiful girl"""', '(10, 30)', 'cv2.FONT_HERSHEY_SIMPLEX', '(1)', '(0, 0, 255)', '(1)'], {'lineType': 'cv2.LINE_AA'}), "(img, 'beautiful girl', (10, 30...
# Copyright (c) 2020 The Khronos Group 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 ...
[ "numpy.random.uniform", "numpy.random.seed", "argparse.ArgumentParser", "nnef.write_tensor", "numpy.random.normal", "os.path.split", "os.path.join" ]
[((2618, 2643), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (2641, 2643), False, 'import argparse\n'), ((931, 965), 'numpy.random.uniform', 'np.random.uniform', (['min', 'max', 'shape'], {}), '(min, max, shape)\n', (948, 965), True, 'import numpy as np\n'), ((1020, 1054), 'numpy.random.norma...
#!/usr/bin/env python3 import os, sys, shutil, re, textwrap COMPILER = "~/djgpp/bin/i586-pc-msdosdjgpp-gcc" SRC_DIR = "src" BIN_DIR = "bin" BIN_NAME = "love.exe" EMBED_DIR = "src/embed" TEMPSRC_DIR = ".tempsrc" CFLAGS = [ "-O2", "-Wall", "-s", "-Wno-misleading-indentation" ] DLIBS = [ "m" ] DEF...
[ "textwrap.fill", "os.makedirs", "os.path.basename", "os.walk", "os.path.exists", "os.system", "shutil.rmtree", "os.path.join", "os.chdir" ]
[((873, 894), 'os.chdir', 'os.chdir', (['sys.path[0]'], {}), '(sys.path[0])\n', (881, 894), False, 'import os, sys, shutil, re, textwrap\n'), ((1849, 1863), 'os.system', 'os.system', (['cmd'], {}), '(cmd)\n', (1858, 1863), False, 'import os, sys, shutil, re, textwrap\n'), ((1909, 1936), 'os.path.exists', 'os.path.exist...
import pytest from wallpaper import get_wallpaper, set_wallpaper import platform import os real_path = os.path.realpath(__file__) wallpaper_path = os.path.join(os.path.dirname(real_path), 'bg.jpg') @pytest.mark.mac def test_get_wallpaper(): result_str = get_wallpaper() assert type(result_str) == str resul...
[ "wallpaper.get_wallpaper", "os.path.realpath", "os.path.dirname", "pytest.raises", "wallpaper.set_wallpaper" ]
[((104, 130), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (120, 130), False, 'import os\n'), ((161, 187), 'os.path.dirname', 'os.path.dirname', (['real_path'], {}), '(real_path)\n', (176, 187), False, 'import os\n'), ((260, 275), 'wallpaper.get_wallpaper', 'get_wallpaper', ([], {}), '()\...
""" Utilites to produce examples based off of args. """ import functools import itertools import random import re import typing import discord from discord.ext import commands from . import varpos from .commands import all_qualified_names __all__ = ['command_example', 'get_example', 'static_example', 'wrap_example'...
[ "functools.partial", "json.load", "random.randint", "typing.get_type_hints", "random.choice", "itertools.takewhile", "itertools.dropwhile", "logging.getLogger", "re.compile" ]
[((4857, 4913), 'functools.partial', 'functools.partial', (['commands.Command._get_converter', 'None'], {}), '(commands.Command._get_converter, None)\n', (4874, 4913), False, 'import functools\n'), ((4999, 5040), 're.compile', 're.compile', (['f"""\\\\\\\\(.)|({_quote_pattern})"""'], {}), "(f'\\\\\\\\(.)|({_quote_patte...
import numpy as np from dipy.denoise import nlmeans_block """ Functions for Wavelet Transforms in 3D domain Code adapted from WAVELET SOFTWARE AT POLYTECHNIC UNIVERSITY, BROOKLYN, NY http://taco.poly.edu/WaveletSoftware/ """ def cshift3D(x, m, d): """3D Circular Shift Parameters ---------- x :...
[ "numpy.zeros", "dipy.denoise.nlmeans_block.upfir", "dipy.denoise.nlmeans_block.firdn", "numpy.array" ]
[((658, 687), 'numpy.array', 'np.array', (['idx'], {'dtype': 'np.int64'}), '(idx, dtype=np.int64)\n', (666, 687), True, 'import numpy as np\n'), ((1996, 2026), 'numpy.zeros', 'np.zeros', (['(L + n1Half, N2, N3)'], {}), '((L + n1Half, N2, N3))\n', (2004, 2026), True, 'import numpy as np\n'), ((2036, 2066), 'numpy.zeros'...
import os from spaceone.inventory.libs.common_parser import * from spaceone.inventory.libs.schema.dynamic_widget import ChartWidget, CardWidget from spaceone.inventory.libs.schema.dynamic_field import TextDyField, BadgeDyField, ListDyField, SearchField, SizeField from spaceone.inventory.libs.schema.resource import Clou...
[ "spaceone.inventory.libs.schema.dynamic_field.ListDyField.data_source", "spaceone.inventory.libs.schema.dynamic_field.SearchField.set", "spaceone.inventory.libs.schema.resource.CloudServiceTypeResource", "spaceone.inventory.libs.schema.dynamic_field.SizeField.data_source", "os.path.dirname", "spaceone.inv...
[((490, 542), 'os.path.join', 'os.path.join', (['current_dir', '"""widget/total_count.yaml"""'], {}), "(current_dir, 'widget/total_count.yaml')\n", (502, 542), False, 'import os\n'), ((566, 622), 'os.path.join', 'os.path.join', (['current_dir', '"""widget/code_total_size.yaml"""'], {}), "(current_dir, 'widget/code_tota...
"""Tests for the utillib library.""" # stdlib import logging from pathlib import Path # external import numpy as np # project from payload_designer.libs import utillib LOG = logging.getLogger(__name__) def test_LUT_call(): """Test the LUT class call method.""" lut_data = Path("data/test_LUT.csv") lut...
[ "numpy.linspace", "pathlib.Path", "logging.getLogger", "payload_designer.libs.utillib.LUT" ]
[((178, 205), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (195, 205), False, 'import logging\n'), ((286, 311), 'pathlib.Path', 'Path', (['"""data/test_LUT.csv"""'], {}), "('data/test_LUT.csv')\n", (290, 311), False, 'from pathlib import Path\n'), ((323, 344), 'payload_designer.libs.uti...
# --- default imports --- import os # --- load utils --- from WGALP.utils.commandLauncher import run_sp from WGALP.step import Step description = """ Run bwa index """ input_description = """ a fasta file to be indexed """ output_description = """ No output is necessary, index files are created in the same folder of...
[ "WGALP.step.Step", "WGALP.utils.commandLauncher.run_sp" ]
[((432, 483), 'WGALP.step.Step', 'Step', (['name', 'rootpath'], {'execution_mode': 'execution_mode'}), '(name, rootpath, execution_mode=execution_mode)\n', (436, 483), False, 'from WGALP.step import Step\n'), ((973, 994), 'WGALP.utils.commandLauncher.run_sp', 'run_sp', (['step', 'command'], {}), '(step, command)\n', (9...
from collections import namedtuple, Counter, defaultdict import sys import os import autopep8 from io import StringIO from functools import reduce CALL_DATA = namedtuple( "CallData", ["args", "kwargs", "output", "function", "dependencies"]) GETATTR_DATA = namedtuple("GetAttrData", ["name", "output"]) SETATTR_DATA ...
[ "io.StringIO", "os.getcwd", "collections.defaultdict", "collections.namedtuple", "collections.Counter" ]
[((160, 245), 'collections.namedtuple', 'namedtuple', (['"""CallData"""', "['args', 'kwargs', 'output', 'function', 'dependencies']"], {}), "('CallData', ['args', 'kwargs', 'output', 'function', 'dependencies']\n )\n", (170, 245), False, 'from collections import namedtuple, Counter, defaultdict\n'), ((261, 306), 'co...
from Songlist import Songlist class Songpool(Songlist): def __init__(self): super().__init__("Songpool") self.preview = Songlist("SongpoolPreview") self.settings_screen = None def hide_songs(self, condition="song.group > 1"): ''' Hide songs to the user if condition is true ...
[ "Songlist.Songlist" ]
[((143, 170), 'Songlist.Songlist', 'Songlist', (['"""SongpoolPreview"""'], {}), "('SongpoolPreview')\n", (151, 170), False, 'from Songlist import Songlist\n')]
from aiohttp import web_request from typing import Callable, Any, Coroutine from collections import OrderedDict from guillotina.interfaces import IDefaultLayer from guillotina.interfaces import IRequest from guillotina.profile import profilable from typing import Dict from zope.interface import implementer import asyn...
[ "asyncio.gather", "uuid.uuid4", "zope.interface.implementer", "time.time", "asyncio.iscoroutine", "collections.OrderedDict" ]
[((351, 387), 'zope.interface.implementer', 'implementer', (['IRequest', 'IDefaultLayer'], {}), '(IRequest, IDefaultLayer)\n', (362, 387), False, 'from zope.interface import implementer\n'), ((1129, 1142), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (1140, 1142), False, 'from collections import OrderedD...
# -*- coding: utf-8 -*- # Copyright (c) 2020, Caitlah Technology and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class WarrantofFitness(Document): def on_submit(self): self.update_vehicl...
[ "frappe.get_value", "frappe.db.set_value", "frappe.new_doc" ]
[((406, 448), 'frappe.new_doc', 'frappe.new_doc', (['"""Warrant of Fitness Table"""'], {}), "('Warrant of Fitness Table')\n", (420, 448), False, 'import frappe\n'), ((922, 974), 'frappe.db.set_value', 'frappe.db.set_value', (['"""Warrant of Fitness"""', 'self.name'], {}), "('Warrant of Fitness', self.name)\n", (941, 97...
import numpy as np from .pyopenms_wrapper import calculate_abundance from .pyopenms_wrapper import filter_spectrum from .peak_detection import find_ms_peaks from .peak_detection import deconvolute_spectrum from .peak_detection import embed_spectrum from .smoothing import moving_average def get_relative_abundance( ...
[ "numpy.where", "numpy.sum" ]
[((1321, 1352), 'numpy.where', 'np.where', (['((mz > lb) & (mz < ub))'], {}), '((mz > lb) & (mz < ub))\n', (1329, 1352), True, 'import numpy as np\n'), ((1377, 1419), 'numpy.sum', 'np.sum', (['intensities[:, indices[0]]'], {'axis': '(1)'}), '(intensities[:, indices[0]], axis=1)\n', (1383, 1419), True, 'import numpy as ...
from django.db import models from django.contrib.auth.models import AbstractUser # Create your models here. class User(AbstractUser): first_name = models.CharField(max_length=50, null=True) last_name = models.CharField(max_length=50, null=True) email = models.CharField(max_length=50, unique=True) REQ...
[ "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.EmailField", "django.db.models.IntegerField", "django.db.models.DateField" ]
[((153, 195), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(50)', 'null': '(True)'}), '(max_length=50, null=True)\n', (169, 195), False, 'from django.db import models\n'), ((212, 254), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(50)', 'null': '(True)'}), '(max_lengt...
#!/usr/bin/env python3 # Copyright 2021 Canonical Ltd. # See LICENSE file for licensing details. """A juju charm for Grafana Agent on Kubernetes.""" import logging import yaml from charms.loki_k8s.v0.log_proxy import LogProxyProvider from charms.loki_k8s.v0.loki_push_api import ( LokiPushApiConsumer, LokiP...
[ "requests.packages.urllib3.util.retry.Retry", "charms.loki_k8s.v0.loki_push_api.LokiPushApiConsumer", "charms.prometheus_k8s.v0.prometheus_scrape.MetricsEndpointConsumer", "kubernetes_service.K8sServicePatch.set_ports", "ops.model.WaitingStatus", "requests.adapters.HTTPAdapter", "requests.Session", "c...
[((999, 1026), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1016, 1026), False, 'import logging\n'), ((1426, 1439), 'ops.framework.StoredState', 'StoredState', ([], {}), '()\n', (1437, 1439), False, 'from ops.framework import EventBase, StoredState\n'), ((12776, 12807), 'ops.main.main'...
""" Tornado handler for the browse page """ from __future__ import print_function import sys import os import json import sqlite3 import tornado.web # this is needed for the following imports sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../plot_app')) from config import get_db_filename fr...
[ "config.get_db_filename", "db_entry.DBData", "os.path.realpath", "helper.get_airframe_data", "json.dumps", "helper.html_long_word_force_break" ]
[((238, 264), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (254, 264), False, 'import os\n'), ((1133, 1150), 'config.get_db_filename', 'get_db_filename', ([], {}), '()\n', (1148, 1150), False, 'from config import get_db_filename\n'), ((1530, 1538), 'db_entry.DBData', 'DBData', ([], {}), '...
import io from glob import glob from os.path import basename, dirname, join, splitext from setuptools import setup, find_packages from src.lpconnector import __version__ def read(fname): return io.open(join(dirname(__file__), fname)).read() setup( name="lpconnector", version=__version__, url="https:...
[ "os.path.basename", "os.path.dirname", "setuptools.find_packages", "glob.glob" ]
[((757, 777), 'setuptools.find_packages', 'find_packages', (['"""src"""'], {}), "('src')\n", (770, 777), False, 'from setuptools import setup, find_packages\n'), ((864, 880), 'glob.glob', 'glob', (['"""src/*.py"""'], {}), "('src/*.py')\n", (868, 880), False, 'from glob import glob\n'), ((213, 230), 'os.path.dirname', '...
import numpy as np from .activations import relu, relu_derivative from .convolution import convolve2d from .layer_base import BaseLayer class Convolution2D(BaseLayer): """ Implementation of 2D convolution layer """ def __init__(self, filters, kernel_shape, input_shape=None, strides=(1, 1), ...
[ "numpy.multiply", "numpy.sum", "numpy.copy", "numpy.random.randn", "numpy.array", "numpy.repeat" ]
[((530, 552), 'numpy.array', 'np.array', (['kernel_shape'], {}), '(kernel_shape)\n', (538, 552), True, 'import numpy as np\n'), ((655, 676), 'numpy.array', 'np.array', (['input_shape'], {}), '(input_shape)\n', (663, 676), True, 'import numpy as np\n'), ((1817, 1847), 'numpy.array', 'np.array', (['self.input_shape[1:]']...
import requests from bs4 import BeautifulSoup from urllib.parse import urljoin import pandas as pd import unicodedata import re import matplotlib.pyplot as plt import numpy as np import json import seaborn as sns import csv URL = "https://handbook.unimelb.edu.au/search?types%5B%5D=subject&year=2021&subject_level_type...
[ "bs4.BeautifulSoup", "csv.writer", "requests.get" ]
[((549, 565), 'csv.writer', 'csv.writer', (['file'], {}), '(file)\n', (559, 565), False, 'import csv\n'), ((655, 672), 'requests.get', 'requests.get', (['URL'], {}), '(URL)\n', (667, 672), False, 'import requests\n'), ((688, 727), 'bs4.BeautifulSoup', 'BeautifulSoup', (['r.content', '"""html.parser"""'], {}), "(r.conte...
# MIT License # # Copyright (c) 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, modify, merge, publi...
[ "pandas.DataFrame" ]
[((1996, 2013), 'pandas.DataFrame', 'pd.DataFrame', (['raw'], {}), '(raw)\n', (2008, 2013), True, 'import pandas as pd\n')]
# -*- coding: utf-8 -*- from django.db import models from django.conf import settings from django.utils.translation import ugettext as _ class Event(models.Model): """ Stores a single event """ title = models.CharField(_('Title'), max_length=120) language = models.CharField( _('Language')...
[ "django.db.models.TextField", "django.utils.translation.ugettext" ]
[((838, 866), 'django.db.models.TextField', 'models.TextField', ([], {'default': '""""""'}), "(default='')\n", (854, 866), False, 'from django.db import models\n'), ((238, 248), 'django.utils.translation.ugettext', '_', (['"""Title"""'], {}), "('Title')\n", (239, 248), True, 'from django.utils.translation import ugette...
# https://overpass-turbo.eu/ exports GeoJSON # josm can also export to GeoJSON # convert GeoJSON Points to gpx waypoints # convert GeoJSON Polygons to a single gpx waypoint based on centroid of the polygon vertices # convert GeoJSON LineStrings to a gpx track import sys from statistics import mean import geojson impor...
[ "gpxpy.gpx.GPXWaypoint", "gpxpy.gpx.GPX", "gpxpy.gpx.GPXTrack", "statistics.mean", "gpxpy.gpx.GPXTrackPoint", "gpxpy.gpx.GPXTrackSegment" ]
[((405, 420), 'gpxpy.gpx.GPX', 'gpxpy.gpx.GPX', ([], {}), '()\n', (418, 420), False, 'import gpxpy\n'), ((581, 604), 'gpxpy.gpx.GPXWaypoint', 'gpxpy.gpx.GPXWaypoint', ([], {}), '()\n', (602, 604), False, 'import gpxpy\n'), ((1289, 1312), 'gpxpy.gpx.GPXWaypoint', 'gpxpy.gpx.GPXWaypoint', ([], {}), '()\n', (1310, 1312), ...
"""Scraping script for positive.news""" from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.common.exceptions import NoSuchElementException, ElementClickInterceptedException from urllib.request import Request, urlopen from urllib.error import HTTPError from bs4 import B...
[ "urllib.request.Request", "urllib.request.urlopen", "time.sleep", "sqlite3.connect", "selenium.webdriver.ChromeOptions", "selenium.webdriver.Chrome", "bs4.BeautifulSoup", "selenium.webdriver.support.ui.WebDriverWait" ]
[((559, 584), 'selenium.webdriver.ChromeOptions', 'webdriver.ChromeOptions', ([], {}), '()\n', (582, 584), False, 'from selenium import webdriver\n'), ((702, 735), 'selenium.webdriver.Chrome', 'webdriver.Chrome', ([], {'options': 'options'}), '(options=options)\n', (718, 735), False, 'from selenium import webdriver\n')...
#!/usr/bin/env python # -*- coding: utf-8 -*- #==================================================== # FILE: img2sdat.py # AUTHORS: xpirt - luxi78 - howellzhu # DATE: 2018-05-25 12:19:12 CEST #==================================================== from __future__ import print_function import sys,...
[ "os.makedirs", "argparse.ArgumentParser", "tempfile.mkstemp", "blockimgdiff.BlockImageDiff", "os.path.isdir", "os.path.dirname", "sys.exit" ]
[((1794, 1843), 'blockimgdiff.BlockImageDiff', 'blockimgdiff.BlockImageDiff', (['image', 'None', 'VERSION'], {}), '(image, None, VERSION)\n', (1821, 1843), False, 'import common, blockimgdiff, sparse_img\n'), ((2002, 2079), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Visit xda thread ...
import os from wok.task import task from bgcore.labelfilter import LabelFilter from intogensm import so from intogensm.projdb import ProjectDb from intogensm.projres import ProjectResults from intogensm.utils import get_project_conf from intogensm.paths import get_data_gene_filter_path from intogensm.oncodriveclust ...
[ "intogensm.projdb.ProjectDb", "wok.task.task.run", "wok.task.task.foreach", "intogensm.oncodriveclust.get_oncodriveclust_configuration", "intogensm.projres.ProjectResults", "intogensm.so.match" ]
[((390, 404), 'wok.task.task.foreach', 'task.foreach', ([], {}), '()\n', (402, 404), False, 'from wok.task import task\n'), ((6017, 6027), 'wok.task.task.run', 'task.run', ([], {}), '()\n', (6025, 6027), False, 'from wok.task import task\n'), ((1018, 1070), 'intogensm.oncodriveclust.get_oncodriveclust_configuration', '...
import rospy import mayfield_utils import mobile_base_driver.msg class PowerMonitor(object): onDockChanged = mayfield_utils.Event() onChargingChanged = mayfield_utils.Event() def __init__(self, dock_changed_cb=None, charging_changed_cb=None): self._on_dock = Fa...
[ "rospy.Subscriber", "mayfield_utils.Event" ]
[((117, 139), 'mayfield_utils.Event', 'mayfield_utils.Event', ([], {}), '()\n', (137, 139), False, 'import mayfield_utils\n'), ((164, 186), 'mayfield_utils.Event', 'mayfield_utils.Event', ([], {}), '()\n', (184, 186), False, 'import mayfield_utils\n'), ((564, 652), 'rospy.Subscriber', 'rospy.Subscriber', (['"""mobile_b...
import json import os from datetime import date from unittest import TestCase from basketball_reference_web_scraper.client import players_advanced_season_totals from basketball_reference_web_scraper.data import OutputType, Team, Position from basketball_reference_web_scraper.errors import InvalidSeason class BaseTes...
[ "os.remove", "json.load", "json.loads", "os.path.dirname", "basketball_reference_web_scraper.client.players_advanced_season_totals", "datetime.date.today" ]
[((965, 997), 'os.remove', 'os.remove', (['self.output_file_path'], {}), '(self.output_file_path)\n', (974, 997), False, 'import os\n'), ((1063, 1251), 'basketball_reference_web_scraper.client.players_advanced_season_totals', 'players_advanced_season_totals', ([], {'season_end_year': 'self.year', 'output_type': 'Output...
import os import typing import logging import re import cv2 import gin import torch from torch.utils.data import Dataset from soccer_robot_perception.utils.detection_utils import read_xml_file LOGGER = logging.getLogger(__name__) @gin.configurable class DetectionDataset(Dataset): """""" def __init__( ...
[ "os.walk", "cv2.imread", "soccer_robot_perception.utils.detection_utils.read_xml_file", "re.search", "logging.getLogger", "re.compile" ]
[((204, 231), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (221, 231), False, 'import logging\n'), ((947, 991), 're.compile', 're.compile', (['"""([A-Z0-9a-z_\\\\-]+)\\\\.[pj][pn]g"""'], {}), "('([A-Z0-9a-z_\\\\-]+)\\\\.[pj][pn]g')\n", (957, 991), False, 'import re\n'), ((1030, 1047), '...
from liquepy.num import mrd_curves # THIS FILE HAS DEPRECATED, now in liquepy.num.mrd_curves def elastic(gamma): return mrd_curves.elastic(gamma) def mohr_coloumb(gamma, elastic_mod, cu): return mrd_curves.mohr_coloumb(gamma, elastic_mod, cu) def flac_default_curve(gamma, l_1, l_2): return mrd_curves...
[ "liquepy.num.mrd_curves.vardanega_2013_mod", "liquepy.num.mrd_curves.flac_default_curve", "liquepy.num.mrd_curves.seed_and_sun_mod", "liquepy.num.mrd_curves.elastic", "liquepy.num.mrd_curves.mohr_coloumb", "liquepy.num.mrd_curves.ishi_mod" ]
[((127, 152), 'liquepy.num.mrd_curves.elastic', 'mrd_curves.elastic', (['gamma'], {}), '(gamma)\n', (145, 152), False, 'from liquepy.num import mrd_curves\n'), ((208, 255), 'liquepy.num.mrd_curves.mohr_coloumb', 'mrd_curves.mohr_coloumb', (['gamma', 'elastic_mod', 'cu'], {}), '(gamma, elastic_mod, cu)\n', (231, 255), F...
# coding: utf-8 from backend.backend import Backend from view.interface import Interface from control.control_interface import ControlInterface if __name__ == '__main__': controler = ControlInterface(Interface, Backend) controler.start()
[ "control.control_interface.ControlInterface" ]
[((190, 226), 'control.control_interface.ControlInterface', 'ControlInterface', (['Interface', 'Backend'], {}), '(Interface, Backend)\n', (206, 226), False, 'from control.control_interface import ControlInterface\n')]
# # Copyright 2017 Wooga GmbH # # 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...
[ "karajan.bin.cli.KarajanCLIFactory.get_parser", "airflow.bin.cli.CLIFactory.get_parser" ]
[((1728, 1751), 'airflow.bin.cli.CLIFactory.get_parser', 'CLIFactory.get_parser', ([], {}), '()\n', (1749, 1751), False, 'from airflow.bin.cli import CLIFactory\n'), ((1821, 1851), 'karajan.bin.cli.KarajanCLIFactory.get_parser', 'KarajanCLIFactory.get_parser', ([], {}), '()\n', (1849, 1851), False, 'from karajan.bin.cl...
# coding: utf-8 import psutil import platform import os import wsgi_util def show(req): return wsgi_util.render_template_2("22.html", PLT_M=platform.processor(), CPU_F=str(psutil.cpu_freq()), CPU_P=str(psutil.cpu_percent(percpu=True)), MEM_T='{:,}'.format(psutil.virtual_memory().total), ...
[ "platform.processor", "psutil.virtual_memory", "psutil.cpu_percent", "psutil.cpu_freq" ]
[((157, 177), 'platform.processor', 'platform.processor', ([], {}), '()\n', (175, 177), False, 'import platform\n'), ((194, 211), 'psutil.cpu_freq', 'psutil.cpu_freq', ([], {}), '()\n', (209, 211), False, 'import psutil\n'), ((229, 260), 'psutil.cpu_percent', 'psutil.cpu_percent', ([], {'percpu': '(True)'}), '(percpu=T...
# Generated by Django 2.2.7 on 2019-12-02 09:53 from django.db import migrations, models import qcache.models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Tag', fields=[ ('id', ...
[ "django.db.models.CharField", "django.db.models.ManyToManyField", "django.db.models.AutoField" ]
[((320, 413), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (336, 413), False, 'from django.db import migrations, models\...
from django.db import models from django.contrib.auth.models import User # Create your models here. class Floor(models.Model): number = models.IntegerField() def __str__(self): return 'Floor #{}'.format(self.number) class Room(models.Model): ROOM_TYPES = [ ('1', '1 person'), ('2', '2 persons'), ('3', '3...
[ "django.db.models.ForeignKey", "django.db.models.IntegerField", "django.db.models.CharField", "django.db.models.DateField" ]
[((139, 160), 'django.db.models.IntegerField', 'models.IntegerField', ([], {}), '()\n', (158, 160), False, 'from django.db import models\n'), ((402, 452), 'django.db.models.ForeignKey', 'models.ForeignKey', (['Floor'], {'on_delete': 'models.CASCADE'}), '(Floor, on_delete=models.CASCADE)\n', (419, 452), False, 'from dja...
import copy import os from pymatgen.core.structure import Molecule from pymatgen.analysis.graphs import MoleculeGraph from pymatgen.analysis.local_env import OpenBabelNN from pymatgen.io.qchem.outputs import QCOutput from fireworks import LaunchPad, Workflow from atomate.qchem.database import QChemCalcDb from atoma...
[ "copy.deepcopy", "atomate.vasp.powerups.add_tags", "fireworks.Workflow", "fireworks.LaunchPad.from_file", "pymatgen.io.qchem.outputs.QCOutput", "atomate.qchem.database.QChemCalcDb.from_db_file" ]
[((668, 741), 'fireworks.LaunchPad.from_file', 'LaunchPad.from_file', (['"""/Users/ewcss/config/fireworks/ewcss_launchpad.yaml"""'], {}), "('/Users/ewcss/config/fireworks/ewcss_launchpad.yaml')\n", (687, 741), False, 'from fireworks import LaunchPad, Workflow\n'), ((747, 818), 'atomate.qchem.database.QChemCalcDb.from_d...
# Generated by Django 3.1.8 on 2021-05-09 20:43 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('members', '0025_auto_20200522_1235'), ] operations = [ migrations.AlterModelOptions( name='member', options={'get_latest_by'...
[ "django.db.migrations.AlterModelOptions" ]
[((227, 313), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""member"""', 'options': "{'get_latest_by': 'modified'}"}), "(name='member', options={'get_latest_by':\n 'modified'})\n", (255, 313), False, 'from django.db import migrations\n'), ((354, 446), 'django.db.migration...
from yt.fields.field_info_container import \ FieldInfoContainer from yt.fields.species_fields import \ setup_species_fields class SPHFieldInfo(FieldInfoContainer): known_other_fields = () known_particle_fields = ( ("Mass", ("code_mass", ["particle_mass"], None)), ("Masses", ("code_mass...
[ "yt.fields.species_fields.setup_species_fields" ]
[((1513, 1546), 'yt.fields.species_fields.setup_species_fields', 'setup_species_fields', (['self', 'ptype'], {}), '(self, ptype)\n', (1533, 1546), False, 'from yt.fields.species_fields import setup_species_fields\n')]
import discord from discord.ext import commands import random import logging logging.basicConfig(level=logging.INFO) description = '''Coucou je suis <NAME>, si tu veux mes deux boules de cristalle, fais moi voir ta culotte''' bot = commands.Bot(command_prefix='?', description=description) class ClientChannelEvents(...
[ "random.randint", "logging.basicConfig", "random.choice", "random.seed", "discord.ext.commands.Bot" ]
[((78, 117), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO'}), '(level=logging.INFO)\n', (97, 117), False, 'import logging\n'), ((234, 291), 'discord.ext.commands.Bot', 'commands.Bot', ([], {'command_prefix': '"""?"""', 'description': 'description'}), "(command_prefix='?', description=descr...
from js_helper import _do_test_raw, _get_var def test_createElement(): 'Tests that createElement and createElementNS throw errors.' err = _do_test_raw(""" var x = foo; foo.bar.whateverElement("script"); """) assert not err.message_count err = _do_test_raw(""" var x = foo; foo.bar...
[ "js_helper._do_test_raw", "js_helper._get_var" ]
[((149, 235), 'js_helper._do_test_raw', '_do_test_raw', (['"""\n var x = foo;\n foo.bar.whateverElement("script");\n """'], {}), '(\n """\n var x = foo;\n foo.bar.whateverElement("script");\n """)\n', (161, 235), False, 'from js_helper import _do_test_raw, _get_var\n'), ((275, 362), 'js_helper._do_...
#! /usr/bin/python # -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import collections import logging import pywikibot from poty.sites import COMMONS logger = logging.getLogger('poty.eligibility.voter') def _get_voter(username, eligibility_dict): voter = pywikibot.User(COMMONS...
[ "pywikibot.User", "poty.sites.COMMONS._simple_request", "collections.defaultdict", "pywikibot.Timestamp.fromISOformat", "logging.getLogger", "poty.sites.COMMONS.fromDBName" ]
[((196, 239), 'logging.getLogger', 'logging.getLogger', (['"""poty.eligibility.voter"""'], {}), "('poty.eligibility.voter')\n", (213, 239), False, 'import logging\n'), ((2450, 2479), 'collections.defaultdict', 'collections.defaultdict', (['dict'], {}), '(dict)\n', (2473, 2479), False, 'import collections\n'), ((298, 33...
from gbdxtools import Interface from gbdxtools.s3 import S3 from auth_mock import gbdx from moto import mock_s3 import vcr import os import tempfile import unittest from moto_test_data import pre_load_s3_data cassette_name = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'casse...
[ "gbdxtools.s3.S3", "vcr.use_cassette", "os.path.realpath", "tempfile.mkdtemp", "moto_test_data.pre_load_s3_data", "moto.mock_s3" ]
[((1206, 1306), 'vcr.use_cassette', 'vcr.use_cassette', (['"""tests/unit/cassettes/test_get_s3creds.yaml"""'], {'filter_headers': "['authorization']"}), "('tests/unit/cassettes/test_get_s3creds.yaml',\n filter_headers=['authorization'])\n", (1222, 1306), False, 'import vcr\n'), ((256, 282), 'os.path.realpath', 'os.p...
# from blazingsql import DataType from Configuration import Settings as Settings from DataBase import createSchema as cs from pydrill.client import PyDrill from Runner import runTest from Utils import Execution, init_context def main(dask_client, bc): # Create Table Drill ----------------------------------------...
[ "Runner.runTest.save_log", "pydrill.client.PyDrill", "Utils.init_context", "Runner.runTest.run_query_performance", "DataBase.createSchema.get_dtypes", "DataBase.createSchema.init_drill_schema", "DataBase.createSchema.get_column_names", "Utils.Execution.getArgs", "Runner.runTest.run_query", "DataBa...
[((342, 378), 'pydrill.client.PyDrill', 'PyDrill', ([], {'host': '"""localhost"""', 'port': '(8047)'}), "(host='localhost', port=8047)\n", (349, 378), False, 'from pydrill.client import PyDrill\n'), ((16694, 16713), 'Utils.Execution.getArgs', 'Execution.getArgs', ([], {}), '()\n', (16711, 16713), False, 'from Utils imp...
"""Common pytest code (place for fixtures).""" import argparse import pytest from meshtastic.__main__ import Globals @pytest.fixture def reset_globals(): """Fixture to reset globals.""" parser = None parser = argparse.ArgumentParser() Globals.getInstance().reset() Globals.getInstance().set_parse...
[ "meshtastic.__main__.Globals.getInstance", "argparse.ArgumentParser" ]
[((225, 250), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (248, 250), False, 'import argparse\n'), ((255, 276), 'meshtastic.__main__.Globals.getInstance', 'Globals.getInstance', ([], {}), '()\n', (274, 276), False, 'from meshtastic.__main__ import Globals\n'), ((289, 310), 'meshtastic.__main...
# -*- coding: utf-8 -*- from datetime import datetime import json from django.conf.urls import url from django.core.urlresolvers import reverse from django.db.models import Max from django.http import HttpResponseRedirect, HttpResponseNotFound, HttpResponse from django.utils.datastructures import MultiValueDictKeyErro...
[ "tastypie.fields.IntegerField", "django.db.models.Max", "tastypie.fields.ManyToManyField", "timetable.models.Department.objects.filter", "timetable.models.Timetable.objects.all", "timetable.models.Timetable.objects.filter", "django.core.urlresolvers.reverse", "timetable.models.Group.objects.all", "d...
[((1811, 1862), 'tastypie.fields.ForeignKey', 'fields.ForeignKey', (['DepartmentResource', '"""department"""'], {}), "(DepartmentResource, 'department')\n", (1828, 1862), False, 'from tastypie import fields\n'), ((4207, 4250), 'tastypie.fields.ForeignKey', 'fields.ForeignKey', (['CampusResource', '"""campus"""'], {}), ...
""" """ import os from pymatflow.dftbplus.base.hsd import HsdBlock def new_parallel(): out = HsdBlock(name="Parallel", val=None, block_type="method", level=0) out.status = False out.scalar["Groups"] = 1 return out
[ "pymatflow.dftbplus.base.hsd.HsdBlock" ]
[((102, 167), 'pymatflow.dftbplus.base.hsd.HsdBlock', 'HsdBlock', ([], {'name': '"""Parallel"""', 'val': 'None', 'block_type': '"""method"""', 'level': '(0)'}), "(name='Parallel', val=None, block_type='method', level=0)\n", (110, 167), False, 'from pymatflow.dftbplus.base.hsd import HsdBlock\n')]
#!/usr/bin/env python """ .. py:currentmodule:: experimental.nanopico.LogFile .. moduleauthor:: <NAME> <<EMAIL>> description """ # Script information for the file. __author__ = "<NAME> (<EMAIL>)" __version__ = "" __date__ = "" __copyright__ = "Copyright (c) 2012 <NAME>" __license__ = "" # Standard library modules. i...
[ "pyprobecurrent.get_current_module_path", "datetime.datetime.combine", "matplotlib.pyplot.show", "matplotlib.pyplot.plot", "datetime.datetime", "matplotlib.pyplot.figure", "datetime.timedelta", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel" ]
[((3360, 3420), 'pyprobecurrent.get_current_module_path', 'get_current_module_path', (['__file__', '"""../../testData/nanopico"""'], {}), "(__file__, '../../testData/nanopico')\n", (3383, 3420), False, 'from pyprobecurrent import get_current_module_path\n'), ((3666, 3678), 'matplotlib.pyplot.figure', 'plt.figure', ([],...
# 将实数和虚数响应返回给Gabor滤波器。 # # 将Gabor滤波器内核的实部和虚部应用于图像,并将响应作为一对数组返回。 # # Gabor滤波器是具有高斯核的线性滤波器,它由正弦平面波调制。 Gabor滤波器的频率和方向表示类似于人类视觉系统。 # Gabor滤波器组通常用于计算机视觉和图像处理。 它们特别适合于边缘检测和纹理分类。 from skimage.filters import gabor from skimage import io, img_as_float image = io.imread('/home/qiao/PythonProjects/Scikit-image_On_CT/Test_Img/4...
[ "skimage.filters.gabor", "skimage.io.show", "skimage.io.imread", "skimage.io.imshow" ]
[((254, 326), 'skimage.io.imread', 'io.imread', (['"""/home/qiao/PythonProjects/Scikit-image_On_CT/Test_Img/4.jpg"""'], {}), "('/home/qiao/PythonProjects/Scikit-image_On_CT/Test_Img/4.jpg')\n", (263, 326), False, 'from skimage import io, img_as_float\n'), ((348, 365), 'skimage.filters.gabor', 'gabor', (['image', '(0.6)...
#!/usr/bin/env python import rospy import time import math import numpy as np from simple_pid import PID from scipy.spatial.transform import Rotation as Rot from nav_msgs.msg import Odometry from sensor_msgs.msg import NavSatFix from hector_uav_msgs.msg import Altimeter from geometry_msgs.msg import Twist, Vector3Stamp...
[ "simple_pid.PID", "rospy.Subscriber", "rospy.Rate", "diagnostic_msgs.msg.DiagnosticArray", "rospy.is_shutdown", "rospy.init_node", "math.cos", "diagnostic_msgs.msg.KeyValue", "math.sin", "geometry_msgs.msg.Twist", "time.sleep", "numpy.linalg.inv", "numpy.zeros", "rospy.Publisher", "time....
[((9464, 9490), 'rospy.init_node', 'rospy.init_node', (['"""takeoff"""'], {}), "('takeoff')\n", (9479, 9490), False, 'import rospy\n'), ((993, 1004), 'time.time', 'time.time', ([], {}), '()\n', (1002, 1004), False, 'import time\n'), ((2524, 2595), 'numpy.array', 'np.array', (['[[1, 0, 0, xtruth], [0, 1, 0, 0], [0, 0, 1...
import os # Author(s): <NAME> (github.com/tmsmendez) def write_preprocess(path, filename): cFile = open(os.path.join(path, filename), 'w') cFile.write('! Ansys command file written from compas_vibro \n') cFile.write('!\n') cFile.write('!\n') cFile.write('/PREP7 \n') cFile.write('!\n') cF...
[ "os.path.join" ]
[((112, 140), 'os.path.join', 'os.path.join', (['path', 'filename'], {}), '(path, filename)\n', (124, 140), False, 'import os\n'), ((413, 441), 'os.path.join', 'os.path.join', (['path', 'filename'], {}), '(path, filename)\n', (425, 441), False, 'import os\n')]
import os import requests as rs from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By SCREEN_DIR = './screenshots' TARGET_URL = ...
[ "os.makedirs", "selenium.webdriver.Firefox", "os.path.exists", "selenium.webdriver.support.expected_conditions.visibility_of_all_elements_located", "requests.get", "os.path.join", "selenium.webdriver.support.ui.WebDriverWait" ]
[((2235, 2254), 'selenium.webdriver.Firefox', 'webdriver.Firefox', ([], {}), '()\n', (2252, 2254), False, 'from selenium import webdriver\n'), ((2170, 2196), 'os.path.exists', 'os.path.exists', (['SCREEN_DIR'], {}), '(SCREEN_DIR)\n', (2184, 2196), False, 'import os\n'), ((2202, 2225), 'os.makedirs', 'os.makedirs', (['S...
from flask import Blueprint, render_template #from src.models import * from src import db admin = Blueprint('admin', __name__) @admin.route('/admin', methods=['GET']) def timeline(): genres = """SELECT DISTINCT genre FROM genre""" genres = [g[0] for g in db.session.execute(genres).all()] genres = """SELEC...
[ "src.db.session.execute", "flask.Blueprint" ]
[((99, 127), 'flask.Blueprint', 'Blueprint', (['"""admin"""', '__name__'], {}), "('admin', __name__)\n", (108, 127), False, 'from flask import Blueprint, render_template\n'), ((265, 291), 'src.db.session.execute', 'db.session.execute', (['genres'], {}), '(genres)\n', (283, 291), False, 'from src import db\n'), ((417, 4...
#!/usr/bin/env python3 ''' MLDisasm encoding and decoding. ''' from abc import ABCMeta, abstractmethod import numpy as np import tensorflow as tf import tensorflow.keras as keras from mldisasm.constants import ASCII_MAX, BYTE_MAX, BYTEORDER, START_TOKEN, STOP_TOKEN from mldisasm.util import log # Maxim...
[ "tensorflow.keras.utils.to_categorical", "numpy.argmax", "tensorflow.convert_to_tensor", "numpy.asarray", "numpy.max" ]
[((1824, 1858), 'numpy.asarray', 'np.asarray', (['onehot'], {'dtype': 'np.int32'}), '(onehot, dtype=np.int32)\n', (1834, 1858), True, 'import numpy as np\n'), ((4698, 4732), 'numpy.asarray', 'np.asarray', (['onehot'], {'dtype': 'np.int32'}), '(onehot, dtype=np.int32)\n', (4708, 4732), True, 'import numpy as np\n'), ((1...
import sqlite3 ''' Read the DATABASE README before using this code for SQLITE3. The code to create and access the DB.SQLITE3 is attached below. THE DB.SQLITE3 file in this Project is empty, so you can work on it directly with the driver code given below. ''' try: db = sqlite3.connect('db.sqlite3') crsr = db.cu...
[ "sqlite3.connect" ]
[((274, 303), 'sqlite3.connect', 'sqlite3.connect', (['"""db.sqlite3"""'], {}), "('db.sqlite3')\n", (289, 303), False, 'import sqlite3\n')]
from .. import theme from .. import template from .. import config from .. import palette as pal from typing import Optional, Any import typer import subprocess import sys import os import jinja2 as j2 app = typer.Typer(help=f'''manages your themes saved themes can be found and manually edited at {config.themes_dir}...
[ "typer.Argument", "typer.Typer", "typer.Exit", "os.path.splitext", "typer.Option", "os.path.join", "os.listdir" ]
[((210, 334), 'typer.Typer', 'typer.Typer', ([], {'help': 'f"""manages your themes\n\nsaved themes can be found and manually edited at {config.themes_dir}"""'}), '(help=\n f"""manages your themes\n\nsaved themes can be found and manually edited at {config.themes_dir}"""\n )\n', (221, 334), False, 'import typer\n'...
import command import module import time import toml import util import threading import random import urllib.parse class MiscModule(module.Module): name = 'Miscellaneous' @command.desc('Set up Marie-based bots (@MissRose_bot, etc)') def cmd_bsetup(self, msg, params): if not msg.chat: ...
[ "util.time_us", "util.filter_input_block", "util.format_duration_us", "random.choice", "time.sleep", "toml.loads", "command.alias", "command.desc" ]
[((184, 244), 'command.desc', 'command.desc', (['"""Set up Marie-based bots (@MissRose_bot, etc)"""'], {}), "('Set up Marie-based bots (@MissRose_bot, etc)')\n", (196, 244), False, 'import command\n'), ((3392, 3433), 'command.desc', 'command.desc', (['"""Mass forward one message."""'], {}), "('Mass forward one message....
import pytest from torch import nn from models.efficientnets import EfficientNet from utils.efficientnets import load_weights @pytest.mark.parametrize( "name", [ pytest.param("efficientnet-b0"), pytest.param("efficientnet-b1"), pytest.param("efficientnet-b2"), pytest.param("ef...
[ "models.efficientnets.EfficientNet", "pytest.param", "pytest.raises", "torch.nn.Linear", "utils.efficientnets.load_weights" ]
[((559, 583), 'models.efficientnets.EfficientNet', 'EfficientNet', (['name', '(1000)'], {}), '(name, 1000)\n', (571, 583), False, 'from models.efficientnets import EfficientNet\n'), ((626, 642), 'torch.nn.Linear', 'nn.Linear', (['(10)', '(1)'], {}), '(10, 1)\n', (635, 642), False, 'from torch import nn\n'), ((653, 680)...
import datetime import os import uuid from expects import equal, expect, contain, be_empty, have_key, be_true, have_keys, not_, be_false, be_above from mamba import before, context, description, after, it from sdcclient import SdScanningClient from specs import be_successful_api_call with description("Scanning vulne...
[ "uuid.uuid4", "mamba.context", "mamba.it", "expects.be_above", "expects.expect", "datetime.datetime", "expects.equal", "mamba.description", "os.getenv" ]
[((293, 356), 'mamba.description', 'description', (['"""Scanning vulnerability exceptions"""', '"""integration"""'], {}), "('Scanning vulnerability exceptions', 'integration')\n", (304, 356), False, 'from mamba import before, context, description, after, it\n'), ((976, 1044), 'mamba.context', 'context', (['"""when we a...