code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
#!/usr/bin/env python2 import re from sys import stdin, stdout def combiner(): """ Pairs combiner function Reads pairs of words separated by a space and a count and aggregates counts """ # Empty dict for out output output = dict() # Precompiled regex to match our input parse = re.comp...
[ "sys.stdin.readline", "sys.stdout.write", "re.compile" ]
[((313, 348), 're.compile', 're.compile', (['"""(\\\\w+) (\\\\w+): (\\\\d+)"""'], {}), "('(\\\\w+) (\\\\w+): (\\\\d+)')\n", (323, 348), False, 'import re\n'), ((357, 373), 'sys.stdin.readline', 'stdin.readline', ([], {}), '()\n', (371, 373), False, 'from sys import stdin, stdout\n'), ((807, 823), 'sys.stdin.readline', ...
import numpy as np import operator from random import choice from neat.activations import identity_activation from neat.aggregations import sum_aggregation class StateMachineNetwork(object): """ This class represents a working state machine which can actually run on robot or in simulation. """ def __init__(s...
[ "numpy.array", "numpy.multiply", "random.choice" ]
[((4246, 4262), 'numpy.array', 'np.array', (['biases'], {}), '(biases)\n', (4254, 4262), True, 'import numpy as np\n'), ((4426, 4443), 'numpy.array', 'np.array', (['weights'], {}), '(weights)\n', (4434, 4443), True, 'import numpy as np\n'), ((4710, 4726), 'numpy.array', 'np.array', (['inputs'], {}), '(inputs)\n', (4718...
import json import warnings from enum import Enum from typing import Any, List, Tuple, Union import numpy as np import torch from mmhuman3d.core.cameras.cameras import PerspectiveCameras from mmhuman3d.core.conventions.cameras.convert_convention import ( convert_camera_matrix, convert_K_3x3_to_4x4, conver...
[ "mmhuman3d.core.conventions.cameras.convert_convention.convert_K_4x4_to_3x3", "json.dumps", "torch.from_numpy", "numpy.array", "numpy.dot", "numpy.linalg.inv", "mmhuman3d.core.conventions.cameras.convert_convention.convert_K_3x3_to_4x4", "numpy.expand_dims", "json.load", "warnings.warn", "json.d...
[((3065, 3086), 'numpy.array', 'np.array', (['dist_coeffs'], {}), '(dist_coeffs)\n', (3073, 3086), True, 'import numpy as np\n'), ((8160, 8181), 'json.dumps', 'json.dumps', (['dump_dict'], {}), '(dump_dict)\n', (8170, 8181), False, 'import json\n'), ((14762, 14997), 'mmhuman3d.core.conventions.cameras.convert_conventio...
from __future__ import absolute_import from __future__ import print_function from . import main from . import cli import os import sys from subprocess import Popen, PIPE SNORKEL_DIR=os.path.expanduser("~/.local/share/snorkel") def shared_mode(): print("SWITCHING TO SHARED DIR", SNORKEL_DIR, file=sys.stderr) tr...
[ "os.chdir", "subprocess.Popen", "os.path.expanduser", "os.makedirs" ]
[((183, 227), 'os.path.expanduser', 'os.path.expanduser', (['"""~/.local/share/snorkel"""'], {}), "('~/.local/share/snorkel')\n", (201, 227), False, 'import os\n'), ((385, 406), 'os.chdir', 'os.chdir', (['SNORKEL_DIR'], {}), '(SNORKEL_DIR)\n', (393, 406), False, 'import os\n'), ((683, 736), 'subprocess.Popen', 'Popen',...
from hdx.utilities.easy_logging import setup_logging from hdx.api.configuration import Configuration from hdx.data.dataset import Dataset from hdx.data.resource import Resource # setup_logging(console_log_level="DEBUG", log_file="output.log", file_log_level="INFO") setup_logging() # No HDX configuration parameter and ...
[ "hdx.data.resource.Resource", "hdx.utilities.easy_logging.setup_logging", "hdx.api.configuration.Configuration.create", "hdx.data.dataset.Dataset.read_from_hdx" ]
[((267, 282), 'hdx.utilities.easy_logging.setup_logging', 'setup_logging', ([], {}), '()\n', (280, 282), False, 'from hdx.utilities.easy_logging import setup_logging\n'), ((423, 533), 'hdx.api.configuration.Configuration.create', 'Configuration.create', ([], {'hdx_site': '"""prod"""', 'user_agent': '"""my_example"""', ...
# Copyright 2013 OpenStack Foundation # Copyright 2013 Rackspace Hosting # Copyright 2013 Hewlett-Packard Development Company, L.P. # 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 co...
[ "trove.common.profile.setup_profiler", "inspect.stack", "trove.rpc.get_server", "oslo_service.loopingcall.FixedIntervalLoopingCall", "trove.common.i18n._", "oslo_utils.importutils.import_object", "oslo_log.log.getLogger", "osprofiler.profiler.trace_cls", "oslo_messaging.Target" ]
[((1161, 1188), 'oslo_log.log.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1178, 1188), True, 'from oslo_log import log as logging\n'), ((1647, 1681), 'oslo_utils.importutils.import_object', 'importutils.import_object', (['manager'], {}), '(manager)\n', (1672, 1681), False, 'from oslo_utils imp...
import requests, json ########## GET JWT TOKEN ########## auth = { 'identifier' : '<email or username>', 'password' : '<password>' } r = requests.post('http://<Server IP>:1337/auth/local', data=auth) print(r.json()) tokenAuth = r.json() print(tokenAuth['jwt']) token = 'Bearer ' + tokenAuth['jwt'] ########## CHECK...
[ "requests.post", "requests.get" ]
[((139, 201), 'requests.post', 'requests.post', (['"""http://<Server IP>:1337/auth/local"""'], {'data': 'auth'}), "('http://<Server IP>:1337/auth/local', data=auth)\n", (152, 201), False, 'import requests, json\n'), ((358, 454), 'requests.get', 'requests.get', (['"""http://<Server IP>:1337/restaurants/count"""'], {'hea...
from pyinaturalist.constants import PROJECT_ORDER_BY_PROPERTIES, JsonResponse, MultiInt from pyinaturalist.converters import convert_all_coordinates, convert_all_timestamps from pyinaturalist.docs import document_request_params from pyinaturalist.docs import templates as docs from pyinaturalist.pagination import add_pa...
[ "pyinaturalist.v1.get_v1", "pyinaturalist.pagination.add_paginate_all", "pyinaturalist.request_params.validate_multiple_choice_param", "pyinaturalist.docs.document_request_params", "pyinaturalist.converters.convert_all_coordinates", "pyinaturalist.converters.convert_all_timestamps" ]
[((442, 508), 'pyinaturalist.docs.document_request_params', 'document_request_params', (['[docs._projects_params, docs._pagination]'], {}), '([docs._projects_params, docs._pagination])\n', (465, 508), False, 'from pyinaturalist.docs import document_request_params\n'), ((510, 541), 'pyinaturalist.pagination.add_paginate...
import src.cstag as cstag import pytest def test_basic(): CSTAG = "cs:Z:=ACGT*ac+gg-cc=T" CIGAR = "5M2I2D1M" QUAL = "AA!!!!AA" assert cstag.mask(CSTAG, CIGAR, QUAL) == "cs:Z:=ACNN*an+ng-cc=T" def test_softclip(): CSTAG = "cs:Z:=ACGT*ac+gg-cc=T" CIGAR = "2S5M2I2D1M" QUAL = "AAAA!!!!AA" ...
[ "pytest.raises", "src.cstag.mask" ]
[((152, 182), 'src.cstag.mask', 'cstag.mask', (['CSTAG', 'CIGAR', 'QUAL'], {}), '(CSTAG, CIGAR, QUAL)\n', (162, 182), True, 'import src.cstag as cstag\n'), ((329, 359), 'src.cstag.mask', 'cstag.mask', (['CSTAG', 'CIGAR', 'QUAL'], {}), '(CSTAG, CIGAR, QUAL)\n', (339, 359), True, 'import src.cstag as cstag\n'), ((497, 52...
""" [Isolation Centers](https://www.codechef.com/MAY20B/problems/CORUS) As a health expert, Vinay is keeping a close watch on the ongoing pandemic of coronavirus disease (COVID-19). He thought of a different situation where there are 26 types of viruses, named "aorona", "borona", "corona", …, "zorona". You are given a...
[ "collections.Counter" ]
[((2547, 2557), 'collections.Counter', 'Counter', (['S'], {}), '(S)\n', (2554, 2557), False, 'from collections import Counter\n')]
import logging import os import time from functools import reduce from typing import Dict from typing import List from typing import Set from typing import Tuple import pyinotify from kazoo.protocol.states import EventType from kazoo.recipe.watchers import ChildrenWatch from kazoo.recipe.watchers import DataWatch from...
[ "logging.getLogger", "paasta_tools.utils.list_all_instances_for_service", "os.listdir", "paasta_tools.mesos_maintenance.get_draining_hosts", "paasta_tools.deployd.common.get_service_instances_needing_update", "paasta_tools.marathon_tools.deformat_job_id", "paasta_tools.deployd.common.get_marathon_client...
[((2153, 2230), 'kazoo.recipe.watchers.ChildrenWatch', 'ChildrenWatch', (['self.zk', 'path'], {'func': 'self.process_folder_event', 'send_event': '(True)'}), '(self.zk, path, func=self.process_folder_event, send_event=True)\n', (2166, 2230), False, 'from kazoo.recipe.watchers import ChildrenWatch\n'), ((3247, 3318), 'k...
''' Created on May 6, 2018 @author: jana ''' import torch import torch.nn as nn import torch.nn.functional as F class DeepVS(nn.Module): ''' Implements DeepVS neural network architecture ''' def __init__(self, vocab_size, embedding_dim, cf, h, kc, kp): super(DeepVS, self).__init__() sel...
[ "torch.nn.ReLU", "torch.nn.Dropout", "torch.max", "torch.nn.functional.log_softmax", "torch.nn.Linear", "torch.nn.Embedding" ]
[((343, 382), 'torch.nn.Embedding', 'nn.Embedding', (['vocab_size', 'embedding_dim'], {}), '(vocab_size, embedding_dim)\n', (355, 382), True, 'import torch.nn as nn\n'), ((407, 458), 'torch.nn.Linear', 'nn.Linear', (['(((kc + kp) * 3 + kp) * embedding_dim)', 'cf'], {}), '(((kc + kp) * 3 + kp) * embedding_dim, cf)\n', (...
if __name__ == "__main__": import argparse from ocr.ocr_document import OCRProcessor parser = argparse.ArgumentParser( description="Python script to detect and extract documents." ) parser.add_argument( "-i", "--input-image", help="Image containing the document", ...
[ "ocr.ocr_document.OCRProcessor", "argparse.ArgumentParser" ]
[((108, 198), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Python script to detect and extract documents."""'}), "(description=\n 'Python script to detect and extract documents.')\n", (131, 198), False, 'import argparse\n'), ((464, 478), 'ocr.ocr_document.OCRProcessor', 'OCRProcesso...
from IPython.core.magic_arguments import magic_arguments, argument, parse_argstring from os import linesep from adlmagics.magics.adla.adla_magic_base import AdlaMagicBase from adlmagics.session_consts import session_adla_account, session_user, session_paging_numberperpage from adlmagics.exceptions import MagicArgument...
[ "adlmagics.exceptions.MagicArgumentError", "IPython.core.magic_arguments.argument", "IPython.core.magic_arguments.magic_arguments", "IPython.core.magic_arguments.parse_argstring" ]
[((599, 616), 'IPython.core.magic_arguments.magic_arguments', 'magic_arguments', ([], {}), '()\n', (614, 616), False, 'from IPython.core.magic_arguments import magic_arguments, argument, parse_argstring\n'), ((622, 691), 'IPython.core.magic_arguments.argument', 'argument', (['"""--account"""'], {'type': 'str', 'help': ...
import os import pandas as pd import logging from django.db import transaction from django.conf import settings from ..dataloader import loaddata from .. import models from wazimap_ng.general.services.permissions import assign_perms_to_group logger = logging.getLogger(__name__) @transaction.atomic def process_upl...
[ "logging.getLogger", "os.path.exists", "pandas.DataFrame", "os.makedirs" ]
[((255, 282), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (272, 282), False, 'import logging\n'), ((3100, 3124), 'pandas.DataFrame', 'pd.DataFrame', (['error_logs'], {}), '(error_logs)\n', (3112, 3124), True, 'import pandas as pd\n'), ((3515, 3541), 'pandas.DataFrame', 'pd.DataFrame', ...
# Copyright (c) 2018 NVIDIA Corporation from __future__ import absolute_import, division, print_function from __future__ import unicode_literals import abc import copy import six import tensorflow as tf from open_seq2seq.optimizers.mp_wrapper import mp_regularizer_wrapper from open_seq2seq.utils.utils import check_p...
[ "tensorflow.variable_scope", "six.add_metaclass", "open_seq2seq.optimizers.mp_wrapper.mp_regularizer_wrapper", "copy.deepcopy", "open_seq2seq.utils.utils.cast_types" ]
[((341, 371), 'six.add_metaclass', 'six.add_metaclass', (['abc.ABCMeta'], {}), '(abc.ABCMeta)\n', (358, 371), False, 'import six\n'), ((3046, 3067), 'copy.deepcopy', 'copy.deepcopy', (['params'], {}), '(params)\n', (3059, 3067), False, 'import copy\n'), ((5311, 5355), 'open_seq2seq.utils.utils.cast_types', 'cast_types'...
import logging from datetime import datetime from time import sleep import pytest import boto3 from awswrangler import Session from awswrangler.exceptions import QueryCancelled logging.basicConfig( level=logging.INFO, format="[%(asctime)s][%(levelname)s][%(name)s][%(funcName)s] %(message)s") logging.getLogge...
[ "logging.basicConfig", "logging.getLogger", "boto3.client", "datetime.datetime.utcnow", "awswrangler.Session", "time.sleep", "pytest.raises", "pytest.fixture" ]
[((180, 299), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO', 'format': '"""[%(asctime)s][%(levelname)s][%(name)s][%(funcName)s] %(message)s"""'}), "(level=logging.INFO, format=\n '[%(asctime)s][%(levelname)s][%(name)s][%(funcName)s] %(message)s')\n", (199, 299), False, 'import logging\n...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import cv2 import numpy as np from progress.bar import Bar import time import torch from src.lib.external.nms import soft_nms from src.lib.models.decode import ddd_decode from src.lib.models.utils import flip_...
[ "cv2.warpAffine", "torch.from_numpy", "torch.cuda.synchronize", "numpy.array", "src.lib.utils.image.get_affine_transform", "torch.no_grad", "src.lib.models.decode.ddd_decode", "time.time" ]
[((792, 923), 'numpy.array', 'np.array', (['[[707.0493, 0, 604.0814, 45.75831], [0, 707.0493, 180.5066, -0.3454157], [0,\n 0, 1.0, 0.004981016]]'], {'dtype': 'np.float32'}), '([[707.0493, 0, 604.0814, 45.75831], [0, 707.0493, 180.5066, -\n 0.3454157], [0, 0, 1.0, 0.004981016]], dtype=np.float32)\n', (800, 923), T...
from conv_layers import ResidueEmbedding, Conv1DLayer, Conv2DLayer, \ Outer1DTo2DLayer, ContactMapGather, ResAdd, Conv2DPool, Conv2DUp, \ Conv1DAtrous, Conv2DAtrous, Conv2DBilinearUp, Conv2DASPP, BatchNorm, \ TriangleInequality, Conv1DLayer_RaptorX, Conv2DLayer_RaptorX from diag_conv_layers import DiagConv2...
[ "tensorflow.shape", "tensorflow.random_normal", "tensorflow.transpose", "tensorflow.ones", "tensorflow.to_float", "tensorflow.reduce_sum", "numpy.log", "tensorflow.cumsum", "tensorflow.reduce_max", "tensorflow.concat", "tensorflow.nn.sigmoid", "tensorflow.reshape", "tensorflow.nn.sigmoid_cro...
[((769, 808), 'tensorflow.expand_dims', 'tf.expand_dims', (['parent_tensor', 'self.dim'], {}), '(parent_tensor, self.dim)\n', (783, 808), True, 'import tensorflow as tf\n'), ((1229, 1254), 'tensorflow.reduce_max', 'tf.reduce_max', (['n_residues'], {}), '(n_residues)\n', (1242, 1254), True, 'import tensorflow as tf\n'),...
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
[ "sphinx_rtd_theme.get_html_theme_path", "sys.path.insert", "os.path.join", "os.path.dirname", "re.search" ]
[((711, 734), 'sys.path.insert', 'sys.path.insert', (['(0)', 'DIR'], {}), '(0, DIR)\n', (726, 734), False, 'import sys\n'), ((1156, 1199), 're.search', 're.search', (['"""version=\'(.*?)\'"""', 'setup_content'], {}), '("version=\'(.*?)\'", setup_content)\n', (1165, 1199), False, 'import re\n'), ((2884, 2931), 'os.path....
# Generated by Django 2.2.6 on 2020-01-05 12:50 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('yatranepal', '0001_initial'), ] operations = [ migrations.CreateModel( name='Packages', fields=[ ('i...
[ "django.db.models.TextField", "django.db.models.IntegerField", "django.db.models.ManyToManyField", "django.db.models.AutoField", "django.db.models.ImageField", "django.db.models.CharField" ]
[((324, 417), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (340, 417), False, 'from django.db import migrations, models\...
from numpy.random import randn def add_and_sum(x, y): added = x + y summed = added.sum(axis=1) return summed def call_function(): x = randn(1000, 1000) y = randn(1000, 1000) return add_and_sum(x, y)
[ "numpy.random.randn" ]
[((146, 163), 'numpy.random.randn', 'randn', (['(1000)', '(1000)'], {}), '(1000, 1000)\n', (151, 163), False, 'from numpy.random import randn\n'), ((170, 187), 'numpy.random.randn', 'randn', (['(1000)', '(1000)'], {}), '(1000, 1000)\n', (175, 187), False, 'from numpy.random import randn\n')]
# Using Keras to load our model and images from keras.models import load_model from keras.preprocessing import image # To grab environment variables, image directories, and image paths import os from os.path import isfile, join # To sort our image directories by natural sort from natsort import os_sorted # To turn o...
[ "keras.preprocessing.image.img_to_array", "os.listdir", "keras.models.load_model", "os.path.join", "numpy.array", "numpy.expand_dims", "keras.preprocessing.image.load_img" ]
[((978, 1000), 'keras.models.load_model', 'load_model', (['MODEL_PATH'], {}), '(MODEL_PATH)\n', (988, 1000), False, 'from keras.models import load_model\n'), ((1213, 1264), 'keras.preprocessing.image.load_img', 'image.load_img', (['image_path'], {'target_size': 'TARGET_SIZE'}), '(image_path, target_size=TARGET_SIZE)\n'...
import aiohttp_jinja2 from aiohttp import web from aiohttp_security import remember from ws.authorization import check_credentials from ws.handler.index import Handler as Parent class Handler(Parent): @aiohttp_jinja2.template("index.html") async def post(self, request): response = web.HTTPFound("/") ...
[ "aiohttp_security.remember", "aiohttp.web.HTTPUnauthorized", "aiohttp.web.HTTPFound", "ws.authorization.check_credentials", "aiohttp_jinja2.template" ]
[((209, 246), 'aiohttp_jinja2.template', 'aiohttp_jinja2.template', (['"""index.html"""'], {}), "('index.html')\n", (232, 246), False, 'import aiohttp_jinja2\n'), ((301, 319), 'aiohttp.web.HTTPFound', 'web.HTTPFound', (['"""/"""'], {}), "('/')\n", (314, 319), False, 'from aiohttp import web\n'), ((646, 714), 'aiohttp.w...
""" Utility functions for geos-chem-schedule """ import subprocess import json import os import stat import sys import shutil import datetime import calendar from dateutil.relativedelta import relativedelta import pytest def clear_screen(): """ Clear the screen of the terminal for the UI """ os.syste...
[ "os.path.realpath", "os.path.isfile", "calendar.isleap", "shutil.copyfile", "sys.exit", "os.system" ]
[((312, 360), 'os.system', 'os.system', (["('cls' if os.name == 'nt' else 'clear')"], {}), "('cls' if os.name == 'nt' else 'clear')\n", (321, 360), False, 'import os\n'), ((1754, 1780), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (1770, 1780), False, 'import os\n'), ((2518, 2528), 'sys.e...
from http import server from http.server import HTTPServer #choose a port, serve until ctrl + c from http.server import BaseHTTPRequestHandler #handle get requests class requestHandler(BaseHTTPRequestHandler): def do_GET(self): self.send_response(200) #status code 200 self.send_head...
[ "http.server.serve_forever", "http.server.HTTPServer" ]
[((508, 546), 'http.server.HTTPServer', 'HTTPServer', (["('', PORT)", 'requestHandler'], {}), "(('', PORT), requestHandler)\n", (518, 546), False, 'from http.server import HTTPServer\n'), ((649, 671), 'http.server.serve_forever', 'server.serve_forever', ([], {}), '()\n', (669, 671), False, 'from http import server\n')]
#!/usr/bin/python # coding=utf-8 ################################################################################ from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import patch from diamond.collector import Collector from ntpd import Nt...
[ "test.get_collector_config", "mock.Mock", "mock.patch.object", "test.unittest.main", "ntpd.NtpdCollector", "mock.patch.multiple" ]
[((667, 701), 'mock.patch.object', 'patch.object', (['Collector', '"""publish"""'], {}), "(Collector, 'publish')\n", (679, 701), False, 'from mock import patch\n'), ((1804, 1838), 'mock.patch.object', 'patch.object', (['Collector', '"""publish"""'], {}), "(Collector, 'publish')\n", (1816, 1838), False, 'from mock impor...
import logging import os from logging import handlers def get_ingestion_logger(data_source): """Returns logger for ingestion-scripts :param data_source: Name of the source data used in ingestion (rss, reddit, twitter) :type data_source: str """ log_base_dir = "/consumers/logs" log_dir = os.pa...
[ "logging.getLogger", "logging.Formatter", "logging.handlers.RotatingFileHandler", "os.path.join" ]
[((315, 354), 'os.path.join', 'os.path.join', (['log_base_dir', 'data_source'], {}), '(log_base_dir, data_source)\n', (327, 354), False, 'import os\n'), ((429, 464), 'os.path.join', 'os.path.join', (['log_dir', 'log_filename'], {}), '(log_dir, log_filename)\n', (441, 464), False, 'import os\n'), ((479, 531), 'logging.g...
#!/usr/bin/env python3 import sys from testflows.core import * append_path(sys.path, "..", "..") from helpers.cluster import Cluster from helpers.argparser import argparser from ldap.authentication.requirements import * # Cross-outs of known fails xfails = { "connection protocols/tls/tls_require_cert='try'": ...
[ "helpers.cluster.Cluster" ]
[((1513, 1564), 'helpers.cluster.Cluster', 'Cluster', (['local', 'clickhouse_binary_path'], {'nodes': 'nodes'}), '(local, clickhouse_binary_path, nodes=nodes)\n', (1520, 1564), False, 'from helpers.cluster import Cluster\n')]
# Everything is better with friends: Executing SAS® code in Python scripts with # SASPy, and turbocharging your SAS programming with open-source tooling # # Half-day class, Western Users of SAS Software (WUSS) 2019 ############################################################################### # Exercise 10: Getting ...
[ "saspy.SASsession" ]
[((607, 619), 'saspy.SASsession', 'SASsession', ([], {}), '()\n', (617, 619), False, 'from saspy import SASsession\n')]
"WSGI test application." import logging from urllib.parse import parse_qs LOGGER = logging.getLogger() LOGGER.addHandler(logging.StreamHandler()) LOGGER.setLevel(logging.DEBUG) def hello_world(environ, start_response): "A simple wsgi application." data = environ['wsgi.input'].read() post = parse_qs(da...
[ "logging.getLogger", "urllib.parse.parse_qs", "logging.StreamHandler" ]
[((87, 106), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (104, 106), False, 'import logging\n'), ((125, 148), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (146, 148), False, 'import logging\n'), ((309, 323), 'urllib.parse.parse_qs', 'parse_qs', (['data'], {}), '(data)\n', (317, 32...
from __future__ import absolute_import from .base import JsonObjectBase, _LimitedDictInterfaceMixin import six import decimal import datetime from . import properties import re re_date = re.compile(r'^(\d{4})\D?(0[1-9]|1[0-2])\D?([12]\d|0[1-9]|3[01])$') re_time = re.compile( r'^([01]\d|2[0-3])\D?([0-5]\d)\D?([0...
[ "re.compile" ]
[((191, 260), 're.compile', 're.compile', (['"""^(\\\\d{4})\\\\D?(0[1-9]|1[0-2])\\\\D?([12]\\\\d|0[1-9]|3[01])$"""'], {}), "('^(\\\\d{4})\\\\D?(0[1-9]|1[0-2])\\\\D?([12]\\\\d|0[1-9]|3[01])$')\n", (201, 260), False, 'import re\n'), ((268, 344), 're.compile', 're.compile', (['"""^([01]\\\\d|2[0-3])\\\\D?([0-5]\\\\d)\\\\D...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='CodeExample', fields=[ ('id', models.AutoField(...
[ "django.db.models.OneToOneField", "django.db.models.TextField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.SlugField", "django.db.models.AutoField", "django.db.models.CharField" ]
[((5684, 5750), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'to': '"""projects.Project"""', 'on_delete': 'models.CASCADE'}), "(to='projects.Project', on_delete=models.CASCADE)\n", (5701, 5750), False, 'from django.db import migrations, models\n'), ((5873, 5942), 'django.db.models.ForeignKey', 'models.Fore...
# ****************************************************** ## Revision "$LastChangedDate: 2018-06-01 15:05:44 +0200 (Fri, 01 Jun 2018) $" ## Date "$LastChangedRevision: 1 $" ## Author "$LastChangedBy: arthurbeusen $" ## URL "$HeadURL: https://pbl.sliksvn.com/generalcode/test_allocation.py $" # ***************************...
[ "os.path.exists", "sys.path.insert", "allocranking.allocranking", "os.getcwd", "allocweighing.allocweighing", "sys.exit" ]
[((490, 515), 'os.path.exists', 'os.path.exists', (['__general'], {}), '(__general)\n', (504, 515), False, 'import os\n'), ((1220, 1268), 'allocranking.allocranking', 'allocranking.allocranking', (['sq', 'sw', 'wReg', 'qmaxReg'], {}), '(sq, sw, wReg, qmaxReg)\n', (1245, 1268), False, 'import allocranking\n'), ((1655, 1...
import unittest from onnx import helper from onnx import onnx_pb as onnx_proto from onnxconverter_common.decast import decast class DecastTestCase(unittest.TestCase): def test_decast(self): nodes = [] nodes[0:] = [helper.make_node('Identity', ['input1'], ['identity1'])] nodes[1:] = [help...
[ "onnx.helper.make_graph", "onnx.helper.make_node", "onnx.helper.make_tensor_value_info", "onnx.helper.make_model", "onnxconverter_common.decast.decast", "unittest.main" ]
[((1112, 1127), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1125, 1127), False, 'import unittest\n'), ((620, 707), 'onnx.helper.make_tensor_value_info', 'helper.make_tensor_value_info', (['"""input1"""', 'onnx_proto.TensorProto.FLOAT', '[1, 1, 2, 3]'], {}), "('input1', onnx_proto.TensorProto.FLOAT, [1, 1,\n ...
from __future__ import print_function import os def log_check_call(command, stdin=None, env=None, shell=False, cwd=None): status, stdout, stderr = log_call(command, stdin, env, shell, cwd) from subprocess import CalledProcessError if status != 0: e = CalledProcessError(status, ' '.join(command), '...
[ "logging.getLogger", "os.path.exists", "subprocess.Popen", "os.walk", "os.path.splitext", "os.path.join", "os.path.isfile", "yaml.safe_load", "os.path.realpath", "os.path.dirname", "os.path.isdir", "os.mkdir", "os.remove", "os.path.relpath", "fileinput.input", "multiprocessing.dummy.Po...
[((971, 1012), 'logging.getLogger', 'logging.getLogger', (['(__name__ + command_log)'], {}), '(__name__ + command_log)\n', (988, 1012), False, 'import logging\n'), ((1214, 1351), 'subprocess.Popen', 'subprocess.Popen', ([], {'args': 'command', 'env': 'env', 'shell': 'shell', 'cwd': 'cwd', 'stdin': 'subprocess.PIPE', 's...
# coding=utf-8 # Copyright 2020 The Trax 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 a...
[ "trax.fastmath.numpy.concatenate", "trax.fastmath.numpy.take", "numpy.log", "absl.logging.info", "trax.layers.initializers.GlorotUniformInitializer", "trax.fastmath.numpy.split", "trax.layers.base.Fn", "trax.fastmath.numpy.matmul", "trax.fastmath.numpy.max", "trax.fastmath.numpy.linalg.solve", "...
[((1060, 1086), 'trax.layers.assert_shape.assert_shape', 'assert_shape', (['"""...a->...b"""'], {}), "('...a->...b')\n", (1072, 1086), False, 'from trax.layers.assert_shape import assert_shape\n'), ((4439, 4464), 'trax.layers.assert_shape.assert_shape', 'assert_shape', (['"""...->...d"""'], {}), "('...->...d')\n", (445...
# -*- coding: utf-8 -*- from django.conf import settings from django.db import transaction class DNSaaSPublisherMixin: """Generate data formatted for DNSaaS auto txt update""" def get_auto_txt_data(self): data = [] for purpose_name, content in ( ('class_name', self.configuration_pa...
[ "django.conf.settings.DNSAAS_AUTO_TXT_RECORD_PURPOSE_MAP.get" ]
[((845, 912), 'django.conf.settings.DNSAAS_AUTO_TXT_RECORD_PURPOSE_MAP.get', 'settings.DNSAAS_AUTO_TXT_RECORD_PURPOSE_MAP.get', (['purpose_name', 'None'], {}), '(purpose_name, None)\n', (892, 912), False, 'from django.conf import settings\n')]
# Generated by Django 2.1.1 on 2018-09-23 18:34 from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): dependencies = [ ('backend', '0001_initial'), ] operations = [ migrations.CreateModel( name='Song', ...
[ "django.db.models.ForeignKey", "django.db.models.UUIDField", "django.db.models.CharField" ]
[((362, 485), 'django.db.models.UUIDField', 'models.UUIDField', ([], {'default': 'uuid.uuid4', 'editable': '(False)', 'primary_key': '(True)', 'serialize': '(False)', 'unique': '(True)', 'verbose_name': '"""id"""'}), "(default=uuid.uuid4, editable=False, primary_key=True,\n serialize=False, unique=True, verbose_name...
import requests import json RPC_ALLOWED_CALLS = [ "getblockchaininfo", "getblock", "getblockhash", "getrawtransaction", "getblockstats", "getrawmempool", "getmempoolentry", 'savemempool', ] class RpcCaller(object): def __init__(self, address, user, password, **kw...
[ "json.dumps" ]
[((994, 1017), 'json.dumps', 'json.dumps', (['requestData'], {}), '(requestData)\n', (1004, 1017), False, 'import json\n')]
from textwrap import dedent from textwrap import indent def format_exception( direct_caller_frame, lambdex_definition_place, traceback_obj, source_code_block, ) -> str: # caller: see `.main.lambdex.<vars:code>.<code_template>.<except_clause>`. def _show_place(filename, lin...
[ "textwrap.dedent", "textwrap.indent" ]
[((2703, 2742), 'textwrap.indent', 'indent', (['source_lines', "(' ' * indentation)"], {}), "(source_lines, ' ' * indentation)\n", (2709, 2742), False, 'from textwrap import indent\n'), ((487, 1005), 'textwrap.dedent', 'dedent', (['"""\n An error is raised when executing lambda function within lk-lambdex.\n ...
from django.http import HttpResponseRedirect from django.urls import reverse import urllib # This is initially from https://github.com/python-social-auth/social-core/blob/master/social_core/pipeline/user.py def get_username(strategy, details, backend, user=None, *args, **kwargs): # Get the logged in user (if any) ...
[ "urllib.quote_plus", "django.urls.reverse" ]
[((661, 685), 'urllib.quote_plus', 'urllib.quote_plus', (['error'], {}), '(error)\n', (678, 685), False, 'import urllib\n'), ((607, 646), 'django.urls.reverse', 'reverse', (['"""repairs-social-network-error"""'], {}), "('repairs-social-network-error')\n", (614, 646), False, 'from django.urls import reverse\n'), ((1122,...
"""Creates a DataFrame of Cross Validation Data.""" """ attribute dataframe: Dataframe index: number of genes in classifier column: classifier name: <ref>--<genes> <ref>: choice for the reference either bioreactor T0 or pooled <genes>: collection of genes used for the classifier """ """ TODO 1...
[ "os.listdir", "common_python.util.dataframe.subset", "argparse.ArgumentParser", "pandas.read_csv", "tools.make_classification_data.ClassificationData", "os.path.join", "copy.deepcopy", "pandas.DataFrame", "pandas.concat", "os.remove" ]
[((823, 873), 'os.path.join', 'os.path.join', (['cn.DATA_DIR', '"""cross_validation_data"""'], {}), "(cn.DATA_DIR, 'cross_validation_data')\n", (835, 873), False, 'import os\n'), ((5106, 5147), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': 'desc'}), '(description=desc)\n', (5129, 5147), Fal...
from itertools import product import torch from dgmc.models import GIN def test_gin(): model = GIN(16, 32, num_layers=2, batch_norm=True, cat=True, lin=True) assert model.__repr__() == ('GIN(16, 32, num_layers=2, batch_norm=True, ' 'cat=True, lin=True)') x = torch.randn(1...
[ "dgmc.models.GIN", "itertools.product", "torch.randn", "torch.randint" ]
[((102, 164), 'dgmc.models.GIN', 'GIN', (['(16)', '(32)'], {'num_layers': '(2)', 'batch_norm': '(True)', 'cat': '(True)', 'lin': '(True)'}), '(16, 32, num_layers=2, batch_norm=True, cat=True, lin=True)\n', (105, 164), False, 'from dgmc.models import GIN\n'), ((307, 327), 'torch.randn', 'torch.randn', (['(100)', '(16)']...
# -*- coding: utf-8 -*- import logging try: from urllib.parse import urlencode from urllib.parse import urljoin except Exception: from urllib import urlencode from urlparse import urljoin import requests from .exceptions import BaremetricsAPIException, APICallNotImplemented logger = logging.getLogge...
[ "logging.getLogger", "requests.post", "requests.get", "requests.delete", "urllib.urlencode", "requests.put" ]
[((304, 336), 'logging.getLogger', 'logging.getLogger', (['"""baremetrics"""'], {}), "('baremetrics')\n", (321, 336), False, 'import logging\n'), ((1229, 1283), 'requests.get', 'requests.get', (['full_url'], {'headers': 'headers', 'params': 'params'}), '(full_url, headers=headers, params=params)\n', (1241, 1283), False...
# This holds all the iteration per step of a pfasst or parareal run class Stats_per_step: Nsteps=1 # Total number of steps Niters=1 # Max iters from run Nblocks=1 iters_per_step=[] resid_per_step=[] delq0_per_step=[] def __init__(self, param_dict,Ns...
[ "numpy.loadtxt", "numpy.zeros" ]
[((606, 629), 'numpy.zeros', 'np.zeros', (['[self.Nsteps]'], {}), '([self.Nsteps])\n', (614, 629), True, 'import numpy as np\n'), ((662, 698), 'numpy.zeros', 'np.zeros', (['[self.Nsteps, self.Niters]'], {}), '([self.Nsteps, self.Niters])\n', (670, 698), True, 'import numpy as np\n'), ((730, 766), 'numpy.zeros', 'np.zer...
from helpers import * from shutil import copyfile import json def register_in_lz4_and_copy_xpi(addon_info, dir_of_xpi): PATH_TO_XPI = join(dir_of_xpi, construct_xpi_filename( addon_info["name"], addon_info["version"])) # Initialize dictionary: object_out = {} out_json_filename = os.path.splite...
[ "json.load", "json.dump" ]
[((589, 605), 'json.load', 'json.load', (['jsonf'], {}), '(jsonf)\n', (598, 605), False, 'import json\n'), ((2961, 2989), 'json.dump', 'json.dump', (['object_out', 'jsonf'], {}), '(object_out, jsonf)\n', (2970, 2989), False, 'import json\n'), ((6191, 6203), 'json.load', 'json.load', (['f'], {}), '(f)\n', (6200, 6203), ...
# %% from djitellopy import Tello from cv2 import cv2 as cv import facedetect from time import sleep if __name__ == "__main__": tello = Tello() face_cascade = facedetect.get_face_cascade() try: tello.connect() tello.streamon() print(f"Battery: {tello.get_battery()}") frame = tello.get_frame_read() print...
[ "facedetect.draw_face_box", "cv2.cv2.waitKey", "facedetect.get_face_cascade", "cv2.cv2.destroyAllWindows", "facedetect.face_cascade_detect", "djitellopy.Tello", "cv2.cv2.imshow" ]
[((138, 145), 'djitellopy.Tello', 'Tello', ([], {}), '()\n', (143, 145), False, 'from djitellopy import Tello\n'), ((162, 191), 'facedetect.get_face_cascade', 'facedetect.get_face_cascade', ([], {}), '()\n', (189, 191), False, 'import facedetect\n'), ((808, 830), 'cv2.cv2.destroyAllWindows', 'cv.destroyAllWindows', ([]...
""" Copyright 2009 <NAME> and Point2 Technologies Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. ...
[ "lxml.objectify.fromstring", "xpath.split", "xml.dom.minidom.parseString", "xpath.find", "unittest.main", "lxml.etree.tostring" ]
[((3588, 3644), 'xpath.find', 'xpath.find', (['expression', 'xml'], {'default_namespace': 'namespace'}), '(expression, xml, default_namespace=namespace)\n', (3598, 3644), False, 'import xpath\n'), ((3762, 3818), 'xpath.find', 'xpath.find', (['expression', 'xml'], {'default_namespace': 'namespace'}), '(expression, xml, ...
# -*- coding: utf-8 -*- """ Interpies - a libray for the interpretation of gravity and magnetic data. transforms.py: Functions for applying derivatives, transforms and filters to grids. @author: <NAME> Geophysics Labs, 2017 """ # Import numpy and scipy import numpy as np from scipy import signal from scipy.ndimag...
[ "numpy.convolve", "numpy.sqrt", "numpy.linalg.pinv", "scipy.ndimage.filters.gaussian_filter", "sklearn.preprocessing.PolynomialFeatures", "numpy.log", "numpy.array", "numpy.nanmean", "numpy.nanmin", "numpy.mod", "numpy.arange", "numpy.mean", "numpy.repeat", "numpy.fft.fft2", "numpy.exp",...
[((681, 717), 'numpy.array', 'np.array', (['[-0.5, 0, 0.5]', 'np.float32'], {}), '([-0.5, 0, 0.5], np.float32)\n', (689, 717), True, 'import numpy as np\n'), ((729, 768), 'numpy.array', 'np.array', (['[1, -8, 0, 8, -1]', 'np.float32'], {}), '([1, -8, 0, 8, -1], np.float32)\n', (737, 768), True, 'import numpy as np\n'),...
# Record/replay test that boots a Linux kernel # # Copyright (c) 2020 ISP RAS # # Author: # <NAME> <<EMAIL>> # # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. import os import lzma import shutil import logging import time from avocado im...
[ "logging.getLogger", "os.path.getsize", "shutil.copyfileobj", "os.getenv", "os.scandir", "os.path.join", "lzma.open", "time.time", "avocado.utils.archive.gzip_uncompress", "avocado.utils.archive.extract", "avocado.skip" ]
[((11913, 11942), 'avocado.skip', 'skip', (['"""Test currently broken"""'], {}), "('Test currently broken')\n", (11917, 11942), False, 'from avocado import skip\n'), ((14832, 14869), 'os.getenv', 'os.getenv', (['"""AVOCADO_TIMEOUT_EXPECTED"""'], {}), "('AVOCADO_TIMEOUT_EXPECTED')\n", (14841, 14869), False, 'import os\n...
from django.db import IntegrityError from my_portal.projects import models from import_export import resources, fields, widgets class SupplierResource(resources.ModelResource): class Meta: model = models.Supplier class ProjectResource(resources.ModelResource): customer = fields.Field( attribu...
[ "import_export.widgets.ForeignKeyWidget" ]
[((382, 438), 'import_export.widgets.ForeignKeyWidget', 'widgets.ForeignKeyWidget', (['models.Supplier', '"""vendor_name"""'], {}), "(models.Supplier, 'vendor_name')\n", (406, 438), False, 'from import_export import resources, fields, widgets\n')]
# This extension is quite simple: # 1. It accepts a script name # 2. This script is added to the document in a literalinclude # 3. Any _static images found will be added import glob import os import shutil from docutils.parsers.rst import directives from sphinx.util.compat import Directive # Some of this magic co...
[ "os.path.exists", "docutils.parsers.rst.directives.path", "os.makedirs", "os.path.join", "os.path.dirname", "os.path.isdir", "os.path.basename", "os.path.relpath" ]
[((922, 956), 'docutils.parsers.rst.directives.path', 'directives.path', (['self.arguments[0]'], {}), '(self.arguments[0])\n', (937, 956), False, 'from docutils.parsers.rst import directives\n'), ((977, 1004), 'os.path.basename', 'os.path.basename', (['script_fn'], {}), '(script_fn)\n', (993, 1004), False, 'import os\n...
# VMware vCloud Director Python SDK # Copyright (c) 2018 VMware, 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 #...
[ "pyvcloud.vcd.client.E_VMEXT.Exchange", "pyvcloud.vcd.client.E_VMEXT.Enabled", "pyvcloud.vcd.client.E.Right", "pyvcloud.vcd.client.E_VMEXT.Namespace", "urllib.parse.quote", "pyvcloud.vcd.client.E.Description", "pyvcloud.vcd.client.E.BundleKey", "pyvcloud.vcd.exceptions.MissingRecordException", "pyvc...
[((5243, 5279), 'pyvcloud.vcd.utils.to_dict', 'to_dict', (['ext_record', 'self.ATTRIBUTES'], {}), '(ext_record, self.ATTRIBUTES)\n', (5250, 5279), False, 'from pyvcloud.vcd.utils import to_dict\n'), ((7595, 7626), 'pyvcloud.vcd.client.E_VMEXT.Service', 'E_VMEXT.Service', (["{'name': name}"], {}), "({'name': name})\n", ...
from ..compatibility import SIMAPRO_BIOSPHERE from ..strategies.simapro import normalize_simapro_formulae from bw2data.logs import get_io_logger, close_log from bw2parameters import ParameterSet from numbers import Number from stats_arrays import * import csv import math import os import re import uuid INTRODUCTION =...
[ "os.path.exists", "bw2data.logs.close_log", "bw2parameters.ParameterSet", "uuid.uuid4", "bw2data.logs.get_io_logger", "re.findall", "csv.reader" ]
[((2446, 2491), 're.findall', 're.findall', (['expression', 'string', 're.IGNORECASE'], {}), '(expression, string, re.IGNORECASE)\n', (2456, 2491), False, 'import re\n'), ((2752, 2776), 'os.path.exists', 'os.path.exists', (['filepath'], {}), '(filepath)\n', (2766, 2776), False, 'import os\n'), ((2833, 2867), 'bw2data.l...
# -*- coding: utf-8 -*- """Main module.""" import torch import torch.nn as nn import torch.nn.functional as F from torch.distributions import Normal, kl_divergence as kl from scvi.metrics.log_likelihood import log_zinb_positive, log_nb_positive from scvi.models.modules import Encoder, DecoderSCVI from scvi.models.uti...
[ "torch.ones_like", "torch.log", "torch.distributions.Normal", "scvi.models.modules.DecoderSCVI", "torch.sqrt", "scvi.models.modules.Encoder", "torch.exp", "torch.zeros_like", "torch.randn", "scvi.models.utils.one_hot" ]
[((2077, 2172), 'scvi.models.modules.Encoder', 'Encoder', (['n_input', 'n_latent'], {'n_layers': 'n_layers', 'n_hidden': 'n_hidden', 'dropout_rate': 'dropout_rate'}), '(n_input, n_latent, n_layers=n_layers, n_hidden=n_hidden,\n dropout_rate=dropout_rate)\n', (2084, 2172), False, 'from scvi.models.modules import Enco...
""" 1223. Dice Roll Simulation A die simulator generates a random number from 1 to 6 for each roll. You introduced a constraint to the generator such that it cannot roll the number i more than rollMax[i] (1-indexed) consecutive times. Given an array of integers rollMax and an integer n, return the number of distinct ...
[ "functools.lru_cache" ]
[((2917, 2932), 'functools.lru_cache', 'lru_cache', (['None'], {}), '(None)\n', (2926, 2932), False, 'from functools import lru_cache\n')]
# Generated by Django 3.2.3 on 2021-07-08 16:20 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('users', '0009_gmailauthentication'), ] operations = [ migrations.RemoveField( model_name='user', name='third_party_authentic...
[ "django.db.migrations.DeleteModel", "django.db.migrations.RemoveField" ]
[((226, 301), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""user"""', 'name': '"""third_party_authenticator"""'}), "(model_name='user', name='third_party_authenticator')\n", (248, 301), False, 'from django.db import migrations\n'), ((346, 410), 'django.db.migrations.RemoveField',...
from ..models import * from .availability_calendar_api import * from .calendar_api import * import json from datetime import datetime, timedelta def get_best(event_id): """ :param event_id: the id of the event we want to get best times of :return: A list of sorted pairs: [ (time, [users]), (time, [users]...
[ "datetime.timedelta" ]
[((5000, 5023), 'datetime.timedelta', 'timedelta', ([], {'minutes': 'mins'}), '(minutes=mins)\n', (5009, 5023), False, 'from datetime import datetime, timedelta\n'), ((836, 854), 'datetime.timedelta', 'timedelta', ([], {'hours': '(1)'}), '(hours=1)\n', (845, 854), False, 'from datetime import datetime, timedelta\n'), (...
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # 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 version 3 of the Lic...
[ "ansible.module_utils.basic.AnsibleModule", "ansible.module_utils.network.fortios.fortios.FortiOSHandler", "fortiosapi.FortiOSAPI", "ansible.module_utils.connection.Connection" ]
[((113024, 113086), 'ansible.module_utils.basic.AnsibleModule', 'AnsibleModule', ([], {'argument_spec': 'fields', 'supports_check_mode': '(False)'}), '(argument_spec=fields, supports_check_mode=False)\n', (113037, 113086), False, 'from ansible.module_utils.basic import AnsibleModule\n'), ((113926, 113938), 'fortiosapi....
import unittest from src import outcome from src import craps_onebetplayer from src import table from src import nochange_betting from src import martingale_betting from src import bet from src import dice from src import craps_game class TestOneBetPlayer(unittest.TestCase): def setUp(self): self.outcome ...
[ "src.table.Table", "src.dice.Dice", "src.bet.Bet", "src.outcome.Outcome", "unittest.main", "src.nochange_betting.NoChangeBetting", "src.martingale_betting.MartingaleBetting" ]
[((3109, 3124), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3122, 3124), False, 'import unittest\n'), ((322, 353), 'src.outcome.Outcome', 'outcome.Outcome', (['"""Pass Line"""', '(1)'], {}), "('Pass Line', 1)\n", (337, 353), False, 'from src import outcome\n'), ((388, 434), 'src.nochange_betting.NoChangeBettin...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import (division, absolute_import, print_function, unicode_literals) import random class Enemy(): def __init__(self, ancestry, gear): self.enemy = ancestry self.weapon = gear self.hp = random.randrange(...
[ "random.randrange" ]
[((303, 327), 'random.randrange', 'random.randrange', (['(10)', '(20)'], {}), '(10, 20)\n', (319, 327), False, 'import random\n'), ((347, 370), 'random.randrange', 'random.randrange', (['(0)', '(20)'], {}), '(0, 20)\n', (363, 370), False, 'import random\n'), ((389, 412), 'random.randrange', 'random.randrange', (['(0)',...
# -*- coding: utf-8 -*- # -*- encoding: utf-8 -*- import logging from openerp.addons.web import http _logger = logging.getLogger(__name__) class Arduino(http.Controller): @http.route('/api/dost/', type='http', auth='none', cors='*') def ping(self, **kw): _logger.info('Hola!') # Play with stu...
[ "logging.getLogger", "openerp.addons.web.http.route" ]
[((112, 139), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (129, 139), False, 'import logging\n'), ((180, 240), 'openerp.addons.web.http.route', 'http.route', (['"""/api/dost/"""'], {'type': '"""http"""', 'auth': '"""none"""', 'cors': '"""*"""'}), "('/api/dost/', type='http', auth='none...
import copy import datetime import glob import json import os import sys import threading from os import path from urllib.parse import urlparse, urljoin, ParseResult import xmltodict import yaml from bs4 import BeautifulSoup from flask import Flask, render_template, Response, send_from_directory, request from flask.vi...
[ "flask.render_template", "flask.Flask", "src.externals.process_nav_includes", "yaml.load", "copy.deepcopy", "sys.exit", "src.navigation.process_nav", "os.walk", "os.path.exists", "os.listdir", "flask.send_from_directory", "flask_frozen.Freezer", "src.github.assert_valid_git_hub_url", "json...
[((1203, 1243), 'flask.Flask', 'Flask', (['__name__'], {'static_folder': '"""_assets"""'}), "(__name__, static_folder='_assets')\n", (1208, 1243), False, 'from flask import Flask, render_template, Response, send_from_directory, request\n'), ((1360, 1376), 'src.pages.MyFlatPages.MyFlatPages', 'MyFlatPages', (['app'], {}...
"""Closed Loop Model file.""" import torch from rllib.util.utilities import tensor_to_distribution from .abstract_model import AbstractModel class ClosedLoopModel(AbstractModel): """Compute the next-state (or reward) for a model in closed loop with a policy. In general, the policy may not predict all the ...
[ "torch.cat" ]
[((1562, 1605), 'torch.cat', 'torch.cat', (['(policy_actions, action)'], {'dim': '(-1)'}), '((policy_actions, action), dim=-1)\n', (1571, 1605), False, 'import torch\n')]
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings import django.core.validators class Migration(migrations.Migration): dependencies = [ ('instalacion', '0001_initial'), migrations.swappable_depend...
[ "django.db.models.GenericIPAddressField", "django.db.models.OneToOneField", "django.db.models.IntegerField", "django.db.models.ForeignKey", "django.db.models.AutoField", "django.db.models.PositiveIntegerField", "django.db.migrations.swappable_dependency" ]
[((293, 350), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (324, 350), False, 'from django.db import migrations, models\n'), ((494, 587), 'django.db.models.AutoField', 'models.AutoField', ([], {'verbose_name': '"""ID"...
import json import mgp import os from kafka import KafkaProducer KAFKA_IP = os.getenv('KAFKA_IP', 'kafka') KAFKA_PORT = os.getenv('KAFKA_PORT', '9092') @mgp.read_proc def create(created_objects: mgp.Any ) -> mgp.Record(): created_objects_info = {'vertices': [], 'edges': []} for obj in created_ob...
[ "kafka.KafkaProducer", "json.dumps", "mgp.Record", "os.getenv" ]
[((78, 108), 'os.getenv', 'os.getenv', (['"""KAFKA_IP"""', '"""kafka"""'], {}), "('KAFKA_IP', 'kafka')\n", (87, 108), False, 'import os\n'), ((122, 153), 'os.getenv', 'os.getenv', (['"""KAFKA_PORT"""', '"""9092"""'], {}), "('KAFKA_PORT', '9092')\n", (131, 153), False, 'import os\n'), ((223, 235), 'mgp.Record', 'mgp.Rec...
import io import os import shutil import tarfile from base64 import b64decode import dash from dash import dcc import numpy as np import plotly.express as px import plotly.graph_objects as go from app import app, dbroot, logger from dash.dependencies import Input, Output, State from dash.exceptions import PreventUpdat...
[ "app.logger.error", "io.BytesIO", "dash.dependencies.Input", "numpy.array", "app.logger.info", "numpy.arange", "numpy.flip", "os.listdir", "numpy.repeat", "numpy.searchsorted", "dash.dependencies.Output", "os.path.isdir", "app.logger.warn", "dash.dependencies.State", "plotly.express.imsh...
[((6168, 6234), 'app.logger.info', 'logger.info', (['f"""Generated tile with shape {tile.shape}. Scaling..."""'], {}), "(f'Generated tile with shape {tile.shape}. Scaling...')\n", (6179, 6234), False, 'from app import app, dbroot, logger\n'), ((6523, 6655), 'plotly.express.imshow', 'px.imshow', (['tile'], {'width': 'w'...
# (c) <NAME>, 2010-2022. MIT License. import pathlib import numpy as np import pandas as pd import pytest from pytest import approx from sklearn.cross_decomposition import PLSRegression from process_improve.multivariate.methods import ( PCA, PLS, MCUVScaler, SpecificationWarning, center, epsq...
[ "pandas.read_csv", "process_improve.multivariate.methods.PCA", "process_improve.multivariate.methods.MCUVScaler", "numpy.array", "numpy.mean", "pathlib.Path", "numpy.asarray", "process_improve.multivariate.methods.PLS", "pandas.DataFrame", "scipy.sparse.csr_matrix", "sklearn.cross_decomposition....
[((16384, 16459), 'pytest.mark.skip', 'pytest.mark.skip', ([], {'reason': '"""API still has to be improved to handle this case"""'}), "(reason='API still has to be improved to handle this case')\n", (16400, 16459), False, 'import pytest\n'), ((2471, 2533), 'pandas.read_csv', 'pd.read_csv', (["(folder / 'kamyr.csv')"], ...
import os import sys import string from .management import BaseComand class Operation: def __init__(self,app,folder_name): self.app = app self.folder_name = folder_name self.program = "takeaway" self.issue_url = "https://github.com/marlin-dev/startapp" self.PR = "https://git...
[ "os.path.isfile", "os.path.isdir", "sys.exit" ]
[((432, 463), 'os.path.isdir', 'os.path.isdir', (['self.folder_name'], {}), '(self.folder_name)\n', (445, 463), False, 'import os\n'), ((490, 521), 'os.path.isdir', 'os.path.isdir', (['self.folder_name'], {}), '(self.folder_name)\n', (503, 521), False, 'import os\n'), ((525, 557), 'os.path.isfile', 'os.path.isfile', ([...
#!/usr/bin/env python3 # Primary Developer: <NAME> # Additional Developers: Dr. <NAME>, Dr. <NAME>, <NAME>, <NAME> import argparse import pandas as pd import os import sys import scipy from gtfparse import read_gtf from subprocess import call from scipy import stats # shell=True is so you can handle redirects call(...
[ "pandas.Series", "gtfparse.read_gtf", "scipy.stats.gmean", "pandas.read_csv", "argparse.ArgumentParser", "os.path.splitext", "os.getcwd", "subprocess.call", "os.path.basename", "sys.exit", "pandas.concat", "os.remove" ]
[((315, 349), 'subprocess.call', 'call', (['"""echo \'Running\'"""'], {'shell': '(True)'}), '("echo \'Running\'", shell=True)\n', (319, 349), False, 'from subprocess import call\n'), ((423, 514), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Check purity of multiple myeloma tumor sample...
from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import render, redirect from django.urls import reverse_lazy from django.views.generic import DetailView, CreateView, UpdateView from django.views import generic as views from petstagram.main.models import PetPhoto class PetPhotoDetailsVi...
[ "django.shortcuts.redirect", "petstagram.main.models.PetPhoto.objects.get", "django.urls.reverse_lazy" ]
[((1298, 1323), 'django.urls.reverse_lazy', 'reverse_lazy', (['"""dashboard"""'], {}), "('dashboard')\n", (1310, 1323), False, 'from django.urls import reverse_lazy\n'), ((1740, 1767), 'petstagram.main.models.PetPhoto.objects.get', 'PetPhoto.objects.get', ([], {'pk': 'pk'}), '(pk=pk)\n', (1760, 1767), False, 'from pets...
#! python3 # requestWrite.py - Writing the downloaded page to a file # Import libraries import requests, os os.chdir('S:\\Documents\\GitHub\\ATBS\\Chapter_11') res = requests.get('https://automatetheboringstuff.com/files/rj.txt') res.raise_for_status() playFile = open('RomeoAndJuliet.txt', 'wb') for chunk in res.i...
[ "os.chdir", "requests.get" ]
[((110, 161), 'os.chdir', 'os.chdir', (['"""S:\\\\Documents\\\\GitHub\\\\ATBS\\\\Chapter_11"""'], {}), "('S:\\\\Documents\\\\GitHub\\\\ATBS\\\\Chapter_11')\n", (118, 161), False, 'import requests, os\n'), ((169, 232), 'requests.get', 'requests.get', (['"""https://automatetheboringstuff.com/files/rj.txt"""'], {}), "('ht...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2014 Yahoo! 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 # # ...
[ "constructs.digraph.DirectedGraph" ]
[((840, 863), 'constructs.digraph.DirectedGraph', 'digraph.DirectedGraph', ([], {}), '()\n', (861, 863), False, 'from constructs import digraph\n'), ((1000, 1023), 'constructs.digraph.DirectedGraph', 'digraph.DirectedGraph', ([], {}), '()\n', (1021, 1023), False, 'from constructs import digraph\n'), ((1103, 1126), 'con...
from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.db import models class AuthorProfile(models.Model): user = models.OneToOneField(User, related_name='author_profile') short_bio = models.CharField(max_length=255, blank=True, default='') bio = models.TextFi...
[ "django.db.models.OneToOneField", "django.db.models.TextField", "django.db.models.UrlField", "django.db.models.ManyToManyField", "django.db.models.DateTimeField", "django.db.models.CharField" ]
[((166, 223), 'django.db.models.OneToOneField', 'models.OneToOneField', (['User'], {'related_name': '"""author_profile"""'}), "(User, related_name='author_profile')\n", (186, 223), False, 'from django.db import models\n'), ((240, 296), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(255)', 'blan...
# Copyright (c) 2019, NVIDIA Corporation. All rights reserved. # # This work is made available under the Nvidia Source Code License-NC. # To view a copy of this license, visit # https://nvlabs.github.io/stylegan2/license.html """Custom TensorFlow ops for efficient resampling of 2D images.""" import os import numpy as...
[ "tensorflow.nn.conv2d", "tensorflow.shape", "tensorflow.pad", "tensorflow.transpose", "numpy.asarray", "os.path.splitext", "numpy.sum", "numpy.outer", "tensorflow.constant", "tensorflow.nn.conv2d_transpose", "tensorflow.reshape", "tensorflow.convert_to_tensor" ]
[((3245, 3268), 'tensorflow.convert_to_tensor', 'tf.convert_to_tensor', (['x'], {}), '(x)\n', (3265, 3268), True, 'import tensorflow as tf\n'), ((3277, 3308), 'numpy.asarray', 'np.asarray', (['k'], {'dtype': 'np.float32'}), '(k, dtype=np.float32)\n', (3287, 3308), True, 'import numpy as np\n'), ((3793, 3838), 'tensorfl...
from setuptools import setup from setuptools import find_packages with open('README.md', 'r') as f: readme = f.read() with open('VERSION', 'r') as f: version = f.read().strip() runtime_deps = [ 'click', 'tabulate' ] documentation_deps = [ 'sphinx', 'sphinx_autodoc_typehints', 'sphinx_rtd_...
[ "setuptools.find_packages" ]
[((407, 422), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (420, 422), False, 'from setuptools import find_packages\n')]
# -*- coding: utf-8 -*- import collections import os import re try: # pathlib is in python stdlib in python 3.5+ from pathlib import Path except ImportError: from pathlib2 import Path whitespace_re = re.compile(r'(\\ )+$') IGNORE_RULE_FIELDS = [ 'pattern', 'regex', # Basic values 'negation', 'dir...
[ "re.escape", "collections.namedtuple", "re.compile", "pathlib2.Path", "re.search" ]
[((213, 236), 're.compile', 're.compile', (['"""(\\\\\\\\ )+$"""'], {}), "('(\\\\\\\\ )+$')\n", (223, 236), False, 'import re\n'), ((494, 551), 'collections.namedtuple', 'collections.namedtuple', (['"""IgnoreRule_"""', 'IGNORE_RULE_FIELDS'], {}), "('IgnoreRule_', IGNORE_RULE_FIELDS)\n", (516, 551), False, 'import colle...
"""Config flow to configure the RainMachine component.""" from regenmaschine import Client from regenmaschine.errors import RainMachineError import voluptuous as vol from homeassistant import config_entries from homeassistant.const import CONF_IP_ADDRESS, CONF_PASSWORD, CONF_PORT, CONF_SSL from homeassistant.helpers i...
[ "regenmaschine.Client", "voluptuous.Required", "voluptuous.Optional", "homeassistant.helpers.aiohttp_client.async_get_clientsession" ]
[((1545, 1594), 'homeassistant.helpers.aiohttp_client.async_get_clientsession', 'aiohttp_client.async_get_clientsession', (['self.hass'], {}), '(self.hass)\n', (1583, 1594), False, 'from homeassistant.helpers import aiohttp_client\n'), ((1612, 1638), 'regenmaschine.Client', 'Client', ([], {'session': 'websession'}), '(...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Library to parse the market data file form BmfBovespa @author: ucaiado Created on 06/10/2016 """ # import libraries import os import zipfile import pandas as pd import subprocess ''' Begin help functions ''' class NoMappedException(Exception): """ NoMappedExcep...
[ "os.path.abspath", "subprocess.check_output", "pandas.to_datetime", "zipfile.ZipFile" ]
[((1525, 1549), 'os.path.abspath', 'os.path.abspath', (['s_fname'], {}), '(s_fname)\n', (1540, 1549), False, 'import os\n'), ((1782, 1811), 'zipfile.ZipFile', 'zipfile.ZipFile', (['s_fname', '"""r"""'], {}), "(s_fname, 'r')\n", (1797, 1811), False, 'import zipfile\n'), ((3368, 3435), 'zipfile.ZipFile', 'zipfile.ZipFile...
import re import urllib from plugins.plugin import PluginTemplate # MIT License # # Copyright (c) 2018 <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, includin...
[ "re.sub", "urllib.parse.urlparse" ]
[((2709, 2786), 're.sub', 're.sub', (['csp_meta_tag_pattern', "b''", 'flow.response.content'], {'flags': 're.IGNORECASE'}), "(csp_meta_tag_pattern, b'', flow.response.content, flags=re.IGNORECASE)\n", (2715, 2786), False, 'import re\n'), ((3569, 3641), 're.sub', 're.sub', (['"""upgrade-insecure-requests[;\\\\s]*"""', '...
import os from warnings import warn from urllib.error import HTTPError import pandas as pd from shapely import wkb, wkt from .._data import _convert_gdf as convert_gdf def _deserialize_wkb(str): return wkb.loads(str, hex=True) def _deserialize_wkt(str): return wkt.loads(str) def get_lehd(dataset="wac", ...
[ "pandas.read_csv", "shapely.wkt.loads", "pandas.read_excel", "warnings.warn", "os.path.abspath", "shapely.wkb.loads" ]
[((210, 234), 'shapely.wkb.loads', 'wkb.loads', (['str'], {'hex': '(True)'}), '(str, hex=True)\n', (219, 234), False, 'from shapely import wkb, wkt\n'), ((275, 289), 'shapely.wkt.loads', 'wkt.loads', (['str'], {}), '(str)\n', (284, 289), False, 'from shapely import wkb, wkt\n'), ((1480, 1545), 'pandas.read_csv', 'pd.re...
""" songbook.__main__ ~~~~~~~~~~~~~~~~~ A one line summary of the module or program, terminated by a period. """ import argparse from songbook import __version__ from songbook.cli import cli from songbook.gui import gui def _build_parser(): parser = argparse.ArgumentParser(prog='songbook', descript...
[ "songbook.gui.gui.run", "songbook.cli.cli.run", "argparse.ArgumentParser" ]
[((271, 345), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'prog': '"""songbook"""', 'description': '"""Create a songbook."""'}), "(prog='songbook', description='Create a songbook.')\n", (294, 345), False, 'import argparse\n'), ((1587, 1596), 'songbook.cli.cli.run', 'cli.run', ([], {}), '()\n', (1594, 15...
import os, re import frappe from frappe import _ from frappe.utils import nowdate, add_months import frappe.sessions from six import text_type from api import get_physician_id def get_context(context): frappe.errprint(frappe.session.user) if (frappe.session.user == "Guest" or frappe.db.get_value("User", frappe.se...
[ "frappe.get_traceback", "frappe.get_value", "frappe.db.get_value", "frappe.conf.get", "frappe._", "os.path.join", "frappe.sessions.get", "frappe.errprint", "frappe.db.commit", "frappe.sessions.get_csrf_token", "frappe.db.sql", "api.get_physician_id", "frappe.get_hooks", "re.sub", "frappe...
[((205, 241), 'frappe.errprint', 'frappe.errprint', (['frappe.session.user'], {}), '(frappe.session.user)\n', (220, 241), False, 'import frappe\n'), ((461, 479), 'frappe.get_hooks', 'frappe.get_hooks', ([], {}), '()\n', (477, 479), False, 'import frappe\n'), ((664, 696), 'frappe.sessions.get_csrf_token', 'frappe.sessio...
# -------------------------------------------------------- # Copyright (C) 2020 NVIDIA Corporation. All rights reserved. # Nvidia Source Code License-NC # -------------------------------------------------------- # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import torch from . import transform...
[ "torch.Tensor" ]
[((360, 398), 'torch.Tensor', 'torch.Tensor', (['[0.2175, 0.0188, 0.0045]'], {}), '([0.2175, 0.0188, 0.0045])\n', (372, 398), False, 'import torch\n'), ((414, 516), 'torch.Tensor', 'torch.Tensor', (['[[-0.5675, 0.7192, 0.4009], [-0.5808, -0.0045, -0.814], [-0.5836, -0.6948, \n 0.4203]]'], {}), '([[-0.5675, 0.7192, 0...
import secrets print(secrets.token_hex(32))
[ "secrets.token_hex" ]
[((21, 42), 'secrets.token_hex', 'secrets.token_hex', (['(32)'], {}), '(32)\n', (38, 42), False, 'import secrets\n')]
from q2_api_client.clients.base_q2_client import BaseQ2Client from q2_api_client.endpoints.mobile_ws_endpoints import V2Endpoint class V2Client(BaseQ2Client): def get_commercial_tax_payments(self): """GET /mobilews/v2/commercial/taxpayment :return: Response object :rtype: requests.Respon...
[ "q2_api_client.endpoints.mobile_ws_endpoints.V2Endpoint.COMMERCIAL_TAX_PAYMENT_ID.value.format" ]
[((713, 781), 'q2_api_client.endpoints.mobile_ws_endpoints.V2Endpoint.COMMERCIAL_TAX_PAYMENT_ID.value.format', 'V2Endpoint.COMMERCIAL_TAX_PAYMENT_ID.value.format', ([], {'id': 'tax_payment_id'}), '(id=tax_payment_id)\n', (762, 781), False, 'from q2_api_client.endpoints.mobile_ws_endpoints import V2Endpoint\n')]
import sqlite3, json from sqlite3 import Error def create_connection(database): try: conn = sqlite3.connect(database, isolation_level=None, check_same_thread = False) conn.row_factory = lambda c, r: dict(zip([col[0] for col in c.description], r)) return conn except Error as e: ...
[ "json.dumps", "sqlite3.connect" ]
[((999, 1015), 'json.dumps', 'json.dumps', (['rows'], {}), '(rows)\n', (1009, 1015), False, 'import sqlite3, json\n'), ((105, 177), 'sqlite3.connect', 'sqlite3.connect', (['database'], {'isolation_level': 'None', 'check_same_thread': '(False)'}), '(database, isolation_level=None, check_same_thread=False)\n', (120, 177)...
import bisect import collections import os import queue import random import subprocess import threading import time import traceback from hydrus.core import HydrusData from hydrus.core import HydrusExceptions from hydrus.core import HydrusGlobals as HG NEXT_THREAD_CLEAROUT = 0 THREADS_TO_THREAD_INFO = {} THREAD_INF...
[ "hydrus.core.HydrusData.ShowException", "time.sleep", "hydrus.core.HydrusGlobals.controller.ReleaseThreadSlot", "threading.Thread.__init__", "hydrus.core.HydrusGlobals.controller.sub", "hydrus.core.HydrusData.TimeHasPassed", "threading.Lock", "hydrus.core.HydrusData.GetTimeDeltaUntilTimeFloat", "ran...
[((329, 345), 'threading.Lock', 'threading.Lock', ([], {}), '()\n', (343, 345), False, 'import threading\n'), ((940, 986), 'hydrus.core.HydrusData.TimeHasPassed', 'HydrusData.TimeHasPassed', (['NEXT_THREAD_CLEAROUT'], {}), '(NEXT_THREAD_CLEAROUT)\n', (964, 986), False, 'from hydrus.core import HydrusData\n'), ((1586, 1...
import fnmatch import os import platform import subprocess import sys import logging from distutils.version import LooseVersion from setuptools import setup, Extension log = logging.getLogger(__name__) ch = logging.StreamHandler() log.addHandler(ch) MIN_GEOS_VERSION = "3.5" if "all" in sys.warnoptions: # show GE...
[ "logging.getLogger", "logging.StreamHandler", "subprocess.Popen", "os.environ.get", "os.path.join", "setuptools.Extension", "pybind11.get_include", "platform.system", "fnmatch.filter", "distutils.version.LooseVersion", "os.walk" ]
[((175, 202), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (192, 202), False, 'import logging\n'), ((208, 231), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (229, 231), False, 'import logging\n'), ((3421, 3440), 'os.walk', 'os.walk', (['"""./source"""'], {}), "('....
# -*- coding: utf-8 -*- # This file is distributed under the same License of Python # Copyright (c) 2014 <NAME> <<EMAIL>> """ build_manpage.py Add a `build_manpage` command to your setup.py. To use this Command class import the class to your setup.py, and add a command to call this class:: from build_manpage ...
[ "distutils.command.build.build.sub_commands.append", "distutils.errors.DistutilsOptionError", "datetime.date.today" ]
[((8968, 9018), 'distutils.command.build.build.sub_commands.append', 'build.sub_commands.append', (["('build_manpage', None)"], {}), "(('build_manpage', None))\n", (8993, 9018), False, 'from distutils.command.build import build\n'), ((2200, 2221), 'datetime.date.today', 'datetime.date.today', ([], {}), '()\n', (2219, 2...
#!/usr/bin/python # # BoardFiles # # Author: <NAME> # # Copyright (c) 2015-2017 Author and INTI # Distributed under the BSD 3-Clause License # import argparse, yaml, os, sys # To support yaml in Debian: aptitude install python-yaml python3-yaml ## Parsing the command line #############################################...
[ "os.path.exists", "argparse.ArgumentParser", "os.makedirs", "os.path.splitext", "os.path.basename", "sys.exit" ]
[((366, 475), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Creates Constraints and Top Level HDL files based on a YAML file."""'}), "(description=\n 'Creates Constraints and Top Level HDL files based on a YAML file.')\n", (389, 475), False, 'import argparse, yaml, os, sys\n'), ((768...
''' trainer for GAT model ---- ACM CHIL 2020 paper <NAME>, 200228 ''' import os,sys,pickle,time,random,glob import numpy as np import pandas as pd from typing import List import copy import os.path as osp import torch import torch.utils.data from torch_sparse import SparseTensor, cat from torch_g...
[ "torch.LongTensor", "torch.from_numpy", "torch.cuda.is_available", "os.remove", "numpy.mean", "torch.nn.functional.nll_loss", "numpy.random.seed", "random.randint", "glob.glob", "pickle.load", "torch.nn.functional.log_softmax", "torch_geometric.nn.GATConv", "time.time", "torch_geometric.da...
[((816, 862), 'torch.LongTensor', 'torch.LongTensor', (['[coo_data.row, coo_data.col]'], {}), '([coo_data.row, coo_data.col])\n', (832, 862), False, 'import torch\n'), ((2170, 2196), 'random.randint', 'random.randint', (['(1)', '(1000000)'], {}), '(1, 1000000)\n', (2184, 2196), False, 'import os, sys, pickle, time, ran...
import os, sys import unittest as unittest0 try: unittest0.skipUnless unittest0.skip except AttributeError: import unittest2 as unittest else: unittest = unittest0 del unittest0 import win32api import win32security import ntsecuritycon from winsys.tests import utils if not utils.i_am_admin (): raise Runtime...
[ "winsys.tests.utils.add_user_to_group", "winsys._security._tokens.token", "unittest2.main", "winsys.tests.utils.i_am_admin", "win32security.LookupAccountName", "winsys.tests.utils.delete_group", "winsys._security._tokens.Token", "winsys.tests.utils.create_group", "win32api.GetCurrentProcess", "win...
[((284, 302), 'winsys.tests.utils.i_am_admin', 'utils.i_am_admin', ([], {}), '()\n', (300, 302), False, 'from winsys.tests import utils\n'), ((3741, 3756), 'unittest2.main', 'unittest.main', ([], {}), '()\n', (3754, 3756), True, 'import unittest2 as unittest\n'), ((3763, 3782), 'sys.stdout.isatty', 'sys.stdout.isatty',...
import numpy as np from sklearn import linear_model from sklearn.preprocessing import scale from sklearn.datasets import make_regression from plasticnet.solvers.functional import ( ordinary_least_squares, ridge, lasso, elastic_net, general_plastic_net, plastic_ridge, plastic_lasso, har...
[ "numpy.random.rand", "numpy.random.exponential", "plasticnet.solvers.functional.elastic_net", "plasticnet.solvers.functional.ridge", "plasticnet.solvers.functional.unified_plastic_net", "sklearn.datasets.make_regression", "numpy.testing.assert_almost_equal", "numpy.dot", "plasticnet.solvers.function...
[((653, 723), 'sklearn.datasets.make_regression', 'make_regression', ([], {'n_samples': 'N', 'n_features': 'D', 'n_informative': 'N', 'coef': '(True)'}), '(n_samples=N, n_features=D, n_informative=N, coef=True)\n', (668, 723), False, 'from sklearn.datasets import make_regression\n'), ((778, 809), 'sklearn.linear_model....
import pymongo from bson.code import Code from bson.son import SON MAX_WORD_LENGTH = 200 class WordCount(object): def __init__(self, client_url, sourceDatabaseStr, sourceCollectionStr, targetDatabaseStr, targetCollectionStr): self.client = pymongo.MongoClient(client_url) self.sourceDatabase = sou...
[ "pymongo.MongoClient", "bson.code.Code", "bson.son.SON" ]
[((255, 286), 'pymongo.MongoClient', 'pymongo.MongoClient', (['client_url'], {}), '(client_url)\n', (274, 286), False, 'import pymongo\n'), ((1442, 2201), 'bson.code.Code', 'Code', (['"""\n function( key, values ) {\n var ret = {\'documents\':0,\'occurrences\':0,\'totalWords\':0}\n ...
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="coderunner", version="1.0", license="MIT", author="<NAME>", author_email="<EMAIL>", description="A judge for your programs, run and test your programs using python", keywords="judg...
[ "setuptools.find_packages" ]
[((962, 988), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (986, 988), False, 'import setuptools\n')]
from objects.modulebase import ModuleBase from objects.permissions import PermissionEmbedLinks, PermissionAttachFiles from io import BytesIO from discord import Embed, Colour, File from constants import ID_REGEX, EMOJI_REGEX EMOJI_ENDPOINT = 'https://cdn.discordapp.com/emojis/{}' TWEMOJI_ENDPOINT = 'https://bot.mo...
[ "constants.EMOJI_REGEX.fullmatch", "discord.Colour.gold", "constants.ID_REGEX.fullmatch", "objects.permissions.PermissionAttachFiles", "objects.permissions.PermissionEmbedLinks" ]
[((582, 604), 'objects.permissions.PermissionEmbedLinks', 'PermissionEmbedLinks', ([], {}), '()\n', (602, 604), False, 'from objects.permissions import PermissionEmbedLinks, PermissionAttachFiles\n'), ((606, 629), 'objects.permissions.PermissionAttachFiles', 'PermissionAttachFiles', ([], {}), '()\n', (627, 629), False,...
import pytest from attr.exceptions import FrozenInstanceError from mindmeld.components.request import Request, Params, FrozenParams @pytest.fixture def request(): return Request(domain='some_domain', intent='some_intent', entities=(), text='some_text') def test_domain(request): with pytest.raises...
[ "mindmeld.components.request.FrozenParams", "mindmeld.components.request.Params", "pytest.raises", "mindmeld.components.request.Request" ]
[((183, 270), 'mindmeld.components.request.Request', 'Request', ([], {'domain': '"""some_domain"""', 'intent': '"""some_intent"""', 'entities': '()', 'text': '"""some_text"""'}), "(domain='some_domain', intent='some_intent', entities=(), text=\n 'some_text')\n", (190, 270), False, 'from mindmeld.components.request i...
import numpy as np class DataSet(object): def __init__(self, data, shuffle=False): self._data = self._auto_expand(data) self._num_members = self._data.shape[0] self._index_in_epoch = 0 # Shuffle the data if shuffle: perm = np.arange(self._num_members) np.random.shuffle(perm) sel...
[ "numpy.random.randint", "numpy.expand_dims", "numpy.arange", "numpy.random.shuffle" ]
[((252, 280), 'numpy.arange', 'np.arange', (['self._num_members'], {}), '(self._num_members)\n', (261, 280), True, 'import numpy as np\n'), ((287, 310), 'numpy.random.shuffle', 'np.random.shuffle', (['perm'], {}), '(perm)\n', (304, 310), True, 'import numpy as np\n'), ((717, 745), 'numpy.arange', 'np.arange', (['self._...