code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
from setuptools import setup, find_packages with open("readme.md", "r") as fh: long_description = fh.read() setup( name='vvspy', py_modules=["vvspy"], version='1.1.3', license='MIT', description='API Wrapper for VVS (Verkehrsverbund Stuttgart)', author='zaanposni', author_email='<EMAIL>', url='htt...
[ "setuptools.find_packages" ]
[((453, 486), 'setuptools.find_packages', 'find_packages', ([], {'exclude': "['*tests']"}), "(exclude=['*tests'])\n", (466, 486), False, 'from setuptools import setup, find_packages\n')]
import os import subprocess from unittest import skip from unittest.mock import patch from plz.runner import run_command starting_dir = os.getcwd() def test_run_command_returns_int(): # Arrange # Act result = run_command("echo test") # Assert assert type(result) == int @patch("subprocess.che...
[ "plz.runner.run_command", "os.getcwd", "unittest.mock.patch", "unittest.skip", "os.chdir" ]
[((138, 149), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (147, 149), False, 'import os\n'), ((299, 329), 'unittest.mock.patch', 'patch', (['"""subprocess.check_call"""'], {}), "('subprocess.check_call')\n", (304, 329), False, 'from unittest.mock import patch\n'), ((576, 606), 'unittest.mock.patch', 'patch', (['"""subp...
import utils from . import rnn from . import vae from . import common from . import pooling from . import manager from . import encoder from . import decoder from . import nonlinear from . import embedding def add_arguments(parser): ModelArgumentConstructor(parser).add_all_arguments() class ModelArgumentConstru...
[ "utils.map_val" ]
[((2959, 3026), 'utils.map_val', 'utils.map_val', (['type', 'kwargs_map'], {'ignore_err': '(True)', 'fallback': 'fallback'}), '(type, kwargs_map, ignore_err=True, fallback=fallback)\n', (2972, 3026), False, 'import utils\n')]
import json import os from django.utils.translation import ugettext_lazy as _ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRETS_DIR = os.path.join(BASE_DIR, 'secret') SECRETS_BASE = os.path.join(SECRETS_DIR, 'base.json') try: secrets_base = json.load(open(SECRETS_BASE, 'rt')) except ...
[ "django.utils.translation.ugettext_lazy", "os.path.abspath", "subprocess.call", "os.path.join" ]
[((165, 197), 'os.path.join', 'os.path.join', (['BASE_DIR', '"""secret"""'], {}), "(BASE_DIR, 'secret')\n", (177, 197), False, 'import os\n'), ((213, 251), 'os.path.join', 'os.path.join', (['SECRETS_DIR', '"""base.json"""'], {}), "(SECRETS_DIR, 'base.json')\n", (225, 251), False, 'import os\n'), ((3235, 3272), 'os.path...
# -*- coding: utf-8 -*- from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin from django.conf.urls.static import static from django.conf import settings admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', ...
[ "django.contrib.admin.autodiscover", "django.conf.urls.static.static", "django.conf.urls.url", "django.conf.urls.include" ]
[((238, 258), 'django.contrib.admin.autodiscover', 'admin.autodiscover', ([], {}), '()\n', (256, 258), False, 'from django.contrib import admin\n'), ((1797, 1860), 'django.conf.urls.static.static', 'static', (['settings.STATIC_URL'], {'document_root': 'settings.STATIC_ROOT'}), '(settings.STATIC_URL, document_root=setti...
from mmcv.cnn import ConvModule, build_norm_layer from torch import nn class InvertedResidual(nn.Module): """Inverted residual module. Args: in_channels (int): The input channels of the InvertedResidual block. out_channels (int): The output channels of the InvertedResidual block. stri...
[ "mmcv.cnn.build_norm_layer", "torch.nn.Conv2d", "mmcv.cnn.ConvModule", "torch.nn.Sequential" ]
[((2287, 2309), 'torch.nn.Sequential', 'nn.Sequential', (['*layers'], {}), '(*layers)\n', (2300, 2309), False, 'from torch import nn\n'), ((1486, 1595), 'mmcv.cnn.ConvModule', 'ConvModule', (['in_channels', 'hidden_dim'], {'kernel_size': '(1)', 'conv_cfg': 'conv_cfg', 'norm_cfg': 'norm_cfg', 'act_cfg': 'act_cfg'}), '(i...
from nltk import download download()
[ "nltk.download" ]
[((26, 36), 'nltk.download', 'download', ([], {}), '()\n', (34, 36), False, 'from nltk import download\n')]
import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import numpy as np df = pd.DataFrame({'Group': ['A', 'A', 'A', 'B', 'C', 'B', 'B', 'C', 'A', 'C'], 'Apple': np.random.rand(10),'Orange': np.random.rand(10)}) # df = df[['Group','Apple','Orange']] dd = pd.melt(df, id_vars=['Gr...
[ "numpy.random.rand", "pandas.melt", "seaborn.boxplot", "matplotlib.pyplot.show" ]
[((296, 382), 'pandas.melt', 'pd.melt', (['df'], {'id_vars': "['Group']", 'value_vars': "['Apple', 'Orange']", 'var_name': '"""Fruits"""'}), "(df, id_vars=['Group'], value_vars=['Apple', 'Orange'], var_name=\n 'Fruits')\n", (303, 382), True, 'import pandas as pd\n'), ((378, 434), 'seaborn.boxplot', 'sns.boxplot', ([...
from flask import ( Flask, render_template, Response, stream_with_context, send_from_directory, ) from flask_cors import CORS import os import random import json import string from time import sleep from datetime import datetime, date, timedelta def random_date(year_start=2000, year_end=2005): ...
[ "random.randint", "os.makedirs", "flask_cors.CORS", "flask.Flask", "random.getrandbits", "random.choice", "json.dumps", "datetime.datetime", "random.randrange", "os.path.relpath", "datetime.timedelta", "flask.render_template" ]
[((376, 402), 'datetime.datetime', 'datetime', (['year_start', '(1)', '(1)'], {}), '(year_start, 1, 1)\n', (384, 402), False, 'from datetime import datetime, date, timedelta\n'), ((418, 442), 'datetime.datetime', 'datetime', (['year_end', '(1)', '(1)'], {}), '(year_end, 1, 1)\n', (426, 442), False, 'from datetime impor...
import unittest from agent import * from completesimulation import HamadryasSim, HamaPopulation, GeladaSim, GelPopulation from dispersal import HamadryasDispersal, GeladaDispersal from group import HamadryasGroup, GeladaGroup from seedgroups import HamadryasSeed, GeladaSeed class DispersalTests(unittest.TestCase): ...
[ "group.GeladaGroup", "completesimulation.GelPopulation", "completesimulation.GeladaSim", "seedgroups.GeladaSeed.addagenttoseed" ]
[((361, 372), 'completesimulation.GeladaSim', 'GeladaSim', ([], {}), '()\n', (370, 372), False, 'from completesimulation import HamadryasSim, HamaPopulation, GeladaSim, GelPopulation\n'), ((387, 402), 'completesimulation.GelPopulation', 'GelPopulation', ([], {}), '()\n', (400, 402), False, 'from completesimulation impo...
#! python3 # fillTheGaps.py - Finds all files with a given prefix, such as # spam001.txt, spam002.txt, and so on, in a single # folder and locates any gaps in the numbering. Have # the program rename all the later files to close this # gap. # <NAME> i...
[ "os.rename", "os.path.exists", "os.listdir", "re.compile" ]
[((1652, 1682), 're.compile', 're.compile', (['"""\\\\.[a-zA-Z]{3,4}"""'], {}), "('\\\\.[a-zA-Z]{3,4}')\n", (1662, 1682), False, 'import re\n'), ((1927, 1956), 're.compile', 're.compile', (['"""([1-9]+[0]*)\\\\."""'], {}), "('([1-9]+[0]*)\\\\.')\n", (1937, 1956), False, 'import re\n'), ((2019, 2037), 'os.listdir', 'os....
import maya.mel as mm import maya.cmds as mc import maya.OpenMaya as OpenMaya import glTools.utils.base import glTools.utils.mesh import glTools.utils.skinCluster import os.path def writeBurlyWeights(mesh,skinCluster,influence,filePath): ''' ''' # Get basic procedure information burly = 'dnBurlyDeformer1' vtxCo...
[ "maya.mel.eval", "maya.cmds.skinCluster", "maya.OpenMaya.MObject", "maya.cmds.polyEvaluate", "maya.OpenMaya.MItMeshVertex", "maya.OpenMaya.MIntArray", "maya.OpenMaya.MFloatArray", "maya.cmds.ls", "maya.OpenMaya.MSelectionList", "maya.OpenMaya.MFnSingleIndexedComponent", "maya.OpenMaya.MVector", ...
[((326, 355), 'maya.cmds.polyEvaluate', 'mc.polyEvaluate', (['mesh'], {'v': '(True)'}), '(mesh, v=True)\n', (341, 355), True, 'import maya.cmds as mc\n'), ((362, 386), 'maya.cmds.ls', 'mc.ls', (['influence'], {'l': '(True)'}), '(influence, l=True)\n', (367, 386), True, 'import maya.cmds as mc\n'), ((776, 801), 'maya.Op...
import shlex import sys from subprocess import PIPE, Popen from typing import List class Executer: SUCCESS = 0 ERROR = 1 @staticmethod def run(command: str) -> None: p = Popen(shlex.split(command)) print(f"-> {command}") p.communicate() if p.returncode == Executer.ERRO...
[ "shlex.split", "sys.exit" ]
[((760, 784), 'sys.exit', 'sys.exit', (['Executer.ERROR'], {}), '(Executer.ERROR)\n', (768, 784), False, 'import sys\n'), ((203, 223), 'shlex.split', 'shlex.split', (['command'], {}), '(command)\n', (214, 223), False, 'import shlex\n'), ((335, 359), 'sys.exit', 'sys.exit', (['Executer.ERROR'], {}), '(Executer.ERROR)\n'...
from unittest import TestCase import torch from models.utils import combine_mapping_networks, categorize_mappings from models.networks.fc import FCGenerator class UtilTests(TestCase): def setUp(self) -> None: self.state_dicts = [FCGenerator().state_dict() for _ in range(5)] self.mappings = [tor...
[ "models.networks.fc.FCGenerator", "models.utils.combine_mapping_networks", "torch.eye", "torch.all" ]
[((410, 462), 'models.utils.combine_mapping_networks', 'combine_mapping_networks', (['*self.mappings'], {'is_SO': '(True)'}), '(*self.mappings, is_SO=True)\n', (434, 462), False, 'from models.utils import combine_mapping_networks, categorize_mappings\n'), ((718, 771), 'models.utils.combine_mapping_networks', 'combine_m...
from django.test import SimpleTestCase from cpu.center import Center from game.transforms import Board class CenterAiTest(SimpleTestCase): def test_picks_center(self): data = [' '] * 9 cpu = Center() move = cpu.play(Board(data), 'x', 'o') self.assertEquals(move, 4) def test_...
[ "game.transforms.Board", "cpu.center.Center" ]
[((215, 223), 'cpu.center.Center', 'Center', ([], {}), '()\n', (221, 223), False, 'from cpu.center import Center\n'), ((466, 474), 'cpu.center.Center', 'Center', ([], {}), '()\n', (472, 474), False, 'from cpu.center import Center\n'), ((718, 726), 'cpu.center.Center', 'Center', ([], {}), '()\n', (724, 726), False, 'fro...
import unittest class TestCase(unittest.TestCase): def test_dummy(self): self.assertEqual('tests to be added', 'tests to be added') if __name__ == '__main__': unittest.main()
[ "unittest.main" ]
[((179, 194), 'unittest.main', 'unittest.main', ([], {}), '()\n', (192, 194), False, 'import unittest\n')]
from django.db import models from django.conf import settings from django.utils.translation import gettext_lazy as _ from datetime import datetime # Create your models here. class Faculty(models.Model): """Model definition for Faculty.""" name = models.CharField(max_length=250, unique=True) code = model...
[ "django.db.models.TextField", "datetime.datetime.today", "django.utils.translation.gettext_lazy", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.IntegerField", "datetime.datetime.strptime", "django.db.models.DateTimeField" ]
[((258, 303), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(250)', 'unique': '(True)'}), '(max_length=250, unique=True)\n', (274, 303), False, 'from django.db import models\n'), ((315, 370), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'null': '(True)', 'blank': '(True)', 'uni...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os os.environ['CUDA_VISIBLE_DEVICES'] = '0' import keras import keras.backend as K import re import cv2 import numpy as np np.set_printoptions(threshold='nan') def list_pictures(directory, ext='jpg|jpeg|bmp|png|ppm'): return [os.path.join(root, f) f...
[ "numpy.load", "os.walk", "keras.layers.Input", "keras.callbacks.LearningRateScheduler", "os.path.join", "numpy.set_printoptions", "keras.backend.constant", "cv2.imwrite", "os.path.exists", "keras.Model", "keras.callbacks.ModelCheckpoint", "keras.applications.xception.preprocess_input", "kera...
[((176, 212), 'numpy.set_printoptions', 'np.set_printoptions', ([], {'threshold': '"""nan"""'}), "(threshold='nan')\n", (195, 212), True, 'import numpy as np\n'), ((4558, 4605), 'cv2.imread', 'cv2.imread', (['"""./data/uv-data/uv_weight_mask.png"""'], {}), "('./data/uv-data/uv_weight_mask.png')\n", (4568, 4605), False,...
import json import socket import urllib2 #import requests class GvAnalyzerClient(object): """ GV Analyzer Client """ def __init__(self, gd_data): self.base_url = "https://damp-retreat-1145.herokuapp.com/" self.base_url = "http://127.0.0.1:5000/" self.gd_data = gd_data socket.setdefaulttimeout(15) def ana...
[ "socket.setdefaulttimeout", "urllib2.Request", "urllib2.urlopen", "json.dumps" ]
[((282, 310), 'socket.setdefaulttimeout', 'socket.setdefaulttimeout', (['(15)'], {}), '(15)\n', (306, 310), False, 'import socket\n'), ((433, 490), 'json.dumps', 'json.dumps', (["{'gd_data': self.gd_data, 'gv_data': gv_data}"], {}), "({'gd_data': self.gd_data, 'gv_data': gv_data})\n", (443, 490), False, 'import json\n'...
# coding=utf-8 from OTLMOW.OTLModel.Datatypes.KeuzelijstField import KeuzelijstField from OTLMOW.OTLModel.Datatypes.KeuzelijstWaarde import KeuzelijstWaarde # Generated with OTLEnumerationCreator. To modify: extend, do not edit class KlVerlichtingstoestelVerlichtGebied(KeuzelijstField): """Het gebied op de wegbaa...
[ "OTLMOW.OTLModel.Datatypes.KeuzelijstWaarde.KeuzelijstWaarde" ]
[((850, 1020), 'OTLMOW.OTLModel.Datatypes.KeuzelijstWaarde.KeuzelijstWaarde', 'KeuzelijstWaarde', ([], {'invulwaarde': '"""afrit"""', 'label': '"""afrit"""', 'objectUri': '"""https://wegenenverkeer.data.vlaanderen.be/id/concept/KlVerlichtingstoestelVerlichtGebied/afrit"""'}), "(invulwaarde='afrit', label='afrit', objec...
import re import neovim import enum import json try: import psutil except ImportError: psutil = None def isNumber(x): return x in '1234567890' class Result(enum.Enum): BY_PASS = 1 HANDLED = 2 UNHANDLED = 3 def is_shell(name): for i in ['fish', 'bash', 'csh', 'zsh']: if i in nam...
[ "json.loads", "re.match", "json.dumps", "neovim.autocmd", "neovim.command" ]
[((7722, 7773), 'neovim.command', 'neovim.command', (['"""C"""'], {'range': '""""""', 'nargs': '"""*"""', 'sync': '(True)'}), "('C', range='', nargs='*', sync=True)\n", (7736, 7773), False, 'import neovim\n'), ((9469, 9548), 'neovim.autocmd', 'neovim.autocmd', (['"""TermOpen"""'], {'eval': '"""expand("<afile>")"""', 's...
"""Install instructions for non-packaged java programs. """ import os from fabric.api import * from fabric.contrib.files import * from shared import _if_not_installed @_if_not_installed("cljr") def install_cljr(env): """Install the clojure package manager cljr http://github.com/liebke/cljr """ run("...
[ "shared._if_not_installed", "os.path.join" ]
[((171, 196), 'shared._if_not_installed', '_if_not_installed', (['"""cljr"""'], {}), "('cljr')\n", (188, 196), False, 'from shared import _if_not_installed\n'), ((502, 527), 'shared._if_not_installed', '_if_not_installed', (['"""lein"""'], {}), "('lein')\n", (519, 527), False, 'from shared import _if_not_installed\n'),...
""" LC 438 Given a string and a pattern, find all of the pattern in the given string. Every anagram is a permutation of a string. As we know, when we are not allowed to repeat characters while finding permutations of a string, we get N!N! permutations (or anagrams) of a string having NN characters. For example, here ...
[ "collections.defaultdict" ]
[((929, 945), 'collections.defaultdict', 'defaultdict', (['int'], {}), '(int)\n', (940, 945), False, 'from collections import defaultdict\n')]
import logging, sys, os, ldap, time, yaml from ns1 import NS1, Config from ns1.rest.errors import ResourceException, RateLimitException, AuthException from flask import Flask, json, g, request, make_response, jsonify from flask.logging import create_logger from flask_cors import CORS, cross_origin from flask_jwt import...
[ "yaml.load", "vmware.vapi.bindings.struct.PrettyPrinter", "flask_cors.CORS", "flask.jsonify", "com.vmware.nsx_vmc_app_client_for_vmc.create_nsx_vmc_app_client_for_vmc", "flask_jwt.jwt_required", "flask.request.get_json", "logging.error", "flask_jwt.JWT", "datetime.timedelta", "ns1.NS1", "ldap....
[((1002, 1046), 'yaml.load', 'yaml.load', (['yaml_file'], {'Loader': 'yaml.FullLoader'}), '(yaml_file, Loader=yaml.FullLoader)\n', (1011, 1046), False, 'import logging, sys, os, ldap, time, yaml\n'), ((1138, 1236), 'logging.basicConfig', 'logging.basicConfig', ([], {'filename': "yaml_dict['LogFilepath']", 'level': 'log...
import paddle import paddle.nn as nn import vgg def compute_l1_loss(input, output): return paddle.mean(paddle.abs(input - output)) def loss_Textures(x, y, nc=3, alpha=1.2, margin=0): xi = x.contiguous().view(x.size(0), -1, nc, x.size(2), x.size(3)) yi = y.contiguous().view(y.size(0), -1, nc, y.size(2),...
[ "paddle.sum", "paddle.mean", "paddle.abs", "paddle.pow", "paddle.randn", "vgg.vgg19" ]
[((343, 370), 'paddle.sum', 'paddle.sum', (['(xi * xi)'], {'axis': '(2)'}), '(xi * xi, axis=2)\n', (353, 370), False, 'import paddle\n'), ((381, 408), 'paddle.sum', 'paddle.sum', (['(yi * yi)'], {'axis': '(2)'}), '(yi * yi, axis=2)\n', (391, 408), False, 'import paddle\n'), ((516, 532), 'paddle.mean', 'paddle.mean', ([...
""" 2.2.6: `then` may be called multiple times on the same promise. https://github.com/promises-aplus/promises-tests/blob/2.1.1/lib/tests/2.2.6.js """ import mock from test.components.scheduler.promises.helpers import generate_rejected_test_case other = {'other': 'other'} sentinel = {'sentinel': 'sentinel'} sentinel2 ...
[ "test.components.scheduler.promises.helpers.generate_rejected_test_case", "mock.MagicMock" ]
[((4298, 4424), 'test.components.scheduler.promises.helpers.generate_rejected_test_case', 'generate_rejected_test_case', ([], {'method': 'multiple_boring_tests', 'value': 'sentinel', 'module': '__name__', 'name': '"""MultipleBoringTestCases"""'}), "(method=multiple_boring_tests, value=sentinel,\n module=__name__, na...
from nifcloud import session import sys import base64 # ---- define name ------- # -- key name ---------- SSH_KYE_FILE_NAME = 'key.pub' EAST31_KEY_NAME = "key" # -- security group ---- WEB_SECURITY_GP_NAME = "webfw" DB_SECURITY_GP_NAME = "dbfw" # -- Private LAN name --- WEB_DB_PRV_NET_NAME = "webdbnet" # -- Router ...
[ "nifcloud.session.get_session", "sys._getframe", "sys.exit" ]
[((17601, 17622), 'nifcloud.session.get_session', 'session.get_session', ([], {}), '()\n', (17620, 17622), False, 'from nifcloud import session\n'), ((5572, 5583), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (5580, 5583), False, 'import sys\n'), ((12146, 12157), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (1215...
from matplotlib import pyplot as plt import pandas as pd import random from itertools import count from matplotlib.animation import FuncAnimation plt.style.use('bmh') # index = count() # x = [] # y = [] # def animate(i): # x.append(next(index)) # y.append(random.randint(1, 10)) # plt.cla() # plt.plot...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.show", "matplotlib.pyplot.plot", "pandas.read_csv", "matplotlib.pyplot.legend", "matplotlib.pyplot.style.use", "matplotlib.pyplot.cla", "matplotlib.pyplot.gcf", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.fill_between", "matplotlib.pyplot.xlabel",...
[((146, 166), 'matplotlib.pyplot.style.use', 'plt.style.use', (['"""bmh"""'], {}), "('bmh')\n", (159, 166), True, 'from matplotlib import pyplot as plt\n'), ((1136, 1154), 'matplotlib.pyplot.tight_layout', 'plt.tight_layout', ([], {}), '()\n', (1152, 1154), True, 'from matplotlib import pyplot as plt\n'), ((1155, 1165)...
import pytest from roocs_utils.exceptions import InvalidParameterValue from roocs_utils.parameter.time_components_parameter import string_to_dict from roocs_utils.parameter.time_components_parameter import time_components from roocs_utils.parameter.time_components_parameter import TimeComponentsParameter type_error ...
[ "roocs_utils.parameter.time_components_parameter.TimeComponentsParameter", "pytest.raises", "roocs_utils.parameter.time_components_parameter.string_to_dict", "roocs_utils.parameter.time_components_parameter.time_components" ]
[((943, 1015), 'roocs_utils.parameter.time_components_parameter.TimeComponentsParameter', 'TimeComponentsParameter', (['"""year:1999,2000,2001|month:dec,jan,feb|hour:00"""'], {}), "('year:1999,2000,2001|month:dec,jan,feb|hour:00')\n", (966, 1015), False, 'from roocs_utils.parameter.time_components_parameter import Time...
from django.db import models from django.db.models.base import Model class Puesto(models.Model): nombre = models.CharField(max_length=255) created_at = models.DateTimeField(auto_now_add=True) def __str__(self): return self.nombre
[ "django.db.models.CharField", "django.db.models.DateTimeField" ]
[((112, 144), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(255)'}), '(max_length=255)\n', (128, 144), False, 'from django.db import models\n'), ((162, 201), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now_add': '(True)'}), '(auto_now_add=True)\n', (182, 201), False, ...
import cv2 import numpy as np def label2rgb(label_np): print(label_np) label_color = np.argmax(label_np, axis=0) label_color = label_color / np.max(label_color) * 255 print(label_color) n = label_color.astype(np.uint8) n = np.array(n) print(type(n)) label_color = cv2.applyColorMap(n, '...
[ "cv2.applyColorMap", "numpy.max", "numpy.array", "numpy.argmax" ]
[((95, 122), 'numpy.argmax', 'np.argmax', (['label_np'], {'axis': '(0)'}), '(label_np, axis=0)\n', (104, 122), True, 'import numpy as np\n'), ((249, 260), 'numpy.array', 'np.array', (['n'], {}), '(n)\n', (257, 260), True, 'import numpy as np\n'), ((298, 325), 'cv2.applyColorMap', 'cv2.applyColorMap', (['n', '"""jet"""'...
#!/usr/bin/python # -*- coding: utf-8 -*- from greytheory import GreyTheory grey = GreyTheory() # GM0N gm0n = grey.gm0n gm0n.add_outputs([1., 1., 1., 1., 1., 1.], "x1") gm0n.add_patterns([.75, 1.22, .2, 1., 1., 1.], "x2") gm0n.add_patterns([.5, 1., .7, .66, 1., .5], "x3") gm0n.add_patterns([1., 1.09, .4, .33, .66...
[ "greytheory.GreyTheory" ]
[((86, 98), 'greytheory.GreyTheory', 'GreyTheory', ([], {}), '()\n', (96, 98), False, 'from greytheory import GreyTheory\n')]
"""Serveradmin Copyright (c) 2019 InnoGames GmbH """ from json import dumps from django import template from django.conf import settings from adminapi.filters import filter_classes from serveradmin.serverdb.models import Attribute, Servertype register = template.Library() @register.inclusion_tag('serversearch.ht...
[ "django.template.Library", "serveradmin.serverdb.models.Attribute.objects.all", "serveradmin.serverdb.models.Attribute.specials.values", "json.dumps", "serveradmin.serverdb.models.Servertype.objects.all" ]
[((259, 277), 'django.template.Library', 'template.Library', ([], {}), '()\n', (275, 277), False, 'from django import template\n'), ((375, 399), 'serveradmin.serverdb.models.Servertype.objects.all', 'Servertype.objects.all', ([], {}), '()\n', (397, 399), False, 'from serveradmin.serverdb.models import Attribute, Server...
from invoke import task _TEST_FOLDER = "tests" _SOURCE_FOLDERS = " ".join(["bq_schema", _TEST_FOLDER]) @task def lint(context): context.run(f"pylint {_SOURCE_FOLDERS}") @task def type_check(context): context.run("mypy bq_schema") @task def check_code_format(context): context.run("black --check .") ...
[ "invoke.task" ]
[((662, 715), 'invoke.task', 'task', ([], {'pre': '[lint, type_check, check_code_format, test]'}), '(pre=[lint, type_check, check_code_format, test])\n', (666, 715), False, 'from invoke import task\n')]
store = {} def anagram_key(s): if s not in store: store[s] = sorted(s) return store[s] def group_anagrams(ls): ls = sorted(ls, key=anagram_key) return ls def test(): from random import shuffle l = [ "ascot", "coats", "coast", "sushi", "tacos",...
[ "random.shuffle" ]
[((510, 520), 'random.shuffle', 'shuffle', (['l'], {}), '(l)\n', (517, 520), False, 'from random import shuffle\n')]
from flask import render_template,request,redirect,url_for,abort from flask_login import login_user,login_required,current_user,logout_user from ..models import User from .forms import LoginForm,RegisterForm from . import auth # Views @auth.route('/login', methods=["GET","POST"]) def login(): if current_user.is_au...
[ "flask.url_for", "flask_login.login_user", "flask_login.logout_user", "flask.render_template" ]
[((982, 1048), 'flask.render_template', 'render_template', (['"""login.html"""'], {'title': 'title', 'Form': 'Form', 'Error': 'Error'}), "('login.html', title=title, Form=Form, Error=Error)\n", (997, 1048), False, 'from flask import render_template, request, redirect, url_for, abort\n'), ((1711, 1780), 'flask.render_te...
import sys import os import shutil import shlex from command import Command def check_ffmpeg_installed(): if shutil.which('ffmpeg') is None: print('The program \'ffmpeg\' is not installed in your system.\n' 'You can install it by visiting http://ffmpeg.org/download.html') sys.exit(0)...
[ "os.remove", "os.getcwd", "os.walk", "shutil.which", "shlex.quote", "sys.exit" ]
[((455, 472), 'shlex.quote', 'shlex.quote', (['path'], {}), '(path)\n', (466, 472), False, 'import shlex\n'), ((534, 556), 'shutil.which', 'shutil.which', (['"""ffmpeg"""'], {}), "('ffmpeg')\n", (546, 556), False, 'import shutil\n'), ((1051, 1064), 'os.walk', 'os.walk', (['path'], {}), '(path)\n', (1058, 1064), False, ...
import pandas as pd import numpy as np from tpot import TPOTClassifier from sklearn.model_selection import train_test_split benchmark = pd.read_pickle('us_pct.pickle') # us overall housing price index percentage change HPI = pd.read_pickle('HPI_complete.pickle') # all of the state data, thirty year mortgage, unempl...
[ "pandas.read_pickle", "sklearn.model_selection.train_test_split", "numpy.array", "tpot.TPOTClassifier" ]
[((139, 170), 'pandas.read_pickle', 'pd.read_pickle', (['"""us_pct.pickle"""'], {}), "('us_pct.pickle')\n", (153, 170), True, 'import pandas as pd\n'), ((229, 266), 'pandas.read_pickle', 'pd.read_pickle', (['"""HPI_complete.pickle"""'], {}), "('HPI_complete.pickle')\n", (243, 266), True, 'import pandas as pd\n'), ((108...
#Important Modules from flask import Flask,render_template, url_for ,flash , redirect import pickle from flask import request import numpy as np import os from flask import send_from_directory #from this import SQLAlchemy app=Flask(__name__,template_folder='template') @app.route("/") @app.route("/home") def...
[ "numpy.array", "flask.Flask", "flask.request.form.to_dict", "flask.render_template" ]
[((233, 276), 'flask.Flask', 'Flask', (['__name__'], {'template_folder': '"""template"""'}), "(__name__, template_folder='template')\n", (238, 276), False, 'from flask import Flask, render_template, url_for, flash, redirect\n'), ((340, 368), 'flask.render_template', 'render_template', (['"""home.html"""'], {}), "('home...
import cv2 as cv import numpy as np if __name__ == "__main__": img = cv.imread('../../assets/test1.jpg') height, width = img.shape[:2] # rows, columns # translating the img 200 pixels right (x axis) translation_matrix = np.float32([[1, 0, 200], [0, 1, 0]]) output = cv.warpAffine(img, transl...
[ "cv2.waitKey", "cv2.destroyAllWindows", "numpy.float32", "cv2.imread", "cv2.warpAffine", "cv2.imshow" ]
[((79, 114), 'cv2.imread', 'cv.imread', (['"""../../assets/test1.jpg"""'], {}), "('../../assets/test1.jpg')\n", (88, 114), True, 'import cv2 as cv\n'), ((245, 281), 'numpy.float32', 'np.float32', (['[[1, 0, 200], [0, 1, 0]]'], {}), '([[1, 0, 200], [0, 1, 0]])\n', (255, 281), True, 'import numpy as np\n'), ((295, 350), ...
# -*- coding: utf-8 -*- from django.shortcuts import render from django.views.generic.list import ListView from django.views.generic.detail import DetailView from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.http import HttpResponse from django.http import JsonResponse import json imp...
[ "django.http.HttpResponse", "datetime.date.today", "json.dumps", "django.http.JsonResponse", "django.shortcuts.render" ]
[((738, 773), 'django.shortcuts.render', 'render', (['request', 'self.template_name'], {}), '(request, self.template_name)\n', (744, 773), False, 'from django.shortcuts import render\n'), ((2287, 2332), 'django.shortcuts.render', 'render', (['request', 'self.template_name', 'self.ctx'], {}), '(request, self.template_na...
from flask import Flask from injector import Injector from edu_loan.config.default import Config from edu_loan.config.dependencies import ApplicationRegister, Application from edu_loan.config.main_module import MODULES, create_injector def create_app(injector: Injector) -> Flask: """ Creates a Flask app ...
[ "edu_loan.config.main_module.create_injector", "flask.Flask" ]
[((410, 425), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (415, 425), False, 'from flask import Flask\n'), ((891, 923), 'edu_loan.config.main_module.create_injector', 'create_injector', ([], {'modules': 'modules'}), '(modules=modules)\n', (906, 923), False, 'from edu_loan.config.main_module import MODUL...
from marshmallow import fields, validate from .. import db, ma class User(db.Model): id = db.Column(db.Integer, primary_key=True) email = db.Column(db.String, unique=True, nullable=False) password = db.Column(db.String, nullable=False) creation_date = db.Column(db.TIMESTAMP, ...
[ "marshmallow.fields.Email", "marshmallow.validate.Length", "marshmallow.fields.DateTime", "marshmallow.fields.Integer" ]
[((688, 704), 'marshmallow.fields.Integer', 'fields.Integer', ([], {}), '()\n', (702, 704), False, 'from marshmallow import fields, validate\n'), ((717, 744), 'marshmallow.fields.Email', 'fields.Email', ([], {'required': '(True)'}), '(required=True)\n', (729, 744), False, 'from marshmallow import fields, validate\n'), ...
from storageManager.CrudTupla import CrudTuplas class Tabla: def __init__(self, nombre, columnas): self.nombre = nombre self.columnas = columnas self.estructura = CrudTuplas(columnas) def getNombreASCII(self): number = 0 for c in self.nombre: number += ord(...
[ "storageManager.CrudTupla.CrudTuplas" ]
[((192, 212), 'storageManager.CrudTupla.CrudTuplas', 'CrudTuplas', (['columnas'], {}), '(columnas)\n', (202, 212), False, 'from storageManager.CrudTupla import CrudTuplas\n')]
import numpy as np import vrep import ctypes import math import sys import time sim_dt = 0.01 dt = 0.001 SYNC = True vrep_mode = vrep.simx_opmode_oneshot def b( num ): """ forces magnitude to be 1 or less """ if abs( num ) > 1.0: return math.copysign( 1.0, num ) else: return num def convert_angles( a...
[ "vrep.simxGetObjectVelocity", "vrep.simxSynchronousTrigger", "math.copysign", "vrep.simxStart", "vrep.simxSynchronous", "vrep.simxGetObjectHandle", "vrep.simxSetStringSignal", "math.cos", "vrep.simxGetObjectPosition", "vrep.simxStopSimulation", "math.sqrt", "vrep.simxFinish", "math.sin", "...
[((396, 412), 'math.sin', 'math.sin', (['ang[0]'], {}), '(ang[0])\n', (404, 412), False, 'import math\n'), ((420, 436), 'math.sin', 'math.sin', (['ang[1]'], {}), '(ang[1])\n', (428, 436), False, 'import math\n'), ((444, 460), 'math.sin', 'math.sin', (['ang[2]'], {}), '(ang[2])\n', (452, 460), False, 'import math\n'), (...
import discord from discord.ext import commands import random import sys import traceback class ErrorHandler(commands.Cog): def __init__(self, client): self.client = client @commands.Cog.listener() async def on_command_error(self, ctx, error): # This prevents any commands with ...
[ "discord.ext.commands.Cog.listener" ]
[((202, 225), 'discord.ext.commands.Cog.listener', 'commands.Cog.listener', ([], {}), '()\n', (223, 225), False, 'from discord.ext import commands\n')]
from openarticlegauge import plugin import re class OUPPlugin(plugin.Plugin): _short_name = __name__.split('.')[-1] __version__='0.1' # consider incrementing or at least adding a minor version # e.g. "0.1.1" if you change this plugin __desc__ = "Handles articles from the Oxford Universi...
[ "re.match" ]
[((8778, 8818), 're.match', 're.match', (['self.supported_url_format', 'url'], {}), '(self.supported_url_format, url)\n', (8786, 8818), False, 'import re\n')]
#!/usr/bin/env python3 import rospy import threading from enum import Enum from smads_core.client import JackalClient from smads_core.client import SpotClient from smads_core.client import RobotClient from smads_core.interface import RobotSensorInterface from smads_core.interface import RobotNavigationInterface cl...
[ "threading.Thread", "smads_core.interface.RobotNavigationInterface", "smads_core.interface.RobotSensorInterface", "threading.Lock", "rospy.get_param", "rospy.init_node", "rospy.spin", "smads_core.client.SpotClient", "smads_core.client.JackalClient" ]
[((404, 416), 'smads_core.client.SpotClient', 'SpotClient', ([], {}), '()\n', (414, 416), False, 'from smads_core.client import SpotClient\n'), ((435, 449), 'smads_core.client.JackalClient', 'JackalClient', ([], {}), '()\n', (447, 449), False, 'from smads_core.client import JackalClient\n'), ((653, 669), 'threading.Loc...
import discord, asyncio, typing, random, os, html from discord import ui from discord.ext import commands from collections import defaultdict from datetime import datetime, timezone, timedelta from .. import converters, embeds, services, utils, views class MiscStuff(utils.MeldedCog, name = "Miscellaneous", category = ...
[ "html.unescape", "discord.ext.commands.command", "discord.ui.View", "asyncio.sleep", "datetime.datetime.now", "collections.defaultdict", "random.randrange", "datetime.timedelta", "discord.ext.commands.group", "discord.ext.commands.is_owner" ]
[((534, 645), 'discord.ext.commands.command', 'commands.command', ([], {'help': '"""Retrieves a random piece of advice.\nUses adviceslip.com"""', 'aliases': "('ad',)"}), '(help=\n """Retrieves a random piece of advice.\nUses adviceslip.com""", aliases=\n (\'ad\',))\n', (550, 645), False, 'from discord.ext import ...
from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.chrome.options import Options options = Options() options.headless = True # options.add_argument('--proxy-server http://127.0.0.1:8001') options.binary_location = '/Applications/Google Chrome.app/Contents/MacOS/Googl...
[ "selenium.webdriver.chrome.options.Options", "selenium.webdriver.Chrome" ]
[((144, 153), 'selenium.webdriver.chrome.options.Options', 'Options', ([], {}), '()\n', (151, 153), False, 'from selenium.webdriver.chrome.options import Options\n'), ((340, 425), 'selenium.webdriver.Chrome', 'webdriver.Chrome', ([], {'executable_path': '"""/usr/local/bin/chromedriver"""', 'options': 'options'}), "(exe...
"""A Martel format to parse the output from transfac. Formats: format Format for a whole file. """ import warnings warnings.warn("Bio.expressions was deprecated, as it does not work with recent versions of mxTextTools. If you want to continue to use this module, please get in contact with the Biopython d...
[ "warnings.warn" ]
[((130, 429), 'warnings.warn', 'warnings.warn', (['"""Bio.expressions was deprecated, as it does not work with recent versions of mxTextTools. If you want to continue to use this module, please get in contact with the Biopython developers at <EMAIL> to avoid permanent removal of this module from Biopython"""', 'Depreca...
from django.contrib import admin from jab.models import Post, SidebarItem class PostAdmin(admin.ModelAdmin): list_display = ('publication_date', 'title', 'status',) ordering = ('-publication_date',) admin.site.register(Post, PostAdmin) class SidebarItemAdmin(admin.ModelAdmin): pass admin.site.registe...
[ "django.contrib.admin.site.register" ]
[((211, 247), 'django.contrib.admin.site.register', 'admin.site.register', (['Post', 'PostAdmin'], {}), '(Post, PostAdmin)\n', (230, 247), False, 'from django.contrib import admin\n'), ((302, 352), 'django.contrib.admin.site.register', 'admin.site.register', (['SidebarItem', 'SidebarItemAdmin'], {}), '(SidebarItem, Sid...
# !/usr/bin/env python3 # -*- coding:utf-8 -*- # @Time : 2022/05/00 16:47 # @Author : clear # @FileName: test_get_laplacian.py import tensorlayerx as tlx from gammagl.utils.get_laplacian import get_laplacian def test_get_laplacian(): edge_index = tlx.convert_to_tensor([[0, 1, 1, 2], [1, 0, 2, 1]], dtype=tlx....
[ "tensorlayerx.convert_to_numpy", "gammagl.utils.get_laplacian.get_laplacian", "tensorlayerx.convert_to_tensor" ]
[((258, 326), 'tensorlayerx.convert_to_tensor', 'tlx.convert_to_tensor', (['[[0, 1, 1, 2], [1, 0, 2, 1]]'], {'dtype': 'tlx.int64'}), '([[0, 1, 1, 2], [1, 0, 2, 1]], dtype=tlx.int64)\n', (279, 326), True, 'import tensorlayerx as tlx\n'), ((345, 399), 'tensorlayerx.convert_to_tensor', 'tlx.convert_to_tensor', (['[1, 2, 2...
from typing import Any import pytest from pytestqt.qtbot import QtBot from qtpy.QtCore import Signal, QObject import numpy as np from pydm.application import PyDMApplication from pydm.data_plugins.calc_plugin import epics_string, epics_unsigned from pydm.widgets.channel import PyDMChannel @pytest.mark.parametrize( ...
[ "pydm.data_plugins.calc_plugin.epics_string", "pydm.widgets.channel.PyDMChannel", "pydm.data_plugins.calc_plugin.epics_unsigned", "numpy.array", "pytest.mark.parametrize" ]
[((698, 797), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""input_int,bits,expected"""', '[(100, 32, 100), (-1, 8, 255), (-2, 4, 14)]'], {}), "('input_int,bits,expected', [(100, 32, 100), (-1, 8,\n 255), (-2, 4, 14)])\n", (721, 797), False, 'import pytest\n'), ((1717, 1816), 'pydm.widgets.channel.PyDMC...
import io import pytest import stray_recipe_manager.units import stray_recipe_manager.storage from stray_recipe_manager.recipe import ( CommentedRecipe, Recipe, Ingredient, RecipeStep, ) ureg = stray_recipe_manager.units.default_unit_registry @pytest.fixture(scope="module") def toml_coding(): re...
[ "stray_recipe_manager.recipe.Ingredient", "io.StringIO", "pytest.fixture", "stray_recipe_manager.recipe.RecipeStep" ]
[((264, 294), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (278, 294), False, 'import pytest\n'), ((2335, 2348), 'io.StringIO', 'io.StringIO', ([], {}), '()\n', (2346, 2348), False, 'import io\n'), ((577, 634), 'stray_recipe_manager.recipe.Ingredient', 'Ingredient', ([], {'...
import copy import queue import time import logging import binascii from enum import Enum from scrutiny.server.protocol.comm_handler import CommHandler from scrutiny.server.protocol import Protocol, ResponseCode from scrutiny.server.device.device_searcher import DeviceSearcher from scrutiny.server.device.request_dispa...
[ "scrutiny.server.protocol.comm_handler.CommHandler", "binascii.hexlify", "scrutiny.server.device.request_dispatcher.RequestDispatcher", "copy.copy", "scrutiny.server.device.device_searcher.DeviceSearcher", "time.time", "scrutiny.server.device.heartbeat_generator.HeartbeatGenerator", "scrutiny.server.p...
[((574, 611), 'binascii.hexlify', 'binascii.hexlify', (['DEFAULT_FIRMWARE_ID'], {}), '(DEFAULT_FIRMWARE_ID)\n', (590, 611), False, 'import binascii\n'), ((1045, 1087), 'logging.getLogger', 'logging.getLogger', (['self.__class__.__name__'], {}), '(self.__class__.__name__)\n', (1062, 1087), False, 'import logging\n'), ((...
import cv2 import numpy as np import matplotlib.pyplot as plt def main(): path = "C:\\Users\\enesa\\Documents\\MATLAB\\blobs_objects.jpg" img = cv2.imread(path, 1) img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) filter1 = np.array(([0, -1, 0], [-1, 5, -1], [0, -1, 0]), np.float32) #Sharpening Filter o...
[ "cv2.GaussianBlur", "cv2.boundingRect", "matplotlib.pyplot.show", "cv2.filter2D", "cv2.dilate", "cv2.cvtColor", "cv2.getStructuringElement", "cv2.threshold", "cv2.morphologyEx", "cv2.waitKey", "numpy.ones", "cv2.destroyAllWindows", "cv2.imread", "numpy.array", "cv2.rectangle", "cv2.ero...
[((158, 177), 'cv2.imread', 'cv2.imread', (['path', '(1)'], {}), '(path, 1)\n', (168, 177), False, 'import cv2\n'), ((186, 222), 'cv2.cvtColor', 'cv2.cvtColor', (['img', 'cv2.COLOR_BGR2RGB'], {}), '(img, cv2.COLOR_BGR2RGB)\n', (198, 222), False, 'import cv2\n'), ((238, 297), 'numpy.array', 'np.array', (['([0, -1, 0], [...
from time import sleep from appium import webdriver from appium.webdriver.common.mobileby import MobileBy phone_info = { "platformName": "android", "platformVersion": "8.1", "deviceName": "S4F6R19C18016391", "appPackage": "com.tencent.wework", "appActivity": ".launch.LaunchSplashActivity t9", "...
[ "time.sleep", "appium.webdriver.Remote" ]
[((537, 597), 'appium.webdriver.Remote', 'webdriver.Remote', (['"""http://localhost:4723/wd/hub"""', 'phone_info'], {}), "('http://localhost:4723/wd/hub', phone_info)\n", (553, 597), False, 'from appium import webdriver\n'), ((671, 679), 'time.sleep', 'sleep', (['(5)'], {}), '(5)\n', (676, 679), False, 'from time impor...
import logging import socket import threading import datetime import time import math from . import BPLMonitor, BPLCurtain, DATA_DOMAIN from homeassistant.helpers.entity import Entity _LOGGER = logging.getLogger(__name__) def setup_platform(hass, config, add_entities, discovery_info=None): """Set up the sens...
[ "logging.getLogger" ]
[((199, 226), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (216, 226), False, 'import logging\n')]
# Python3 from solution1 import lineEncoding as f qa = [ ('aabbbc', '2a3bc'), ('abbcabb', 'a2bca2b'), ('abcd', 'abcd'), ('zzzz', '4z'), ('wwwwwwwawwwwwww', '7wa7w'), ('ccccccccccccccc', '15c'), ('qwertyuioplkjhg', 'qwertyuioplkjhg'), ('ssiiggkooo', '2s2i2gk3o'), ('adfaaa', 'adf3a')...
[ "solution1.lineEncoding" ]
[((465, 470), 'solution1.lineEncoding', 'f', (['*q'], {}), '(*q)\n', (466, 470), True, 'from solution1 import lineEncoding as f\n')]
from arrays.remove_element import remove_element def test_remove_element(): arr = [3, 2, 2, 3] length = remove_element(arr, 3) assert length == 2 assert arr == [2, 2, 2, 3] arr = [1] length = remove_element(arr, 1) assert length == 0 assert arr == [1] arr = [2, 2, 3, 3] lengt...
[ "arrays.remove_element.remove_element" ]
[((114, 136), 'arrays.remove_element.remove_element', 'remove_element', (['arr', '(3)'], {}), '(arr, 3)\n', (128, 136), False, 'from arrays.remove_element import remove_element\n'), ((219, 241), 'arrays.remove_element.remove_element', 'remove_element', (['arr', '(1)'], {}), '(arr, 1)\n', (233, 241), False, 'from arrays...
"""Common methods for SleepIQ.""" from __future__ import annotations from collections.abc import Generator from unittest.mock import MagicMock, create_autospec, patch from asyncsleepiq import ( SleepIQActuator, SleepIQBed, SleepIQFoundation, SleepIQLight, SleepIQPreset, SleepIQSleeper, ) impor...
[ "unittest.mock.patch", "unittest.mock.create_autospec", "homeassistant.setup.async_setup_component" ]
[((1161, 1188), 'unittest.mock.create_autospec', 'create_autospec', (['SleepIQBed'], {}), '(SleepIQBed)\n', (1176, 1188), False, 'from unittest.mock import MagicMock, create_autospec, patch\n'), ((1333, 1364), 'unittest.mock.create_autospec', 'create_autospec', (['SleepIQSleeper'], {}), '(SleepIQSleeper)\n', (1348, 136...
import streamlit as st from dataclasses import dataclass from typing import Any, List import datetime as datetime import pandas as pd import hashlib @dataclass class Title: sender: str receiver: str title: str @dataclass class Ownership: record: Title creator_id: int prev_hash: str = "0" ...
[ "streamlit.balloons", "pandas.DataFrame", "streamlit.markdown", "streamlit.text_input", "streamlit.cache", "streamlit.sidbar.slider", "streamlit.write", "hashlib.sha256", "streamlit.text", "streamlit.button", "streamlit.sidebar.selectbox", "datetime.datetime.utcnow", "streamlit.sidbar.write"...
[((1809, 1845), 'streamlit.cache', 'st.cache', ([], {'allow_output_mutation': '(True)'}), '(allow_output_mutation=True)\n', (1817, 1845), True, 'import streamlit as st\n'), ((1959, 2000), 'streamlit.markdown', 'st.markdown', (['"""# Transfer Ownership Title"""'], {}), "('# Transfer Ownership Title')\n", (1970, 2000), T...
from homeassistant.util import dt def orbit_time_to_local_time(timestamp: str): if timestamp is not None: return dt.as_local(dt.parse_datetime(timestamp)) return None def anonymize(device): device["address"] = "REDACTED" device["full_location"] = "REDACTED" device["location"] = "REDACTED...
[ "homeassistant.util.dt.parse_datetime" ]
[((139, 167), 'homeassistant.util.dt.parse_datetime', 'dt.parse_datetime', (['timestamp'], {}), '(timestamp)\n', (156, 167), False, 'from homeassistant.util import dt\n')]
""" Example code to push a dataset into the data node. A complete dataset includes "Dataset", "Fhir Store", "Annotation Store", "Annotation", "Patient", "Note" To run this code, here are the requirements: - Install the nlpsandbox-client (`pip install nlpsandbox-client`) - Start the Data Node locally - Follow instruct...
[ "nlpsandbox.apis.PatientApi", "json.load", "nlpsandbox.ApiClient", "nlpsandbox.apis.DatasetApi", "nlpsandbox.apis.FhirStoreApi", "nlpsandbox.apis.NoteApi", "nlpsandbox.Configuration", "nlpsandbox.apis.AnnotationApi", "nlpsandbox.apis.AnnotationStoreApi" ]
[((758, 793), 'nlpsandbox.Configuration', 'nlpsandbox.Configuration', ([], {'host': 'host'}), '(host=host)\n', (782, 793), False, 'import nlpsandbox\n'), ((943, 978), 'nlpsandbox.ApiClient', 'nlpsandbox.ApiClient', (['configuration'], {}), '(configuration)\n', (963, 978), False, 'import nlpsandbox\n'), ((1012, 1050), '...
from org.mowl.CatParser import CatParser import sys from mowl.graph.graph import GraphGenModel class CatOnt(GraphGenModel): def __init__(self, dataset, subclass = True, relations = False): super().__init__(dataset) self.parser = CatParser(dataset.ontology) def parseOWL(self): edge...
[ "org.mowl.CatParser.CatParser" ]
[((254, 281), 'org.mowl.CatParser.CatParser', 'CatParser', (['dataset.ontology'], {}), '(dataset.ontology)\n', (263, 281), False, 'from org.mowl.CatParser import CatParser\n')]
# Copyright 2020 <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...
[ "imitation.util.util.make_unique_timestamp", "ray.init", "evaluating_rewards.scripts.script_utils.sanitize_path", "evaluating_rewards.scripts.rl_common.parallel_training", "math.sqrt", "numpy.argmax", "evaluating_rewards.scripts.rl_common.make_config", "evaluating_rewards.scripts.script_utils.experime...
[((1039, 1073), 'sacred.Experiment', 'sacred.Experiment', (['"""train_experts"""'], {}), "('train_experts')\n", (1056, 1073), False, 'import sacred\n'), ((1074, 1107), 'evaluating_rewards.scripts.rl_common.make_config', 'rl_common.make_config', (['experts_ex'], {}), '(experts_ex)\n', (1095, 1107), False, 'from evaluati...
# -*- coding: utf-8 -*- # this file is released under public domain and you can use without limitations ######################################################################### ## This is a sample controller ## - index is the default action of any application ## - user is required for authentication and authorization...
[ "gluon.contrib.hypermedia.Collection" ]
[((6328, 6342), 'gluon.contrib.hypermedia.Collection', 'Collection', (['db'], {}), '(db)\n', (6338, 6342), False, 'from gluon.contrib.hypermedia import Collection\n')]
import logging as lg lg.basicConfig( level=lg.DEBUG, format="%(asctime)s [%(levelname)s] %(name)s: %(message)s", datefmt="%H:%M:%S") _logger = lg.getLogger(__name__) class Node: def __init__(self, children, metadata): self.children = children self.metadata = metadata def sum_meta...
[ "logging.getLogger", "logging.basicConfig" ]
[((22, 137), 'logging.basicConfig', 'lg.basicConfig', ([], {'level': 'lg.DEBUG', 'format': '"""%(asctime)s [%(levelname)s] %(name)s: %(message)s"""', 'datefmt': '"""%H:%M:%S"""'}), "(level=lg.DEBUG, format=\n '%(asctime)s [%(levelname)s] %(name)s: %(message)s', datefmt='%H:%M:%S')\n", (36, 137), True, 'import loggin...
# # @file TestL3Model.py # @brief L3 Model unit tests # # @author <NAME> (Python conversion) # @author <NAME> # # ====== WARNING ===== WARNING ===== WARNING ===== WARNING ===== WARNING ====== # # DO NOT EDIT THIS FILE. # # This file was generated automatically by converting the file located at # src/sbml/test/...
[ "libsbml.Model", "unittest.TextTestRunner", "unittest.TestSuite", "libsbml.XMLNamespaces", "unittest.makeSuite", "libsbml.SBMLNamespaces", "sys.exit" ]
[((8727, 8747), 'unittest.TestSuite', 'unittest.TestSuite', ([], {}), '()\n', (8745, 8747), False, 'import unittest\n'), ((1488, 1507), 'libsbml.Model', 'libsbml.Model', (['(3)', '(1)'], {}), '(3, 1)\n', (1501, 1507), False, 'import libsbml\n'), ((4032, 4055), 'libsbml.XMLNamespaces', 'libsbml.XMLNamespaces', ([], {}),...
from datetime import datetime dados=dict() dados['Nome']= str(input('Nome: ')) nasc= int(input('Ano de nascimento: ')) dados['Idade']= datetime.now().year - nasc dados['ctps'] = int(input('Digite o ctps(0 se nao tem): ')) if dados['ctps']!=0: dados['contratação']=int(input('Ano de contratação: ')) dados['salari...
[ "datetime.datetime.now" ]
[((135, 149), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (147, 149), False, 'from datetime import datetime\n'), ((423, 437), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (435, 437), False, 'from datetime import datetime\n')]
from utils import generate_random_sequence def search(seq, l, r, x): num_comparisons = 0 if r >= l: mid = l + (r - l) // 2 num_comparisons += 1 if seq[mid] == x: return mid, num_comparisons elif seq[mid] > x: res, num = search(seq, l, mid - 1, x) ...
[ "utils.generate_random_sequence" ]
[((623, 651), 'utils.generate_random_sequence', 'generate_random_sequence', (['(20)'], {}), '(20)\n', (647, 651), False, 'from utils import generate_random_sequence\n')]
import subprocess def debug(pid): cmd = ['adb', "forward", "tcp:1234", "jdwp:{}".format(pid)] stream = subprocess.Popen(cmd) stream.wait() jdb = ["jdb", "-attach", "localhost:1234"] stream = subprocess.Popen(jdb) stream.wait()
[ "subprocess.Popen" ]
[((114, 135), 'subprocess.Popen', 'subprocess.Popen', (['cmd'], {}), '(cmd)\n', (130, 135), False, 'import subprocess\n'), ((215, 236), 'subprocess.Popen', 'subprocess.Popen', (['jdb'], {}), '(jdb)\n', (231, 236), False, 'import subprocess\n')]
from Files.utils import ipv4_regex, ipv6_regex import re if __name__ == "__main__": """ This script parse the Internet2 interfaces files and generates router files """ router_id_regex = re.compile('<th id=".*?">(.*)</th>') gt_interface_addresses = ( "resources/internet2/ground-truth/Int...
[ "re.search", "re.compile" ]
[((206, 242), 're.compile', 're.compile', (['"""<th id=".*?">(.*)</th>"""'], {}), '(\'<th id=".*?">(.*)</th>\')\n', (216, 242), False, 'import re\n'), ((550, 582), 're.search', 're.search', (['router_id_regex', 'line'], {}), '(router_id_regex, line)\n', (559, 582), False, 'import re\n'), ((656, 683), 're.search', 're.s...
import digitalocean import os from fabric.decorators import wraps, _wrap_as_new from retry.api import retry_call class TokenError(Exception): pass def _list_annotating_decorator(attribute, *values): """ From fabric.decorators._list_annotating_decorator https://github.com/fabric/fabric/blob/master/fa...
[ "fabric.decorators._wrap_as_new", "digitalocean.Manager", "os.getenv", "fabric.decorators.wraps" ]
[((2245, 2269), 'fabric.decorators.wraps', 'wraps', (['droplet_generator'], {}), '(droplet_generator)\n', (2250, 2269), False, 'from fabric.decorators import wraps, _wrap_as_new\n'), ((1316, 1354), 'os.getenv', 'os.getenv', (['"""FABRIC_DIGITALOCEAN_TOKEN"""'], {}), "('FABRIC_DIGITALOCEAN_TOKEN')\n", (1325, 1354), Fals...
import numpy as np from sklearn.preprocessing import FunctionTransformer from ..wrappers import wrap def linearize(X): X = np.asarray(X) return np.reshape(X, (X.shape[0], -1)) class Linearize(FunctionTransformer): """Extracts features by simply concatenating all elements of the data into one long ...
[ "numpy.asarray", "numpy.reshape" ]
[((131, 144), 'numpy.asarray', 'np.asarray', (['X'], {}), '(X)\n', (141, 144), True, 'import numpy as np\n'), ((156, 187), 'numpy.reshape', 'np.reshape', (['X', '(X.shape[0], -1)'], {}), '(X, (X.shape[0], -1))\n', (166, 187), True, 'import numpy as np\n')]
from pathlib import Path from contextlib import contextmanager from typing import Any, Iterator, List, Optional import duckdb from ..models.task import Task @contextmanager def database_connection() -> Iterator[duckdb.DuckDBPyConnection]: connection: duckdb.DuckDBPyConnection = duckdb.connect(f"{Path(__file__)....
[ "pathlib.Path" ]
[((305, 319), 'pathlib.Path', 'Path', (['__file__'], {}), '(__file__)\n', (309, 319), False, 'from pathlib import Path\n')]
from setuptools import setup requires = ["flake8 > 3.0.0", "attr"] flake8_entry_point = "flake8.extension" long_description = """ A flake8 style checker for pandas method chaining, forked from https://github.com/deppen8/pandas-vet] """ setup( name="pandas-method-chaining", version="0.1.0", author="<NAME...
[ "setuptools.setup" ]
[((240, 487), 'setuptools.setup', 'setup', ([], {'name': '"""pandas-method-chaining"""', 'version': '"""0.1.0"""', 'author': '"""<NAME>"""', 'license': '"""MIT"""', 'description': '"""A pandas method chaining checker"""', 'install_requires': 'requires', 'entry_points': "{flake8_entry_point: ['PMC=pandas_method_chaining...
""" test_shopitem.py Copyright 2015 by stefanlehmann """ import pytest from shopy.shop import Shop from shopy.shopitem import ShopItem def test_shopitem_repr(): shop = Shop.from_file('amazon.json') item = ShopItem() item.name = "testitem" item.articlenr = "123" item.price = 12.5 it...
[ "shopy.shop.Shop.from_file", "shopy.shopitem.ShopItem" ]
[((186, 215), 'shopy.shop.Shop.from_file', 'Shop.from_file', (['"""amazon.json"""'], {}), "('amazon.json')\n", (200, 215), False, 'from shopy.shop import Shop\n'), ((227, 237), 'shopy.shopitem.ShopItem', 'ShopItem', ([], {}), '()\n', (235, 237), False, 'from shopy.shopitem import ShopItem\n')]
import os from datetime import datetime, timedelta, timezone from unittest.mock import ( AsyncMock, MagicMock, Mock, patch, ) import pytest from opencoverage.clients import scm from tests import utils pytestmark = pytest.mark.asyncio @pytest.fixture(autouse=True) def _clear(): scm.github._token...
[ "opencoverage.clients.scm.get_client", "unittest.mock.patch.object", "opencoverage.clients.scm.Github", "unittest.mock.MagicMock", "opencoverage.clients.scm.github.GithubComment", "opencoverage.clients.scm.github._token_cache.clear", "unittest.mock.Mock", "pytest.fixture", "unittest.mock.AsyncMock",...
[((256, 284), 'pytest.fixture', 'pytest.fixture', ([], {'autouse': '(True)'}), '(autouse=True)\n', (270, 284), False, 'import pytest\n'), ((303, 334), 'opencoverage.clients.scm.github._token_cache.clear', 'scm.github._token_cache.clear', ([], {}), '()\n', (332, 334), False, 'from opencoverage.clients import scm\n'), ((...
import matplotlib matplotlib.use('Agg') #matplotlib.use("gtk") #matplotlib.use('Qt5Agg') from rectify_vars_and_wald_functions import * import pickle import os import pandas as pd import matplotlib.pyplot as plt import sys sys.path.insert(1, '../../le_experiments/') # print(data) import numpy as np import os from sci...
[ "numpy.load", "numpy.abs", "matplotlib.pyplot.clf", "ipdb.set_trace", "matplotlib.pyplot.close", "scipy.stats.spearmanr", "sys.path.insert", "scipy.stats.pearsonr", "pathlib.Path", "matplotlib.use", "numpy.arange", "matplotlib.pyplot.rc", "pickle.load", "numpy.round", "matplotlib.pyplot....
[((18, 39), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (32, 39), False, 'import matplotlib\n'), ((225, 268), 'sys.path.insert', 'sys.path.insert', (['(1)', '"""../../le_experiments/"""'], {}), "(1, '../../le_experiments/')\n", (240, 268), False, 'import sys\n'), ((1001, 1032), 'matplotlib.pyp...
import os import click import csv import random import sys from osp.common import config from osp.common.utils import query_bar from osp.corpus.corpus import Corpus from osp.corpus.models import Document from osp.corpus.models import Document_Format from osp.corpus.models import Document_Text from osp.corpus.jobs im...
[ "osp.corpus.models.Document.select", "peewee.create_model_tables", "click.echo", "osp.corpus.models.Document_Format.format_counts", "prettytable.PrettyTable", "osp.corpus.models.Document.insert_documents", "osp.corpus.corpus.Corpus.from_env", "click.group", "osp.common.config.rq.enqueue" ]
[((451, 464), 'click.group', 'click.group', ([], {}), '()\n', (462, 464), False, 'import click\n'), ((571, 658), 'peewee.create_model_tables', 'create_model_tables', (['[Document, Document_Format, Document_Text]'], {'fail_silently': '(True)'}), '([Document, Document_Format, Document_Text],\n fail_silently=True)\n', ...
import os import copy import yaml from datetime import datetime, timedelta from .utils.run import dbt_seed, dbt_run, dbt_test, dbt_command RUN_TIME = datetime(2021, 5, 2, 0, 0, 0) DBT_VARS = { 're_data:time_window_start': (RUN_TIME - timedelta(days=1)).strftime("%Y-%m-%d %H:%M:%S"), 're_data:time_window_end':...
[ "copy.deepcopy", "yaml.dump", "os.system", "datetime.datetime", "datetime.timedelta" ]
[((151, 180), 'datetime.datetime', 'datetime', (['(2021)', '(5)', '(2)', '(0)', '(0)', '(0)'], {}), '(2021, 5, 2, 0, 0, 0)\n', (159, 180), False, 'from datetime import datetime, timedelta\n'), ((470, 493), 'copy.deepcopy', 'copy.deepcopy', (['DBT_VARS'], {}), '(DBT_VARS)\n', (483, 493), False, 'import copy\n'), ((428, ...
''' Created by auto_sdk on 2020.01.09 ''' from dingtalk.api.base import RestApi class OapiEduFaceSearchRequest(RestApi): def __init__(self,url=None): RestApi.__init__(self,url) self.class_id = None self.height = None self.synchronous = None self.url = None self.userid = None self.width = None def getHt...
[ "dingtalk.api.base.RestApi.__init__" ]
[((153, 180), 'dingtalk.api.base.RestApi.__init__', 'RestApi.__init__', (['self', 'url'], {}), '(self, url)\n', (169, 180), False, 'from dingtalk.api.base import RestApi\n')]
# Bep Marketplace ELE # Copyright (c) 2016-2021 Kolibri Solutions # License: See LICENSE file or https://github.com/KolibriSolutions/BepMarketplace/blob/master/LICENSE # from django.conf.urls import url from . import views app_name = 'osirisdata' urlpatterns = [ url('^list/$', views.listOsiris, name='list'), ...
[ "django.conf.urls.url" ]
[((273, 318), 'django.conf.urls.url', 'url', (['"""^list/$"""', 'views.listOsiris'], {'name': '"""list"""'}), "('^list/$', views.listOsiris, name='list')\n", (276, 318), False, 'from django.conf.urls import url\n'), ((324, 375), 'django.conf.urls.url', 'url', (['"""^tometa/$"""', 'views.osirisToMeta'], {'name': '"""tom...
# Generated by Django 2.1.4 on 2019-01-29 15:33 from django.db import migrations, models import uuid class Migration(migrations.Migration): dependencies = [ ('todoapi', '0003_todolist_taskid'), ] operations = [ migrations.RemoveField( model_name='todolist', name=...
[ "django.db.migrations.RemoveField", "django.db.models.UUIDField" ]
[((244, 300), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""todolist"""', 'name': '"""id"""'}), "(model_name='todolist', name='id')\n", (266, 300), False, 'from django.db import migrations, models\n'), ((448, 539), 'django.db.models.UUIDField', 'models.UUIDField', ([], {'default'...
# # Copyright 2019 Google 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
[ "matplotlib.pyplot.figure" ]
[((5424, 5436), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (5434, 5436), True, 'import matplotlib.pyplot as plt\n')]
#分别传入网络连接和本地路径 def request_download(imgUrl, Path): import requests r = requests.get(imgUrl) with open(Path, 'wb') as f: f.write(r.content) if __name__ == "__main__": request_download('https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=2018604370,3101817315&fm=26&gp=0.jpg', 'images/1.j...
[ "requests.get" ]
[((80, 100), 'requests.get', 'requests.get', (['imgUrl'], {}), '(imgUrl)\n', (92, 100), False, 'import requests\n')]
"""LogRegression trains a logistic regression model implemented by Scikit-Learn on the given dataset. Before training, the user is prompted for parameter input. After training, model metrics are displayed, and the user can make new predictions. View the documentation at https://manufacturingnet.readthedocs.io/. """ i...
[ "matplotlib.pyplot.title", "sklearn.model_selection.GridSearchCV", "sklearn.metrics.confusion_matrix", "matplotlib.pyplot.show", "matplotlib.pyplot.plot", "sklearn.metrics.roc_curve", "numpy.ravel", "sklearn.model_selection.train_test_split", "sklearn.metrics.accuracy_score", "sklearn.model_select...
[((27414, 27747), 'sklearn.linear_model.LogisticRegression', 'LogisticRegression', ([], {'penalty': 'penalty', 'dual': 'dual', 'tol': 'tol', 'C': 'C', 'fit_intercept': 'fit_intercept', 'intercept_scaling': 'intercept_scaling', 'class_weight': 'class_weight', 'random_state': 'random_state', 'solver': 'solver', 'max_iter...
from __future__ import division from builtins import str import numpy import os import sys import logging from ektelo.algorithm.dawa.cutils import cutil from ektelo.algorithm.dawa.partition_engines import partition_engine from ektelo import util class l1partition_engine(partition_engine.partition_engine): """Use ...
[ "numpy.dtype", "numpy.zeros", "numpy.random.RandomState", "ektelo.util.old_div", "builtins.str" ]
[((1623, 1653), 'numpy.random.RandomState', 'numpy.random.RandomState', (['seed'], {}), '(seed)\n', (1647, 1653), False, 'import numpy\n'), ((2051, 2065), 'numpy.zeros', 'numpy.zeros', (['n'], {}), '(n)\n', (2062, 2065), False, 'import numpy\n'), ((3345, 3375), 'numpy.random.RandomState', 'numpy.random.RandomState', ([...
import pysolr class InvalidPagingConfigError(RuntimeError): def __init__(self, message): super(RuntimeError, self).__init__(message) class _SolrCursorIter: """ Cursor-based iteration, most performant. Requires a sort on id somewhere in required "sort" argument. This is recommended ap...
[ "pysolr.Solr", "argparse.ArgumentParser", "json.dumps", "argparse.FileType" ]
[((3660, 3685), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (3683, 3685), False, 'import argparse\n'), ((4392, 4421), 'pysolr.Solr', 'pysolr.Solr', (["args['solr_url']"], {}), "(args['solr_url'])\n", (4403, 4421), False, 'import pysolr\n'), ((4260, 4282), 'argparse.FileType', 'argparse.FileT...
import sys from itertools import combinations from helpers import as_list_ints containers = as_list_ints('2015/day17/input.txt') # containers = as_list_ints('2015/day17/example-input.txt') total = 150 count = 0 min_containers = sys.maxsize min_count = 0 for i in range(len(containers)): for c in combinations(cont...
[ "itertools.combinations", "helpers.as_list_ints" ]
[((94, 130), 'helpers.as_list_ints', 'as_list_ints', (['"""2015/day17/input.txt"""'], {}), "('2015/day17/input.txt')\n", (106, 130), False, 'from helpers import as_list_ints\n'), ((303, 330), 'itertools.combinations', 'combinations', (['containers', 'i'], {}), '(containers, i)\n', (315, 330), False, 'from itertools imp...
import os, io, csv, json import requests, argparse import pandas as pd import numpy as np from ast import literal_eval from datetime import datetime from panoptes_client import Project, Panoptes from collections import OrderedDict, Counter from sklearn.cluster import DBSCAN import kso_utils.db_utils as db_utils from ks...
[ "pandas.DataFrame", "numpy.isin", "kso_utils.db_utils.combine_duplicates", "argparse.ArgumentParser", "kso_utils.zooniverse_utils.auth_session", "json.loads", "pandas.merge", "kso_utils.db_utils.create_connection", "numpy.where", "numpy.array", "pandas.Series", "pandas.read_sql_query", "ast....
[((2739, 2764), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (2762, 2764), False, 'import requests, argparse\n'), ((4562, 4600), 'kso_utils.zooniverse_utils.auth_session', 'auth_session', (['args.user', 'args.password'], {}), '(args.user, args.password)\n', (4574, 4600), False, 'from kso_util...
""" Script entry point """ from src.sandbox.network import Network from src.sandbox.dense import Dense import src.sandbox.linalg as linalg import numpy as np import time def main(): n = 6000 v = [x for x in range(n)] m = [[x for x in range(n)] for _ in range(n)] time_start = time.time() for _...
[ "src.sandbox.linalg.mdotv", "time.time" ]
[((298, 309), 'time.time', 'time.time', ([], {}), '()\n', (307, 309), False, 'import time\n'), ((548, 559), 'time.time', 'time.time', ([], {}), '()\n', (557, 559), False, 'import time\n'), ((342, 360), 'src.sandbox.linalg.mdotv', 'linalg.mdotv', (['m', 'v'], {}), '(m, v)\n', (354, 360), True, 'import src.sandbox.linalg...
''' pip install flask gevent requests pillow https://github.com/jrosebr1/simple-keras-rest-api https://gist.github.com/kylehounslow/767fb72fde2ebdd010a0bf4242371594 ''' ''' Usage python ..\scripts\classifier.py --socket=5000 --weights=weights\obj_last.weights curl -X POST -F image=@dog.png http://localho...
[ "threading.Thread", "subprocess.Popen", "argparse.ArgumentParser", "logging.basicConfig", "flask.request.args.get", "get_ar_plan.prepare_training_folders", "flask.Flask", "socket.socket", "threading.Lock", "logging.info", "flask.jsonify", "traceback.format_exc", "requests.get", "os.path.jo...
[((627, 654), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (644, 654), False, 'import logging\n'), ((662, 683), 'flask.Flask', 'flask.Flask', (['__name__'], {}), '(__name__)\n', (673, 683), False, 'import flask\n'), ((828, 844), 'threading.Lock', 'threading.Lock', ([], {}), '()\n', (842...
import tkinter as tk win = tk.Tk() current_index = tk.StringVar() text = tk.Text(win, bg="white", fg="black") lab = tk.Label(win, textvar=current_index) def update_index(event=None): cursor_position = text.index(tk.INSERT) cursor_position_pieces = str(cursor_position).split('.') cursor_line = cursor_pos...
[ "tkinter.StringVar", "tkinter.Text", "tkinter.Label", "tkinter.Tk" ]
[((28, 35), 'tkinter.Tk', 'tk.Tk', ([], {}), '()\n', (33, 35), True, 'import tkinter as tk\n'), ((52, 66), 'tkinter.StringVar', 'tk.StringVar', ([], {}), '()\n', (64, 66), True, 'import tkinter as tk\n'), ((74, 110), 'tkinter.Text', 'tk.Text', (['win'], {'bg': '"""white"""', 'fg': '"""black"""'}), "(win, bg='white', fg...
#Pluginname="Quizkampen (Android)" #Filename="quizkampen" #Type=App import struct import xml.etree.ElementTree import tempfile def convertdata(db): #ctx.gui_clearData() ctx.gui_setMainLabel("Quizkampen: Extracting userid"); tmpdir = tempfile.mkdtemp() outuid = os.path.join(tmpdir, "userid"...
[ "tempfile.mkdtemp" ]
[((258, 276), 'tempfile.mkdtemp', 'tempfile.mkdtemp', ([], {}), '()\n', (274, 276), False, 'import tempfile\n')]
#!/opt/bb/bin/python3.7 """This module defines a program that generates the 'baljsn_encoder_testtypes' component and replace all uses of 'bdes' with 'bsls' within its files. """ from asyncio import create_subprocess_exec as aio_create_subprocess_exec from asyncio import run as aio_run from asyncio import subprocess as...
[ "asyncio.create_subprocess_exec", "typing.cast", "re.finditer", "typing.TypeVar", "sys.exit", "re.compile" ]
[((704, 719), 'typing.TypeVar', 'ty_TypeVar', (['"""T"""'], {}), "('T')\n", (714, 719), True, 'from typing import TypeVar as ty_TypeVar\n'), ((971, 984), 'typing.cast', 'ty_cast', (['T', 'x'], {}), '(T, x)\n', (978, 984), True, 'from typing import cast as ty_cast\n'), ((1645, 1919), 'asyncio.create_subprocess_exec', 'a...
from django.db.models.query import Q from django.utils import timezone from rest_framework import serializers from ..accounts.serializers import UserSerializer from .models import Amenity, Booking class AmenityRelatedField(serializers.RelatedField): def to_native(self, value): return { 'id...
[ "django.utils.timezone.now", "django.db.models.query.Q", "rest_framework.serializers.SerializerMethodField", "rest_framework.serializers.ValidationError" ]
[((564, 616), 'rest_framework.serializers.SerializerMethodField', 'serializers.SerializerMethodField', (['"""is_obj_editable"""'], {}), "('is_obj_editable')\n", (597, 616), False, 'from rest_framework import serializers\n'), ((636, 689), 'rest_framework.serializers.SerializerMethodField', 'serializers.SerializerMethodF...
# Copyright 2020 TestProject (https://testproject.io) # # 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 ...
[ "tests.pageobjects.web.ProfilePage", "pytest.fixture", "selenium.webdriver.support.expected_conditions.invisibility_of_element_located", "selenium.webdriver.support.expected_conditions.title_is", "src.testproject.classes.WebDriverWait", "src.testproject.sdk.drivers.webdriver.Chrome", "tests.pageobjects....
[((1092, 1108), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (1106, 1108), False, 'import pytest\n'), ((1035, 1053), 'src.testproject.sdk.drivers.webdriver.Chrome', 'webdriver.Chrome', ([], {}), '()\n', (1051, 1053), False, 'from src.testproject.sdk.drivers import webdriver\n'), ((1138, 1162), 'src.testproject...