code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
#!/usr/bin/env python # Copyright (C) 2016 Hewlett Packard Enterprise Development LP # 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/...
[ "opsvalidator.error.ValidationError", "os.walk", "opsrest.utils.utils.get_column_data_from_row", "copy.copy", "os.path.join" ]
[((1049, 1062), 'os.walk', 'os.walk', (['path'], {}), '(path)\n', (1056, 1062), False, 'import os\n'), ((1123, 1151), 'os.path.join', 'os.path.join', (['root', 'filename'], {}), '(root, filename)\n', (1135, 1151), False, 'import os\n'), ((1175, 1190), 'copy.copy', 'copy', (['full_path'], {}), '(full_path)\n', (1179, 11...
from vmad.lib import linalg, mpi from vmad.testing import BaseScalarTest from mpi4py import MPI import numpy from pprint import pprint class Test_allreduce(BaseScalarTest): to_scalar = staticmethod(linalg.to_scalar) comm = MPI.COMM_WORLD x = comm.rank + 1.0 y = comm.allreduce(x) ** 2 x_ = numpy...
[ "vmad.lib.mpi.allreduce", "numpy.eye", "vmad.lib.mpi.allbcast", "numpy.sum" ]
[((315, 327), 'numpy.eye', 'numpy.eye', (['(1)'], {}), '(1)\n', (324, 327), False, 'import numpy\n'), ((715, 727), 'numpy.eye', 'numpy.eye', (['(1)'], {}), '(1)\n', (724, 727), False, 'import numpy\n'), ((514, 541), 'vmad.lib.mpi.allreduce', 'mpi.allreduce', (['x', 'self.comm'], {}), '(x, self.comm)\n', (527, 541), Fal...
"""Strict shared-folder permission checks""" import stat def file_groupreadable(path): """Check whether a given path has bad permissons.""" if not bool(stat.S_IRGRP & path.stat().mode): return 'PROB_FILE_NOT_GRPRD' def file_group_executable(path): """Check if a file should be group executable""" ...
[ "stat.S_ISDIR" ]
[((355, 373), 'stat.S_ISDIR', 'stat.S_ISDIR', (['mode'], {}), '(mode)\n', (367, 373), False, 'import stat\n'), ((625, 643), 'stat.S_ISDIR', 'stat.S_ISDIR', (['mode'], {}), '(mode)\n', (637, 643), False, 'import stat\n')]
#!/usr/bin/env python3 from sys import stderr import os import json import requests from urllib.parse import quote as urlquote from google.oauth2.service_account import IDTokenCredentials from google.oauth2 import id_token from google.auth.transport.requests import Request from twisted.internet import reactor, ssl f...
[ "twisted.logger.textFileLogObserver", "google.auth.transport.requests.Request", "json.loads", "twisted.internet.reactor.listenTCP", "os.environ.get", "google.oauth2.service_account.IDTokenCredentials.from_service_account_info", "twisted.internet.ssl.optionsForClientTLS", "urllib.parse.quote", "twist...
[((2559, 2599), 'os.environ.get', 'os.environ.get', (['"""IAP_CUSTOM_AUTH_HEADER"""'], {}), "('IAP_CUSTOM_AUTH_HEADER')\n", (2573, 2599), False, 'import os\n'), ((3115, 3167), 'twisted.internet.reactor.listenTCP', 'reactor.listenTCP', (['(9000)', 'site'], {'interface': '"""127.0.0.1"""'}), "(9000, site, interface='127....
# ========================================================================================= # Copyright 2016 Community Information Online Consortium (CIOC) and KCL Software Solutions Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Lic...
[ "apscheduler.schedulers.background.BackgroundScheduler", "os.makedirs", "offlinetools.scheduler.key_to_schedule", "offlinetools.models.initialize_sql", "offlinetools.logtools._get_app_data_dir", "pyramid_beaker.session_factory_from_settings", "pyramid.authorization.ACLAuthorizationPolicy", "sqlalchemy...
[((1594, 1627), 'logging.getLogger', 'logging.getLogger', (['"""offlinetools"""'], {}), "('offlinetools')\n", (1611, 1627), False, 'import logging\n'), ((2420, 2439), 'offlinetools.logtools._get_app_data_dir', '_get_app_data_dir', ([], {}), '()\n', (2437, 2439), False, 'from offlinetools.logtools import _get_app_data_d...
import numpy as np from tensorflow.keras.models import load_model import tensorflow as tf import time import gen_data import util import parametric_si def run(): d = 8 IMG_WIDTH = d IMG_HEIGHT = d IMG_CHANNELS = 1 mu_1 = 0 mu_2 = 2 threshold = 20 # np.random.seed...
[ "gen_data.generate", "time.time", "parametric_si.run_parametric_si", "util.compute_u_v", "util.construct_z", "util.construct_test_statistic" ]
[((346, 389), 'gen_data.generate', 'gen_data.generate', (['(1)', 'IMG_WIDTH', 'mu_1', 'mu_2'], {}), '(1, IMG_WIDTH, mu_1, mu_2)\n', (363, 389), False, 'import gen_data\n'), ((824, 879), 'util.construct_test_statistic', 'util.construct_test_statistic', (['x_obs', 'binary_vec', '(d * d)'], {}), '(x_obs, binary_vec, d * d...
import pytest from psh.model import Word, Id, CommandSequence, Command, Case, VarRef, ConstantString from psh.glob import STAR from psh.local import make_env w = lambda w: Word([Id(w)]) a = Word([VarRef(Id("a"))]) echo = lambda out: CommandSequence([Command([Word([Id("echo")]), Word([ConstantString(out)])])]) x = w(...
[ "psh.model.ConstantString", "psh.model.Case", "psh.model.Word", "psh.model.Id", "psh.local.make_env", "psh.model.Command" ]
[((384, 396), 'psh.model.Word', 'Word', (['[STAR]'], {}), '([STAR])\n', (388, 396), False, 'from psh.model import Word, Id, CommandSequence, Command, Case, VarRef, ConstantString\n'), ((1130, 1140), 'psh.local.make_env', 'make_env', ([], {}), '()\n', (1138, 1140), False, 'from psh.local import make_env\n'), ((181, 186)...
import psutil from service_stats.stats.globals import Global class Disk(): @staticmethod def serve_data(): """Serve disk info """ # Title disk_title = '='*15 + ' Disk Information ' + '='*15 partition_title = 'Partitions and Usage:' # Disk Information pa...
[ "service_stats.stats.globals.Global.get_size", "psutil.disk_partitions", "psutil.disk_io_counters", "psutil.disk_usage" ]
[((331, 355), 'psutil.disk_partitions', 'psutil.disk_partitions', ([], {}), '()\n', (353, 355), False, 'import psutil\n'), ((1398, 1423), 'psutil.disk_io_counters', 'psutil.disk_io_counters', ([], {}), '()\n', (1421, 1423), False, 'import psutil\n'), ((658, 697), 'psutil.disk_usage', 'psutil.disk_usage', (['partition.m...
from helpers import inputs from submarine.submarine import Submarine def solution(day): report = inputs.read_to_list(f"inputs/{day}.txt") s = Submarine() power_consumption = s.diagnostics("power_consumption", report) return power_consumption
[ "helpers.inputs.read_to_list", "submarine.submarine.Submarine" ]
[((103, 143), 'helpers.inputs.read_to_list', 'inputs.read_to_list', (['f"""inputs/{day}.txt"""'], {}), "(f'inputs/{day}.txt')\n", (122, 143), False, 'from helpers import inputs\n'), ((152, 163), 'submarine.submarine.Submarine', 'Submarine', ([], {}), '()\n', (161, 163), False, 'from submarine.submarine import Submarine...
from django.contrib import admin from .models import Proposal, ProposalStatus, Feedback # Register your models here. admin.site.register(Proposal) admin.site.register(ProposalStatus) admin.site.register(Feedback)
[ "django.contrib.admin.site.register" ]
[((118, 147), 'django.contrib.admin.site.register', 'admin.site.register', (['Proposal'], {}), '(Proposal)\n', (137, 147), False, 'from django.contrib import admin\n'), ((148, 183), 'django.contrib.admin.site.register', 'admin.site.register', (['ProposalStatus'], {}), '(ProposalStatus)\n', (167, 183), False, 'from djan...
import errno import glob from os.path import join from typing import List from jpype import JClass, getDefaultJVMPath, shutdownJVM, startJVM, java import Generator as gnr from Word import Word path = '1150haber/*.txt' files = glob.glob(path) if __name__ == '__main__': ZEMBEREK_PATH: str = join("bin/zemberek-full...
[ "jpype.shutdownJVM", "jpype.JClass", "Generator.generate_random_weighted_words", "Generator.get_weight", "jpype.getDefaultJVMPath", "Generator.generate_sentences", "glob.glob", "os.path.join" ]
[((227, 242), 'glob.glob', 'glob.glob', (['path'], {}), '(path)\n', (236, 242), False, 'import glob\n'), ((2847, 2939), 'Generator.generate_sentences', 'gnr.generate_sentences', (['(300)', '(1000)', 'Nouns', 'Verbs', 'Adjectives', 'Conjunctions', 'PostPositives'], {}), '(300, 1000, Nouns, Verbs, Adjectives, Conjunction...
# Generated by Django 3.2.4 on 2021-07-01 07:15 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('crud', '0007_auto_202107...
[ "django.db.models.CharField", "django.db.migrations.swappable_dependency", "django.db.models.ForeignKey" ]
[((227, 284), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (258, 284), False, 'from django.db import migrations, models\n'), ((462, 602), 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'cho...
import torch.nn as nn import numpy as np import torch class DQN(nn.Module): ''' pytorch CNN model for Atari games ''' def __init__(self,img_shape,num_actions): super(DQN,self).__init__() self._conv=nn.Sequential( nn.Conv2d(4,16,kernel_size=5,stride=2), nn.BatchNor...
[ "torch.nn.ReLU", "torch.nn.Conv2d", "numpy.zeros", "torch.nn.BatchNorm2d", "numpy.random.random", "numpy.random.randint", "torch.nn.Linear", "torch.no_grad" ]
[((1618, 1636), 'numpy.random.random', 'np.random.random', ([], {}), '()\n', (1634, 1636), True, 'import numpy as np\n'), ((2027, 2053), 'numpy.zeros', 'np.zeros', (['(1, 4, 100, 100)'], {}), '((1, 4, 100, 100))\n', (2035, 2053), True, 'import numpy as np\n'), ((257, 298), 'torch.nn.Conv2d', 'nn.Conv2d', (['(4)', '(16)...
from curris.test.base import compare_json def test_script(): compare_json('curris/test/resource/script.md', 'curris/test/resource/script.json')
[ "curris.test.base.compare_json" ]
[((66, 152), 'curris.test.base.compare_json', 'compare_json', (['"""curris/test/resource/script.md"""', '"""curris/test/resource/script.json"""'], {}), "('curris/test/resource/script.md',\n 'curris/test/resource/script.json')\n", (78, 152), False, 'from curris.test.base import compare_json\n')]
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the file-like object implementation using pysmraw.""" import os import unittest from dfvfs.path import raw_path_spec from dfvfs.path import os_path_spec from tests.file_io import test_lib class RawFileTest(test_lib.ImageFileTestCase): """The unit test for the...
[ "unittest.main", "dfvfs.path.raw_path_spec.RawPathSpec", "os.path.join", "dfvfs.path.os_path_spec.OSPathSpec" ]
[((2160, 2175), 'unittest.main', 'unittest.main', ([], {}), '()\n', (2173, 2175), False, 'import unittest\n'), ((502, 541), 'os.path.join', 'os.path.join', (['u"""test_data"""', 'u"""ímynd.dd"""'], {}), "(u'test_data', u'ímynd.dd')\n", (514, 541), False, 'import os\n'), ((558, 601), 'dfvfs.path.os_path_spec.OSPathSpec'...
# Third exercise using PDF libraries in Python # Importing libraries and frameworks import PyPDF2 # Defining Global Variables pdf1File = open('meetingminutes.pdf', 'rb') pdf2File = open('meetingminutes2.pdf', 'rb') pdf1Reader = PyPDF2.PdfFileReader(pdf1File) pdf2Reader = PyPDF2.PdfFileReader(pdf2File) ...
[ "PyPDF2.PdfFileReader", "PyPDF2.PdfFileWriter" ]
[((242, 272), 'PyPDF2.PdfFileReader', 'PyPDF2.PdfFileReader', (['pdf1File'], {}), '(pdf1File)\n', (262, 272), False, 'import PyPDF2\n'), ((287, 317), 'PyPDF2.PdfFileReader', 'PyPDF2.PdfFileReader', (['pdf2File'], {}), '(pdf2File)\n', (307, 317), False, 'import PyPDF2\n'), ((352, 374), 'PyPDF2.PdfFileWriter', 'PyPDF2.Pd...
from setuptools import setup package_name = 'awsiotcore_to_navigation2' setup( name=package_name, version='0.1.0', packages=[package_name], data_files=[ ('share/ament_index/resource_index/packages', ['resource/' + package_name]), ('share/' + package_name, ['package.xml']), ...
[ "setuptools.setup" ]
[((74, 656), 'setuptools.setup', 'setup', ([], {'name': 'package_name', 'version': '"""0.1.0"""', 'packages': '[package_name]', 'data_files': "[('share/ament_index/resource_index/packages', ['resource/' + package_name]\n ), ('share/' + package_name, ['package.xml'])]", 'install_requires': "['setuptools']", 'zip_safe...
''' This is an example of a dendrogram plot showing the hierarchical structure of clustering. Inspired from the "Unsupervised Learning" course on Datacamp.com Author: <NAME> ''' # Import normalize from sklearn.preprocessing import normalize # Normalize the movements: normalized_movements normalized_movements = norma...
[ "sklearn.preprocessing.normalize" ]
[((315, 335), 'sklearn.preprocessing.normalize', 'normalize', (['movements'], {}), '(movements)\n', (324, 335), False, 'from sklearn.preprocessing import normalize\n')]
from PyQt5 import QtQml from .cvcapture import CVCapture, CVAbstractFilter from .cvitem import CVItem def registerTypes(uri = "PyCVQML"): QtQml.qmlRegisterType(CVCapture, uri, 1, 0, "CVCapture") QtQml.qmlRegisterType(CVItem, uri, 1, 0, "CVItem") def stopCamera(): CVCapture.stopCamera()
[ "PyQt5.QtQml.qmlRegisterType" ]
[((145, 201), 'PyQt5.QtQml.qmlRegisterType', 'QtQml.qmlRegisterType', (['CVCapture', 'uri', '(1)', '(0)', '"""CVCapture"""'], {}), "(CVCapture, uri, 1, 0, 'CVCapture')\n", (166, 201), False, 'from PyQt5 import QtQml\n'), ((206, 256), 'PyQt5.QtQml.qmlRegisterType', 'QtQml.qmlRegisterType', (['CVItem', 'uri', '(1)', '(0)...
from pyecharts import options as opts from pyecharts.charts import Bar from pyecharts.commons.utils import JsCode from pyecharts.faker import Faker c = ( Bar() .add_xaxis(Faker.choose()) .add_yaxis("商家A", Faker.values(), category_gap="60%") .set_series_opts( itemstyle_opts={ "normal...
[ "pyecharts.charts.Bar", "pyecharts.options.TitleOpts", "pyecharts.faker.Faker.choose", "pyecharts.faker.Faker.values", "pyecharts.commons.utils.JsCode" ]
[((804, 836), 'pyecharts.options.TitleOpts', 'opts.TitleOpts', ([], {'title': '"""Bar-渐变圆柱"""'}), "(title='Bar-渐变圆柱')\n", (818, 836), True, 'from pyecharts import options as opts\n'), ((222, 236), 'pyecharts.faker.Faker.values', 'Faker.values', ([], {}), '()\n', (234, 236), False, 'from pyecharts.faker import Faker\n')...
#!/usr/bin/env python3 import argparse import binascii import struct def get_state_height(file_handler): res = file_handler.read(4) res = struct.unpack('I', res)[0] return res def get_block_hash(file_handler): res = file_handler.read(32)[::-1] res = binascii.hexlify(res).decode('utf-8') retur...
[ "binascii.hexlify", "struct.unpack", "argparse.ArgumentParser" ]
[((489, 514), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (512, 514), False, 'import argparse\n'), ((148, 171), 'struct.unpack', 'struct.unpack', (['"""I"""', 'res'], {}), "('I', res)\n", (161, 171), False, 'import struct\n'), ((402, 425), 'struct.unpack', 'struct.unpack', (['"""I"""', 'res'...
#TimeExample1.py import time #Printing the no.of ticks spent since 12AM, 1st January 1970 print("No.of total ticks since 1970 : ",time.time())
[ "time.time" ]
[((137, 148), 'time.time', 'time.time', ([], {}), '()\n', (146, 148), False, 'import time\n')]
import forum from forum.settings import MAINTAINANCE_MODE, APP_LOGO, APP_TITLE from forum.http_responses import HttpResponseServiceUnavailable class RequestUtils(object): def process_request(self, request): if MAINTAINANCE_MODE.value is not None and isinstance(MAINTAINANCE_MODE.value.get('allow_ips', N...
[ "forum.settings.MAINTAINANCE_MODE.value.get" ]
[((278, 324), 'forum.settings.MAINTAINANCE_MODE.value.get', 'MAINTAINANCE_MODE.value.get', (['"""allow_ips"""', 'None'], {}), "('allow_ips', None)\n", (305, 324), False, 'from forum.settings import MAINTAINANCE_MODE, APP_LOGO, APP_TITLE\n'), ((496, 538), 'forum.settings.MAINTAINANCE_MODE.value.get', 'MAINTAINANCE_MODE....
# coding:utf-8 from load_data import load_data, timer from sklearn.linear_model import LogisticRegression from sklearn.naive_bayes import GaussianNB from sklearn.svm import SVC from sklearn.model_selection import StratifiedShuffleSplit from sklearn.model_selection import GridSearchCV import numpy as np import pandas a...
[ "sklearn.naive_bayes.GaussianNB", "numpy.logspace", "load_data.load_data", "sklearn.linear_model.LogisticRegression", "sklearn.svm.SVC" ]
[((409, 429), 'sklearn.linear_model.LogisticRegression', 'LogisticRegression', ([], {}), '()\n', (427, 429), False, 'from sklearn.linear_model import LogisticRegression\n'), ((685, 697), 'sklearn.naive_bayes.GaussianNB', 'GaussianNB', ([], {}), '()\n', (695, 697), False, 'from sklearn.naive_bayes import GaussianNB\n'),...
import pymongo client = pymongo.MongoClient(host='localhost', port=27017) db = client.test collection = db.students result = collection.remove({'name': 'Kevin'}) print(result)
[ "pymongo.MongoClient" ]
[((25, 74), 'pymongo.MongoClient', 'pymongo.MongoClient', ([], {'host': '"""localhost"""', 'port': '(27017)'}), "(host='localhost', port=27017)\n", (44, 74), False, 'import pymongo\n')]
#! /bin/env python3 # Copyright DEWETRON GmbH 2019 import sys import time sys.path.append('../../../trion_api/python') # Import the core and GUI elements of Qt from PySide2.QtCore import Qt, QObject, QPointF, QTimer, Slot, Signal, QThread from PySide2 import QtGui from PySide2.QtWidgets import * from PySide2.QtCharts...
[ "sys.path.append", "PySide2.QtCore.Slot", "PySide2.QtCore.QPointF", "xml.etree.ElementTree.fromstring", "time.sleep", "PySide2.QtCore.QThread.__init__", "PySide2.QtCore.Signal", "sys.exit" ]
[((75, 119), 'sys.path.append', 'sys.path.append', (['"""../../../trion_api/python"""'], {}), "('../../../trion_api/python')\n", (90, 119), False, 'import sys\n'), ((3586, 3600), 'PySide2.QtCore.Slot', 'Slot', (['str', 'str'], {}), '(str, str)\n', (3590, 3600), False, 'from PySide2.QtCore import Qt, QObject, QPointF, Q...
import os import re import subprocess import pythoncom from win32com.client import Dispatch, gencache from tkinter import Tk # from tkinter.filedialog import askopenfilenames from tkinter import filedialog # Подключение к API7 программы Компас 3D def get_kompas_api7(): module = gencache.EnsureModule("{69AC2981-37...
[ "os.listdir", "subprocess.Popen", "os.path.isdir", "tkinter.filedialog.askdirectory", "os.path.isfile", "os.path.splitext", "win32com.client.Dispatch", "win32com.client.gencache.EnsureModule", "os.path.join", "tkinter.Tk" ]
[((285, 357), 'win32com.client.gencache.EnsureModule', 'gencache.EnsureModule', (['"""{69AC2981-37C0-4379-84FD-5DD2F3C0A520}"""', '(0)', '(1)', '(0)'], {}), "('{69AC2981-37C0-4379-84FD-5DD2F3C0A520}', 0, 1, 0)\n", (306, 357), False, 'from win32com.client import Dispatch, gencache\n'), ((5257, 5286), 'win32com.client.Di...
# -*- coding: utf-8 -*- # # Copyright 2015 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 requir...
[ "googlecloudsdk.core.properties.VALUES.core.project.Get", "googlecloudsdk.api_lib.app.logs_util.GetFilters", "googlecloudsdk.command_lib.app.flags.LEVEL.AddToParser", "googlecloudsdk.command_lib.app.flags.SERVICE.AddToParser", "googlecloudsdk.api_lib.app.logs_util.LogPrinter", "googlecloudsdk.core.log.out...
[((1201, 1234), 'googlecloudsdk.command_lib.app.flags.SERVICE.AddToParser', 'flags.SERVICE.AddToParser', (['parser'], {}), '(parser)\n', (1226, 1234), False, 'from googlecloudsdk.command_lib.app import flags\n'), ((1239, 1272), 'googlecloudsdk.command_lib.app.flags.VERSION.AddToParser', 'flags.VERSION.AddToParser', (['...
""" Runs one instance of the Atari environment and optimizes using DQN algorithm. Can use a GPU for the agent (applies to both sample and train). No parallelism employed, so everything happens in one python process; can be easier to debug. The kwarg snapshot_mode="last" to logger context will save the latest model at...
[ "rlpyt.samplers.async_.gpu_sampler.AsyncGpuSampler", "rlpyt.utils.launching.affinity.affinity_from_code", "argparse.ArgumentParser", "rlpyt.utils.logging.context.logger_context", "rlpyt.algos.dqn.r2d1.R2D1", "rlpyt.runners.async_rl.AsyncRlEval", "rlpyt.utils.launching.affinity.encode_affinity", "rlpyt...
[((1739, 1827), 'rlpyt.utils.launching.affinity.encode_affinity', 'encode_affinity', ([], {'n_cpu_core': '(2)', 'n_gpu': '(1)', 'run_slot': '(0)', 'cpu_per_run': '(1)', 'set_affinity': '(True)'}), '(n_cpu_core=2, n_gpu=1, run_slot=0, cpu_per_run=1,\n set_affinity=True)\n', (1754, 1827), False, 'from rlpyt.utils.laun...
# Copyright 2018 The TensorFlow Authors 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...
[ "tensorflow.nn.softmax", "tensorflow.nn.relu", "research.cvt_text.corpus_processing.minibatching.build_array", "tensorflow.argmax", "tensorflow.layers.dense", "tensorflow.variable_scope", "tensorflow.placeholder", "research.cvt_text.model.model_helpers.project", "research.cvt_text.model.model_helper...
[((1326, 1400), 'tensorflow.placeholder', 'tf.placeholder', (['tf.float32', '[None, None, None]'], {'name': "(task_name + '_labels')"}), "(tf.float32, [None, None, None], name=task_name + '_labels')\n", (1340, 1400), True, 'import tensorflow as tf\n'), ((2901, 2930), 'tensorflow.nn.softmax', 'tf.nn.softmax', (['primary...
# A simple MDP where agent has to traverse a specific path # in gridworld - wrong action will throw player back to start or do nothing. # Player is rewarded for reaching new maximum length in the episode. # # State is represented by a positive ndim vector that tells # where the player is. This is designed to mimic coor...
[ "numpy.floor", "gym.spaces.Discrete", "numpy.zeros", "numpy.random.default_rng", "random.random", "gym.spaces.Box" ]
[((1139, 1166), 'numpy.random.default_rng', 'np.random.default_rng', (['seed'], {}), '(seed)\n', (1160, 1166), True, 'import numpy as np\n'), ((2372, 2399), 'numpy.floor', 'np.floor', (['(ndim * mine_ratio)'], {}), '(ndim * mine_ratio)\n', (2380, 2399), True, 'import numpy as np\n'), ((2869, 2901), 'gym.spaces.Discrete...
# coding: utf-8 from __future__ import division __author__ = "<NAME>" __copyright__ = "Copyright 2017, The Materials Project" __version__ = "1.0" __maintainer__ = "<NAME>" __email__ = "<EMAIL>" __status__ = "Development" __date__ = "July 19, 2017" import os from pymatgen.core import Element from pymatgen.core.struc...
[ "unittest.main", "pymatgen.analysis.defects.core.Vacancy", "pymatgen.core.structure.Lattice", "pymatgen.core.Element", "pycdt.utils.plotter.DefectPlotter", "os.path.exists", "os.system", "pymatgen.core.structure.Structure", "pymatgen.analysis.defects.core.DefectEntry", "pymatgen.analysis.defects.t...
[((2088, 2103), 'unittest.main', 'unittest.main', ([], {}), '()\n', (2101, 2103), False, 'import unittest\n'), ((814, 884), 'pymatgen.core.structure.Lattice', 'Lattice', (['[[3.52, 0.0, 2.033], [1.174, 3.32, 2.033], [0.0, 0.0, 4.066]]'], {}), '([[3.52, 0.0, 2.033], [1.174, 3.32, 2.033], [0.0, 0.0, 4.066]])\n', (821, 88...
import globals from discussion_question_manager import DiscussionQuestionManager import pickle import discord from discord.channel import TextChannel from discord.message import Message from discord.ext import tasks from discord import RawReactionActionEvent as RawReaction import logging import os import asyncio logg...
[ "pickle.dump", "logging.FileHandler", "asyncio.sleep", "logging.Formatter", "pickle.load", "discussion_question_manager.DiscussionQuestionManager", "discord.Intents.default", "logging.getLogger" ]
[((634, 661), 'discussion_question_manager.DiscussionQuestionManager', 'DiscussionQuestionManager', ([], {}), '()\n', (659, 661), False, 'from discussion_question_manager import DiscussionQuestionManager\n'), ((3705, 3733), 'logging.getLogger', 'logging.getLogger', (['"""discord"""'], {}), "('discord')\n", (3722, 3733)...
# coding: utf-8 import numpy as np import matplotlib.pyplot as plt class Naca_4_digit(object): def __init__(self, int_4, attack_angle_deg, resolution, quasi_equidistant=True, length_adjust=False, from5digit=False): if from5digit == False: self.m = float(int_4[0]) / 100 # maximum camber ...
[ "numpy.full", "matplotlib.pyplot.xlim", "matplotlib.pyplot.show", "numpy.abs", "matplotlib.pyplot.plot", "matplotlib.pyplot.ylim", "numpy.zeros", "numpy.min", "numpy.max", "numpy.array", "numpy.sin", "numpy.linspace", "numpy.cos", "numpy.arctan", "numpy.sqrt" ]
[((646, 668), 'numpy.arctan', 'np.arctan', (['self.dyc_dx'], {}), '(self.dyc_dx)\n', (655, 668), True, 'import numpy as np\n'), ((1227, 1276), 'numpy.linspace', 'np.linspace', ([], {'start': '(0)', 'stop': '(1)', 'num': 'self.resolution'}), '(start=0, stop=1, num=self.resolution)\n', (1238, 1276), True, 'import numpy a...
import webapp2 import os import jinja2 from utility import check_secure_val, filterKey, showCount from models import User template_dir = os.path.join(os.path.dirname(__file__), '../views') jinja_env = jinja2.Environment(loader=jinja2.FileSystemLoader(template_dir), autoescape=True) jinja...
[ "jinja2.FileSystemLoader", "os.path.dirname", "utility.check_secure_val" ]
[((151, 176), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (166, 176), False, 'import os\n'), ((228, 265), 'jinja2.FileSystemLoader', 'jinja2.FileSystemLoader', (['template_dir'], {}), '(template_dir)\n', (251, 265), False, 'import jinja2\n'), ((1135, 1159), 'utility.check_secure_val', 'che...
"""Settings shared by functions for indexing Landsat 8 data""" from rf.utils.io import s3 organization = 'dfac6307-b5ef-43f7-beda-b9f208bb7726' # Band 8 is panchromatic and at 15m resolution. All other bands # are at the 30m resolution. Bands are: # 1: Coastal aerosol # 2: Blue # 3: Green # 4: Red # 5: Near inf...
[ "rf.utils.io.s3.Bucket" ]
[((1992, 2014), 'rf.utils.io.s3.Bucket', 's3.Bucket', (['bucket_name'], {}), '(bucket_name)\n', (2001, 2014), False, 'from rf.utils.io import s3\n')]
# Generated by Django 2.2.24 on 2021-12-13 14:03 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import main.validators import proposals.utils.proposal_utils import proposals.validators class Migration(migrations.Migration): dependencies = [ ('p...
[ "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.PositiveIntegerField", "django.db.models.BooleanField", "django.db.models.DateField" ]
[((504, 733), 'django.db.models.BooleanField', 'models.BooleanField', ([], {'default': '(False)', 'validators': '[proposals.validators.AVGUnderstoodValidator]', 'verbose_name': '"""Ik heb kennis genomen van het bovenstaande en begrijp mijn verantwoordelijkheden ten opzichte van de AVG."""'}), "(default=False, validator...
from django.contrib import admin # Register your models here. from .models import Tasks, Audit admin.site.register(Tasks) admin.site.register(Audit)
[ "django.contrib.admin.site.register" ]
[((97, 123), 'django.contrib.admin.site.register', 'admin.site.register', (['Tasks'], {}), '(Tasks)\n', (116, 123), False, 'from django.contrib import admin\n'), ((124, 150), 'django.contrib.admin.site.register', 'admin.site.register', (['Audit'], {}), '(Audit)\n', (143, 150), False, 'from django.contrib import admin\n...
# coding=utf-8 """ Common functions for click-based cli scripts. """ from __future__ import absolute_import import functools import logging import os import re import copy import click from datacube import config, __version__ from datacube.executor import get_executor from datacube.index import index_connect from pa...
[ "datacube.config.LocalConfig.find", "logging.Formatter.format", "logging.FileHandler", "click.get_current_context", "logging.root.addHandler", "click.option", "copy.copy", "click.echo", "datacube.executor.get_executor", "logging.Formatter", "functools.update_wrapper", "pathlib.Path", "loggin...
[((3074, 3177), 'click.option', 'click.option', (['"""--version"""'], {'is_flag': '(True)', 'callback': '_print_version', 'expose_value': '(False)', 'is_eager': '(True)'}), "('--version', is_flag=True, callback=_print_version,\n expose_value=False, is_eager=True)\n", (3086, 3177), False, 'import click\n'), ((3253, 3...
# Generated by Django 3.1.2 on 2020-10-20 19:06 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
[ "django.db.migrations.swappable_dependency", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.AutoField" ]
[((247, 304), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (278, 304), False, 'from django.db import migrations, models\n'), ((435, 528), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)...
""" Copyright (c) Facebook, Inc. and its affiliates. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. """ from argparse import ArgumentParser from collections import defaultdict from typing import Optional import fastmri import numpy as np import...
[ "fastmri.data.transforms.center_crop_to_smallest", "numpy.zeros_like", "torch.optim.lr_scheduler.StepLR", "argparse.ArgumentParser", "fastmri.ifft2c", "torch.cat", "collections.defaultdict", "fastmri.data.transforms.center_crop", "fastmri.pl_modules.mri_module.MriModule.add_model_specific_args", "...
[((2896, 2982), 'fastmri.models.adaptive_varnet.AdaptiveSensitivityModel', 'AdaptiveSensitivityModel', (['sens_chans', 'sens_pools'], {'num_sense_lines': 'num_sense_lines'}), '(sens_chans, sens_pools, num_sense_lines=\n num_sense_lines)\n', (2920, 2982), False, 'from fastmri.models.adaptive_varnet import AdaptiveSen...
from jslinker.js_file_stitcher import JsFileStitcher import sys import os class JsStitcherCUI: @staticmethod def showHelp(): print(""" Run: jsstitcher inputfile Works like a simplified version of the C++ preprocessor. - require ("<file path>"); Tells jsstitcher to include file content of <file path...
[ "os.path.abspath", "jslinker.js_file_stitcher.JsFileStitcher" ]
[((772, 796), 'jslinker.js_file_stitcher.JsFileStitcher', 'JsFileStitcher', (['[infile]'], {}), '([infile])\n', (786, 796), False, 'from jslinker.js_file_stitcher import JsFileStitcher\n'), ((1045, 1068), 'os.path.abspath', 'os.path.abspath', (['infile'], {}), '(infile)\n', (1060, 1068), False, 'import os\n')]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ loading_dataset.py Created on Thu May 3 12:47:36 2018 @author: sungkyun """ import torch from torch.utils.data.dataset import Dataset #from torch import from_numpy import numpy as np import pandas as pd #from sklearn import preprocessing #from sklearn.preprocessing i...
[ "numpy.pad", "numpy.random.uniform", "numpy.load", "nnmnkwii.minmax_scale", "torch.LongTensor", "pandas.read_csv", "numpy.transpose", "numpy.hstack", "numpy.arange", "glob.glob" ]
[((482, 499), 'numpy.arange', 'np.arange', (['(0)', '(420)'], {}), '(0, 420)\n', (491, 499), True, 'import numpy as np\n'), ((799, 815), 'numpy.arange', 'np.arange', (['(4)', '(64)'], {}), '(4, 64)\n', (808, 815), True, 'import numpy as np\n'), ((861, 879), 'numpy.arange', 'np.arange', (['(64)', '(577)'], {}), '(64, 57...
import os from glob import glob import argparse import cherrypy from jinja2 import Environment, FileSystemLoader env = Environment(loader=FileSystemLoader('templates')) DATA_FOLDER = 'data' class Server(object): @cherrypy.expose def index(self, data=None): data = data if data is not None else DATA_FO...
[ "os.getcwd", "jinja2.FileSystemLoader", "os.path.join", "argparse.ArgumentParser" ]
[((1034, 1120), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Visualize 2D data. Useful with t-sne data."""'}), "(description=\n 'Visualize 2D data. Useful with t-sne data.')\n", (1057, 1120), False, 'import argparse\n'), ((139, 168), 'jinja2.FileSystemLoader', 'FileSystemLoader', ([...
# API FORMS from django import forms class FormularioContacto(forms.Form): asunto=forms.CharField() email=forms.EmailField() mensaje=forms.CharField()
[ "django.forms.CharField", "django.forms.EmailField" ]
[((89, 106), 'django.forms.CharField', 'forms.CharField', ([], {}), '()\n', (104, 106), False, 'from django import forms\n'), ((117, 135), 'django.forms.EmailField', 'forms.EmailField', ([], {}), '()\n', (133, 135), False, 'from django import forms\n'), ((148, 165), 'django.forms.CharField', 'forms.CharField', ([], {})...
from base64 import b64encode, b64decode from random import shuffle, sample, randint from fractions import Fraction a = {"a":1,"b":2,"c":3,"d":4,"e":5,"f":6,"g":7,"h":8,"i":9,"j":10,"k":11,"l":12, "m":13,"n":14,"o":15,"p":16,"q":17,"r":18,"s":19,"t":20,"u":21,"v":22,"w":23, "x":24,"y":25,"z":26,"?" : 0} b = {0...
[ "random.shuffle", "fractions.Fraction", "random.randint", "base64.b64decode" ]
[((644, 661), 'random.shuffle', 'shuffle', (['specials'], {}), '(specials)\n', (651, 661), False, 'from random import shuffle, sample, randint\n'), ((758, 784), 'random.randint', 'randint', (['(9999999)', '(99999999)'], {}), '(9999999, 99999999)\n', (765, 784), False, 'from random import shuffle, sample, randint\n'), (...
# -*- coding: UTF-8 -*- # Copyright 2013-2016 <NAME> # # License: BSD (see file COPYING for details) """ .. autosummary:: :toctree: models """ from lino.ad import Plugin from django.utils.translation import ugettext_lazy as _ class Plugin(Plugin): verbose_name = _("Blog") needs_plugins = ['li...
[ "django.utils.translation.ugettext_lazy", "lino.core.dashboard.ActorItem" ]
[((281, 290), 'django.utils.translation.ugettext_lazy', '_', (['"""Blog"""'], {}), "('Blog')\n", (282, 290), True, 'from django.utils.translation import ugettext_lazy as _\n'), ((1084, 1150), 'lino.core.dashboard.ActorItem', 'ActorItem', (['self.site.models.blogs.LatestEntries'], {'header_level': 'None'}), '(self.site....
import pandas as pd import numpy as np def combineData(df_list): combined = pd.DataFrame() for df in df_list: combined = combined.append(df) combined = combined.fillna(method='ffill').drop_duplicates() return combined def modifyWeapons(df): modified = pd.DataFrame() mod...
[ "pandas.DataFrame" ]
[((87, 101), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (99, 101), True, 'import pandas as pd\n'), ((293, 307), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (305, 307), True, 'import pandas as pd\n')]
# -*- coding: utf-8 -*- # Generated by Django 1.11.18 on 2019-02-11 14:53 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrati...
[ "django.db.models.CharField", "django.db.models.OneToOneField", "django.db.migrations.swappable_dependency", "django.db.models.AutoField" ]
[((313, 370), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (344, 370), False, 'from django.db import migrations, models\n'), ((502, 595), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)...
from __future__ import division, print_function, unicode_literals, absolute_import import unittest import sys sys.path.append("../ScopeReaders/") class TestImport(unittest.TestCase): def test_basic(self): import ScopeReaders as sr print(sr.__version__) self.assertTrue(True)
[ "sys.path.append" ]
[((110, 145), 'sys.path.append', 'sys.path.append', (['"""../ScopeReaders/"""'], {}), "('../ScopeReaders/')\n", (125, 145), False, 'import sys\n')]
from typing import Union, Optional from mason.clients.response import Response from mason.configurations.config import Config from mason.engines.execution.models.jobs import ExecutedJob, InvalidJob from mason.engines.execution.models.jobs.summary_job import SummaryJob from mason.engines.metastore.models.credentials im...
[ "mason.operators.operator_response.DelayedOperatorResponse", "mason.engines.execution.models.jobs.summary_job.SummaryJob", "mason.operators.operator_response.OperatorResponse", "mason.engines.execution.models.jobs.InvalidJob" ]
[((1508, 1543), 'mason.operators.operator_response.OperatorResponse', 'OperatorResponse', (['response', 'summary'], {}), '(response, summary)\n', (1524, 1543), False, 'from mason.operators.operator_response import OperatorResponse, DelayedOperatorResponse\n'), ((2699, 2737), 'mason.operators.operator_response.DelayedOp...
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from rlkit.torch.core import PyTorchModule from rlkit.torch.networks import Mlp from rlkit.torch import pytorch_util as ptu from rlkit.torch.torch_meta_irl_algorithm import np_to_pytorch_batch fr...
[ "torch.mean", "torch.nn.ReLU", "torch.nn.Sequential", "torch.nn.BatchNorm1d", "rlkit.torch.pytorch_util.from_numpy", "rlkit.torch.distributions.ReparamMultivariateNormalDiag", "numpy.array", "torch.nn.Linear", "torch.sum", "numpy.concatenate" ]
[((1195, 1220), 'torch.nn.Linear', 'nn.Linear', (['hid_dim', 'z_dim'], {}), '(hid_dim, z_dim)\n', (1204, 1220), True, 'import torch.nn as nn\n'), ((1247, 1272), 'torch.nn.Linear', 'nn.Linear', (['hid_dim', 'z_dim'], {}), '(hid_dim, z_dim)\n', (1256, 1272), True, 'import torch.nn as nn\n'), ((2918, 2942), 'torch.nn.Sequ...
import wpath from torm import Model from torm import f class Group(Model): __config__ = "mongo" group = f.EmailList() group_hash = f.Str() display_name = f.Str() update_at = f.Timestamp() create_at = f.Timestamp() user_email = '<EMAIL>' groups = Group.FindMany({"group": user_email}) print(...
[ "torm.f.EmailList", "torm.f.Timestamp", "torm.f.Str" ]
[((115, 128), 'torm.f.EmailList', 'f.EmailList', ([], {}), '()\n', (126, 128), False, 'from torm import f\n'), ((146, 153), 'torm.f.Str', 'f.Str', ([], {}), '()\n', (151, 153), False, 'from torm import f\n'), ((173, 180), 'torm.f.Str', 'f.Str', ([], {}), '()\n', (178, 180), False, 'from torm import f\n'), ((198, 211), ...
""" Module for Magellan/FIRE specific methods. Important Notes: - If you are reducing old FIRE data (before the broken happened in 2016), please change the ord_spat_pos array (see lines from ~220 to ~230) .. include:: ../include/links.rst """ from pkg_resources import resource_filename import numpy ...
[ "numpy.full", "numpy.atleast_1d", "numpy.log", "pypeit.telescopes.MagellanTelescopePar", "numpy.asarray", "pypeit.core.framematch.check_frame_exptime", "pkg_resources.resource_filename", "numpy.array", "numpy.arange", "numpy.log10", "pypeit.images.detector_container.DetectorContainer", "numpy....
[((988, 1021), 'pypeit.telescopes.MagellanTelescopePar', 'telescopes.MagellanTelescopePar', ([], {}), '()\n', (1019, 1021), False, 'from pypeit import telescopes\n'), ((4078, 4131), 'pypeit.images.detector_container.DetectorContainer', 'detector_container.DetectorContainer', ([], {}), '(**detector_dict)\n', (4114, 4131...
#!/usr/bin/env python # # Copyright (c) 2015 Mirantis, 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-...
[ "sys.path.append", "oslo_config.cfg.StrOpt", "oslo_config.cfg.IntOpt", "os.path.dirname", "oslo_utils.timeutils.utcnow", "netaddr.IPAddress", "six.text_type", "time.sleep", "oslo_concurrency.processutils.execute", "pprint.pprint", "netaddr.IPNetwork", "signal.signal", "os.path.join", "sys....
[((863, 1063), 'oslo_config.cfg.IntOpt', 'cfg.IntOpt', (['"""consume_interval"""'], {'default': '(5)', 'deprecated_name': '"""sleep_between_consume_attempts"""', 'help': '"""Time that script will sleep between requests for consuming Zaqar messages in seconds."""'}), "('consume_interval', default=5, deprecated_name=\n ...
""" ******************************** * Created by mohammed-alaa * ******************************** Evaluate motion and spatial streams """ import frame_dataloader from evaluation import legacy_load_model, get_batch_size from evaluation.evaluation import * from utils.drive_manager import DriveManager """ Evaluate s...
[ "utils.drive_manager.DriveManager", "evaluation.get_batch_size", "evaluation.legacy_load_model" ]
[((365, 410), 'utils.drive_manager.DriveManager', 'DriveManager', (['"""spa-xception-adam-5e-06-imnet"""'], {}), "('spa-xception-adam-5e-06-imnet')\n", (377, 410), False, 'from utils.drive_manager import DriveManager\n'), ((557, 755), 'evaluation.legacy_load_model', 'legacy_load_model', ([], {'filepath': '"""spatial.h5...
# -*- coding: utf-8 -*- import json import logging from django.core.management import call_command from django.test.client import Client from networkapi.test.test_case import NetworkApiTestCase log = logging.getLogger(__name__) def setup(): call_command( 'loaddata', 'networkapi/system/fixtures/...
[ "django.test.client.Client", "django.core.management.call_command", "logging.getLogger" ]
[((203, 230), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (220, 230), False, 'import logging\n'), ((250, 1092), 'django.core.management.call_command', 'call_command', (['"""loaddata"""', '"""networkapi/system/fixtures/initial_variables.json"""', '"""networkapi/api_pools/fixtures/initia...
from threading import RLock from pylgbst.peripherals import EncodedMotor from IotLib.pyUtils import startThread from IotLib.log import Log from IotLib.iotMotor import IotMotor from IotLib.iotEncodedMotor import IotEncodedMotor from .legoNode import SendCommand # todo: LegoMotor inherits both IotMotor and IotSteering. ...
[ "threading.RLock", "IotLib.iotMotor.IotMotor._clampSpeed", "IotLib.log.Log.info", "IotLib.pyUtils.startThread" ]
[((1260, 1267), 'threading.RLock', 'RLock', ([], {}), '()\n', (1265, 1267), False, 'from threading import RLock\n'), ((3112, 3218), 'IotLib.pyUtils.startThread', 'startThread', (["('%s.moveAngle' % self.name)"], {'target': 'self.runAngle', 'front': '(True)', 'args': '(angle, speed, speed2)'}), "('%s.moveAngle' % self.n...
# # This is a setup file for Cython # # # # # # from setuptools import setup from Cython.Build import cythonize setup( name = "Climate", ext_modules = cythonize(["*.py"], build_dir="output"), ) #python setup.py build_ext --inplace
[ "Cython.Build.cythonize" ]
[((161, 200), 'Cython.Build.cythonize', 'cythonize', (["['*.py']"], {'build_dir': '"""output"""'}), "(['*.py'], build_dir='output')\n", (170, 200), False, 'from Cython.Build import cythonize\n')]
# 2019-11-19 19:43:48(JST) import sys # import collections # import math # from string import ascii_lowercase, ascii_uppercase, digits # from bisect import bisect_left as bi_l, bisect_right as bi_r # import itertools # from functools import reduce # import operator as op # import re # import heapq # import...
[ "sys.stdin.readline" ]
[((451, 471), 'sys.stdin.readline', 'sys.stdin.readline', ([], {}), '()\n', (469, 471), False, 'import sys\n')]
import justpy as jp from spreadsheet.googlesheet import GoogleSheet from lodstorage.lod import LOD from lodstorage.sparql import SPARQL from markupsafe import Markup import copy import datetime import re import os import pprint import sys import traceback from jpwidgets.widgets import LodGrid,MenuButton, MenuLink, QA...
[ "justpy.QToggle", "pprint.pformat", "jpwidgets.widgets.QPasswordDialog", "argparse.ArgumentParser", "jpwidgets.widgets.LodGrid", "justpy.QuasarPage", "jpwidgets.widgets.MenuLink", "justpy.A", "pprint.pprint", "justpy.Br", "jpwidgets.widgets.MenuButton", "lodstorage.sparql.SPARQL", "justpy.QT...
[((20573, 20599), 'os.path.basename', 'os.path.basename', (['__file__'], {}), '(__file__)\n', (20589, 20599), False, 'import os\n'), ((1509, 1532), 'copy.deepcopy', 'copy.deepcopy', (['self.lod'], {}), '(self.lod)\n', (1522, 1532), False, 'import copy\n'), ((4076, 4119), 'lodstorage.lod.LOD.getLookup', 'LOD.getLookup',...
""" Copyright (c) 2017, <NAME>. Distributed under the terms of the MIT License. The full license is in the file LICENSE, distributed with this software. Created on Oct 4, 2017 @author: jrm """ import sh import sys def main(): # Make sure instance is cleared from enaml.application import Application Ap...
[ "sys.path.append", "view.ContentView", "enamlnative.android.app.AndroidApplication", "sh.Command", "enaml.imports", "enamlnative.core.remotehooks.init" ]
[((417, 482), 'enamlnative.android.app.AndroidApplication', 'AndroidApplication', ([], {'debug': '(True)', 'dev': '"""remote"""', 'load_view': 'load_view'}), "(debug=True, dev='remote', load_view=load_view)\n", (435, 482), False, 'from enamlnative.android.app import AndroidApplication\n'), ((1414, 1440), 'sh.Command', ...
# Django imports from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.shortcuts import render # Partners app imports from partners.models.partner_models import Partner def partner_list(request): """ Display a list of partners and their details """ partners_list = Partn...
[ "django.shortcuts.render", "django.core.paginator.Paginator", "partners.models.partner_models.Partner.objects.all" ]
[((315, 336), 'partners.models.partner_models.Partner.objects.all', 'Partner.objects.all', ([], {}), '()\n', (334, 336), False, 'from partners.models.partner_models import Partner\n'), ((393, 421), 'django.core.paginator.Paginator', 'Paginator', (['partners_list', '(10)'], {}), '(partners_list, 10)\n', (402, 421), Fals...
# Copyright 2022, <NAME>, mailto:<EMAIL> # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Lice...
[ "nuitka.containers.oset.OrderedSet" ]
[((1883, 1895), 'nuitka.containers.oset.OrderedSet', 'OrderedSet', ([], {}), '()\n', (1893, 1895), False, 'from nuitka.containers.oset import OrderedSet\n')]
from __future__ import unicode_literals from django import VERSION as DJANGO_VERSION from django.apps import AppConfig class CoreConfig(AppConfig): name = 'mezzanine.core' def ready(self): from . import checks # noqa if DJANGO_VERSION < (1, 9): # add_to_builtins was removed in...
[ "django.template.base.add_to_builtins" ]
[((491, 540), 'django.template.base.add_to_builtins', 'add_to_builtins', (['"""mezzanine.template.loader_tags"""'], {}), "('mezzanine.template.loader_tags')\n", (506, 540), False, 'from django.template.base import add_to_builtins\n')]
try: import cloudfiles except ImportError: pass class RackspaceBackend(object): def __init__(self, username, api_key, container_name): self.username = username self.api_key = api_key self.conn = cloudfiles.Connection(username=username, api_key=api_key) self.container = cloud...
[ "cloudfiles.Connection", "cloudfiles.Container" ]
[((232, 289), 'cloudfiles.Connection', 'cloudfiles.Connection', ([], {'username': 'username', 'api_key': 'api_key'}), '(username=username, api_key=api_key)\n', (253, 289), False, 'import cloudfiles\n'), ((315, 367), 'cloudfiles.Container', 'cloudfiles.Container', (['self.conn'], {'name': 'container_name'}), '(self.conn...
# Copyright (c) OpenMMLab. All rights reserved. import argparse import glob import json import os.path as osp import mmcv try: import xlrd except ImportError: xlrd = None try: import xlutils from xlutils.copy import copy except ImportError: xlutils = None def parse_args(): parser = argparse....
[ "xlutils.copy.copy", "argparse.ArgumentParser", "json.loads", "xlrd.open_workbook", "os.path.exists", "mmcv.Config.fromfile", "os.path.splitext", "os.path.split", "os.path.join" ]
[((311, 382), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Gather benchmarked models metric"""'}), "(description='Gather benchmarked models metric')\n", (334, 382), False, 'import argparse\n'), ((1408, 1438), 'xlrd.open_workbook', 'xlrd.open_workbook', (['args.excel'], {}), '(args.exce...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='NadzornaEnota', fields=[ ('id', models.AutoFiel...
[ "django.db.models.ForeignKey", "django.db.models.TextField", "django.db.models.CharField", "django.db.models.AutoField" ]
[((1461, 1514), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'to': '"""nadzornaplosca.NadzorniSistem"""'}), "(to='nadzornaplosca.NadzorniSistem')\n", (1478, 1514), False, 'from django.db import migrations, models\n'), ((305, 398), 'django.db.models.AutoField', 'models.AutoField', ([], {'serialize': '(False...
import asyncio import discord from discord.ext import commands, menus class AsyncEmbedCodeBlockTablePageSource(menus.AsyncIteratorPageSource): def __init__( self, data, title=None, count=None, show_index=False, format_embed=lambda x: None, format_item=str, ...
[ "discord.Color.blurple" ]
[((1278, 1301), 'discord.Color.blurple', 'discord.Color.blurple', ([], {}), '()\n', (1299, 1301), False, 'import discord\n'), ((2216, 2239), 'discord.Color.blurple', 'discord.Color.blurple', ([], {}), '()\n', (2237, 2239), False, 'import discord\n'), ((2995, 3018), 'discord.Color.blurple', 'discord.Color.blurple', ([],...
#%% import numpy as np import scipy.signal as signal import matplotlib.pyplot as plt #%% N = 1000 n = np.arange (N) f = 100 fs = 44100 x = (1.58 * 0.3125) * np.sin (2 * np.pi * n * f / fs) #%% e_s_plus = 72 e_s_minus = -72 V_cm = (e_s_plus + e_s_minus) / 2 V_dm = (e_s_plus - e_s_minus) / 2 R_p = 0 # 50000 G = (R_p +...
[ "matplotlib.pyplot.axhline", "matplotlib.pyplot.plot", "numpy.zeros", "matplotlib.pyplot.figure", "numpy.sin", "numpy.arange" ]
[((103, 115), 'numpy.arange', 'np.arange', (['N'], {}), '(N)\n', (112, 115), True, 'import numpy as np\n'), ((384, 395), 'numpy.zeros', 'np.zeros', (['N'], {}), '(N)\n', (392, 395), True, 'import numpy as np\n'), ((578, 590), 'matplotlib.pyplot.figure', 'plt.figure', ([], {}), '()\n', (588, 590), True, 'import matplotl...
#!/usr/bin/env python from collections import OrderedDict from decimal import Decimal from glob import glob import json import os import six from agate.table import Table @classmethod def from_json(cls, path, column_names=None, column_types=None, keys=None, **kwargs): """ Create a new :class:`TableSet` fro...
[ "json.load", "os.path.isdir", "os.path.isfile", "agate.table.Table.from_object", "collections.OrderedDict", "agate.table.Table.from_json", "os.path.split", "os.path.join" ]
[((1087, 1100), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (1098, 1100), False, 'from collections import OrderedDict\n'), ((1148, 1167), 'os.path.isdir', 'os.path.isdir', (['path'], {}), '(path)\n', (1161, 1167), False, 'import os\n'), ((967, 986), 'os.path.isdir', 'os.path.isdir', (['path'], {}), '(pa...
import argparse def parse_args(): parser = argparse.ArgumentParser() parser.add_argument( '-dp', '--fn_depth_report', help = 'input read-depth calling report' ) args = parser.parse_args() return args def find_thresh(list_depth): list_d = [pair_info[1] for pair_info in list_dep...
[ "argparse.ArgumentParser" ]
[((48, 73), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (71, 73), False, 'import argparse\n')]
# Copyright (C) 2018-2019 <NAME> # SPDX-License-Identifier: Apache-2.0 import numpy def read_surfaces(res): inp = res.input res.surfaces = {} if 'probes' not in inp: return for probe in inp['probes']: if not (probe.get('enabled', True) and probe.get('type', '') == 'IsoSurface'): ...
[ "numpy.array" ]
[((2334, 2356), 'numpy.array', 'numpy.array', (['timesteps'], {}), '(timesteps)\n', (2345, 2356), False, 'import numpy\n')]
from django.db import models class DepartmentsF(models.Model): department_id = models.AutoField(primary_key=True) department = models.CharField(max_length=100) class Meta: managed = False db_table = 'departments_f' class OrdersF(models.Model): order_id = models.AutoField(primary_key=...
[ "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.PositiveIntegerField", "django.db.models.FloatField", "django.db.models.AutoField" ]
[((84, 118), 'django.db.models.AutoField', 'models.AutoField', ([], {'primary_key': '(True)'}), '(primary_key=True)\n', (100, 118), False, 'from django.db import models\n'), ((136, 168), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)'}), '(max_length=100)\n', (152, 168), False, 'from djang...
# !/usr/bin/env python3 # -*- coding: utf-8 -*- from urllib import request import os import subprocess import sys import json import yaml import codecs import requests from collections import OrderedDict from pyquery import PyQuery as pq # the treading url_str = 'http://trending.codehub-app.com/v2/trending/' langs_st...
[ "os.mkdir", "subprocess.Popen", "pyquery.PyQuery", "urllib.request.Request", "yaml.load", "codecs.open", "os.getcwd", "os.path.exists", "urllib.request.urlopen", "json.dumps", "requests.get", "sys.exc_info", "collections.OrderedDict", "os.chdir" ]
[((614, 645), 'subprocess.Popen', 'subprocess.Popen', (['cmd'], {'cwd': '"""./"""'}), "(cmd, cwd='./')\n", (630, 645), False, 'import subprocess\n'), ((750, 781), 'subprocess.Popen', 'subprocess.Popen', (['cmd'], {'cwd': '"""./"""'}), "(cmd, cwd='./')\n", (766, 781), False, 'import subprocess\n'), ((945, 976), 'subproc...
# Generated by Django 2.0.8 on 2018-09-13 13:38 from django.db import migrations class Migration(migrations.Migration): dependencies = [("menu", "0008_menu_json_content_new")] operations = [migrations.RemoveField(model_name="menu", name="json_content")]
[ "django.db.migrations.RemoveField" ]
[((203, 265), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""menu"""', 'name': '"""json_content"""'}), "(model_name='menu', name='json_content')\n", (225, 265), False, 'from django.db import migrations\n')]
# Copyright 2016 TensorLab. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
[ "tensorfx.prediction.Model.load", "tensorflow.logging.set_verbosity", "json.dumps" ]
[((1754, 1796), 'tensorflow.logging.set_verbosity', 'tf.logging.set_verbosity', (['tf.logging.ERROR'], {}), '(tf.logging.ERROR)\n', (1778, 1796), True, 'import tensorflow as tf\n'), ((1873, 1910), 'tensorfx.prediction.Model.load', 'tfx.prediction.Model.load', (['args.model'], {}), '(args.model)\n', (1898, 1910), True, ...
import os, torch, argparse from torch import optim from torch.utils.data import DataLoader from pytorch_pretrained_bert import BertTokenizer from _preprocessing import Vocabulary, DRCDDataset from _preprocessing import build_emb, create_bert_batch, create_jieba_batch from _model import EncoderRNN, BertEncoder ...
[ "argparse.ArgumentParser", "_preprocessing.Vocabulary", "torch.utils.data.DataLoader", "_model.LuongAttnDecoderRNN", "pytorch_pretrained_bert.BertTokenizer.from_pretrained", "torch.load", "_model.BertEncoder", "os.path.exists", "_model.DecoderRNN", "torch.cuda.is_available", "_train.trainEpochs"...
[((476, 501), 'torch.cuda.is_available', 'torch.cuda.is_available', ([], {}), '()\n', (499, 501), False, 'import os, torch, argparse\n'), ((512, 555), 'torch.device', 'torch.device', (["('cuda' if USE_CUDA else 'cpu')"], {}), "('cuda' if USE_CUDA else 'cpu')\n", (524, 555), False, 'import os, torch, argparse\n'), ((683...
from PyQt5 import QtCore, QtGui, QtWidgets version = '1.0.0' class AboutDialog(object): def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(390, 110) Dialog.setFixedSize(390, 110) self.appNameLabel = QtWidgets.QLabel(Dialog) self.appNameLabel.setGeometr...
[ "PyQt5.QtWidgets.QLabel", "PyQt5.QtCore.QRect", "PyQt5.QtCore.QUrl", "PyQt5.QtWidgets.QPushButton", "PyQt5.QtGui.QFont", "PyQt5.QtCore.QMetaObject.connectSlotsByName" ]
[((259, 283), 'PyQt5.QtWidgets.QLabel', 'QtWidgets.QLabel', (['Dialog'], {}), '(Dialog)\n', (275, 283), False, 'from PyQt5 import QtCore, QtGui, QtWidgets\n'), ((368, 381), 'PyQt5.QtGui.QFont', 'QtGui.QFont', ([], {}), '()\n', (379, 381), False, 'from PyQt5 import QtCore, QtGui, QtWidgets\n'), ((599, 623), 'PyQt5.QtWid...
import os import sys import socket import logging from uuid import uuid4 from datetime import datetime from .paths import Path from PySide2.QtCore import QStandardPaths PORT = 8977 LOG_TO_FILE = False RUNNING_BUNDLE = getattr(sys, 'frozen', False) # noinspection SpellCheckingInspection logging.basicConfig( level=...
[ "uuid.uuid4", "os.path.exists", "socket.inet_aton", "socket.gethostname", "PySide2.QtCore.QStandardPaths.writableLocation", "datetime.datetime.now" ]
[((1534, 1557), 'os.path.exists', 'os.path.exists', (['filedir'], {}), '(filedir)\n', (1548, 1557), False, 'import os\n'), ((580, 600), 'socket.inet_aton', 'socket.inet_aton', (['ip'], {}), '(ip)\n', (596, 600), False, 'import socket\n'), ((2093, 2116), 'os.path.exists', 'os.path.exists', (['filedir'], {}), '(filedir)\...
import urllib.request as request import json wFactor = [11,10,9,8,7,6,5,4,3] ## Weighted array for wfCalc function def identDig(inpt): ## Task 1 check if all digits are identical function if all(i == inpt[0] for i in inpt): return True else: return False ...
[ "urllib.request.urlopen", "json.loads" ]
[((954, 1049), 'urllib.request.urlopen', 'request.urlopen', (['"""https://s3.amazonaws.com/cognisant-interview-resources/identifiers.json"""'], {}), "(\n 'https://s3.amazonaws.com/cognisant-interview-resources/identifiers.json')\n", (969, 1049), True, 'import urllib.request as request\n'), ((1090, 1103), 'json.loads...
from django.db import models from django.core.validators import MaxValueValidator, MinValueValidator class promoCode(models.Model): title = models.CharField(max_length=40, unique=True, blank=False, null=False) code = models.CharField(max_length=40, blank=False, null=False) promo = models.FloatField(default...
[ "django.db.models.CharField", "django.core.validators.MinValueValidator" ]
[((145, 214), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(40)', 'unique': '(True)', 'blank': '(False)', 'null': '(False)'}), '(max_length=40, unique=True, blank=False, null=False)\n', (161, 214), False, 'from django.db import models\n'), ((226, 282), 'django.db.models.CharField', 'models.Cha...
""" Copyright 2020 ICES, University of Manchester, Evenset Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ...
[ "nltk.sent_tokenize", "nltk.tokenize.util.align_tokens", "tensorflow.compat.v1.Session", "nltk.download", "nltk.tokenize.treebank.TreebankWordTokenizer", "re.compile" ]
[((622, 644), 'nltk.download', 'nltk.download', (['"""punkt"""'], {}), "('punkt')\n", (635, 644), False, 'import nltk\n'), ((861, 883), 'tensorflow.compat.v1.Session', 'tf.compat.v1.Session', ([], {}), '()\n', (881, 883), True, 'import tensorflow as tf\n'), ((911, 934), 'nltk.tokenize.treebank.TreebankWordTokenizer', '...
import os import pickle import numpy as np def deviation_from_actual_value(array): """ Calculates standard deviation for the parameters :param array: either (num_iters, num_points_in_sim, [n] params) or (num_iters, num_points_in_sim, [n*m] params) :return: """ if array.ndim == 3: devia...
[ "pickle.dump", "numpy.std", "os.getcwd", "numpy.zeros", "pickle.load" ]
[((328, 370), 'numpy.zeros', 'np.zeros', (['(array.shape[1], array.shape[2])'], {}), '((array.shape[1], array.shape[2]))\n', (336, 370), True, 'import numpy as np\n'), ((1451, 1465), 'pickle.load', 'pickle.load', (['f'], {}), '(f)\n', (1462, 1465), False, 'import pickle\n'), ((1543, 1557), 'pickle.load', 'pickle.load',...
from django.contrib import admin, messages from django_summernote.admin import SummernoteModelAdmin from posts.models import Post, Tag @admin.register(Post) class PostAdmin(SummernoteModelAdmin): summernote_fields = ('body',) list_display = ('title', 'id', 'is_public', 'slug', 'author', '...
[ "django.contrib.admin.register", "django.contrib.messages.success" ]
[((139, 159), 'django.contrib.admin.register', 'admin.register', (['Post'], {}), '(Post)\n', (153, 159), False, 'from django.contrib import admin, messages\n'), ((913, 932), 'django.contrib.admin.register', 'admin.register', (['Tag'], {}), '(Tag)\n', (927, 932), False, 'from django.contrib import admin, messages\n'), (...
import seaborn as sns import matplotlib.pyplot as plt import numpy as np def plot(gather_count, filename): gather_count = np.log(gather_count + 1) sns.color_palette("light:b", as_cmap=True) ax = sns.heatmap(gather_count, vmax=8, vmin=0, cmap="Purples", xticklabels=False, yticklabels=F...
[ "seaborn.heatmap", "numpy.log", "numpy.array", "seaborn.color_palette", "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.savefig" ]
[((128, 152), 'numpy.log', 'np.log', (['(gather_count + 1)'], {}), '(gather_count + 1)\n', (134, 152), True, 'import numpy as np\n'), ((157, 199), 'seaborn.color_palette', 'sns.color_palette', (['"""light:b"""'], {'as_cmap': '(True)'}), "('light:b', as_cmap=True)\n", (174, 199), True, 'import seaborn as sns\n'), ((209,...
'''Manual data ingestion DAG.''' from util import create_bq_ingest_operator # Ingore the Airflow module, it is installed in both our dev and prod environments from airflow.models import Variable # type: ignore from airflow import DAG # type: ignore from airflow.utils.dates import days_ago # type: ignore default_arg...
[ "airflow.models.Variable.get", "util.create_bq_ingest_operator", "airflow.utils.dates.days_ago", "airflow.DAG" ]
[((383, 512), 'airflow.DAG', 'DAG', (['"""manual_ingestion_dag"""'], {'default_args': 'default_args', 'schedule_interval': 'None', 'description': '"""Triggering for manual uploads."""'}), "('manual_ingestion_dag', default_args=default_args, schedule_interval=\n None, description='Triggering for manual uploads.')\n",...
# Date: Nrupatunga: Tuesday 04 July 2017 # Email: <EMAIL> # Name: Nrupatunga # Description: loading Imagenet dataset from __future__ import print_function import sys import os import cv2 import glob from annotation import annotation import xml.etree.ElementTree as ET from ..logger.logger import setup_logger from ..hel...
[ "xml.etree.ElementTree.parse", "os.path.isdir", "cv2.imread", "annotation.annotation", "os.path.join", "os.listdir" ]
[((4181, 4248), 'os.path.join', 'os.path.join', (['self.imagenet_folder', "(random_ann.image_path + '.JPEG')"], {}), "(self.imagenet_folder, random_ann.image_path + '.JPEG')\n", (4193, 4248), False, 'import os\n'), ((4672, 4692), 'cv2.imread', 'cv2.imread', (['img_path'], {}), '(img_path)\n', (4682, 4692), False, 'impo...
import win32serviceutil import win32service import win32event import servicemanager import socket import logging from logging import handlers import threading from xmediusmailrelayserver import server from xmediusmailrelayserver.server import start_server from os.path import dirname, join from os import mkdir, stat imp...
[ "win32serviceutil.HandleCommandLine", "os.mkdir", "os.stat", "os.path.dirname", "logging.Formatter", "socket.setdefaulttimeout", "threading.Event", "servicemanager.LogMsg", "win32serviceutil.ServiceFramework.__init__", "xmediusmailrelayserver.server.start_server", "os.path.join", "logging.hand...
[((382, 447), 'win32serviceutil.HandleCommandLine', 'win32serviceutil.HandleCommandLine', (['XMRSServiceRunner', 'None', 'argv'], {}), '(XMRSServiceRunner, None, argv)\n', (416, 447), False, 'import win32serviceutil\n'), ((755, 809), 'win32serviceutil.ServiceFramework.__init__', 'win32serviceutil.ServiceFramework.__ini...
import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl import sys import os from collections import defaultdict labelsize = 16 legendsize = 14 mpl.rcParams['xtick.labelsize'] = labelsize mpl.rcParams['ytick.labelsize'] = labelsize mpl.rcParams['axes.labelsize'] = labelsize mpl.rcParams['axes.title...
[ "matplotlib.pyplot.style.use", "matplotlib.pyplot.subplots" ]
[((377, 406), 'matplotlib.pyplot.style.use', 'plt.style.use', (['"""seaborn-deep"""'], {}), "('seaborn-deep')\n", (390, 406), True, 'import matplotlib.pyplot as plt\n'), ((2544, 2562), 'matplotlib.pyplot.subplots', 'plt.subplots', (['(1)', '(1)'], {}), '(1, 1)\n', (2556, 2562), True, 'import matplotlib.pyplot as plt\n'...
from __future__ import print_function from apiclient import discovery, errors from httplib2 import Http from oauth2client import file, client, tools import json # Set up auth for the API SCOPES = 'https://www.googleapis.com/auth/drive.readonly.metadata' # SCOPES = 'https://www.googleapis.com/auth/drive' store = file....
[ "oauth2client.file.Storage", "json.dump", "httplib2.Http", "oauth2client.client.flow_from_clientsecrets", "oauth2client.tools.run_flow" ]
[((315, 343), 'oauth2client.file.Storage', 'file.Storage', (['"""storage.json"""'], {}), "('storage.json')\n", (327, 343), False, 'from oauth2client import file, client, tools\n'), ((438, 494), 'oauth2client.client.flow_from_clientsecrets', 'client.flow_from_clientsecrets', (['"""client_id.json"""', 'SCOPES'], {}), "('...
import random import math import numpy from planner.state_space import test_goal, test_parent_operator, StateSpace, Solution, Plan from misc.numerical import INF from misc.functions import randomize def random_policy(current_vertex): edges = current_vertex.get_successors() if not edges: return None # ...
[ "planner.state_space.Plan", "numpy.average", "math.sqrt", "planner.state_space.StateSpace", "random.choice", "planner.state_space.test_goal", "planner.state_space.Solution", "misc.functions.randomize" ]
[((346, 366), 'random.choice', 'random.choice', (['edges'], {}), '(edges)\n', (359, 366), False, 'import random\n'), ((876, 934), 'planner.state_space.StateSpace', 'StateSpace', (['generator', 'start'], {'max_extensions': 'INF'}), '(generator, start, max_extensions=INF, **kwargs)\n', (886, 934), False, 'from planner.st...
from datetime import datetime, timedelta from string import ascii_uppercase from dateutil.parser import parse from flask import abort, flash, redirect, render_template, request, url_for from flask_login import current_user, login_required from markupsafe import Markup from notifications_python_client.errors import HTT...
[ "flask.flash", "flask.request.form.get", "datetime.datetime.utcnow", "flask.url_for", "app.main.forms.SetTemplateSenderForm", "app.template_statistics_client.get_template_statistics_for_template", "app.service_api_client.create_service_template", "app.utils.user_has_permissions", "app.main.forms.Cho...
[((1158, 1223), 'app.main.main.route', 'main.route', (['"""/services/<service_id>/templates/<uuid:template_id>"""'], {}), "('/services/<service_id>/templates/<uuid:template_id>')\n", (1168, 1223), False, 'from app.main import main\n'), ((1241, 1295), 'app.utils.user_has_permissions', 'user_has_permissions', (['"""view_...
"""Test layered configuration pipeline.""" from pathlib import Path from unittest.mock import patch import yaml from nitinat.pipeline4 import SYSTEM_CONFIG, read_layered_config GET_HOME_DIR = "nitinat.pipeline4._get_home_dir" def make_file(fs, path, contents): fs.create_file(path, contents=yaml.dump(contents)...
[ "nitinat.pipeline4.read_layered_config", "pathlib.Path", "yaml.dump" ]
[((563, 594), 'nitinat.pipeline4.read_layered_config', 'read_layered_config', (['"""test.yml"""'], {}), "('test.yml')\n", (582, 594), False, 'from nitinat.pipeline4 import SYSTEM_CONFIG, read_layered_config\n'), ((881, 912), 'nitinat.pipeline4.read_layered_config', 'read_layered_config', (['"""test.yml"""'], {}), "('te...
import pytest from elasticmagic.search import SearchQuery from .conftest import Car @pytest.mark.asyncio async def test_get(es_index, cars): doc = await es_index.get(1, doc_cls=Car) assert doc.name == '<NAME>' assert doc._id == '1' assert doc._index == es_index.get_name() assert doc._score is No...
[ "pytest.warns", "elasticmagic.search.SearchQuery" ]
[((3040, 3106), 'pytest.warns', 'pytest.warns', (['UserWarning'], {'match': '"""Cannot determine document class"""'}), "(UserWarning, match='Cannot determine document class')\n", (3052, 3106), False, 'import pytest\n'), ((3164, 3177), 'elasticmagic.search.SearchQuery', 'SearchQuery', ([], {}), '()\n', (3175, 3177), Fal...
from os import path, system from platform import system as osInfo from time import sleep def checkFile(): print("\n") checkFileData() sleep(0.1) print("\n") checkFileEssential() sleep(0.1) print("\n") def checkFileData(): try: if osInfo() == "Windows": ...
[ "os.path.isdir", "os.path.exists", "os.system", "time.sleep", "platform.system" ]
[((3828, 3836), 'time.sleep', 'sleep', (['(6)'], {}), '(6)\n', (3833, 3836), False, 'from time import sleep\n'), ((154, 164), 'time.sleep', 'sleep', (['(0.1)'], {}), '(0.1)\n', (159, 164), False, 'from time import sleep\n'), ((213, 223), 'time.sleep', 'sleep', (['(0.1)'], {}), '(0.1)\n', (218, 223), False, 'from time i...
# Copyright 2017 Mycroft AI Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
[ "time.time", "time.sleep" ]
[((3439, 3455), 'time.sleep', 'time.sleep', (['(0.25)'], {}), '(0.25)\n', (3449, 3455), False, 'import time\n'), ((3573, 3588), 'time.sleep', 'time.sleep', (['(0.1)'], {}), '(0.1)\n', (3583, 3588), False, 'import time\n'), ((2159, 2170), 'time.time', 'time.time', ([], {}), '()\n', (2168, 2170), False, 'import time\n')]
import oci import os import io import time import sys from pathlib import Path from oci.config import validate_config from oci.streaming import StreamClient from oci.streaming.models import CreateCursorDetails import base64 # configuration for connection to Oracle OCI # for user, tenancy you have to specify the OCID ...
[ "oci.config.validate_config", "oci.streaming.StreamClient", "base64.b64decode", "time.sleep", "oci.streaming.models.CreateCursorDetails", "sys.exit" ]
[((1076, 1099), 'oci.config.validate_config', 'validate_config', (['config'], {}), '(config)\n', (1091, 1099), False, 'from oci.config import validate_config\n'), ((1334, 1392), 'oci.streaming.models.CreateCursorDetails', 'CreateCursorDetails', ([], {'partition': 'partition_id', 'type': '"""LATEST"""'}), "(partition=pa...
import numpy as np import math from scipy.interpolate import interp1d import scipy.linalg as LA import os import numpy as np from skimage.transform import resize from multiprocessing import Process import shutil from tqdm import tqdm from concurrent.futures import ProcessPoolExecutor, as_completed def compute_tf_fi...
[ "os.mkdir", "numpy.abs", "concurrent.futures.ProcessPoolExecutor", "skimage.transform.resize", "shutil.rmtree", "numpy.zeros_like", "numpy.fft.fft", "numpy.power", "os.path.exists", "numpy.linspace", "numpy.fft.ifft", "tqdm.tqdm", "numpy.ceil", "numpy.min", "concurrent.futures.as_complet...
[((604, 652), 'numpy.linspace', 'np.linspace', (['(0)', '(2 * np.pi)', 's_Len'], {'endpoint': '(False)'}), '(0, 2 * np.pi, s_Len, endpoint=False)\n', (615, 652), True, 'import numpy as np\n'), ((743, 798), 'numpy.linspace', 'np.linspace', (['ps_MinFreqHz', 'ps_MaxFreqHz'], {'num': 'ps_FreqSeg'}), '(ps_MinFreqHz, ps_Max...
from django.shortcuts import render from django.http import HttpResponse from django.http import HttpResponseRedirect from .models import Country, Covid_Cases import pymongo from .forms import CountryForm # Connect to MongoDb client = pymongo.MongoClient('mongodb://localhost:27017/') if client: DB = client['termp...
[ "pymongo.MongoClient", "django.http.HttpResponseRedirect", "django.shortcuts.render" ]
[((237, 286), 'pymongo.MongoClient', 'pymongo.MongoClient', (['"""mongodb://localhost:27017/"""'], {}), "('mongodb://localhost:27017/')\n", (256, 286), False, 'import pymongo\n'), ((1189, 1240), 'django.shortcuts.render', 'render', (['req', '"""countries/country_list.html"""', 'context'], {}), "(req, 'countries/country...