code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import numpy as np import cv2 as cv #reads image as greyscale img = cv.imread("image.jpg",0) cv.imshow('image',img) cv.waitKey(0) cv.destroyAllWindows()
[ "cv2.waitKey", "cv2.imread", "cv2.destroyAllWindows", "cv2.imshow" ]
[((68, 93), 'cv2.imread', 'cv.imread', (['"""image.jpg"""', '(0)'], {}), "('image.jpg', 0)\n", (77, 93), True, 'import cv2 as cv\n'), ((93, 116), 'cv2.imshow', 'cv.imshow', (['"""image"""', 'img'], {}), "('image', img)\n", (102, 116), True, 'import cv2 as cv\n'), ((116, 129), 'cv2.waitKey', 'cv.waitKey', (['(0)'], {}),...
import os from utils import get_files_num, get_statuses import pygame as pg FPS = 60 WIDTH = 800 HEIGHT = int(WIDTH * 0.8) SCREEN = pg.display.set_mode((WIDTH, HEIGHT)) IMG_FOLDER = 'img'# os.path.join('img','player') BG = (144, 201, 120) RED = (144, 0, 0) PLAYER_STATUSES = get_statuses(os.path.join(IMG_FOLDER, 'playe...
[ "pygame.display.set_mode", "os.path.join" ]
[((133, 169), 'pygame.display.set_mode', 'pg.display.set_mode', (['(WIDTH, HEIGHT)'], {}), '((WIDTH, HEIGHT))\n', (152, 169), True, 'import pygame as pg\n'), ((405, 467), 'os.path.join', 'os.path.join', (['IMG_FOLDER', '"""bullets_and_grenades"""', '"""bullet.png"""'], {}), "(IMG_FOLDER, 'bullets_and_grenades', 'bullet...
from . import big_box from . import drawers from . import dimensions import solid from solid import utils def assembly(): box = big_box.assembly() box = utils.color('blue')(box) bottom_drawer = utils.up(1)(utils.right(1)(drawers.assembly())) bottom_drawer = utils.color('red')(bottom_drawer) top_dr...
[ "solid.utils.right", "solid.cube", "solid.utils.up", "solid.scad_render_to_file", "solid.utils.color" ]
[((466, 504), 'solid.cube', 'solid.cube', (['[dimensions.box_x, 1, 1.5]'], {}), '([dimensions.box_x, 1, 1.5])\n', (476, 504), False, 'import solid\n'), ((839, 896), 'solid.scad_render_to_file', 'solid.scad_render_to_file', (['monitor_stand', '"""assembly.scad"""'], {}), "(monitor_stand, 'assembly.scad')\n", (864, 896),...
from flask import Flask, render_template, session from flask_wtf import FlaskForm from wtforms import StringField, SubmitField import possible_cards app = Flask(__name__) app.config["SECRET_KEY"] = "testkey" class OpponentForm(FlaskForm): unit_cost = StringField("Unit Cost:", render_kw={"placeholder": "Unit C...
[ "flask.render_template", "flask.Flask", "wtforms.SubmitField", "wtforms.StringField", "possible_cards.get_all_stealth_cards" ]
[((157, 172), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (162, 172), False, 'from flask import Flask, render_template, session\n'), ((261, 326), 'wtforms.StringField', 'StringField', (['"""Unit Cost:"""'], {'render_kw': "{'placeholder': 'Unit Cost'}"}), "('Unit Cost:', render_kw={'placeholder': 'Unit C...
# -*- coding: utf-8 -*- # # Copyright 2018-2020 Data61, CSIRO # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
[ "stellargraph.layer.graphsage.AttentionalAggregator", "pytest.approx", "numpy.ones_like", "stellargraph.layer.graphsage.MaxPoolingAggregator", "tensorflow.keras.activations.get", "tensorflow.keras.models.model_from_json", "tensorflow.keras.initializers.ones", "stellargraph.layer.graphsage.MeanAggregat...
[((1173, 1190), 'stellargraph.layer.graphsage.MeanAggregator', 'MeanAggregator', (['(2)'], {}), '(2)\n', (1187, 1190), False, 'from stellargraph.layer.graphsage import GraphSAGE, MeanAggregator, MaxPoolingAggregator, MeanPoolingAggregator, AttentionalAggregator\n'), ((1454, 1514), 'stellargraph.layer.graphsage.MeanAggr...
# --------------------------------------------------------------------- # Convert legacy PoP links # --------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # --------------------------------------------------------------------- # NOC mo...
[ "noc.gis.models.layer.Layer.get_by_code", "noc.inv.models.objectconnection.ObjectConnection.objects.filter" ]
[((451, 480), 'noc.gis.models.layer.Layer.get_by_code', 'Layer.get_by_code', (['"""conduits"""'], {}), "('conduits')\n", (468, 480), False, 'from noc.gis.models.layer import Layer\n'), ((495, 543), 'noc.inv.models.objectconnection.ObjectConnection.objects.filter', 'ObjectConnection.objects.filter', ([], {'type': '"""co...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from service.scheduling import SCHEDULER from django.http import HttpResponse from django.shortcuts import redirect def toggle(request): message = "Service has been %s." if SCHEDULER.isAvailable(): SCHEDULER.stopScheduler() message...
[ "service.scheduling.SCHEDULER.stopScheduler", "django.http.HttpResponse", "service.scheduling.SCHEDULER.isAvailable", "django.shortcuts.redirect", "service.scheduling.SCHEDULER.startScheduler" ]
[((246, 269), 'service.scheduling.SCHEDULER.isAvailable', 'SCHEDULER.isAvailable', ([], {}), '()\n', (267, 269), False, 'from service.scheduling import SCHEDULER\n'), ((419, 440), 'django.http.HttpResponse', 'HttpResponse', (['message'], {}), '(message)\n', (431, 440), False, 'from django.http import HttpResponse\n'), ...
from pathlib import Path import pytest import pyfqmr # Get the /example folder at the root of this repo EXAMPLES_DIR = Path(__file__, "..", "..", "example").resolve() def test_example(): import trimesh as tr bunny = tr.load_mesh(EXAMPLES_DIR / 'Stanford_Bunny_sample.stl') simp = pyfqmr.Simplify() sim...
[ "pytest.approx", "pathlib.Path", "trimesh.load_mesh", "trimesh.Trimesh", "pyfqmr.Simplify" ]
[((227, 283), 'trimesh.load_mesh', 'tr.load_mesh', (["(EXAMPLES_DIR / 'Stanford_Bunny_sample.stl')"], {}), "(EXAMPLES_DIR / 'Stanford_Bunny_sample.stl')\n", (239, 283), True, 'import trimesh as tr\n'), ((295, 312), 'pyfqmr.Simplify', 'pyfqmr.Simplify', ([], {}), '()\n', (310, 312), False, 'import pyfqmr\n'), ((540, 576...
import shutil from genrl.agents import PPO1, TD3, VPG from genrl.core import ( MlpActorCritic, MlpPolicy, MlpValue, NormalActionNoise, OrnsteinUhlenbeckActionNoise, ) from genrl.environments import VectorEnv from genrl.trainers import OffPolicyTrainer, OnPolicyTrainer class custom_policy(MlpPolic...
[ "genrl.environments.VectorEnv", "genrl.agents.VPG", "genrl.trainers.OnPolicyTrainer", "genrl.agents.PPO1", "shutil.rmtree" ]
[((1025, 1052), 'genrl.environments.VectorEnv', 'VectorEnv', (['"""CartPole-v0"""', '(1)'], {}), "('CartPole-v0', 1)\n", (1034, 1052), False, 'from genrl.environments import VectorEnv\n'), ((1198, 1214), 'genrl.agents.VPG', 'VPG', (['policy', 'env'], {}), '(policy, env)\n', (1201, 1214), False, 'from genrl.agents impor...
#!/usr/bin/env python # Software License Agreement (BSD License) # # Copyright (c) 2009-2011, Eucalyptus Systems, Inc. # All rights reserved. # # Redistribution and use of this software in source and binary forms, with or # without modification, are permitted provided that the following conditions # are met: # # Redi...
[ "unittest.main", "eucaops.Eucaops" ]
[((1747, 1762), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1760, 1762), False, 'import unittest\n'), ((1603, 1632), 'eucaops.Eucaops', 'Eucaops', ([], {'download_creds': '(False)'}), '(download_creds=False)\n', (1610, 1632), False, 'from eucaops import Eucaops\n')]
####################################################################### # Copyright (C) # # 2018 <NAME> (<EMAIL>) # # Permission given to modify the code as long as you keep this # # declaration at the top ...
[ "matplotlib.use", "numpy.argmax", "numpy.linspace", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ]
[((577, 600), 'matplotlib.use', 'matplotlib.use', (['"""TkAgg"""'], {}), "('TkAgg')\n", (591, 600), False, 'import matplotlib\n'), ((1001, 1019), 'matplotlib.pyplot.subplots', 'plt.subplots', (['(1)', '(1)'], {}), '(1, 1)\n', (1013, 1019), True, 'import matplotlib.pyplot as plt\n'), ((1041, 1069), 'numpy.linspace', 'np...
import pandas as pd import numpy as np d= pd.read_csv(snakemake.input[0], header= 0, delim_whitespace= True) gest_age_pos= 123112292 bw_pos= 123065778 df= d.copy() df.columns= ['CHR_B', 'BP_B', 'SNP_B', 'MAF_B', 'CHR_A', 'BP_A', 'SNP_A', 'MAF_A', 'R2'] d= pd.concat([d, df]) d= d.loc[d.R2>= 0.8, :] pos_list= [pos...
[ "pandas.concat", "pandas.read_csv" ]
[((43, 107), 'pandas.read_csv', 'pd.read_csv', (['snakemake.input[0]'], {'header': '(0)', 'delim_whitespace': '(True)'}), '(snakemake.input[0], header=0, delim_whitespace=True)\n', (54, 107), True, 'import pandas as pd\n'), ((261, 279), 'pandas.concat', 'pd.concat', (['[d, df]'], {}), '([d, df])\n', (270, 279), True, '...
from fastapi import FastAPI, HTTPException, Depends, Request from fastapi.responses import JSONResponse from fastapi_jwt_auth import AuthJWT from fastapi_jwt_auth.exceptions import AuthJWTException from pydantic import BaseModel app = FastAPI() class User(BaseModel): username: str password: str # in producti...
[ "fastapi.responses.JSONResponse", "fastapi.FastAPI", "fastapi.Depends", "fastapi.HTTPException" ]
[((236, 245), 'fastapi.FastAPI', 'FastAPI', ([], {}), '()\n', (243, 245), False, 'from fastapi import FastAPI, HTTPException, Depends, Request\n'), ((786, 860), 'fastapi.responses.JSONResponse', 'JSONResponse', ([], {'status_code': 'exc.status_code', 'content': "{'detail': exc.message}"}), "(status_code=exc.status_code...
from django.conf.urls import include, url from rest_framework import routers from . import views router = routers.DefaultRouter() router.register( "infrastructure-projects/provincial/search", views.ProvInfraProjectSearchView, basename="provincial-infrastructure-project-api", ) urlpatterns = [ url( ...
[ "django.conf.urls.include", "django.conf.urls.url", "rest_framework.routers.DefaultRouter" ]
[((108, 131), 'rest_framework.routers.DefaultRouter', 'routers.DefaultRouter', ([], {}), '()\n', (129, 131), False, 'from rest_framework import routers\n'), ((313, 451), 'django.conf.urls.url', 'url', (['"""^infrastructure-projects/provincial/$"""', 'views.provincial_infrastructure_project_list'], {'name': '"""provinci...
# # Copyright (C) 2000-2005 by <NAME> (<EMAIL>) # # Jockey is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2, or (at your option) any # later version. # # Jockey is distributed in the hope that...
[ "theme.add_reinitialization_hook", "object_set.T" ]
[((5701, 5738), 'theme.add_reinitialization_hook', 'theme.add_reinitialization_hook', (['init'], {}), '(init)\n', (5732, 5738), False, 'import theme\n'), ((4501, 4515), 'object_set.T', 'object_set.T', ([], {}), '()\n', (4513, 4515), False, 'import object_set\n')]
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from ggrc.models.reflection import AttributeInfo from . import Record class RecordBuilder(object): def __init__(self, tgt_class): self._fulltext_attrs = AttributeInfo.gather_attrs( tgt_class,...
[ "ggrc.models.reflection.AttributeInfo.gather_attrs" ]
[((1518, 1574), 'ggrc.models.reflection.AttributeInfo.gather_attrs', 'AttributeInfo.gather_attrs', (['tgt_class', '"""_fulltext_attrs"""'], {}), "(tgt_class, '_fulltext_attrs')\n", (1544, 1574), False, 'from ggrc.models.reflection import AttributeInfo\n'), ((274, 330), 'ggrc.models.reflection.AttributeInfo.gather_attrs...
from http.server import HTTPServer, BaseHTTPRequestHandler from urllib import parse form = """\ <form method="post"> <input name='q'> <input type="submit"> </form> """ class Handler(BaseHTTPRequestHandler): def do_GET(self): self.send_response(200) self.send_header('Content-Type', 'text/html') ...
[ "http.server.HTTPServer" ]
[((828, 859), 'http.server.HTTPServer', 'HTTPServer', (["('', 8000)", 'Handler'], {}), "(('', 8000), Handler)\n", (838, 859), False, 'from http.server import HTTPServer, BaseHTTPRequestHandler\n')]
# -*- coding: utf-8 -*- """ This module provides a class :class:`Expr` to subclass from in order to describe expressions. The hope was that this class would allow straightforward interoperability between python packages handling symbolics (SymPy) and units (quantities) as well as working without either of those. The pr...
[ "itertools.chain", "sympy.printing.mathml.mathml" ]
[((5654, 5702), 'itertools.chain', 'chain', (['args', 'self.argument_defaults[-n_missing:]'], {}), '(args, self.argument_defaults[-n_missing:])\n', (5659, 5702), False, 'from itertools import chain\n'), ((15678, 15690), 'sympy.printing.mathml.mathml', 'mathml', (['expr'], {}), '(expr)\n', (15684, 15690), False, 'from s...
import random """ With 50% growth, 38 level-ups random level-up variance of 2.5 stats off average dynamic level-up variance of 0.8 stats off average With 30% growth, 38 level-ups random level-up variance of 2.3 stats off average dynamic level-up variance of 0.7 stats off average With 10% growth, 38 level-ups random le...
[ "random.randint" ]
[((1258, 1279), 'random.randint', 'random.randint', (['(0)', '(99)'], {}), '(0, 99)\n', (1272, 1279), False, 'import random\n'), ((1693, 1714), 'random.randint', 'random.randint', (['(0)', '(99)'], {}), '(0, 99)\n', (1707, 1714), False, 'import random\n')]
import torch import torch.nn as nn import torch.nn.functional as F from ...ops.roiaware_pool3d import roiaware_pool3d_utils from ...utils import common_utils, loss_utils # from emd import EMDLoss def guassian_kernel(source, target, kernel_mul=2.0, kernel_num=5, fix_sigma=None): n_samples = int(source.size()[0])+...
[ "torch.nn.ReLU", "torch.nn.functional.softmax", "torch.nn.Sequential", "torch.sigmoid", "torch.exp", "torch.cat", "torch.nn.BatchNorm1d", "torch.tensor", "torch.sum", "torch.nn.Linear", "torch.nn.BCEWithLogitsLoss", "torch.zeros", "torch.clamp", "torch.ones" ]
[((354, 388), 'torch.cat', 'torch.cat', (['[source, target]'], {'dim': '(0)'}), '([source, target], dim=0)\n', (363, 388), False, 'import torch\n'), ((911, 951), 'torch.exp', 'torch.exp', (['(-L2_distance / bandwidth_temp)'], {}), '(-L2_distance / bandwidth_temp)\n', (920, 951), False, 'import torch\n'), ((4146, 4171),...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' catalog_harvesting/csw.py ''' from owslib.csw import CatalogueServiceWeb from owslib.iso import namespaces from six.moves.urllib.parse import urlencode from lxml import etree from catalog_harvesting import get_logger from catalog_harvesting.records import process_doc im...
[ "os.path.exists", "owslib.csw.CatalogueServiceWeb", "os.makedirs", "os.environ.get", "os.path.join", "six.moves.urllib.parse.urlencode", "catalog_harvesting.get_logger", "catalog_harvesting.records.process_doc" ]
[((2376, 2418), 'os.path.join', 'os.path.join', (['dest', "(name_sanitize + '.xml')"], {}), "(dest, name_sanitize + '.xml')\n", (2388, 2418), False, 'import os\n'), ((4035, 4063), 'owslib.csw.CatalogueServiceWeb', 'CatalogueServiceWeb', (['csw_url'], {}), '(csw_url)\n', (4054, 4063), False, 'from owslib.csw import Cata...
import torch import numpy as np from ialgebra.utils.utils_data import preprocess_fn from ialgebra.utils.utils_interpreter import resize_postfn, generate_map device = 'cuda' if torch.cuda.is_available() else 'cpu' class Interpreter(object): def __init__(self, pretrained_model=None, dataset=None, target_layer=None...
[ "torch.tensor", "torch.cuda.is_available", "numpy.concatenate" ]
[((177, 202), 'torch.cuda.is_available', 'torch.cuda.is_available', ([], {}), '()\n', (200, 202), False, 'import torch\n'), ((1758, 1797), 'numpy.concatenate', 'np.concatenate', (['interpreter_map'], {'axis': '(0)'}), '(interpreter_map, axis=0)\n', (1772, 1797), True, 'import numpy as np\n'), ((1827, 1869), 'numpy.conc...
#!/usr/bin/env python import os from copy import deepcopy import numpy as np from numpy.testing import assert_array_equal import gippy as gp import unittest import gippy.test as gpt class GeoImageTests(unittest.TestCase): prefix = 'test-' def setUp(self): """ Configure options """ gp.Option...
[ "os.path.exists", "gippy.test.get_test_image", "gippy.Options.set_chunksize", "gippy.GeoImage", "numpy.array", "numpy.zeros", "gippy.GeoImage.create", "gippy.Options.set_verbose", "copy.deepcopy", "numpy.testing.assert_array_equal", "os.remove" ]
[((311, 336), 'gippy.Options.set_verbose', 'gp.Options.set_verbose', (['(1)'], {}), '(1)\n', (333, 336), True, 'import gippy as gp\n'), ((345, 374), 'gippy.Options.set_chunksize', 'gp.Options.set_chunksize', (['(4.0)'], {}), '(4.0)\n', (369, 374), True, 'import gippy as gp\n'), ((455, 475), 'gippy.test.get_test_image',...
# -*- coding: utf-8 -*- from logging import getLogger from openprocurement.api.views.award_document import TenderAwardDocumentResource from openprocurement.api.utils import opresource LOGGER = getLogger(__name__) @opresource(name='Tender UA Award Documents', collection_path='/tenders/{tender_id}/awards/{...
[ "logging.getLogger", "openprocurement.api.utils.opresource" ]
[((194, 213), 'logging.getLogger', 'getLogger', (['__name__'], {}), '(__name__)\n', (203, 213), False, 'from logging import getLogger\n'), ((217, 499), 'openprocurement.api.utils.opresource', 'opresource', ([], {'name': '"""Tender UA Award Documents"""', 'collection_path': '"""/tenders/{tender_id}/awards/{award_id}/doc...
# Copyright 2019, OpenCensus Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
[ "opencensus.stats.measure.MeasureInt", "time.sleep", "opencensus.stats.aggregation.CountAggregation", "opencensus.tags.tag_map.TagMap", "opencensus.ext.azure.metrics_exporter.new_metrics_exporter" ]
[((1038, 1106), 'opencensus.stats.measure.MeasureInt', 'measure_module.MeasureInt', (['"""carrots"""', '"""number of carrots"""', '"""carrots"""'], {}), "('carrots', 'number of carrots', 'carrots')\n", (1063, 1106), True, 'from opencensus.stats import measure as measure_module\n'), ((1413, 1450), 'opencensus.stats.aggr...
# (C) Copyright 2007-2020 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in LICENSE.txt and may be redistributed only under # the conditions described in the aforementioned license. The license # is also available online at...
[ "weakref.WeakKeyDictionary", "weakref.WeakMethod", "warnings.warn", "weakref.ref" ]
[((1355, 1382), 'weakref.WeakKeyDictionary', 'weakref.WeakKeyDictionary', ([], {}), '()\n', (1380, 1382), False, 'import weakref\n'), ((1434, 1594), 'warnings.warn', 'warnings.warn', ([], {'message': '"""safeweakref.ref is deprecated, and will be removed in a future version of Envisage"""', 'category': 'DeprecationWarn...
import setuptools version = "0.0.7" setuptools.setup( name="Pyrraform", version=version, description="Terraform SDK (to write providers)", long_description=open("README.rst").read(), author="<NAME>", author_email="<EMAIL>", url="http://jacquev6.github.io/Pyrraform", license="MIT", ...
[ "setuptools.find_packages" ]
[((681, 707), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (705, 707), False, 'import setuptools\n')]
""" Factory that configures Elasticsearch client. """ from functools import partial from os import environ from urllib.parse import parse_qs, urlencode, urlparse from boto3 import Session from botocore.auth import SigV4Auth from botocore.awsrequest import AWSRequest from elasticsearch import Elasticsearch, RequestsHt...
[ "botocore.auth.SigV4Auth", "urllib.parse.urlparse", "microcosm.config.validation.typed", "elasticsearch.Elasticsearch", "boto3.Session", "os.environ.get", "urllib.parse.parse_qs" ]
[((760, 777), 'urllib.parse.urlparse', 'urlparse', (['raw_url'], {}), '(raw_url)\n', (768, 777), False, 'from urllib.parse import parse_qs, urlencode, urlparse\n'), ((3186, 3209), 'elasticsearch.Elasticsearch', 'Elasticsearch', ([], {}), '(**config)\n', (3199, 3209), False, 'from elasticsearch import Elasticsearch, Req...
from gtfspy.import_loaders.table_loader import TableLoader, decode_six class RouteLoader(TableLoader): fname = 'routes.txt' table = 'routes' tabledef = '(route_I INTEGER PRIMARY KEY, ' \ 'route_id TEXT UNIQUE NOT NULL, ' \ 'agency_I INT, ' \ 'name TEXT, ' \ ...
[ "gtfspy.import_loaders.table_loader.decode_six" ]
[((1294, 1329), 'gtfspy.import_loaders.table_loader.decode_six', 'decode_six', (["row['route_short_name']"], {}), "(row['route_short_name'])\n", (1304, 1329), False, 'from gtfspy.import_loaders.table_loader import TableLoader, decode_six\n'), ((1367, 1401), 'gtfspy.import_loaders.table_loader.decode_six', 'decode_six',...
# Generated by Django 3.1.6 on 2021-02-17 01:56 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('nameservice', '0002_auto_20210217_0116'), ] operations = [ migrations.AlterField( model_name='u...
[ "django.db.models.ForeignKey" ]
[((382, 542), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'help_text': '"""Select Default Portal"""', 'on_delete': 'django.db.models.deletion.CASCADE', 'related_name': '"""portal"""', 'to': '"""nameservice.portalmodel"""'}), "(help_text='Select Default Portal', on_delete=django.db.\n models.deletion.CA...
import scapy.all as sc import argparse def get_arguments(): parser = argparse.ArgumentParser() parser.add_argument("-t", "--target", dest="target", help="Target IP or IP range.") options = parser.parse_args() if not options.target: parser.error( '[-] Please ...
[ "scapy.all.ARP", "scapy.all.Ether", "argparse.ArgumentParser", "scapy.all.srp" ]
[((75, 100), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (98, 100), False, 'import argparse\n'), ((435, 450), 'scapy.all.ARP', 'sc.ARP', ([], {'pdst': 'ip'}), '(pdst=ip)\n', (441, 450), True, 'import scapy.all as sc\n'), ((467, 500), 'scapy.all.Ether', 'sc.Ether', ([], {'dst': '"""ff:ff:ff:f...
""" Module to read intel hex files into binary data blobs. IntelHex files are commonly used to distribute firmware See: http://en.wikipedia.org/wiki/Intel_HEX This is a python 3 conversion of the code created by <NAME> for the Cura project. """ import io from UM.Logger import Logger def readHex(filename): """ ...
[ "UM.Logger.Logger.log", "io.open" ]
[((440, 480), 'io.open', 'io.open', (['filename', '"""r"""'], {'encoding': '"""utf-8"""'}), "(filename, 'r', encoding='utf-8')\n", (447, 480), False, 'import io\n'), ((1560, 1639), 'UM.Logger.Logger.log', 'Logger.log', (['"""d"""', '"""%s, %s, %s, %s, %s"""', 'rec_type', 'rec_len', 'addr', 'check_sum', 'line'], {}), "(...
import random import re import sys sys.path.append("../../") import pandas as pd import numpy as np from demo import * # just utility so we don't clobber original dataframe def cp(d): return df.copy() def code(db_node): return db.get_code(db_node) def run(db_node): func = db.get_executable(db_node) ...
[ "pandas.read_csv", "numpy.random.choice", "pdb.post_mortem", "random.seed", "numpy.random.seed", "sys.path.append" ]
[((35, 60), 'sys.path.append', 'sys.path.append', (['"""../../"""'], {}), "('../../')\n", (50, 60), False, 'import sys\n'), ((661, 712), 'pandas.read_csv', 'pd.read_csv', (['"""../../demo-data/loan.csv"""'], {'nrows': '(1000)'}), "('../../demo-data/loan.csv', nrows=1000)\n", (672, 712), True, 'import pandas as pd\n'), ...
"""Base class for testing file translation""" import unittest import os import json import argparse import sys import subprocess import re import chardet sys.path.append('../..') import vb2py.parserclasses import vb2py.conversionserver # # Private data hiding may obscure some of the testing so we turn it off impo...
[ "json.loads", "argparse.ArgumentParser", "os.path.join", "os.path.splitext", "re.match", "os.path.split", "chardet.detect", "os.path.isdir", "subprocess.call", "sys.exit", "sys.path.append", "os.walk" ]
[((157, 181), 'sys.path.append', 'sys.path.append', (['"""../.."""'], {}), "('../..')\n", (172, 181), False, 'import sys\n'), ((4502, 4522), 'os.walk', 'os.walk', (['folder_name'], {}), '(folder_name)\n', (4509, 4522), False, 'import os\n'), ((4887, 4953), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'de...
import torch, mmcv import torch.nn as nn from mmcv.cnn import normal_init, kaiming_init from mmdet.core import distance2bbox, bbox_overlaps, force_fp32, multi_apply, multiclass_nms, multiclass_nms_idx from mmdet.ops import ConvModule, Scale from ..builder import build_loss from ..registry import HEADS from ..utils imp...
[ "mmdet.ops.CropSplit", "mmcv.cnn.kaiming_init", "torch.nn.ReLU", "torch.nn.Sequential", "mmdet.ops.CropSplitGt", "torch.sqrt", "numpy.array", "mmdet.core.bbox_overlaps", "torch.sum", "torch.nn.functional.interpolate", "mmdet.ops.DeformConv", "torch.arange", "torch.nn.GroupNorm", "mmcv.imre...
[((535, 613), 'torch.cat', 'torch.cat', (['((boxes[:, 2:] + boxes[:, :2]) / 2, boxes[:, 2:] - boxes[:, :2])', '(1)'], {}), '(((boxes[:, 2:] + boxes[:, :2]) / 2, boxes[:, 2:] - boxes[:, :2]), 1)\n', (544, 613), False, 'import torch, mmcv\n'), ((2503, 2536), 'torch.clamp', 'torch.clamp', (['x1'], {'min': '(0)', 'max': '(...
import pickle import json import reparse_utils from utils import * import os import math import datetime import json import security_utils ''' Utilities to deal with IO-Operations. This includes writing the final data to a GEOJSON file. ''' def dump_to_file(arr, filename): with open(filename, 'wb') as fp: ...
[ "os.listdir", "pickle.dump", "math.ceil", "json.dumps", "pickle.load", "os.path.join", "datetime.datetime.today", "json.dump" ]
[((2958, 3005), 'math.ceil', 'math.ceil', (['(patches_shape[0] / shape_amount_sqrt)'], {}), '(patches_shape[0] / shape_amount_sqrt)\n', (2967, 3005), False, 'import math\n'), ((3020, 3067), 'math.ceil', 'math.ceil', (['(patches_shape[1] / shape_amount_sqrt)'], {}), '(patches_shape[1] / shape_amount_sqrt)\n', (3029, 306...
from bottle import route, run, template, static_file import lynxmotion import behaviors import os.path static_root = os.path.join(os.path.dirname(__file__), 'static') @route('/') def home_page(): return template('controller') @route('/static/<filepath:path>') def server_static(filepath): return ...
[ "bottle.static_file", "bottle.template", "bottle.run", "bottle.route" ]
[((177, 187), 'bottle.route', 'route', (['"""/"""'], {}), "('/')\n", (182, 187), False, 'from bottle import route, run, template, static_file\n'), ((245, 277), 'bottle.route', 'route', (['"""/static/<filepath:path>"""'], {}), "('/static/<filepath:path>')\n", (250, 277), False, 'from bottle import route, run, template, ...
import logging from django.db import models from django.utils.translation import ugettext_lazy as _ from ..classes import SourceUploadedFile from ..literals import ( SOURCE_CHOICE_WEB_FORM, SOURCE_INTERACTIVE_UNCOMPRESS_CHOICES ) from .base import InteractiveSource __all__ = ('WebFormSource',) logger = logging....
[ "logging.getLogger", "django.utils.translation.ugettext_lazy", "django.db.models.Manager" ]
[((312, 344), 'logging.getLogger', 'logging.getLogger', ([], {'name': '__name__'}), '(name=__name__)\n', (329, 344), False, 'import logging\n'), ((1179, 1195), 'django.db.models.Manager', 'models.Manager', ([], {}), '()\n', (1193, 1195), False, 'from django.db import models\n'), ((1236, 1249), 'django.utils.translation...
from setuptools import setup setup( name='redash_json_logger_destination', version='0.1.0', description='JSON Logger Alert Destination for Redash', author='<NAME>', author_email='<EMAIL>', url='https://github.com/ariarijp/redash-json-logger-destination', packages=[ 'redash_json_logg...
[ "setuptools.setup" ]
[((30, 333), 'setuptools.setup', 'setup', ([], {'name': '"""redash_json_logger_destination"""', 'version': '"""0.1.0"""', 'description': '"""JSON Logger Alert Destination for Redash"""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'url': '"""https://github.com/ariarijp/redash-json-logger-destination"""',...
from setuptools import setup, find_packages setup( name="cfddns", version="0.1", packages=['cfddns'], entry_points={ 'console_scripts': ["cfddns = cfddns:main"], }, install_requires=["cloudflare", "pyyaml"], )
[ "setuptools.setup" ]
[((45, 214), 'setuptools.setup', 'setup', ([], {'name': '"""cfddns"""', 'version': '"""0.1"""', 'packages': "['cfddns']", 'entry_points': "{'console_scripts': ['cfddns = cfddns:main']}", 'install_requires': "['cloudflare', 'pyyaml']"}), "(name='cfddns', version='0.1', packages=['cfddns'], entry_points={\n 'console_s...
import configparser import pymongo from pymongo import InsertOne from googleapiclient.discovery import build from mediawiki import MediaWiki from data_acq_functions import get_house_ids, get_rep_data # Get config file config = configparser.ConfigParser() config.read('../database-dev/auth/config.ini') # Get ProPubli...
[ "configparser.ConfigParser", "data_acq_functions.get_house_ids", "pymongo.InsertOne", "googleapiclient.discovery.build", "data_acq_functions.get_rep_data", "mediawiki.MediaWiki", "pymongo.MongoClient" ]
[((230, 257), 'configparser.ConfigParser', 'configparser.ConfigParser', ([], {}), '()\n', (255, 257), False, 'import configparser\n'), ((701, 750), 'googleapiclient.discovery.build', 'build', (['GKG', 'GKG_VERSION'], {'developerKey': 'GKG_API_KEY'}), '(GKG, GKG_VERSION, developerKey=GKG_API_KEY)\n', (706, 750), False, ...
# coding: utf-8 # Copyright © 2014-2020 VMware, Inc. All Rights Reserved. ################################################################################ from unittest import TestCase, mock from cbopensource.utilities.common_config import BoolConfigOption, CertConfigOption, CommaDelimitedListConfigOption, \ Comm...
[ "cbopensource.utilities.common_config.CertConfigOption", "cbopensource.utilities.common_config.StringConfigOption", "cbopensource.utilities.common_config.CommaDelimitedListConfigOption", "unittest.mock.patch", "cbopensource.utilities.common_config.BoolConfigOption", "cbopensource.utilities.common_config.I...
[((20248, 20316), 'unittest.mock.patch', 'mock.patch', (['"""cbopensource.driver.taxii_server_config.os.path.exists"""'], {}), "('cbopensource.driver.taxii_server_config.os.path.exists')\n", (20258, 20316), False, 'from unittest import TestCase, mock\n'), ((20694, 20762), 'unittest.mock.patch', 'mock.patch', (['"""cbop...
import unittest from unittest import mock from unittest.mock import PropertyMock from prompt_toolkit.clipboard import ClipboardData from prompt_toolkit.document import Document from prompt_toolkit.selection import SelectionState, SelectionType from docengine import Doc from document_editor import DocumentEditor @un...
[ "prompt_toolkit.selection.SelectionState", "document_editor.DocumentEditor", "prompt_toolkit.clipboard.ClipboardData", "docengine.Doc", "unittest.mock.patch" ]
[((318, 364), 'unittest.mock.patch', 'unittest.mock.patch', (['"""document_editor.get_app"""'], {}), "('document_editor.get_app')\n", (337, 364), False, 'import unittest\n'), ((366, 419), 'unittest.mock.patch', 'unittest.mock.patch', (['"""document_editor.MessageService"""'], {}), "('document_editor.MessageService')\n"...
import tkinter window = tkinter.Tk() button = tkinter.Button(window, text='Hello', font=('Courier', 14, 'bold italic')) button.pack() window.mainloop()
[ "tkinter.Tk", "tkinter.Button" ]
[((25, 37), 'tkinter.Tk', 'tkinter.Tk', ([], {}), '()\n', (35, 37), False, 'import tkinter\n'), ((47, 120), 'tkinter.Button', 'tkinter.Button', (['window'], {'text': '"""Hello"""', 'font': "('Courier', 14, 'bold italic')"}), "(window, text='Hello', font=('Courier', 14, 'bold italic'))\n", (61, 120), False, 'import tkin...
"""Publishes multiple messages to a Pub/Sub topic with an error handler.""" import time from google.cloud import pubsub_v1 # TODO(developer) project_id = "" topic_id = "poschairdata" publisher = pubsub_v1.PublisherClient() topic_path = publisher.topic_path(project_id, topic_id) futures = dict() def get_callback(f,...
[ "google.cloud.pubsub_v1.PublisherClient", "time.sleep" ]
[((198, 225), 'google.cloud.pubsub_v1.PublisherClient', 'pubsub_v1.PublisherClient', ([], {}), '()\n', (223, 225), False, 'from google.cloud import pubsub_v1\n'), ((973, 986), 'time.sleep', 'time.sleep', (['(5)'], {}), '(5)\n', (983, 986), False, 'import time\n')]
from typing import Optional, Any from functools import lru_cache import numpy as np from .form import Form, FormDict from ..basis import Basis from skfem.generic_utils import HashableNdArray class BilinearForm(Form): """A bilinear form for finite element assembly. Bilinear forms are defined using functions...
[ "functools.lru_cache", "skfem.generic_utils.HashableNdArray", "numpy.zeros_like", "numpy.zeros" ]
[((3913, 3935), 'functools.lru_cache', 'lru_cache', ([], {'maxsize': '(128)'}), '(maxsize=128)\n', (3922, 3935), False, 'from functools import lru_cache\n'), ((2522, 2548), 'skfem.generic_utils.HashableNdArray', 'HashableNdArray', (['ubasis.dx'], {}), '(ubasis.dx)\n', (2537, 2548), False, 'from skfem.generic_utils impo...
import os from Services.RetinaFaceLocatorService import RetinaFacesLocatorService from Services.Img2PoseLocatorService import Img2PoseLocatorService from Services.SaveFacesJson import SaveFacesJson from Services.SaveFacesJpg import SaveFacesJpg from Utils.Heuristics.FaceHeuristic import FaceHeuristic from Utils.Heuris...
[ "Services.SaveFacesJson.SaveFacesJson", "Services.Img2PoseLocatorService.Img2PoseLocatorService", "Utils.fileUtils.createFolder", "os.path.join", "Utils.Heuristics.HeuristicCreator.HeuristicCreator", "os.mkdir", "os.path.basename", "Services.SaveFacesJpg.SaveFacesJpg", "Services.RetinaFaceLocatorSer...
[((1043, 1061), 'Utils.Heuristics.HeuristicCreator.HeuristicCreator', 'HeuristicCreator', ([], {}), '()\n', (1059, 1061), False, 'from Utils.Heuristics.HeuristicCreator import HeuristicCreator\n'), ((1092, 1132), 'os.path.join', 'os.path.join', (['"""data"""', '"""TGC2020v0.3_json"""'], {}), "('data', 'TGC2020v0.3_json...
''' Created on Jun 13, 2016 @author: kiel ''' from pynetviz.NetObjects import * import pynetviz from ipaddress import IPv4Address, IPv4Network class NetGraph(object): ''' classdocs ''' def __init__(self): ''' Constructor ''' # IP objects self.ips = [] ...
[ "ipaddress.IPv4Address" ]
[((2164, 2183), 'ipaddress.IPv4Address', 'IPv4Address', (['ipaddr'], {}), '(ipaddr)\n', (2175, 2183), False, 'from ipaddress import IPv4Address, IPv4Network\n')]
from fastapi import APIRouter, Depends from fastapi.exceptions import HTTPException from fastapi.responses import RedirectResponse from odp.lib.media import MediaRepoClient from odp.lib.exceptions import MediaRepositoryError from odp.api_old.dependencies.media import get_media_repo_client router = APIRouter() @rout...
[ "fastapi.responses.RedirectResponse", "fastapi.APIRouter", "fastapi.Depends", "fastapi.exceptions.HTTPException" ]
[((301, 312), 'fastapi.APIRouter', 'APIRouter', ([], {}), '()\n', (310, 312), False, 'from fastapi import APIRouter, Depends\n'), ((447, 477), 'fastapi.Depends', 'Depends', (['get_media_repo_client'], {}), '(get_media_repo_client)\n', (454, 477), False, 'from fastapi import APIRouter, Depends\n'), ((577, 608), 'fastapi...
try: from setuptools import setup except: from distutils.core import setup setup( name='bigWigArgmaxOverBed', version='0.1', scripts=['bigWigArgmaxOverBed.py'], url='https://github.com/eranroz/bigWigArgmaxOverBed', license='MIT', author='eranroz', author_email='<EMAIL>', descript...
[ "distutils.core.setup" ]
[((83, 398), 'distutils.core.setup', 'setup', ([], {'name': '"""bigWigArgmaxOverBed"""', 'version': '"""0.1"""', 'scripts': "['bigWigArgmaxOverBed.py']", 'url': '"""https://github.com/eranroz/bigWigArgmaxOverBed"""', 'license': '"""MIT"""', 'author': '"""eranroz"""', 'author_email': '"""<EMAIL>"""', 'description': '"""...
from decouple import config class Config(object): SECRET_KEY = config('SECRET_KEY') #CSRF_SESSION_KEY = SESSION_KEY SQLALCHEMY_TRACK_MODIFICATIONS = True migration_directory = 'migrations' class Development(Config): DEBUG = True SQLALCHEMY_DATABASE_URI = config('DATABASE_PATH') class Testi...
[ "decouple.config" ]
[((69, 89), 'decouple.config', 'config', (['"""SECRET_KEY"""'], {}), "('SECRET_KEY')\n", (75, 89), False, 'from decouple import config\n'), ((283, 306), 'decouple.config', 'config', (['"""DATABASE_PATH"""'], {}), "('DATABASE_PATH')\n", (289, 306), False, 'from decouple import config\n'), ((398, 421), 'decouple.config',...
import streamlit as st import streamlit.components.v1 as components def mol_component(resi, width=714, height=714): s_f = "" if resi != '': s_c = resi.split(',') for i,o in enumerate(s_c): if o != '': s_f += "'" s_m = o.split('-') ...
[ "streamlit.components.v1.html", "streamlit.error" ]
[((956, 1925), 'streamlit.components.v1.html', 'components.html', (['f"""\n<head>\n <script src="https://3Dmol.csb.pitt.edu/build/3Dmol-min.js"></script>\n\n <script>\n var glviewer = null;\n var prot = null;\n\n $(document).ready(function () {{\n glviewer = $3Dmol.createViewer("gl...
#!env python3 """ --- Day 1: Sonar Sweep --- You're minding your own business on a ship at sea when the overboard alarm goes off! You rush to see if you can help. Apparently, one of the Elves tripped and accidentally sent the sleigh keys flying into the ocean! Before you know it, you're inside a submarine the...
[ "rich.print", "aocd.get_data" ]
[((2668, 2693), 'rich.print', 'print', (['f"""count = {COUNT}"""'], {}), "(f'count = {COUNT}')\n", (2673, 2693), False, 'from rich import print\n'), ((2399, 2419), 'aocd.get_data', 'aocd.get_data', ([], {'day': '(1)'}), '(day=1)\n', (2412, 2419), False, 'import aocd\n'), ((2522, 2564), 'rich.print', 'print', (['f"""{va...
import logging import subprocess from cliff.command import Command class Run(Command): log = logging.getLogger(__name__) def get_parser(self, prog_name): parser = super(Run, self).get_parser(prog_name) parser.add_argument('type', nargs=1, type=str, help='Type of the worker') return ...
[ "logging.getLogger", "subprocess.Popen" ]
[((101, 128), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (118, 128), False, 'import logging\n'), ((653, 770), 'subprocess.Popen', 'subprocess.Popen', (['f"""celery -A osism.tasks.ansible worker -n {queue} --loglevel=INFO -Q {queue}"""'], {'shell': '(True)'}), "(\n f'celery -A osism...
from django.test import TestCase from bluebottle.initiatives.tests.factories import InitiativeFactory from bluebottle.time_based.tests.factories import PeriodActivityFactory from bluebottle.segments.tests.factories import SegmentFactory, SegmentTypeFactory from bluebottle.test.factory_models.accounts import BlueBottle...
[ "bluebottle.initiatives.tests.factories.InitiativeFactory.create", "bluebottle.time_based.tests.factories.PeriodActivityFactory.create", "bluebottle.segments.tests.factories.SegmentTypeFactory.create", "bluebottle.test.factory_models.accounts.BlueBottleUserFactory", "bluebottle.segments.tests.factories.Segm...
[((481, 519), 'bluebottle.segments.tests.factories.SegmentTypeFactory.create', 'SegmentTypeFactory.create', ([], {'name': '"""Team"""'}), "(name='Team')\n", (506, 519), False, 'from bluebottle.segments.tests.factories import SegmentFactory, SegmentTypeFactory\n'), ((540, 610), 'bluebottle.segments.tests.factories.Segme...
import pytest # from django.test import Client from django.urls import reverse from pypro.django_assertions import assert_contains @pytest.fixture def resp(client, db): response = client.get(reverse('base:home')) return response def test_status_code(resp): assert resp.status_code == 200 def test_titl...
[ "pypro.django_assertions.assert_contains", "django.urls.reverse" ]
[((333, 390), 'pypro.django_assertions.assert_contains', 'assert_contains', (['resp', '"""<title>Python Pro - Home</title>"""'], {}), "(resp, '<title>Python Pro - Home</title>')\n", (348, 390), False, 'from pypro.django_assertions import assert_contains\n'), ((527, 573), 'pypro.django_assertions.assert_contains', 'asse...
""" Module for shapefile resampling methods. This code was originailly developed by <NAME>. (https://github.com/basaks) See `uncoverml.scripts.shiftmap_cli` for a resampling CLI. """ import tempfile import os from os.path import abspath, exists, splitext from os import remove import logging import geopandas as gpd im...
[ "logging.getLogger", "numpy.ones", "numpy.unique", "geopandas.read_file", "pandas.core.reshape.tile._bins_to_cuts", "numpy.max", "geopandas.GeoDataFrame", "numpy.linspace", "shapely.geometry.Polygon", "numpy.min", "pandas.concat", "numpy.random.RandomState", "numpy.random.shuffle" ]
[((603, 630), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (620, 630), False, 'import logging\n'), ((3840, 3932), 'pandas.core.reshape.tile._bins_to_cuts', 'pd.core.reshape.tile._bins_to_cuts', (['target', 'bin_edges'], {'labels': '(False)', 'include_lowest': '(True)'}), '(target, bin_e...
from sorted_nearest import makewindows from sorted_nearest import maketiles import numpy as np def _windows(df, kwargs): window_size = kwargs["window_size"] idxs, starts, ends = makewindows(df.index.values, df.Start.values, df.End.values, window_size) df = df.reind...
[ "numpy.maximum", "sorted_nearest.makewindows", "numpy.minimum", "sorted_nearest.maketiles" ]
[((191, 264), 'sorted_nearest.makewindows', 'makewindows', (['df.index.values', 'df.Start.values', 'df.End.values', 'window_size'], {}), '(df.index.values, df.Start.values, df.End.values, window_size)\n', (202, 264), False, 'from sorted_nearest import makewindows\n'), ((852, 923), 'sorted_nearest.maketiles', 'maketiles...
#!/usr/bin/env python # -*- coding: utf8 -*- """ Burp-UI is a web-ui for burp backup written in python with Flask and jQuery/Bootstrap .. module:: burpui.__main__ :platform: Unix :synopsis: Burp-UI main module. .. moduleauthor:: Ziirish <<EMAIL>> """ import os import sys from argparse import ArgumentParser, ...
[ "trio.run", "argparse.ArgumentParser", "burpui.utils.lookup_file", "os.path.join", "burpui.engines.monitor.MonitorPool", "os.path.realpath", "os.chdir", "os.getcwd", "os.path.isdir", "os.path.isfile", "sys.exit", "os.execvpe", "burpui.engines.agent.BUIAgent" ]
[((354, 380), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (370, 380), False, 'import os\n'), ((450, 474), 'os.path.join', 'os.path.join', (['ROOT', '""".."""'], {}), "(ROOT, '..')\n", (462, 474), False, 'import os\n'), ((589, 615), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'prog...
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from collections import Counter from maskrcnn_benchmark.layers.misc import Conv2d from maskrcnn_benchmark.layers import FrozenBatchNorm2d class h_sigmoid(nn.Module): def __init__(self, inplace=True): super(h_sigmoid, se...
[ "torch.nn.ReLU", "torch.nn.Sequential", "maskrcnn_benchmark.layers.misc.Conv2d", "torch.nn.functional.avg_pool2d", "torch.nn.functional.relu6", "collections.Counter", "torch.nn.Conv2d", "numpy.array", "torch.nn.Linear", "maskrcnn_benchmark.layers.FrozenBatchNorm2d", "torch.nn.ReLU6" ]
[((3386, 3408), 'torch.nn.ReLU6', 'nn.ReLU6', ([], {'inplace': '(True)'}), '(inplace=True)\n', (3394, 3408), True, 'import torch.nn as nn\n'), ((4489, 4505), 'collections.Counter', 'Counter', (['indices'], {}), '(indices)\n', (4496, 4505), False, 'from collections import Counter\n'), ((408, 438), 'torch.nn.functional.r...
import unittest from textwrap import dedent from markdown import markdown class TrulySaneListTest(unittest.TestCase): def test_simple(self): raw = ''' - Zero - One - Two ''' expected = '<ul>\n<li>Zero</li>\n</ul>\n<ul>\n<li>One</li>\n<li>Two</li>\n</ul>' ...
[ "unittest.main", "textwrap.dedent" ]
[((5019, 5034), 'unittest.main', 'unittest.main', ([], {}), '()\n', (5032, 5034), False, 'import unittest\n'), ((345, 356), 'textwrap.dedent', 'dedent', (['raw'], {}), '(raw)\n', (351, 356), False, 'from textwrap import dedent\n'), ((1088, 1099), 'textwrap.dedent', 'dedent', (['raw'], {}), '(raw)\n', (1094, 1099), Fals...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import fvcore.nn.weight_init as weight_init import torch from detectron2.layers import Conv2d, ConvTranspose2d, get_norm from torch import nn from torch.nn import functional as F ## from shapenet.modeling.models.encoder_modified import Encoder #from...
[ "shapenet.utils.checkpoint.clean_state_dict", "shapenet.modeling.models.merger.Merger", "shapenet.modeling.models.encoder_modified.Encoder", "torch.load", "shapenet.modeling.models.decoder.Decoder" ]
[((1076, 1088), 'shapenet.modeling.models.encoder_modified.Encoder', 'Encoder', (['cfg'], {}), '(cfg)\n', (1083, 1088), False, 'from shapenet.modeling.models.encoder_modified import Encoder\n'), ((1112, 1124), 'shapenet.modeling.models.decoder.Decoder', 'Decoder', (['cfg'], {}), '(cfg)\n', (1119, 1124), False, 'from sh...
# Copyright 2014 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 ...
[ "logging.warn", "io.BytesIO", "functools.wraps" ]
[((5302, 5323), 'functools.wraps', 'functools.wraps', (['func'], {}), '(func)\n', (5317, 5323), False, 'import functools\n'), ((5808, 5872), 'logging.warn', 'logging.warn', (["('SECURITY : fetching non-HTTPS url %s' % arg_value)"], {}), "('SECURITY : fetching non-HTTPS url %s' % arg_value)\n", (5820, 5872), False, 'imp...
""" most of dj-request-correlation is django MIDDLEWARE classes we use "new" (its been this way for a looong time) style MIDDLEWARE """ import uuid import logging from typing import Callable from django.conf import settings from django.http.request import HttpRequest from django.http.response import HttpResponse fr...
[ "logging.getLogger" ]
[((2422, 2465), 'logging.getLogger', 'logging.getLogger', (['"""dj_request_correlation"""'], {}), "('dj_request_correlation')\n", (2439, 2465), False, 'import logging\n'), ((2485, 2538), 'logging.getLogger', 'logging.getLogger', (['"""dj_request_correlation.canonical"""'], {}), "('dj_request_correlation.canonical')\n",...
from ..util.general import parse_date, unprepare_path from ..util.xmlhelp import RV_XML_VARNAME from os import path import xml.etree.ElementTree as Xml class CCLI: def __init__(self, values): self.number = values.get("CCLISongNumber") self.artist = values.get("CCLIArtistCredits") self.au...
[ "os.path.splitext", "xml.etree.ElementTree.parse" ]
[((796, 819), 'os.path.splitext', 'path.splitext', (['doc_path'], {}), '(doc_path)\n', (809, 819), False, 'from os import path\n'), ((1159, 1179), 'xml.etree.ElementTree.parse', 'Xml.parse', (['self.path'], {}), '(self.path)\n', (1168, 1179), True, 'import xml.etree.ElementTree as Xml\n')]
# -*- coding: utf-8 -*- """ Test the QgsFileDownloader class Run test with: LC_ALL=en_US.UTF-8 ctest -V -R PyQgsFileDownloader .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either versio...
[ "os.path.getsize", "qgis.PyQt.QtCore.QEventLoop", "os.environ.get", "qgis.testing.start_app", "qgis.testing.unittest.main", "tempfile.mktemp", "os.path.isfile", "functools.partial", "qgis.PyQt.QtCore.QUrl" ]
[((799, 810), 'qgis.testing.start_app', 'start_app', ([], {}), '()\n', (808, 810), False, 'from qgis.testing import start_app, unittest\n'), ((6647, 6662), 'qgis.testing.unittest.main', 'unittest.main', ([], {}), '()\n', (6660, 6662), False, 'from qgis.testing import start_app, unittest\n'), ((1207, 1219), 'qgis.PyQt.Q...
import os import sys import unittest import numpy from os.path import join as pjn import QENSmodels # resolve path to reference_data this_module_path = sys.modules[__name__].__file__ data_dir = pjn(os.path.dirname(this_module_path), 'reference_data') class TestChudleyElliotDiffusion(unittest.TestCase): """ Test...
[ "numpy.testing.assert_array_almost_equal", "numpy.ones", "QENSmodels.hwhmChudleyElliotDiffusion", "os.path.join", "os.path.dirname", "numpy.zeros", "unittest.main", "numpy.arange", "QENSmodels.sqwChudleyElliotDiffusion" ]
[((200, 233), 'os.path.dirname', 'os.path.dirname', (['this_module_path'], {}), '(this_module_path)\n', (215, 233), False, 'import os\n'), ((4830, 4845), 'unittest.main', 'unittest.main', ([], {}), '()\n', (4843, 4845), False, 'import unittest\n'), ((886, 928), 'QENSmodels.hwhmChudleyElliotDiffusion', 'QENSmodels.hwhmC...
# -*- coding: utf-8 -*- """Tests using pytest_resilient_circuits""" from __future__ import print_function from resilient_circuits.util import get_function_definition from resilient_circuits import SubmitTestFunction, FunctionResult import pytest from mock import Mock from test_helper import get_mock_config_data from f...
[ "resilient_circuits.util.get_function_definition", "pytest.wait_for", "resilient_circuits.SubmitTestFunction", "mock.Mock", "pytest.mark.parametrize", "pytest.raises", "test_helper.get_mock_config_data" ]
[((490, 512), 'test_helper.get_mock_config_data', 'get_mock_config_data', ([], {}), '()\n', (510, 512), False, 'from test_helper import get_mock_config_data\n'), ((813, 887), 'resilient_circuits.SubmitTestFunction', 'SubmitTestFunction', (['"""fn_cs_falcon_get_devices_ioc_ran_on"""', 'function_params'], {}), "('fn_cs_f...
# This file is part of the clacks framework. # # http://clacks-project.org # # Copyright: # (C) 2010-2012 GONICUS GmbH, Germany, http://www.gonicus.de # # License: # GPL-2: http://www.gnu.org/licenses/gpl-2.0.html # # See the LICENSE file in the project's top-level directory for details. from clacks.agent.objects.f...
[ "datetime.datetime.strptime", "datetime.datetime.fromtimestamp", "clacks.agent.objects.ObjectFactory" ]
[((2250, 2265), 'clacks.agent.objects.ObjectFactory', 'ObjectFactory', ([], {}), '()\n', (2263, 2265), False, 'from clacks.agent.objects import ObjectFactory\n'), ((2643, 2658), 'clacks.agent.objects.ObjectFactory', 'ObjectFactory', ([], {}), '()\n', (2656, 2658), False, 'from clacks.agent.objects import ObjectFactory\...
""" Create normalized data tables for sap measurement data. author: <NAME> date: 2021-02-19 Usage: src/create_meas_tables.py """ import numpy as np import pandas as pd import copy import os def main(): processed_path = os.path.join("data", "processed", "stinson2019") if not os.path.exists(os.path.join(pr...
[ "pandas.DatetimeIndex", "os.path.join", "pandas.to_datetime" ]
[((229, 277), 'os.path.join', 'os.path.join', (['"""data"""', '"""processed"""', '"""stinson2019"""'], {}), "('data', 'processed', 'stinson2019')\n", (241, 277), False, 'import os\n'), ((2961, 2996), 'pandas.to_datetime', 'pd.to_datetime', (["df['dates']['date']"], {}), "(df['dates']['date'])\n", (2975, 2996), True, 'i...
from rest_framework.test import APITestCase, APIClient from src.utils.tests_utils import create_test_log class TestViews(APITestCase): def test_get_log_list(self): create_test_log() client = APIClient() response = client.get('/logs/') self.assertEqual(1, len(response.data)) d...
[ "src.utils.tests_utils.create_test_log", "rest_framework.test.APIClient" ]
[((179, 196), 'src.utils.tests_utils.create_test_log', 'create_test_log', ([], {}), '()\n', (194, 196), False, 'from src.utils.tests_utils import create_test_log\n'), ((214, 225), 'rest_framework.test.APIClient', 'APIClient', ([], {}), '()\n', (223, 225), False, 'from rest_framework.test import APITestCase, APIClient\n...
# Copyright Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompan...
[ "sagemaker.cli.compatibility.v2.modifiers.parsing.arg_value" ]
[((4178, 4206), 'sagemaker.cli.compatibility.v2.modifiers.parsing.arg_value', 'parsing.arg_value', (['node', 'arg'], {}), '(node, arg)\n', (4195, 4206), False, 'from sagemaker.cli.compatibility.v2.modifiers import parsing\n')]
# Copyright 2016 Mellanox Technologies, Ltd # 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 # # Unles...
[ "sqlalchemy.String", "sqlalchemy.func.now", "sqlalchemy.Column", "sqlalchemy.Enum" ]
[((1058, 1091), 'sqlalchemy.Column', 'sa.Column', (['sa.Text'], {'nullable': '(True)'}), '(sa.Text, nullable=True)\n', (1067, 1091), True, 'import sqlalchemy as sa\n'), ((1421, 1453), 'sqlalchemy.Column', 'sa.Column', (['sa.Integer'], {'default': '(0)'}), '(sa.Integer, default=0)\n', (1430, 1453), True, 'import sqlalch...
import matplotlib from collections import defaultdict, OrderedDict, Counter from plots.DotSetPlot import DotSetPlot processToTitle = { "targetMirsECA": "EC activation and inflammation", "targetMirsMonocyte": "Monocyte diff. & Macrophage act.", "targetMirsFCF": "Foam cell formation", "targetMi...
[ "collections.defaultdict" ]
[((1472, 1488), 'collections.defaultdict', 'defaultdict', (['set'], {}), '(set)\n', (1483, 1488), False, 'from collections import defaultdict, OrderedDict, Counter\n'), ((1506, 1522), 'collections.defaultdict', 'defaultdict', (['set'], {}), '(set)\n', (1517, 1522), False, 'from collections import defaultdict, OrderedDi...
from app import create_app app = create_app() @app.cli.command() def deploy(): pass
[ "app.create_app" ]
[((34, 46), 'app.create_app', 'create_app', ([], {}), '()\n', (44, 46), False, 'from app import create_app\n')]
import logging import textwrap # get_log_tree is via # https://github.com/brandon-rhodes/logging_tree/blob/b2d7cee13c0fe0a2601b5a2b705ff59375978a2f/logging_tree/nodes.py # which is BSD licensed def get_log_tree(): """Return a tree of tuples representing the logger layout. Each tuple looks like ``('logger-na...
[ "logging.root.manager.loggerDict.items" ]
[((537, 576), 'logging.root.manager.loggerDict.items', 'logging.root.manager.loggerDict.items', ([], {}), '()\n', (574, 576), False, 'import logging\n')]
""" Copyright 2016 <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, software distrib...
[ "re.findall" ]
[((853, 947), 're.findall', 're.findall', (['"""([1-9][0-9])( |\\\\-)(years old|years of age|year old|year\\\\-old)"""', 'description'], {}), "('([1-9][0-9])( |\\\\-)(years old|years of age|year old|year\\\\-old)',\n description)\n", (863, 947), False, 'import re\n'), ((999, 1050), 're.findall', 're.findall', (['"""...
import os from fastapi import APIRouter, HTTPException, status, Depends from fastapi.responses import JSONResponse import schemas from starlette.config import Config from starlette.requests import Request from starlette.responses import HTMLResponse, RedirectResponse from authlib.integrations.starlette_client import OA...
[ "starlette.config.Config", "db.crud.get_user_by_email", "fastapi.HTTPException", "db.crud.create_user", "authlib.integrations.starlette_client.OAuth", "os.environ.get", "fastapi.APIRouter", "datetime.timedelta", "fastapi.Depends", "schemas.User" ]
[((498, 509), 'fastapi.APIRouter', 'APIRouter', ([], {}), '()\n', (507, 509), False, 'from fastapi import APIRouter, HTTPException, status, Depends\n'), ((903, 930), 'starlette.config.Config', 'Config', ([], {'environ': 'config_data'}), '(environ=config_data)\n', (909, 930), False, 'from starlette.config import Config\...
# 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ "time.sleep" ]
[((1348, 1361), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (1358, 1361), False, 'import time\n')]
# -*- coding: utf-8 -*- """ Copyright [2009-2018] EMBL-European Bioinformatics Institute 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...
[ "rnacentral_pipeline.databases.r2dt.models.crw.parse", "pytest.mark.xfail", "pytest.mark.parametrize", "rnacentral_pipeline.rnacentral.traveler.data.ModelInfo", "pytest.fixture" ]
[((820, 836), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (834, 836), False, 'import pytest\n'), ((959, 1008), 'pytest.mark.xfail', 'pytest.mark.xfail', ([], {'reason': '"""Cannot extract length"""'}), "(reason='Cannot extract length')\n", (976, 1008), False, 'import pytest\n'), ((1010, 1087), 'pytest.mark.pa...
from django.conf.urls import include, url from . import admin, custom_has_permission_admin, customadmin, views urlpatterns = [ url(r'^test_admin/admin/doc/', include('django.contrib.admindocs.urls')), url(r'^test_admin/admin/secure-view/$', views.secure_view, name='secure_view'), url(r'^test_admin/admin/s...
[ "django.conf.urls.include", "django.conf.urls.url" ]
[((211, 288), 'django.conf.urls.url', 'url', (['"""^test_admin/admin/secure-view/$"""', 'views.secure_view'], {'name': '"""secure_view"""'}), "('^test_admin/admin/secure-view/$', views.secure_view, name='secure_view')\n", (214, 288), False, 'from django.conf.urls import include, url\n'), ((295, 380), 'django.conf.urls....
from gym.wrappers import TimeLimit import numpy import numpy as np import pytest from plangym.atari import ale_to_ram, AtariEnvironment from tests import SKIP_ATARI_TESTS if SKIP_ATARI_TESTS: pytest.skip("Atari not installed, skipping", allow_module_level=True) from tests.api_tests import batch_size, display, Te...
[ "pytest.fixture", "pytest.skip", "plangym.atari.ale_to_ram", "plangym.atari.AtariEnvironment" ]
[((952, 1002), 'pytest.fixture', 'pytest.fixture', ([], {'params': 'environments', 'scope': '"""class"""'}), "(params=environments, scope='class')\n", (966, 1002), False, 'import pytest\n'), ((199, 268), 'pytest.skip', 'pytest.skip', (['"""Atari not installed, skipping"""'], {'allow_module_level': '(True)'}), "('Atari ...
from KeepaliveRequest import * #from Tkinter import * from PIL import Image import io class SimpleClient(): def __init__(self): ip = "127.0.0.1" port = 9001 connectionInfo = pyndn.transport.udp_transport.UdpTransport.ConnectionInfo(ip, port) transport = pyndn.transport.udp_transport...
[ "io.BytesIO" ]
[((1843, 1858), 'io.BytesIO', 'io.BytesIO', (['buf'], {}), '(buf)\n', (1853, 1858), False, 'import io\n')]
import sys,os from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtCore import Qt import sqlite3 import style from PIL import Image #used for uploading image con=sqlite3.connect("products.db") cur=con.cursor() defaultImg="store.png" class AddMember(QWidget): def __init__(self): ...
[ "style.addMemberBottomFrame", "style.addMemberTopFrame", "sqlite3.connect" ]
[((189, 219), 'sqlite3.connect', 'sqlite3.connect', (['"""products.db"""'], {}), "('products.db')\n", (204, 219), False, 'import sqlite3\n'), ((1640, 1665), 'style.addMemberTopFrame', 'style.addMemberTopFrame', ([], {}), '()\n', (1663, 1665), False, 'import style\n'), ((1742, 1770), 'style.addMemberBottomFrame', 'style...
import requests import json import time import random from kafka import KafkaProducer from kafka import KafkaConsumer # def get_sensor_data(topic,out_topic): # consumer = KafkaConsumer(topic,bootstrap_servers=['localhost:9092'],auto_offset_reset = "latest") # producer = KafkaProducer(bootstrap_servers=['localhost:90...
[ "kafka.KafkaProducer", "json.load", "requests.post", "time.sleep" ]
[((870, 921), 'kafka.KafkaProducer', 'KafkaProducer', ([], {'bootstrap_servers': "['127.0.0.1:9092']"}), "(bootstrap_servers=['127.0.0.1:9092'])\n", (883, 921), False, 'from kafka import KafkaProducer\n'), ((1403, 1418), 'json.load', 'json.load', (['file'], {}), '(file)\n', (1412, 1418), False, 'import json\n'), ((1598...
# -*- encoding: utf-8 -*- ''' @Filename : run_forecast.py @Datetime : 2020/09/27 18:35:44 @Author : Joe-Bu @version : 1.0 ''' import sys sys.path.append("../") from utils.ConfigParseUtils import ConfigParser from src.DataForecast.run import forecast_arima from src.DataForecast.run import forecast_fbpr...
[ "src.DataForecast.run.forecast_gru", "src.DataForecast.run.forecast_lstm", "utils.ConfigParseUtils.ConfigParser", "sys.exit", "src.DataForecast.run.forecast_fbprophet", "src.DataForecast.run.forecast_arima", "sys.path.append" ]
[((153, 175), 'sys.path.append', 'sys.path.append', (['"""../"""'], {}), "('../')\n", (168, 175), False, 'import sys\n'), ((482, 496), 'utils.ConfigParseUtils.ConfigParser', 'ConfigParser', ([], {}), '()\n', (494, 496), False, 'from utils.ConfigParseUtils import ConfigParser\n'), ((629, 708), 'src.DataForecast.run.fore...
from enum import Enum, auto class EquipmentSlots(Enum): MAIN_HAND = auto() OFF_HAND = auto()
[ "enum.auto" ]
[((74, 80), 'enum.auto', 'auto', ([], {}), '()\n', (78, 80), False, 'from enum import Enum, auto\n'), ((96, 102), 'enum.auto', 'auto', ([], {}), '()\n', (100, 102), False, 'from enum import Enum, auto\n')]
# %% # Update link drive shedule and links files for MOVES analyses # This is an extra step because of grade calculation error we had # <NAME>, Ph.D. Candidate # %% # Load required libraries import pandas as pd import numpy as np from os import walk # %% # Load data from Excel to a pandas dataframe def load_from_Exc...
[ "pandas.ExcelWriter", "os.walk", "pandas.read_excel" ]
[((405, 457), 'pandas.read_excel', 'pd.read_excel', (['input_path'], {'sheet_name': 'None', 'header': '(0)'}), '(input_path, sheet_name=None, header=0)\n', (418, 457), True, 'import pandas as pd\n'), ((1143, 1158), 'os.walk', 'walk', (['directory'], {}), '(directory)\n', (1147, 1158), False, 'from os import walk\n'), (...
""" https://github.com/google/microscopeimagequality/blob/main/microscopeimagequality/prediction.py """ import logging import sys import numpy import tensorflow import cytokit.miq.constants import cytokit.miq.evaluation # logging.basicConfig(stream=sys.stdout, level=logging.DEBUG) _SPLIT_NAME = 'test' _TFRECORD_F...
[ "logging.getLogger", "tensorflow.Graph", "tensorflow.shape", "numpy.ones", "tensorflow.placeholder", "tensorflow.Session", "tensorflow.train.Saver", "numpy.zeros", "tensorflow.constant", "numpy.expand_dims", "tensorflow.reshape", "tensorflow.expand_dims", "logging.info", "tensorflow.zeros"...
[((376, 403), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (393, 403), False, 'import logging\n'), ((6530, 6632), 'numpy.zeros', 'numpy.zeros', (['(patches_per_column * patch_width, patches_per_row * patch_width)'], {'dtype': 'numpy.uint16'}), '((patches_per_column * patch_width, patche...
from Frame.Render import Render from Constants import * class GameWarning: def __init__(self, timeOut, text, window): self.timeOut = timeOut self.showTime = 0 self.text = text self.window = window self.showing = False self.active = False self.alpha = 1 ...
[ "Frame.Render.Render" ]
[((340, 359), 'Frame.Render.Render', 'Render', (['self.window'], {}), '(self.window)\n', (346, 359), False, 'from Frame.Render import Render\n')]
# This file is Copyright 2021 Volatility Foundation and licensed under the Volatility Software License 1.0 # which is available at https://www.volatilityfoundation.org/license/vsl-v1.0 # import logging from typing import List, Iterator, Tuple, Generator from abc import ABC, abstractmethod from enum import Enum from v...
[ "logging.getLogger", "volatility3.framework.configuration.requirements.TranslationLayerRequirement", "volatility3.framework.objects.utility.array_to_string", "volatility3.framework.configuration.requirements.SymbolTableRequirement", "volatility3.framework.class_subclasses", "volatility3.framework.contexts...
[((584, 611), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (601, 611), False, 'import logging\n'), ((2342, 2405), 'volatility3.framework.contexts.Module', 'contexts.Module', (['context', 'symbol_table_name', 'self.layer_name', '(0)'], {}), '(context, symbol_table_name, self.layer_name, ...
#!/usr/bin/python # # Copyright (c) 2017 Ensoft Ltd, 2010 <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 without restriction, including without limitation the rights # to use, copy,...
[ "backend.addNote" ]
[((1807, 1860), 'backend.addNote', 'addNote', (['newid', '"""N-comments"""', '"""Summary"""', '_fullSummary'], {}), "(newid, 'N-comments', 'Summary', _fullSummary)\n", (1814, 1860), False, 'from backend import addNote\n')]
import requests from .BITBOX import REST_URL class Transaction: def details(txid): if type(txid) is str: response = requests.get(REST_URL+"transaction/details/"+txid) return response.json() elif type(txid) is list: response = requests.post(REST_URL+"transaction/d...
[ "requests.post", "requests.get" ]
[((141, 195), 'requests.get', 'requests.get', (["(REST_URL + 'transaction/details/' + txid)"], {}), "(REST_URL + 'transaction/details/' + txid)\n", (153, 195), False, 'import requests\n'), ((283, 352), 'requests.post', 'requests.post', (["(REST_URL + 'transaction/details')"], {'data': "{'txids': txid}"}), "(REST_URL + ...
# Tensorflow is not supported on Python 3.8. I used Python 3.7 to write this program. # Packages to pip install: tensorflow (using 2.1.0), numpy, pillow, tkinter import numpy as np import tensorflow as tf from PIL import Image from tensorflow.keras.models import load_model, model_from_json from tkinter.filedial...
[ "numpy.array", "PIL.Image.open", "tensorflow.keras.models.load_model", "tkinter.filedialog.askopenfilename" ]
[((459, 475), 'tensorflow.keras.models.load_model', 'load_model', (['root'], {}), '(root)\n', (469, 475), False, 'from tensorflow.keras.models import load_model, model_from_json\n'), ((707, 718), 'numpy.array', 'np.array', (['x'], {}), '(x)\n', (715, 718), True, 'import numpy as np\n'), ((745, 762), 'tkinter.filedialog...
import os import pytrec_eval import numpy as np from capreolus.utils.loginit import get_logger from capreolus.searcher import Searcher logger = get_logger(__name__) VALID_METRICS = {"P", "map", "map_cut", "ndcg_cut", "Rprec", "recip_rank", "set_recall"} CUT_POINTS = [5, 10, 15, 20, 30, 100, 200, 500, 1000] def _v...
[ "os.listdir", "capreolus.utils.loginit.get_logger", "os.path.join", "numpy.array", "capreolus.searcher.Searcher.load_trec_run" ]
[((147, 167), 'capreolus.utils.loginit.get_logger', 'get_logger', (['__name__'], {}), '(__name__)\n', (157, 167), False, 'from capreolus.utils.loginit import get_logger\n'), ((2958, 2989), 'capreolus.searcher.Searcher.load_trec_run', 'Searcher.load_trec_run', (['runfile'], {}), '(runfile)\n', (2980, 2989), False, 'from...
# Copyright 2017 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
[ "re.split", "re.match", "re.search" ]
[((3529, 3571), 're.match', 're.match', (['"""^\\\\s*0Trip\\\\s*number"""', 'lines[i]'], {}), "('^\\\\s*0Trip\\\\s*number', lines[i])\n", (3537, 3571), False, 'import re\n'), ((7173, 7202), 're.match', 're.match', (['"""^1 time"""', 'lines[i]'], {}), "('^1 time', lines[i])\n", (7181, 7202), False, 'import re\n'), ((844...
import os from .http import MessageStore, factory_decorator from .alarm_manager import AlarmManager from mopidy import config, ext __version__ = '0.1.7' class Extension(ext.Extension): dist_name = 'Mopidy-AlarmClock' ext_name = 'alarmclock' version = __version__ def get_default_config(self): ...
[ "mopidy.config.String", "mopidy.config.Boolean", "mopidy.config.read", "os.path.dirname", "mopidy.config.Integer" ]
[((405, 427), 'mopidy.config.read', 'config.read', (['conf_file'], {}), '(conf_file)\n', (416, 427), False, 'from mopidy import config, ext\n'), ((551, 566), 'mopidy.config.String', 'config.String', ([], {}), '()\n', (564, 566), False, 'from mopidy import config, ext\n'), ((600, 628), 'mopidy.config.String', 'config.St...
"""Functions related to reading and writing data.""" import logging import io # import argparse from collections import Counter from pathlib import Path from sys import path as sys_path import requests from . import psize from . import inputgen from . import cif from . import pdb from . import definitions as defns fro...
[ "logging.getLogger", "logging.StreamHandler", "pathlib.Path", "pathlib.Path.cwd", "logging.Formatter", "requests.get", "collections.Counter", "io.StringIO" ]
[((522, 549), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (539, 549), False, 'import logging\n'), ((2584, 2597), 'io.StringIO', 'io.StringIO', ([], {}), '()\n', (2595, 2597), False, 'import io\n'), ((12961, 12971), 'pathlib.Path', 'Path', (['name'], {}), '(name)\n', (12965, 12971), Fal...
import os import logging import utils import yaml import json import base64 from wrapper import * logger = logging.getLogger(__name__) # noinspection PyUnusedLocal def get_public_templates(url='', org='', account='', key='', timeout=60, **kwargs): return get(utils.build_api_url(url, org, account, ...
[ "logging.getLogger", "utils.read_file_content", "utils.build_api_url", "base64.b64encode", "os.path.join", "json.dumps", "os.path.basename" ]
[((108, 135), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (125, 135), False, 'import logging\n'), ((2591, 2620), 'utils.read_file_content', 'utils.read_file_content', (['path'], {}), '(path)\n', (2614, 2620), False, 'import utils\n'), ((3286, 3315), 'utils.read_file_content', 'utils.re...
from qcodes.instrument.base import Instrument from qcodes.utils import validators as vals from qcodes.instrument.parameter import ManualParameter import numpy as np class SimControlCZ_v2(Instrument): """ Noise and other parameters for cz_superoperator_simulation_v2 Created for VCZ simulation """ ...
[ "qcodes.utils.validators.Numbers", "qcodes.utils.validators.Callable", "qcodes.utils.validators.Strings", "qcodes.utils.validators.Arrays", "numpy.array", "qcodes.utils.validators.Bool" ]
[((630, 644), 'qcodes.utils.validators.Numbers', 'vals.Numbers', ([], {}), '()\n', (642, 644), True, 'from qcodes.utils import validators as vals\n'), ((896, 910), 'qcodes.utils.validators.Numbers', 'vals.Numbers', ([], {}), '()\n', (908, 910), True, 'from qcodes.utils import validators as vals\n'), ((1162, 1176), 'qco...