code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# Copyright 2021 <NAME> # # 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 writing, soft...
[ "os.environ.get" ]
[((992, 1036), 'os.environ.get', 'os.environ.get', (['"""RSSFLY_TEST_DATA_ROOT"""', '"""."""'], {}), "('RSSFLY_TEST_DATA_ROOT', '.')\n", (1006, 1036), False, 'import os\n')]
import os import sys from typing import Iterable from jinja2 import Environment, FileSystemLoader, Template import config as cfg from . import app_root_dir, doc_root_dir, resource_dir, template_dir _usage = "Usage: generate.py <onprem|aws|gcp|azure|k8s|alibabacloud|oci|programming|saas>" def load_tmpl(tmpl: str) -...
[ "os.path.splitext", "os.path.basename", "sys.exit", "config.TITLE_WORDS.get", "config.UPPER_WORDS.get" ]
[((530, 558), 'config.UPPER_WORDS.get', 'cfg.UPPER_WORDS.get', (['pvd', '()'], {}), '(pvd, ())\n', (549, 558), True, 'import config as cfg\n'), ((597, 625), 'config.TITLE_WORDS.get', 'cfg.TITLE_WORDS.get', (['pvd', '{}'], {}), '(pvd, {})\n', (616, 625), True, 'import config as cfg\n'), ((2847, 2869), 'os.path.basename'...
# Generated by Django 3.2.8 on 2022-05-31 10:13 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("eap_api", "0004_auto_20220531_0935"), ] operations = [ migrations.AlterField( model_name="eapuser", name="is_active"...
[ "django.db.models.BooleanField" ]
[((340, 522), 'django.db.models.BooleanField', 'models.BooleanField', ([], {'default': '(True)', 'help_text': '"""Designates whether this user should be treated as active. Unselect this instead of deleting accounts."""', 'verbose_name': '"""active"""'}), "(default=True, help_text=\n 'Designates whether this user sh...
import unittest import numpy as np from op_test import OpTest def modified_huber_loss_forward(val): if val < -1: return -4 * val elif val < 1: return (1 - val) * (1 - val) else: return 0 class TestModifiedHuberLossOp(OpTest): def setUp(self): self.op_type = 'modified_...
[ "unittest.main", "numpy.random.choice", "numpy.vectorize", "numpy.random.uniform" ]
[((1011, 1026), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1024, 1026), False, 'import unittest\n'), ((635, 676), 'numpy.vectorize', 'np.vectorize', (['modified_huber_loss_forward'], {}), '(modified_huber_loss_forward)\n', (647, 676), True, 'import numpy as np\n'), ((398, 442), 'numpy.random.uniform', 'np.ran...
"""The WaveBlocks Project Plot some quadrature rules. @author: <NAME> @copyright: Copyright (C) 2010, 2011 <NAME> @license: Modified BSD License """ from numpy import squeeze from matplotlib.pyplot import * from WaveBlocks import GaussHermiteQR tests = (2, 3, 4, 7, 32, 64, 128) for I in tests: Q = Gauss...
[ "WaveBlocks.GaussHermiteQR", "numpy.squeeze" ]
[((315, 332), 'WaveBlocks.GaussHermiteQR', 'GaussHermiteQR', (['I'], {}), '(I)\n', (329, 332), False, 'from WaveBlocks import GaussHermiteQR\n'), ((382, 392), 'numpy.squeeze', 'squeeze', (['N'], {}), '(N)\n', (389, 392), False, 'from numpy import squeeze\n'), ((438, 448), 'numpy.squeeze', 'squeeze', (['W'], {}), '(W)\n...
import os import cv2 import numpy as np import matplotlib.pyplot as plt import scipy ROWS = 64 COLS = 64 CHANNELS = 3 TRAIN_DIR = 'Train_data/' TEST_DIR = 'Test_data/' train_images = [TRAIN_DIR+i for i in os.listdir(TRAIN_DIR)] test_images = [TEST_DIR+i for i in os.listdir(TEST_DIR)] def read_image(file_path): ...
[ "numpy.abs", "os.listdir", "matplotlib.pyplot.ylabel", "numpy.power", "matplotlib.pyplot.xlabel", "numpy.log", "numpy.tanh", "numpy.squeeze", "numpy.exp", "numpy.sum", "numpy.zeros", "numpy.random.randn", "numpy.dot", "cv2.resize", "cv2.imread", "matplotlib.pyplot.legend", "matplotli...
[((6966, 6984), 'matplotlib.pyplot.ylabel', 'plt.ylabel', (['"""cost"""'], {}), "('cost')\n", (6976, 6984), True, 'import matplotlib.pyplot as plt\n'), ((6985, 7020), 'matplotlib.pyplot.xlabel', 'plt.xlabel', (['"""iterations (hundreds)"""'], {}), "('iterations (hundreds)')\n", (6995, 7020), True, 'import matplotlib.py...
""" A module for generating a map with 10 nearest movies """ from data_reader import read_data, select_year from locations_finder import coord_finder, find_nearest_movies from map_generator import generate_map def start(): year = int(input("Please enter a year you would like to have a map for:")) user_location...
[ "locations_finder.coord_finder", "data_reader.read_data", "map_generator.generate_map", "data_reader.select_year", "locations_finder.find_nearest_movies" ]
[((435, 470), 'data_reader.read_data', 'read_data', (['"""smaller_locations.list"""'], {}), "('smaller_locations.list')\n", (444, 470), False, 'from data_reader import read_data, select_year\n'), ((491, 520), 'data_reader.select_year', 'select_year', (['movie_data', 'year'], {}), '(movie_data, year)\n', (502, 520), Fal...
import math import re from typing import List, Dict from wbtools.db.generic import WBGenericDBManager from wbtools.lib.nlp.common import EntityType from wbtools.lib.nlp.literature_index.abstract_index import AbstractLiteratureIndex ALL_VAR_REGEX = r'({designations}|m|p|It)(_)?([A-z]+)?([0-9]+)([a-zA-Z]{{1,4}}[0-9]*)?...
[ "re.findall", "re.escape" ]
[((1992, 2027), 're.findall', 're.findall', (['regex', "(' ' + text + ' ')"], {}), "(regex, ' ' + text + ' ')\n", (2002, 2027), False, 'import re\n'), ((2622, 2640), 're.escape', 're.escape', (['keyword'], {}), '(keyword)\n', (2631, 2640), False, 'import re\n')]
"""Test motif.features.bitteli """ import unittest import numpy as np from motif.feature_extractors import bitteli def array_equal(array1, array2): return np.all(np.isclose(array1, array2, atol=1e-7)) class TestBitteliFeatures(unittest.TestCase): def setUp(self): self.ftr = bitteli.BitteliFeatures...
[ "numpy.isclose", "numpy.ones", "motif.feature_extractors.bitteli.BitteliFeatures", "numpy.array", "numpy.linspace" ]
[((169, 207), 'numpy.isclose', 'np.isclose', (['array1', 'array2'], {'atol': '(1e-07)'}), '(array1, array2, atol=1e-07)\n', (179, 207), True, 'import numpy as np\n'), ((297, 322), 'motif.feature_extractors.bitteli.BitteliFeatures', 'bitteli.BitteliFeatures', ([], {}), '()\n', (320, 322), False, 'from motif.feature_extr...
# Copyright 2016-present CERN – European Organization for Nuclear Research # # 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...
[ "qf_lib.common.utils.dateutils.relative_delta.RelativeDelta" ]
[((1293, 1426), 'qf_lib.common.utils.dateutils.relative_delta.RelativeDelta', 'RelativeDelta', ([], {'year': 'year', 'month': 'month', 'day': 'day', 'weekday': 'weekday', 'hour': 'hour', 'minute': 'minute', 'second': 'second', 'microsecond': 'microsecond'}), '(year=year, month=month, day=day, weekday=weekday, hour=hour...
# Generated by Django 2.2.6 on 2019-10-16 02:53 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
[ "django.db.models.EmailField", "django.db.models.TextField", "django.db.models.ForeignKey", "django.db.models.AutoField", "django.db.models.DateTimeField", "django.db.migrations.swappable_dependency", "django.db.models.CharField" ]
[((247, 304), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (278, 304), False, 'from django.db import migrations, models\n'), ((435, 528), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)...
# -*- coding: utf-8 -*- """ # 3D Image Data Synthesis. # Copyright (C) 2021 <NAME>, <NAME>, <NAME>, <NAME>, <NAME> # # 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 Liceense at # # http://www.apache....
[ "numpy.random.choice", "csv.writer", "os.path.join", "os.path.split", "csv.reader", "numpy.arange", "numpy.random.shuffle" ]
[((2046, 2066), 'numpy.arange', 'np.arange', (['num_files'], {}), '(num_files)\n', (2055, 2066), True, 'import numpy as np\n'), ((1316, 1344), 'csv.reader', 'csv.reader', (['f'], {'delimiter': '""";"""'}), "(f, delimiter=';')\n", (1326, 1344), False, 'import csv\n'), ((1723, 1751), 'numpy.random.shuffle', 'np.random.sh...
import errno import os.path import yaml from parameterized import param, parameterized from salt.exceptions import CommandExecutionError from salttesting.mixins import LoaderModuleMockMixin from salttesting.unit import TestCase from salttesting.mock import MagicMock, mock_open, patch import metalk8s_solutions from...
[ "salttesting.mock.patch.dict", "metalk8s_solutions.__virtual__", "salttesting.mock.mock_open", "metalk8s_solutions.list_solution_images", "metalk8s_solutions.read_solution_config", "metalk8s_solutions.read_config", "metalk8s_solutions.deactivate_solution", "salttesting.mock.MagicMock", "metalk8s_sol...
[((530, 548), 'yaml.safe_load', 'yaml.safe_load', (['fd'], {}), '(fd)\n', (544, 548), False, 'import yaml\n'), ((1402, 1465), 'tests.unit.utils.parameterized_from_cases', 'utils.parameterized_from_cases', (["YAML_TESTS_CASES['read_config']"], {}), "(YAML_TESTS_CASES['read_config'])\n", (1432, 1465), False, 'from tests....
import pytest from unittest.mock import MagicMock import logging from ecs_crd.canaryReleaseInfos import CanaryReleaseInfos from ecs_crd.prepareDeploymentContainerDefinitionsStep import PrepareDeploymentContainerDefinitionsStep from ecs_crd.canaryReleaseInfos import ScaleInfos logger = logging.Logger('mock') infos = C...
[ "logging.Logger", "ecs_crd.prepareDeploymentContainerDefinitionsStep.PrepareDeploymentContainerDefinitionsStep", "pytest.raises", "ecs_crd.canaryReleaseInfos.CanaryReleaseInfos" ]
[((288, 310), 'logging.Logger', 'logging.Logger', (['"""mock"""'], {}), "('mock')\n", (302, 310), False, 'import logging\n'), ((319, 352), 'ecs_crd.canaryReleaseInfos.CanaryReleaseInfos', 'CanaryReleaseInfos', ([], {'action': '"""test"""'}), "(action='test')\n", (337, 352), False, 'from ecs_crd.canaryReleaseInfos impor...
from fastapi import HTTPException, Query, APIRouter from starlette.requests import Request from starlette.status import HTTP_404_NOT_FOUND from .models import db, Metadata mod = APIRouter() @mod.get("/metadata") async def search_metadata( request: Request, data: bool = Query( False, descript...
[ "fastapi.APIRouter", "fastapi.HTTPException", "fastapi.Query" ]
[((180, 191), 'fastapi.APIRouter', 'APIRouter', ([], {}), '()\n', (189, 191), False, 'from fastapi import HTTPException, Query, APIRouter\n'), ((282, 407), 'fastapi.Query', 'Query', (['(False)'], {'description': '"""Switch to returning a list of GUIDs (false), or GUIDs mapping to their metadata (true)."""'}), "(False, ...
#!/usr/bin/env python # Download .mp3 podcast files of Radio Belgrade show Govori da bih te video (Speak so that I can see you) # grab all mp3s and save them with parsed name and date to the output folder import requests import os import time import xml.dom.minidom from urllib.parse import urlparse url = "https://www....
[ "os.path.exists", "urllib.parse.urlparse", "os.makedirs", "time.strftime", "os.path.join", "requests.get", "os.path.basename" ]
[((448, 478), 'time.strftime', 'time.strftime', (['"""%Y%m%d-%H%M%S"""'], {}), "('%Y%m%d-%H%M%S')\n", (461, 478), False, 'import time\n'), ((489, 524), 'os.path.join', 'os.path.join', (["('govori_' + timestamp)"], {}), "('govori_' + timestamp)\n", (501, 524), False, 'import os\n'), ((575, 598), 'os.path.exists', 'os.pa...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
[ "pulumi.getter", "pulumi.set", "pulumi.ResourceOptions", "pulumi.get" ]
[((2560, 2598), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""storedInfoTypeId"""'}), "(name='storedInfoTypeId')\n", (2573, 2598), False, 'import pulumi\n'), ((8292, 8328), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""currentVersion"""'}), "(name='currentVersion')\n", (8305, 8328), False, 'import pulumi\n'...
########################################################################## # # Copyright (c) 2019, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
[ "GafferUI.KeyEvent.Modifiers", "Gaffer.Metadata.value", "GafferSceneUI.ContextAlgo.getSelectedPaths", "GafferUI.KeyEvent", "GafferScene.SceneAlgo.shaderTweaks", "IECore.MenuDefinition", "GafferUI.NodeEditor.acquire", "functools.partial", "GafferScene.SceneAlgo.source", "Gaffer.StandardSet", "Gaf...
[((5473, 5528), 'GafferUI.KeyEvent', 'GafferUI.KeyEvent', (['"""E"""', 'GafferUI.KeyEvent.Modifiers.Alt'], {}), "('E', GafferUI.KeyEvent.Modifiers.Alt)\n", (5490, 5528), False, 'import GafferUI\n'), ((2986, 3009), 'IECore.MenuDefinition', 'IECore.MenuDefinition', ([], {}), '()\n', (3007, 3009), False, 'import IECore\n'...
import unittest from brightics.function.extraction.encoder import label_encoder, \ label_encoder_model from brightics.common.datasets import load_iris import random def get_iris_randomgroup(): df = load_iris() random_group1 = [] random_group2 = [] random_group2_map = {1:'A', 2:'B'} for i in ra...
[ "brightics.function.extraction.encoder.label_encoder", "brightics.function.extraction.encoder.label_encoder_model", "brightics.common.datasets.load_iris", "random.randint" ]
[((208, 219), 'brightics.common.datasets.load_iris', 'load_iris', ([], {}), '()\n', (217, 219), False, 'from brightics.common.datasets import load_iris\n'), ((678, 765), 'brightics.function.extraction.encoder.label_encoder', 'label_encoder', (['df'], {'input_col': '"""species"""', 'group_by': "['random_group1', 'random...
import hashlib import json import logging import re import sqlite3 from typing import List, Optional, Tuple import pystache from redash.models import Query, User from redash.query_runner import TYPE_STRING, guess_type, register from redash.query_runner.query_results import Results, _load_query, create_table from reda...
[ "logging.getLogger", "json.loads", "redash.query_runner.query_results.create_table", "sqlite3.connect", "re.compile", "redash.utils.json_dumps", "redash.query_runner.guess_type", "pystache.render", "redash.query_runner.register", "redash.query_runner.query_results._load_query" ]
[((357, 384), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (374, 384), False, 'import logging\n'), ((4593, 4628), 'redash.query_runner.register', 'register', (['ParameterSupportedResults'], {}), '(ParameterSupportedResults)\n', (4601, 4628), False, 'from redash.query_runner import TYPE_...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.db.models.deletion from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('notes', ...
[ "django.db.migrations.swappable_dependency", "django.db.models.AutoField", "django.db.models.CharField", "django.db.models.ForeignKey" ]
[((243, 300), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (274, 300), False, 'from django.db import models, migrations\n'), ((950, 1061), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django...
from flask import Flask from Config import app_config, app_active from flask import render_template from flask_sqlalchemy import SQLAlchemy import Forms import LDB import gGraficos config = app_config[app_active] def create_app(config_name): app = Flask(__name__, template_folder='templates') app.secret_key...
[ "flask.render_template", "Forms.info", "flask.Flask", "LDB.leitura", "gGraficos.criarimg", "flask_sqlalchemy.SQLAlchemy" ]
[((256, 300), 'flask.Flask', 'Flask', (['__name__'], {'template_folder': '"""templates"""'}), "(__name__, template_folder='templates')\n", (261, 300), False, 'from flask import Flask\n'), ((531, 546), 'flask_sqlalchemy.SQLAlchemy', 'SQLAlchemy', (['app'], {}), '(app)\n', (541, 546), False, 'from flask_sqlalchemy import...
import numpy as np import torch from modules.frustum import get_box_corners_3d from kitti_meters.util import get_box_iou_3d __all__ = ['MeterFrustumKitti'] class MeterFrustumKitti: def __init__(self, num_heading_angle_bins, num_size_templates, size_templates, class_name_to_class_id, metric='iou_...
[ "modules.frustum.get_box_corners_3d", "numpy.sum", "torch.arange", "torch.argmax" ]
[((717, 784), 'torch.arange', 'torch.arange', (['(0)', '(2 * np.pi)', '(2 * np.pi / self.num_heading_angle_bins)'], {}), '(0, 2 * np.pi, 2 * np.pi / self.num_heading_angle_bins)\n', (729, 784), False, 'import torch\n'), ((2407, 2453), 'torch.arange', 'torch.arange', (['batch_size'], {'device': 'center.device'}), '(batc...
import os import json import ConfigParser import logging.config base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # load the shared settings file settings_file_path = os.path.join(base_dir, 'config', 'settings.config') settings = ConfigParser.ConfigParser() settings.read(settings_file_path) # s...
[ "json.load", "os.path.join", "os.path.abspath", "ConfigParser.ConfigParser" ]
[((191, 242), 'os.path.join', 'os.path.join', (['base_dir', '"""config"""', '"""settings.config"""'], {}), "(base_dir, 'config', 'settings.config')\n", (203, 242), False, 'import os\n'), ((254, 281), 'ConfigParser.ConfigParser', 'ConfigParser.ConfigParser', ([], {}), '()\n', (279, 281), False, 'import ConfigParser\n'),...
from flask import Flask from flask_restplus import Api, Resource, fields from services.serviceHandler import convertCurrency, getCurrencyExchangeRates from services.countryCurrencyCodeHandler import ( getCountryAndCurrencyCode, getCurrencyNameAndCode, ) app = Flask(__name__) api = Api( app, version="1....
[ "services.countryCurrencyCodeHandler.getCountryAndCurrencyCode", "services.serviceHandler.getCurrencyExchangeRates", "flask.Flask", "services.countryCurrencyCodeHandler.getCurrencyNameAndCode", "flask_restplus.Api", "flask_restplus.fields.String" ]
[((269, 284), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (274, 284), False, 'from flask import Flask\n'), ((291, 468), 'flask_restplus.Api', 'Api', (['app'], {'version': '"""1.0.0"""', 'title': '"""Bee Travels Currency Data Service"""', 'description': '"""This is a microservice that handles currency ex...
import numpy as np import pandas as pd from Bio import AlignIO, Seq # parameter to determine the maximum missing proportion that we keep missing_thresh = 0.4 # load the alignments and turn them into a numpy array alignments = AlignIO.read(snakemake.input[0], 'fasta') align_arr = np.array([list(rec) for rec in alignme...
[ "numpy.array", "Bio.Seq.Seq", "Bio.AlignIO.read", "Bio.AlignIO.write" ]
[((228, 269), 'Bio.AlignIO.read', 'AlignIO.read', (['snakemake.input[0]', '"""fasta"""'], {}), "(snakemake.input[0], 'fasta')\n", (240, 269), False, 'from Bio import AlignIO, Seq\n'), ((739, 798), 'numpy.array', 'np.array', (['[(m / align_arr.shape[0]) for m in missing_bases]'], {}), '([(m / align_arr.shape[0]) for m i...
import pandas as pd import sys def fix(lists): df = pd.read_json(lists) df2 = pd.DataFrame([p for p1 in df.players for p in p1]) df2['theme1'] = '' df2['theme2'] = '' for i, l in df2.list2.iteritems(): try: df2.theme2.iloc[i] = l['theme'] except KeyError: c...
[ "pandas.DataFrame", "pandas.read_json" ]
[((58, 77), 'pandas.read_json', 'pd.read_json', (['lists'], {}), '(lists)\n', (70, 77), True, 'import pandas as pd\n'), ((89, 139), 'pandas.DataFrame', 'pd.DataFrame', (['[p for p1 in df.players for p in p1]'], {}), '([p for p1 in df.players for p in p1])\n', (101, 139), True, 'import pandas as pd\n')]
import multiprocessing import os import time rootdir = input() keyword = input() batch_size = 1 def try_multiple_operations(file_path): try: with open(file_path, "rb") as f: # open the file for reading for line in f: # use: for i, line in enumerate(f) if you need line numbers ...
[ "multiprocessing.Queue", "os.path.join", "multiprocessing.Pool", "os.walk" ]
[((1019, 1042), 'multiprocessing.Queue', 'multiprocessing.Queue', ([], {}), '()\n', (1040, 1042), False, 'import multiprocessing\n'), ((1197, 1247), 'multiprocessing.Pool', 'multiprocessing.Pool', (['(3)', 'worker_main', '(the_queue,)'], {}), '(3, worker_main, (the_queue,))\n', (1217, 1247), False, 'import multiprocess...
from flask import Blueprint, request router = Blueprint("router", __name__) @router.route("/check") def check(): return "Congratulations! Your app works. :)" @router.route("/add", methods=["POST"]) def add(): first_number = request.form['FirstNumber'] second_number = request.form['SecondNumber'] re...
[ "flask.Blueprint" ]
[((47, 76), 'flask.Blueprint', 'Blueprint', (['"""router"""', '__name__'], {}), "('router', __name__)\n", (56, 76), False, 'from flask import Blueprint, request\n')]
import io import struct class SteamPacketBuffer(io.BytesIO): """In-memory byte buffer.""" def __len__(self): return len(self.getvalue()) def __repr__(self): return '<PacketBuffer: {}: {}>'.format(len(self), self.getvalue()) def __str__(self): return str(self.getvalue()) ...
[ "struct.pack" ]
[((447, 471), 'struct.pack', 'struct.pack', (['"""<B"""', 'value'], {}), "('<B', value)\n", (458, 471), False, 'import struct\n'), ((606, 630), 'struct.pack', 'struct.pack', (['"""<h"""', 'value'], {}), "('<h', value)\n", (617, 630), False, 'import struct\n'), ((765, 789), 'struct.pack', 'struct.pack', (['"""<f"""', 'v...
""" GLSL shader generation """ from utils import Stages, getHeader, getShader, getMacro, genFnCall, fsl_assert, get_whitespace from utils import isArray, getArrayLen, getArrayBaseName, getMacroName, DescriptorSets, is_groupshared_decl import os, sys, importlib, re from shutil import copyfile def pssl(fsl, dst, rootSi...
[ "utils.get_whitespace", "utils.getMacro", "xbox", "utils.getShader", "utils.is_groupshared_decl", "utils.getHeader", "re.match", "orbis.preamble", "prospero.preamble", "os.path.dirname", "xbox.set_ps_zorder_earlyz", "os.path.basename", "utils.getMacroName", "utils.getArrayBaseName", "xbo...
[((722, 751), 'xbox', 'xbox', (['fsl', 'dst', 'rootSignature'], {}), '(fsl, dst, rootSignature)\n', (726, 751), False, 'import xbox\n'), ((859, 878), 'utils.getShader', 'getShader', (['fsl', 'dst'], {}), '(fsl, dst)\n', (868, 878), False, 'from utils import Stages, getHeader, getShader, getMacro, genFnCall, fsl_assert,...
# Copyright 2018 <NAME> # # 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, softwa...
[ "logging.basicConfig", "pydriller.repository.Repository" ]
[((630, 725), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(asctime)s - %(levelname)s - %(message)s"""', 'level': 'logging.INFO'}), "(format='%(asctime)s - %(levelname)s - %(message)s',\n level=logging.INFO)\n", (649, 725), False, 'import logging\n'), ((811, 874), 'pydriller.repository.Reposito...
from __future__ import (division, print_function, absolute_import, unicode_literals) import numpy as np from scipy.interpolate import InterpolatedUnivariateSpline as InterpUS from powderday.nebular_emission.cloudy_tools import sym_to_name """ ---------------------------------------------------...
[ "numpy.array", "numpy.log10", "scipy.interpolate.InterpolatedUnivariateSpline", "powderday.nebular_emission.cloudy_tools.sym_to_name" ]
[((1685, 1698), 'powderday.nebular_emission.cloudy_tools.sym_to_name', 'sym_to_name', ([], {}), '()\n', (1696, 1698), False, 'from powderday.nebular_emission.cloudy_tools import sym_to_name\n'), ((2912, 2954), 'numpy.log10', 'np.log10', (['(0.08096 + 0.02618 * 10.0 ** logZ)'], {}), '(0.08096 + 0.02618 * 10.0 ** logZ)\n...
# Generated by Django 3.2.5 on 2021-08-12 02:00 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('character', '0003_alter_character_id'), ] operations = [ migrations.AlterField( model_name='character', name='alignm...
[ "django.db.models.CharField" ]
[((344, 638), 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'choices': "[('LG', 'Lawful Good'), ('NG', 'Neutral Good'), ('CG', 'Chaotic Good'), (\n 'LN', 'Lawful Neutral'), ('N', 'True Neutral'), ('CN',\n 'Chaotic Neutral'), ('LE', 'Lawful Evil'), ('NE', 'Neutral Evil'), (\n 'CE', ...
import keras from keras.models import Sequential, load_model, Model from keras.layers import Dense, Dropout, Flatten from keras.layers import Conv2D, MaxPooling2D from scipy import io mat_contents = io.loadmat('Data/X_test_0.mat') X_test_0 = mat_contents['X_test_0'] mat_contents = io.loadmat('Data/X_test_1.mat') X_tes...
[ "scipy.io.loadmat", "keras.models.load_model", "scipy.io.savemat" ]
[((200, 231), 'scipy.io.loadmat', 'io.loadmat', (['"""Data/X_test_0.mat"""'], {}), "('Data/X_test_0.mat')\n", (210, 231), False, 'from scipy import io\n'), ((283, 314), 'scipy.io.loadmat', 'io.loadmat', (['"""Data/X_test_1.mat"""'], {}), "('Data/X_test_1.mat')\n", (293, 314), False, 'from scipy import io\n'), ((830, 86...
from appJar import gui def press(btn): if btn == "info": app.infoBox("Title Here", "Message here...") if btn == "error": app.errorBox("Title Here", "Message here...") if btn == "warning": app.warningBox("Title Here", "Message here...") if btn == "yesno": app.yesNoBox("Title Here", "Message here...") ...
[ "appJar.gui" ]
[((668, 673), 'appJar.gui', 'gui', ([], {}), '()\n', (671, 673), False, 'from appJar import gui\n')]
from flask import request import pytest import json from app import create_app, create_rest_api from db import get_db from change_light import is_aquarium_id_valid @pytest.fixture def client(): local_app = create_app() create_rest_api(local_app) client = local_app.test_client() yield client def get_...
[ "db.get_db", "app.create_rest_api", "app.create_app" ]
[((212, 224), 'app.create_app', 'create_app', ([], {}), '()\n', (222, 224), False, 'from app import create_app, create_rest_api\n'), ((229, 255), 'app.create_rest_api', 'create_rest_api', (['local_app'], {}), '(local_app)\n', (244, 255), False, 'from app import create_app, create_rest_api\n'), ((607, 619), 'app.create_...
####################### # <NAME> # # inventory.py # # Copyright 2018-2020 # # <NAME> # ####################### # ********** # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software ...
[ "random.randint" ]
[((3730, 3752), 'random.randint', 'random.randint', (['(1)', '(100)'], {}), '(1, 100)\n', (3744, 3752), False, 'import random\n'), ((2446, 2468), 'random.randint', 'random.randint', (['(1)', '(100)'], {}), '(1, 100)\n', (2460, 2468), False, 'import random\n')]
from custom_objects import FinanceCalculator from tkinter import messagebox class CalculationsPresenter(object): def __init__(self, view): self.view = view def convert_price(self, price): try: converted_price = FinanceCalculator.decimal_to_treasury(price) self.view.dis...
[ "custom_objects.FinanceCalculator.treasury_to_decimal", "custom_objects.FinanceCalculator.decimal_to_treasury", "tkinter.messagebox.showinfo" ]
[((250, 294), 'custom_objects.FinanceCalculator.decimal_to_treasury', 'FinanceCalculator.decimal_to_treasury', (['price'], {}), '(price)\n', (287, 294), False, 'from custom_objects import FinanceCalculator\n'), ((495, 539), 'custom_objects.FinanceCalculator.treasury_to_decimal', 'FinanceCalculator.treasury_to_decimal',...
from django.shortcuts import render from rest_framework.viewsets import ViewSet from rest_framework.response import Response from .serializers import WeatherSerializer import requests import json import math import os import yaml from rest_framework.decorators import action from django.conf import settings def api_do...
[ "json.dumps", "os.path.join", "requests.get", "rest_framework.response.Response", "rest_framework.decorators.action" ]
[((748, 844), 'rest_framework.decorators.action', 'action', ([], {'methods': "['get']", 'detail': '(False)', 'url_path': '"""(?P<city>[\\\\w-]+)/"""', 'url_name': '"""get_weather"""'}), "(methods=['get'], detail=False, url_path='(?P<city>[\\\\w-]+)/',\n url_name='get_weather')\n", (754, 844), False, 'from rest_frame...
import sys sys.path.append("/usr/lib/python2.7/site-packages") import redis _r = redis.Redis(host='localhost', port=6379, db=0) import cherrypy class Test(object): def index(self): _r.incr("/") return "OK!" index.exposed = True cherrypy.quickstart(Test())
[ "sys.path.append", "redis.Redis" ]
[((11, 62), 'sys.path.append', 'sys.path.append', (['"""/usr/lib/python2.7/site-packages"""'], {}), "('/usr/lib/python2.7/site-packages')\n", (26, 62), False, 'import sys\n'), ((82, 128), 'redis.Redis', 'redis.Redis', ([], {'host': '"""localhost"""', 'port': '(6379)', 'db': '(0)'}), "(host='localhost', port=6379, db=0)...
# -*- coding: utf-8 -*- import httplib as http from flask import request from framework.exceptions import HTTPError from framework.auth.decorators import must_be_logged_in from website.util import web_url_for from website.project.decorators import ( must_have_addon, must_be_addon_authorizer, must_have_permi...
[ "framework.exceptions.HTTPError", "website.project.decorators.must_have_addon", "website.util.web_url_for", "flask.request.json.get", "website.project.decorators.must_have_permission", "website.project.decorators.must_be_addon_authorizer" ]
[((510, 545), 'website.project.decorators.must_have_addon', 'must_have_addon', (['"""figshare"""', '"""node"""'], {}), "('figshare', 'node')\n", (525, 545), False, 'from website.project.decorators import must_have_addon, must_be_addon_authorizer, must_have_permission, must_not_be_registration, must_be_valid_project\n')...
############################################################################### # # The MIT License (MIT) # # Copyright (c) Crossbar.io Technologies GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in ...
[ "autobahn.twisted.resource.WebSocketResource", "json.loads", "autobahn.twisted.websocket.WebSocketServerFactory.__init__", "autobahn.util.newid", "twisted.python.log.msg", "json.dumps", "twisted.python.log.startLogging", "twisted.web.client.getPage", "twisted.web.static.File", "autobahn.util.utcno...
[((8501, 8529), 'twisted.python.log.startLogging', 'log.startLogging', (['sys.stdout'], {}), '(sys.stdout)\n', (8517, 8529), False, 'from twisted.python import log\n'), ((8743, 8752), 'twisted.web.static.File', 'File', (['"""."""'], {}), "('.')\n", (8747, 8752), False, 'from twisted.web.static import File\n'), ((8861, ...
import subprocess, re, sys def get_coref_score(metric, path_to_scorer, gold=None, preds=None): output=subprocess.check_output(["perl", path_to_scorer, metric, preds, gold]).decode("utf-8") output=output.split("\n")[-3] matcher=re.search("Coreference: Recall: \(.*?\) (.*?)% Precision: \(.*?\) (.*?)% F1: (.*?)%", ou...
[ "subprocess.check_output", "re.search" ]
[((232, 341), 're.search', 're.search', (['"""Coreference: Recall: \\\\(.*?\\\\) (.*?)%\tPrecision: \\\\(.*?\\\\) (.*?)%\tF1: (.*?)%"""', 'output'], {}), "(\n 'Coreference: Recall: \\\\(.*?\\\\) (.*?)%\\tPrecision: \\\\(.*?\\\\) (.*?)%\\tF1: (.*?)%'\n , output)\n", (241, 341), False, 'import subprocess, re, sys\n...
import argparse import json import base64 import hashlib import sys import binascii from optigatrust.util.types import * from optigatrust.pk import * from optigatrust.x509 import * private_key_slot_map = { 'second': KeyId.ECC_KEY_E0F1, '0xE0E1': KeyId.ECC_KEY_E0F1, '0xE0F1': KeyId.ECC_KEY_E0F1...
[ "argparse.ArgumentParser", "json.dumps", "sys.exit", "json.load", "sys.stdout.flush", "hashlib.sha1" ]
[((6610, 6699), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Communicate with your OPTIGA(TM) Trust sample"""'}), "(description=\n 'Communicate with your OPTIGA(TM) Trust sample')\n", (6633, 6699), False, 'import argparse\n'), ((5600, 5618), 'sys.stdout.flush', 'sys.stdout.flush', (...
import pytest from tequila import numpy as np from tequila.circuit.gradient import grad from tequila.objective.objective import Objective, Variable import operator def test_nesting(): a = Variable(name='a') variables = {a: 3.0} b = a + 2 - 2 c = (b * 5) / 5 d = -(-c) e = d ** 0.5 f = e ** ...
[ "tequila.circuit.gradient.grad", "pytest.mark.parametrize", "tequila.objective.objective.Variable", "tequila.objective.objective.Objective" ]
[((859, 925), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""gradvar"""', "['a', 'b', 'c', 'd', 'e', 'f']"], {}), "('gradvar', ['a', 'b', 'c', 'd', 'e', 'f'])\n", (882, 925), False, 'import pytest\n'), ((194, 212), 'tequila.objective.objective.Variable', 'Variable', ([], {'name': '"""a"""'}), "(name='a')\n...
from getnear.config import Tagged, Untagged, Ignore from getnear.logging import info from lxml import etree import re import requests import telnetlib def connect(hostname, *args, **kwargs): url = f'http://{hostname}/' html = requests.get(url).text doc = etree.HTML(html) for title in doc.xpath('//titl...
[ "getnear.logging.info", "re.match", "requests.get", "lxml.etree.HTML", "telnetlib.Telnet" ]
[((269, 285), 'lxml.etree.HTML', 'etree.HTML', (['html'], {}), '(html)\n', (279, 285), False, 'from lxml import etree\n'), ((236, 253), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (248, 253), False, 'import requests\n'), ((336, 375), 're.match', 're.match', (['"""NETGEAR GS\\\\d+T"""', 'title.text'], {}),...
from string import ascii_letters import textwrap from fontTools.misc.testTools import getXML from fontTools import subset from fontTools.fontBuilder import FontBuilder from fontTools.pens.ttGlyphPen import TTGlyphPen from fontTools.ttLib import TTFont, newTable from fontTools.subset.svg import NAMESPACES, ranges impo...
[ "textwrap.dedent", "pytest.mark.parametrize", "fontTools.subset.svg.ranges", "pytest.importorskip", "fontTools.ttLib.newTable", "fontTools.pens.ttGlyphPen.TTGlyphPen", "fontTools.misc.testTools.getXML", "fontTools.ttLib.TTFont", "fontTools.fontBuilder.FontBuilder" ]
[((339, 372), 'pytest.importorskip', 'pytest.importorskip', (['"""lxml.etree"""'], {}), "('lxml.etree')\n", (358, 372), False, 'import pytest\n'), ((16533, 16796), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""ints, expected_ranges"""', '[((), []), ((0,), [(0, 0)]), ((0, 1), [(0, 1)]), ((1, 1, 1, 1), [(1,...
""" Subprocessor for device messages """ import logging from ..utilities.tag import Tag from ..workers import device_worker_forward from ..workers import device_worker_startup from ..utilities.address import Address from ..utilities.status import Status from ..utilities.data_indexes import SubprocessorIndex _Subproces...
[ "logging.Logger" ]
[((361, 403), 'logging.Logger', 'logging.Logger', (['"""utilities.process_device"""'], {}), "('utilities.process_device')\n", (375, 403), False, 'import logging\n')]
import os BASE_DIR = os.path.abspath(os.path.dirname(__file__)) CSRF_ENABLED = True SECRET_KEY = 'you-will-never-guess' SQLITE = 'db.sqlite3' SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(BASE_DIR, SQLITE) + '?check_same_thread=False'
[ "os.path.dirname", "os.path.join" ]
[((39, 64), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (54, 64), False, 'import os\n'), ((187, 217), 'os.path.join', 'os.path.join', (['BASE_DIR', 'SQLITE'], {}), '(BASE_DIR, SQLITE)\n', (199, 217), False, 'import os\n')]
import pytest from flipy.lp_problem import LpProblem from flipy.lp_objective import LpObjective, Maximize from flipy.lp_variable import LpVariable from flipy.lp_expression import LpExpression from flipy.lp_constraint import LpConstraint from io import StringIO @pytest.fixture def problem(): return LpProblem('te...
[ "flipy.lp_expression.LpExpression", "flipy.lp_variable.LpVariable", "flipy.lp_problem.LpProblem", "flipy.lp_constraint.LpConstraint", "pytest.raises", "pytest.mark.usefixtures", "io.StringIO", "flipy.lp_objective.LpObjective" ]
[((448, 487), 'pytest.mark.usefixtures', 'pytest.mark.usefixtures', (['"""problem"""', '"""x"""'], {}), "('problem', 'x')\n", (471, 487), False, 'import pytest\n'), ((307, 332), 'flipy.lp_problem.LpProblem', 'LpProblem', (['"""test_problem"""'], {}), "('test_problem')\n", (316, 332), False, 'from flipy.lp_problem impor...
from pathlib import Path import click import yaml from sklearn.model_selection import ParameterGrid from ertk.utils import PathlibPath, get_arg_mapping @click.command() @click.argument("param_grid", type=PathlibPath(exists=True, dir_okay=False)) @click.argument("output", type=Path) @click.option("--format", help="F...
[ "sklearn.model_selection.ParameterGrid", "click.argument", "ertk.utils.PathlibPath", "yaml.dump", "click.option", "click.command", "ertk.utils.get_arg_mapping" ]
[((157, 172), 'click.command', 'click.command', ([], {}), '()\n', (170, 172), False, 'import click\n'), ((251, 286), 'click.argument', 'click.argument', (['"""output"""'], {'type': 'Path'}), "('output', type=Path)\n", (265, 286), False, 'import click\n'), ((288, 335), 'click.option', 'click.option', (['"""--format"""']...
# -*- coding: utf-8 -*- """ Tests for vector_tile/polygon.py """ import unittest from mapbox_vector_tile.polygon import make_it_valid from shapely import wkt import os class TestPolygonMakeValid(unittest.TestCase): def test_dev_errors(self): test_dir = os.path.dirname(os.path.realpath(__file__)) ...
[ "shapely.wkt.loads", "mapbox_vector_tile.polygon.make_it_valid", "os.path.realpath", "os.path.join" ]
[((669, 850), 'shapely.wkt.loads', 'wkt.loads', (['"""MULTIPOLYGON(\n ((0 0, 0 4, 4 4, 4 0, 0 0), (1 1, 1 3, 3 3, 3 1, 1 1)),\n ((5 0, 9 0, 9 4, 5 4, 5 0), (6 1, 6 3, 8 3, 8 1, 6 1))\n )"""'], {}), '(\n """MULTIPOLYGON(\n ((0 0, 0 4, 4 4, 4 0, 0 0), (1 1, 1 3, 3 3, 3 1, 1 1)),\n ...
# encoding: utf-8 import os import ssl import sys import csv import json import time import base64 from datetime import datetime from datetime import timedelta try: import pyodbc except ImportError: pass # PYTHON 2 FALLBACK # try: from urllib.request import urlopen, Request from urllib.parse import...
[ "pyodbc.connect", "urllib2.urlopen", "csv.DictReader", "sys.setdefaultencoding", "ssl.create_default_context", "base64.b64encode", "json.dumps", "time.strftime", "urllib2.Request", "urllib.urlencode", "sys.exit", "json.load" ]
[((598, 626), 'ssl.create_default_context', 'ssl.create_default_context', ([], {}), '()\n', (624, 626), False, 'import ssl\n'), ((1267, 1290), 'urllib2.Request', 'Request', (['url', 'post_data'], {}), '(url, post_data)\n', (1274, 1290), False, 'from urllib2 import urlopen, Request\n'), ((1422, 1451), 'urllib2.urlopen',...
import unittest from libsaas.executors import test_executor from libsaas.services import googleoauth2 class GoogleOauth2TestCase(unittest.TestCase): def setUp(self): self.executor = test_executor.use() self.executor.set_response(b'{}', 200, {}) self.service = googleoauth2.GoogleOAuth2('...
[ "libsaas.services.googleoauth2.GoogleOAuth2", "libsaas.executors.test_executor.use" ]
[((198, 217), 'libsaas.executors.test_executor.use', 'test_executor.use', ([], {}), '()\n', (215, 217), False, 'from libsaas.executors import test_executor\n'), ((293, 334), 'libsaas.services.googleoauth2.GoogleOAuth2', 'googleoauth2.GoogleOAuth2', (['"""id"""', '"""secret"""'], {}), "('id', 'secret')\n", (318, 334), F...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from main import Config from pyrogram import filters from pyrogram import Client #from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton from urllib.parse import quote_plus, unquote import math, os, time, datetime, aiohttp, asyncio, mimetypes, loggi...
[ "logging.getLogger", "pyrogram.filters.command", "helpers.audio_renamer.rna2", "helpers.url_uploader.leecher2", "helpers.file_renamer.rnf2", "helpers.link_info.linfo2", "pyrogram.Client.on_message", "helpers.media_info.cinfo2", "helpers.video_renamer.rnv2", "pyrogram.filters.regex", "helpers.vco...
[((1037, 1064), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1054, 1064), False, 'import math, os, time, datetime, aiohttp, asyncio, mimetypes, logging\n'), ((4078, 4169), 'pyrogram.Client.on_message', 'Client.on_message', (['(filters.private & (filters.audio | filters.document | filte...
import typing from typing import Any import json import os from multiprocessing import Process, Queue from allennlp.data.tokenizers.word_splitter import SpacyWordSplitter from spacy.tokenizer import Tokenizer import spacy from tqdm.auto import tqdm import time nlp = spacy.load("en") class TokenizingWorker(Process):...
[ "json.loads", "spacy.load", "time.sleep", "allennlp.data.tokenizers.word_splitter.SpacyWordSplitter", "os.cpu_count", "tqdm.auto.tqdm", "spacy.tokenizer.Tokenizer", "multiprocessing.Queue" ]
[((269, 285), 'spacy.load', 'spacy.load', (['"""en"""'], {}), "('en')\n", (279, 285), False, 'import spacy\n'), ((1608, 1615), 'multiprocessing.Queue', 'Queue', ([], {}), '()\n', (1613, 1615), False, 'from multiprocessing import Process, Queue\n'), ((1632, 1652), 'multiprocessing.Queue', 'Queue', ([], {'maxsize': '(100...
# -*- coding:utf-8 -*- import random import time from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.keys import Keys from app.api.util.web_request import WebRequest, USER_AGENT_PC, USER_AGENT_MOBILE class SpiderWebDriver(object): def __init__(sel...
[ "selenium.webdriver.chrome.options.Options", "random.choice", "selenium.webdriver.Chrome", "app.api.util.web_request.WebRequest", "time.sleep" ]
[((2641, 2653), 'app.api.util.web_request.WebRequest', 'WebRequest', ([], {}), '()\n', (2651, 2653), False, 'from app.api.util.web_request import WebRequest, USER_AGENT_PC, USER_AGENT_MOBILE\n'), ((5239, 5251), 'app.api.util.web_request.WebRequest', 'WebRequest', ([], {}), '()\n', (5249, 5251), False, 'from app.api.uti...
import os import argparse import numpy as np import csv import cv2 img_w = 0 img_h = 0 def relativ2pixel(detection, frameHeight, frameWidth): center_x, center_y = int(detection[0] * frameWidth), int(detection[1] * frameHeight) width, height = int(detection[2] * frameWidth), int(detection[3] * frameHeight) ...
[ "cv2.rectangle", "argparse.ArgumentParser", "cv2.imshow", "os.path.basename", "cv2.cvtColor", "cv2.resize", "cv2.waitKey", "cv2.imread" ]
[((1581, 1606), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1604, 1606), False, 'import argparse\n'), ((1790, 1814), 'cv2.imread', 'cv2.imread', (['img_path', '(-1)'], {}), '(img_path, -1)\n', (1800, 1814), False, 'import cv2\n'), ((2804, 2839), 'cv2.imshow', 'cv2.imshow', (['"""output"""',...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
[ "time.ctime", "tensorflow.ones", "tensorflow.nn.moments", "sys.stdout.flush", "time.time", "tensorflow.zeros", "sys.stdout.write" ]
[((2133, 2151), 'sys.stdout.flush', 'sys.stdout.flush', ([], {}), '()\n', (2149, 2151), False, 'import sys\n'), ((2161, 2172), 'time.time', 'time.time', ([], {}), '()\n', (2170, 2172), False, 'import time\n'), ((2611, 2629), 'sys.stdout.flush', 'sys.stdout.flush', ([], {}), '()\n', (2627, 2629), False, 'import sys\n'),...
from inqry.system_specs import win_physical_disk UNIQUE_ID_OUTPUT = """ UniqueId -------- {256a2559-ce63-5434-1bee-3ff629daa3a7} {4069d186-f178-856e-cff3-ba250c28446d} {4da19f06-2e28-2722-a0fb-33c02696abcd} 50014EE20D887D66 eui.0025384161B6798A 5000C5007A75E216 500A07510F1A545C ATA LITEONIT LMT-256M6M mSATA 256GB ...
[ "inqry.system_specs.win_physical_disk.get_physical_disk_identifiers" ]
[((1190, 1255), 'inqry.system_specs.win_physical_disk.get_physical_disk_identifiers', 'win_physical_disk.get_physical_disk_identifiers', (['UNIQUE_ID_OUTPUT'], {}), '(UNIQUE_ID_OUTPUT)\n', (1237, 1255), False, 'from inqry.system_specs import win_physical_disk\n')]
import time # NOQA from app import db class Link(db.Model): id = db.Column(db.Integer, primary_key=True) title = db.Column(db.String) url = db.Column(db.String) description = db.Column(db.String) type = db.Column(db.Integer) enabled = db.Column(db.Boolean) createtime = db.Column(db.DateTi...
[ "app.db.Column", "time.time" ]
[((72, 111), 'app.db.Column', 'db.Column', (['db.Integer'], {'primary_key': '(True)'}), '(db.Integer, primary_key=True)\n', (81, 111), False, 'from app import db\n'), ((124, 144), 'app.db.Column', 'db.Column', (['db.String'], {}), '(db.String)\n', (133, 144), False, 'from app import db\n'), ((155, 175), 'app.db.Column'...
from django.test import TestCase from django.urls import reverse_lazy from ..models import PHOTO_MODEL, UploadedPhotoModel, IMAGE_SIZES from .model_factories import get_image_file, get_zip_file import time from uuid import uuid4 class UploadPhotoApiViewTest(TestCase): def check_photo_ok_and_delete(self, photo): ...
[ "uuid.uuid4", "time.sleep", "django.urls.reverse_lazy" ]
[((699, 712), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (709, 712), False, 'import time\n'), ((1391, 1404), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (1401, 1404), False, 'import time\n'), ((605, 633), 'django.urls.reverse_lazy', 'reverse_lazy', (['"""image_upload"""'], {}), "('image_upload')\n", (6...
from concurrent.futures import ALL_COMPLETED, ThreadPoolExecutor, as_completed import csv import dearpygui.dearpygui as dpg from os.path import isfile, isdir, join import pyperclip import subprocess import sys from tempfile import gettempdir from traceback import print_exc import core import extruct import utilio fro...
[ "dearpygui.dearpygui.add_input_text", "dearpygui.dearpygui.create_viewport", "utilio.ask_directry", "tkinter.filedialog.askdirectory", "ffmpeg.output", "subprocess.STARTUPINFO", "dearpygui.dearpygui.window", "dearpygui.dearpygui.add_radio_button", "dearpygui.dearpygui.set_primary_window", "pypercl...
[((613, 633), 'dearpygui.dearpygui.create_context', 'dpg.create_context', ([], {}), '()\n', (631, 633), True, 'import dearpygui.dearpygui as dpg\n'), ((14990, 15020), 'utilio.create_workdir', 'utilio.create_workdir', (['TEMPDIR'], {}), '(TEMPDIR)\n', (15011, 15020), False, 'import utilio\n'), ((15122, 15197), 'dearpygu...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- from asdf import yamlutil from asdf.versioning import AsdfSpec from ..types import AstronomyDataModelType from ..fixed_location import FixedLocation class FixedLocationType(AstronomyDataModelType): name = 'datamodel/fixed_loca...
[ "asdf.yamlutil.custom_tree_to_tagged_tree", "asdf.yamlutil.tagged_tree_to_custom_tree" ]
[((647, 702), 'asdf.yamlutil.custom_tree_to_tagged_tree', 'yamlutil.custom_tree_to_tagged_tree', (['node.latitude', 'ctx'], {}), '(node.latitude, ctx)\n', (682, 702), False, 'from asdf import yamlutil\n'), ((728, 784), 'asdf.yamlutil.custom_tree_to_tagged_tree', 'yamlutil.custom_tree_to_tagged_tree', (['node.longitude'...
# Generated by Django 4.0.3 on 2022-03-21 13:04 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('app', '0002_remove_profile_caption_alter_profile_profile_pic_and_more'), ] operations = [ migrations.Create...
[ "django.db.models.ForeignKey", "django.db.models.CharField", "django.db.models.BigAutoField", "django.db.models.IntegerField" ]
[((400, 496), 'django.db.models.BigAutoField', 'models.BigAutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (419, 496), False, 'from django.db import migrations, m...
from setuptools import setup setup( name='pyons', version='1.0', author="<NAME>", author_email="<EMAIL>", license="MIT", py_modules=['pyons'], install_requires=[ ], tests_requires=[ 'pytest', ], )
[ "setuptools.setup" ]
[((31, 199), 'setuptools.setup', 'setup', ([], {'name': '"""pyons"""', 'version': '"""1.0"""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'license': '"""MIT"""', 'py_modules': "['pyons']", 'install_requires': '[]', 'tests_requires': "['pytest']"}), "(name='pyons', version='1.0', author='<NAME>', author_...
#! /usr/bin/env python3.2 import re def _subpre(text): list=re.split('(<pre>|</pre>)',text) for i in range(len(list)): # begin of pre if i%4==1: list[i]='\n\n ' # in pre elif i%4==2: list[i]=re.sub('<p>|<br>|\n\n', '\n\n ',list[i]) # end of pre elif i%4==3: list[i]=...
[ "re.sub", "re.split" ]
[((64, 96), 're.split', 're.split', (['"""(<pre>|</pre>)"""', 'text'], {}), "('(<pre>|</pre>)', text)\n", (72, 96), False, 'import re\n'), ((379, 425), 're.split', 're.split', (['"""(<blockquote>|</blockquote>)"""', 'text'], {}), "('(<blockquote>|</blockquote>)', text)\n", (387, 425), False, 'import re\n'), ((934, 970)...
from requests.adapters import HTTPAdapter, DEFAULT_POOLBLOCK from requests.packages.urllib3.poolmanager import PoolManager class TribAdapter(HTTPAdapter): def init_poolmanager(self, connections, maxsize, block=DEFAULT_POOLBLOCK): self._pool_connections = connections self._pool_maxsize = maxsize ...
[ "requests.packages.urllib3.poolmanager.PoolManager" ]
[((379, 468), 'requests.packages.urllib3.poolmanager.PoolManager', 'PoolManager', ([], {'num_pools': 'connections', 'maxsize': 'maxsize', 'block': 'block', 'ssl_version': '"""TLSv1"""'}), "(num_pools=connections, maxsize=maxsize, block=block,\n ssl_version='TLSv1')\n", (390, 468), False, 'from requests.packages.urll...
import spacy from spacy.lang.ro import Romanian from typing import Dict, List, Iterable from nltk import sent_tokenize import re # JSON Example localhost:8081/spacy application/json # { # "lang" : "en", # "blocks" : ["După terminarea oficială a celui de-al doilea război mondial, în conformitate cu discursul lu...
[ "spacy.util.get_lang_class", "re.compile", "spacy.load", "nltk.sent_tokenize", "re.sub" ]
[((2724, 2752), 'spacy.load', 'spacy.load', (['"""xx_ent_wiki_sm"""'], {}), "('xx_ent_wiki_sm')\n", (2734, 2752), False, 'import spacy\n'), ((4265, 4285), 'nltk.sent_tokenize', 'sent_tokenize', (['block'], {}), '(block)\n', (4278, 4285), False, 'from nltk import sent_tokenize\n'), ((989, 1004), 're.compile', 're.compil...
#! /usr/bin/env python # comando con argumentos # y procesamiento de una imagen # enviada por el usuario from telegram.ext import Updater, CommandHandler, MessageHandler, Filters from io import BytesIO from PIL import Image import cv2 as cv import skimage.io as io updater = Updater('api token del bot') def sendImag...
[ "PIL.Image.fromarray", "io.BytesIO", "skimage.io.imread", "cv2.cvtColor", "telegram.ext.MessageHandler", "telegram.ext.CommandHandler", "telegram.ext.Updater" ]
[((278, 306), 'telegram.ext.Updater', 'Updater', (['"""api token del bot"""'], {}), "('api token del bot')\n", (285, 306), False, 'from telegram.ext import Updater, CommandHandler, MessageHandler, Filters\n'), ((352, 388), 'cv2.cvtColor', 'cv.cvtColor', (['frame', 'cv.COLOR_BGR2RGB'], {}), '(frame, cv.COLOR_BGR2RGB)\n'...
from sklearn.preprocessing import StandardScaler, LabelEncoder, MinMaxScaler, OneHotEncoder import numpy as np import pandas as pd import tqdm """ Class for Preprocessing CICIDS2017 Data represented as rows """ class CICIDSPreprocessor: def __init__(self): self.to_delete_columns = ['Flow ID', ' Timestamp...
[ "numpy.array" ]
[((1214, 1235), 'numpy.array', 'np.array', (['windows_arr'], {}), '(windows_arr)\n', (1222, 1235), True, 'import numpy as np\n')]
import os from netmiko import ConnectHandler from getpass import getpass from pprint import pprint # Code so automated tests will run properly # Check for environment variable, if that fails, use getpass(). password = os.getenv("NETMIKO_PASSWORD") if os.getenv("NETMIKO_PASSWORD") else getpass() my_device = { "dev...
[ "netmiko.ConnectHandler", "getpass.getpass", "pprint.pprint", "os.getenv" ]
[((252, 281), 'os.getenv', 'os.getenv', (['"""NETMIKO_PASSWORD"""'], {}), "('NETMIKO_PASSWORD')\n", (261, 281), False, 'import os\n'), ((219, 248), 'os.getenv', 'os.getenv', (['"""NETMIKO_PASSWORD"""'], {}), "('NETMIKO_PASSWORD')\n", (228, 248), False, 'import os\n'), ((287, 296), 'getpass.getpass', 'getpass', ([], {})...
import requests import os from user_data import UserData import json class DataManager: """This class is responsible for talking to the Google Sheet.""" def __init__(self) -> None: self.SHEETY_URL = f"https://api.sheety.co/{os.environ['SHEETY_SHEET_ID']}/pythonFlightDeals" self.sheet_data = {...
[ "requests.put", "requests.post", "requests.get" ]
[((517, 584), 'requests.get', 'requests.get', ([], {'url': 'f"""{self.SHEETY_URL}/prices"""', 'headers': 'self.headers'}), "(url=f'{self.SHEETY_URL}/prices', headers=self.headers)\n", (529, 584), False, 'import requests\n'), ((818, 914), 'requests.put', 'requests.put', ([], {'url': 'f"""{self.SHEETY_URL}/prices/{row_id...
import copy from deploy_config_generator.utils import yaml_dump from deploy_config_generator.output import kube_common class OutputPlugin(kube_common.OutputPlugin): NAME = 'kube_kong_consumer' DESCR = 'Kubernetes KongConsumer output plugin' FILE_EXT = '.yaml' DEFAULT_CONFIG = { 'fields': { ...
[ "deploy_config_generator.utils.yaml_dump", "copy.deepcopy" ]
[((1443, 1458), 'deploy_config_generator.utils.yaml_dump', 'yaml_dump', (['data'], {}), '(data)\n', (1452, 1458), False, 'from deploy_config_generator.utils import yaml_dump\n'), ((482, 528), 'copy.deepcopy', 'copy.deepcopy', (['kube_common.METADATA_FIELD_SPEC'], {}), '(kube_common.METADATA_FIELD_SPEC)\n', (495, 528), ...
import pytest from conflow.merge import merge_factory from conflow.node import Node, NodeList, NodeMap def test_merge_node_node(default_config): base = Node('base', 'node_A') other = Node('other', 'node_B') assert merge_factory(base, other, default_config) == other def test_merge_node_nodelist(default_...
[ "conflow.node.NodeList", "conflow.node.NodeMap", "pytest.raises", "conflow.merge.merge_factory", "conflow.node.Node" ]
[((159, 181), 'conflow.node.Node', 'Node', (['"""base"""', '"""node_A"""'], {}), "('base', 'node_A')\n", (163, 181), False, 'from conflow.node import Node, NodeList, NodeMap\n'), ((194, 217), 'conflow.node.Node', 'Node', (['"""other"""', '"""node_B"""'], {}), "('other', 'node_B')\n", (198, 217), False, 'from conflow.no...
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2020 dlilien <<EMAIL>> # # Distributed under terms of the MIT license. """ """ import numpy as np import cartopy.crs as ccrs import matplotlib.pyplot as plt from .cartopy_overrides import SPS # import shapely.geometry as sgeom USP_EXTEN...
[ "cartopy.crs.epsg", "numpy.arange" ]
[((733, 750), 'numpy.arange', 'np.arange', (['(0)', '(180)'], {}), '(0, 180)\n', (742, 750), True, 'import numpy as np\n'), ((767, 791), 'numpy.arange', 'np.arange', (['(-90)', '(-80)', '(0.1)'], {}), '(-90, -80, 0.1)\n', (776, 791), True, 'import numpy as np\n'), ((700, 715), 'cartopy.crs.epsg', 'ccrs.epsg', (['(3031)...
from PyQuantum.TC3.Cavity import Cavity from PyQuantum.TC3.Hamiltonian3 import Hamiltonian3 capacity = { '0_1': 2, '1_2': 2, } wc = { '0_1': 0.2, '1_2': 0.3, } wa = [0.2] * 3 g = { '0_1': 1, '1_2': 200, } cv = Cavity(wc=wc, wa=wa, g=g, n_atoms=3, n_levels=3) # cv.wc_info() # cv.wa_info() #...
[ "PyQuantum.TC3.Hamiltonian3.Hamiltonian3", "PyQuantum.TC3.Cavity.Cavity" ]
[((239, 287), 'PyQuantum.TC3.Cavity.Cavity', 'Cavity', ([], {'wc': 'wc', 'wa': 'wa', 'g': 'g', 'n_atoms': '(3)', 'n_levels': '(3)'}), '(wc=wc, wa=wa, g=g, n_atoms=3, n_levels=3)\n', (245, 287), False, 'from PyQuantum.TC3.Cavity import Cavity\n'), ((348, 404), 'PyQuantum.TC3.Hamiltonian3.Hamiltonian3', 'Hamiltonian3', (...
# Copyright 2016-present CERN – European Organization for Nuclear Research # # 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...
[ "qf_lib.common.utils.logging.qf_parent_logger.qf_logger.getChild", "qf_lib.common.utils.miscellaneous.function_name.get_function_name", "qf_lib.backtesting.order.order.Order", "math.floor" ]
[((2024, 2067), 'qf_lib.common.utils.logging.qf_parent_logger.qf_logger.getChild', 'qf_logger.getChild', (['self.__class__.__name__'], {}), '(self.__class__.__name__)\n', (2042, 2067), False, 'from qf_lib.common.utils.logging.qf_parent_logger import qf_logger\n'), ((16367, 16387), 'qf_lib.common.utils.miscellaneous.fun...
import random as rd def genPass(num , length): print ("Password Generator") print ("===================\n") numpass=num lenpass=length AlphaLcase=[ chr(m) for m in range(65, 91)] AlphaCcase=[ chr(n) for n in range(97, 123)] Intset=[ chr(p) for p in range(48,58)] listsetpass=[] for j...
[ "random.shuffle", "random.randint" ]
[((361, 383), 'random.randint', 'rd.randint', (['(2)', 'lenpass'], {}), '(2, lenpass)\n', (371, 383), True, 'import random as rd\n'), ((402, 429), 'random.randint', 'rd.randint', (['(1)', 'randAlphaset'], {}), '(1, randAlphaset)\n', (412, 429), True, 'import random as rd\n'), ((1051, 1071), 'random.shuffle', 'rd.shuffl...
from datetime import date, datetime, timedelta from matplotlib import pyplot as plt, dates as mdates from matplotlib.ticker import MaxNLocator from helpers import programmes_helper filename = 'offers.png' class OffersService: def __init__(self, db_conn): self.db_conn = db_conn async def generate_gra...
[ "matplotlib.pyplot.text", "matplotlib.pyplot.grid", "matplotlib.pyplot.savefig", "datetime.datetime.utcnow", "matplotlib.pyplot.gca", "matplotlib.dates.DateFormatter", "matplotlib.pyplot.plot", "matplotlib.pyplot.fill_between", "matplotlib.pyplot.close", "matplotlib.ticker.MaxNLocator", "datetim...
[((2376, 2385), 'matplotlib.pyplot.gca', 'plt.gca', ([], {}), '()\n', (2383, 2385), True, 'from matplotlib import pyplot as plt, dates as mdates\n'), ((2406, 2435), 'matplotlib.dates.DateFormatter', 'mdates.DateFormatter', (['"""%d %b"""'], {}), "('%d %b')\n", (2426, 2435), True, 'from matplotlib import pyplot as plt, ...
#!/usr/bin/env python # pylint: disable=no-value-for-parameter,too-many-nested-blocks import contextlib import datetime import functools import re from abc import abstractmethod import sqlalchemy as sa from sqlalchemy import event, exc, func, select from sqlalchemy.ext import declarative from sqlalchemy.ext import hy...
[ "sqlalchemy.orm.load_only", "sqlalchemy.func.min", "sqlalchemy.Text", "sqlalchemy.String", "lifeloopweb.exception.InvalidEmail", "sqlalchemy.select", "datetime.timedelta", "lifeloopweb.exception.ModelUnknownAttrbute", "sqlalchemy.Column", "sqlalchemy.orm.sessionmaker", "sqlalchemy.DateTime", "...
[((639, 667), 'lifeloopweb.logging.get_logger', 'logging.get_logger', (['__name__'], {}), '(__name__)\n', (657, 667), False, 'from lifeloopweb import config, constants, exception, logging, renders, subscription\n'), ((697, 705), 'lifeloopweb.helpers.base_helper.Helper', 'Helper', ([], {}), '()\n', (703, 705), False, 'f...
import unittest import os.path import requests_mock import tableauserverclient as TSC TEST_ASSET_DIR = os.path.join(os.path.dirname(__file__), 'assets') SIGN_IN_XML = os.path.join(TEST_ASSET_DIR, 'auth_sign_in.xml') SIGN_IN_IMPERSONATE_XML = os.path.join(TEST_ASSET_DIR, 'auth_sign_in_impersonate.xml') SIGN_IN_ERROR_X...
[ "tableauserverclient.TableauAuth", "requests_mock.mock", "tableauserverclient.PersonalAccessTokenAuth", "tableauserverclient.SiteItem", "tableauserverclient.Server" ]
[((461, 486), 'tableauserverclient.Server', 'TSC.Server', (['"""http://test"""'], {}), "('http://test')\n", (471, 486), True, 'import tableauserverclient as TSC\n'), ((672, 692), 'requests_mock.mock', 'requests_mock.mock', ([], {}), '()\n', (690, 692), False, 'import requests_mock\n'), ((790, 848), 'tableauserverclient...
import gym from gym import spaces, error, utils from gym.utils import seeding import numpy as np import configparser from os import path import matplotlib.pyplot as plt from matplotlib.pyplot import gca font = {'family': 'sans-serif', 'weight': 'bold', 'size': 14} class FlockingEnv(gym.Env): def...
[ "numpy.clip", "configparser.ConfigParser", "numpy.hstack", "numpy.sin", "gym.utils.seeding.np_random", "numpy.mean", "numpy.reshape", "numpy.min", "matplotlib.pyplot.ylim", "matplotlib.pyplot.gca", "numpy.fill_diagonal", "numpy.square", "os.path.dirname", "numpy.cos", "matplotlib.pyplot....
[((431, 458), 'configparser.ConfigParser', 'configparser.ConfigParser', ([], {}), '()\n', (456, 458), False, 'import configparser\n'), ((1387, 1428), 'numpy.zeros', 'np.zeros', (['(self.n_agents, self.nx_system)'], {}), '((self.n_agents, self.nx_system))\n', (1395, 1428), True, 'import numpy as np\n'), ((1446, 1480), '...
import sys,os from torch.autograd import Variable import torch.optim as optim from tensorboardX import SummaryWriter import torch import time import shutil from torch.utils.data import DataLoader import csv from samp_net import EMDLoss, AttributeLoss, SAMPNet from config import Config from cadb_dataset import CADBData...
[ "samp_net.AttributeLoss", "torch.optim.Adam", "os.listdir", "torch.optim.lr_scheduler.ReduceLROnPlateau", "tensorboardX.SummaryWriter", "torch.optim.SGD", "samp_net.SAMPNet", "config.Config", "csv.writer", "cadb_dataset.CADBDataset", "os.path.join", "torch.nn.MSELoss", "samp_net.EMDLoss", ...
[((725, 750), 'cadb_dataset.CADBDataset', 'CADBDataset', (['"""train"""', 'cfg'], {}), "('train', cfg)\n", (736, 750), False, 'from cadb_dataset import CADBDataset\n'), ((769, 881), 'torch.utils.data.DataLoader', 'DataLoader', (['trainset'], {'batch_size': 'cfg.batch_size', 'shuffle': '(True)', 'num_workers': 'cfg.num_...
import pygame from pygame.mixer import music from pystage.core.assets import SoundManager from pystage.core._base_sprite import BaseSprite import time class _Sound(BaseSprite): # Like for costumes and backdrops, we need a class structure here. # Plus a global sound manager. def __init__(self): su...
[ "pystage.core.assets.SoundManager" ]
[((366, 384), 'pystage.core.assets.SoundManager', 'SoundManager', (['self'], {}), '(self)\n', (378, 384), False, 'from pystage.core.assets import SoundManager\n')]
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Basic permissions module.""" from sqlalchemy import or_ class SystemWideRoles(object): """List of system wide roles.""" # pylint: disable=too-few-public-methods SUPERUSER = u"Superuser" ADMINI...
[ "sqlalchemy.or_" ]
[((1087, 1119), 'sqlalchemy.or_', 'or_', (['filter_expr', 'filter_in_expr'], {}), '(filter_expr, filter_in_expr)\n', (1090, 1119), False, 'from sqlalchemy import or_\n')]
from django.contrib import admin from rango.models import Category, Page admin.site.register(Page) admin.site.register(Category) class CategoryAdmin(admin.ModelAdmin): prepopulated_fields = {'slug':('name',)} class PageAdmin(admin.ModelAdmin): list_display = ('title', 'cate...
[ "django.contrib.admin.site.register" ]
[((79, 104), 'django.contrib.admin.site.register', 'admin.site.register', (['Page'], {}), '(Page)\n', (98, 104), False, 'from django.contrib import admin\n'), ((106, 135), 'django.contrib.admin.site.register', 'admin.site.register', (['Category'], {}), '(Category)\n', (125, 135), False, 'from django.contrib import admi...
# Copyright (c) 2021, CRS4 # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribu...
[ "tiledb.DenseArray.create", "math.ceil", "argparse.ArgumentParser", "os.path.normpath", "tiledb.Attr", "tiledb.open", "zarr.open", "sys.exit", "promort_tools.libs.utils.logger.get_logger", "tiledb.Domain", "tiledb.Dim", "tiledb.ArraySchema" ]
[((4348, 4373), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (4371, 4373), False, 'import argparse, sys, os\n'), ((4998, 5039), 'promort_tools.libs.utils.logger.get_logger', 'get_logger', (['args.log_level', 'args.log_file'], {}), '(args.log_level, args.log_file)\n', (5008, 5039), False, 'fro...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def add_webhook_notification_template_fields(apps, schema_editor): # loop over all existing webhook notification templates and make # sure they have the new "http_method" field filled in with "POST" Notificat...
[ "django.db.migrations.RunPython" ]
[((706, 800), 'django.db.migrations.RunPython', 'migrations.RunPython', (['add_webhook_notification_template_fields', 'migrations.RunPython.noop'], {}), '(add_webhook_notification_template_fields, migrations.\n RunPython.noop)\n', (726, 800), False, 'from django.db import migrations\n')]
#!/usr/bin/env python import os import sys import subprocess from django.core.management import execute_from_command_line FLAKE8_ARGS = ['django_restql', 'tests', 'setup.py', 'runtests.py'] WARNING_COLOR = '\033[93m' END_COLOR = '\033[0m' def flake8_main(args): print('Running flake8 code linting') ret = su...
[ "os.environ.setdefault", "sys.exit", "subprocess.call", "django.core.management.execute_from_command_line" ]
[((318, 352), 'subprocess.call', 'subprocess.call', (["(['flake8'] + args)"], {}), "(['flake8'] + args)\n", (333, 352), False, 'import subprocess\n'), ((550, 615), 'os.environ.setdefault', 'os.environ.setdefault', (['"""DJANGO_SETTINGS_MODULE"""', '"""tests.settings"""'], {}), "('DJANGO_SETTINGS_MODULE', 'tests.setting...
# Copyright (c) 2016 Civic Knowledge. This file is licensed under the terms of the # Revised BSD License, included in this distribution as LICENSE """ Parser for the Simple Data Package format. The parser consists of several iterable generator objects. """ NO_TERM = '<no_term>' # No parent term -- no '.' -- in ter...
[ "urllib2.urlopen", "cStringIO.StringIO", "os.path.dirname", "copy.copy", "csv.reader" ]
[((5263, 5282), 'csv.reader', 'csv.reader', (['self._f'], {}), '(self._f)\n', (5273, 5282), False, 'import csv\n'), ((5756, 5776), 'cStringIO.StringIO', 'StringIO', (['self._data'], {}), '(self._data)\n', (5764, 5776), False, 'from cStringIO import StringIO\n'), ((5839, 5852), 'csv.reader', 'csv.reader', (['f'], {}), '...
# -*- coding: utf-8 -*- # Copyright (c) 2016 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ "os.urandom", "base64.b64encode", "time.time" ]
[((1280, 1294), 'os.urandom', 'os.urandom', (['(16)'], {}), '(16)\n', (1290, 1294), False, 'import os\n'), ((1376, 1406), 'base64.b64encode', 'base64.b64encode', (['(header + key)'], {}), '(header + key)\n', (1392, 1406), False, 'import base64\n'), ((1336, 1347), 'time.time', 'time.time', ([], {}), '()\n', (1345, 1347)...
import re import pathlib from clldutils.text import strip_chars from cldfbench import Dataset as BaseDataset from cldfbench import CLDFSpec QUOTES = '“”' class Dataset(BaseDataset): dir = pathlib.Path(__file__).parent id = "lapollaqiang" def cldf_specs(self): # A dataset must declare all CLDF sets it ...
[ "cldfbench.CLDFSpec", "pathlib.Path", "re.compile", "clldutils.text.strip_chars", "re.match" ]
[((3145, 3207), 're.compile', 're.compile', (['"""Text\\\\s+(?P<number>[0-9]+)\\\\s*:\\\\s+(?P<title>.+)"""'], {}), "('Text\\\\s+(?P<number>[0-9]+)\\\\s*:\\\\s+(?P<title>.+)')\n", (3155, 3207), False, 'import re\n'), ((196, 218), 'pathlib.Path', 'pathlib.Path', (['__file__'], {}), '(__file__)\n', (208, 218), False, 'im...
# Copyright (c) Facebook, Inc. and its affiliates. # # 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 ...
[ "torch.nn.ReLU", "torch.sqrt", "ray.rllib.utils.annotations.override", "torch.sum", "torch.nn.Module.__init__", "torch.nn.MaxPool1d", "torch.nn.functional.grid_sample", "ray.rllib.models.torch.torch_modelv2.TorchModelV2.__init__", "torch.nn.Embedding", "collections.namedtuple", "minihack.agent.c...
[((18373, 18443), 'ray.rllib.models.ModelCatalog.register_custom_model', 'ModelCatalog.register_custom_model', (['"""rllib_nle_model"""', 'RLLibNLENetwork'], {}), "('rllib_nle_model', RLLibNLENetwork)\n", (18407, 18443), False, 'from ray.rllib.models import ModelCatalog\n'), ((2499, 2609), 'collections.namedtuple', 'co...
import os.path from depthaware.data.base_dataset import * from PIL import Image import time def make_dataset_fromlst(dataroot, listfilename): """ NYUlist format: imagepath seglabelpath depthpath HHApath """ images = [] segs = [] depths = [] HHAs = [] with open(listfilename) as f: ...
[ "PIL.Image.open", "time.time" ]
[((1271, 1315), 'PIL.Image.open', 'Image.open', (["self.paths_dict['images'][index]"], {}), "(self.paths_dict['images'][index])\n", (1281, 1315), False, 'from PIL import Image\n'), ((3487, 3531), 'PIL.Image.open', 'Image.open', (["self.paths_dict['images'][index]"], {}), "(self.paths_dict['images'][index])\n", (3497, 3...
from Arquivo1 import Produto #READ #Consultar o Banco de dados #1.Retorna todas as informações do Banco de dados produtos = Produto.objects() print(produtos) for produto in produtos: print(produto.Nome, produto.Valor)
[ "Arquivo1.Produto.objects" ]
[((128, 145), 'Arquivo1.Produto.objects', 'Produto.objects', ([], {}), '()\n', (143, 145), False, 'from Arquivo1 import Produto\n')]
from flask_script import Manager from src import app manager = Manager(app) if __name__ == "__main__": manager.run()
[ "flask_script.Manager" ]
[((66, 78), 'flask_script.Manager', 'Manager', (['app'], {}), '(app)\n', (73, 78), False, 'from flask_script import Manager\n')]
from django.test import TestCase, Client from django.urls import reverse from shop.products.models import Product from tests.base.mixins import ProductTestUtils class ProductDetailsTest(ProductTestUtils, TestCase): def setUp(self): self.client = Client() self.product = self.create_product( ...
[ "django.urls.reverse", "django.test.Client" ]
[((261, 269), 'django.test.Client', 'Client', ([], {}), '()\n', (267, 269), False, 'from django.test import TestCase, Client\n'), ((556, 614), 'django.urls.reverse', 'reverse', (['"""product_details"""'], {'kwargs': "{'pk': self.product.id}"}), "('product_details', kwargs={'pk': self.product.id})\n", (563, 614), False,...
import socket import threading import os import sys from pathlib import Path #--------------------------------------------------- def ReadLine(conn): line = '' while True: try: byte = conn.recv(1) except: print('O cliente encerrou') return 0 ...
[ "os.listdir", "socket.socket", "pathlib.Path", "os.makedirs", "os.getcwd", "os.chdir", "os.path.realpath", "sys.exit", "threading.Thread" ]
[((3962, 3977), 'os.chdir', 'os.chdir', (['pydir'], {}), '(pydir)\n', (3970, 3977), False, 'import os\n'), ((4036, 4085), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (4049, 4085), False, 'import socket\n'), ((3894, 3920), 'os.path.realpath'...