code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import unittest import pathlib import cpptypeinfo from cpptypeinfo.usertype import (Field, Struct, Pointer, Param, Function) HERE = pathlib.Path(__file__).absolute().parent IMGUI_H = HERE.parent / 'libs/imgui/imgui.h' parser = cpptypeinfo.TypeParser() EXPECTS = { 'ImDrawChannel': parser.parse('stru...
[ "cpptypeinfo.UInt16", "pathlib.Path", "cpptypeinfo.Void", "cpptypeinfo.Int8", "cpptypeinfo.parse_files", "cpptypeinfo.UInt32", "cpptypeinfo.TypeParser", "cpptypeinfo.UInt64", "cpptypeinfo.Float", "cpptypeinfo.Int16", "unittest.main", "cpptypeinfo.Int64", "cpptypeinfo.Bool", "cpptypeinfo.In...
[((237, 261), 'cpptypeinfo.TypeParser', 'cpptypeinfo.TypeParser', ([], {}), '()\n', (259, 261), False, 'import cpptypeinfo\n'), ((27961, 27976), 'unittest.main', 'unittest.main', ([], {}), '()\n', (27974, 27976), False, 'import unittest\n'), ((1995, 2015), 'cpptypeinfo.UInt32', 'cpptypeinfo.UInt32', ([], {}), '()\n', (...
#!/usr/bin/python import cgi import sys import json import re import mysql.connector from cloudNG import * y=sys.stdin.readline().split(",") x = sys.stdin.read() #con=mysql.connector.connect(user='brewerslab',password='<PASSWORD>',database="brewerslab") #sys.stdout.write("Content-Type:text/plain\n\n") sys.stdout.write...
[ "cgi.FieldStorage", "re.compile", "sys.stdin.read", "sys.stdin.readline", "sys.stderr.write", "sys.stdout.flush", "sys.stdout.write" ]
[((146, 162), 'sys.stdin.read', 'sys.stdin.read', ([], {}), '()\n', (160, 162), False, 'import sys\n'), ((304, 349), 'sys.stdout.write', 'sys.stdout.write', (['"""Content-Type:text/xml\n\n"""'], {}), "('Content-Type:text/xml\\n\\n')\n", (320, 349), False, 'import sys\n'), ((355, 373), 'cgi.FieldStorage', 'cgi.FieldStor...
import pytest from tests.common.helpers.assertions import pytest_require from tests.common.fixtures.conn_graph_facts import conn_graph_facts,\ fanout_graph_facts from tests.common.ixia.ixia_fixtures import ixia_api_serv_ip, ixia_api_serv_port,\ ixia_api_serv_user, ixia_api_serv_passwd, ixia_api, ixia_testbed f...
[ "pytest.mark.topology", "tests.common.helpers.assertions.pytest_require", "files.helper.run_pfc_test" ]
[((474, 502), 'pytest.mark.topology', 'pytest.mark.topology', (['"""tgen"""'], {}), "('tgen')\n", (494, 502), False, 'import pytest\n'), ((1990, 2120), 'tests.common.helpers.assertions.pytest_require', 'pytest_require', (['(rand_one_dut_hostname == dut_hostname == dut_hostname2)', '"""Priority and port are not mapped t...
''' load lottery tickets and evaluation support datasets: cifar10, Fashionmnist, cifar100 ''' import os import time import random import shutil import argparse import numpy as np from copy import deepcopy import matplotlib.pyplot as plt import torch import torch.optim import torch.nn as nn import torch.utils.data...
[ "torch.cuda.manual_seed_all", "torch.manual_seed", "torch.optim.lr_scheduler.MultiStepLR", "os.makedirs", "torch.nn.CrossEntropyLoss", "argparse.ArgumentParser", "torch.load", "matplotlib.pyplot.plot", "os.path.join", "random.seed", "matplotlib.pyplot.close", "numpy.array", "numpy.random.see...
[((719, 784), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""PyTorch Evaluation Tickets"""'}), "(description='PyTorch Evaluation Tickets')\n", (742, 784), False, 'import argparse\n'), ((3787, 3828), 'os.makedirs', 'os.makedirs', (['args.save_dir'], {'exist_ok': '(True)'}), '(args.save_di...
import time from absl import app, flags, logging from absl.flags import FLAGS import cv2 import numpy as np import tensorflow as tf from yolov3_tf2.models import ( YoloV3, YoloV3Tiny ) from yolov3_tf2.dataset import transform_images, load_tfrecord_dataset from yolov3_tf2.utils import draw_outputs flags.DEFINE_stri...
[ "cv2.imwrite", "yolov3_tf2.dataset.transform_images", "tensorflow.config.experimental.set_memory_growth", "absl.flags.DEFINE_integer", "absl.logging.info", "absl.flags.DEFINE_boolean", "absl.app.run", "numpy.array", "yolov3_tf2.dataset.load_tfrecord_dataset", "yolov3_tf2.utils.draw_outputs", "ti...
[((303, 381), 'absl.flags.DEFINE_string', 'flags.DEFINE_string', (['"""classes"""', '"""./data/vocmine.names"""', '"""path to classes file"""'], {}), "('classes', './data/vocmine.names', 'path to classes file')\n", (322, 381), False, 'from absl import app, flags, logging\n'), ((382, 475), 'absl.flags.DEFINE_string', 'f...
''' limitcalls.py: implement rate limit handling for API calls Object class RateLimit implements a token tracking mechanism that arranges to return a maximum of a given number of tokens in a given amount of time. There are to ways of using this. The first way is simple but only suitable when there is only one functio...
[ "time.sleep", "time.perf_counter", "functools.wraps" ]
[((1830, 1844), 'time.perf_counter', 'perf_counter', ([], {}), '()\n', (1842, 1844), False, 'from time import sleep, perf_counter\n'), ((2027, 2041), 'time.perf_counter', 'perf_counter', ([], {}), '()\n', (2039, 2041), False, 'from time import sleep, perf_counter\n'), ((2519, 2540), 'functools.wraps', 'functools.wraps'...
import numpy as np from sklearn.linear_model import LogisticRegression from sklearn.pipeline import Pipeline from sklearn.impute import SimpleImputer from sklearn.preprocessing import StandardScaler, FunctionTransformer from sklearn.compose import ColumnTransformer, make_column_selector # This will select columns tha...
[ "sklearn.linear_model.LogisticRegression", "sklearn.preprocessing.StandardScaler", "sklearn.impute.SimpleImputer", "sklearn.pipeline.Pipeline", "sklearn.preprocessing.FunctionTransformer", "sklearn.compose.make_column_selector" ]
[((418, 458), 'sklearn.compose.make_column_selector', 'make_column_selector', ([], {'pattern': '"""feature*"""'}), "(pattern='feature*')\n", (438, 458), False, 'from sklearn.compose import ColumnTransformer, make_column_selector\n'), ((561, 614), 'sklearn.impute.SimpleImputer', 'SimpleImputer', ([], {'missing_values': ...
#!/usr/bin/env python3 import requests, random, time, subprocess url = "http://rtp-debtor-payment-service-rtp-reference.apps.nyc-f63a.open.redhat.com/payments-service/payments" print("Connecting to URL: " + url) for x in range(20): data = {"payments":[{"senderAccountNumber":"12000194212199004","amount":random.ran...
[ "requests.post", "random.randint", "time.sleep" ]
[((450, 479), 'requests.post', 'requests.post', (['url'], {'json': 'data'}), '(url, json=data)\n', (463, 479), False, 'import requests, random, time, subprocess\n'), ((484, 501), 'time.sleep', 'time.sleep', (['(0.001)'], {}), '(0.001)\n', (494, 501), False, 'import requests, random, time, subprocess\n'), ((310, 333), '...
import requests import xml.etree.ElementTree as ET import logging from logging.config import dictConfig import json import copy import tempfile import os import calendar import time import sys from requests.auth import HTTPBasicAuth import xml.dom.minidom import datetime import shutil from io import open import platfor...
[ "logging.getLogger", "splunkversioncontrol_utility.runOSProcess", "requests.post", "io.open", "sys.exit", "sys.stdin.read", "requests.auth.HTTPBasicAuth", "os.listdir", "platform.system", "os.path.isdir", "os.mkdir", "xml.etree.ElementTree.fromstring", "json.loads", "requests.get", "os.p...
[((1583, 1609), 'logging.config.dictConfig', 'dictConfig', (['logging_config'], {}), '(logging_config)\n', (1593, 1609), False, 'from logging.config import dictConfig\n'), ((1620, 1639), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (1637, 1639), False, 'import logging\n'), ((1640, 1659), 'logging.getLogg...
import tensorflow as tf import math from tensorflow.contrib.rnn import BasicLSTMCell, RNNCell, DropoutWrapper, MultiRNNCell from rnn import stack_bidirectional_dynamic_rnn, CellInitializer, GRUCell, DropoutGRUCell import utils, beam_search def auto_reuse(fun): """ Wrapper that automatically handles the `reuse'...
[ "tensorflow.truediv", "tensorflow.equal", "tensorflow.shape", "tensorflow.get_variable", "tensorflow.transpose", "tensorflow.reduce_sum", "tensorflow.split", "tensorflow.tanh", "tensorflow.multiply", "math.sqrt", "tensorflow.logical_not", "tensorflow.nn.sparse_softmax_cross_entropy_with_logits...
[((12334, 12362), 'tensorflow.concat', 'tf.concat', (['encoder_states', '(1)'], {}), '(encoder_states, 1)\n', (12343, 12362), True, 'import tensorflow as tf\n'), ((13854, 13879), 'tensorflow.expand_dims', 'tf.expand_dims', (['hidden', '(2)'], {}), '(hidden, 2)\n', (13868, 13879), True, 'import tensorflow as tf\n'), ((1...
from functools import lru_cache class Solution: def shoppingOffers(self, price, special, needs): n = len(price) # 过滤不需要计算的大礼包,只保留需要计算的大礼包 filter_special = [] for sp in special: if sum(sp[i] for i in range(n)) > 0 and sum(sp[i] * price[i] for i in range(n)) > sp[-1]: ...
[ "functools.lru_cache" ]
[((402, 417), 'functools.lru_cache', 'lru_cache', (['None'], {}), '(None)\n', (411, 417), False, 'from functools import lru_cache\n')]
"""Custom client handling, including CSVStream base class.""" import csv import os from typing import Iterable, List, Optional from singer_sdk import typing as th from singer_sdk.streams import Stream class CSVStream(Stream): """Stream class for CSV streams.""" file_paths: List[str] = [] def __init__(...
[ "os.path.exists", "os.listdir", "os.path.normpath", "singer_sdk.typing.PropertiesList", "os.path.isdir", "singer_sdk.typing.StringType", "csv.reader" ]
[((1759, 1783), 'os.path.isdir', 'os.path.isdir', (['file_path'], {}), '(file_path)\n', (1772, 1783), False, 'import os\n'), ((1627, 1652), 'os.path.exists', 'os.path.exists', (['file_path'], {}), '(file_path)\n', (1641, 1652), False, 'import os\n'), ((1880, 1907), 'os.listdir', 'os.listdir', (['clean_file_path'], {}),...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import Any, List, Optional from ax.exceptions.storage import SQADecodeError from ax.utils.common.base impo...
[ "ax.exceptions.storage.SQADecodeError" ]
[((2269, 2354), 'ax.exceptions.storage.SQADecodeError', 'SQADecodeError', (["(error_message_prefix + 'Encountered lists of different lengths.')"], {}), "(error_message_prefix + 'Encountered lists of different lengths.'\n )\n", (2283, 2354), False, 'from ax.exceptions.storage import SQADecodeError\n'), ((3110, 3211),...
from cluster import * import optparse import sys ########################################## ## Options and defaults ########################################## def getOptions(): parser = optparse.OptionParser('python *.py [option]') parser.add_option('--sdf', dest='input', help='intput sdf file', default='') ...
[ "optparse.OptionParser", "sys.exit" ]
[((193, 238), 'optparse.OptionParser', 'optparse.OptionParser', (['"""python *.py [option]"""'], {}), "('python *.py [option]')\n", (214, 238), False, 'import optparse\n'), ((1568, 1579), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (1576, 1579), False, 'import sys\n')]
from knotHash import knotHash from AOCClasses import Position, SolidPosition, solid, empty result = 0 input = "jzgqcdpd" # input = "flqrgnkx" input += "-" hashlist = [] for i in range(128): hash_i = knotHash(input + str(i)) n = int(hash_i, 16) bin_n = f"{n:0128b}" hashlist.append(bin_n) def isSolid...
[ "AOCClasses.Position", "AOCClasses.SolidPosition" ]
[((390, 460), 'AOCClasses.SolidPosition', 'SolidPosition', (['(0)', '(0)'], {'xmin': '(0)', 'ymin': '(0)', 'xmax': '(127)', 'ymax': '(127)', 'solid': 'isSolid'}), '(0, 0, xmin=0, ymin=0, xmax=127, ymax=127, solid=isSolid)\n', (403, 460), False, 'from AOCClasses import Position, SolidPosition, solid, empty\n'), ((532, 5...
import math, time, os, argparse, logging, json from wand.image import Image parser = argparse.ArgumentParser( prog='tile_cutter', description='Cuts large images into tiles.') parser.add_argument('--tile-size', metavar='SIZE', type=int, default=512, help='Tile size (width and height)') parse...
[ "logging.basicConfig", "argparse.FileType", "logging.debug", "time.clock", "argparse.ArgumentParser", "wand.image.Image", "json.dumps", "os.path.dirname", "os.path.basename", "logging.info" ]
[((86, 179), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'prog': '"""tile_cutter"""', 'description': '"""Cuts large images into tiles."""'}), "(prog='tile_cutter', description=\n 'Cuts large images into tiles.')\n", (109, 179), False, 'import math, time, os, argparse, logging, json\n'), ((710, 764), ...
# Copyright (c) 2013, Homzhub and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.utils import today,getdate def execute(filters=None): columns=get_columns() data=get_data(filters) return columns, data def get_columns(): return [ ...
[ "frappe.utils.today" ]
[((3087, 3094), 'frappe.utils.today', 'today', ([], {}), '()\n', (3092, 3094), False, 'from frappe.utils import today, getdate\n')]
import matplotlib.pyplot as plt from time import time import numpy as np from .plotter_utils import figure_ratio, xarray_set_axes_labels, retrieve_or_create_fig_ax # Change the bands (RGB) here if you want other false color combinations def rgb(dataset, at_index=0, x_coord='longitude', y_coord='latitude', ban...
[ "numpy.stack", "numpy.array", "numpy.nanmax", "numpy.interp", "numpy.nanmin" ]
[((2732, 2808), 'numpy.stack', 'np.stack', (['[dataset[bands[0]], dataset[bands[1]], dataset[bands[2]]]'], {'axis': '(-1)'}), '([dataset[bands[0]], dataset[bands[1]], dataset[bands[2]]], axis=-1)\n', (2740, 2808), True, 'import numpy as np\n'), ((3061, 3119), 'numpy.interp', 'np.interp', (['rgb', '(min_rgb, max_rgb)', ...
import logging import os import numpy as np import xml.etree.ElementTree as ET from PIL import Image from paths import DATASETS_ROOT log = logging.getLogger() VOC_CATS = ['__background__', 'aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'hors...
[ "logging.getLogger", "PIL.Image.open", "xml.etree.ElementTree.parse", "os.path.join", "numpy.array", "numpy.zeros" ]
[((143, 162), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (160, 162), False, 'import logging\n'), ((634, 690), 'os.path.join', 'os.path.join', (['DATASETS_ROOT', "('VOCdevkit/VOC20%s/' % year)"], {}), "(DATASETS_ROOT, 'VOCdevkit/VOC20%s/' % year)\n", (646, 690), False, 'import os\n'), ((1978, 2030), 'xm...
import numpy as np from skmultiflow.drift_detection import ADWIN def demo(): """ _test_adwin In this demo, an ADWIN object evaluates a sequence of numbers corresponding to 2 distributions. The ADWIN object indicates the indices where change is detected. The first half of the data is a sequence ...
[ "skmultiflow.drift_detection.ADWIN", "numpy.random.randint", "numpy.random.seed" ]
[((463, 470), 'skmultiflow.drift_detection.ADWIN', 'ADWIN', ([], {}), '()\n', (468, 470), False, 'from skmultiflow.drift_detection import ADWIN\n'), ((514, 531), 'numpy.random.seed', 'np.random.seed', (['(1)'], {}), '(1)\n', (528, 531), True, 'import numpy as np\n'), ((550, 581), 'numpy.random.randint', 'np.random.rand...
"""Common components for styled output. This modules contains things that would be shared across outputters if there were any besides Tabular. The Tabular class, though, still contains a good amount of general logic that should be extracted if any other outputter is actually added. """ from collections import defaul...
[ "logging.getLogger", "pyout.summary.Summary", "collections.namedtuple", "pyout.elements.StyleError", "pyout.elements.default", "pyout.elements.adopt", "inspect.isgenerator", "functools.partial", "pyout.field.Nothing", "collections.defaultdict", "pyout.elements.validate", "pyout.field.Field" ]
[((713, 732), 'logging.getLogger', 'getLogger', (['__name__'], {}), '(__name__)\n', (722, 732), False, 'from logging import getLogger\n'), ((743, 752), 'pyout.field.Nothing', 'Nothing', ([], {}), '()\n', (750, 752), False, 'from pyout.field import Nothing\n'), ((26068, 26109), 'collections.namedtuple', 'namedtuple', ([...
# ========================================================================== # # Copyright NumFOCUS # # 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/...
[ "itk.PyBuffer.keys", "re.compile", "itk.down_cast", "itk.output", "numpy.array", "numpy.moveaxis", "numpy.arange", "itk.array_from_matrix", "numpy.flip", "itk.origin", "numpy.asarray", "itk.ImageIOFactory.CreateImageIO", "itk.MeshIOFactory.CreateMeshIO", "numpy.issubdtype", "numpy.linspa...
[((3438, 3529), 'warnings.warn', 'warnings.warn', (['"""WrapITK warning: itk.image() is deprecated. Use itk.output() instead."""'], {}), "(\n 'WrapITK warning: itk.image() is deprecated. Use itk.output() instead.')\n", (3451, 3529), False, 'import warnings\n'), ((3940, 3967), 'itk.MultiThreaderBase.New', 'itk.MultiT...
import socket import threading import select import queue import time class ThreadedServer(object): """ Threading example class The run() method will be started and it will run in the background until the application exits. """ def __init__(self, host, port, interval=1): """ Constructor ...
[ "threading.Thread", "select.select", "queue.Queue", "socket.socket" ]
[((588, 637), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (601, 637), False, 'import socket\n'), ((926, 968), 'threading.Thread', 'threading.Thread', ([], {'target': 'self.run', 'args': '()'}), '(target=self.run, args=())\n', (942, 968), Fa...
import pandas as pd from scipy.stats import t import numpy as np import requests def make_dataframe(r): rows = [] for item in r['data']: rows.append([item['lat'], item['lon'], item['aqi'], item['station']['name']]) df = pd.DataFrame(rows, columns=['lat', 'lon', 'aqi', 'name']) df['aqi'] = pd.t...
[ "numpy.abs", "requests.get", "pandas.to_numeric", "numpy.isnan", "pandas.DataFrame" ]
[((242, 299), 'pandas.DataFrame', 'pd.DataFrame', (['rows'], {'columns': "['lat', 'lon', 'aqi', 'name']"}), "(rows, columns=['lat', 'lon', 'aqi', 'name'])\n", (254, 299), True, 'import pandas as pd\n'), ((316, 354), 'pandas.to_numeric', 'pd.to_numeric', (['df.aqi'], {'errors': '"""coerce"""'}), "(df.aqi, errors='coerce...
import streamlit as st text = """\ ## Custom CSS does not play nicely with Bokeh HTML, CSS and Javascipt I've experienced numerous problems when using css. I have a feeling that the Bokeh Javascript on elements does not take everything like images and inline css into account. But it's difficult for me to catch and u...
[ "streamlit.write" ]
[((707, 721), 'streamlit.write', 'st.write', (['text'], {}), '(text)\n', (715, 721), True, 'import streamlit as st\n')]
from RnaseqDiffExpressionReport import ProjectTracker from RnaseqDiffExpressionReport import linkToEnsembl, linkToUCSC class TopDifferentiallyExpressedGenes(ProjectTracker): '''output differentially expressed genes.''' limit = 10 pattern = '(.*)_gene_diff' sort = '' def __call__(self, track, sli...
[ "RnaseqDiffExpressionReport.linkToUCSC", "RnaseqDiffExpressionReport.linkToEnsembl" ]
[((915, 931), 'RnaseqDiffExpressionReport.linkToEnsembl', 'linkToEnsembl', (['x'], {}), '(x)\n', (928, 931), False, 'from RnaseqDiffExpressionReport import linkToEnsembl, linkToUCSC\n'), ((987, 1001), 'RnaseqDiffExpressionReport.linkToUCSC', 'linkToUCSC', (['*x'], {}), '(*x)\n', (997, 1001), False, 'from RnaseqDiffExpr...
"""Abstract Timeseries Factory Interface.""" from __future__ import absolute_import from obspy.core import Stream from .TimeseriesFactory import TimeseriesFactory class PlotTimeseriesFactory(TimeseriesFactory): """TimeseriesFactory that generates a plot.""" def __init__(self, *args, **kwargs): Times...
[ "obspy.core.Stream" ]
[((2016, 2024), 'obspy.core.Stream', 'Stream', ([], {}), '()\n', (2022, 2024), False, 'from obspy.core import Stream\n')]
from tools.profilers.net_flops import net_flops import matplotlib.pyplot as plt import tensorflow as tf # define nodeType Leaf node, distinguish node, definition of arrow type decisionNode = dict(boxstyle="sawtooth", fc="0.8") leafNode = dict(boxstyle="round4", fc="0.8") arrow_args = dict(arrowstyle="<-") def get_l...
[ "matplotlib.pyplot.grid", "matplotlib.pyplot.savefig", "matplotlib.pyplot.xticks", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.clf", "tensorflow.keras.utils.plot_model", "matplotlib.pyplot.bar", "tools.profilers.net_flops.net_flops", "matplotlib.pyplot.Rectangle", ...
[((2502, 2535), 'matplotlib.pyplot.subplots', 'plt.subplots', ([], {'figsize': '(20, ysize)'}), '(figsize=(20, ysize))\n', (2514, 2535), True, 'import matplotlib.pyplot as plt\n'), ((3745, 3788), 'matplotlib.pyplot.savefig', 'plt.savefig', (["(foldername + '/model_plot.png')"], {}), "(foldername + '/model_plot.png')\n"...
# Copyright 2017 The TensorFlow 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 applica...
[ "tensorflow.shape", "tensorflow.split", "tensorflow.multiply", "numpy.array", "object_detection.tensorflow_detect.core.preprocessor.resize_image", "object_detection.tensorflow_detect.core.preprocessor.get_default_func_arg_map", "object_detection.tensorflow_detect.core.preprocessor.scale_boxes_to_pixel_c...
[((125987, 126001), 'tensorflow.test.main', 'tf.test.main', ([], {}), '()\n', (125999, 126001), True, 'import tensorflow as tf\n'), ((1360, 1391), 'tensorflow.concat', 'tf.concat', (['[ch255, ch0, ch0]', '(3)'], {}), '([ch255, ch0, ch0], 3)\n', (1369, 1391), True, 'import tensorflow as tf\n'), ((1402, 1435), 'tensorflo...
import scrapy from activesport.items import ActivesportItem import logging from scrapy.utils.log import configure_logging configure_logging(install_root_handler=False) logging.basicConfig( filename='log.txt', format='%(levelname)s: %(message)s', level=logging.INFO ) """ Go to the first categories page (s...
[ "scrapy.utils.log.configure_logging", "scrapy.Request", "activesport.items.ActivesportItem", "logging.basicConfig" ]
[((124, 169), 'scrapy.utils.log.configure_logging', 'configure_logging', ([], {'install_root_handler': '(False)'}), '(install_root_handler=False)\n', (141, 169), False, 'from scrapy.utils.log import configure_logging\n'), ((170, 270), 'logging.basicConfig', 'logging.basicConfig', ([], {'filename': '"""log.txt"""', 'for...
# -*- coding: utf-8 -*- # pip install pdfminer.six -i https://pypi.doubanio.com/simple import io from pdfminer.high_level import * sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8') def return_txt(): name = sys.argv[1] text = extract_text(name) print(text) if __name__ == '__main__': ...
[ "io.TextIOWrapper" ]
[((146, 199), 'io.TextIOWrapper', 'io.TextIOWrapper', (['sys.stdout.buffer'], {'encoding': '"""utf-8"""'}), "(sys.stdout.buffer, encoding='utf-8')\n", (162, 199), False, 'import io\n')]
# $Id: misc.py 8595 2020-12-15 23:06:58Z milde $ # Authors: <NAME> <<EMAIL>>; <NAME> # Copyright: This module has been placed in the public domain. """Miscellaneous directives.""" __docformat__ = 'reStructuredText' import sys import os.path import re import time from docutils import io, nodes, statemachi...
[ "docutils.parsers.rst.directives.path", "docutils.nodes.inline", "re.compile", "docutils.nodes.literal_block", "docutils.nodes.Text", "docutils.parsers.rst.directives.body.NumberLines", "docutils.statemachine.string2lines", "docutils.parsers.rst.directives.class_option", "docutils.parsers.rst.direct...
[((16044, 16074), 're.compile', 're.compile', (['"""( |\\\\n|^)\\\\.\\\\. """'], {}), "('( |\\\\n|^)\\\\.\\\\. ')\n", (16054, 16074), False, 'import re\n'), ((18588, 18678), 're.compile', 're.compile', (["('(%s)\\\\s*(\\\\(\\\\s*(%s)\\\\s*\\\\)\\\\s*)?$' % ((states.Inliner.simplename,) * 2))"], {}), "('(%s)\\\\s*(\\\\(...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import re import django.contrib.auth.models import django.utils.timezone import model_utils.fields import projects.utils import django.core.validators class Migration(migrations.Migration): dependencies = [ ...
[ "django.db.models.EmailField", "re.compile", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.DateTimeField", "django.db.models.CharField" ]
[((453, 546), 'django.db.models.AutoField', 'models.AutoField', ([], {'verbose_name': '"""ID"""', 'serialize': '(False)', 'auto_created': '(True)', 'primary_key': '(True)'}), "(verbose_name='ID', serialize=False, auto_created=True,\n primary_key=True)\n", (469, 546), False, 'from django.db import migrations, models\...
from pkgcheck.checks import dropped_keywords from snakeoil.cli import arghparse from .. import misc class TestDroppedKeywords(misc.ReportTestCase): check_kls = dropped_keywords.DroppedKeywordsCheck def mk_pkg(self, ver, keywords='', eclasses=(), **kwargs): return misc.FakePkg( f"dev-uti...
[ "snakeoil.cli.arghparse.Namespace" ]
[((558, 613), 'snakeoil.cli.arghparse.Namespace', 'arghparse.Namespace', ([], {'arches': 'arches', 'verbosity': 'verbosity'}), '(arches=arches, verbosity=verbosity)\n', (577, 613), False, 'from snakeoil.cli import arghparse\n')]
import gzip import lzma from pytest import fixture import zlib from bloom.main import construct_match_array, array_is_subset, construct_file_arrays, index_file, match_file, open_database def test_construct_match_array(): array = construct_match_array(16, ['hello', 'world'], sample_sizes=[4]) assert isinstanc...
[ "bloom.main.match_file", "gzip.open", "lzma.open", "bloom.main.open_database", "bloom.main.construct_match_array", "gzip.compress", "bloom.main.construct_file_arrays", "zlib.decompress", "bloom.main.index_file" ]
[((236, 299), 'bloom.main.construct_match_array', 'construct_match_array', (['(16)', "['hello', 'world']"], {'sample_sizes': '[4]'}), "(16, ['hello', 'world'], sample_sizes=[4])\n", (257, 299), False, 'from bloom.main import construct_match_array, array_is_subset, construct_file_arrays, index_file, match_file, open_dat...
from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.uic import loadUi class FormWindow(QtWidgets.QMainWindow): def __init__(self): super(FormWindow, self).__init__() self.ui = loadUi('GUI/form.ui',self) self.ui.show() self.submitButton = self.ui.pushButton_ok self.submi...
[ "PyQt5.uic.loadUi" ]
[((201, 228), 'PyQt5.uic.loadUi', 'loadUi', (['"""GUI/form.ui"""', 'self'], {}), "('GUI/form.ui', self)\n", (207, 228), False, 'from PyQt5.uic import loadUi\n')]
# # 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 License, Version 2.0 # (the "License"); you may not us...
[ "apache_beam.transforms.display.DisplayDataItem", "apache_beam.io.iobase.Read", "re.match", "apache_beam.coders.BytesCoder", "apache_beam.utils.annotations.deprecated", "apache_beam.transforms.Map", "apache_beam.io.iobase.Write", "google.cloud.pubsub.types.pubsub_pb2.PubsubMessage", "future.utils.it...
[((7605, 7675), 'apache_beam.utils.annotations.deprecated', 'deprecated', ([], {'since': '"""2.7.0"""', 'extra_message': '"""Use ReadFromPubSub instead."""'}), "(since='2.7.0', extra_message='Use ReadFromPubSub instead.')\n", (7615, 7675), False, 'from apache_beam.utils.annotations import deprecated\n'), ((8407, 8476),...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Part of the Reusables package. # # Copyright (c) 2014-2020 - <NAME> - MIT License from __future__ import absolute_import import datetime import re from reusables.namespace import Namespace __all__ = ["dt_exps", "datetime_regex", "now", "datetime_format", "datetime_fro...
[ "datetime.datetime.utcnow", "reusables.namespace.Namespace", "datetime.datetime.strptime", "re.compile", "datetime.datetime.now" ]
[((1986, 2006), 'reusables.namespace.Namespace', 'Namespace', ([], {}), '(**dt_exps)\n', (1995, 2006), False, 'from reusables.namespace import Namespace\n'), ((1666, 1753), 're.compile', 're.compile', (['"""((?:[\\\\d]{2}|[\\\\d]{4})[\\\\- _\\\\\\\\/]?[\\\\d]{2}[\\\\- _\\\\\\\\/]?\\\\n[\\\\d]{2})"""'], {}), "(\n '((...
import datetime import uuid from http import HTTPStatus import pytest import pytz from rest_framework.test import APIClient from tests.entities import AuthorizedUser from winter.argument_resolver import ArgumentNotSupported from winter.http import ResponseHeader def test_response_header_sets_header(): headers =...
[ "rest_framework.test.APIClient", "uuid.uuid4", "datetime.datetime.now", "tests.entities.AuthorizedUser", "pytest.raises" ]
[((395, 407), 'uuid.uuid4', 'uuid.uuid4', ([], {}), '()\n', (405, 407), False, 'import uuid\n'), ((526, 537), 'rest_framework.test.APIClient', 'APIClient', ([], {}), '()\n', (535, 537), False, 'from rest_framework.test import APIClient\n'), ((549, 565), 'tests.entities.AuthorizedUser', 'AuthorizedUser', ([], {}), '()\n...
import csv archivo = '/Users/alfonso/devel/datoscovid-19/COVID-19/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_global.csv' with open(archivo) as csv_file: csv_reader = csv.reader(csv_file, delimiter=',') line_count = 0 for row in csv_reader: if line_count == 0: ...
[ "csv.reader" ]
[((204, 239), 'csv.reader', 'csv.reader', (['csv_file'], {'delimiter': '""","""'}), "(csv_file, delimiter=',')\n", (214, 239), False, 'import csv\n')]
# -*- coding: utf-8 -*- import logging import utool as ut import numpy as np import vtool as vt import pandas as pd from wbia.algo.graph.nx_utils import ensure_multi_index from wbia.algo.graph.state import POSTV, NEGTV, INCMP print, rrr, profile = ut.inject2(__name__) logger = logging.getLogger('wbia') class Groundt...
[ "logging.getLogger", "utool.inject2", "utool.itake_column", "wbia.algo.graph.nx_utils.ensure_multi_index", "numpy.asarray", "numpy.equal", "numpy.array", "utool.take_column", "vtool.ensure_shape", "utool.nx_node_dict", "pandas.MultiIndex.from_tuples", "utool.aslist", "pandas.Series.from_arra...
[((249, 269), 'utool.inject2', 'ut.inject2', (['__name__'], {}), '(__name__)\n', (259, 269), True, 'import utool as ut\n'), ((279, 304), 'logging.getLogger', 'logging.getLogger', (['"""wbia"""'], {}), "('wbia')\n", (296, 304), False, 'import logging\n'), ((776, 793), 'numpy.array', 'np.array', (['is_comp'], {}), '(is_c...
import os import logging from decimal import Decimal import boto3 import botocore logger = logging.getLogger('analysis') def clean_detect_response(response): images = response.get('Labels', []) return [{'Name': i['Name'], 'Confidence': Decimal(str(i['Confidence']))} for i in images] def analyze_image(buc...
[ "logging.getLogger", "boto3.client" ]
[((93, 122), 'logging.getLogger', 'logging.getLogger', (['"""analysis"""'], {}), "('analysis')\n", (110, 122), False, 'import logging\n'), ((633, 660), 'boto3.client', 'boto3.client', (['"""rekognition"""'], {}), "('rekognition')\n", (645, 660), False, 'import boto3\n')]
# -*- coding: utf-8 -*- """BehaveX - Agile test wrapper on top of Behave (BDD).""" # pylint: disable=W0703 # __future__ has been added to maintain compatibility from __future__ import absolute_import, print_function import codecs import json import logging.config import multiprocessing import os import os.path impo...
[ "behavex.environment.extend_behave_hooks", "re.escape", "behavex.outputs.report_utils.text", "behavex.utils.get_logging_level", "re.compile", "behavex.utils.set_behave_tags", "behavex.utils.set_system_paths", "behavex.utils.join_feature_reports", "time.sleep", "behavex.conf_mgr.get_config", "beh...
[((1800, 1844), 'os.environ.setdefault', 'os.environ.setdefault', (['"""EXECUTION_CODE"""', '"""1"""'], {}), "('EXECUTION_CODE', '1')\n", (1821, 1844), False, 'import os\n'), ((2176, 2197), 'behavex.arguments.parse_arguments', 'parse_arguments', (['args'], {}), '(args)\n', (2191, 2197), False, 'from behavex.arguments i...
import FWCore.ParameterSet.Config as cms from DQMServices.Core.DQMEDHarvester import DQMEDHarvester from DQM.SiPixelPhase1Common.HistogramManager_cfi import * import DQM.SiPixelPhase1Common.TriggerEventFlag_cfi as trigger SiPixelPhase1TrackEfficiencyValid = DefaultHistoTrack.clone( name = "valid", title = "Valid H...
[ "FWCore.ParameterSet.Config.InputTag", "Configuration.Eras.Modifier_run3_common_cff.run3_common.toModify", "DQMServices.Core.DQMEDHarvester.DQMEDHarvester", "FWCore.ParameterSet.Config.VPSet", "FWCore.ParameterSet.Config.untracked.bool" ]
[((4871, 4967), 'Configuration.Eras.Modifier_run3_common_cff.run3_common.toModify', 'run3_common.toModify', (['SiPixelPhase1TrackEfficiencyVertices'], {'range_max': '(150.5)', 'range_nbins': '(151)'}), '(SiPixelPhase1TrackEfficiencyVertices, range_max=150.5,\n range_nbins=151)\n', (4891, 4967), False, 'from Configur...
from utils._context.library_version import LibraryVersion, Version from utils import context context.execute_warmups = lambda *args, **kwargs: None def test_version_comparizon(): v = Version("1.0", "some_component") assert v == "1.0" assert v != "1.1" assert v <= "1.1" assert v <= "1.0" as...
[ "utils._context.library_version.Version", "utils._context.library_version.LibraryVersion" ]
[((191, 223), 'utils._context.library_version.Version', 'Version', (['"""1.0"""', '"""some_component"""'], {}), "('1.0', 'some_component')\n", (198, 223), False, 'from utils._context.library_version import LibraryVersion, Version\n'), ((784, 828), 'utils._context.library_version.Version', 'Version', (['""" * ddtrace (...
""" AssignResourcesCommand class for SubarrayNodeLow. """ # Standard python imports import json # Additional import from ska.base.commands import ResultCode from ska.base import SKASubarray from . import const from tmc.common.tango_server_helper import TangoServerHelper class AssignResources(SKASubarray.AssignResou...
[ "tmc.common.tango_server_helper.TangoServerHelper.get_instance", "json.loads" ]
[((1254, 1286), 'tmc.common.tango_server_helper.TangoServerHelper.get_instance', 'TangoServerHelper.get_instance', ([], {}), '()\n', (1284, 1286), False, 'from tmc.common.tango_server_helper import TangoServerHelper\n'), ((1623, 1640), 'json.loads', 'json.loads', (['argin'], {}), '(argin)\n', (1633, 1640), False, 'impo...
import json import sys import traceback import yaml import urllib3 from requests.exceptions import ConnectionError, SSLError from .client import CLI from awxkit.utils import to_str from awxkit.exceptions import Unauthorized, Common from awxkit.cli.utils import cprint # you'll only see these warnings if you've expli...
[ "traceback.format_exc", "yaml.safe_dump", "awxkit.cli.utils.cprint", "urllib3.disable_warnings", "sys.exit", "json.dump", "sys.stdout.write" ]
[((397, 464), 'urllib3.disable_warnings', 'urllib3.disable_warnings', (['urllib3.exceptions.InsecureRequestWarning'], {}), '(urllib3.exceptions.InsecureRequestWarning)\n', (421, 464), False, 'import urllib3\n'), ((706, 717), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (714, 717), False, 'import sys\n'), ((1322, 136...
from django import test from django.http import HttpResponse from django.test import override_settings from django.utils import translation from mock import mock from model_mommy import mommy from devilry.devilry_account import middleware @override_settings( LANGUAGE_CODE='en', LANGUAGES=[ ('en', 'En...
[ "model_mommy.mommy.make", "django.http.HttpResponse", "django.utils.translation.activate", "mock.mock.MagicMock", "django.test.override_settings", "django.utils.translation.deactivate_all", "django.utils.translation.get_language", "devilry.devilry_account.middleware.LocalMiddleware" ]
[((243, 343), 'django.test.override_settings', 'override_settings', ([], {'LANGUAGE_CODE': '"""en"""', 'LANGUAGES': "[('en', 'English'), ('nb', 'Norwegian Bokmal')]"}), "(LANGUAGE_CODE='en', LANGUAGES=[('en', 'English'), ('nb',\n 'Norwegian Bokmal')])\n", (260, 343), False, 'from django.test import override_settings...
""" Django settings for thesaurus project. Generated by 'django-admin startproject' using Django 3.0.5. """ import os import re from logging.config import dictConfig from django.core.validators import MinValueValidator from django.db import DEFAULT_DB_ALIAS from django.urls import reverse_lazy from django.utils.log i...
[ "re.compile", "sentry_sdk.integrations.django.DjangoIntegration", "logging.config.dictConfig", "django.utils.translation.gettext_lazy", "os.path.join", "django.urls.reverse_lazy", "os.path.abspath", "django.core.validators.MinValueValidator" ]
[((8661, 8680), 'django.urls.reverse_lazy', 'reverse_lazy', (['"""app"""'], {}), "('app')\n", (8673, 8680), False, 'from django.urls import reverse_lazy\n'), ((8734, 8755), 'django.urls.reverse_lazy', 'reverse_lazy', (['"""login"""'], {}), "('login')\n", (8746, 8755), False, 'from django.urls import reverse_lazy\n'), (...
from collections import OrderedDict import numpy as np from pypospack.qoi import Qoi class ThermalExpansion(Qoi): """ Args: temperature_min (float,int): beginning of the temperature range in Kelvin temperature_max (float,int): end of the temperature range in Kelvin temperature_step (f...
[ "numpy.array", "collections.OrderedDict", "pypospack.qoi.Qoi.__init__", "numpy.linalg.lstsq" ]
[((819, 832), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (830, 832), False, 'from collections import OrderedDict\n'), ((893, 980), 'pypospack.qoi.Qoi.__init__', 'Qoi.__init__', (['self'], {'qoi_name': '_qoi_name', 'qoi_type': '_qoi_type', 'structures': '_structures'}), '(self, qoi_name=_qoi_name, qoi_t...
import sys import math import random from collections import namedtuple import time from pyrf.util import (compute_usable_bins, adjust_usable_fstart_fstop, trim_to_usable_fstart_fstop, find_saturation) import numpy as np from twisted.internet import defer from pyrf.numpy_util import compute_fft import struct MAXI...
[ "numpy.log10", "numpy.arange", "pyrf.util.compute_usable_bins", "numpy.where", "numpy.flipud", "pyrf.util.trim_to_usable_fstart_fstop", "pyrf.numpy_util.compute_fft", "numpy.linspace", "struct.unpack", "numpy.zeros", "numpy.interp", "numpy.frombuffer", "numpy.dtype", "twisted.internet.defe...
[((2239, 2255), 'twisted.internet.defer.Deferred', 'defer.Deferred', ([], {}), '()\n', (2253, 2255), False, 'from twisted.internet import defer\n'), ((2682, 2700), 'numpy.dtype', 'np.dtype', (['np.int32'], {}), '(np.int32)\n', (2690, 2700), True, 'import numpy as np\n'), ((3283, 3320), 'numpy.arange', 'np.arange', (['(...
import csv import datetime import dask.bag as db from argparse import ArgumentParser parser = ArgumentParser() parser.add_argument('-t', "--tmp", type=str, default="./tmp", help="Path to dir containing the identitiy csv files") parser.add_argument('-c', "--csv", type=str, default="./preprocess/dataset.csv", help="Path...
[ "datetime.datetime.now", "csv.writer", "dask.bag.read_text", "argparse.ArgumentParser" ]
[((95, 111), 'argparse.ArgumentParser', 'ArgumentParser', ([], {}), '()\n', (109, 111), False, 'from argparse import ArgumentParser\n'), ((407, 455), 'dask.bag.read_text', 'db.read_text', (["(p.tmp + '/*.csv')"], {'blocksize': '(100000)'}), "(p.tmp + '/*.csv', blocksize=100000)\n", (419, 455), True, 'import dask.bag as...
# Copyright lowRISC contributors. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 import logging as log from .item import Node, NodeType from .xbar import Xbar def elaborate(xbar: Xbar) -> bool: """elaborate reads all nodes and edges then cons...
[ "logging.error", "logging.info" ]
[((442, 515), 'logging.error', 'log.error', (['"""# of Nodes is less than 2 or no Edge exists. Cannot proceed."""'], {}), "('# of Nodes is less than 2 or no Edge exists. Cannot proceed.')\n", (451, 515), True, 'import logging as log\n'), ((6560, 6594), 'logging.info', 'log.info', (['"""fifo present no bypass"""'], {}),...
from flask import Flask, request from flask_restful import Resource, Api from joblib import load import cv2 import time import sys sys.path.append("..") from common import utils app = Flask(__name__) api = Api(app) class predict(Resource): w_search_range = 32 h_search_range = 16 scaling_factor = 2 st...
[ "common.utils.gen_roi_pos", "flask_restful.Api", "flask.Flask", "time.time", "common.utils.readb64", "common.utils.get_hog", "joblib.load", "cv2.resize", "sys.path.append" ]
[((132, 153), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (147, 153), False, 'import sys\n'), ((186, 201), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (191, 201), False, 'from flask import Flask, request\n'), ((208, 216), 'flask_restful.Api', 'Api', (['app'], {}), '(app)\n', (2...
#!/usr/bin/env python # coding: utf-8 # In[5]: 1 + 1 * 2 # In[4]: 20 // 3 + 20 // 7 ** 2 # In[2]: import random 4 + random.randint(10, 100) # In[5]: import random 4 + random.randint(10, 100) # In[ ]:
[ "random.randint" ]
[((128, 151), 'random.randint', 'random.randint', (['(10)', '(100)'], {}), '(10, 100)\n', (142, 151), False, 'import random\n'), ((184, 207), 'random.randint', 'random.randint', (['(10)', '(100)'], {}), '(10, 100)\n', (198, 207), False, 'import random\n')]
# -*- mode: python; fill-column: 100; comment-column: 100; -*- import os import sys import unittest sys.path.append( os.path.abspath( os.path.join( os.path.dirname(__file__), os.path.pardir))) import base_test class EcmasScriptTest(base_test.WebDriverBaseTest): def test_that...
[ "unittest.main", "os.path.dirname" ]
[((620, 635), 'unittest.main', 'unittest.main', ([], {}), '()\n', (633, 635), False, 'import unittest\n'), ((174, 199), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (189, 199), False, 'import os\n')]
""" View feed directly from camera """ import logging from functools import partial import click from rakali import VideoPlayer from rakali.annotate import add_frame_labels, colors from rakali.video import VideoStream logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger(__name__) def decorate_frame...
[ "logging.basicConfig", "logging.getLogger", "rakali.annotate.colors.get", "rakali.VideoPlayer", "click.option", "functools.partial", "click.version_option", "rakali.video.VideoStream" ]
[((221, 261), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.DEBUG'}), '(level=logging.DEBUG)\n', (240, 261), False, 'import logging\n'), ((272, 299), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (289, 299), False, 'import logging\n'), ((534, 556), 'click.version_...
import sys from itertools import product import pytest from pyformlang.regular_expression import PythonRegex if not sys.platform.startswith("linux"): pytest.skip("skipping ubuntu-only tests", allow_module_level=True) else: from project import ( generate_two_cycles_graph, rpq, FABoolean...
[ "project.rpq", "project.generate_two_cycles_graph", "pyformlang.regular_expression.PythonRegex", "sys.platform.startswith", "pytest.fixture", "pytest.skip" ]
[((371, 437), 'pytest.fixture', 'pytest.fixture', ([], {'params': '[FABooleanMatricesDok, FABooleanMatricesCB]'}), '(params=[FABooleanMatricesDok, FABooleanMatricesCB])\n', (385, 437), False, 'import pytest\n'), ((118, 150), 'sys.platform.startswith', 'sys.platform.startswith', (['"""linux"""'], {}), "('linux')\n", (14...
# Copyright (c) 2021 Mira Geoscience Ltd. # # This file is part of geoapps. # # geoapps is distributed under the terms and conditions of the MIT License # (see LICENSE file at the root of this source code package). from typing import Any, Dict, List, Tuple, Union from uuid import UUID from ..input_file import Inp...
[ "uuid.UUID" ]
[((7308, 7317), 'uuid.UUID', 'UUID', (['val'], {}), '(val)\n', (7312, 7317), False, 'from uuid import UUID\n'), ((7839, 7848), 'uuid.UUID', 'UUID', (['val'], {}), '(val)\n', (7843, 7848), False, 'from uuid import UUID\n'), ((8370, 8379), 'uuid.UUID', 'UUID', (['val'], {}), '(val)\n', (8374, 8379), False, 'from uuid imp...
from pfdo_mgz2img.pfdo_mgz2img import Pfdo_mgz2img def main(): chris_app = Pfdo_mgz2img() chris_app.launch() if __name__ == "__main__": main()
[ "pfdo_mgz2img.pfdo_mgz2img.Pfdo_mgz2img" ]
[((81, 95), 'pfdo_mgz2img.pfdo_mgz2img.Pfdo_mgz2img', 'Pfdo_mgz2img', ([], {}), '()\n', (93, 95), False, 'from pfdo_mgz2img.pfdo_mgz2img import Pfdo_mgz2img\n')]
from abc import abstractmethod from sqlalchemy.orm import Session, aliased, selectinload from sqlalchemy.orm.exc import NoResultFound from domainmodel.movie import Movie from domainmodel.director import Director from domainmodel.actor import Actor from domainmodel.genre import Genre from domainmodel.orm import movie_...
[ "itertools.groupby", "sqlalchemy.orm.selectinload", "domainmodel.actor.Actor", "domainmodel.user.User.id.in_", "sqlalchemy.orm.aliased", "domainmodel.user.User", "domainmodel.director.Director", "domainmodel.genre.Genre" ]
[((2313, 2337), 'domainmodel.user.User', 'User', (['username', 'password'], {}), '(username, password)\n', (2317, 2337), False, 'from domainmodel.user import User\n'), ((5353, 5377), 'domainmodel.user.User', 'User', (['username', 'password'], {}), '(username, password)\n', (5357, 5377), False, 'from domainmodel.user im...
import socket from flask import Flask, Response from PIL import Image, ImageDraw import threading from collections import deque import struct import io HOST = '0.0.0.0' PORT = 54321 image_bytes_length = 640*480*3 bbox_bytes_length = 5*8 # The socket client sends one bounding box and score. data_bytes_length = image_...
[ "collections.deque", "socket.socket", "flask.Flask", "io.BytesIO", "PIL.ImageDraw.Draw", "struct.unpack", "flask.Response", "PIL.Image.frombytes", "threading.Thread" ]
[((360, 375), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (365, 375), False, 'from flask import Flask, Response\n'), ((445, 460), 'collections.deque', 'deque', ([], {'maxlen': '(1)'}), '(maxlen=1)\n', (450, 460), False, 'from collections import deque\n'), ((693, 708), 'collections.deque', 'deque', ([], ...
########################################################################### # PROJECT: IPC (Interprocess Communication) Package # # (c) Copyright 2011 <NAME>. All rights reserved. # # FILE: module2.py # # ABSTRACT: Test program for Python version of IPC. # Publishes: MSG2 # Subscribes to: MSG1, QUE...
[ "IPC.IPC_defineMsg", "IPC.IPC_connect", "sys.stdin.fileno", "IPC.IPC_msgInstanceName", "IPC.IPC_listen", "IPC.IPC_msgInstanceFormatter", "IPC.IPC_subscribeData", "IPC.IPC_publishData", "sys.stdin.readline", "IPC.IPC_disconnect", "IPC.IPC_msgClass", "IPC.IPC_respondData" ]
[((1790, 1821), 'IPC.IPC_publishData', 'IPC.IPC_publishData', (['MSG2', 'str1'], {}), '(MSG2, str1)\n', (1809, 1821), False, 'import IPC\n'), ((2109, 2151), 'IPC.IPC_respondData', 'IPC.IPC_respondData', (['msgRef', 'RESPONSE1', 't2'], {}), '(msgRef, RESPONSE1, t2)\n', (2128, 2151), False, 'import IPC\n'), ((2223, 2243)...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
[ "azure.cli.core.commands.create_command", "azure.cli.core.profiles.supported_api_version" ]
[((1137, 1265), 'azure.cli.core.commands.create_command', 'create_command', (['__name__', 'name', 'operation', 'transform', 'table_transformer', 'client_factory'], {'exception_handler': 'exception_handler'}), '(__name__, name, operation, transform, table_transformer,\n client_factory, exception_handler=exception_han...
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import numpy as np import random import sys from geopandas import GeoDataFrame from io import StringIO from smoomapy import ( quick_stewart, quick_idw, SmoothIdw, SmoothStewart, head_tail_breaks, maximal_breaks, get_opt_nb_class) from smoomapy.helper...
[ "geopandas.GeoDataFrame.from_file", "smoomapy.helpers_classif._chain", "random.random", "smoomapy.quick_stewart", "smoomapy.SmoothIdw", "smoomapy.maximal_breaks", "smoomapy.SmoothStewart", "unittest.main", "sys.stdout.getvalue", "io.StringIO", "smoomapy.quick_idw", "smoomapy.head_tail_breaks" ...
[((25614, 25629), 'unittest.main', 'unittest.main', ([], {}), '()\n', (25627, 25629), False, 'import unittest\n'), ((508, 649), 'smoomapy.quick_idw', 'quick_idw', (['"""misc/nuts3_data.geojson"""', '"""pop2008"""'], {'power': '(1)', 'resolution': '(80000)', 'nb_class': '(8)', 'disc_func': '"""jenks"""', 'mask': '"""mis...
# Import libraries and set random seeds for reproducibility random_seed = 1237 import random random.seed( random_seed ) import numpy as np np.random.seed( random_seed ) import tensorflow as tf tf.set_random_seed( random_seed ) # Import model and instance loader import model from instance_loader import InstanceLoader im...
[ "instance_loader.InstanceLoader", "util.sparse_to_dense", "random.Random", "model.separate_batch", "tensorflow.Session", "random.seed", "util.save_weights", "tensorflow.global_variables_initializer", "model.model_builder", "numpy.random.seed", "scipy.stats.pearsonr", "tensorflow.set_random_see...
[((93, 117), 'random.seed', 'random.seed', (['random_seed'], {}), '(random_seed)\n', (104, 117), False, 'import random\n'), ((139, 166), 'numpy.random.seed', 'np.random.seed', (['random_seed'], {}), '(random_seed)\n', (153, 166), True, 'import numpy as np\n'), ((193, 224), 'tensorflow.set_random_seed', 'tf.set_random_s...
from datetime import datetime from typing import List from flask_restful import fields from src.models.community import CommunityModel from src.models.user import UserModel class KmPerUserModel: user: UserModel km: float = 0 km_accounted_for_passengers: float = 0 @staticmethod def get_marshalle...
[ "src.models.user.UserModel.get_marshaller", "src.models.community.CommunityModel.get_marshaller" ]
[((376, 402), 'src.models.user.UserModel.get_marshaller', 'UserModel.get_marshaller', ([], {}), '()\n', (400, 402), False, 'from src.models.user import UserModel\n'), ((667, 693), 'src.models.user.UserModel.get_marshaller', 'UserModel.get_marshaller', ([], {}), '()\n', (691, 693), False, 'from src.models.user import Us...
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: _ModuleToggle.py import dsz import dsz.lp import dsz.user import dsz.script import dsz.data import sys import xml.dom.minidom import re import os Act...
[ "re.compile", "sys.exit", "dsz.control.echo.Off", "os.path.exists", "os.listdir", "dsz.ui.Echo", "dsz.script.data.Store", "dsz.env.Get", "os.path.normpath", "os.path.isdir", "dsz.script.data.Start", "dsz.cmd.Run", "dsz.data.CreateCommand", "dsz.script.data.End", "dsz.env.Delete", "dsz....
[((498, 529), 're.compile', 're.compile', (['"""_PROV_(MCL_[^_]+)"""'], {}), "('_PROV_(MCL_[^_]+)')\n", (508, 529), False, 'import re\n'), ((548, 579), 're.compile', 're.compile', (['"""_PROV_(.+_TARGET)"""'], {}), "('_PROV_(.+_TARGET)')\n", (558, 579), False, 'import re\n'), ((608, 644), 're.compile', 're.compile', ([...
#!/usr/bin/env python import rospy import math import numpy as np from sensor_msgs.msg import LaserScan ####################################### # Laser Scan: # Header: Seq, Stamp, frame_id # Angle_min, Angle_max, Angle_Increment, Time_Increment # Scan time, range_min, range_max, ranges, intensities ###############...
[ "sensor_msgs.msg.LaserScan", "rospy.Subscriber", "rospy.init_node", "rospy.get_param", "numpy.array", "rospy.spin", "rospy.Publisher" ]
[((1698, 1739), 'rospy.init_node', 'rospy.init_node', (['"""noiser"""'], {'anonymous': '(True)'}), "('noiser', anonymous=True)\n", (1713, 1739), False, 'import rospy\n'), ((441, 503), 'rospy.Subscriber', 'rospy.Subscriber', (['"""/base_scan"""', 'LaserScan', 'self.laser_callback'], {}), "('/base_scan', LaserScan, self....
def find_paths(out_dir, files_ID, time_instances, month_id): import json from collections import defaultdict import networkx as nx for instance in time_instances['id']: with open(out_dir + 'data_traffic_assignment_uni-class/'+ files_ID + '_net_' + month_id + '_full_' + instance + '.txt') as M...
[ "networkx.shortest_simple_paths", "networkx.DiGraph", "networkx.all_pairs_dijkstra_path", "json.dump" ]
[((6182, 6194), 'networkx.DiGraph', 'nx.DiGraph', ([], {}), '()\n', (6192, 6194), True, 'import networkx as nx\n'), ((6539, 6577), 'networkx.all_pairs_dijkstra_path', 'nx.all_pairs_dijkstra_path', (['MA_journal'], {}), '(MA_journal)\n', (6565, 6577), True, 'import networkx as nx\n'), ((2483, 2523), 'json.dump', 'json.d...
#!/usr/bin/python import signal import sys import dweepy import time import pyupm_grove as grove import pyupm_ttp223 as ttp223 import pyupm_i2clcd as lcd def interruptHandler(signal, frame): sys.exit(0) if __name__ == '__main__': signal.signal(signal.SIGINT, interruptHandler) touch = ttp223.TTP223(6) my...
[ "pyupm_ttp223.TTP223", "signal.signal", "dweepy.dweet_for", "time.sleep", "pyupm_grove.GroveButton", "pyupm_i2clcd.Jhd1313m1", "sys.exit" ]
[((197, 208), 'sys.exit', 'sys.exit', (['(0)'], {}), '(0)\n', (205, 208), False, 'import sys\n'), ((239, 285), 'signal.signal', 'signal.signal', (['signal.SIGINT', 'interruptHandler'], {}), '(signal.SIGINT, interruptHandler)\n', (252, 285), False, 'import signal\n'), ((298, 314), 'pyupm_ttp223.TTP223', 'ttp223.TTP223',...
from flask_wtf import FlaskForm from flask_login import current_user from flask_wtf.file import FileField, FileAllowed from wtforms import StringField, PasswordField, BooleanField, SubmitField, TextAreaField from wtforms.validators import ValidationError, DataRequired, Email, EqualTo, Length from app.models impor...
[ "wtforms.validators.Email", "wtforms.validators.ValidationError", "flask_wtf.file.FileAllowed", "wtforms.BooleanField", "wtforms.SubmitField", "wtforms.validators.EqualTo", "wtforms.validators.Length", "app.models.User.query.filter_by", "wtforms.validators.DataRequired" ]
[((504, 531), 'wtforms.BooleanField', 'BooleanField', (['"""Remember Me"""'], {}), "('Remember Me')\n", (516, 531), False, 'from wtforms import StringField, PasswordField, BooleanField, SubmitField, TextAreaField\n'), ((543, 565), 'wtforms.SubmitField', 'SubmitField', (['"""Sign In"""'], {}), "('Sign In')\n", (554, 565...
# epydoc -- Utility functions # # Copyright (C) 2005 <NAME> # Author: <NAME> <<EMAIL>> # URL: <http://epydoc.sf.net> # # $Id: util.py 1671 2008-01-29 02:55:49Z edloper $ """ Miscellaneous utility functions that are used by multiple modules. @group Python source types: is_module_file, is_package_dir, is_pyname, py...
[ "os.path.exists", "re.escape", "os.listdir", "subprocess.Popen", "os.path.splitext", "re.match", "os.path.join", "os.path.split", "os.path.isfile", "os.path.isdir", "os.path.abspath", "re.sub" ]
[((869, 888), 'os.path.split', 'os.path.split', (['path'], {}), '(path)\n', (882, 888), False, 'import os, os.path, re\n'), ((917, 943), 'os.path.splitext', 'os.path.splitext', (['filename'], {}), '(filename)\n', (933, 943), False, 'import os, os.path, re\n'), ((1695, 1719), 'os.path.abspath', 'os.path.abspath', (['dir...
import pytest import simdjson def test_load(parser): """Ensure we can load from disk.""" with pytest.raises(ValueError): parser.load('jsonexamples/invalid.json') doc = parser.load("jsonexamples/small/demo.json") doc.at_pointer('/Image/Width') def test_parse(parser): """Ensure we can lo...
[ "simdjson.Parser", "pytest.raises" ]
[((691, 708), 'simdjson.Parser', 'simdjson.Parser', ([], {}), '()\n', (706, 708), False, 'import simdjson\n'), ((105, 130), 'pytest.raises', 'pytest.raises', (['ValueError'], {}), '(ValueError)\n', (118, 130), False, 'import pytest\n'), ((491, 524), 'pytest.raises', 'pytest.raises', (['UnicodeDecodeError'], {}), '(Unic...
import os import time from unittest import TestCase, skipIf from fuocore import MpvPlayer from fuocore.core.player import Playlist MP3_URL = os.path.join(os.path.dirname(__file__), '../data/fixtures/ybwm-ts.mp3') class FakeSongModel: # pylint: disable=all pass class TestPlayer(TestCas...
[ "fuocore.MpvPlayer", "os.environ.get", "time.sleep", "os.path.dirname", "fuocore.core.player.Playlist" ]
[((157, 182), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (172, 182), False, 'import os\n'), ((367, 378), 'fuocore.MpvPlayer', 'MpvPlayer', ([], {}), '()\n', (376, 378), False, 'from fuocore import MpvPlayer\n'), ((481, 517), 'os.environ.get', 'os.environ.get', (['"""TEST_ENV"""', '"""trav...
#!/usr/bin/env python3 import sys import numpy as np from example import AmiciExample class ExampleCalvetti(AmiciExample): def __init__(self): AmiciExample.__init__( self ) self.numX = 6 self.numP = 0 self.numK = 6 self.modelOptions['theta'] = [] self.modelOption...
[ "numpy.linspace", "example.AmiciExample.__init__", "sys.exit" ]
[((158, 185), 'example.AmiciExample.__init__', 'AmiciExample.__init__', (['self'], {}), '(self)\n', (179, 185), False, 'from example import AmiciExample\n'), ((404, 427), 'numpy.linspace', 'np.linspace', (['(0)', '(20)', '(201)'], {}), '(0, 20, 201)\n', (415, 427), True, 'import numpy as np\n'), ((922, 933), 'sys.exit'...
# coding: utf-8 """A Jupyter-aware wrapper for the yarn package manager""" import os # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import sys from jupyterlab_server.process import subprocess, which HERE = os.path.dirname(os.path.abspath(__file__)) YARN_PATH = o...
[ "os.execvp", "signal.signal", "os.path.join", "jupyterlab_server.process.which", "jupyterlab_server.process.subprocess.Popen", "sys.exit", "os.path.abspath" ]
[((319, 359), 'os.path.join', 'os.path.join', (['HERE', '"""staging"""', '"""yarn.js"""'], {}), "(HERE, 'staging', 'yarn.js')\n", (331, 359), False, 'import os\n'), ((280, 305), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (295, 305), False, 'import os\n'), ((666, 676), 'jupyterlab_server.p...
#!/usr/bin/env python # encoding: utf-8 # PYTHON_ARGCOMPLETE_OK # from __future__ imports must occur at the beginning of the file from __future__ import unicode_literals from __future__ import print_function from __future__ import division import sys import os # https://packaging.python.org/single_source_version/ __...
[ "os.path.expanduser", "os.getenv" ]
[((7922, 7948), 'os.getenv', 'os.getenv', (['"""BYPY_HOME"""', '""""""'], {}), "('BYPY_HOME', '')\n", (7931, 7948), False, 'import os\n'), ((7979, 8002), 'os.path.expanduser', 'os.path.expanduser', (['"""~"""'], {}), "('~')\n", (7997, 8002), False, 'import os\n')]
#!/usr/bin/env python from __future__ import print_function import argparse import os import pkgutil import sys from subprocess import check_call import kaldi parser = argparse.ArgumentParser( description="Generates autosummary documentation for pykaldi.") # parser.add_argument('--force', '-f', action='store_...
[ "os.path.exists", "argparse.ArgumentParser", "pkgutil.walk_packages", "subprocess.check_call", "os.path.join", "os.mkdir", "sys.exit" ]
[((174, 266), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Generates autosummary documentation for pykaldi."""'}), "(description=\n 'Generates autosummary documentation for pykaldi.')\n", (197, 266), False, 'import argparse\n'), ((666, 694), 'os.path.exists', 'os.path.exists', (['ar...
""" Bootstrap the Galaxy framework. This should not be called directly! Use the run.sh script in Galaxy's top level directly. """ import os import sys sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'lib'))) from galaxy.util.pastescript import serve from check_python import ch...
[ "check_python.check_python", "os.path.dirname", "galaxy.util.pastescript.serve.run", "sys.exit", "log_tempfile.TempFile" ]
[((526, 537), 'galaxy.util.pastescript.serve.run', 'serve.run', ([], {}), '()\n', (535, 537), False, 'from galaxy.util.pastescript import serve\n'), ((382, 396), 'check_python.check_python', 'check_python', ([], {}), '()\n', (394, 396), False, 'from check_python import check_python\n'), ((514, 524), 'log_tempfile.TempF...
from runner.action.feature.feature import Feature from runner.action.set.discrete import Discrete class FeatureDiscrete(Feature): """Discrete feature Alias for Feature with set.Discrete first sub action Args: low (float): low boundary high (float): high boundary num (int): number...
[ "runner.action.set.discrete.Discrete" ]
[((476, 526), 'runner.action.set.discrete.Discrete', 'Discrete', ([], {'low': 'low', 'high': 'high', 'num': 'num', 'route': 'route'}), '(low=low, high=high, num=num, route=route)\n', (484, 526), False, 'from runner.action.set.discrete import Discrete\n')]
import os import csv import threading from .classes import Node, Link, Network, Column, ColumnVec, VDFPeriod, \ AgentType, DemandPeriod, Demand, Assignment, UI from .colgen import update_links_using_columns from .consts import SMALL_DIVISOR __all__ = [ 'read_network', 'load_columns', ...
[ "yaml.full_load", "csv.DictReader", "csv.writer", "os.path.join", "requests.get", "os.getcwd", "os.path.isdir", "os.mkdir", "threading.Thread" ]
[((2460, 2477), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (2472, 2477), False, 'import requests\n'), ((3292, 3319), 'os.path.isdir', 'os.path.isdir', (['loc_data_dir'], {}), '(loc_data_dir)\n', (3305, 3319), False, 'import os\n'), ((3329, 3351), 'os.mkdir', 'os.mkdir', (['loc_data_dir'], {}), '(loc_data...
#!/usr/bin/env python from __future__ import with_statement from geode import Prop,PropManager,cache from geode.value import Worker import sys def worker_test_factory(props): x = props.get('x') y = props.add('y',5) return cache(lambda:x()*y()) def remote(conn): inputs = conn.inputs x = inputs.get('x') as...
[ "geode.value.Worker.Worker", "geode.value.Worker.worker_standalone_main", "geode.Prop", "geode.PropManager" ]
[((338, 351), 'geode.Prop', 'Prop', (['"""n"""', '(-1)'], {}), "('n', -1)\n", (342, 351), False, 'from geode import Prop, PropManager, cache\n'), ((360, 379), 'geode.Prop', 'Prop', (['"""done"""', '(False)'], {}), "('done', False)\n", (364, 379), False, 'from geode import Prop, PropManager, cache\n'), ((671, 684), 'geo...
"""Tools file for Supervisor.""" import asyncio from contextvars import ContextVar from ipaddress import IPv4Address import logging from pathlib import Path import re import socket from typing import Any from .job_monitor import JobMonitor _LOGGER: logging.Logger = logging.getLogger(__name__) RE_STRING: re.Pattern =...
[ "logging.getLogger", "socket.socket", "re.compile", "contextvars.ContextVar", "asyncio.create_subprocess_exec" ]
[((268, 295), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (285, 295), False, 'import logging\n'), ((321, 377), 're.compile', 're.compile', (['"""\\\\x1b(\\\\[.*?[@-~]|\\\\].*?(\\\\x07|\\\\x1b\\\\\\\\))"""'], {}), "('\\\\x1b(\\\\[.*?[@-~]|\\\\].*?(\\\\x07|\\\\x1b\\\\\\\\))')\n", (331, 3...
from unittest import TestCase from convertfracts import convertFracts class TestConvertFracts(TestCase): def test_convertFracts_01(self): self.assertEqual(convertFracts([[1, 2], [1, 3], [1, 4]]), [[6, 12], [4, 12], [3, 12]]) def test_convertFracts_02(self): ...
[ "convertfracts.convertFracts" ]
[((175, 214), 'convertfracts.convertFracts', 'convertFracts', (['[[1, 2], [1, 3], [1, 4]]'], {}), '([[1, 2], [1, 3], [1, 4]])\n', (188, 214), False, 'from convertfracts import convertFracts\n'), ((337, 354), 'convertfracts.convertFracts', 'convertFracts', (['[]'], {}), '([])\n', (350, 354), False, 'from convertfracts i...
from PIL import Image from tflite_runtime.interpreter import Interpreter from tflite_runtime.interpreter import load_delegate from video import create_capture import numpy as np import cv2 as cv import io import picamera import simpleaudio as sa # tf model upload def load_label...
[ "simpleaudio.WaveObject.from_wave_file", "getopt.getopt", "PIL.Image.open", "numpy.argpartition", "cv2.samples.findFile", "io.BytesIO", "picamera.PiCamera", "cv2.equalizeHist", "tflite_runtime.interpreter.load_delegate", "cv2.destroyAllWindows", "cv2.cvtColor" ]
[((1193, 1224), 'numpy.argpartition', 'np.argpartition', (['(-output)', 'top_k'], {}), '(-output, top_k)\n', (1208, 1224), True, 'import numpy as np\n'), ((5829, 5851), 'cv2.destroyAllWindows', 'cv.destroyAllWindows', ([], {}), '()\n', (5849, 5851), True, 'import cv2 as cv\n'), ((1887, 1952), 'getopt.getopt', 'getopt.g...
""" tellotracker: Allows manual operation of the drone and demo tracking mode. Requires mplayer to record/save video. Controls: - tab to lift off - WASD to move the drone - space/shift to ascend/escent slowly - Q/E to yaw slowly - arrow keys to ascend, descend, or yaw quickly - backspace to land, or P to palm-land - en...
[ "time.sleep", "cv2.imshow", "sys.exc_info", "av.open", "cv2.destroyAllWindows", "math.exp", "traceback.print_exception", "tracker.Tracker", "cv2.waitKey", "cv2.getTickFrequency", "numpy.float32", "cv2.putText", "cv2.cvtColor", "threading.Thread", "cv2.resize", "time.time", "numpy.vec...
[((2062, 2073), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (2071, 2073), False, 'import os\n'), ((2173, 2219), 'os.path.join', 'os.path.join', (['CWD_PATH', 'MODEL_NAME', 'GRAPH_NAME'], {}), '(CWD_PATH, MODEL_NAME, GRAPH_NAME)\n', (2185, 2219), False, 'import os\n'), ((2261, 2310), 'os.path.join', 'os.path.join', (['C...
# import the pygame module import pygame import math import serial # import pygame.locals for easier # access to key coordinates from pygame.locals import * data = [100,100,100,110,120,130,100,90,80,70,100,100,200,200,300,300,340,400,100,90,80,70,230,400,300,200] # initialize pygame pygame.init() # Define the dimen...
[ "pygame.draw.circle", "pygame.init", "pygame.event.get", "pygame.display.set_mode", "pygame.display.flip", "math.radians", "pygame.image.load" ]
[((287, 300), 'pygame.init', 'pygame.init', ([], {}), '()\n', (298, 300), False, 'import pygame\n'), ((352, 387), 'pygame.display.set_mode', 'pygame.display.set_mode', (['(800, 800)'], {}), '((800, 800))\n', (375, 387), False, 'import pygame\n'), ((548, 584), 'pygame.image.load', 'pygame.image.load', (['"""images/blue....
from builtins import range from datetime import timedelta import datetime import math from operator import itemgetter import re import calendar import pytz from django.conf import settings from django.utils import timezone from django.utils.translation import ugettext DATE_FORMAT = '%Y-%m-%d' DATETIME_FORMAT = '%Y-%...
[ "datetime.datetime", "pytz.timezone", "django.utils.timezone.datetime.utcnow", "calendar.Calendar", "datetime.time", "datetime.datetime.utcnow", "datetime.datetime.strptime", "django.utils.timezone.get_current_timezone", "django.utils.timezone.datetime", "django.utils.timezone.localize", "django...
[((1637, 1705), 'django.utils.timezone.datetime', 'timezone.datetime', (['start_date.year', 'start_date.month', 'start_date.day'], {}), '(start_date.year, start_date.month, start_date.day)\n', (1654, 1705), False, 'from django.utils import timezone\n'), ((2383, 2397), 'django.utils.timezone.now', 'timezone.now', ([], {...
import os import isort paths = [os.getcwd(), os.path.join(os.getcwd(), 'webapp')] for path in paths: with os.scandir(path) as loe: for entry in loe: if entry.is_file() and entry.name.endswith('.py'): print(entry.name) isort.file(os.path.join(path, entry.name)) ...
[ "os.scandir", "os.path.join", "os.getcwd" ]
[((34, 45), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (43, 45), False, 'import os\n'), ((60, 71), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (69, 71), False, 'import os\n'), ((113, 129), 'os.scandir', 'os.scandir', (['path'], {}), '(path)\n', (123, 129), False, 'import os\n'), ((288, 318), 'os.path.join', 'os.path.j...
# Copyright (c) 2021 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...
[ "numpy.prod", "hypothesis.strategies.integers", "program_config.TensorConfig", "hypothesis.strategies.booleans", "unittest.main", "program_config.OpConfig" ]
[((7681, 7696), 'unittest.main', 'unittest.main', ([], {}), '()\n', (7694, 7696), False, 'import unittest\n'), ((6363, 6516), 'program_config.OpConfig', 'OpConfig', (['"""mul"""'], {'inputs': "{'X': ['mul_x'], 'Y': ['mul_y']}", 'outputs': "{'Out': ['mul_out']}", 'x_num_col_dims': 'x_num_col_dims', 'y_num_col_dims': 'y_...
import triple_walk_native def walk_triples(triples_indexed, relation_tail_index,target_nodes, walk_length,padding_idx,seed,restart=True): return triple_walk_native.walk_triples(triples_indexed, relation_tail_index, target_nodes, ...
[ "triple_walk_native.walk_triples", "triple_walk_native.to_windows_triples", "triple_walk_native.to_windows_triples_cbow", "triple_walk_native.to_windows_cbow" ]
[((150, 278), 'triple_walk_native.walk_triples', 'triple_walk_native.walk_triples', (['triples_indexed', 'relation_tail_index', 'target_nodes', 'walk_length', 'padding_idx', 'restart', 'seed'], {}), '(triples_indexed, relation_tail_index,\n target_nodes, walk_length, padding_idx, restart, seed)\n', (181, 278), False...
from django.shortcuts import render from .models import Question from .forms import SignUpForm # Create your views here. def home(request): ''' Question 출력 ''' question_list = Question.objects.order_by('-create_date') # create_date 의 역순(-) context = {'question_list':question_list} return re...
[ "django.shortcuts.render" ]
[((318, 361), 'django.shortcuts.render', 'render', (['request', '"""home/index.html"""', 'context'], {}), "(request, 'home/index.html', context)\n", (324, 361), False, 'from django.shortcuts import render\n'), ((844, 906), 'django.shortcuts.render', 'render', (['request', '"""accounts/signup.html"""', "{'form': signup_...
# Lint as: python2, python3 # Copyright 2019 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 req...
[ "tfx.orchestration.pipeline.Pipeline", "tfx.components.Transform", "tfx.orchestration.data_types.RuntimeParameter", "tensorflow_model_analysis.GenericValueThreshold", "copy.deepcopy", "tfx.components.ExampleValidator", "tfx.orchestration.kubeflow.kubeflow_dag_runner.KubeflowDagRunnerConfig", "tfx.comp...
[((1987, 2080), 'absl.flags.DEFINE_bool', 'flags.DEFINE_bool', (['"""distributed_training"""', '(False)', '"""If True, enable distributed training."""'], {}), "('distributed_training', False,\n 'If True, enable distributed training.')\n", (2004, 2080), False, 'from absl import flags\n'), ((2290, 2325), 'os.path.join...
#=============================================================================== # Copyright 2017-2020 Intel Corporation # # 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.apa...
[ "gen_disp_common.readNextFunction", "argparse.ArgumentParser", "os.path.split" ]
[((912, 937), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (935, 937), False, 'import argparse\n'), ((1803, 1824), 'os.path.split', 'os.path.split', (['Header'], {}), '(Header)\n', (1816, 1824), False, 'import os\n'), ((2089, 2127), 'gen_disp_common.readNextFunction', 'readNextFunction', (['h...
from kickoff.kickoff_training import KickOff, KickOff1v1, KickOffOrange from math import pi kickoff_exercises = [ # KickOff('Center Kickoff', car_start_x=0, car_start_y=-4608, car_yaw=(.5 * pi)), # KickOff('Left Center Kickoff', car_start_x=256, car_start_y=-3840, car_yaw=(.5 * pi)), # KickOff('Right Cente...
[ "kickoff.kickoff_training.KickOffOrange", "kickoff.kickoff_training.KickOff1v1", "kickoff.kickoff_training.KickOff" ]
[((393, 472), 'kickoff.kickoff_training.KickOff', 'KickOff', (['"""Left Kickoff"""'], {'car_start_x': '(2048)', 'car_start_y': '(-2560)', 'car_yaw': '(0.75 * pi)'}), "('Left Kickoff', car_start_x=2048, car_start_y=-2560, car_yaw=0.75 * pi)\n", (400, 472), False, 'from kickoff.kickoff_training import KickOff, KickOff1v1...
import re def parseDeviceId(id): match = re.search('(#|\\\\)vid_([a-f0-9]{4})&pid_([a-f0-9]{4})(&|#|\\\\)', id, re.IGNORECASE) return [int(match.group(i), 16) if match else None for i in [2, 3]]
[ "re.search" ]
[((43, 133), 're.search', 're.search', (['"""(#|\\\\\\\\)vid_([a-f0-9]{4})&pid_([a-f0-9]{4})(&|#|\\\\\\\\)"""', 'id', 're.IGNORECASE'], {}), "('(#|\\\\\\\\)vid_([a-f0-9]{4})&pid_([a-f0-9]{4})(&|#|\\\\\\\\)', id, re.\n IGNORECASE)\n", (52, 133), False, 'import re\n')]
import cv2 from tkinter import Tk from tkinter.filedialog import askopenfilename import numpy as np import imutils import threading def main(): cap = cv2.VideoCapture(vid_path) status1, previous_frame = cap.read() total_frames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT)) copy_frame ...
[ "cv2.createBackgroundSubtractorMOG2", "imutils.is_cv2", "cv2.imshow", "cv2.destroyAllWindows", "cv2.threshold", "cv2.waitKey", "tkinter.filedialog.askopenfilename", "cv2.putText", "cv2.circle", "cv2.cvtColor", "cv2.GaussianBlur", "cv2.bitwise_and", "numpy.zeros", "cv2.connectedComponentsWi...
[((3251, 3404), 'tkinter.filedialog.askopenfilename', 'askopenfilename', ([], {'filetypes': "(('Video File', '*.mp4'), ('Video File', '*.avi'), ('Video File', '*.flv'),\n ('All Files', '*.*'))", 'title': '"""Choose a video."""'}), "(filetypes=(('Video File', '*.mp4'), ('Video File', '*.avi'),\n ('Video File', '*....
from abc import ( ABC, abstractmethod, ) from argparse import ( ArgumentError, ArgumentParser, Namespace, _ArgumentGroup, _SubParsersAction, ) import asyncio import logging from typing import ( Any, cast, Iterable, Tuple, Type, ) from async_service import background_asyn...
[ "p2p.asyncio_utils.wait_first", "eth_utils.ValidationError", "trinity.db.eth1.header.AsyncHeaderDB", "trinity.components.builtin.metrics.component.metrics_service_from_args", "trinity.db.eth1.chain.AsyncChainDB", "trinity.extensibility.component.run_asyncio_eth1_component", "typing.cast", "asyncio.Fut...
[((12835, 12878), 'trinity.extensibility.component.run_asyncio_eth1_component', 'run_asyncio_eth1_component', (['SyncerComponent'], {}), '(SyncerComponent)\n', (12861, 12878), False, 'from trinity.extensibility.component import run_asyncio_eth1_component\n'), ((4260, 4276), 'asyncio.Future', 'asyncio.Future', ([], {}),...
import numpy as np import scipy.stats as stats import scipy.special as spec import util class HMCParams: def __init__(self, tau, tau_g, L, eta, mass, r_clip, grad_clip): self.tau = tau self.tau_g = tau_g self.L = L self.eta = eta self.mass = mass self.r_clip = r_...
[ "numpy.clip", "numpy.abs", "numpy.sqrt", "numpy.random.rand", "numpy.log", "scipy.stats.norm.rvs", "numpy.exp", "numpy.sum", "numpy.zeros" ]
[((2760, 2786), 'numpy.zeros', 'np.zeros', (['(iters + 1, dim)'], {}), '((iters + 1, dim))\n', (2768, 2786), True, 'import numpy as np\n'), ((2833, 2859), 'numpy.zeros', 'np.zeros', (['(iters * L, dim)'], {}), '((iters * L, dim))\n', (2841, 2859), True, 'import numpy as np\n'), ((2876, 2891), 'numpy.zeros', 'np.zeros',...