code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
#!/usr/bin/env python #-*- coding:utf-8 -*- ## ## formula.py ## ## Created on: Dec 7, 2016 ## Author: <NAME> ## E-mail: <EMAIL> ## """ =============== List of classes =============== .. autosummary:: :nosignatures: IDPool CNF CNFPlus WCNF WCN...
[ "itertools.chain", "aiger_cnf.aig2cnf", "copy.deepcopy", "io.StringIO", "pysat._fileio.FileObject" ]
[((19160, 19182), 'copy.deepcopy', 'copy.deepcopy', (['clauses'], {}), '(clauses)\n', (19173, 19182), False, 'import copy\n'), ((21483, 21544), 'aiger_cnf.aig2cnf', 'aiger_cnf.aig2cnf', (['aig'], {'fresh': 'self.vpool.id', 'force_true': '(False)'}), '(aig, fresh=self.vpool.id, force_true=False)\n', (21500, 21544), Fals...
# Copyright 2019 TerraPower, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
[ "armi.apps.App" ]
[((12097, 12107), 'armi.apps.App', 'apps.App', ([], {}), '()\n', (12105, 12107), False, 'from armi import apps\n'), ((12046, 12056), 'armi.apps.App', 'apps.App', ([], {}), '()\n', (12054, 12056), False, 'from armi import apps\n')]
# -*- coding: utf-8 -*- import csv import logging import math import multiprocessing import os import shutil import time from concurrent.futures import ThreadPoolExecutor from pathlib import Path from typing import Dict, List, Tuple from django.utils import timezone import numpy as np import pandas as pd import psut...
[ "csv.DictWriter", "rpy2.robjects.pandas2ri.activate", "pandas.read_csv", "data_refinery_common.logging.get_and_configure_logger", "multiprocessing.cpu_count", "numpy.array", "rpy2.robjects.r", "os.path.exists", "pathlib.Path", "rpy2.robjects.packages.importr", "django.utils.timezone.now", "os....
[((811, 881), 'data_refinery_common.utils.get_env_variable', 'get_env_variable', (['"""S3_RESULTS_BUCKET_NAME"""', '"""refinebio-results-bucket"""'], {}), "('S3_RESULTS_BUCKET_NAME', 'refinebio-results-bucket')\n", (827, 881), False, 'from data_refinery_common.utils import get_env_variable\n'), ((899, 950), 'data_refin...
from copy import deepcopy from dataclasses import dataclass, asdict from logging import getLogger, WARNING import anyconfig import click import sys from pathlib import Path from typing import List, Tuple from .command import CwsMultiCommands from .error import CwsClientError from ..config import DEFAULT_PROJECT_DIR, ...
[ "logging.getLogger", "dataclasses.asdict", "pathlib.Path", "click.group", "click.option", "sys.stderr.write", "sys.exit", "anyconfig.multi_load" ]
[((452, 465), 'click.group', 'click.group', ([], {}), '()\n', (463, 465), False, 'import click\n'), ((564, 735), 'click.option', 'click.option', (['"""-p"""', '"""--project-dir"""'], {'default': 'DEFAULT_PROJECT_DIR', 'help': 'f"""The project directory path (absolute or relative) [default to \'{DEFAULT_PROJECT_DIR}\']....
from __future__ import absolute_import from __future__ import division from __future__ import print_function # from smac.env.multiagentenv import MultiAgentEnv # from smac.env.starcraft2.maps import get_map_params from ..multiagentenv import MultiAgentEnv from ..starcraft2.maps import get_map_params import atexit fro...
[ "operator.attrgetter", "numpy.eye", "s2clientprotocol.raw_pb2.ActionRawUnitCommand", "copy.deepcopy", "s2clientprotocol.sc2api_pb2.InterfaceOptions", "s2clientprotocol.sc2api_pb2.RequestJoinGame", "absl.logging.info", "time.sleep", "s2clientprotocol.raw_pb2.ActionRaw", "numpy.append", "numpy.arr...
[((7454, 7469), 'time.sleep', 'time.sleep', (['(100)'], {}), '(100)\n', (7464, 7469), False, 'import math, time\n'), ((10200, 10223), 'numpy.zeros', 'np.zeros', (['self.n_agents'], {}), '(self.n_agents)\n', (10208, 10223), True, 'import numpy as np\n'), ((10259, 10283), 'numpy.zeros', 'np.zeros', (['self.n_enemies'], {...
import gym.wrappers from nn.mlp import MLP import pickle def test_cartpole(nn, file): global observation nn.load(file) for _ in range(500): env.render() action = nn.forward(observation) observation, reward, done, info = env.step(round(action.item())) if done: b...
[ "nn.mlp.MLP", "pickle.dump" ]
[((653, 665), 'nn.mlp.MLP', 'MLP', (['(4)', '(2)', '(1)'], {}), '(4, 2, 1)\n', (656, 665), False, 'from nn.mlp import MLP\n'), ((406, 429), 'pickle.dump', 'pickle.dump', (['nn', 'output'], {}), '(nn, output)\n', (417, 429), False, 'import pickle\n')]
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- import ...
[ "sphinx_rtd_theme.get_html_theme_path", "os.getenv", "os.path.join", "os.path.dirname", "os.path.abspath" ]
[((653, 698), 'os.path.join', 'os.path.join', (['""".."""', '"""mutatest"""', '"""__init__.py"""'], {}), "('..', 'mutatest', '__init__.py')\n", (665, 698), False, 'import os\n'), ((616, 637), 'os.path.abspath', 'os.path.abspath', (['""".."""'], {}), "('..')\n", (631, 637), False, 'import os\n'), ((722, 747), 'os.path.d...
#!/usr/bin/env python3 from sage.all import ZZ, Combinations from dissect.traits.trait_interface import compute_results from dissect.utils.custom_curve import CustomCurve from dissect.utils.json_handler import FLOAT_PRECISION def i04_curve_function(curve: CustomCurve, weight): """Computes the number of curve po...
[ "dissect.traits.trait_interface.compute_results", "sage.all.ZZ" ]
[((1112, 1199), 'dissect.traits.trait_interface.compute_results', 'compute_results', (['curve_list', '"""i04"""', 'i04_curve_function'], {'desc': 'desc', 'verbose': 'verbose'}), "(curve_list, 'i04', i04_curve_function, desc=desc, verbose=\n verbose)\n", (1127, 1199), False, 'from dissect.traits.trait_interface impor...
import numbers from typing import Any, Dict, List, Optional, Sequence, Tuple, Union import numpy as np import torch from PIL import Image, ImageOps, ImageEnhance from typing_extensions import Literal try: import accimage except ImportError: accimage = None @torch.jit.unused def _is_pil_image(img: Any) -> bo...
[ "numpy.uint8", "PIL.ImageEnhance.Contrast", "numpy.array", "PIL.ImageOps.posterize", "PIL.ImageOps.autocontrast", "PIL.ImageOps.expand", "numpy.asarray", "PIL.ImageEnhance.Sharpness", "PIL.ImageEnhance.Color", "PIL.ImageOps.invert", "numpy.maximum", "PIL.ImageOps.equalize", "PIL.ImageOps.sol...
[((1472, 1500), 'PIL.ImageEnhance.Brightness', 'ImageEnhance.Brightness', (['img'], {}), '(img)\n', (1495, 1500), False, 'from PIL import Image, ImageOps, ImageEnhance\n'), ((1776, 1802), 'PIL.ImageEnhance.Contrast', 'ImageEnhance.Contrast', (['img'], {}), '(img)\n', (1797, 1802), False, 'from PIL import Image, ImageOp...
from PIL import Image import PIL import tkinter as tk from tkinter.filedialog import askopenfile, asksaveasfile from tkinter.messagebox import showinfo, askyesno, askokcancel import enum class ValueType(enum.Enum): Bool = 0 Int = 1 Float = 2 IntPair = 3 Vec2 = 4 NormVec2 = 5 ...
[ "tkinter.messagebox.showinfo", "PIL.Image.open", "tkinter.messagebox.askokcancel", "tkinter.filedialog.asksaveasfile", "tkinter.Button", "tkinter.Tk", "tkinter.Label", "tkinter.filedialog.askopenfile", "tkinter.PhotoImage", "tkinter.Text", "tkinter.Frame" ]
[((17403, 17439), 'tkinter.Button', 'tk.Button', (['frame'], {'text': '"""X"""', 'bg': '"""red"""'}), "(frame, text='X', bg='red')\n", (17412, 17439), True, 'import tkinter as tk\n'), ((17837, 17870), 'tkinter.Text', 'tk.Text', (['frame'], {'width': '(3)', 'height': '(1)'}), '(frame, width=3, height=1)\n', (17844, 1787...
# Circular primes # Problem 35 # The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime. # There are thirteen such primes below 100: 2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79, and 97. # How many circular primes are there below one million? from commo...
[ "common.PrimeGenerator" ]
[((671, 697), 'common.PrimeGenerator', 'PrimeGenerator', ([], {'lt': '(1000000)'}), '(lt=1000000)\n', (685, 697), False, 'from common import PrimeGenerator, lst_to_int, is_prime\n')]
import inspect import configparser import os.path # ---------------------------------------------------------------------------------------------------------------------- def create_sql_object(): """ Create a sql resources object. :return: A sql resources object. """ module_d = os.pa...
[ "configparser.ConfigParser", "inspect.stack" ]
[((458, 485), 'configparser.ConfigParser', 'configparser.ConfigParser', ([], {}), '()\n', (483, 485), False, 'import configparser\n'), ((329, 344), 'inspect.stack', 'inspect.stack', ([], {}), '()\n', (342, 344), False, 'import inspect\n')]
""" Flask app with auto-discovery of blueprints, cli commands etc. """ import copy import functools import sys import types import typing import click import flask from mara_app import config, layout from mara_page import response, _, bootstrap, navigation from werkzeug import exceptions def module_functionalities...
[ "mara_page._.p", "werkzeug.exceptions.InternalServerError", "mara_app.layout.layout", "flask.url_for", "mara_app.config.navigation_root", "werkzeug.exceptions.HTTPException.__subclasses__", "functools.lru_cache", "copy.copy", "mara_app.config.flask_config" ]
[((4720, 4753), 'functools.lru_cache', 'functools.lru_cache', ([], {'maxsize': 'None'}), '(maxsize=None)\n', (4739, 4753), False, 'import functools\n'), ((4903, 4927), 'mara_app.config.navigation_root', 'config.navigation_root', ([], {}), '()\n', (4925, 4927), False, 'from mara_app import config, layout\n'), ((4307, 43...
# cython.* namespace for pure mode. __version__ = "0.23dev" # BEGIN shameless copy from Cython/minivect/minitypes.py class _ArrayType(object): is_array = True subtypes = ['dtype'] def __init__(self, dtype, ndim, is_c_contig=False, is_f_contig=False, inner_contig=False, broadcasting=Non...
[ "Cython.Build.Inline.cython_inline", "Cython.Build.Inline.RuntimeCompiledFunction" ]
[((3192, 3218), 'Cython.Build.Inline.RuntimeCompiledFunction', 'RuntimeCompiledFunction', (['f'], {}), '(f)\n', (3215, 3218), False, 'from Cython.Build.Inline import RuntimeCompiledFunction\n'), ((3012, 3043), 'Cython.Build.Inline.cython_inline', 'cython_inline', (['f', '*args'], {}), '(f, *args, **kwds)\n', (3025, 304...
import torch import random from tqdm import trange from layers import Subgraph, Discriminator from utils import GraphDatasetGenerator import itertools import json from tqdm import tqdm import numpy as np import os class Subgraph_Learning(object): def __init__(self, args): super(Subgraph_Learning, self)._...
[ "torch.randperm", "torch.mean", "json.dumps", "torch.exp", "layers.Discriminator", "layers.Subgraph", "torch.cuda.is_available", "torch.nn.BCEWithLogitsLoss", "utils.GraphDatasetGenerator" ]
[((388, 425), 'utils.GraphDatasetGenerator', 'GraphDatasetGenerator', (['self.args.data'], {}), '(self.args.data)\n', (409, 425), False, 'from utils import GraphDatasetGenerator\n'), ((611, 639), 'torch.nn.BCEWithLogitsLoss', 'torch.nn.BCEWithLogitsLoss', ([], {}), '()\n', (637, 639), False, 'import torch\n'), ((1552, ...
import numpy as np from pyray.shapes.twod.paraboloid import * from pyray.shapes.twod.functional import * from pyray.rotation import * from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt from matplotlib import cm from matplotlib.ticker import LinearLocator, FormatStrFormatter import matplotlib as mpl...
[ "numpy.eye", "numpy.sqrt", "numpy.array", "matplotlib.pyplot.figure", "numpy.linspace", "numpy.dot", "numpy.cos", "numpy.sin", "numpy.meshgrid", "numpy.arange", "matplotlib.pyplot.show" ]
[((1463, 1475), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (1473, 1475), True, 'import matplotlib.pyplot as plt\n'), ((1514, 1544), 'numpy.linspace', 'np.linspace', (['(0)', '(2 * np.pi)', '(100)'], {}), '(0, 2 * np.pi, 100)\n', (1525, 1544), True, 'import numpy as np\n'), ((1555, 1579), 'numpy.arange'...
from django import forms from core.models import Post class PostCreateForm(forms.ModelForm): class Meta: model = Post fields = ('text','image') widgets = { 'text' : forms.TextInput(attrs={ 'class' : 'form-control form-control-sm', 'placeholder' :'...
[ "django.forms.TextInput" ]
[((206, 311), 'django.forms.TextInput', 'forms.TextInput', ([], {'attrs': "{'class': 'form-control form-control-sm', 'placeholder': 'Caption this .... '}"}), "(attrs={'class': 'form-control form-control-sm',\n 'placeholder': 'Caption this .... '})\n", (221, 311), False, 'from django import forms\n')]
import cc_dat_utils #Part 1 input_dat_file = "data/pfgd_test.dat" #Use cc_dat_utils.make_cc_level_pack_from_dat() to load the file specified by input_dat_file mylevel = cc_dat_utils.make_cc_level_pack_from_dat(input_dat_file) #print the resulting data print(mylevel)
[ "cc_dat_utils.make_cc_level_pack_from_dat" ]
[((171, 227), 'cc_dat_utils.make_cc_level_pack_from_dat', 'cc_dat_utils.make_cc_level_pack_from_dat', (['input_dat_file'], {}), '(input_dat_file)\n', (211, 227), False, 'import cc_dat_utils\n')]
import os import numpy as np from vmaf import plt from vmaf.core.cross_validation import ModelCrossValidation from vmaf.core.feature_assembler import FeatureAssembler from vmaf.core.quality_runner import VmafQualityRunner from vmaf.core.result_store import FileSystemResultStore from vmaf.tools.misc import indices, get...
[ "vmaf.core.train_test_model.TrainTestModel.find_subclass", "vmaf.core.quality_runner.VmafQualityRunner.predict_with_model", "numpy.array", "vmaf.core.local_explainer.LocalExplainer", "vmaf.config.VmafConfig.file_result_store_path", "vmaf.config.VmafConfig.workspace_path", "vmaf.plt.subplots", "vmaf.co...
[((19415, 19682), 'vmaf.core.feature_assembler.FeatureAssembler', 'FeatureAssembler', ([], {'feature_dict': 'feature_param.feature_dict', 'feature_option_dict': 'None', 'assets': 'train_assets', 'logger': 'logger', 'fifo_mode': 'fifo_mode', 'delete_workdir': '(True)', 'result_store': 'result_store', 'optional_dict': 'N...
# -*- coding: utf-8 -*- """ easybimehlanding This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). """ import unittest from ..http_response_catcher import HttpResponseCatcher from easybimehlanding.easybimehlanding_client import EasybimehlandingClient from easybimehlanding...
[ "easybimehlanding.easybimehlanding_client.EasybimehlandingClient" ]
[((693, 717), 'easybimehlanding.easybimehlanding_client.EasybimehlandingClient', 'EasybimehlandingClient', ([], {}), '()\n', (715, 717), False, 'from easybimehlanding.easybimehlanding_client import EasybimehlandingClient\n')]
import logging import plotly.graph_objects as go from bots import imps, load_candle from openbb_terminal.common.technical_analysis import volume_model from openbb_terminal.decorators import log_start_end # pylint: disable=R0913 logger = logging.getLogger(__name__) @log_start_end(log=logger) def adosc_command( ...
[ "logging.getLogger", "bots.load_candle.candle_fig", "bots.load_candle.stock_data", "bots.imps.image_border", "bots.imps.inter_chart", "openbb_terminal.common.technical_analysis.volume_model.adosc", "openbb_terminal.decorators.log_start_end" ]
[((240, 267), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (257, 267), False, 'import logging\n'), ((271, 296), 'openbb_terminal.decorators.log_start_end', 'log_start_end', ([], {'log': 'logger'}), '(log=logger)\n', (284, 296), False, 'from openbb_terminal.decorators import log_start_en...
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-05-20 10:23 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('driver', '0003_auto_20180520_1217'), ] operations = [ migrations.AlterModelOptions( ...
[ "django.db.migrations.AlterModelOptions", "django.db.migrations.RenameField" ]
[((289, 375), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""car"""', 'options': "{'ordering': ['seat_capacity']}"}), "(name='car', options={'ordering': [\n 'seat_capacity']})\n", (317, 375), False, 'from django.db import migrations\n'), ((415, 513), 'django.db.migrations...
#------------------------------ """Class :py:class:`QWList` is a QListView->QWidget for list model =================================================================== Usage :: # Run test: python lcls2/psdaq/psdaq/control_gui/QWList.py from psdaq.control_gui.QWList import QWList w = QWList() Copy psana.g...
[ "logging.getLogger", "logging.basicConfig", "PyQt5.QtGui.QStandardItemModel", "PyQt5.QtGui.QStandardItem", "PyQt5.QtWidgets.QListView.closeEvent", "PyQt5.QtWidgets.QApplication" ]
[((408, 435), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (425, 435), False, 'import logging\n'), ((6840, 6902), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(message)s"""', 'level': 'logging.DEBUG'}), "(format='%(message)s', level=logging.DEBUG)\n", (6859, 6902),...
"""Validate services schema.""" from importlib import import_module from pathlib import Path import voluptuous as vol from ..const import ATTR_ADDON, ATTR_CONFIG, ATTR_DISCOVERY, ATTR_SERVICE, ATTR_UUID from ..utils.validate import schema_or from ..validate import uuid_match def valid_discovery_service(service): ...
[ "voluptuous.Required", "importlib.import_module", "pathlib.Path", "voluptuous.Invalid", "voluptuous.Maybe", "voluptuous.Optional" ]
[((475, 518), 'voluptuous.Invalid', 'vol.Invalid', (['f"""Service {service} not found"""'], {}), "(f'Service {service} not found')\n", (486, 518), True, 'import voluptuous as vol\n'), ((659, 720), 'importlib.import_module', 'import_module', (['f""".services.{service}"""', '"""supervisor.discovery"""'], {}), "(f'.servic...
from __future__ import absolute_import from __future__ import division from past.utils import old_div from proteus import * from proteus.default_n import * try: from .adr_bl_3d_p import * except: from adr_bl_3d_p import * #steady-state so no time integration timeIntegration = NoIntegration #number of outpu...
[ "past.utils.old_div" ]
[((698, 719), 'past.utils.old_div', 'old_div', (['(he ** 3)', '(6.0)'], {}), '(he ** 3, 6.0)\n', (705, 719), False, 'from past.utils import old_div\n')]
# This script is a demo to perform basic operations on GCP AutoML Tables model training. # # Reference: https://github.com/GoogleCloudPlatform/python-docs-samples/blob/tables/tables/automl/automl_tables_predict.py # import argparse import os def predict(project_id, compute_region, model_id, file_path): """ M...
[ "argparse.ArgumentParser", "pandas.read_csv", "subprocess.call", "google.cloud.automl_v1beta1.PredictionServiceClient", "google.cloud.automl_v1beta1.AutoMlClient", "json.dump" ]
[((669, 690), 'google.cloud.automl_v1beta1.AutoMlClient', 'automl.AutoMlClient', ([], {}), '()\n', (688, 690), True, 'from google.cloud import automl_v1beta1 as automl\n'), ((896, 928), 'google.cloud.automl_v1beta1.PredictionServiceClient', 'automl.PredictionServiceClient', ([], {}), '()\n', (926, 928), True, 'from goo...
from django import template from django.contrib.contenttypes.models import ContentType from ..models import Comment from ..forms import CommentForm register = template.Library() @register.simple_tag def get_comment_count(obj): content_type = ContentType.objects.get_for_model(obj) return Comment.objects.filte...
[ "django.contrib.contenttypes.models.ContentType.objects.get_for_model", "django.template.Library" ]
[((161, 179), 'django.template.Library', 'template.Library', ([], {}), '()\n', (177, 179), False, 'from django import template\n'), ((249, 287), 'django.contrib.contenttypes.models.ContentType.objects.get_for_model', 'ContentType.objects.get_for_model', (['obj'], {}), '(obj)\n', (282, 287), False, 'from django.contrib....
from qsim.qcircuit import QCircuit from qsim.qconstants import H, I, X circuit = QCircuit() circuit.addQubits(0, 0, 0, 1) circuit.addGates([H, H, H, H]) # BEGIN Uf - function constant # circuit.addGate(X, 3) # END Uf # BEGIN Uf - function balanced circuit.addToffoli([0, 1], 3) circuit.addCNOT(2, 3) # END Uf circuit...
[ "qsim.qcircuit.QCircuit" ]
[((81, 91), 'qsim.qcircuit.QCircuit', 'QCircuit', ([], {}), '()\n', (89, 91), False, 'from qsim.qcircuit import QCircuit\n')]
import pytest from model.contact import ContactInfo from model.group import Group import random def test_del_contact_from_group(app, ormdb): group = None # проверить есть ли контакты with pytest.allure.step('Precondition: check that at least 1 contact exist or create'): if len(ormdb.get_contact_l...
[ "model.group.Group", "model.contact.ContactInfo", "pytest.allure.step" ]
[((203, 289), 'pytest.allure.step', 'pytest.allure.step', (['"""Precondition: check that at least 1 contact exist or create"""'], {}), "(\n 'Precondition: check that at least 1 contact exist or create')\n", (221, 289), False, 'import pytest\n'), ((1005, 1084), 'pytest.allure.step', 'pytest.allure.step', (['"""Precon...
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-06-23 18:25 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('filer', '0004_auto_20160328...
[ "django.db.models.ForeignKey" ]
[((461, 636), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'blank': '(True)', 'null': '(True)', 'on_delete': 'django.db.models.deletion.SET_NULL', 'related_name': '"""owned_files"""', 'to': 'settings.AUTH_USER_MODEL', 'verbose_name': '"""owner"""'}), "(blank=True, null=True, on_delete=django.db.models.\n ...
# !/usr/bin/env python """Run a test calculation on localhost. Usage: ./example_01.py """ from os import path from aiida_shengbte import helpers from aiida import cmdline, engine, orm from aiida.plugins import DataFactory, CalculationFactory, WorkflowFactory import click import logging logging.basicConfig(level=loggin...
[ "logging.basicConfig", "aiida_shengbte.helpers.get_computer", "logging.info", "aiida_shengbte.helpers.get_code", "os.path.realpath", "aiida_shengbte.helpers.get_test_structure", "aiida.cmdline.utils.decorators.with_dbenv", "aiida.plugins.DataFactory", "aiida.plugins.WorkflowFactory", "click.comman...
[((288, 327), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO'}), '(level=logging.INFO)\n', (307, 327), False, 'import logging\n'), ((412, 431), 'aiida.plugins.DataFactory', 'DataFactory', (['"""dict"""'], {}), "('dict')\n", (423, 431), False, 'from aiida.plugins import DataFactory, Calculati...
import asyncio import aiohttp.client_exceptions import wrapt from botocore.response import ResponseStreamingError, IncompleteReadError, \ ReadTimeoutError from aiobotocore import parsers class AioReadTimeoutError(ReadTimeoutError, asyncio.TimeoutError): pass class StreamingBody(wrapt.ObjectProxy): """W...
[ "aiobotocore.parsers.create_parser", "asyncio.iscoroutinefunction", "botocore.response.ResponseStreamingError" ]
[((4877, 4908), 'aiobotocore.parsers.create_parser', 'parsers.create_parser', (['protocol'], {}), '(protocol)\n', (4898, 4908), False, 'from aiobotocore import parsers\n'), ((4916, 4957), 'asyncio.iscoroutinefunction', 'asyncio.iscoroutinefunction', (['parser.parse'], {}), '(parser.parse)\n', (4943, 4957), False, 'impo...
# Copyright 2020 Huawei Technologies Co., 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-2.0 # # Unless required by applicable law or agreed to...
[ "mindspore.ops.operations.Concat", "mindspore.ops.operations.ReduceSum", "mindspore.ops.operations.Print", "mindspore.ops.operations.Sub", "mindspore.ops.operations.OneHot", "mindspore.ops.functional.shape", "mindspore.nn.Dropout", "mindspore.ops.operations.Mul", "mindspore.ops.operations.Exp", "m...
[((3368, 3481), 'mindspore.nn.Conv2d', 'nn.Conv2d', ([], {'in_channels': '(1)', 'out_channels': '(96)', 'kernel_size': 'kernel_size', 'padding': '(1)', 'pad_mode': '"""pad"""', 'has_bias': '(True)'}), "(in_channels=1, out_channels=96, kernel_size=kernel_size, padding=\n 1, pad_mode='pad', has_bias=True)\n", (3377, 3...
# Copyright 2016-2017 Open Source Robotics Foundation, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
[ "rclpy.utilities.get_rmw_implementation_identifier", "rosidl_runtime_py.utilities.get_message", "rclpy.spin", "rosidl_runtime_py.message_to_csv", "ros2topic.api.get_msg_class", "ros2cli.node.strategy.NodeStrategy", "ros2topic.api.qos_profile_from_short_keys", "rosidl_runtime_py.message_to_yaml", "ty...
[((1551, 1569), 'typing.TypeVar', 'TypeVar', (['"""MsgType"""'], {}), "('MsgType')\n", (1558, 1569), False, 'from typing import TypeVar\n'), ((3887, 4055), 'ros2topic.api.qos_profile_from_short_keys', 'qos_profile_from_short_keys', (['args.qos_profile'], {'reliability': 'args.qos_reliability', 'durability': 'args.qos_d...
# Code is generated: DO NOT EDIT # Copyright 2019 Machine Zone, Inc. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. from kubespec import context from kubespec import types from kubespec.k8s import base from kubespec.k8s import resource from ...
[ "typeguard.check_type", "kubespec.k8s.base.Enum" ]
[((556, 675), 'kubespec.k8s.base.Enum', 'base.Enum', (['"""MetricSourceType"""', "{'External': 'External', 'Object': 'Object', 'Pods': 'Pods', 'Resource':\n 'Resource'}"], {}), "('MetricSourceType', {'External': 'External', 'Object': 'Object',\n 'Pods': 'Pods', 'Resource': 'Resource'})\n", (565, 675), False, 'fro...
# -*- coding: utf-8 -*- import ckan.plugins as p def x2(sender): return sender * 2 def x10(sender): return sender * 10 class ExampleISignalPlugin(p.SingletonPlugin): p.implements(p.ISignal) # ISignal def get_signal_subscriptions(self): return { p.toolkit.signals.ckanext....
[ "ckan.plugins.toolkit.signals.ckanext.signal", "ckan.plugins.implements" ]
[((185, 208), 'ckan.plugins.implements', 'p.implements', (['p.ISignal'], {}), '(p.ISignal)\n', (197, 208), True, 'import ckan.plugins as p\n'), ((294, 345), 'ckan.plugins.toolkit.signals.ckanext.signal', 'p.toolkit.signals.ckanext.signal', (['u"""isignal_number"""'], {}), "(u'isignal_number')\n", (326, 345), True, 'imp...
from typing import Dict, Optional, Text, List import apache_beam as beam import tensorflow_model_analysis as tfma from tensorflow_model_analysis import config from tensorflow_model_analysis import constants from tensorflow_model_analysis import model_util from tensorflow_model_analysis import types from tensorflow_mod...
[ "apache_beam.typehints.with_output_types", "tensorflow_model_analysis.model_util.verify_and_update_eval_shared_models", "tensorflow_model_analysis.model_util.ModelSignaturesDoFn", "apache_beam.typehints.with_input_types" ]
[((1793, 1840), 'apache_beam.typehints.with_input_types', 'beam.typehints.with_input_types', (['types.Extracts'], {}), '(types.Extracts)\n', (1824, 1840), True, 'import apache_beam as beam\n'), ((1842, 1890), 'apache_beam.typehints.with_output_types', 'beam.typehints.with_output_types', (['types.Extracts'], {}), '(type...
# Generated by Django 3.1.5 on 2021-03-05 17:55 import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("contenttypes", "0002_remove_content_type_name"), ("core", "0003_migrate_content_type_to_core_20210219_1642"), ] ...
[ "django.db.models.ForeignKey" ]
[((475, 670), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'editable': '(False)', 'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'related_name': '"""polymorphic_core.abstractparticipation_set+"""', 'to': '"""contenttypes.contenttype"""'}), "(editable=False, null=True, on_delete=django....
"""model.py""" import torch import torch.nn as nn # import torch.nn.functional as F import torch.nn.init as init from torch.autograd import Variable def reparametrize(mu, logvar): std = logvar.div(2).exp() eps = Variable(std.data.new(std.size()).normal_()) return mu + std * eps class View(nn.Module): ...
[ "torch.nn.ReLU", "torch.nn.Conv2d", "torch.nn.Linear", "torch.nn.init.kaiming_normal", "torch.nn.ConvTranspose2d" ]
[((5052, 5081), 'torch.nn.init.kaiming_normal', 'init.kaiming_normal', (['m.weight'], {}), '(m.weight)\n', (5071, 5081), True, 'import torch.nn.init as init\n'), ((772, 798), 'torch.nn.Conv2d', 'nn.Conv2d', (['nc', '(32)', '(4)', '(2)', '(1)'], {}), '(nc, 32, 4, 2, 1)\n', (781, 798), True, 'import torch.nn as nn\n'), (...
import pytest from grpclib.testing import ChannelFor from pymapadmin.grpc.admin_grpc import MailboxStub from pymapadmin.grpc.admin_pb2 import AppendRequest, SUCCESS, FAILURE from pymap.admin.handlers.mailbox import MailboxHandlers from .base import TestBase pytestmark = pytest.mark.asyncio class TestMailboxHandle...
[ "pymapadmin.grpc.admin_pb2.AppendRequest", "grpclib.testing.ChannelFor", "pymap.admin.handlers.mailbox.MailboxHandlers", "pymapadmin.grpc.admin_grpc.MailboxStub" ]
[((682, 706), 'pymap.admin.handlers.mailbox.MailboxHandlers', 'MailboxHandlers', (['backend'], {}), '(backend)\n', (697, 706), False, 'from pymap.admin.handlers.mailbox import MailboxHandlers\n'), ((780, 890), 'pymapadmin.grpc.admin_pb2.AppendRequest', 'AppendRequest', ([], {'user': '"""testuser"""', 'mailbox': '"""INB...
# coding=UTF-8 # python version=3.5 import socket import sys import time import threading class ServerSocket(object): conn = None addr = None mesStr = [] recv = '' name = 'a' threadLock1 = threading.Lock() """docstring for ServerSocket""" def __init__(self): super(ServerSocke...
[ "threading.Lock", "threading.Thread", "socket.socket" ]
[((6750, 6766), 'threading.Lock', 'threading.Lock', ([], {}), '()\n', (6764, 6766), False, 'import threading\n'), ((216, 232), 'threading.Lock', 'threading.Lock', ([], {}), '()\n', (230, 232), False, 'import threading\n'), ((3169, 3218), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), ...
""" Show how to plot SST on a subdomain """ import numpy as np import marray as ma import grid as gr import nctools as nct import croco as croco import giga_tools as giga import giga_subdomains as gs import matplotlib.pyplot as plt import matplotlib.colorbar as cb import schwimmbad import time rc = plt.rc font = {'fa...
[ "croco.ncread", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.pcolormesh", "matplotlib.colorbar.ColorbarBase.set_label", "croco.load_grid", "matplotlib.pyplot.xlabel", "giga_subdomains.plot_blocks", "giga_subdomains.LLTR2domain", "matplotlib.pyplot.savefig", "schwimmbad.MultiPool", "matplotlib....
[((384, 393), 'matplotlib.pyplot.ion', 'plt.ion', ([], {}), '()\n', (391, 393), True, 'import matplotlib.pyplot as plt\n'), ((1658, 1692), 'giga_subdomains.LLTR2domain', 'gs.LLTR2domain', (['(-10, 32)', '(0, 40)'], {}), '((-10, 32), (0, 40))\n', (1672, 1692), True, 'import giga_subdomains as gs\n'), ((1705, 1733), 'gig...
# Copyright 2016 - Nokia # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, sof...
[ "oslo_config.cfg.ConfigOpts", "vitrage.tests.unit.datasources.zabbix.mock_driver.MockZabbixDriver", "copy.copy", "vitrage.tests.mocks.utils.get_resources_dir", "oslo_log.log.getLogger" ]
[((1058, 1085), 'oslo_log.log.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1075, 1085), True, 'from oslo_log import log as logging\n'), ((1470, 1486), 'oslo_config.cfg.ConfigOpts', 'cfg.ConfigOpts', ([], {}), '()\n', (1484, 1486), False, 'from oslo_config import cfg\n'), ((1618, 1645), 'vitrage...
# # Copyright Soramitsu Co., Ltd. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 # from iroha import Iroha, IrohaCrypto from iroha import primitive_pb2 import commons admin = commons.new_user('admin@test') alice = commons.new_user('alice@test') iroha = Iroha(admin['id']) @commons.hex def genesis_tx(): ...
[ "commons.genesis_block", "iroha.Iroha", "iroha.IrohaCrypto.sign_transaction", "commons.new_user" ]
[((189, 219), 'commons.new_user', 'commons.new_user', (['"""admin@test"""'], {}), "('admin@test')\n", (205, 219), False, 'import commons\n'), ((228, 258), 'commons.new_user', 'commons.new_user', (['"""alice@test"""'], {}), "('alice@test')\n", (244, 258), False, 'import commons\n'), ((267, 285), 'iroha.Iroha', 'Iroha', ...
import re,random,requests,json from os import path from .DefaultSubs import * from .spellcheck import correction,WORDS try: from urllib import quote except ImportError as e: from urllib.parse import quote reflections = { "i am" : "you are", "i was" : "you were", "i" : "you", "i'm" ...
[ "random.choice", "re.compile", "json.load", "re.finditer", "os.path.abspath", "re.sub", "re.findall" ]
[((26743, 26798), 're.finditer', 're.finditer', (["('%' + extraSymbol + '[0-9]+')", 'prevResponse'], {}), "('%' + extraSymbol + '[0-9]+', prevResponse)\n", (26754, 26798), False, 'import re, random, requests, json\n'), ((30080, 30102), 'random.choice', 'random.choice', (['choices'], {}), '(choices)\n', (30093, 30102), ...
# Copyright (c) 2018 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 app...
[ "paddle.fluid.dygraph.guard", "paddle.fluid.dygraph.Embedding", "paddle.fluid.layers.split", "paddle.fluid.layers.piecewise_decay", "unittest.main", "paddle.fluid.layers.transpose", "paddle.fluid.layers.matmul", "numpy.arange", "paddle.fluid.layers.reshape", "paddle.fluid.save_dygraph", "paddle....
[((34298, 34313), 'unittest.main', 'unittest.main', ([], {}), '()\n', (34311, 34313), False, 'import unittest\n'), ((5049, 5076), 'paddle.fluid.layers.concat', 'fluid.layers.concat', (['res', '(0)'], {}), '(res, 0)\n', (5068, 5076), True, 'import paddle.fluid as fluid\n'), ((5096, 5146), 'paddle.fluid.layers.transpose'...
import sys from contextlib import contextmanager from os.path import dirname, join from qtpy.QtGui import QPixmap from qtpy.QtWidgets import QApplication, QSplashScreen @contextmanager def gui_qt(*, startup_logo=False): """Start a Qt event loop in which to run the application. Parameters ---------- ...
[ "os.path.dirname", "qtpy.QtWidgets.QApplication.instance", "qtpy.QtWidgets.QApplication", "qtpy.QtGui.QPixmap" ]
[((721, 744), 'qtpy.QtWidgets.QApplication.instance', 'QApplication.instance', ([], {}), '()\n', (742, 744), False, 'from qtpy.QtWidgets import QApplication, QSplashScreen\n'), ((923, 945), 'qtpy.QtWidgets.QApplication', 'QApplication', (['sys.argv'], {}), '(sys.argv)\n', (935, 945), False, 'from qtpy.QtWidgets import ...
#encoding: utf-8 """Tornado handlers for the terminal emulator.""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. from tornado import web import terminado from notebook._tz import utcnow from ..base.handlers import IPythonHandler from ..base.zmqhandlers import Web...
[ "notebook._tz.utcnow", "tornado.web.HTTPError" ]
[((1178, 1186), 'notebook._tz.utcnow', 'utcnow', ([], {}), '()\n', (1184, 1186), False, 'from notebook._tz import utcnow\n'), ((1372, 1380), 'notebook._tz.utcnow', 'utcnow', ([], {}), '()\n', (1378, 1380), False, 'from notebook._tz import utcnow\n'), ((949, 967), 'tornado.web.HTTPError', 'web.HTTPError', (['(403)'], {}...
# SPDX-FileCopyrightText: 2022 <NAME> # SPDX-License-Identifier: MIT import asyncio import time import board import neopixel import keypad import supervisor from adafruit_ht16k33.segments import BigSeg7x4, Seg14x4 from digitalio import DigitalInOut, Direction RED = (255, 0, 0) GREEN = (0, 255, 0) BLUE =...
[ "board.I2C", "asyncio.sleep", "time.monotonic", "time.sleep", "neopixel.NeoPixel", "adafruit_ht16k33.segments.Seg14x4", "supervisor.reload", "asyncio.gather", "adafruit_ht16k33.segments.BigSeg7x4", "digitalio.DigitalInOut", "keypad.Keys" ]
[((700, 711), 'board.I2C', 'board.I2C', ([], {}), '()\n', (709, 711), False, 'import board\n'), ((731, 745), 'adafruit_ht16k33.segments.BigSeg7x4', 'BigSeg7x4', (['i2c'], {}), '(i2c)\n', (740, 745), False, 'from adafruit_ht16k33.segments import BigSeg7x4, Seg14x4\n'), ((797, 822), 'adafruit_ht16k33.segments.Seg14x4', '...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import itertools from copy import copy from typing import Any from typing import Optional from typing import Tuple from typing import Type from ._compat import PY2 from ._compat import unicode from .exceptions import ParseError from .exceptions import U...
[ "copy.copy", "itertools.tee" ]
[((990, 1024), 'itertools.tee', 'itertools.tee', (['self._source._chars'], {}), '(self._source._chars)\n', (1003, 1024), False, 'import itertools\n'), ((1065, 1090), 'copy.copy', 'copy', (['self._source._chars'], {}), '(self._source._chars)\n', (1069, 1090), False, 'from copy import copy\n')]
# Copyright (c) 2016 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 applic...
[ "image_util.expand_image", "PIL.Image.fromarray", "PIL.Image.open", "random.uniform", "random.shuffle", "image_util.sampler", "image_util.generate_batch_samples", "image_util.distort_image", "os.path.join", "numpy.swapaxes", "numpy.array", "image_util.crop_image" ]
[((996, 1030), 'os.path.join', 'os.path.join', (['data_dir', 'label_file'], {}), '(data_dir, label_file)\n', (1008, 1030), False, 'import os\n'), ((2454, 2475), 'random.shuffle', 'random.shuffle', (['lines'], {}), '(lines)\n', (2468, 2475), False, 'import random\n'), ((2897, 2917), 'PIL.Image.open', 'Image.open', (['im...
import os from dvc.repo.scm_context import scm_context from dvc.utils import relpath, resolve_output, resolve_paths from dvc.utils.fs import path_isin from ..exceptions import InvalidArgumentError, OutputDuplicationError from . import locked @locked @scm_context def imp_url( self, url, out=None, fna...
[ "dvc.utils.resolve_paths", "os.path.exists", "dvc.stage.restore_meta", "dvc.stage.create_stage", "dvc.utils.resolve_output", "os.path.abspath", "dvc.utils.relpath", "dvc.dvcfile.Dvcfile" ]
[((559, 583), 'dvc.utils.resolve_output', 'resolve_output', (['url', 'out'], {}), '(url, out)\n', (573, 583), False, 'from dvc.utils import relpath, resolve_output, resolve_paths\n'), ((606, 666), 'dvc.utils.resolve_paths', 'resolve_paths', (['self', 'out'], {'always_local': '(to_remote and not out)'}), '(self, out, al...
# peacocktv.py import sys from datetime import date import logging import requests import xml.etree.ElementTree as ET from .. import pysitemap if __name__ == '__main__': url_list = [] tree = ET.parse('local_sitemaps/sitemap-1.xml') root = tree.getroot() for child in root: url_list.append(chi...
[ "datetime.date.today", "xml.etree.ElementTree.parse" ]
[((202, 242), 'xml.etree.ElementTree.parse', 'ET.parse', (['"""local_sitemaps/sitemap-1.xml"""'], {}), "('local_sitemaps/sitemap-1.xml')\n", (210, 242), True, 'import xml.etree.ElementTree as ET\n'), ((343, 355), 'datetime.date.today', 'date.today', ([], {}), '()\n', (353, 355), False, 'from datetime import date\n'), (...
# -*- coding: utf-8 -*- """ Created on Wed Jul 21 23:17:28 2021 @author: AKayal """ import Polygon from Polygon import * import Polygons from Polygons import * import pytest def test_polygon(): abs_tol = 0.001 rel_tol = 0.001 try: p = Polygon(2, 10) assert False, ('Creating a Polygon...
[ "Polygon" ]
[((485, 498), 'Polygon', 'Polygon', (['n', 'R'], {}), '(n, R)\n', (492, 498), False, 'import Polygon\n'), ((1327, 1340), 'Polygon', 'Polygon', (['n', 'R'], {}), '(n, R)\n', (1334, 1340), False, 'import Polygon\n'), ((2454, 2467), 'Polygon', 'Polygon', (['(6)', '(2)'], {}), '(6, 2)\n', (2461, 2467), False, 'import Polyg...
import torch import torch.nn as nn import torch.nn.functional as F from .cond_bn import ConditionalBatchNorm1d # adopted Generator ResBlock from https://arxiv.org/abs/1909.11646 class GBlock(nn.Module): def __init__(self, in_channels, out_channels, condition_dim): super().__init__() self.cond_bn ...
[ "torch.nn.Conv1d", "torch.nn.LeakyReLU" ]
[((485, 502), 'torch.nn.LeakyReLU', 'nn.LeakyReLU', (['(0.2)'], {}), '(0.2)\n', (497, 502), True, 'import torch.nn as nn\n'), ((729, 780), 'torch.nn.Conv1d', 'nn.Conv1d', (['in_channels', 'out_channels'], {'kernel_size': '(1)'}), '(in_channels, out_channels, kernel_size=1)\n', (738, 780), True, 'import torch.nn as nn\n...
import numpy as np import pandas as pd from docplex.mp.model import Model as Model def offline_optimal(df_tasks, df_nodes, n_time, n_tasks, n_nodes, gap=0.1): mdl = Model(name='Maximise social welfare') # set the tolerance to 1% mdl.parameters.mip.tolerances.mipgap = 0.01 # auxiliary variable represe...
[ "docplex.mp.model.Model" ]
[((171, 208), 'docplex.mp.model.Model', 'Model', ([], {'name': '"""Maximise social welfare"""'}), "(name='Maximise social welfare')\n", (176, 208), True, 'from docplex.mp.model import Model as Model\n')]
"""Pulse host control.""" from datetime import timedelta from enum import Enum import logging from typing import List, Optional import attr from pulsectl import Pulse, PulseError, PulseIndexError, PulseOperationFailed from ..coresys import CoreSys, CoreSysAttributes from ..exceptions import PulseAudioError from ..uti...
[ "logging.getLogger", "attr.s", "pulsectl.Pulse", "datetime.timedelta", "attr.ib" ]
[((371, 398), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (388, 398), False, 'import logging\n'), ((542, 561), 'attr.s', 'attr.s', ([], {'frozen': '(True)'}), '(frozen=True)\n', (548, 561), False, 'import attr\n'), ((850, 869), 'attr.s', 'attr.s', ([], {'frozen': '(True)'}), '(frozen=T...
import numpy as np from quickndirtybot.strategies.util import moving_fun def measure(dataframe, smaperiod, minmaxperiod): """measure things on dataframe smaperiod period in minutes of moving average minmaxperiod period to calculate the minimum/maximum over, in minutes """ # get del...
[ "quickndirtybot.strategies.util.moving_fun" ]
[((713, 823), 'quickndirtybot.strategies.util.moving_fun', 'moving_fun', (['dataframe', '"""highest"""'], {'blanking': '(0)', 'duration': 'tperiod_smashort', 'newname': '"""sma-hi-now"""', 'fun': 'np.mean'}), "(dataframe, 'highest', blanking=0, duration=tperiod_smashort,\n newname='sma-hi-now', fun=np.mean)\n", (723...
import torch import unittest import numpy as np from torch.autograd import Variable from losses.svm import SmoothTop1SVM, SmoothTopkSVM, MaxTop1SVM, MaxTopkSVM from losses.functional import Topk_Smooth_SVM from tests.utils import assert_all_close, V from tests.py_ref import svm_topk_smooth_py_1, svm_topk_smooth_py_2,\...
[ "torch.manual_seed", "numpy.arange", "losses.svm.MaxTopkSVM", "tests.utils.assert_all_close", "losses.functional.Topk_Smooth_SVM", "numpy.random.randint", "tests.utils.V", "numpy.random.seed", "losses.svm.MaxTop1SVM", "torch.autograd.Variable", "torch.randn", "losses.svm.SmoothTop1SVM", "los...
[((486, 509), 'torch.manual_seed', 'torch.manual_seed', (['(1234)'], {}), '(1234)\n', (503, 509), False, 'import torch\n'), ((518, 538), 'numpy.random.seed', 'np.random.seed', (['(1234)'], {}), '(1234)\n', (532, 538), True, 'import numpy as np\n'), ((636, 679), 'torch.randn', 'torch.randn', (['self.n_samples', 'self.n_...
import os import sys import platform from distutils.version import LooseVersion def is_active(): return True def get_name(): return "Android" def can_build(): return ("ANDROID_NDK_ROOT" in os.environ) def get_platform(platform): return int(platform.split("-")[1]) def get_opts(): from SCons...
[ "SCons.Variables.EnumVariable", "subprocess.Popen", "os.path.join", "sys.platform.startswith", "os.environ.get", "SCons.Variables.BoolVariable", "subprocess.STARTUPINFO", "platform.machine", "distutils.version.LooseVersion", "platform.split" ]
[((5724, 5756), 'sys.platform.startswith', 'sys.platform.startswith', (['"""linux"""'], {}), "('linux')\n", (5747, 5756), False, 'import sys\n'), ((6572, 6596), 'os.environ.get', 'os.environ.get', (['"""CCACHE"""'], {}), "('CCACHE')\n", (6586, 6596), False, 'import os\n'), ((12207, 12246), 'os.path.join', 'os.path.join...
# pylint: disable=g-bad-file-header # Copyright 2019 DeepMind Technologies Limited. 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/...
[ "bsuite.experiments.mnist.mnist.MNISTBandit", "absl.testing.absltest.main", "numpy.random.RandomState" ]
[((1312, 1327), 'absl.testing.absltest.main', 'absltest.main', ([], {}), '()\n', (1325, 1327), False, 'from absl.testing import absltest\n'), ((1060, 1087), 'bsuite.experiments.mnist.mnist.MNISTBandit', 'mnist.MNISTBandit', ([], {'seed': '(101)'}), '(seed=101)\n', (1077, 1087), False, 'from bsuite.experiments.mnist imp...
from setuptools import setup, find_packages from setuptools.command.install import install import os import setuptools import sys # should match codalab/common.py#CODALAB_VERSION CODALAB_VERSION = "1.1.4" class Install(install): _WARNING_TEMPLATE = ( '\n\n\033[1m\033[93mWarning! CodaLab was installed a...
[ "setuptools.command.install.install.run", "setuptools.find_packages", "setuptools.__version__.split" ]
[((1123, 1140), 'setuptools.command.install.install.run', 'install.run', (['self'], {}), '(self)\n', (1134, 1140), False, 'from setuptools.command.install import install\n'), ((2886, 2919), 'setuptools.find_packages', 'find_packages', ([], {'exclude': "['tests*']"}), "(exclude=['tests*'])\n", (2899, 2919), False, 'from...
# Copyright 2021 solo-learn development team. # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to use, # copy, modify, merge, publ...
[ "torch.nn.ReLU", "solo.utils.momentum.initialize_momentum_params", "torch.max", "torch.exp", "torch.eq", "torch.nn.BatchNorm1d", "torch.arange", "solo.losses.byol.byol_loss_func", "torch.matmul", "torch.randn", "torch.ones_like", "torch.nn.functional.normalize", "solo.utils.misc.gather", "...
[((6928, 6943), 'torch.no_grad', 'torch.no_grad', ([], {}), '()\n', (6941, 6943), False, 'import torch\n'), ((7697, 7712), 'torch.no_grad', 'torch.no_grad', ([], {}), '()\n', (7710, 7712), False, 'import torch\n'), ((3060, 3127), 'solo.utils.momentum.initialize_momentum_params', 'initialize_momentum_params', (['self.pr...
"""Manipulating the Sphinx AST with Jupyter objects""" import os import json from pathlib import Path import docutils from docutils.parsers.rst import Directive, directives from docutils.nodes import math_block, image, literal from sphinx.util import parselinenos from sphinx.util.docutils import ReferenceRole from sp...
[ "docutils.nodes.container", "pathlib.Path", "json.dumps", "sphinx.errors.ExtensionError", "nbconvert.filters.strip_ansi", "docutils.nodes.literal_block", "sphinx.addnodes.download_reference", "docutils.nodes.raw", "docutils.nodes.literal", "sphinx.util.parselinenos", "docutils.nodes.image" ]
[((2130, 2170), 'sphinx.util.parselinenos', 'parselinenos', (['emphasize_linespec', 'nlines'], {}), '(emphasize_linespec, nlines)\n', (2142, 2170), False, 'from sphinx.util import parselinenos\n'), ((9023, 9093), 'docutils.nodes.literal_block', 'docutils.nodes.literal_block', ([], {'text': '""""""', 'linenos': '(False)...
# Copyright 2018 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_estimator.python.estimator.run_config.RunConfig", "tensorflow.python.keras.metrics.Mean", "numpy.ones", "tensorflow.compat.v1.data.make_one_shot_iterator", "tensorflow.test.main", "tensorflow.feature_column.numeric_column", "tensorflow.compat.v1.data.Dataset.from_tensor_slices", "tensorflo...
[((5382, 5396), 'tensorflow.test.main', 'tf.test.main', ([], {}), '()\n', (5394, 5396), True, 'import tensorflow as tf\n'), ((1391, 1453), 'tensorflow.compat.v1.data.Dataset.from_tensor_slices', 'tf.compat.v1.data.Dataset.from_tensor_slices', (["{'x': x, 'y': y}"], {}), "({'x': x, 'y': y})\n", (1435, 1453), True, 'impo...
import random import math from estadisticas import desviacion_estandar, media def aventar_agujas(numero_de_agujas): adentro_del_circulo = 0 for _ in range(numero_de_agujas): x = random.random() * random.choice([-1, 1]) y = random.random() * random.choice([-1, 1]) distancia_de...
[ "random.choice", "estadisticas.media", "math.sqrt", "estadisticas.desviacion_estandar", "random.random" ]
[((746, 762), 'estadisticas.media', 'media', (['estimados'], {}), '(estimados)\n', (751, 762), False, 'from estadisticas import desviacion_estandar, media\n'), ((776, 806), 'estadisticas.desviacion_estandar', 'desviacion_estandar', (['estimados'], {}), '(estimados)\n', (795, 806), False, 'from estadisticas import desvi...
import time import torch from torch.utils.data import DataLoader, RandomSampler from torch.utils.data.distributed import DistributedSampler from tqdm import tqdm from datasets.dataset_FTR import * from src.models.FTR_model import * from .inpainting_metrics import get_inpainting_metrics from .utils import Progbar, cre...
[ "tqdm.tqdm", "torch.sigmoid", "torch.utils.data.distributed.DistributedSampler", "torch.utils.data.DataLoader", "torch.no_grad", "time.time" ]
[((22539, 22655), 'torch.utils.data.DataLoader', 'DataLoader', (['self.val_dataset'], {'shuffle': '(False)', 'pin_memory': '(True)', 'batch_size': 'self.config.BATCH_SIZE', 'num_workers': '(12)'}), '(self.val_dataset, shuffle=False, pin_memory=True, batch_size=\n self.config.BATCH_SIZE, num_workers=12)\n', (22549, 2...
#!/usr/bin/python import getopt import sys import os import json setConfig = "true" feEnable = "true" rebuildImpact = "low" conf_file = "/../../../config/ibofos_for_perf_ci.conf" current_path = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(1, current_path + "./") def config_change(feEnable, impact): ...
[ "getopt.getopt", "sys.path.insert", "os.path.realpath", "sys.exit", "json.load", "json.dump" ]
[((241, 280), 'sys.path.insert', 'sys.path.insert', (['(1)', "(current_path + './')"], {}), "(1, current_path + './')\n", (256, 280), False, 'import sys\n'), ((213, 239), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (229, 239), False, 'import os\n'), ((393, 412), 'json.load', 'json.load',...
""" Módulo com todos os tipos de propriedades do Movidesk. Exemplo de uso: >>> from datetime import datetime >>> from pyvidesk.tickets import Tickets >>> my_date = datetime(2020, 1, 1, 20, 0, 0) >>> tickets = Tickets(token="<PASSWORD>") >>> tickets_properties = tickets.get_properties() >>> print(tickets_properties["...
[ "dateutil.parser.parse", "datetime.datetime.min.time", "dataclasses.field" ]
[((11793, 12682), 'dataclasses.field', 'field', ([], {'default_factory': "(lambda : {'personId': {'property': IntegerProperty, 'description':\n 'Id (Cod. ref.) da empresa, departamento ou pessoa. *Obrigatório quando o tipo do campo for lista de pessoas.'\n , 'readOnly': False}, 'clientId': {'property': IntegerPro...
#!/usr/bin/env python # -*- coding: utf-8 -*- import uuid try: from setuptools import setup except ImportError: from distutils.core import setup from pip.req import parse_requirements with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: histor...
[ "uuid.uuid1", "distutils.core.setup" ]
[((539, 1690), 'distutils.core.setup', 'setup', ([], {'name': '"""vulyk_declarations_review"""', 'version': '"""0.1.0"""', 'description': '"""Vulyk processed declarations review plugin"""', 'long_description': "(readme + '\\n\\n' + history)", 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'url': '"""https:/...
# coding=utf-8 # Copyright 2018 The TF-Agents 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...
[ "tensorflow.compat.v1.train.AdamOptimizer", "absl.logging.info", "tf_agents.metrics.tf_metrics.NumberOfEpisodes", "tensorflow.compat.v1.enable_v2_behavior", "tf_agents.metrics.metric_utils.log_metrics", "tf_agents.agents.ddpg.critic_rnn_network.CriticRnnNetwork", "absl.app.run", "tf_agents.metrics.met...
[((1724, 1824), 'absl.flags.DEFINE_integer', 'flags.DEFINE_integer', (['"""num_iterations"""', '(100000)', '"""Total number train/eval iterations to perform."""'], {}), "('num_iterations', 100000,\n 'Total number train/eval iterations to perform.')\n", (1744, 1824), False, 'from absl import flags\n'), ((1842, 1919),...
from pyfilter import get_new_client def _wait_enter(): input("Press 'Enter' to exit...") exit(0) def main(): cats_in_shelter = [ "brown siamese cat. It's friendly and healthy.", # This looks like something we want! "A lovely white persian cat. It's healthy, though unvaccinated.", ...
[ "pyfilter.get_new_client" ]
[((668, 715), 'pyfilter.get_new_client', 'get_new_client', ([], {'insecure_port': '(8886)', 'quiet': '(False)'}), '(insecure_port=8886, quiet=False)\n', (682, 715), False, 'from pyfilter import get_new_client\n')]
from optparse import make_option from django.core.management.base import AppCommand from django.core.management.sql import sql_custom from django.db import connections, DEFAULT_DB_ALIAS class Command(AppCommand): help = "Prints the custom table modifying SQL statements for the given app name(s)." option_list...
[ "optparse.make_option" ]
[((358, 545), 'optparse.make_option', 'make_option', (['"""--database"""'], {'action': '"""store"""', 'dest': '"""database"""', 'default': 'DEFAULT_DB_ALIAS', 'help': '"""Nominates a database to print the SQL for. Defaults to the "default" database."""'}), '(\'--database\', action=\'store\', dest=\'database\', default...
from itertools import zip_longest from typing import List, Union from bytepatches.ops import Opcode, sync_ops, LOAD_FAST, STORE_FAST, JumpOp, LOAD_NAME, STORE_NAME from bytepatches.parser import Parser from bytepatches.utils import patch_function, make_bytecode class OpNotFound(Exception): pass def change_ops(...
[ "itertools.zip_longest", "bytepatches.ops.LOAD_FAST", "bytepatches.ops.STORE_FAST", "bytepatches.parser.Parser", "bytepatches.utils.make_bytecode", "bytepatches.ops.sync_ops" ]
[((2873, 2886), 'bytepatches.ops.sync_ops', 'sync_ops', (['ops'], {}), '(ops)\n', (2881, 2886), False, 'from bytepatches.ops import Opcode, sync_ops, LOAD_FAST, STORE_FAST, JumpOp, LOAD_NAME, STORE_NAME\n'), ((6807, 6825), 'bytepatches.utils.make_bytecode', 'make_bytecode', (['ops'], {}), '(ops)\n', (6820, 6825), False...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import argparse def make_live_to_txt(live_file, txt_file, source_encoding='UTF-8'): """ Convert a special ctm file (with the segmentation information in it) to a json file used for the web demo """ new_sentence = False words = [] start = No...
[ "argparse.ArgumentParser" ]
[((1211, 1282), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Create txt file from live output"""'}), "(description='Create txt file from live output')\n", (1234, 1282), False, 'import argparse\n')]
from setuptools import setup, find_packages with open("README.md", "r") as fh: long_description = fh.read() setup(name="geots2img", version="0.1.3", description="Geo Time Series to Image", long_description=long_description, long_description_content_type="text/markdown", url="https://...
[ "setuptools.find_packages" ]
[((459, 474), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (472, 474), False, 'from setuptools import setup, find_packages\n')]
from aiohttp import web import os # 返回中间件,处理返回值 @web.middleware async def res_middleware(request, handler): r = await handler(request) if isinstance(r, web.StreamResponse): return r if isinstance(r, bytes): resp = web.Response(body=r, content_type='application/octet-stream') return ...
[ "os.path.abspath", "aiohttp.web.HTTPFound", "aiohttp.web.Response", "aiohttp.web.json_response" ]
[((243, 304), 'aiohttp.web.Response', 'web.Response', ([], {'body': 'r', 'content_type': '"""application/octet-stream"""'}), "(body=r, content_type='application/octet-stream')\n", (255, 304), False, 'from aiohttp import web\n'), ((1214, 1229), 'aiohttp.web.Response', 'web.Response', (['r'], {}), '(r)\n', (1226, 1229), ...
# plugin which demonstrates # how to toggle a state # on a keypress, for simplicity reasons we just start vlc in hidden mode import os cfg = globals()["config"] drv = globals()["drivers"] AUTOFIRE_PRESS = "_b_autofire_press" # plugin_data is a user reserved namespace which can be used by the plugins to store global ...
[ "os.system" ]
[((454, 514), 'os.system', 'os.system', (['"""/home/werpu/gamepadservice/b-autofire-remove.sh"""'], {}), "('/home/werpu/gamepadservice/b-autofire-remove.sh')\n", (463, 514), False, 'import os\n'), ((622, 675), 'os.system', 'os.system', (['"""/home/werpu/gamepadservice/b-autofire.sh"""'], {}), "('/home/werpu/gamepadserv...
import bs4, requests, os, xlsxwriter, time start_time = time.time() def generateID(n): canID = str(n) count = 0 num = n while num > 0: count += 1 num//=10 count0 = 4 - count for i in range (count0): canID = "0" + canID return canID ''' workbook = xlsxwriter.Workbook...
[ "time.time" ]
[((57, 68), 'time.time', 'time.time', ([], {}), '()\n', (66, 68), False, 'import bs4, requests, os, xlsxwriter, time\n'), ((1192, 1203), 'time.time', 'time.time', ([], {}), '()\n', (1201, 1203), False, 'import bs4, requests, os, xlsxwriter, time\n')]
import scrapy from scrapy.contrib.pipeline.images import ImagesPipeline ITEM_PIPELINES = {'imgur.pipelines.ImgurPipeline': 1} class ImgurPipeline(ImagesPipeline): def set_filename(self, response): #add a regex here to check the title is valid for a filename. return 'full/{0}.jpg'.format(response.meta['...
[ "scrapy.Request" ]
[((428, 484), 'scrapy.Request', 'scrapy.Request', (['image_url'], {'meta': "{'title': item['title']}"}), "(image_url, meta={'title': item['title']})\n", (442, 484), False, 'import scrapy\n')]
""" Django settings for fzw project. Generated by 'django-admin startproject' using Django 2.0.3. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ import os impor...
[ "os.path.abspath", "os.path.join", "os.environ.get", "dj_database_url.parse" ]
[((493, 523), 'os.path.join', 'os.path.join', (['BASE_DIR', '"""data"""'], {}), "(BASE_DIR, 'data')\n", (505, 523), False, 'import os\n'), ((742, 785), 'os.environ.get', 'os.environ.get', (['"""SECRET_KEY"""', '"""abracadabra"""'], {}), "('SECRET_KEY', 'abracadabra')\n", (756, 785), False, 'import os\n'), ((917, 952), ...
# Something to keep the docker running import time count = 0 max_count = 10000 while True: print ("We are at count {}.".format(count)) count += 1 if count >= max_count: print ("Resetting.") count = 0 time.sleep(1)
[ "time.sleep" ]
[((234, 247), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (244, 247), False, 'import time\n')]
# -*- test-case-name: mimic.test.test_loadbalancer -*- """ Defines add node and delete node from load balancers """ from __future__ import absolute_import, division, unicode_literals import json from uuid import uuid4 from six import string_types, text_type from zope.interface import implementer from twisted.plugin i...
[ "characteristic.attributes", "mimic.model.clb_objects.GlobalCLBCollections", "random.randrange", "json.dumps", "zope.interface.implementer", "uuid.uuid4", "mimic.util.helper.invalid_resource", "mimic.rest.mimicapp.MimicApp", "mimic.util.helper.json_from_request", "mimic.util.helper.json_dump", "...
[((803, 833), 'zope.interface.implementer', 'implementer', (['IAPIMock', 'IPlugin'], {}), '(IAPIMock, IPlugin)\n', (814, 833), False, 'from zope.interface import implementer\n'), ((2411, 2441), 'zope.interface.implementer', 'implementer', (['IAPIMock', 'IPlugin'], {}), '(IAPIMock, IPlugin)\n', (2422, 2441), False, 'fro...
import logging from multiprocessing import Pool from pathlib import Path logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(message)s', datefmt='%Y-%m-%d %H:%M:%S') DATABASE = 'population_statistics' cwd = Path(__file__).parent data_types = { 'gener...
[ "logging.basicConfig", "multiprocessing.Pool", "pathlib.Path" ]
[((74, 194), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO', 'format': '"""%(asctime)s - %(name)s - %(message)s"""', 'datefmt': '"""%Y-%m-%d %H:%M:%S"""'}), "(level=logging.INFO, format=\n '%(asctime)s - %(name)s - %(message)s', datefmt='%Y-%m-%d %H:%M:%S')\n", (93, 194), False, 'import ...
# Written by @HeisenbergTheDanger (Keep credits else gay) import asyncio from telethon.tl.types import InputMediaUploadedPhoto from uniborg.util import admin_cmd from telebot import CMD_HELP from telebot.plugins.sql_helper.ghdb_sql import ( add_channel, get_all_channels, in_channels, rm_channel, ) l...
[ "uniborg.util.admin_cmd", "telethon.tl.types.InputMediaUploadedPhoto", "telebot.plugins.sql_helper.ghdb_sql.get_all_channels", "telebot.plugins.sql_helper.ghdb_sql.add_channel", "telebot.plugins.sql_helper.ghdb_sql.rm_channel", "asyncio.sleep", "telebot.plugins.sql_helper.ghdb_sql.in_channels", "teleb...
[((10974, 11521), 'telebot.CMD_HELP.update', 'CMD_HELP.update', (['{\'giveawayhelper\':\n """.add\nUse - Add the channel/group to your database. \n\n.rm (all)<channel/group id>\nUse - Remove the channel/group from database. Use rm all to remove all groups. \n\n.broadcast <reply to message>\nUse - Send ...
import matplotlib.pyplot as plt from pyspark.mllib.linalg import Vectors from pyspark.mllib.clustering import KMeans from pyspark import SparkContext, SparkConf import datetime as dt import dateutil.parser as par import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import pandas as pd import numpy as...
[ "pyspark.mllib.clustering.KMeans", "matplotlib.pyplot.title", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "pyspark.mllib.linalg.Vectors.dense", "pyspark.SparkConf", "pyspark.sql.SparkSession.builder.appName", "datetime.datetime.today", "pyspark.SparkContext", ...
[((459, 482), 'pyspark.SparkContext', 'SparkContext', ([], {'conf': 'conf'}), '(conf=conf)\n', (471, 482), False, 'from pyspark import SparkContext, SparkConf\n'), ((674, 693), 'datetime.datetime.today', 'dt.datetime.today', ([], {}), '()\n', (691, 693), True, 'import datetime as dt\n'), ((819, 868), 'pyspark.ml.featur...
import os import mlflow def dump_mlflow_info(): print("MLflow Info:") print(" MLflow Version:", mlflow.version.VERSION) print(" Tracking URI:", mlflow.tracking.get_tracking_uri()) mlflow_host = get_mlflow_host() print(" Real MLflow host:", mlflow_host) print(" MLFLOW_TRACKING_URI:", os.envi...
[ "mlflow_export_import.common.databricks_cli_utils.get_host_token", "mlflow.tracking.get_tracking_uri", "os.environ.get", "mlflow.get_experiment_by_name", "mlflow.set_experiment", "os.path.dirname", "mlflow_export_import.utils.importing_into_databricks" ]
[((707, 750), 'os.environ.get', 'os.environ.get', (['"""MLFLOW_TRACKING_URI"""', 'None'], {}), "('MLFLOW_TRACKING_URI', None)\n", (721, 750), False, 'import os\n'), ((2136, 2169), 'mlflow_export_import.utils.importing_into_databricks', 'utils.importing_into_databricks', ([], {}), '()\n', (2167, 2169), False, 'from mlfl...
from django.conf.urls import url, include from . import views urlpatterns = [ url(r"^api/v1/", include(("webhook.api_v1.urls", "webhook.api_v1"))), url(r"^api/v2/", include(("webhook.api_v2.urls", "webhook.api_v2"))), url(r"^(\d+)$", views.list_webhook, name="list_webhook"), ]
[ "django.conf.urls.include", "django.conf.urls.url" ]
[((232, 288), 'django.conf.urls.url', 'url', (['"""^(\\\\d+)$"""', 'views.list_webhook'], {'name': '"""list_webhook"""'}), "('^(\\\\d+)$', views.list_webhook, name='list_webhook')\n", (235, 288), False, 'from django.conf.urls import url, include\n'), ((101, 151), 'django.conf.urls.include', 'include', (["('webhook.api_...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
[ "mock.Mock", "otcextensions.sdk.auto_scaling.v1.group.Group" ]
[((3199, 3230), 'mock.Mock', 'mock.Mock', ([], {'spec': 'adapter.Adapter'}), '(spec=adapter.Adapter)\n', (3208, 3230), False, 'import mock\n'), ((3255, 3266), 'mock.Mock', 'mock.Mock', ([], {}), '()\n', (3264, 3266), False, 'import mock\n'), ((3292, 3303), 'mock.Mock', 'mock.Mock', ([], {}), '()\n', (3301, 3303), False...
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy class BookinfoItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() coverImage = scrapy.Field() #"cover.jp...
[ "scrapy.Field" ]
[((295, 309), 'scrapy.Field', 'scrapy.Field', ([], {}), '()\n', (307, 309), False, 'import scrapy\n'), ((341, 355), 'scrapy.Field', 'scrapy.Field', ([], {}), '()\n', (353, 355), False, 'import scrapy\n'), ((380, 394), 'scrapy.Field', 'scrapy.Field', ([], {}), '()\n', (392, 394), False, 'import scrapy\n'), ((424, 438), ...
from telegram import Update from telegram.ext import CallbackContext import re import db import random import operator from utils import oppisWithSameText class Oppija: def __init__(self): self.commands = { 'opi': self.learnHandler, 'opis': self.opisCountHandler, ...
[ "db.upsertOppi", "random.choice", "db.randomOppi", "utils.oppisWithSameText", "random.sample", "re.match", "db.readDefinitions", "db.countOpis", "random.randint" ]
[((1931, 2009), 'db.upsertOppi', 'db.upsertOppi', (['keyword', 'definition', 'chat_id', 'update.message.from_user.username'], {}), '(keyword, definition, chat_id, update.message.from_user.username)\n', (1944, 2009), False, 'import db\n'), ((2102, 2138), 'db.countOpis', 'db.countOpis', (['update.message.chat.id'], {}), ...
#!/usr/bin/python import struct import os import sys import tempfile import subprocess useragent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36' def main(): try: p = subprocess.Popen('./pow.py ask 3'.split()) p.communicate() ...
[ "tempfile.mktemp", "subprocess.Popen", "os.system", "tempfile.mkdtemp" ]
[((646, 663), 'tempfile.mktemp', 'tempfile.mktemp', ([], {}), '()\n', (661, 663), False, 'import tempfile\n'), ((991, 1088), 'subprocess.Popen', 'subprocess.Popen', (["['curl', '-A', useragent, '--max-filesize', '1048576', '-o', tmp_file, url]"], {}), "(['curl', '-A', useragent, '--max-filesize', '1048576',\n '-o', ...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import shutil import sys import tempfile from observations.r.pension import pension def test_pension(): """Test module pension.py by downloading pension.csv and testing shape of extracted data has 19...
[ "observations.r.pension.pension", "tempfile.mkdtemp", "shutil.rmtree" ]
[((362, 380), 'tempfile.mkdtemp', 'tempfile.mkdtemp', ([], {}), '()\n', (378, 380), False, 'import tempfile\n'), ((403, 421), 'observations.r.pension.pension', 'pension', (['test_path'], {}), '(test_path)\n', (410, 421), False, 'from observations.r.pension import pension\n'), ((481, 505), 'shutil.rmtree', 'shutil.rmtre...
import numpy as np from scipy.sparse import csc_matrix, save_npz, hstack import time import argparse import gzip from pysam import VariantFile, TabixFile import json import os import itertools parser = argparse.ArgumentParser(description='Pull genotypes.') parser.add_argument('vcf_file', type=str, help='VCF file to p...
[ "pysam.VariantFile", "argparse.ArgumentParser", "gzip.open", "numpy.asarray", "os.path.isfile", "numpy.zeros", "pysam.TabixFile", "json.load", "scipy.sparse.save_npz", "time.time", "json.dump" ]
[((204, 258), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Pull genotypes."""'}), "(description='Pull genotypes.')\n", (227, 258), False, 'import argparse\n'), ((1546, 1557), 'time.time', 'time.time', ([], {}), '()\n', (1555, 1557), False, 'import time\n'), ((4632, 4658), 'pysam.Varian...
import random class Car: def __init__(self, num_of_street, streets): self.num_of_street = num_of_street self.streets = streets ''' tot_duration = 0 for street in streets: tot_duration += street.time self.path_duration = tot_duration ''' def ...
[ "random.randint" ]
[((6078, 6098), 'random.randint', 'random.randint', (['(1)', '(5)'], {}), '(1, 5)\n', (6092, 6098), False, 'import random\n')]
from prefect import Flow, Parameter, task @task def a(x): print(f'a: {x}') @task def b(x): print(f'b: {x}') @task def c(x): print(f'c: {x}') with Flow('my-flow') as flow: x = Parameter('x') a.set_dependencies(downstream_tasks=[b], keyword_tasks={'x': x}) b.set_dependencies(downstream_tas...
[ "prefect.Parameter", "prefect.Flow" ]
[((166, 181), 'prefect.Flow', 'Flow', (['"""my-flow"""'], {}), "('my-flow')\n", (170, 181), False, 'from prefect import Flow, Parameter, task\n'), ((199, 213), 'prefect.Parameter', 'Parameter', (['"""x"""'], {}), "('x')\n", (208, 213), False, 'from prefect import Flow, Parameter, task\n')]
# Copyright 2019 WebPageTest LLC. # Copyright 2017 Google Inc. # Use of this source code is governed by the Apache 2.0 license that can be # found in the LICENSE file. """Cross-platform support for os-level things that differ on different platforms""" import logging import os import platform import subprocess def kill...
[ "win32com.shell.shell.ShellExecuteEx", "logging.debug", "os.statvfs", "logging.exception", "ctypes.c_ulonglong", "ctypes.pointer", "ctypes.c_wchar_p", "win32api.CloseHandle", "platform.system", "subprocess.call", "win32api.HIWORD", "win32event.WaitForSingleObject", "psutil.process_iter", "...
[((409, 462), 'logging.debug', 'logging.debug', (['"""Terminating all instances of %s"""', 'exe'], {}), "('Terminating all instances of %s', exe)\n", (422, 462), False, 'import logging\n'), ((474, 491), 'platform.system', 'platform.system', ([], {}), '()\n', (489, 491), False, 'import platform\n'), ((1022, 1043), 'psut...
#!/usr/bin/env python ## ## @file echo_sedml.py ## @brief Echos (and prints) a NuML data. ## @author <NAME> ## ## <!-------------------------------------------------------------------------- ## This file is part of libNUML. Please visit http://numl.org for more ## information about NUML, and the latest version...
[ "libnuml.writeNUML", "sys.exit", "libnuml.readNUML" ]
[((607, 632), 'libnuml.readNUML', 'libnuml.readNUML', (['args[1]'], {}), '(args[1])\n', (623, 632), False, 'import libnuml\n'), ((774, 805), 'libnuml.writeNUML', 'libnuml.writeNUML', (['doc', 'args[2]'], {}), '(doc, args[2])\n', (791, 805), False, 'import libnuml\n'), ((586, 597), 'sys.exit', 'sys.exit', (['(1)'], {}),...
from statistics import mean from math import ceil, floor with open("./input.txt", "r") as inputFile: positionsStrLine = inputFile.readline() positionStrs = positionsStrLine.split(',') positions = [int(positionStr) for positionStr in positionStrs] positions.sort() bestPosition = positions[((len(positions) + 1)...
[ "statistics.mean", "math.ceil", "math.floor" ]
[((442, 457), 'statistics.mean', 'mean', (['positions'], {}), '(positions)\n', (446, 457), False, 'from statistics import mean\n'), ((476, 495), 'math.floor', 'floor', (['meanPosition'], {}), '(meanPosition)\n', (481, 495), False, 'from math import ceil, floor\n'), ((642, 660), 'math.ceil', 'ceil', (['meanPosition'], {...
""" byceps.blueprints.api.v1.user.views ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 <NAME> :License: Revised BSD (see `LICENSE` file for details) """ from flask import abort, jsonify, request from marshmallow import ValidationError from marshmallow.schema import SchemaMeta from .....services.user impor...
[ "flask.abort", "flask.request.get_json", "flask.jsonify" ]
[((1022, 1115), 'flask.jsonify', 'jsonify', (["{'id': user.id, 'screen_name': user.screen_name, 'avatar_url': user.avatar_url}"], {}), "({'id': user.id, 'screen_name': user.screen_name, 'avatar_url': user\n .avatar_url})\n", (1029, 1115), False, 'from flask import abort, jsonify, request\n'), ((1395, 1413), 'flask.r...