code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# from tensorflow.keras import Model, Input # from tensorflow.keras.applications import vgg16, resnet50 # from tensorflow.keras.layers import (Conv2D, Conv2DTranspose, Cropping2D, add, Dropout, Reshape, Activation) # from tensorflow.keras import layers # import tensorflow as tf # # """ # FCN-8特点: # 1、不含全连接层...
[ "tensorflow.keras.layers.Conv2D", "tensorflow.keras.layers.Conv2DTranspose", "tensorflow.keras.layers.Dropout", "tensorflow.keras.layers.add", "tensorflow.keras.Input", "tensorflow.keras.applications.vgg16.VGG16", "tensorflow.keras.Model", "tensorflow.keras.layers.Softmax", "tensorflow.keras.layers....
[((7112, 7130), 'tensorflow.keras.Input', 'Input', (['input_shape'], {}), '(input_shape)\n', (7117, 7130), False, 'from tensorflow.keras import Model, Input\n'), ((7149, 7252), 'tensorflow.keras.applications.vgg16.VGG16', 'vgg16.VGG16', ([], {'input_tensor': 'inputs', 'include_top': '(False)', 'weights': 'weight_name',...
# Copyright 2017 Division of Medical Image Computing, German Cancer Research Center (DKFZ) # # 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 #...
[ "torch.nn.Dropout", "tractseg.libs.PytorchUtils.conv2d", "torch.nn.Conv2d", "torch.nn.MaxPool2d", "torch.cat", "tractseg.libs.PytorchUtils.deconv2d" ]
[((1485, 1517), 'tractseg.libs.PytorchUtils.conv2d', 'conv2d', (['n_input_channels', 'n_filt'], {}), '(n_input_channels, n_filt)\n', (1491, 1517), False, 'from tractseg.libs.PytorchUtils import conv2d\n'), ((1543, 1565), 'tractseg.libs.PytorchUtils.conv2d', 'conv2d', (['n_filt', 'n_filt'], {}), '(n_filt, n_filt)\n', (1...
import argparse import time from kubernetes.client.rest import ApiException from polyaxon_client.client import PolyaxonClient from polyaxon_k8s.manager import K8SManager from sidecar import settings from sidecar.monitor import is_pod_running if __name__ == '__main__': parser = argparse.ArgumentParser() pars...
[ "polyaxon_client.client.PolyaxonClient", "polyaxon_k8s.manager.K8SManager", "argparse.ArgumentParser", "sidecar.monitor.is_pod_running", "time.sleep" ]
[((285, 310), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (308, 310), False, 'import argparse\n'), ((920, 981), 'polyaxon_k8s.manager.K8SManager', 'K8SManager', ([], {'namespace': 'settings.K8S_NAMESPACE', 'in_cluster': '(True)'}), '(namespace=settings.K8S_NAMESPACE, in_cluster=True)\n', (93...
#! /usr/bin/env python import rospy from nav_msgs.msg import Odometry class OdomTopicReader(object): def __init__(self, topic_name = '/odom'): self._topic_name = topic_name self._sub = rospy.Subscriber(self._topic_name, Odometry, self.topic_callback) self._odomdata = Odometry() def to...
[ "nav_msgs.msg.Odometry", "rospy.is_shutdown", "rospy.init_node", "rospy.Rate", "rospy.Subscriber", "rospy.loginfo" ]
[((444, 484), 'rospy.init_node', 'rospy.init_node', (['"""odom_topic_subscriber"""'], {}), "('odom_topic_subscriber')\n", (459, 484), False, 'import rospy\n'), ((544, 558), 'rospy.Rate', 'rospy.Rate', (['(10)'], {}), '(10)\n', (554, 558), False, 'import rospy\n'), ((207, 272), 'rospy.Subscriber', 'rospy.Subscriber', ([...
"""Tests for quantization""" import numpy as np import unittest import os import shutil import yaml import tensorflow as tf def build_fake_yaml(): fake_yaml = ''' model: name: fake_yaml framework: tensorflow inputs: x outputs: op_to_store dev...
[ "yaml.load", "unittest.main", "tensorflow.compat.v1.Session", "tensorflow.compat.v1.global_variables_initializer", "os.remove", "tensorflow.graph_util.convert_variables_to_constants", "tensorflow.Graph", "tensorflow.compat.v1.placeholder", "numpy.random.random", "tensorflow.Session", "tensorflow...
[((619, 663), 'yaml.load', 'yaml.load', (['fake_yaml'], {'Loader': 'yaml.SafeLoader'}), '(fake_yaml, Loader=yaml.SafeLoader)\n', (628, 663), False, 'import yaml\n'), ((1296, 1340), 'yaml.load', 'yaml.load', (['fake_yaml'], {'Loader': 'yaml.SafeLoader'}), '(fake_yaml, Loader=yaml.SafeLoader)\n', (1305, 1340), False, 'im...
# Copyright 2020 The Cirq Developers # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
[ "cirq.google.engine.client.quantum_v1alpha1.types.QuantumProgram", "cirq.google.engine.client.quantum_v1alpha1.types.QuantumReservation", "cirq.google.engine.client.quantum_v1alpha1.types.any_pb2.Any", "cirq.google.engine.client.quantum_v1alpha1.types.QuantumResult", "google.api_core.exceptions.BadRequest",...
[((1222, 1293), 'unittest.mock.patch.object', 'mock.patch.object', (['quantum', '"""QuantumEngineServiceClient"""'], {'autospec': '(True)'}), "(quantum, 'QuantumEngineServiceClient', autospec=True)\n", (1239, 1293), False, 'from unittest import mock\n'), ((3338, 3409), 'unittest.mock.patch.object', 'mock.patch.object',...
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from google.ads.google_ads.v0.proto.resources import media_file_pb2 as google_dot_ads_dot_googleads__v0_dot_proto_dot_resources_dot_media__file__pb2 from google.ads.google_ads.v0.proto.services import media_file_service_pb2 as google_dot...
[ "grpc.method_handlers_generic_handler", "grpc.unary_unary_rpc_method_handler" ]
[((2991, 3106), 'grpc.method_handlers_generic_handler', 'grpc.method_handlers_generic_handler', (['"""google.ads.googleads.v0.services.MediaFileService"""', 'rpc_method_handlers'], {}), "(\n 'google.ads.googleads.v0.services.MediaFileService', rpc_method_handlers)\n", (3027, 3106), False, 'import grpc\n'), ((2180, 2...
from __future__ import print_function, absolute_import from sentry import analytics from sentry.signals import join_request_created, join_request_link_viewed @join_request_created.connect(weak=False) def record_join_request_created(member, **kwargs): analytics.record( "join_request.created", member_id=me...
[ "sentry.signals.join_request_created.connect", "sentry.signals.join_request_link_viewed.connect", "sentry.analytics.record" ]
[((162, 202), 'sentry.signals.join_request_created.connect', 'join_request_created.connect', ([], {'weak': '(False)'}), '(weak=False)\n', (190, 202), False, 'from sentry.signals import join_request_created, join_request_link_viewed\n'), ((377, 421), 'sentry.signals.join_request_link_viewed.connect', 'join_request_link_...
from django.conf.urls import url, include from django.contrib import admin from django.views.generic import RedirectView from django.views.generic import TemplateView from django.contrib.sitemaps.views import sitemap from django.conf import settings from blog.sitemaps import ArticleSitemap urlpatterns = [ url(r'^...
[ "django.views.generic.TemplateView.as_view", "django.conf.urls.include", "django.conf.urls.url" ]
[((313, 344), 'django.conf.urls.url', 'url', (['"""^admin/"""', 'admin.site.urls'], {}), "('^admin/', admin.site.urls)\n", (316, 344), False, 'from django.conf.urls import url, include\n'), ((456, 547), 'django.conf.urls.url', 'url', (['"""^sitemap\\\\.xml$"""', 'sitemap', "{'sitemaps': {'blog': ArticleSitemap}}"], {'n...
#!/usr/bin/env python """ @package ion_functions.qc_functions @file ion_functions/qc_functions.py @author <NAME> @brief Module containing QC functions ported from matlab samples in DPS documents """ from ion_functions.qc.qc_extensions import stuckvalues, spikevalues, gradientvalues, ntp_to_month import time import n...
[ "logging.getLogger", "numpy.sqrt", "numpy.polyfit", "ion_functions.utils.islogical", "numpy.column_stack", "numpy.asanyarray", "ion_functions.utils.isnumeric", "numpy.array", "numpy.sin", "ion_functions.qc.qc_extensions.gradientvalues", "numpy.fix", "ion_functions.qc.qc_extensions.ntp_to_month...
[((2766, 2784), 'numpy.atleast_1d', 'np.atleast_1d', (['dat'], {}), '(dat)\n', (2779, 2784), True, 'import numpy as np\n'), ((2798, 2819), 'numpy.atleast_1d', 'np.atleast_1d', (['datlim'], {}), '(datlim)\n', (2811, 2819), True, 'import numpy as np\n'), ((9354, 9374), 'numpy.max', 'np.max', (['datlim[:, 1]'], {}), '(dat...
""" This script compares events from two ETLs to highlight differences in elapsed times or row counts. * Pre-requisites You need to have a list of events for each ETL. Arthur can provide this using the "query_events" command. For example: ``` arthur.py query_events -p development 37ACEC7440AB4620 -q > 37ACEC7440AB46...
[ "tabulate.tabulate", "math.isclose", "re.compile", "collections.defaultdict", "sys.exit", "csv.reader" ]
[((1145, 1170), 're.compile', 're.compile', (['"""\\\\s+\\\\|\\\\s+"""'], {}), "('\\\\s+\\\\|\\\\s+')\n", (1155, 1170), False, 'import re\n'), ((1188, 1220), 're.compile', 're.compile', (['"""\\\\(\\\\d+\\\\s*rows\\\\)"""'], {}), "('\\\\(\\\\d+\\\\s*rows\\\\)')\n", (1198, 1220), False, 'import re\n'), ((1673, 1705), 'c...
# Augur: A Step Towards Realistic Drift Detection in Production MLSystems - Code # Copyright 2022 Carnegie Mellon University. # # NO WARRANTY. THIS CARNEGIE MELLON UNIVERSITY AND SOFTWARE ENGINEERING INSTITUTE MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, EITH...
[ "utils.logging.setup_logging", "utils.arguments.get_parsed_arguments", "datasets.dataset.load_dataset_class", "utils.config.Config.get_config_file", "utils.config.Config", "drift.drift_generator.apply_drift" ]
[((2523, 2569), 'datasets.dataset.load_dataset_class', 'dataset.load_dataset_class', (['dataset_class_name'], {}), '(dataset_class_name)\n', (2549, 2569), False, 'from datasets import dataset\n'), ((2697, 2733), 'utils.logging.setup_logging', 'logging.setup_logging', (['LOG_FILE_NAME'], {}), '(LOG_FILE_NAME)\n', (2718,...
import pytest from inference_logic import Rule, Variable, search from inference_logic.data_structures import Assert, Assign @pytest.mark.xfail def test_90(): r""" P90 (**) Eight queens problem This is a classical problem in computer science. The objective is to place eight queens on a chessboard so ...
[ "inference_logic.Variable", "inference_logic.search", "inference_logic.Variable.factory", "inference_logic.data_structures.Assert", "inference_logic.data_structures.Assign" ]
[((2700, 2797), 'inference_logic.Variable.factory', 'Variable.factory', (['"""N"""', '"""Qs"""', '"""N"""', '"""Rs"""', '"""Qs"""', '"""A"""', '"""B"""', '"""L"""', '"""A1"""', '"""Y"""', '"""Ys"""', '"""X"""', '"""Xs"""', '"""Zs"""'], {}), "('N', 'Qs', 'N', 'Rs', 'Qs', 'A', 'B', 'L', 'A1', 'Y', 'Ys',\n 'X', 'Xs', '...
#!/usr/bin/env python # # Copyright 2015 Airbus # Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA) # # 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 # # ...
[ "rqt_robot_monitor.util_robot_monitor.get_resource_name", "airbus_cobot_gui.context.Context", "python_qt_binding.loadUi", "rospy.get_param", "airbus_pyqt_extend.QtAgiGui.QAgiPopup.__init__", "airbus_cobot_gui.res.R.getIconById", "rospy.Subscriber" ]
[((1353, 1438), 'rospy.get_param', 'rospy.get_param', (['"""diagnostics_toplevel_topic_name"""', '"""/diagnostics_toplevel_state"""'], {}), "('diagnostics_toplevel_topic_name',\n '/diagnostics_toplevel_state')\n", (1368, 1438), False, 'import rospy\n'), ((1939, 2045), 'rospy.Subscriber', 'rospy.Subscriber', (['self....
"""Handles data storage for Users, rides and requests """ # pylint: disable=E1101 import datetime from flask import make_response, jsonify, current_app from werkzeug.security import generate_password_hash import psycopg2 import config from databasesetup import db class User(): """Contains user columns and method...
[ "flask.jsonify", "databasesetup.db.commit", "werkzeug.security.generate_password_hash", "databasesetup.db.con" ]
[((502, 551), 'werkzeug.security.generate_password_hash', 'generate_password_hash', (['password'], {'method': '"""sha256"""'}), "(password, method='sha256')\n", (524, 551), False, 'from werkzeug.security import generate_password_hash\n'), ((872, 880), 'databasesetup.db.con', 'db.con', ([], {}), '()\n', (878, 880), Fals...
# -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Forms wrapper # --------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # ------------------------------------------------------------------...
[ "six.iteritems", "django.utils.html.escape" ]
[((1815, 1841), 'six.iteritems', 'six.iteritems', (['self.fields'], {}), '(self.fields)\n', (1828, 1841), False, 'import six\n'), ((893, 952), 'django.utils.html.escape', 'escape', (['(self.field.label if self.field.label else self.name)'], {}), '(self.field.label if self.field.label else self.name)\n', (899, 952), Fal...
import json from django.shortcuts import get_object_or_404 from django.core import serializers from django.http import HttpResponse from .models import Unit from .utils import UNIT_LIST_FIELD BAD_REQUEST = HttpResponse(json.dumps({'error': 'Bad Request'}), status=400, content_type='application/json') def unit_json_li...
[ "django.core.serializers.serialize", "json.loads", "json.dumps", "django.http.HttpResponse" ]
[((220, 256), 'json.dumps', 'json.dumps', (["{'error': 'Bad Request'}"], {}), "({'error': 'Bad Request'})\n", (230, 256), False, 'import json\n'), ((561, 577), 'json.loads', 'json.loads', (['data'], {}), '(data)\n', (571, 577), False, 'import json\n'), ((1257, 1316), 'django.core.serializers.serialize', 'serializers.se...
''' ex029: Escreva um programa que leia a velocidade de uma carro. Se ele ultrapassar 80 km/h, mostre uma mensagem dizendo que ele foi multado. A multa vai custar R$ 7,00 por cada Km acima do limite. ''' from colorise import set_color, reset_color cor = { 'limpa':'\033[m', 'white':'\033[1;97m' } set_color(fg='...
[ "colorise.reset_color", "colorise.set_color" ]
[((306, 327), 'colorise.set_color', 'set_color', ([], {'fg': '"""green"""'}), "(fg='green')\n", (315, 327), False, 'from colorise import set_color, reset_color\n'), ((561, 574), 'colorise.reset_color', 'reset_color', ([], {}), '()\n', (572, 574), False, 'from colorise import set_color, reset_color\n'), ((653, 674), 'co...
#!/usr/bin/env python from setuptools import setup, find_packages from pymemcache import __version__ setup( name = 'pymemcache', version = __version__, author = '<NAME>', author_email = '<EMAIL>', packages = find_packages(), tests_require = ['nose>=1.0'], install_requires = ['six'], d...
[ "setuptools.find_packages" ]
[((231, 246), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (244, 246), False, 'from setuptools import setup, find_packages\n')]
import torch from plyfile import PlyData from torch_geometric.data import Data def read_ply(path): with open(path, 'rb') as f: data = PlyData.read(f) pos = ([torch.tensor(data['vertex'][axis]) for axis in ['x', 'y', 'z']]) pos = torch.stack(pos, dim=-1) face = None if 'face' in data: ...
[ "plyfile.PlyData.read", "torch.tensor", "torch.stack", "torch_geometric.data.Data" ]
[((252, 276), 'torch.stack', 'torch.stack', (['pos'], {'dim': '(-1)'}), '(pos, dim=-1)\n', (263, 276), False, 'import torch\n'), ((491, 504), 'torch_geometric.data.Data', 'Data', ([], {'pos': 'pos'}), '(pos=pos)\n', (495, 504), False, 'from torch_geometric.data import Data\n'), ((148, 163), 'plyfile.PlyData.read', 'Ply...
from mlagents.trainers.brain import BrainInfo, BrainParameters, CameraResolution from mlagents.envs.base_env import BatchedStepResult, AgentGroupSpec from mlagents.envs.exception import UnityEnvironmentException import numpy as np from typing import List def step_result_to_brain_info( step_result: BatchedStepResu...
[ "mlagents.trainers.brain.CameraResolution", "numpy.sum", "numpy.zeros", "mlagents.envs.exception.UnityEnvironmentException", "numpy.concatenate" ]
[((990, 1031), 'numpy.zeros', 'np.zeros', (['(n_agents, 0)'], {'dtype': 'np.float32'}), '((n_agents, 0), dtype=np.float32)\n', (998, 1031), True, 'import numpy as np\n'), ((1060, 1129), 'numpy.concatenate', 'np.concatenate', (['[step_result.obs[i] for i in vec_obs_indices]'], {'axis': '(1)'}), '([step_result.obs[i] for...
#!/usr/bin/env python from skimage.color import rgb2gray from skimage.io import imread, imsave from scipy.misc import toimage import numpy as np import wrapper as wr ########################################################### # IMAGE IO ########################################################### def imload_rgb(pa...
[ "skimage.color.rgb2gray", "numpy.logical_and", "numpy.where", "scipy.misc.toimage", "skimage.io.imread", "skimage.io.imsave", "numpy.random.uniform", "wrapper.data_to_pic", "numpy.random.RandomState" ]
[((2702, 2731), 'numpy.where', 'np.where', (['(image < 0)', '(0)', 'image'], {}), '(image < 0, 0, image)\n', (2710, 2731), True, 'import numpy as np\n'), ((2744, 2773), 'numpy.where', 'np.where', (['(image > 1)', '(1)', 'image'], {}), '(image > 1, 1, image)\n', (2752, 2773), True, 'import numpy as np\n'), ((5095, 5108)...
from django.db.models import fields from main.models import RoomReservation, UserRoom from django import forms from django.core.exceptions import ValidationError from django.contrib.auth import authenticate, login from django.contrib.auth import get_user_model class ReservateRoomForm(forms.Form): begin_date = for...
[ "django.forms.DateField", "main.models.UserRoom.objects.all", "django.forms.CharField" ]
[((317, 334), 'django.forms.DateField', 'forms.DateField', ([], {}), '()\n', (332, 334), False, 'from django import forms\n'), ((350, 367), 'django.forms.DateField', 'forms.DateField', ([], {}), '()\n', (365, 367), False, 'from django import forms\n'), ((414, 445), 'django.forms.CharField', 'forms.CharField', ([], {'ma...
# coding=utf-8 # Copyright 2019 The Edward2 Authors. # # 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 o...
[ "tensorflow.eye", "collections.namedtuple", "tensorflow.shape", "tensorflow.random_normal", "tensorflow.ones", "tensorflow.reduce_sum", "tensorflow.range", "tensorflow.random_uniform", "tensorflow.gather", "tensorflow.squeeze", "tensorflow.square", "tensorflow.expand_dims", "tensorflow.cast"...
[((871, 976), 'collections.namedtuple', 'collections.namedtuple', (['"""NPRegressionDescription"""', "('context_x', 'context_y', 'target_x', 'target_y')"], {}), "('NPRegressionDescription', ('context_x', 'context_y',\n 'target_x', 'target_y'))\n", (893, 976), False, 'import collections\n'), ((3274, 3303), 'tensorflo...
import strawberryfields as sf from strawberryfields import ops from strawberryfields.utils import random_interferometer from strawberryfields.apps import data, sample, subgraph, plot import plotly import networkx as nx import numpy as np class GBS: def __init__(self, samples =[], min_pho = 16, max_pho = 30, subgra...
[ "strawberryfields.Program", "strawberryfields.ops.BSgate", "strawberryfields.ops.MZgate", "strawberryfields.ops.MeasureFock", "strawberryfields.utils.random_interferometer", "strawberryfields.apps.subgraph.search", "numpy.sum", "strawberryfields.ops.Interferometer", "numpy.min", "strawberryfields....
[((621, 700), 'strawberryfields.apps.subgraph.search', 'subgraph.search', (['samples', 'pl_graph', 'subgraph_size', 'min_pho'], {'max_count': 'max_count'}), '(samples, pl_graph, subgraph_size, min_pho, max_count=max_count)\n', (636, 700), False, 'from strawberryfields.apps import data, sample, subgraph, plot\n'), ((121...
# -*- coding: utf-8 -*- """ Modules to support data reduction in Python. The main purpose of the base module ``Data_Reduction`` is to provide a suplerclass with a good set of attributes and methods to cover all common needs. The base module is also able to read data from a text file as a ``numpy`` structured array. ...
[ "logging.getLogger", "Astronomy.apparent_to_J2000", "datetime.datetime.utcfromtimestamp", "numpy.log10", "math.log", "math.cos", "numpy.array", "Math.clusters.find_clusters", "Astronomy.J2000_to_apparent", "numpy.genfromtxt", "numpy.arange", "re.search", "os.path.exists", "readline.parse_a...
[((2597, 2637), 'readline.parse_and_bind', 'readline.parse_and_bind', (['"""tab: complete"""'], {}), "('tab: complete')\n", (2620, 2637), False, 'import readline\n'), ((2648, 2675), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (2665, 2675), False, 'import logging\n'), ((43188, 43265), '...
import numpy as np from wordreps import WordReps from algebra import cosine, normalize import tensorflow as tf import random from dataset import DataSet import CGRE_Model from Eval import eval_SemEval import sklearn.preprocessing # ============ End Imports ============ class Training(): def __init__(self): # Compo...
[ "numpy.random.normal", "random.shuffle", "CGRE_Model.CGRE", "dataset.DataSet", "wordreps.WordReps", "numpy.hstack", "tensorflow.Session", "Eval.eval_SemEval", "tensorflow.global_variables_initializer", "numpy.zeros", "numpy.save" ]
[((7593, 7603), 'wordreps.WordReps', 'WordReps', ([], {}), '()\n', (7601, 7603), False, 'from wordreps import WordReps\n'), ((7714, 7730), 'numpy.zeros', 'np.zeros', (['WR.dim'], {}), '(WR.dim)\n', (7722, 7730), True, 'import numpy as np\n'), ((8127, 8199), 'dataset.DataSet', 'DataSet', (['corpus', 'Train_dataset', 'Te...
from enum import IntEnum import functools import usb.core import usb.util from traffic_light.error import TrafficLightError, MultipleTrafficLightsError BM_REQUEST_TYPE = 0x21 B_REQUEST = 0x09 W_VALUE = 0x200 W_INDEX = 0x00 ID_VENDOR = 0x0d50 ID_PRODUCT = 0x0008 INTERFACE = 0 class Color(IntEnum): RED = 0x10 ...
[ "traffic_light.error.TrafficLightError", "traffic_light.error.MultipleTrafficLightsError", "functools.partial" ]
[((3429, 3474), 'functools.partial', 'functools.partial', (['self.set_led', 'color', 'state'], {}), '(self.set_led, color, state)\n', (3446, 3474), False, 'import functools\n'), ((1131, 1184), 'traffic_light.error.TrafficLightError', 'TrafficLightError', (['"""Cleware traffic light not found!"""'], {}), "('Cleware traf...
# coding=utf-8 # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ """ FILE: sample_analyze_orchestration_app_luis_response_async.py DESCRIPTION: This sample demonstrates how to analyze user query using an orchestra...
[ "asyncio.get_event_loop", "azure.core.credentials.AzureKeyCredential" ]
[((3586, 3610), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (3608, 3610), False, 'import asyncio\n'), ((1731, 1758), 'azure.core.credentials.AzureKeyCredential', 'AzureKeyCredential', (['clu_key'], {}), '(clu_key)\n', (1749, 1758), False, 'from azure.core.credentials import AzureKeyCredential\...
import urllib.parse import webbrowser import json from xml.etree import ElementTree import sublime import SublimeHaskell.sublime_haskell_common as Common import SublimeHaskell.internals.utils as Utils import SublimeHaskell.internals.unicode_opers as UnicodeOpers import SublimeHaskell.symbols as symbols import Sublim...
[ "json.loads", "SublimeHaskell.symbols.Region.from_str", "webbrowser.open", "SublimeHaskell.parseoutput.MARKER_MANAGER.apply_autocorrect", "sublime.Region", "SublimeHaskell.types.get_type_view", "SublimeHaskell.parseoutput.MARKER_MANAGER.marks_for_view", "SublimeHaskell.symbols.escape_text", "sublime...
[((8691, 8716), 'SublimeHaskell.internals.utils.head_of', 'Utils.head_of', (['filt_types'], {}), '(filt_types)\n', (8704, 8716), True, 'import SublimeHaskell.internals.utils as Utils\n'), ((1436, 1470), 'sublime.load_resource', 'sublime.load_resource', (['scheme_path'], {}), '(scheme_path)\n', (1457, 1470), False, 'imp...
""" Nonnegative CP decomposition by Hierarchical alternating least squares (HALS). With support for missing data. """ import numpy as np import scipy as sci from scipy import linalg from tensortools.operations import unfold, khatri_rao from tensortools.tensors import KTensor from tensortools.optimize import FitResult...
[ "tensortools.optimize.optim_utils._check_cpd_inputs", "numpy.copy", "tensortools.operations.khatri_rao", "tensortools.operations.unfold", "tensortools.optimize.FitResult", "tensortools.optimize.optim_utils._get_initial_ktensor", "numpy.linalg.norm" ]
[((3073, 3083), 'numpy.copy', 'np.copy', (['X'], {}), '(X)\n', (3080, 3083), True, 'import numpy as np\n'), ((3099, 3122), 'numpy.linalg.norm', 'np.linalg.norm', (['X[mask]'], {}), '(X[mask])\n', (3113, 3122), True, 'import numpy as np\n'), ((3148, 3186), 'tensortools.optimize.optim_utils._check_cpd_inputs', 'optim_uti...
""" @author: <NAME> "Mayou36" DEPRECEATED! USE OTHER MODULES LIKE rd.data, rd.ml, rd.reweight, rd.score and rd.stat DEPRECEATED!DEPRECEATED!DEPRECEATED!DEPRECEATED!DEPRECEATED! Contains several tools to convert, load, save and plot data """ import warnings import os import copy import pandas as pd import numpy...
[ "root_numpy.array2root", "copy.deepcopy", "pickle.dump", "pickle.load", "numpy.logical_or", "os.path.isfile", "numpy.stack", "numpy.array", "numpy.asfarray", "root_numpy.root2array", "numpy.core.records.fromarrays", "uproot.open", "rootpy.io.root_open", "pandas.DataFrame", "numpy.percent...
[((1340, 1378), 'numpy.percentile', 'np.percentile', (['signal_data', 'percentile'], {}), '(signal_data, percentile)\n', (1353, 1378), True, 'import numpy as np\n'), ((3382, 3406), 'os.path.isfile', 'os.path.isfile', (['filename'], {}), '(filename)\n', (3396, 3406), False, 'import os\n'), ((1419, 1476), 'numpy.logical_...
""" delete all .pyc bytecode files in a directory tree: use the command line arg as root if given, else current working dir """ import os, sys findonly = False rootdir = os.getcwd() if len(sys.argv) == 1 else sys.argv[1] found = removed = 0 for (thisDirLevel, subsHere, filesHere) in os.walk(rootdir): for filename...
[ "os.path.join", "os.getcwd", "sys.exc_info", "os.walk", "os.remove" ]
[((286, 302), 'os.walk', 'os.walk', (['rootdir'], {}), '(rootdir)\n', (293, 302), False, 'import os, sys\n'), ((171, 182), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (180, 182), False, 'import os, sys\n'), ((396, 432), 'os.path.join', 'os.path.join', (['thisDirLevel', 'filename'], {}), '(thisDirLevel, filename)\n', (4...
import boto3 from logger import logger class States: def __init__(self, boto3_session=None): self.boto3_session = boto3_session or boto3.Session() self.client = self.boto3_session.client('stepfunctions') def fail(self, task_token, error, cause): params = dict(taskToken=task_token, er...
[ "boto3.Session", "logger.logger.json" ]
[((146, 161), 'boto3.Session', 'boto3.Session', ([], {}), '()\n', (159, 161), False, 'import boto3\n'), ((388, 407), 'logger.logger.json', 'logger.json', (['params'], {}), '(params)\n', (399, 407), False, 'from logger import logger\n'), ((592, 611), 'logger.logger.json', 'logger.json', (['params'], {}), '(params)\n', (...
from typing import Any, Dict, Optional, Type, Union from cx_const import Light, PredefinedActionsMapping from cx_core.color_helper import get_color_wheel from cx_core.controller import action from cx_core.feature_support.light import LightSupport from cx_core.integration import EventData from cx_core.integration.decon...
[ "cx_core.stepper.minmax_stepper.MinMaxStepper" ]
[((3924, 3993), 'cx_core.stepper.minmax_stepper.MinMaxStepper', 'MinMaxStepper', (['self.min_brightness', 'self.max_brightness', 'manual_steps'], {}), '(self.min_brightness, self.max_brightness, manual_steps)\n', (3937, 3993), False, 'from cx_core.stepper.minmax_stepper import MinMaxStepper\n'), ((4076, 4147), 'cx_core...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
[ "knack.arguments.CLIArgumentType" ]
[((671, 781), 'knack.arguments.CLIArgumentType', 'CLIArgumentType', ([], {'options_list': "('--name', '-n')", 'metavar': '"""NAME"""', 'help': '"""name of the resource to be fetched"""'}), "(options_list=('--name', '-n'), metavar='NAME', help=\n 'name of the resource to be fetched')\n", (686, 781), False, 'from knac...
import unittest import torch from parameterized import parameterized from src.constructor import create_backbone from src.models.backbones.utils import list_models from .test_segmentation import example_backbones def inp(bsize, in_ch, w, h): return torch.ones(bsize, in_ch, w, h) class TestBackboneCorrectness(...
[ "torch.jit.trace", "src.constructor.create_backbone", "src.models.backbones.utils.list_models", "torch.cuda.is_available", "torch.no_grad", "torch.cuda.empty_cache", "torch.rand", "torch.ones" ]
[((257, 287), 'torch.ones', 'torch.ones', (['bsize', 'in_ch', 'w', 'h'], {}), '(bsize, in_ch, w, h)\n', (267, 287), False, 'import torch\n'), ((790, 814), 'torch.cuda.empty_cache', 'torch.cuda.empty_cache', ([], {}), '()\n', (812, 814), False, 'import torch\n'), ((481, 541), 'src.models.backbones.utils.list_models', 'l...
import nltk import json import plotly import pandas as pd import plotly.graph_objects as go from nltk.stem import WordNetLemmatizer from nltk.tokenize import word_tokenize nltk.download(['punkt','wordnet']) from flask import Flask from flask import render_template, request, jsonify from plotly.graph_objs import Bar, H...
[ "flask.render_template", "flask.request.args.get", "nltk.download", "flask.Flask", "sqlalchemy.create_engine", "json.dumps", "nltk.stem.WordNetLemmatizer", "nltk.tokenize.word_tokenize", "plotly.graph_objs.Bar", "joblib.load", "pandas.read_sql_table" ]
[((172, 207), 'nltk.download', 'nltk.download', (["['punkt', 'wordnet']"], {}), "(['punkt', 'wordnet'])\n", (185, 207), False, 'import nltk\n'), ((388, 403), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (393, 403), False, 'from flask import Flask\n'), ((689, 740), 'sqlalchemy.create_engine', 'create_engi...
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import numpy as np from openvino.tools.mo.front.mxnet.mx_reshape_to_reshape import MXReshapeToReshape from openvino.tools.mo.ops.Reverse import Reverse from openvino.tools.mo.ops.mxreshape import MXReshape from openvino.tools.mo.front.c...
[ "numpy.in1d", "numpy.flip", "openvino.tools.mo.front.common.partial_infer.utils.int64_array" ]
[((1606, 1622), 'openvino.tools.mo.front.common.partial_infer.utils.int64_array', 'int64_array', (['[0]'], {}), '([0])\n', (1617, 1622), False, 'from openvino.tools.mo.front.common.partial_infer.utils import int64_array\n'), ((1952, 1968), 'openvino.tools.mo.front.common.partial_infer.utils.int64_array', 'int64_array',...
# PassWord - The Safe Password Generator App! # importing the tkinter module for GUI from tkinter import * # importing the message box widget from tkinter from tkinter import messagebox # importing sqlite3 for database import sqlite3 # importing random for password generation import random # creatin...
[ "random.sample", "random.choice", "sqlite3.connect" ]
[((496, 526), 'sqlite3.connect', 'sqlite3.connect', (['"""password.db"""'], {}), "('password.db')\n", (511, 526), False, 'import sqlite3\n'), ((2799, 2831), 'random.choice', 'random.choice', (['lowercase_letters'], {}), '(lowercase_letters)\n', (2812, 2831), False, 'import random\n'), ((2907, 2939), 'random.choice', 'r...
from flask import Flask, render_template, jsonify from reddit_handler import * app = Flask(__name__) meme_subreddits = ['izlam'] @app.route('/') def index(): return render_template('index.html') @app.route('/meme') def one_post(): sub = random.choice(meme_subreddits) re = get_posts(sub...
[ "flask.render_template", "flask.jsonify", "flask.Flask" ]
[((89, 104), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (94, 104), False, 'from flask import Flask, render_template, jsonify\n'), ((183, 212), 'flask.render_template', 'render_template', (['"""index.html"""'], {}), "('index.html')\n", (198, 212), False, 'from flask import Flask, render_template, jsonif...
import pytest from selenium import webdriver import re @pytest.fixture def driver(request): wd = webdriver.Chrome() wd.get("http://localhost/litecart/en/") request.addfinalizer(wd.quit) return wd # check that product names are identical on the main page and on product page def test_product_names(driv...
[ "selenium.webdriver.Chrome", "re.findall" ]
[((102, 120), 'selenium.webdriver.Chrome', 'webdriver.Chrome', ([], {}), '()\n', (118, 120), False, 'from selenium import webdriver\n'), ((2691, 2724), 're.findall', 're.findall', (['"""\\\\d+"""', 'regular_color'], {}), "('\\\\d+', regular_color)\n", (2701, 2724), False, 'import re\n'), ((3086, 3120), 're.findall', 'r...
import shutil from pyrite import fs from pyrite.command_line import run_command from pyrite.errors import UserError from pyrite.globals import Globals from os.path import join class LLVMInterface: _clang_path: str def __init__(self): self._clang_path = self._get_clang_path() def _get_clang_path(s...
[ "os.path.join", "pyrite.globals.Globals.get_compiler_options", "pyrite.fs.write_file", "pyrite.command_line.run_command", "pyrite.errors.UserError" ]
[((953, 993), 'pyrite.fs.write_file', 'fs.write_file', ([], {'path': 'ir_path', 'data': 'source'}), '(path=ir_path, data=source)\n', (966, 993), False, 'from pyrite import fs\n'), ((1046, 1105), 'pyrite.command_line.run_command', 'run_command', (["[self._clang_path, ir_path, '-o', output_path]"], {}), "([self._clang_pa...
from sklearn.metrics import accuracy_score from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from sklearn.feature_selection import f_classif, SelectKBest import numpy as np import pandas as pd import os mingw_path = 'C:\\Program Files\\mingw-w64\\x86_64-7.2.0-posix...
[ "sklearn.model_selection.train_test_split", "sklearn.preprocessing.StandardScaler", "sklearn.feature_selection.SelectKBest", "xgboost.cv", "xgboost.DMatrix", "pandas.read_hdf" ]
[((625, 662), 'pandas.read_hdf', 'pd.read_hdf', (['FILE_PATH_TRAIN', '"""train"""'], {}), "(FILE_PATH_TRAIN, 'train')\n", (636, 662), True, 'import pandas as pd\n'), ((969, 1014), 'sklearn.preprocessing.StandardScaler', 'StandardScaler', ([], {'with_mean': '(True)', 'with_std': '(True)'}), '(with_mean=True, with_std=Tr...
""" Django settings for CAutomation project. Generated by 'django-admin startproject' using Django 3.2.4. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ from pat...
[ "os.path.abspath", "dj_database_url.config", "os.path.join", "pathlib.Path" ]
[((560, 601), 'os.path.join', 'os.path.join', (['PROJECT_ROOT', '"""staticfiles"""'], {}), "(PROJECT_ROOT, 'staticfiles')\n", (572, 601), False, 'import os\n'), ((518, 543), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (533, 543), False, 'import os\n'), ((627, 663), 'os.path.join', 'os.path...
"""myst-parser package setup.""" from importlib import import_module from setuptools import find_packages, setup setup( name="myst-parser", version=import_module("myst_parser").__version__, description=( "An extended commonmark compliant parser, " "with bridges to docutils & sphinx." ), lo...
[ "setuptools.find_packages", "importlib.import_module" ]
[((625, 640), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (638, 640), False, 'from setuptools import find_packages, setup\n'), ((158, 186), 'importlib.import_module', 'import_module', (['"""myst_parser"""'], {}), "('myst_parser')\n", (171, 186), False, 'from importlib import import_module\n')]
from django.db import models import uuid from datetime import datetime from cassandra.cqlengine import columns from django_cassandra_engine.models import DjangoCassandraModel # Create your models here. class PostModel(DjangoCassandraModel): id = columns.UUID(primary_key=True, default=uuid.uuid4) title = column...
[ "cassandra.cqlengine.columns.DateTime", "cassandra.cqlengine.columns.UUID", "cassandra.cqlengine.columns.Text" ]
[((251, 301), 'cassandra.cqlengine.columns.UUID', 'columns.UUID', ([], {'primary_key': '(True)', 'default': 'uuid.uuid4'}), '(primary_key=True, default=uuid.uuid4)\n', (263, 301), False, 'from cassandra.cqlengine import columns\n'), ((314, 341), 'cassandra.cqlengine.columns.Text', 'columns.Text', ([], {'required': '(Tr...
#!/usr/bin/env python3 # -*- coding:utf-8-*- import tkinter.messagebox from tkinter import Button, Label, Tk from utils.functions import set_window_center from utils.sqlite_helper import DBHelper from inpanel import App class InitWindow(Tk): """初始化窗口""" def __init__(self): Tk.__init__(self) ...
[ "inpanel.App", "utils.functions.set_window_center", "tkinter.Button", "tkinter.Tk", "tkinter.Tk.__init__", "tkinter.Label", "utils.sqlite_helper.DBHelper" ]
[((295, 312), 'tkinter.Tk.__init__', 'Tk.__init__', (['self'], {}), '(self)\n', (306, 312), False, 'from tkinter import Button, Label, Tk\n'), ((349, 382), 'utils.functions.set_window_center', 'set_window_center', (['self', '(300)', '(180)'], {}), '(self, 300, 180)\n', (366, 382), False, 'from utils.functions import se...
# -*- coding=utf-8 -*- from zwechathihu.mypdf import GenPdf from db.mysqlite import simpleToolSql data=[{"url": "http://mp.weixin.qq.com/s?__biz=MzAxODQxMDM0Mw==&mid=2247484852&idx=1&sn=85b50b8b0470bb4897e517955f4e5002&chksm=9bd7fbbcaca072aa75e2a241064a403fde1e579d57ab846cd8537a54253ceb2c8b93cc3bf38e&scene=21#wechat_...
[ "db.mysqlite.simpleToolSql" ]
[((918, 938), 'db.mysqlite.simpleToolSql', 'simpleToolSql', (['"""url"""'], {}), "('url')\n", (931, 938), False, 'from db.mysqlite import simpleToolSql\n'), ((1107, 1127), 'db.mysqlite.simpleToolSql', 'simpleToolSql', (['"""url"""'], {}), "('url')\n", (1120, 1127), False, 'from db.mysqlite import simpleToolSql\n'), ((1...
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
[ "django.dispatch.receiver", "pipeline.validators.rules.FLOW_NODES_WITHOUT_STARTEVENT.append" ]
[((925, 979), 'django.dispatch.receiver', 'receiver', (['post_new_end_event_register'], {'sender': 'EndEvent'}), '(post_new_end_event_register, sender=EndEvent)\n', (933, 979), False, 'from django.dispatch import receiver\n'), ((1114, 1167), 'pipeline.validators.rules.FLOW_NODES_WITHOUT_STARTEVENT.append', 'rules.FLOW_...
# -*- coding: utf-8 -*- """ The channel model UI module Copyright 2017-2018, <NAME> and <NAME> SPDX-License-Identifier: MIT """ # pylint: disable=import-error import os import xbmcgui import xbmcplugin import resources.lib.mvutils as mvutils from resources.lib.channel import Channel class ChannelUI(Channel): ...
[ "xbmcplugin.endOfDirectory", "xbmcgui.ListItem", "xbmcplugin.addSortMethod", "resources.lib.mvutils.build_url" ]
[((1490, 1559), 'xbmcgui.ListItem', 'xbmcgui.ListItem', ([], {'label': '(resultingname if altname is None else altname)'}), '(label=resultingname if altname is None else altname)\n', (1506, 1559), False, 'import xbmcgui\n'), ((2357, 2395), 'xbmcplugin.endOfDirectory', 'xbmcplugin.endOfDirectory', (['self.handle'], {}),...
#!/usr/bin/env python3 #Credit to @Alright for the RPCs import re import os import requests import json import platform # define function that fetchs rpc creds from .conf def def_credentials(chain): operating_system = platform.system() if operating_system == 'Darwin': ac_dir = os.environ['HOME'] + '/...
[ "platform.system", "json.dumps", "json.loads", "re.search" ]
[((225, 242), 'platform.system', 'platform.system', ([], {}), '()\n', (240, 242), False, 'import platform\n'), ((1466, 1484), 'json.loads', 'json.loads', (['r.text'], {}), '(r.text)\n', (1476, 1484), False, 'import json\n'), ((940, 963), 're.search', 're.search', (['"""rpcuser"""', 'l'], {}), "('rpcuser', l)\n", (949, ...
# -*- coding: utf-8 -*- from cwr.acknowledgement import AcknowledgementRecord, MessageRecord from cwr.agreement import AgreementRecord, AgreementTerritoryRecord, \ InterestedPartyForAgreementRecord from cwr.group import Group, GroupHeader, GroupTrailer from cwr.info import AdditionalRelatedInfoRecord from cwr.pars...
[ "cwr.table_value.MediaTypeValue", "cwr.group.GroupTrailer", "cwr.other.AVIKey", "cwr.table_value.TableValue", "cwr.agreement.InterestedPartyForAgreementRecord", "cwr.work.AuthoredWorkRecord", "cwr.non_roman_alphabet.NonRomanAlphabetPerformanceDataRecord", "cwr.group.GroupHeader", "cwr.work.Instrumen...
[((4848, 5498), 'cwr.acknowledgement.AcknowledgementRecord', 'AcknowledgementRecord', ([], {'record_type': "data['record_type']", 'transaction_sequence_n': "data['transaction_sequence_n']", 'record_sequence_n': "data['record_sequence_n']", 'original_group_id': "data['original_group_id']", 'original_transaction_sequence...
import pytz from rest_auth.serializers import TokenSerializer from rest_framework.authtoken.models import Token from rest_framework.exceptions import ValidationError from rest_framework.fields import ( CharField, CurrentUserDefault, HiddenField, UUIDField, ChoiceField, ) from rest_framework.serializ...
[ "rest_framework.fields.ChoiceField", "django.contrib.auth.hashers.check_password", "rest_framework.fields.CurrentUserDefault", "rest_framework.fields.UUIDField", "rest_framework.exceptions.ValidationError", "rest_framework.fields.CharField", "open.users.models.User.objects.create", "open.users.models....
[((1538, 1578), 'rest_framework.fields.CharField', 'CharField', ([], {'write_only': '(True)', 'min_length': '(8)'}), '(write_only=True, min_length=8)\n', (1547, 1578), False, 'from rest_framework.fields import CharField, CurrentUserDefault, HiddenField, UUIDField, ChoiceField\n'), ((1600, 1694), 'rest_framework.fields....
"""Automated speech recognition tests.""" import os import sys import unittest from pathlib import Path import requests from rhasspyhermes.asr import AsrTextCaptured from rhasspyhermes.nlu import NluIntent class AsrEnglishTests(unittest.TestCase): """Test automated speech recognition (English)""" def setUp...
[ "pathlib.Path", "os.environ.get", "rhasspyhermes.nlu.NluIntent.from_dict", "rhasspyhermes.asr.AsrTextCaptured.from_dict" ]
[((353, 401), 'os.environ.get', 'os.environ.get', (['"""RHASSPY_HTTP_HOST"""', '"""localhost"""'], {}), "('RHASSPY_HTTP_HOST', 'localhost')\n", (367, 401), False, 'import os\n'), ((427, 469), 'os.environ.get', 'os.environ.get', (['"""RHASSPY_HTTP_PORT"""', '(12101)'], {}), "('RHASSPY_HTTP_PORT', 12101)\n", (441, 469), ...
import torch import torch.nn as nn import torch.nn.functional as F from .discriminator import Discriminator from .identity import Identity class MultiScaleDiscriminator(nn.Module): def __init__(self): super(MultiScaleDiscriminator, self).__init__() self.discriminators = nn.ModuleList( ...
[ "torch.nn.AvgPool1d" ]
[((455, 503), 'torch.nn.AvgPool1d', 'nn.AvgPool1d', ([], {'kernel_size': '(4)', 'stride': '(2)', 'padding': '(2)'}), '(kernel_size=4, stride=2, padding=2)\n', (467, 503), True, 'import torch.nn as nn\n')]
from django.shortcuts import render, redirect from .models import Post from .forms import ScheduleForm from django.core.paginator import Paginator # Create your views here. def view_schedule(request): all_posts = Post.objects.all().order_by('pub_date') page = int(request.GET.get('p', 1)) pagenator = Pagina...
[ "django.shortcuts.render", "django.shortcuts.redirect", "django.core.paginator.Paginator" ]
[((314, 337), 'django.core.paginator.Paginator', 'Paginator', (['all_posts', '(5)'], {}), '(all_posts, 5)\n', (323, 337), False, 'from django.core.paginator import Paginator\n'), ((386, 450), 'django.shortcuts.render', 'render', (['request', '"""schedule/view_schedule.html"""', "{'posts': posts}"], {}), "(request, 'sch...
import pandas as pd from pandas.api.types import is_numeric_dtype from grimer.utils import print_log class Metadata: valid_types = ["categorical", "numeric"] default_type = "categorical" def __init__(self, metadata_file, samples: list=[]): # Read metadata and let pandas guess dtypes, index as str...
[ "pandas.Series", "grimer.utils.print_log", "pandas.read_table" ]
[((341, 436), 'pandas.read_table', 'pd.read_table', (['metadata_file'], {'sep': '"""\t"""', 'header': '(0)', 'skiprows': '(0)', 'index_col': '(0)', 'dtype': '{(0): str}'}), "(metadata_file, sep='\\t', header=0, skiprows=0, index_col=0,\n dtype={(0): str})\n", (354, 436), True, 'import pandas as pd\n'), ((585, 638), ...
from typing import Optional, Dict, Any, List, Union from allennlp.common.checks import ConfigurationError class MetricTracker: """ This class tracks a metric during training for the dual purposes of early stopping and for knowing whether the current value is the best so far. It mimics the PyTorch `st...
[ "allennlp.common.checks.ConfigurationError" ]
[((4970, 5122), 'allennlp.common.checks.ConfigurationError', 'ConfigurationError', (['f"""You configured the trainer to use the {e.args[0]} metric for early stopping, but the model did not produce that metric."""'], {}), "(\n f'You configured the trainer to use the {e.args[0]} metric for early stopping, but the mode...
from authors.apps.utils.renderers import AppJSONRenderer import json from rest_framework.renderers import JSONRenderer class UserProfileJSONRenderer(AppJSONRenderer): name = 'profile' class UserProfileListRenderer(JSONRenderer): """ Returns profiles of existing users """ charset = 'utf-8' ...
[ "json.dumps" ]
[((482, 512), 'json.dumps', 'json.dumps', (["{'profiles': data}"], {}), "({'profiles': data})\n", (492, 512), False, 'import json\n')]
### This file is originally from: [mlcommons repo](https://github.com/mlcommons/training/tree/9947bdf21ee3f2488fa4b362eec2ce7deb2ec4dd/single_stage_detector/ssd/mlperf_logger.py) # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may ...
[ "torch.cuda.FloatTensor", "os.getenv", "torch.LongTensor", "torch.distributed.is_initialized", "torch.cuda.synchronize", "os.path.realpath", "torch.distributed.broadcast", "mlperf_logging.mllog.get_mllogger", "torch.distributed.get_rank" ]
[((933, 953), 'mlperf_logging.mllog.get_mllogger', 'mllog.get_mllogger', ([], {}), '()\n', (951, 953), False, 'from mlperf_logging import mllog\n'), ((1175, 1196), 'os.getenv', 'os.getenv', (['"""USE_CUDA"""'], {}), "('USE_CUDA')\n", (1184, 1196), False, 'import os\n'), ((1564, 1598), 'torch.distributed.is_initialized'...
import math import pymel.core as pymel from omtk.core.classNode import Node from omtk.libs import libAttr from omtk.libs import libRigging from . import model_avar_surface class SplitterNode(Node): """ A splitter is a node network that take the parameterV that is normally sent through the follicles and sp...
[ "omtk.libs.libRigging.create_safe_division", "omtk.libs.libRigging.create_utility_node", "omtk.libs.libAttr.addAttr", "pymel.core.connectAttr" ]
[((1698, 1745), 'omtk.libs.libAttr.addAttr', 'libAttr.addAttr', (['grp_splitter_inn', '"""innJawOpen"""'], {}), "(grp_splitter_inn, 'innJawOpen')\n", (1713, 1745), False, 'from omtk.libs import libAttr\n'), ((1972, 2020), 'omtk.libs.libAttr.addAttr', 'libAttr.addAttr', (['grp_splitter_inn', '"""innSurfaceU"""'], {}), "...
import FWCore.ParameterSet.Config as cms from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer l1tGct = DQMEDAnalyzer('L1TGCT', gctCentralJetsSource = cms.InputTag("gctDigis","cenJets"), gctForwardJetsSource = cms.InputTag("gctDigis","forJets"), gctTauJetsSource = cms.InputTag("gctDigis","tauJets"), ...
[ "FWCore.ParameterSet.Config.untracked.string", "FWCore.ParameterSet.Config.InputTag", "FWCore.ParameterSet.Config.int32", "FWCore.ParameterSet.Config.untracked.bool", "FWCore.ParameterSet.Config.bool" ]
[((159, 194), 'FWCore.ParameterSet.Config.InputTag', 'cms.InputTag', (['"""gctDigis"""', '"""cenJets"""'], {}), "('gctDigis', 'cenJets')\n", (171, 194), True, 'import FWCore.ParameterSet.Config as cms\n'), ((222, 257), 'FWCore.ParameterSet.Config.InputTag', 'cms.InputTag', (['"""gctDigis"""', '"""forJets"""'], {}), "('...
from setuptools import setup setup( name='modestpy', version='0.1', description='FMI-compliant model identification package', url='https://github.com/sdu-cfei/modest-py', keywords='fmi fmu optimization model identification estimation', author='<NAME>, Center for Energy Informatics SDU', aut...
[ "setuptools.setup" ]
[((30, 789), 'setuptools.setup', 'setup', ([], {'name': '"""modestpy"""', 'version': '"""0.1"""', 'description': '"""FMI-compliant model identification package"""', 'url': '"""https://github.com/sdu-cfei/modest-py"""', 'keywords': '"""fmi fmu optimization model identification estimation"""', 'author': '"""<NAME>, Cente...
import discord from discord import Embed @commands.Cog.listener() async def on_message_delete(self, message): channel = "xxxxxxxxxxxxxxxxxxxxx" deleted = Embed( description=f"Message deleted in {message.channel.mention}", color=0x4040EC ).set_author(name=message.author, url=Embed.Empty,...
[ "discord.Embed" ]
[((173, 259), 'discord.Embed', 'Embed', ([], {'description': 'f"""Message deleted in {message.channel.mention}"""', 'color': '(4210924)'}), "(description=f'Message deleted in {message.channel.mention}', color=\n 4210924)\n", (178, 259), False, 'from discord import Embed\n')]
import copy import inspect import json import logging import pytest import re import os import shutil import subprocess import time from datetime import datetime, timedelta from configparser import ConfigParser, ExtendedInterpolation from typing import Dict, List, Optional from pyhttpd.certs import CertificateSpec f...
[ "logging.getLogger", "re.compile", "time.sleep", "pytest.fail", "copy.deepcopy", "datetime.timedelta", "os.path.exists", "os.listdir", "subprocess.run", "inspect.getfile", "pytest.skip", "pyhttpd.certs.CertificateSpec", "re.match", "os.path.isfile", "os.lstat", "re.sub", "time.time",...
[((454, 481), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (471, 481), False, 'import logging\n'), ((881, 912), 'os.path.join', 'os.path.join', (['our_dir', '"""pebble"""'], {}), "(our_dir, 'pebble')\n", (893, 912), False, 'import os\n'), ((937, 977), 'os.path.join', 'os.path.join', (['...
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.base.exchange import Exchange # ----------------------------------------------------------------------------- try...
[ "json.loads", "ccxt.base.errors.InvalidOrder", "ccxt.base.errors.ArgumentsRequired", "ccxt.base.errors.InvalidAddress", "ccxt.base.errors.ExchangeError" ]
[((33242, 33328), 'ccxt.base.errors.ArgumentsRequired', 'ArgumentsRequired', (["(self.id + ' fetchOrdersWithMethod() requires a symbol argument')"], {}), "(self.id +\n ' fetchOrdersWithMethod() requires a symbol argument')\n", (33259, 33328), False, 'from ccxt.base.errors import ArgumentsRequired\n'), ((39101, 39173...
# Generated by Django 3.0.8 on 2020-07-11 08:10 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('newsapp', '0002_auto_20200711_1124'), ] operations = [ migrations.CreateModel( name='News', fields=[ ...
[ "django.db.models.DateTimeField", "django.db.models.AutoField", "django.db.models.TextField" ]
[((328, 421), '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", (344, 421), False, 'from django.db import migrations, models\...
# -*- coding: utf-8 -*- from enum import Enum from typing import TypeVar, Type, List, Iterable, cast from faker.providers import BaseProvider TEnum = TypeVar("TEnum", bound=Enum) class EnumProvider(BaseProvider): """ A Provider for enums. """ def enum(self, enum_cls: Type[TEnum]) -> TEnum: ...
[ "typing.cast", "typing.TypeVar" ]
[((152, 180), 'typing.TypeVar', 'TypeVar', (['"""TEnum"""'], {'bound': 'Enum'}), "('TEnum', bound=Enum)\n", (159, 180), False, 'from typing import TypeVar, Type, List, Iterable, cast\n'), ((349, 380), 'typing.cast', 'cast', (['Iterable[TEnum]', 'enum_cls'], {}), '(Iterable[TEnum], enum_cls)\n', (353, 380), False, 'from...
# Run with: gunicorn --workers=1 --worker-class=meinheld.gmeinheld.MeinheldWorker -b :8000 simple_server:app import bottle import ujson from bottle import route, run @route("/") def index(): return ujson.dumps({"test": True}) app = bottle.default_app()
[ "ujson.dumps", "bottle.default_app", "bottle.route" ]
[((170, 180), 'bottle.route', 'route', (['"""/"""'], {}), "('/')\n", (175, 180), False, 'from bottle import route, run\n'), ((241, 261), 'bottle.default_app', 'bottle.default_app', ([], {}), '()\n', (259, 261), False, 'import bottle\n'), ((205, 232), 'ujson.dumps', 'ujson.dumps', (["{'test': True}"], {}), "({'test': Tr...
from typing import (Any, Union, Type) # noqa: F401 from ..keys.datatypes import ( LazyBackend, PublicKey, PrivateKey, Signature, ) from eth_keys.exceptions import ( ValidationError, ) from eth_keys.validation import ( validate_message_hash, ) # These must be aliased due to a scoping issue in...
[ "eth_keys.exceptions.ValidationError", "eth_keys.validation.validate_message_hash" ]
[((912, 947), 'eth_keys.validation.validate_message_hash', 'validate_message_hash', (['message_hash'], {}), '(message_hash)\n', (933, 947), False, 'from eth_keys.validation import validate_message_hash\n'), ((2154, 2189), 'eth_keys.validation.validate_message_hash', 'validate_message_hash', (['message_hash'], {}), '(me...
from oacensus.scraper import Scraper from oacensus.commands import defaults class TestScraper(Scraper): """ Scraper for testing scraper methods. """ aliases = ['testscraper'] def scrape(self): pass def process(self): pass def test_hashcode(): scraper = Scraper.create_inst...
[ "oacensus.scraper.Scraper.create_instance" ]
[((301, 349), 'oacensus.scraper.Scraper.create_instance', 'Scraper.create_instance', (['"""testscraper"""', 'defaults'], {}), "('testscraper', defaults)\n", (324, 349), False, 'from oacensus.scraper import Scraper\n'), ((422, 470), 'oacensus.scraper.Scraper.create_instance', 'Scraper.create_instance', (['"""testscraper...
from pymodbus.client.sync import ModbusTcpClient as ModbusClient import logging FORMAT = ('%(asctime)-15s %(threadName)-15s ' '%(levelname)-8s %(module)-15s:%(lineno)-8s %(message)s') logging.basicConfig(format=FORMAT) log = logging.getLogger() log.setLevel(logging.DEBUG) client = ModbusClient('192.168.178.61...
[ "logging.basicConfig", "pymodbus.client.sync.ModbusTcpClient", "logging.getLogger" ]
[((194, 228), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': 'FORMAT'}), '(format=FORMAT)\n', (213, 228), False, 'import logging\n'), ((235, 254), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (252, 254), False, 'import logging\n'), ((292, 332), 'pymodbus.client.sync.ModbusTcpClient', 'Modb...
import unittest from selenium import webdriver import page class AboutPage(unittest.TestCase): def setUp(self): self.driver = webdriver.Firefox() self.driver.get("http://nicolesmith.nyc") #self.driver.get("http://127.0.0.1:4747/about") self.about_page = page.AboutPage(self.driver) ...
[ "unittest.main", "unittest.skip", "selenium.webdriver.Firefox", "page.AboutPage" ]
[((739, 769), 'unittest.skip', 'unittest.skip', (['"""Needs fixing."""'], {}), "('Needs fixing.')\n", (752, 769), False, 'import unittest\n'), ((906, 936), 'unittest.skip', 'unittest.skip', (['"""Needs fixing."""'], {}), "('Needs fixing.')\n", (919, 936), False, 'import unittest\n'), ((1082, 1112), 'unittest.skip', 'un...
# Copyright 2016-2018, Pulumi 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
[ "pulumi.CustomResource.__init__", "asyncio.sleep" ]
[((702, 718), 'asyncio.sleep', 'asyncio.sleep', (['(0)'], {}), '(0)\n', (715, 718), False, 'import asyncio\n'), ((928, 1023), 'pulumi.CustomResource.__init__', 'CustomResource.__init__', (['self', '"""test:index:FileResource"""', 'name', "{'contents': file_contents}"], {}), "(self, 'test:index:FileResource', name, {'co...
import copy import json from ghcl.models.pull_request import PullRequest class PRData: def __init__(self, data: dict = None): if data is None: with open('./tests/models/empty_pr_data.json') as file: self._data = json.load(file) else: self._data = data ...
[ "json.load", "ghcl.models.pull_request.PullRequest", "copy.deepcopy" ]
[((381, 406), 'copy.deepcopy', 'copy.deepcopy', (['self._data'], {}), '(self._data)\n', (394, 406), False, 'import copy\n'), ((565, 590), 'copy.deepcopy', 'copy.deepcopy', (['self._data'], {}), '(self._data)\n', (578, 590), False, 'import copy\n'), ((928, 953), 'copy.deepcopy', 'copy.deepcopy', (['self._data'], {}), '(...
# Copyright (c) AT&T 2012-2013 <NAME> <<EMAIL>> # Copyright 2012 IBM Corp. # # 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 # # ...
[ "nova.servicegroup.API", "eventlet.sleep", "nova.servicegroup.drivers.zk.ZooKeeperDriver" ]
[((1656, 1674), 'nova.servicegroup.API', 'servicegroup.API', ([], {}), '()\n', (1672, 1674), False, 'from nova import servicegroup\n'), ((2038, 2055), 'eventlet.sleep', 'eventlet.sleep', (['(1)'], {}), '(1)\n', (2052, 2055), False, 'import eventlet\n'), ((2188, 2206), 'nova.servicegroup.API', 'servicegroup.API', ([], {...
"""Tests for miscellaneous properties, such as debuggability.""" import time from chopsticks.tunnel import Docker from chopsticks.group import Group def test_tunnel_repr(): """Tunnels have a usable repr.""" tun = Docker('py36', image='python:3.6') assert repr(tun) == "Docker('py36')" def test_group_repr...
[ "chopsticks.tunnel.Docker" ]
[((223, 257), 'chopsticks.tunnel.Docker', 'Docker', (['"""py36"""'], {'image': '"""python:3.6"""'}), "('py36', image='python:3.6')\n", (229, 257), False, 'from chopsticks.tunnel import Docker\n'), ((387, 421), 'chopsticks.tunnel.Docker', 'Docker', (['"""py35"""'], {'image': '"""python:3.5"""'}), "('py35', image='python...
import turtle import random p1=turtle.Turtle() p1.color("green") p1.shape("turtle") p1.penup() p1.goto(-200,100) p2=p1.clone() p2.color("blue") p2.penup() p2.goto(-200,-100) p1.goto(300,60) p1.pendown() p1.circle(40) p1.penup() p1.goto(-200,100) p2.goto(300,-140) p2.pendown() p2.circle(40) p2.penup() p2.goto(-200,-...
[ "random.choice", "turtle.Turtle" ]
[((32, 47), 'turtle.Turtle', 'turtle.Turtle', ([], {}), '()\n', (45, 47), False, 'import turtle\n'), ((589, 607), 'random.choice', 'random.choice', (['die'], {}), '(die)\n', (602, 607), False, 'import random\n'), ((792, 810), 'random.choice', 'random.choice', (['die'], {}), '(die)\n', (805, 810), False, 'import random\...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Python version: 3.6 import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import copy import numpy as np from torchvision import datasets, transforms import torch import os import torch.distributed as dist from utils.sampling import mnist_iid, mnist_non...
[ "matplotlib.pyplot.ylabel", "torch.distributed.init_process_group", "copy.deepcopy", "utils.sampling.cifar_iid", "matplotlib.pyplot.xlabel", "utils.sampling.mnist_noniid", "torchvision.transforms.ToTensor", "models.Fed.FedAvg", "models.Nets.CNNCifar", "matplotlib.use", "models.Update.LocalUpdate...
[((87, 108), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (101, 108), False, 'import matplotlib\n'), ((876, 889), 'utils.options.args_parser', 'args_parser', ([], {}), '()\n', (887, 889), False, 'from utils.options import args_parser\n'), ((953, 973), 'torch.manual_seed', 'torch.manual_seed', (...
from aws_cdk.aws_lambda import Function, Code, Runtime from aws_cdk.core import Stack, Duration from b_aws_testing_framework.tools.cdk_testing.testing_stack import TestingStack from b_cfn_lambda_layer.package_version import PackageVersion from b_lambda_layer_common.layer import Layer from b_lambda_layer_common_test.un...
[ "b_aws_testing_framework.tools.cdk_testing.testing_stack.TestingStack.global_prefix", "aws_cdk.aws_lambda.Code.from_asset", "aws_cdk.core.Duration.minutes", "b_cfn_lambda_layer.package_version.PackageVersion.from_string_version" ]
[((691, 712), 'aws_cdk.aws_lambda.Code.from_asset', 'Code.from_asset', (['root'], {}), '(root)\n', (706, 712), False, 'from aws_cdk.aws_lambda import Function, Code, Runtime\n'), ((813, 832), 'aws_cdk.core.Duration.minutes', 'Duration.minutes', (['(5)'], {}), '(5)\n', (829, 832), False, 'from aws_cdk.core import Stack,...
# <NAME> (<EMAIL>) from __future__ import division, print_function from builtins import range import numpy as np import scipy.stats as ss import mlpaper.constants as cc import mlpaper.mlpaper as bt import mlpaper.perf_curves as pc from mlpaper.classification import DEFAULT_NGRID, curve_boot from mlpaper.test_constan...
[ "numpy.random.rand", "mlpaper.util.area", "numpy.array", "builtins.range", "numpy.mean", "mlpaper.classification.curve_boot", "scipy.stats.binom_test", "mlpaper.util.interp1d", "numpy.dot", "numpy.linspace", "numpy.random.seed", "numpy.min", "mlpaper.mlpaper.boot_EB", "numpy.abs", "numpy...
[((3095, 3129), 'numpy.zeros', 'np.zeros', (['DEFAULT_NGRID'], {'dtype': 'int'}), '(DEFAULT_NGRID, dtype=int)\n', (3103, 3129), True, 'import numpy as np\n'), ((3150, 3184), 'numpy.zeros', 'np.zeros', (['DEFAULT_NGRID'], {'dtype': 'int'}), '(DEFAULT_NGRID, dtype=int)\n', (3158, 3184), True, 'import numpy as np\n'), ((3...
from typing import Any, Dict import numpy as np import pandas as pd import core.artificial_signal_generators as sig_gen import core.statistics as stats import core.timeseries_study as tss import helpers.unit_test as hut class TestTimeSeriesDailyStudy(hut.TestCase): def test_usual_case(self) -> None: idx...
[ "pandas.Series", "core.timeseries_study.TimeSeriesDailyStudy", "core.timeseries_study.map_dict_to_dataframe", "core.artificial_signal_generators.ArmaProcess", "numpy.array", "helpers.unit_test.convert_df_to_string", "pandas.date_range", "core.timeseries_study.TimeSeriesMinutelyStudy" ]
[((323, 364), 'pandas.date_range', 'pd.date_range', (['"""2018-12-31"""', '"""2019-01-31"""'], {}), "('2018-12-31', '2019-01-31')\n", (336, 364), True, 'import pandas as pd\n'), ((419, 445), 'pandas.Series', 'pd.Series', (['vals'], {'index': 'idx'}), '(vals, index=idx)\n', (428, 445), True, 'import pandas as pd\n'), ((...
# VAR example from statsmodels.tsa.vector_ar.var_model import VAR from random import random # contrived dataset with dependency data = list() for i in range(100): v1 = i + random() v2 = v1 + random() row = [v1, v2] data.append(row) # fit model model = VAR(data) model_fit = model.fit() # make prediction ...
[ "random.random", "statsmodels.tsa.vector_ar.var_model.VAR" ]
[((268, 277), 'statsmodels.tsa.vector_ar.var_model.VAR', 'VAR', (['data'], {}), '(data)\n', (271, 277), False, 'from statsmodels.tsa.vector_ar.var_model import VAR\n'), ((176, 184), 'random.random', 'random', ([], {}), '()\n', (182, 184), False, 'from random import random\n'), ((199, 207), 'random.random', 'random', ([...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jun 9 23:28:21 2017 @author: samriddhi """ import re import sangita.hindi.tokenizer as tok import sangita.hindi.corpora.lemmata as lt def numericLemmatizer(instr): lst = type([1,2,3]) tup = type(("Hello", "Hi")) string = type("Hello") ...
[ "sangita.hindi.corpora.lemmata.drawlist", "sangita.hindi.tokenizer.tokenize", "re.compile" ]
[((337, 446), 're.compile', 're.compile', (['"""([०१२३४५६७८९]+[\\\\.\\\\,]*)+[०१२३४५६७८९]+|([-+]*\\\\d+[\\\\.\\\\,]*)+\\\\d+|([०१२३४५६७८९]+|\\\\d+)"""'], {}), "(\n '([०१२३४५६७८९]+[\\\\.\\\\,]*)+[०१२३४५६७८९]+|([-+]*\\\\d+[\\\\.\\\\,]*)+\\\\d+|([०१२३४५६७८९]+|\\\\d+)'\n )\n", (347, 446), False, 'import re\n'), ((167...
from mock import patch from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.contrib.auth import get_user_model from django.core import exceptions from django_dynamic_fixture import G from django_webtest import WebTest from icekit.models import Layout from...
[ "django.contrib.auth.get_user_model", "django.contrib.contenttypes.models.ContentType.objects.get_for_model", "django_dynamic_fixture.G", "icekit.page_types.layout_page.models.LayoutPage", "django.contrib.sites.models.Site.objects.first", "icekit.utils.fluent_contents.create_content_instance" ]
[((447, 463), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (461, 463), False, 'from django.contrib.auth import get_user_model\n'), ((1461, 1515), 'django_dynamic_fixture.G', 'G', (['Layout'], {'template_name': '"""icekit/layouts/default.html"""'}), "(Layout, template_name='icekit/layouts/de...
""" Mock up a video feed pipeline """ import asyncio import logging import sys import cv2 logging.basicConfig(format="[%(thread)-5d]%(asctime)s: %(message)s") logger = logging.getLogger('async') logger.setLevel(logging.INFO) async def process_video(filename): cap = cv2.VideoCapture(filename) tasks = list() ...
[ "logging.basicConfig", "logging.getLogger", "asyncio.sleep", "cv2.VideoCapture", "asyncio.gather", "asyncio.get_event_loop" ]
[((92, 160), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""[%(thread)-5d]%(asctime)s: %(message)s"""'}), "(format='[%(thread)-5d]%(asctime)s: %(message)s')\n", (111, 160), False, 'import logging\n'), ((170, 196), 'logging.getLogger', 'logging.getLogger', (['"""async"""'], {}), "('async')\n", (187, 1...
#!/usr/bin/python3 """ Read "lspci -v" and "glxinfo" outputs """ import re from dataclasses import dataclass from InputFileNotFoundError import InputFileNotFoundError @dataclass class VideoCard: type = "graphics-card" manufacturer_brand = "" reseller_brand = "" internal_name = "" model = "" ...
[ "InputFileNotFoundError.InputFileNotFoundError", "argparse.ArgumentParser", "re.search" ]
[((11116, 11181), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Parse lspci/glxinfo output"""'}), "(description='Parse lspci/glxinfo output')\n", (11139, 11181), False, 'import argparse\n'), ((577, 611), 'InputFileNotFoundError.InputFileNotFoundError', 'InputFileNotFoundError', (['lspci...
#!/usr/bin/env python """ Classify oncodrive gene results and prepare for combination * Configuration parameters: - The ones required by intogen.data.entity.EntityManagerFactory * Input: - oncodrive_ids: The mrna.oncodrive_genes to process * Output: - combinations: The mrna.combination prepared to be calculated ...
[ "wok.element.DataElement", "uuid.uuid4", "wok.task.Task", "intogen.data.entity.server.EntityServer" ]
[((849, 879), 'intogen.data.entity.server.EntityServer', 'EntityServer', (["conf['entities']"], {}), "(conf['entities'])\n", (861, 879), False, 'from intogen.data.entity.server import EntityServer\n'), ((2006, 2030), 'wok.element.DataElement', 'DataElement', ([], {'key_sep': '"""/"""'}), "(key_sep='/')\n", (2017, 2030)...
import GeneralStats as gs import numpy as np from scipy.stats import skew from scipy.stats import kurtosistest import pandas as pd if __name__ == "__main__": gen=gs.GeneralStats() data=np.array([[1, 1, 2, 2, 3],[2, 2, 3, 3, 5],[1, 4, 3, 3, 3],[2, 4, 5, 5, 3]]) data1=np.array([1,2,3,4,5]) ...
[ "GeneralStats.GeneralStats", "numpy.array", "pandas.Series", "scipy.stats.skew" ]
[((178, 195), 'GeneralStats.GeneralStats', 'gs.GeneralStats', ([], {}), '()\n', (193, 195), True, 'import GeneralStats as gs\n'), ((208, 286), 'numpy.array', 'np.array', (['[[1, 1, 2, 2, 3], [2, 2, 3, 3, 5], [1, 4, 3, 3, 3], [2, 4, 5, 5, 3]]'], {}), '([[1, 1, 2, 2, 3], [2, 2, 3, 3, 5], [1, 4, 3, 3, 3], [2, 4, 5, 5, 3]]...
""" A simple, good-looking plot =========================== Demoing some simple features of matplotlib """ import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt fig = plt.figure(figsize=(5, 4), dpi=72) axes = fig.add_axes([0.01, 0.01, .98, 0.98]) X = np.linspace(0, 2, 200) Y = np...
[ "matplotlib.pyplot.grid", "matplotlib.use", "matplotlib.pyplot.plot", "matplotlib.pyplot.figure", "numpy.linspace", "numpy.sin", "matplotlib.pyplot.ylim", "matplotlib.pyplot.show" ]
[((146, 167), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (160, 167), False, 'import matplotlib\n'), ((207, 241), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(5, 4)', 'dpi': '(72)'}), '(figsize=(5, 4), dpi=72)\n', (217, 241), True, 'import matplotlib.pyplot as plt\n'), ((291, 3...
import os import re from typing import Tuple from pfio._typing import Union from pfio.container import Container from pfio.io import IO, create_fs_handler class FileSystemDriverList(object): def __init__(self): # TODO(tianqi): dynamically create this list # as well as the patterns upon loading th...
[ "os.path.join", "pfio.io.create_fs_handler", "re.compile" ]
[((409, 446), 're.compile', 're.compile', (['"""file:\\\\/\\\\/(?P<path>.+)"""'], {}), "('file:\\\\/\\\\/(?P<path>.+)')\n", (419, 446), False, 'import re\n'), ((474, 511), 're.compile', 're.compile', (['"""(?P<path>hdfs:\\\\/\\\\/.+)"""'], {}), "('(?P<path>hdfs:\\\\/\\\\/.+)')\n", (484, 511), False, 'import re\n'), ((1...
from threading import current_thread from jsbeautifier.javascript.beautifier import remove_redundant_indentation from pyparser.oleparser import OleParser from pyparser.hwp_parser import HwpParser from scan.init_scan import init_hwp5_scan from scan.bindata_scanner import BinData_Scanner from scan.jscript_scanner import...
[ "zipfile.ZipFile", "scan.paratext_scanner.ParaText_Scanner", "scan.bindata_scanner.BinData_Scanner", "platform.platform", "pyparser.oleparser.OleParser", "os.path.split", "scan.init_scan.init_hwp5_scan", "scan.jscript_scanner.JS_Scanner", "os.getcwd", "utils.dumphex.print_hexdump", "os.system", ...
[((957, 973), 'os.system', 'os.system', (['"""cls"""'], {}), "('cls')\n", (966, 973), False, 'import os\n'), ((992, 1010), 'os.system', 'os.system', (['"""clear"""'], {}), "('clear')\n", (1001, 1010), False, 'import os\n'), ((3501, 3520), 'platform.platform', 'platform.platform', ([], {}), '()\n', (3518, 3520), False, ...
""" Tests for plugins in core module. Only unit tests for now. """ from unittest.mock import patch import click from nile.core.plugins import get_installed_plugins, load_plugins, skip_click_exit def test_skip_click_exit(): def dummy_method(a, b): return a + b dummy_result = dummy_method(1, 2) ...
[ "nile.core.plugins.get_installed_plugins", "click.group", "nile.core.plugins.skip_click_exit", "nile.core.plugins.load_plugins", "unittest.mock.patch" ]
[((333, 362), 'nile.core.plugins.skip_click_exit', 'skip_click_exit', (['dummy_method'], {}), '(dummy_method)\n', (348, 362), False, 'from nile.core.plugins import get_installed_plugins, load_plugins, skip_click_exit\n'), ((846, 859), 'click.group', 'click.group', ([], {}), '()\n', (857, 859), False, 'import click\n'),...
from django.contrib.contenttypes.models import ContentType from django.test import TestCase from django.test.client import Client from model_mommy import mommy from devices.models import Device from users.models import Lageruser class HistoryTests(TestCase): def setUp(self): self.client = Client() ...
[ "django.test.client.Client", "model_mommy.mommy.make", "django.contrib.contenttypes.models.ContentType.objects.get", "users.models.Lageruser.objects.create_superuser" ]
[((306, 314), 'django.test.client.Client', 'Client', ([], {}), '()\n', (312, 314), False, 'from django.test.client import Client\n'), ((336, 397), 'users.models.Lageruser.objects.create_superuser', 'Lageruser.objects.create_superuser', (['"""test"""', '"""<EMAIL>"""', '"""test"""'], {}), "('test', '<EMAIL>', 'test')\n"...
from __future__ import absolute_import, division, print_function from cctbx.array_family import flex from scitbx import matrix import math from libtbx import adopt_init_args import scitbx.lbfgs from mmtbx.bulk_solvent import kbu_refinery from cctbx import maptbx import mmtbx.masks import boost_adaptbx.boost.python as b...
[ "mmtbx.masks.bulk_solvent", "cctbx.array_family.flex.grid", "math.log", "math.exp", "scitbx.matrix.sqr", "cctbx.array_family.flex.min", "cctbx.array_family.flex.double", "cctbx.array_family.flex.std_string", "mmtbx.bulk_solvent.kbu_refinery.lbfgs_run", "libtbx.group_args", "collections.OrderedDi...
[((336, 377), 'boost_adaptbx.boost.python.import_ext', 'bp.import_ext', (['"""cctbx_asymmetric_map_ext"""'], {}), "('cctbx_asymmetric_map_ext')\n", (349, 377), True, 'import boost_adaptbx.boost.python as bp\n'), ((662, 694), 'boost_adaptbx.boost.python.import_ext', 'bp.import_ext', (['"""mmtbx_masks_ext"""'], {}), "('m...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 1999-2018 Alibaba Group Holding Ltd. # # 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-...
[ "mars.tensor.expressions.base.ptp", "numpy.testing.assert_equal", "numpy.random.rand", "mars.tensor.expressions.base.argwhere", "mars.tensor.expressions.base.moveaxis", "mars.tensor.expressions.base.copyto", "mars.tensor.expressions.base.vsplit", "mars.tensor.expressions.base.average", "numpy.array"...
[((1394, 1411), 'mars.tensor.execution.core.Executor', 'Executor', (['"""numpy"""'], {}), "('numpy')\n", (1402, 1411), False, 'from mars.tensor.execution.core import Executor\n'), ((1463, 1488), 'numpy.random.random', 'np.random.random', (['(11, 8)'], {}), '((11, 8))\n', (1479, 1488), True, 'import numpy as np\n'), ((1...
import sys import matplotlib matplotlib.use('Agg') sys.path.insert(0, 'lib')
[ "matplotlib.use", "sys.path.insert" ]
[((29, 50), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (43, 50), False, 'import matplotlib\n'), ((51, 76), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""lib"""'], {}), "(0, 'lib')\n", (66, 76), False, 'import sys\n')]
import matplotlib matplotlib.use('Agg') import numpy as np import matplotlib.pyplot as plt from glob import glob from astropy.table import Table, join from os import chdir, system from scipy.stats import norm as gauss_norm from sys import argv from getopt import getopt # turn off polyfit ranking warnings import warnin...
[ "numpy.polyfit", "numpy.array", "numpy.isfinite", "numpy.poly1d", "numpy.histogram", "numpy.polynomial.chebyshev.chebval", "numpy.polynomial.legendre.legfit", "matplotlib.pyplot.close", "numpy.linspace", "numpy.nanmax", "glob.glob", "numpy.abs", "getopt.getopt", "numpy.nanstd", "matplotl...
[((18, 39), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (32, 39), False, 'import matplotlib\n'), ((323, 356), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (346, 356), False, 'import warnings\n'), ((4237, 4302), 'astropy.table.Table.read', 'Table...
#=============================================================== # @author: <EMAIL> # @written: 08 December 2021 # @desc: Routes for the Backend server #=============================================================== # Import section with referecne of entry file or main file; from __main__ import applicatio...
[ "flask.render_template", "flask.request.form.keys", "__main__.application.route", "__main__.application.logger.exception", "flask.url_for", "flask.redirect", "flask.request.form.values", "__main__.application.errorhandler", "flask.jsonify" ]
[((659, 702), '__main__.application.route', 'application.route', (['"""/test"""'], {'methods': "['GET']"}), "('/test', methods=['GET'])\n", (676, 702), False, 'from __main__ import application\n'), ((771, 810), '__main__.application.route', 'application.route', (['"""/"""'], {'methods': "['GET']"}), "('/', methods=['GE...