code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import argparse import json import papermill as pm parser = argparse.ArgumentParser() parser.add_argument("input", help="input Jupyter notebook") parser.add_argument("output", help="output Jupyter notebook") parser.add_argument("parameters", help="parameter file in JSON") args = parser.parse_args() parameters = json.l...
[ "papermill.execute_notebook", "argparse.ArgumentParser" ]
[((61, 86), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (84, 86), False, 'import argparse\n'), ((367, 423), 'papermill.execute_notebook', 'pm.execute_notebook', (['args.input', 'args.output', 'parameters'], {}), '(args.input, args.output, parameters)\n', (386, 423), True, 'import papermill a...
#!/usr/bin/python # -*- coding: utf-8 -*- ''' Copyright 2018 <NAME> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law ...
[ "datetime.datetime.now", "time.sleep" ]
[((1024, 1032), 'time.sleep', 'sleep', (['(5)'], {}), '(5)\n', (1029, 1032), False, 'from time import sleep\n'), ((912, 935), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (933, 935), False, 'import datetime\n')]
# Lint as: python2, python3 # Copyright 2019 Google LLC. 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 req...
[ "tfx.orchestration.experimental.runtime_parameter.runtime_string_parameter.RuntimeStringParameter.parse", "re.findall", "kfp.dsl.PipelineParam" ]
[((1089, 1165), 're.findall', 're.findall', (['runtime_string_parameter.PARAMETER_PATTERN', 'serialized_component'], {}), '(runtime_string_parameter.PARAMETER_PATTERN, serialized_component)\n', (1099, 1165), False, 'import re\n'), ((1246, 1312), 'tfx.orchestration.experimental.runtime_parameter.runtime_string_parameter...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2016-04-25 23:12:05 # @Author : Bluethon (<EMAIL>) # @Link : http://github.com/bluethon from flask import Blueprint auth = Blueprint('auth', __name__) # noinspection PyUnresolvedReferences from . import views
[ "flask.Blueprint" ]
[((190, 217), 'flask.Blueprint', 'Blueprint', (['"""auth"""', '__name__'], {}), "('auth', __name__)\n", (199, 217), False, 'from flask import Blueprint\n')]
# -*- coding: utf-8 -*- """ description: """ import unittest import os from bs4 import BeautifulSoup from app.crawler import visible, extract_images_links, extract_text from app.settings import BASE_DIR class TestCrawler(unittest.TestCase): def test_visible(self): """ in test_crawler.html all vi...
[ "unittest.main", "app.crawler.visible", "app.crawler.extract_images_links", "bs4.BeautifulSoup", "os.path.join", "app.crawler.extract_text" ]
[((1597, 1612), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1610, 1612), False, 'import unittest\n'), ((487, 521), 'bs4.BeautifulSoup', 'BeautifulSoup', (['html', '"""html.parser"""'], {}), "(html, 'html.parser')\n", (500, 521), False, 'from bs4 import BeautifulSoup\n'), ((394, 457), 'os.path.join', 'os.path.j...
#! /usr/bin/env python3 import random import threading import time class TestThread(threading.Thread): def run(self): for loop_number in range(10): print("{0} Loop: {1}".format(self.name, loop_number)) time.sleep(random.randint(1, 5)) # Construct threads. threads = [] for thr...
[ "random.randint" ]
[((254, 274), 'random.randint', 'random.randint', (['(1)', '(5)'], {}), '(1, 5)\n', (268, 274), False, 'import random\n')]
from carotte import Carotte from app.connector import * my_app = Carotte() @my_app.task def refreshYoutube(author=None): youtube = youtubeConnector(username="") log = youtube.check() return log
[ "carotte.Carotte" ]
[((66, 75), 'carotte.Carotte', 'Carotte', ([], {}), '()\n', (73, 75), False, 'from carotte import Carotte\n')]
"""Word stemming utilities for Sphinx.""" import warnings import snowballstemmer from sphinx.deprecation import RemovedInSphinx70Warning class PorterStemmer: def __init__(self): warnings.warn(f"{self.__class__.__name__} is deprecated, use " "snowballstemmer.stemmer('porter') inste...
[ "warnings.warn", "snowballstemmer.stemmer" ]
[((2019, 2161), 'warnings.warn', 'warnings.warn', (['"""get_stemmer() is deprecated, use snowballstemmer.stemmer(\'porter\') instead."""', 'RemovedInSphinx70Warning'], {'stacklevel': '(2)'}), '(\n "get_stemmer() is deprecated, use snowballstemmer.stemmer(\'porter\') instead."\n , RemovedInSphinx70Warning, stackle...
#! /usr/bin/env python3 """ Copyright (c) 2020 Deutsches Elektronen-Synchrotron DESY See LICENSE.txt for license details. """ import enum import sys import unittest from systemrdl.rdltypes import AccessType from hectare._hectare_types import Field, Register from hectare._HectareVhdlGen import HectareVhdlGen clas...
[ "unittest.main", "hectare._hectare_types.Register", "hectare._HectareVhdlGen.HectareVhdlGen._gen_single_reset_assignment", "hectare._HectareVhdlGen.HectareVhdlGen._gen_single_port", "hectare._hectare_types.Field", "hectare._HectareVhdlGen.HectareVhdlGen._gen_single_field_range", "hectare._HectareVhdlGen...
[((7276, 7291), 'unittest.main', 'unittest.main', ([], {}), '()\n', (7289, 7291), False, 'import unittest\n'), ((429, 449), 'hectare._hectare_types.Register', 'Register', (['"""myreg"""', '(8)'], {}), "('myreg', 8)\n", (437, 449), False, 'from hectare._hectare_types import Field, Register\n'), ((462, 517), 'hectare._He...
# # This file is part of pyasn1-alt-modules software. # # Created by <NAME> # Copyright (c) 2020-2022, Vigil Security, LLC # License: http://vigilsec.com/pyasn1-alt-modules-license.txt # import sys import unittest from pyasn1.codec.der.decoder import decode as der_decoder from pyasn1.codec.der.encoder import encode as...
[ "unittest.TextTestRunner", "pyasn1_alt_modules.rfc5652.ContentType", "pyasn1.codec.der.decoder.decode", "unittest.TestLoader", "pyasn1_alt_modules.rfc5652.ContentInfo", "pyasn1_alt_modules.pem.readBase64fromText", "pyasn1.codec.der.encoder.encode", "pyasn1_alt_modules.rfc5652.SignedData" ]
[((599, 620), 'pyasn1_alt_modules.rfc5652.ContentInfo', 'rfc5652.ContentInfo', ([], {}), '()\n', (618, 620), False, 'from pyasn1_alt_modules import rfc5652\n'), ((670, 707), 'pyasn1_alt_modules.pem.readBase64fromText', 'pem.readBase64fromText', (['self.pem_text'], {}), '(self.pem_text)\n', (692, 707), False, 'from pyas...
""" MIT License Copyright (c) 2019 GamingGeek Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publi...
[ "humanfriendly.format_timespan", "json.load", "os.getpid", "discord.ext.commands.command", "discord.utils.escape_markdown", "jishaku.paginators.WrappedPaginator", "aiotrello.Trello", "random.choice", "time.time", "aiohttp.ClientSession", "datetime.datetime.utcnow", "discord.ext.commands.cooldo...
[((1597, 1623), 'datetime.datetime.utcnow', 'datetime.datetime.utcnow', ([], {}), '()\n', (1621, 1623), False, 'import datetime\n'), ((1650, 1661), 'os.getpid', 'os.getpid', ([], {}), '()\n', (1659, 1661), False, 'import os\n'), ((2476, 2507), 'discord.ext.commands.command', 'commands.command', ([], {'name': '"""invite...
#!/usr/bin/env python # coding=utf-8 # vim:ts=4:sts=4:sw=4:et # # Author: <NAME> # Date: 2020-07-31 11:03:17 +0100 (Fri, 31 Jul 2020) # # https://github.com/harisekhon/pytools # # License: see accompanying Hari Sekhon LICENSE file # # If you're using my code you're welcome to connect with me on LinkedIn # and o...
[ "sys.path.append", "os.path.basename", "os.path.isdir", "os.path.dirname", "os.walk", "os.path.exists", "os.path.isfile", "harisekhon.utils.log_option", "traceback.format_exc", "sys.stdin.readlines", "harisekhon.utils.validate_regex", "harisekhon.utils.log.debug", "glob.glob", "harisekhon....
[((2764, 2793), 'os.path.join', 'os.path.join', (['srcdir', '"""pylib"""'], {}), "(srcdir, 'pylib')\n", (2776, 2793), False, 'import os\n'), ((2794, 2817), 'sys.path.append', 'sys.path.append', (['libdir'], {}), '(libdir)\n', (2809, 2817), False, 'import sys\n'), ((2728, 2753), 'os.path.dirname', 'os.path.dirname', (['...
#!/usr/bin/env python3 # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 from dbus.mainloop.glib import DBusGMainLoop from gi.repository import GObject from partner import PartnerService def main(): """ Entry point. """ DBusGMainLoop(set_as_default=True) PartnerService() GObject.Mai...
[ "dbus.mainloop.glib.DBusGMainLoop", "partner.PartnerService", "gi.repository.GObject.MainLoop" ]
[((249, 283), 'dbus.mainloop.glib.DBusGMainLoop', 'DBusGMainLoop', ([], {'set_as_default': '(True)'}), '(set_as_default=True)\n', (262, 283), False, 'from dbus.mainloop.glib import DBusGMainLoop\n'), ((288, 304), 'partner.PartnerService', 'PartnerService', ([], {}), '()\n', (302, 304), False, 'from partner import Partn...
from django.conf.urls import url from tworaven_apps.api_docs import views, views_swagger urlpatterns = ( url(r'^grpc-test-form$', views.view_test_form, name='view_test_form'), #url(r'^v1/swagger.yml$', # views_swagger.view_swagger_doc_v1, # name='view_swagger_doc_v1'), )
[ "django.conf.urls.url" ]
[((111, 179), 'django.conf.urls.url', 'url', (['"""^grpc-test-form$"""', 'views.view_test_form'], {'name': '"""view_test_form"""'}), "('^grpc-test-form$', views.view_test_form, name='view_test_form')\n", (114, 179), False, 'from django.conf.urls import url\n')]
""" Authon: <NAME> Data: 12/05/2018 """ import random def gera_cpf():#Função para gerar CPF cpf = list(random.choices([0,1,2,3,4,5,6,7,8,9], k=9))#Gera o CPF Aleatório #Cálculo do primeiro digito verificador pesos = [10, 9, 8, 7, 6, 5, 4, 3, 2] primeiro_digito = [] for idx,i in enumerate(cpf): ...
[ "random.choices" ]
[((110, 161), 'random.choices', 'random.choices', (['[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]'], {'k': '(9)'}), '([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], k=9)\n', (124, 161), False, 'import random\n')]
import pygame from pygame.math import Vector2 from pygame.rect import Rect from UI.Button import Button class Container: """ Position in screen space menuSize in screen space""" def __init__(self, position: Vector2, menuSize: Vector2): self.size = menuSize self.position = position ...
[ "pygame.rect.Rect" ]
[((618, 682), 'pygame.rect.Rect', 'Rect', (['self.position.x', 'self.position.y', 'self.size.x', 'self.size.y'], {}), '(self.position.x, self.position.y, self.size.x, self.size.y)\n', (622, 682), False, 'from pygame.rect import Rect\n')]
# Generated by Django 3.0.6 on 2020-05-30 23:22 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0005_formfield_multiple_choices'), ] operations = [ migrations.AlterModelOptions( name='formfield', options={...
[ "django.db.models.PositiveIntegerField", "django.db.migrations.AlterModelOptions" ]
[((239, 318), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""formfield"""', 'options': "{'ordering': ['order']}"}), "(name='formfield', options={'ordering': ['order']})\n", (267, 318), False, 'from django.db import migrations, models\n'), ((464, 502), 'django.db.models.Posit...
from django.conf.urls import patterns, include, url from db_storage.views import ImageView urlpatterns = patterns('', url(r'^(?P<file_name>[^/]+)$', ImageView.as_view(), name='db_storage_image'), )
[ "db_storage.views.ImageView.as_view" ]
[((154, 173), 'db_storage.views.ImageView.as_view', 'ImageView.as_view', ([], {}), '()\n', (171, 173), False, 'from db_storage.views import ImageView\n')]
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config import os import sys # -- Path setup --------------------------------------...
[ "os.path.abspath", "os.path.dirname" ]
[((414, 438), 'os.path.abspath', 'os.path.abspath', (['"""../.."""'], {}), "('../..')\n", (429, 438), False, 'import os\n'), ((672, 697), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (687, 697), False, 'import os\n')]
"""Processor to create histograms and generate plots from fed comparator code.""" import awkward as ak from coffea import hist, processor from coffea.nanoevents.methods import candidate ak.behavior.update(candidate.behavior) class ComparatorCodeProcessor(processor.ProcessorABC): """Runs the analysis.""" de...
[ "awkward.zip", "coffea.hist.Cat", "awkward.behavior.update", "coffea.hist.Bin", "coffea.processor.defaultdict_accumulator" ]
[((188, 226), 'awkward.behavior.update', 'ak.behavior.update', (['candidate.behavior'], {}), '(candidate.behavior)\n', (206, 226), True, 'import awkward as ak\n'), ((361, 415), 'coffea.hist.Cat', 'hist.Cat', (['"""pcc"""', '"""Pattern-Comparator Code Combination"""'], {}), "('pcc', 'Pattern-Comparator Code Combination'...
import click from network_analyzer.analyzer import Analyzer @click.group() def main(): pass @main.command(short_help="Analyze networks") @click.option( "--jsonrpc", help="JsonRPC URL of the ethereum client", default="https://tlbc.rpc.anyblock.tools", show_default=True, metavar="URL", ) @cli...
[ "click.group", "click.option", "network_analyzer.analyzer.Analyzer", "click.Path" ]
[((64, 77), 'click.group', 'click.group', ([], {}), '()\n', (75, 77), False, 'import click\n'), ((147, 301), 'click.option', 'click.option', (['"""--jsonrpc"""'], {'help': '"""JsonRPC URL of the ethereum client"""', 'default': '"""https://tlbc.rpc.anyblock.tools"""', 'show_default': '(True)', 'metavar': '"""URL"""'}), ...
#!/usr/bin/python # -*- coding: utf-8 -*- # created: 2015-04-22 """ZooKeeper 客户端。 和 asyncio 联用时请注意: 所有 watch observer 必须使用 reactor.callFromThread() 将 watch 结果返回给 twisted 线程。 为调用方便,请使用 twisted_kazoo.twisted_callback 对回调进行封装。 """ import logging import threading from queue import Queue from kazoo.client import KazooC...
[ "threading.Thread.__init__", "gcommon.aio.gasync.AsyncThreads.is_main_loop", "kazoo.client.KazooClient", "gcommon.aio.gasync.AsyncEvent", "gcommon.aio.gasync.run_in_main_thread", "queue.Queue", "logging.getLogger" ]
[((529, 555), 'logging.getLogger', 'logging.getLogger', (['"""kazoo"""'], {}), "('kazoo')\n", (546, 555), False, 'import logging\n'), ((1260, 1307), 'gcommon.aio.gasync.run_in_main_thread', 'gasync.run_in_main_thread', (['self._on_conn_failed'], {}), '(self._on_conn_failed)\n', (1285, 1307), False, 'from gcommon.aio im...
import pandas as pd import sklearn.datasets as datasets import pandas_ml as pdml import numpy as np # READ DATASETS AND CLEAR NAN COLUMNS AND ROWS search_data = pd.read_csv( "c:/Users/<NAME>/Desktop/Arya/comp551/2020_US_weekly_symptoms_dataset.csv", sep=',', header=0, engine='python') search_data.drop...
[ "pandas.read_csv", "pandas.merge", "pandas.to_datetime" ]
[((166, 298), 'pandas.read_csv', 'pd.read_csv', (['"""c:/Users/<NAME>/Desktop/Arya/comp551/2020_US_weekly_symptoms_dataset.csv"""'], {'sep': '""","""', 'header': '(0)', 'engine': '"""python"""'}), "(\n 'c:/Users/<NAME>/Desktop/Arya/comp551/2020_US_weekly_symptoms_dataset.csv',\n sep=',', header=0, engine='python'...
from infi.execute import execute_assert_success from .scsi import AixModelMixin, AixSCSIBlockDevice from .native_multipath import AixMultipathBlockDevice from infi.storagemodel.errors import DeviceError class AixRescan(AixModelMixin): def _add_new_devices(self): execute_assert_success(["cfgmgr"]) def ...
[ "infi.execute.execute_assert_success", "infi.asi.executers.aix" ]
[((276, 310), 'infi.execute.execute_assert_success', 'execute_assert_success', (["['cfgmgr']"], {}), "(['cfgmgr'])\n", (298, 310), False, 'from infi.execute import execute_assert_success\n'), ((1202, 1222), 'infi.asi.executers.aix', 'aix_executer', (['device'], {}), '(device)\n', (1214, 1222), True, 'from infi.asi.exec...
from flask_wtf import Form from wtforms import StringField, TextAreaField, BooleanField, SelectField,\ SubmitField,StringField from wtforms.validators import DataRequired, Length, Email, Regexp from wtforms import ValidationError from flask_pagedown.fields import PageDownField from ..models import Role, User,BID_ac...
[ "wtforms.ValidationError", "wtforms.SelectField", "wtforms.validators.Length", "wtforms.validators.Email", "wtforms.BooleanField", "wtforms.validators.Regexp", "wtforms.TextAreaField", "wtforms.SubmitField", "wtforms.FileField", "wtforms.StringField", "wtforms.validators.DataRequired" ]
[((541, 562), 'wtforms.SubmitField', 'SubmitField', (['"""Submit"""'], {}), "('Submit')\n", (552, 562), False, 'from wtforms import StringField, PasswordField, BooleanField, SubmitField, FieldList, FileField, SelectField\n'), ((1036, 1068), 'wtforms.SelectField', 'SelectField', (['"""拍手选择:"""'], {'coerce': 'int'}), "('...
#!/usr/bin/env python """ PyTorch datasets and data augmenters """ ########### # Imports # ########### import cv2 import numpy as np import os import random import torch from PIL import Image, ImageFilter from torch.utils import data from torchvision import transforms ############# # Functions # ############# de...
[ "torchvision.transforms.functional.to_tensor", "argparse.ArgumentParser", "numpy.amin", "random.shuffle", "numpy.arange", "os.path.join", "via.dump", "random.randint", "os.path.exists", "torchvision.transforms.functional.to_pil_image", "cv2.drawContours", "torchvision.transforms.ColorJitter", ...
[((387, 429), 'torchvision.transforms.functional.to_pil_image', 'transforms.functional.to_pil_image', (['tensor'], {}), '(tensor)\n', (421, 429), False, 'from torchvision import transforms\n'), ((501, 537), 'torchvision.transforms.functional.to_tensor', 'transforms.functional.to_tensor', (['pic'], {}), '(pic)\n', (532,...
import logging import random from django.conf import settings from django.db import IntegrityError from django.db.models import Q from rest_access_policy import AccessPolicy from rest_framework import viewsets from store.const import ORDER_IDS_SESSION_PARAM_NAME from store.models import Order from store.serializers i...
[ "django.db.models.Q", "random.seed", "random.randint", "logging.getLogger" ]
[((351, 378), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (368, 378), False, 'import logging\n'), ((2983, 2996), 'random.seed', 'random.seed', ([], {}), '()\n', (2994, 2996), False, 'import random\n'), ((3047, 3108), 'random.randint', 'random.randint', (['*settings.ANONYMOUS_ORDER_ID_G...
import sys sys.path.insert(0, '.') import unittest import load_params import warnings import verify_output class TestVerifyOutput(unittest.TestCase): def setUp(self): self.params = load_params.load_params('test.in') self.time = [0, 10, 20, 30] self.tempW = [40, 42, 44, 46] self.t...
[ "load_params.load_params", "sys.path.insert", "verify_output.verify_output", "warnings.catch_warnings", "unittest.TestLoader" ]
[((11, 34), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""."""'], {}), "(0, '.')\n", (26, 34), False, 'import sys\n'), ((197, 231), 'load_params.load_params', 'load_params.load_params', (['"""test.in"""'], {}), "('test.in')\n", (220, 231), False, 'import load_params\n'), ((459, 495), 'warnings.catch_warnings', 'wa...
############################################################################## # Copyright 2016-2017 Rigetti Computing # # 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...
[ "numpy.asarray", "itertools.count", "pyquil.quilatom.QubitPlaceholder", "pyquil.quilatom.LabelPlaceholder", "pyquil.quilatom.unpack_qubit" ]
[((10548, 10573), 'pyquil.quilatom.LabelPlaceholder', 'LabelPlaceholder', (['"""START"""'], {}), "('START')\n", (10564, 10573), False, 'from pyquil.quilatom import LabelPlaceholder, QubitPlaceholder, unpack_qubit\n'), ((10594, 10617), 'pyquil.quilatom.LabelPlaceholder', 'LabelPlaceholder', (['"""END"""'], {}), "('END')...
# -*- coding: utf-8 -*- from codecs import open # To use a consistent encoding from os import path from setuptools import find_packages, setup here = path.abspath(path.dirname(__file__)) # Get the long description from the relevant file with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_desc...
[ "os.path.dirname", "os.path.join", "setuptools.find_packages" ]
[((167, 189), 'os.path.dirname', 'path.dirname', (['__file__'], {}), '(__file__)\n', (179, 189), False, 'from os import path\n'), ((252, 281), 'os.path.join', 'path.join', (['here', '"""README.rst"""'], {}), "(here, 'README.rst')\n", (261, 281), False, 'from os import path\n'), ((1335, 1367), 'setuptools.find_packages'...
""" There is an array with some numbers. All numbers are equal except for one(imposter). """ def imposter(arr: list) -> str: """ >>> imposter([1,2,1,1,1,1]) 2 >>> imposter(["python", "java", "python", "python"]) 'java' """ n = [] s = set(arr) for e in s: ...
[ "doctest.testmod" ]
[((444, 461), 'doctest.testmod', 'doctest.testmod', ([], {}), '()\n', (459, 461), False, 'import doctest\n')]
import torch import torch.nn as nn import torch.nn.functional as F from model.efficientnet.utils import MemoryEfficientSwish as Swish from model.module import DepthWiseSeparableConvModule as DWSConv from model.module import MaxPool2dSamePad class BiFPN(nn.Module): """ BiFPN block. Depending on its order,...
[ "torch.ones", "model.module.DepthWiseSeparableConvModule", "model.efficientnet.utils.MemoryEfficientSwish", "model.module.MaxPool2dSamePad", "torch.nn.functional.relu", "torch.nn.functional.interpolate" ]
[((645, 688), 'model.module.DepthWiseSeparableConvModule', 'DWSConv', (['n_channels', 'n_channels'], {'relu': '(False)'}), '(n_channels, n_channels, relu=False)\n', (652, 688), True, 'from model.module import DepthWiseSeparableConvModule as DWSConv\n'), ((714, 757), 'model.module.DepthWiseSeparableConvModule', 'DWSConv...
from unittest import TestCase import json from pycrunchbase.resource.node import Node from pycrunchbase.resource.utils import parse_date class TestNode(Node): KNOWN_PROPERTIES = ['property1', 'property2'] def _coerce_values(self): # intentionally coerce bad values for test purposes attr = '...
[ "json.dumps" ]
[((956, 972), 'json.dumps', 'json.dumps', (['data'], {}), '(data)\n', (966, 972), False, 'import json\n')]
import re import html import string from functools import partial from PIL import Image from os.path import split, splitext import random from django.core.files.uploadedfile import InMemoryUploadedFile from ib.models import Post, File from django.conf import settings from os.path import join import subprocess from dj...
[ "functools.partial", "os.path.join", "django.contrib.messages.error", "ib.models.Post", "random.choices", "PIL.Image.open", "re.findall", "ib.models.File", "ib.models.File.objects.bulk_create", "os.path.splitext", "os.path.split", "re.sub", "html.escape" ]
[((2090, 2142), 'django.contrib.messages.error', 'messages.error', (['request', '"""Bad URL. Could not embed."""'], {}), "(request, 'Bad URL. Could not embed.')\n", (2104, 2142), False, 'from django.contrib import messages\n'), ((2328, 2345), 'html.escape', 'html.escape', (['text'], {}), '(text)\n', (2339, 2345), False...
from django.contrib import admin from .models import * # Register your models here. class DoctorAdmin(admin.ModelAdmin): pass admin.site.register(Doctor, DoctorAdmin) class HospitalStaffAdmin(admin.ModelAdmin): pass admin.site.register(HospitalStaff, HospitalStaffAdmin) #insurance created by prem class Insura...
[ "django.contrib.admin.site.register" ]
[((131, 171), 'django.contrib.admin.site.register', 'admin.site.register', (['Doctor', 'DoctorAdmin'], {}), '(Doctor, DoctorAdmin)\n', (150, 171), False, 'from django.contrib import admin\n'), ((226, 280), 'django.contrib.admin.site.register', 'admin.site.register', (['HospitalStaff', 'HospitalStaffAdmin'], {}), '(Hosp...
import discord from collections.abc import Sequence import json import os import requests from types import SimpleNamespace import sys from core.errors import * import base64 import requests import json def loads_to_object(json_file): """ Loads from a json file to a python object filling its properties w...
[ "discord.Embed", "json.dumps", "os.path.isfile", "types.SimpleNamespace", "sys.exit" ]
[((462, 491), 'os.path.isfile', 'os.path.isfile', (['"""config.json"""'], {}), "('config.json')\n", (476, 491), False, 'import os\n'), ((497, 562), 'sys.exit', 'sys.exit', (['"""\'config.json\' not found! Please add it and try again."""'], {}), '("\'config.json\' not found! Please add it and try again.")\n', (505, 562)...
# -*- coding: utf-8 -*- """ Created on Mon Feb 1 13:49:13 2021 @author: Matteo """ import numpy as np import matplotlib.pyplot as plt import PCI_o_B from PCI_o_B import CIfile as CI from PCI_o_B import G2file as g2 from PCI_o_B import SharedFunctions as sf class DAM(g2.G2): def __init__(self,Fold...
[ "numpy.asarray" ]
[((2301, 2321), 'numpy.asarray', 'np.asarray', (['self.tau'], {}), '(self.tau)\n', (2311, 2321), True, 'import numpy as np\n'), ((1952, 1972), 'numpy.asarray', 'np.asarray', (['self.tau'], {}), '(self.tau)\n', (1962, 1972), True, 'import numpy as np\n')]
from app.index import bp from flask import render_template @bp.route("/") def index(): """View function for the Index page Returns: str: HTML template for the Index page """ return render_template("index.html")
[ "app.index.bp.route", "flask.render_template" ]
[((62, 75), 'app.index.bp.route', 'bp.route', (['"""/"""'], {}), "('/')\n", (70, 75), False, 'from app.index import bp\n'), ((208, 237), 'flask.render_template', 'render_template', (['"""index.html"""'], {}), "('index.html')\n", (223, 237), False, 'from flask import render_template\n')]
import telebot import os import json if "TOKEN" in os.environ: bot = telebot.TeleBot(os.environ["TOKEN"]) heroku = True else: with open("../token2.json") as token: heroku = False bot = telebot.TeleBot(json.loads(token.read())["token"])
[ "telebot.TeleBot" ]
[((74, 110), 'telebot.TeleBot', 'telebot.TeleBot', (["os.environ['TOKEN']"], {}), "(os.environ['TOKEN'])\n", (89, 110), False, 'import telebot\n')]
# ------------------------------------------------------------------------ # Copyright 2015 Intel Corporation # # 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/li...
[ "configuration.Configuration.__init__" ]
[((905, 942), 'configuration.Configuration.__init__', 'Configuration.__init__', (['self', 'context'], {}), '(self, context)\n', (927, 942), False, 'from configuration import Configuration\n')]
__author__ = "<NAME>" import numpy as np from tensorflow import keras from sktime_dl.classification._classifier import BaseDeepClassifier from sktime_dl.networks._lstmfcn import LSTMFCNNetwork from sktime_dl.utils import check_and_clean_data, \ check_and_clean_validation_data from sktime_dl.utils import check_is_...
[ "sklearn.utils.check_random_state", "sktime_dl.utils.check_is_fitted", "tensorflow.keras.layers.Dense", "tensorflow.keras.callbacks.ReduceLROnPlateau", "numpy.hstack", "tensorflow.keras.models.Model", "sktime_dl.utils.check_and_clean_data", "sktime_dl.utils.check_and_clean_validation_data" ]
[((4872, 4933), 'tensorflow.keras.models.Model', 'keras.models.Model', ([], {'inputs': 'input_layers', 'outputs': 'output_layer'}), '(inputs=input_layers, outputs=output_layer)\n', (4890, 4933), False, 'from tensorflow import keras\n'), ((6945, 6982), 'sklearn.utils.check_random_state', 'check_random_state', (['self.ra...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Train a detection model from an already prepared dataset. """ import argparse import logging import os import random import sys import warnings import rasterio from aplatam import __version__ from aplatam.build_trainset import CnnTrainsetBuilder from aplatam.train_cl...
[ "rasterio.open", "argparse.ArgumentParser", "logging.basicConfig", "aplatam.build_trainset.CnnTrainsetBuilder", "os.path.exists", "aplatam.util.all_raster_files", "random.seed", "aplatam.train_classifier.train", "os.path.join", "logging.getLogger" ]
[((469, 496), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (486, 496), False, 'import logging\n'), ((870, 1091), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'formatter_class': 'argparse.ArgumentDefaultsHelpFormatter', 'description': '"""Prepare a dataset from a set of pr...
# -*- coding: utf-8 -*- from django.db import migrations, models class Migration(migrations.Migration): dependencies = [] operations = [ migrations.CreateModel( name="Approval", fields=[ ( "id", models.AutoField( ...
[ "django.db.models.TextField", "django.db.models.OneToOneField", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.SmallIntegerField", "django.db.models.DateField", "django.db.models.DateTimeField" ]
[((297, 390), 'django.db.models.AutoField', 'models.AutoField', ([], {'verbose_name': '"""ID"""', 'serialize': '(False)', 'auto_created': '(True)', 'primary_key': '(True)'}), "(verbose_name='ID', serialize=False, auto_created=True,\n primary_key=True)\n", (313, 390), False, 'from django.db import migrations, models\...
# Copyright (c) 2020 Horizon Robotics. 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 applicab...
[ "alf.configurable", "gym.make", "numpy.float32", "copy.copy", "numpy.zeros", "numpy.array", "gym.spaces.Box", "alf.environments.suite_gym.wrap_env", "numpy.prod", "gym.spaces.Dict" ]
[((7467, 7502), 'alf.configurable', 'alf.configurable', ([], {'blacklist': "['env']"}), "(blacklist=['env'])\n", (7483, 7502), False, 'import alf\n'), ((11739, 11765), 'gym.make', 'gym.make', (['environment_name'], {}), '(environment_name)\n', (11747, 11765), False, 'import gym\n'), ((12665, 12839), 'alf.environments.s...
import discord from discord.ext import commands class Admin(commands.Cog): def __init__(self, client): self.client = client @commands.command(help("Deletes the specified number of chats. Default is 2 messages.")) @commands.has_permissions(manage_messages=True) async def clear(self, ctx, amou...
[ "discord.utils.get", "discord.ext.commands.has_permissions", "discord.ext.commands.command", "discord.Colour" ]
[((238, 284), 'discord.ext.commands.has_permissions', 'commands.has_permissions', ([], {'manage_messages': '(True)'}), '(manage_messages=True)\n', (262, 284), False, 'from discord.ext import commands\n'), ((716, 734), 'discord.ext.commands.command', 'commands.command', ([], {}), '()\n', (732, 734), False, 'from discord...
from django.contrib import admin from django.db.models import Count from .models import * @admin.register(Status) class StatusAdmin(admin.ModelAdmin): list_display = ('code',) @admin.register(Priority) class PriorityAdmin(admin.ModelAdmin): list_display = ('code',) @admin.register(Issue) class IssueAdmin...
[ "django.db.models.Count", "django.contrib.admin.register" ]
[((94, 116), 'django.contrib.admin.register', 'admin.register', (['Status'], {}), '(Status)\n', (108, 116), False, 'from django.contrib import admin\n'), ((186, 210), 'django.contrib.admin.register', 'admin.register', (['Priority'], {}), '(Priority)\n', (200, 210), False, 'from django.contrib import admin\n'), ((282, 3...
import traceback from typing import List import httplib2 import os from apiclient import discovery from oauth2client import client from oauth2client import tools from oauth2client.file import Storage # If modifying these scopes, delete your previously saved credentials # at ~/.credentials/sheets.googleapis.com-pytho...
[ "oauth2client.file.Storage", "httplib2.Http", "apiclient.discovery.build", "traceback.print_exc", "os.path.join", "os.makedirs", "oauth2client.client.flow_from_clientsecrets", "os.path.exists", "oauth2client.tools.run_flow", "os.path.expanduser" ]
[((822, 845), 'os.path.expanduser', 'os.path.expanduser', (['"""~"""'], {}), "('~')\n", (840, 845), False, 'import os\n'), ((867, 905), 'os.path.join', 'os.path.join', (['home_dir', '""".credentials"""'], {}), "(home_dir, '.credentials')\n", (879, 905), False, 'import os\n'), ((1007, 1083), 'os.path.join', 'os.path.joi...
import os from flask import Blueprint from flask import json, url_for, current_app from flask import g, request, abort, send_file from flaskext.uploads import UploadSet from ..utils import as_resource, as_collection from ..db import sim as sim_db sims_page = Blueprint('sims', __name__) #STAGE_DIR = '/data/web/htdoc...
[ "flask.Blueprint", "shutil.make_archive", "flask.request.args.get", "os.path.basename", "flask.abort", "tempfile.mkdtemp", "flask.json.loads", "shutil.rmtree" ]
[((263, 290), 'flask.Blueprint', 'Blueprint', (['"""sims"""', '__name__'], {}), "('sims', __name__)\n", (272, 290), False, 'from flask import Blueprint\n'), ((2714, 2749), 'flask.request.args.get', 'request.args.get', (['"""format"""', '"""gztar"""'], {}), "('format', 'gztar')\n", (2730, 2749), False, 'from flask impor...
#!/usr/bin/python import sys import re gatedTweetPath = sys.argv[1] inputPath = sys.argv[2] outputPath = sys.argv[3] tweetIdRegEx = re.compile("[0-9]{18}") gatedTweetSet = set() with open(gatedTweetPath, "r") as f: for l in f: gatedTweetSet.add(long(l)) # print gatedTweetSet outputFile = open(outputPath, "w") ...
[ "re.compile" ]
[((135, 158), 're.compile', 're.compile', (['"""[0-9]{18}"""'], {}), "('[0-9]{18}')\n", (145, 158), False, 'import re\n')]
import tests.scenarios as scenarios from tests.api_test_case import APITestCase from entities import Match, Player import events class TestHappyPath(APITestCase): @classmethod def setUpClass(cls): scenarios.two_players() def match_setup(self): match_id = self.post_to_create_a_new_match()...
[ "tests.scenarios.two_players" ]
[((216, 239), 'tests.scenarios.two_players', 'scenarios.two_players', ([], {}), '()\n', (237, 239), True, 'import tests.scenarios as scenarios\n')]
from __future__ import print_function, division, absolute_import, unicode_literals import datetime def div_timedelta_int(d, i): d_us = d.microseconds + 1000000 * (d.seconds + 86400 * d.days) return datetime.timedelta(microseconds=d_us / i) def div_timedelta(d1, d2): if isinstance(d2, int): retur...
[ "datetime.timedelta" ]
[((208, 249), 'datetime.timedelta', 'datetime.timedelta', ([], {'microseconds': '(d_us / i)'}), '(microseconds=d_us / i)\n', (226, 249), False, 'import datetime\n')]
from socketserver import BaseRequestHandler import pathlib import os import mimetypes import urllib.parse as urlparse urlparse.uses_netloc.append("gemini") urlparse.uses_relative.append("gemini") class GeminiRequest: """A Gemini request, with URL and access to the underlying socket.""" def __init__(self,sock,url,ini...
[ "pathlib.Path", "mimetypes.MimeTypes", "os.access", "urllib.parse.uses_relative.append", "urllib.parse.uses_netloc.append", "urllib.parse.urlparse" ]
[((118, 155), 'urllib.parse.uses_netloc.append', 'urlparse.uses_netloc.append', (['"""gemini"""'], {}), "('gemini')\n", (145, 155), True, 'import urllib.parse as urlparse\n'), ((156, 195), 'urllib.parse.uses_relative.append', 'urlparse.uses_relative.append', (['"""gemini"""'], {}), "('gemini')\n", (185, 195), True, 'im...
"""Added phone field for User Revision ID: 330568e8928c Revises: <PASSWORD> Create Date: 2015-02-05 16:53:40.517660 """ # revision identifiers, used by Alembic. revision = '330568e8928c' down_revision = '<PASSWORD>' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by A...
[ "sqlalchemy.String", "alembic.op.drop_column" ]
[((553, 585), 'alembic.op.drop_column', 'op.drop_column', (['"""users"""', '"""phone"""'], {}), "('users', 'phone')\n", (567, 585), False, 'from alembic import op\n'), ((394, 415), 'sqlalchemy.String', 'sa.String', ([], {'length': '(100)'}), '(length=100)\n', (403, 415), True, 'import sqlalchemy as sa\n')]
from ec_models import Adhesion from ec_xl_parse import get_oil_properties_by_category from ec_oil_props import get_oil_weathering from ec_oil_misc import g_cm_2_to_kg_m_2 def get_oil_adhesions(oil_columns, field_indexes): ''' Getting the adhesion is fairly straightforward. We simply get the val...
[ "ec_oil_misc.g_cm_2_to_kg_m_2", "ec_xl_parse.get_oil_properties_by_category", "ec_oil_props.get_oil_weathering", "ec_models.Adhesion" ]
[((437, 483), 'ec_oil_props.get_oil_weathering', 'get_oil_weathering', (['oil_columns', 'field_indexes'], {}), '(oil_columns, field_indexes)\n', (455, 483), False, 'from ec_oil_props import get_oil_weathering\n'), ((785, 875), 'ec_xl_parse.get_oil_properties_by_category', 'get_oil_properties_by_category', (['oil_column...
from dataclasses import dataclass import time from tinyman.v1.client import TinymanTestnetClient, TinymanMainnetClient from utils import get_trades from colorama import Fore @dataclass class Account: """ DataClass For Bot Account """ address: str private_key: str class Bot: def __init__(self,...
[ "utils.get_trades", "tinyman.v1.client.TinymanMainnetClient", "tinyman.v1.client.TinymanTestnetClient", "time.sleep" ]
[((751, 801), 'tinyman.v1.client.TinymanMainnetClient', 'TinymanMainnetClient', ([], {'user_address': 'account.address'}), '(user_address=account.address)\n', (771, 801), False, 'from tinyman.v1.client import TinymanTestnetClient, TinymanMainnetClient\n'), ((831, 881), 'tinyman.v1.client.TinymanTestnetClient', 'Tinyman...
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-02-03 21:57 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('matsucon2018', '0002_auto_20180203_2326'), ] operations = [ migrations.AddField( model_name='signupextra...
[ "django.db.models.CharField" ]
[((372, 619), 'django.db.models.CharField', 'models.CharField', ([], {'choices': "[('NO_SHIRT', 'En halua paitaa'), ('S', 'S'), ('M', 'M'), ('L', 'L'), ('XL',\n 'XL'), ('OTHER', 'Muu koko (kerro Vapaa sana -kentässä)')]", 'default': '"""NO_SHIRT"""', 'max_length': '(8)', 'verbose_name': '"""Työvoiman T-paidan koko""...
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * ''' IMPORTS ''' import json import requests import traceback # Disable insecure warnings requests.packages.urllib3.disable_warnings() ''' CONSTANTS ''' INTEGRATION_CONTEXT_NAME = 'ImpervaWAF' class Client(BaseClient...
[ "requests.packages.urllib3.disable_warnings", "demistomock.args", "json.loads", "demistomock.command", "traceback.format_exc", "demistomock.params", "demistomock.results" ]
[((191, 235), 'requests.packages.urllib3.disable_warnings', 'requests.packages.urllib3.disable_warnings', ([], {}), '()\n', (233, 235), False, 'import requests\n'), ((16963, 16979), 'demistomock.params', 'demisto.params', ([], {}), '()\n', (16977, 16979), True, 'import demistomock as demisto\n'), ((9097, 9118), 'demist...
############################################################################## # Copyright (c) 2016 Intel Corporation # # 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....
[ "Util.Time.GetCurrMS", "Helpers.ThreadManager.GetThreadManager", "Helpers.TargetManager.GetTargetManager", "Helpers.Configuration.get", "Helpers.VersionMgr.ReadVer", "Util.Sleep.Sleep" ]
[((2534, 2551), 'Util.Sleep.Sleep', 'Sleep.Sleep', (['(0.25)'], {}), '(0.25)\n', (2545, 2551), False, 'from Util import Sleep\n'), ((1526, 1558), 'Helpers.ThreadManager.GetThreadManager', 'ThreadManager.GetThreadManager', ([], {}), '()\n', (1556, 1558), False, 'from Helpers import ThreadManager\n'), ((1604, 1636), 'Hel...
import jax import chex from typing import Union, Optional from .decoder import Decoder from ...utils import ParameterReshaper class RandomDecoder(Decoder): def __init__( self, num_encoding_dims: int, placeholder_params: Union[chex.ArrayTree, chex.Array], rng: chex.PRNGKey = jax.ran...
[ "jax.random.PRNGKey", "jax.random.normal", "jax.random.rademacher" ]
[((313, 334), 'jax.random.PRNGKey', 'jax.random.PRNGKey', (['(0)'], {}), '(0)\n', (331, 334), False, 'import jax\n'), ((878, 964), 'jax.random.normal', 'jax.random.normal', (['rng', '(self.num_encoding_dims, self.base_reshaper.total_params)'], {}), '(rng, (self.num_encoding_dims, self.base_reshaper.\n total_params))...
############################################################################## # Created by: <NAME> # Email: <EMAIL> # # Note: This code was heavily inspired from https://github.com/junfu1115/DANet ############################################################################## from __future__ import division from torch....
[ "torch.mean", "torch.nn.Dropout2d", "torch.bmm", "torch.nn.ReLU", "torch.nn.Conv2d", "torch.nn.Softmax", "torch.zeros" ]
[((659, 734), 'torch.nn.Conv2d', 'Conv2d', ([], {'in_channels': 'in_dim', 'out_channels': '(in_dim // squeezing)', 'kernel_size': '(1)'}), '(in_channels=in_dim, out_channels=in_dim // squeezing, kernel_size=1)\n', (665, 734), False, 'from torch.nn import Module, Conv2d, Parameter, Softmax\n'), ((759, 850), 'torch.nn.Co...
import logging import numpy as np import tensorflow as tf from tensorflow.contrib import slim from tensorflow.contrib import layers from memory import DKVMN from utils import getLogger # set logger logger = getLogger('Deep-IRT-model') def tensor_description(var): """Returns a compact and informative string about a...
[ "tensorflow.clip_by_value", "tensorflow.trainable_variables", "tensorflow.reshape", "tensorflow.nn.sigmoid_cross_entropy_with_logits", "tensorflow.split", "utils.getLogger", "memory.DKVMN", "tensorflow.gather", "tensorflow.math.sigmoid", "tensorflow.variable_scope", "tensorflow.concat", "tenso...
[((209, 236), 'utils.getLogger', 'getLogger', (['"""Deep-IRT-model"""'], {}), "('Deep-IRT-model')\n", (218, 236), False, 'from utils import getLogger\n'), ((1139, 1226), 'tensorflow.placeholder', 'tf.placeholder', (['tf.int32', '[self.args.batch_size, self.args.seq_len]'], {'name': '"""q_data"""'}), "(tf.int32, [self.a...
import requests from pages.book_pages import AllBooksPage # For extracting data from single page of a Website page_content = requests.get("http://books.toscrape.com/index.html").content page = AllBooksPage(page_content) books = page.books # Far extracting data from multiple pages of a Website for p_num in range(1, p...
[ "pages.book_pages.AllBooksPage", "requests.get" ]
[((195, 221), 'pages.book_pages.AllBooksPage', 'AllBooksPage', (['page_content'], {}), '(page_content)\n', (207, 221), False, 'from pages.book_pages import AllBooksPage\n'), ((126, 178), 'requests.get', 'requests.get', (['"""http://books.toscrape.com/index.html"""'], {}), "('http://books.toscrape.com/index.html')\n", (...
# tangoREST.py # # Implements objects used to pass state within Tango. # import redis import pickle import Queue import logging from datetime import datetime, timedelta from config import Config redisConnection = None # Pass in an existing connection to redis, sometimes necessary for testing. def getRedisConnection(c...
[ "pickle.loads", "Queue.Queue", "datetime.timedelta", "redis.StrictRedis", "datetime.datetime.now", "logging.getLogger", "pickle.dumps" ]
[((522, 597), 'redis.StrictRedis', 'redis.StrictRedis', ([], {'host': 'Config.REDIS_HOSTNAME', 'port': 'Config.REDIS_PORT', 'db': '(0)'}), '(host=Config.REDIS_HOSTNAME, port=Config.REDIS_PORT, db=0)\n', (539, 597), False, 'import redis\n'), ((3048, 3062), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (3060...
# -*- coding: utf-8 -*- from django.db import models from model_utils import Choices class Persona(models.Model): nombres = models.CharField(max_length=100, blank=True, null=True) apellidos = models.CharField(max_length=100, blank=True, null=True) razon_social = models.CharField(max_length=100, blank=Tr...
[ "django.db.models.CharField", "django.db.models.TextField", "django.db.models.ForeignKey" ]
[((132, 187), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)', 'blank': '(True)', 'null': '(True)'}), '(max_length=100, blank=True, null=True)\n', (148, 187), False, 'from django.db import models\n'), ((204, 259), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2013-2016 SWITCH http://www.switch.ch # # 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/licens...
[ "subprocess.Popen", "argparse.ArgumentParser", "json.loads", "os.path.exists", "re.search" ]
[((1026, 1093), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""\'ceph health\' nagios plugin."""'}), '(description="\'ceph health\' nagios plugin.")\n', (1049, 1093), False, 'import argparse\n'), ((4262, 4339), 'subprocess.Popen', 'subprocess.Popen', (['ceph_health'], {'stdout': 'subproc...
from easydict import EasyDict D = EasyDict() D.num_gpus = 4 D.batch_size = 24 D.epochs = 80 D.decay_epochs = 20 D.decay_rate = 0.5 D.learning_rate = 1e-3 D.input_dataset = 'ec_pf_tp_AT24_33x33_025' #'multiorigin_cf_tp_AT24_33x33_025' D.block_type = 'nolocal2d' # nolocal2d conv2d D.merge_type = 'add' # concat add ...
[ "easydict.EasyDict" ]
[((35, 45), 'easydict.EasyDict', 'EasyDict', ([], {}), '()\n', (43, 45), False, 'from easydict import EasyDict\n')]
# This binary_search_tree.py is an implementation of binary search tree based on the idea from CLRS, Chapter 12 from tree_visualization import tree_visualize class Binary_tree: def __init__(self): self.root = None def node(self, key, p=None, left=None, right=None): return { ...
[ "tree_visualization.tree_visualize" ]
[((3595, 3623), 'tree_visualization.tree_visualize', 'tree_visualize', (['my_tree.root'], {}), '(my_tree.root)\n', (3609, 3623), False, 'from tree_visualization import tree_visualize\n'), ((4841, 4869), 'tree_visualization.tree_visualize', 'tree_visualize', (['my_tree.root'], {}), '(my_tree.root)\n', (4855, 4869), Fals...
# Generated by Django 2.2.4 on 2019-11-03 15:15 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('recupero', '0002_auto_20191103_1159'), ] operations = [ migrations.AddField( model_name='tipoprestacion', name='anio...
[ "django.db.models.PositiveIntegerField" ]
[((348, 458), 'django.db.models.PositiveIntegerField', 'models.PositiveIntegerField', ([], {'default': '(2019)', 'help_text': '"""Si viene del nomenclador indicar de que versión es"""'}), "(default=2019, help_text=\n 'Si viene del nomenclador indicar de que versión es')\n", (375, 458), False, 'from django.db import ...
from django.shortcuts import render def error_404(request,*args, **argv): data = {} return render(request, 'error_404.html', data)
[ "django.shortcuts.render" ]
[((109, 148), 'django.shortcuts.render', 'render', (['request', '"""error_404.html"""', 'data'], {}), "(request, 'error_404.html', data)\n", (115, 148), False, 'from django.shortcuts import render\n')]
import requests, random, time from bs4 import BeautifulSoup #These functions are what I should have used in the first place lol def getter(url): #extracts images from a url and returns all the images as a list try: imglist = [] page = requests.get(url) soup = BeautifulSoup(page.content, 'html....
[ "random.randint", "random.choice", "time.sleep", "requests.get", "bs4.BeautifulSoup" ]
[((256, 273), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (268, 273), False, 'import requests, random, time\n'), ((286, 328), 'bs4.BeautifulSoup', 'BeautifulSoup', (['page.content', '"""html.parser"""'], {}), "(page.content, 'html.parser')\n", (299, 328), False, 'from bs4 import BeautifulSoup\n'), ((1328,...
from unittest import mock from pytest import fixture @fixture def url(route_url): return route_url('configuration') @mock.patch('senic_hub.backend.commands.supervisor.program_status') @mock.patch('senic_hub.backend.commands.supervisor.start_program') @mock.patch('senic_hub.backend.views.config.sleep') @mock.pa...
[ "unittest.mock.patch", "unittest.mock.call" ]
[((126, 192), 'unittest.mock.patch', 'mock.patch', (['"""senic_hub.backend.commands.supervisor.program_status"""'], {}), "('senic_hub.backend.commands.supervisor.program_status')\n", (136, 192), False, 'from unittest import mock\n'), ((194, 259), 'unittest.mock.patch', 'mock.patch', (['"""senic_hub.backend.commands.sup...
""" Saved progress for Rigor, allowing users to resume long-running runs that fail part way through """ import rigor.logger import tempfile import time import cPickle as pickle import os kPickleProtocol = pickle.HIGHEST_PROTOCOL class Checkpoint(object): """ Saved checkpoint results, loaded from a file """ def __...
[ "tempfile.NamedTemporaryFile", "os.remove", "cPickle.load", "time.time", "cPickle.dump" ]
[((2207, 2265), 'cPickle.dump', 'pickle.dump', (['self._parameters', 'self._file', 'kPickleProtocol'], {}), '(self._parameters, self._file, kPickleProtocol)\n', (2218, 2265), True, 'import cPickle as pickle\n'), ((2577, 2630), 'cPickle.dump', 'pickle.dump', (['(id, entry)', 'self._file', 'kPickleProtocol'], {}), '((id,...
#!/usr/bin/env python3 # Copyright 2017 <NAME>. 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 ...
[ "tensorflow.nn.softmax", "matplotlib.pyplot.figaspect", "matplotlib.pyplot.show", "tensorflow.global_variables_initializer", "tensorflow.argmax", "numpy.zeros", "tensorflow.Session", "tensorflow.nn.softmax_cross_entropy_with_logits_v2", "tensorflow.placeholder", "tensorflow.matmul", "tensorflow....
[((1941, 1979), 'tensorflow.placeholder', 'tf.placeholder', (['tf.float32', '[None, 94]'], {}), '(tf.float32, [None, 94])\n', (1955, 1979), True, 'import tensorflow as tf\n'), ((1988, 2025), 'tensorflow.placeholder', 'tf.placeholder', (['tf.float32', '[None, 3]'], {}), '(tf.float32, [None, 3])\n', (2002, 2025), True, '...
""" The PIMA Indians dataset obtained from the UCI Machine Learning Repository The goal is to predict whether or not a given female patient will contract diabetes based on features such as BMI, age, and number of pregnancies It is a binary classification problem """ import matplotlib.pyplot as plt import numpy...
[ "matplotlib.pyplot.title", "sklearn.model_selection.GridSearchCV", "pandas.read_csv", "sklearn.model_selection.train_test_split", "sklearn.model_selection.cross_val_score", "numpy.logspace", "sklearn.tree.DecisionTreeClassifier", "sklearn.metrics.classification_report", "matplotlib.pyplot.style.use"...
[((771, 794), 'matplotlib.pyplot.style.use', 'plt.style.use', (['"""ggplot"""'], {}), "('ggplot')\n", (784, 794), True, 'import matplotlib.pyplot as plt\n'), ((802, 838), 'pandas.read_csv', 'pd.read_csv', (['"""datasets/diabetes.csv"""'], {}), "('datasets/diabetes.csv')\n", (813, 838), True, 'import pandas as pd\n'), (...
import collections from typing import Any, Optional from plz.cli.composition_operation import CompositionOperation, \ create_path_string_prefix from plz.cli.configuration import Configuration from plz.cli.log import log_info from plz.cli.operation import on_exception_reraise ExecutionStatus = collections.namedtup...
[ "plz.cli.log.log_info", "plz.cli.composition_operation.create_path_string_prefix", "plz.cli.operation.on_exception_reraise", "collections.namedtuple" ]
[((300, 373), 'collections.namedtuple', 'collections.namedtuple', (['"""ExecutionStatus"""', "['running', 'success', 'code']"], {}), "('ExecutionStatus', ['running', 'success', 'code'])\n", (322, 373), False, 'import collections\n'), ((906, 959), 'plz.cli.operation.on_exception_reraise', 'on_exception_reraise', (['"""R...
from ldif import LDIFParser class ParseLDIF(LDIFParser): def __init__(self, input_file, processing_object): LDIFParser.__init__(self, input_file) self.processing_object = processing_object def handle(self,dn, entry): self.processing_object.process_entry(dn, entry)
[ "ldif.LDIFParser.__init__" ]
[((123, 160), 'ldif.LDIFParser.__init__', 'LDIFParser.__init__', (['self', 'input_file'], {}), '(self, input_file)\n', (142, 160), False, 'from ldif import LDIFParser\n')]
import json import pdb from functools import reduce from collections import OrderedDict, Counter import random import re def replace_num_or_special(word): if re.match('\d+', word): return 'NUMBER' elif re.match('[a-zA-Z]+', word): return word else: return 'SPECIAL' building = 'ebu...
[ "re.match", "random.shuffle", "json.load", "pdb.set_trace" ]
[((1859, 1874), 'pdb.set_trace', 'pdb.set_trace', ([], {}), '()\n', (1872, 1874), False, 'import pdb\n'), ((164, 186), 're.match', 're.match', (['"""\\\\d+"""', 'word'], {}), "('\\\\d+', word)\n", (172, 186), False, 'import re\n'), ((442, 455), 'json.load', 'json.load', (['fp'], {}), '(fp)\n', (451, 455), False, 'impor...
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton import psutil async def help(client, msg, args): client.select_lang(msg, "all") await msg.reply(msg.lang["help"]["ok"]) async def start(client, msg, args): client.select_lang(msg, "all") await msg.reply(msg.lang["start"]["ok"]) # ...
[ "psutil.virtual_memory", "psutil.cpu_freq", "psutil.disk_usage", "pyrogram.types.InlineKeyboardButton", "pyrogram.types.InlineKeyboardMarkup", "psutil.cpu_percent" ]
[((2197, 2214), 'psutil.cpu_freq', 'psutil.cpu_freq', ([], {}), '()\n', (2212, 2214), False, 'import psutil\n'), ((2310, 2333), 'psutil.virtual_memory', 'psutil.virtual_memory', ([], {}), '()\n', (2331, 2333), False, 'import psutil\n'), ((2473, 2495), 'psutil.disk_usage', 'psutil.disk_usage', (['"""."""'], {}), "('.')\...
from iota import Iota from iota.crypto.addresses import AddressGenerator seed = b'<KEY>' # generator = AddressGenerator(seed) generator =\ AddressGenerator( seed=seed, security_level=3, ) # Generate a list of addresses: # addresses = generator.get_addresses(index=0, count=5) # NOOO! Document...
[ "iota.crypto.addresses.AddressGenerator" ]
[((146, 191), 'iota.crypto.addresses.AddressGenerator', 'AddressGenerator', ([], {'seed': 'seed', 'security_level': '(3)'}), '(seed=seed, security_level=3)\n', (162, 191), False, 'from iota.crypto.addresses import AddressGenerator\n')]
""" Collects indicators from the World Bank. Currently, we collect indicators from the following URLs: - http://datatopics.worldbank.org/world-development-indicators/themes/economy.html#featured-indicators_1 - http://datatopics.worldbank.org/world-development-indicators/themes/states-and-markets.html#featured-indicator...
[ "sqlalchemy.create_engine", "sqlalchemy.orm.sessionmaker", "pandas_datareader.wb.download" ]
[((2302, 2331), 'sqlalchemy.create_engine', 'create_engine', (['self.db_config'], {}), '(self.db_config)\n', (2315, 2331), False, 'from sqlalchemy import create_engine\n'), ((2350, 2370), 'sqlalchemy.orm.sessionmaker', 'sessionmaker', (['engine'], {}), '(engine)\n', (2362, 2370), False, 'from sqlalchemy.orm import sess...
""" Some analysis of informational content of TLDR-Auth and TLDR-PR """ import os import csv from collections import Counter, defaultdict INFILE = 'tldr_analyze_nuggets/tldr_auth_pr_gold_nuggets_2020-03-31.csv' # Q1: How many nuggets do TLDRs contain? # A: Interesting, both author and PR have nearly identical di...
[ "collections.defaultdict", "collections.Counter", "csv.DictReader" ]
[((2150, 2159), 'collections.Counter', 'Counter', ([], {}), '()\n', (2157, 2159), False, 'from collections import Counter, defaultdict\n'), ((2183, 2192), 'collections.Counter', 'Counter', ([], {}), '()\n', (2190, 2192), False, 'from collections import Counter, defaultdict\n'), ((3414, 3430), 'collections.defaultdict',...
import argparse import bot3 import datetime import praw3 as praw import random import sqlite3 import string import subprocess import sys import time import tkinter import traceback import types from voussoirkit import betterhelp from voussoirkit import mutables from voussoirkit import operatornotify from voussoirkit i...
[ "argparse.ArgumentParser", "voussoirkit.vlogging.getLogger", "random.shuffle", "bot3.login", "voussoirkit.betterhelp.add_previews", "praw3.Reddit", "traceback.print_exc", "random.randint", "voussoirkit.betterhelp.subparser_main", "datetime.datetime.utcfromtimestamp", "traceback.format_exc", "d...
[((410, 444), 'voussoirkit.vlogging.getLogger', 'vlogging.getLogger', (['__name__', '"""sb"""'], {}), "(__name__, 'sb')\n", (428, 444), False, 'from voussoirkit import vlogging\n'), ((2853, 2914), 'sqlite3.connect', 'sqlite3.connect', (['"""D:\\\\git\\\\reddit\\\\subredditbirthdays\\\\sb.db"""'], {}), "('D:\\\\git\\\\r...
from cleantxt import text from tqdm import tqdm import argparse import os def rule(s): try: k, v = map(str, s.split(',')) return k, v except: raise argparse.ArgumentTypeError("Escape Rule must be key,value ") def main(): parser = argparse.ArgumentParser( prog="cleantxt cl...
[ "tqdm.tqdm", "argparse.ArgumentParser", "cleantxt.text.clean_text", "os.path.exists", "os.path.splitext", "argparse.ArgumentTypeError" ]
[((270, 894), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'prog': '"""cleantxt cleaning text from noise commande line interface"""', 'description': '"""Arguments for cleantxt to clean document from noise (cleantxt)"""', 'usage': '""" cleantxt --doc=[path_to_doc] \n --out=[path_out_file...
import utils as util import tensorflow as tf import numpy as np def forecast_model(series, time,forecastDays): split_time=2555 time_train=time[:split_time] x_train=series[:split_time] split_time_test=3285 time_valid=time[split_time:split_time_test] x_valid=series[split_time:split_time_test] ...
[ "tensorflow.random.set_seed", "tensorflow.keras.metrics.mean_absolute_error", "numpy.random.seed", "utils.windowed_dataset", "tensorflow.keras.layers.Dense", "tensorflow.keras.layers.Conv1D", "tensorflow.keras.backend.clear_session", "tensorflow.keras.optimizers.SGD", "tensorflow.keras.losses.Huber"...
[((461, 493), 'tensorflow.keras.backend.clear_session', 'tf.keras.backend.clear_session', ([], {}), '()\n', (491, 493), True, 'import tensorflow as tf\n'), ((498, 520), 'tensorflow.random.set_seed', 'tf.random.set_seed', (['(51)'], {}), '(51)\n', (516, 520), True, 'import tensorflow as tf\n'), ((525, 543), 'numpy.rando...
"""BaseHomMag class code DOCSTRINGS V4 READY """ from magpylib._src.input_checks import check_format_input_scalar from magpylib._src.input_checks import check_format_input_vector class BaseHomMag: """provides the magnetization attribute for homogeneously magnetized magnets""" def __init__(self, magnetizatio...
[ "magpylib._src.input_checks.check_format_input_vector", "magpylib._src.input_checks.check_format_input_scalar" ]
[((676, 844), 'magpylib._src.input_checks.check_format_input_vector', 'check_format_input_vector', (['mag'], {'dims': '(1,)', 'shape_m1': '(3)', 'sig_name': '"""magnetization"""', 'sig_type': '"""array_like (list, tuple, ndarray) with shape (3,)"""', 'allow_None': '(True)'}), "(mag, dims=(1,), shape_m1=3, sig_name=\n ...
# coding: utf-8 """ Views handling the legacy import to EDD. """ import json import logging import uuid from django.conf import settings from django.contrib import messages from django.http import HttpResponse, JsonResponse from django.shortcuts import render from django.utils.translation import ugettext as _ from dj...
[ "uuid.uuid4", "json.loads", "django.http.HttpResponse", "django.contrib.messages.error", "edd.notify.backend.RedisBroker", "json.dumps", "django.http.JsonResponse", "uuid.UUID", "django.utils.translation.ugettext", "logging.getLogger" ]
[((558, 585), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (575, 585), False, 'import logging\n'), ((3062, 3086), 'json.loads', 'json.loads', (['request.body'], {}), '(request.body)\n', (3072, 3086), False, 'import json\n'), ((878, 914), 'django.http.HttpResponse', 'HttpResponse', ([], ...
# Copyright (c) 2015 Intel Research and Development Ireland Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
[ "six.moves.range", "experimental_framework.api.FrameworkApi.get_test_case_features", "mock.patch", "experimental_framework.benchmarking_unit.BenchmarkingUnit.__init__", "experimental_framework.api.FrameworkApi.init", "experimental_framework.api.FrameworkApi.execute_framework", "os.path.join" ]
[((2190, 2238), 'mock.patch', 'mock.patch', (['"""experimental_framework.common.init"""'], {}), "('experimental_framework.common.init')\n", (2200, 2238), False, 'import mock\n'), ((2794, 2958), 'mock.patch', 'mock.patch', (['"""experimental_framework.benchmarking_unit.BenchmarkingUnit.get_required_benchmarks"""'], {'si...
import pyglet from emulator import emulator def start(dt): pyglet.clock.schedule_interval(emulator.main, 1/1000) #need this for pyglet def update(dt): if emulator.cpu.opcode != 0x1210: emulator.cpu.cycle() else: pyglet.clock.unschedule(update) pyglet.clock.schedule_once(start, 3) ...
[ "emulator.emulator", "pyglet.app.run", "pyglet.clock.schedule_once", "pyglet.gl.Config", "pyglet.clock.schedule", "emulator.emulator.loadROM", "pyglet.clock.unschedule", "emulator.emulator.cpu.cycle", "pyglet.clock.schedule_interval" ]
[((64, 119), 'pyglet.clock.schedule_interval', 'pyglet.clock.schedule_interval', (['emulator.main', '(1 / 1000)'], {}), '(emulator.main, 1 / 1000)\n', (94, 119), False, 'import pyglet\n'), ((362, 398), 'pyglet.gl.Config', 'pyglet.gl.Config', ([], {'double_buffer': '(True)'}), '(double_buffer=True)\n', (378, 398), False...
from django.contrib import admin import clone.models as mod admin.site.register(mod.lineChart) admin.site.register(mod.donutChart)
[ "django.contrib.admin.site.register" ]
[((61, 95), 'django.contrib.admin.site.register', 'admin.site.register', (['mod.lineChart'], {}), '(mod.lineChart)\n', (80, 95), False, 'from django.contrib import admin\n'), ((96, 131), 'django.contrib.admin.site.register', 'admin.site.register', (['mod.donutChart'], {}), '(mod.donutChart)\n', (115, 131), False, 'from...
# encoding=utf-8 """ Created on 21:29 2018/11/12 @author: <NAME> """ import numpy as np import scipy.io import scipy.linalg import sklearn.metrics from sklearn.neighbors import KNeighborsClassifier from sklearn.model_selection import train_test_split def kernel(ker, X1, X2, gamma): K = None if not ker...
[ "numpy.eye", "sklearn.model_selection.train_test_split", "numpy.asarray", "numpy.ones", "numpy.hstack", "numpy.argsort", "sklearn.neighbors.KNeighborsClassifier", "numpy.linalg.norm", "numpy.dot", "numpy.linalg.multi_dot" ]
[((1536, 1559), 'numpy.hstack', 'np.hstack', (['(Xs.T, Xt.T)'], {}), '((Xs.T, Xt.T))\n', (1545, 1559), True, 'import numpy as np\n'), ((1573, 1598), 'numpy.linalg.norm', 'np.linalg.norm', (['X'], {'axis': '(0)'}), '(X, axis=0)\n', (1587, 1598), True, 'import numpy as np\n'), ((2127, 2140), 'numpy.argsort', 'np.argsort'...
# -*- coding:utf-8 -*- import numpy as np import pandas as pd data = pd.read_csv('data/shuttle-landing-control.csv',names=['auto_control','stability','error','sign','wind','magnitude','visibility']) ## replacing missing values '*' with 0 data = data.replace('*',0) ## |---------- Data Set Properties ------------| # ...
[ "pandas.read_csv" ]
[((70, 210), 'pandas.read_csv', 'pd.read_csv', (['"""data/shuttle-landing-control.csv"""'], {'names': "['auto_control', 'stability', 'error', 'sign', 'wind', 'magnitude',\n 'visibility']"}), "('data/shuttle-landing-control.csv', names=['auto_control',\n 'stability', 'error', 'sign', 'wind', 'magnitude', 'visibili...
import unittest as ut import pandas as pd import pymc3 as pm from bayesian_inference_confusion_matrix import ConfusionMatrixAnalyser, bayes_laplace_prior class TestConfusionMatrixAnalyser(ut.TestCase): def __init__(self, *args, **kwargs): super(TestConfusionMatrixAnalyser, self).__init__(*args, **kwargs...
[ "unittest.main", "pymc3.sample", "pymc3.Model", "unittest.skip", "pandas.Series", "bayesian_inference_confusion_matrix.ConfusionMatrixAnalyser", "bayesian_inference_confusion_matrix.bayes_laplace_prior.astype", "pymc3.Multinomial" ]
[((3638, 3701), 'unittest.skip', 'ut.skip', (['"""pyMC test is disabled because it takes 15-90 seconds"""'], {}), "('pyMC test is disabled because it takes 15-90 seconds')\n", (3645, 3701), True, 'import unittest as ut\n'), ((5192, 5212), 'unittest.main', 'ut.main', ([], {'verbosity': '(2)'}), '(verbosity=2)\n', (5199,...
# Copyright 2011 <NAME> (wtwf.com) # based on code by '<EMAIL> (<NAME>)' __author__ = 'wtwf.com (<NAME>)' # If you want to check this with pychecker on osx you can do this... # export PYTHONPATH=$PYTHONPATH:/usr/local/google_appengine/ # export PYTHONPATH=$PYTHONPATH:/usr/local/google_appengine/lib/yaml/lib/ from g...
[ "google.appengine.ext.vendor.add", "crud.crud_handler.GetCrudHandler", "auth.decorator.callback_handler" ]
[((355, 372), 'google.appengine.ext.vendor.add', 'vendor.add', (['"""lib"""'], {}), "('lib')\n", (365, 372), False, 'from google.appengine.ext import vendor\n'), ((1133, 1175), 'crud.crud_handler.GetCrudHandler', 'crud_handler.GetCrudHandler', (['mail.MailFeed'], {}), '(mail.MailFeed)\n', (1160, 1175), False, 'from cru...
# coding: utf-8 import numpy as np import math from block_average import block_average def main(): # Enter details here n_samples = [int(2.5e5)] # n_samples = [int(5e5),int(1e6),int(2e6),int(4e6)] for n_sample in n_samples: # Generate uncorrelated random samples uncorrelated_sample...
[ "numpy.random.uniform", "math.exp", "numpy.asarray", "block_average.block_average", "numpy.mean", "numpy.random.normal", "numpy.var" ]
[((324, 355), 'numpy.random.normal', 'np.random.normal', ([], {'size': 'n_sample'}), '(size=n_sample)\n', (340, 355), True, 'import numpy as np\n'), ((375, 404), 'numpy.mean', 'np.mean', (['uncorrelated_samples'], {}), '(uncorrelated_samples)\n', (382, 404), True, 'import numpy as np\n'), ((424, 452), 'numpy.var', 'np....
#! Python from bs4 import BeautifulSoup from urllib.request import urlopen import requests, re, time # Might need to run the following command in windows to change the encoder # chcp 65001 def getInput(datafile): links = open(datafile, 'r') LinkStorage = [] for line in links: goodLine = line.strip('\n') LinkS...
[ "bs4.BeautifulSoup", "re.search", "requests.get", "time.sleep" ]
[((723, 790), 're.search', 're.search', (['"""http://www.biospace.com/jobs/job-listing/(.*)-[0-9]"""', 'i'], {}), "('http://www.biospace.com/jobs/job-listing/(.*)-[0-9]', i)\n", (732, 790), False, 'import requests, re, time\n'), ((866, 897), 'bs4.BeautifulSoup', 'BeautifulSoup', (['html', '"""html5lib"""'], {}), "(html...
""" Code for collecting failure trajectories using Bayesian Optimization Project : Policy correction using Bayesian Optimization Description : The file contains functions for computing failure trajectories given RL policy and safety specifications """ import numpy as np import gym import GPyOp...
[ "pickle.dump", "numpy.abs", "gym.make", "network.FeedForwardActorNN", "torch.load", "eval_policy.display", "torch.Tensor", "numpy.array", "numpy.random.rand", "numpy.arccos" ]
[((1450, 1477), 'torch.Tensor', 'torch.Tensor', (['env.env.state'], {}), '(env.env.state)\n', (1462, 1477), False, 'import torch\n'), ((1592, 1624), 'eval_policy.display', 'display', (['obs', 'policy', 'env', '(False)'], {}), '(obs, policy, env, False)\n', (1599, 1624), False, 'from eval_policy import display\n'), ((40...
# The purpose of this pileine stage script is to copy only the cleaned output files that is needed in the end (such that we can share them easily) import os import pipeline_commons import shutil import ReconstructionUtils def do_output(segmentPath, globalParams): segmentName = pipeline_commons.ext...
[ "os.makedirs", "pipeline_commons.extractSegmentNameFromPath", "os.path.exists", "shutil.copyfile", "os.path.join" ]
[((300, 356), 'pipeline_commons.extractSegmentNameFromPath', 'pipeline_commons.extractSegmentNameFromPath', (['segmentPath'], {}), '(segmentPath)\n', (343, 356), False, 'import pipeline_commons\n'), ((391, 450), 'os.path.join', 'os.path.join', (['globalParams.MINIMAL_OUTPUT_PATH', 'segmentName'], {}), '(globalParams.MI...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
[ "tensorflow.clip_by_value", "models.model_utils.visualize_label_map", "tensorflow.dtypes.cast", "tensorflow.concat", "tensorflow.strings.join", "tensorflow.compat.v1.dimension_value", "tensorflow.squeeze", "tensorflow.slice", "tensorflow.split" ]
[((4813, 4863), 'tensorflow.dtypes.cast', 'tf.dtypes.cast', (['segmaps_few_shots', 'tf.dtypes.int32'], {}), '(segmaps_few_shots, tf.dtypes.int32)\n', (4827, 4863), True, 'import tensorflow as tf\n'), ((4884, 4930), 'tensorflow.dtypes.cast', 'tf.dtypes.cast', (['segmap_target', 'tf.dtypes.int32'], {}), '(segmap_target, ...
import os import locale from decouple import config # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/3.0/howto/deployment...
[ "decouple.config", "os.path.join", "os.path.abspath" ]
[((413, 433), 'decouple.config', 'config', (['"""SECRET_KEY"""'], {}), "('SECRET_KEY')\n", (419, 433), False, 'from decouple import config\n'), ((509, 550), 'decouple.config', 'config', (['"""DEBUG"""'], {'default': '(False)', 'cast': 'bool'}), "('DEBUG', default=False, cast=bool)\n", (515, 550), False, 'from decouple ...
# -*- coding: utf-8 -*- """ tuesmon_ncurses.ui.views.auth ~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ from tuesmon_ncurses.ui.widgets import generic, auth from . import base class LoginView(base.View): login_button = None def __init__(self, username_text, password_text): # Header header = generic.bann...
[ "tuesmon_ncurses.ui.widgets.auth.wrap_login_button", "tuesmon_ncurses.ui.widgets.generic.Notifier", "tuesmon_ncurses.ui.widgets.generic.box_solid_fill", "tuesmon_ncurses.ui.widgets.generic.editor", "tuesmon_ncurses.ui.widgets.generic.button", "tuesmon_ncurses.ui.widgets.generic.center", "tuesmon_ncurses...
[((308, 324), 'tuesmon_ncurses.ui.widgets.generic.banner', 'generic.banner', ([], {}), '()\n', (322, 324), False, 'from tuesmon_ncurses.ui.widgets import generic, auth\n'), ((521, 537), 'tuesmon_ncurses.ui.widgets.generic.editor', 'generic.editor', ([], {}), '()\n', (535, 537), False, 'from tuesmon_ncurses.ui.widgets i...