code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) """ This module contains the indentation guide panel. """ # Third party imports from qtpy.QtCore import Qt from qtpy.QtGui import QPainter, QColor from intervaltree i...
[ "qtpy.QtGui.QColor", "qtpy.QtGui.QPainter", "spyder.api.panel.Panel.__init__" ]
[((796, 824), 'spyder.api.panel.Panel.__init__', 'Panel.__init__', (['self', 'editor'], {}), '(self, editor)\n', (810, 824), False, 'from spyder.api.panel import Panel\n'), ((1273, 1287), 'qtpy.QtGui.QPainter', 'QPainter', (['self'], {}), '(self)\n', (1281, 1287), False, 'from qtpy.QtGui import QPainter, QColor\n'), ((...
from invoke import Collection from . import ( container, cpython, func, git, libs, mxnet, runtime, ) ns = Collection( container, cpython, func, git, libs, mxnet, runtime, )
[ "invoke.Collection" ]
[((136, 199), 'invoke.Collection', 'Collection', (['container', 'cpython', 'func', 'git', 'libs', 'mxnet', 'runtime'], {}), '(container, cpython, func, git, libs, mxnet, runtime)\n', (146, 199), False, 'from invoke import Collection\n')]
import logging from flask import Response, make_response, request from microraiden import HTTPHeaders as header from flask_restful.utils import unpack from microraiden.channel_manager import ( ChannelManager, ) from microraiden.exceptions import ( NoOpenChannel, InvalidBalanceProof, InvalidBalanceAmoun...
[ "logging.getLogger", "flask_restful.utils.unpack", "microraiden.proxy.resources.request_data.RequestData", "eth_utils.is_address", "functools.wraps", "flask.make_response" ]
[((530, 557), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (547, 557), False, 'import logging\n'), ((7092, 7103), 'functools.wraps', 'wraps', (['func'], {}), '(func)\n', (7097, 7103), False, 'from functools import wraps\n'), ((802, 862), 'eth_utils.is_address', 'is_address', (['channel_...
# -*- coding: UTF-8 -*- """ split_by_area =========== Script : split_by_area.py Author : <EMAIL> Modified: 2018-08-27 Purpose : tools for working with numpy arrays Notes: ----- The xs and ys form pairs with the first and last points being identical The pairs are constructed using n-1 to ensur...
[ "arcpy.CopyFeatures_management", "numpy.repeat", "arcpytools_plt.fc_info", "numpy.set_printoptions", "arcpytools_plt.cal_area", "arcpy.Point", "arcpytools_plt.get_polys", "numpy.array", "arcpytools_plt.tweet", "arcpy.Exists", "arcpytools_plt._poly_ext", "arcpy.da.ExtendTable", "arcpy.Delete_...
[((1572, 1618), 'warnings.simplefilter', 'warnings.simplefilter', (['"""ignore"""', 'FutureWarning'], {}), "('ignore', FutureWarning)\n", (1593, 1618), False, 'import warnings\n'), ((1713, 1820), 'numpy.set_printoptions', 'np.set_printoptions', ([], {'edgeitems': '(5)', 'linewidth': '(80)', 'precision': '(2)', 'suppres...
from scipy import linalg from sklearn.decomposition import PCA from scipy.optimize import linear_sum_assignment as linear_assignment import numpy as np """ A function that takes a list of clusters, and a list of centroids for each cluster, and outputs the N max closest images in each cluster to its centroids """ def cl...
[ "sklearn.decomposition.PCA", "numpy.zeros", "scipy.linalg.norm" ]
[((1792, 1824), 'numpy.zeros', 'np.zeros', (['(D, D)'], {'dtype': 'np.int64'}), '((D, D), dtype=np.int64)\n', (1800, 1824), True, 'import numpy as np\n'), ((809, 840), 'sklearn.decomposition.PCA', 'PCA', ([], {'n_components': 'nb_components'}), '(n_components=nb_components)\n', (812, 840), False, 'from sklearn.decompos...
from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.views.generic import TemplateView from phantastes import views from django.contrib import admin urlpatterns = patterns( "", url(r"^$", views.index, name="home"), url...
[ "django.conf.urls.include", "django.conf.urls.static.static", "django.conf.urls.url" ]
[((798, 859), 'django.conf.urls.static.static', 'static', (['settings.MEDIA_URL'], {'document_root': 'settings.MEDIA_ROOT'}), '(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)\n', (804, 859), False, 'from django.conf.urls.static import static\n'), ((275, 310), 'django.conf.urls.url', 'url', (['"""^$"""', 'views....
import copy import time from datetime import datetime import binascii import graphviz import random from .models.enums.start_location import StartLocation from .models.enums.goal import Goal from .models.enums.statue_req import StatueReq from .models.enums.entrance_shuffle import EntranceShuffle from .models.enums.ene...
[ "random.uniform", "random.shuffle", "binascii.hexlify", "random.seed", "graphviz.Digraph", "time.time", "random.randint" ]
[((19836, 19869), 'random.shuffle', 'random.shuffle', (['junk_locations[0]'], {}), '(junk_locations[0])\n', (19850, 19869), False, 'import random\n'), ((19878, 19911), 'random.shuffle', 'random.shuffle', (['junk_locations[1]'], {}), '(junk_locations[1])\n', (19892, 19911), False, 'import random\n'), ((19920, 19954), 'r...
import datetime import os import time from enum import Enum import sys from MediaPlayer.Player import vlc from MediaPlayer.Player.vlc import libvlc_get_version, Media, MediaList from Shared.Events import EventManager, EventType from Shared.Logger import Logger, LogVerbosity from Shared.Observable import Observable fr...
[ "Shared.Settings.Settings.get_int", "MediaPlayer.Player.vlc.Media", "Shared.Threading.CustomThread", "MediaPlayer.Player.vlc.MediaList", "time.sleep", "datetime.datetime.now", "MediaPlayer.Player.vlc.Instance", "Shared.Logger.Logger", "Shared.Events.EventManager.register_event", "Shared.Settings.S...
[((926, 1011), 'Shared.Events.EventManager.register_event', 'EventManager.register_event', (['EventType.SetSubtitleFiles', 'self.set_subtitle_files'], {}), '(EventType.SetSubtitleFiles, self.set_subtitle_files\n )\n', (953, 1011), False, 'from Shared.Events import EventManager, EventType\n'), ((1015, 1075), 'Shared....
from discord.ext import commands import discord from datetime import datetime from src import util from tools.checker import Checker,Embed class Meta(commands.Cog): """Commands relating to the bot itself.""" def __init__(self, bot): self.bot = bot self.start_time = datetime.now() bot.r...
[ "tools.checker.Checker", "tools.checker.Embed", "datetime.datetime.now", "src.util.format_seconds", "discord.ext.commands.command" ]
[((350, 378), 'discord.ext.commands.command', 'commands.command', ([], {'name': '"""업타임"""'}), "(name='업타임')\n", (366, 378), False, 'from discord.ext import commands\n'), ((292, 306), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (304, 306), False, 'from datetime import datetime\n'), ((425, 441), 'tools.ch...
from logging import warning from api import gitlab from utilities import validate, types gitlab = gitlab.GitLab(types.Arguments().url) def get_all(projects): snippets = {} for project in projects: for key, value in project.items(): details = gitlab.get_project_snippets(key) i...
[ "api.gitlab.get_project_snippets", "api.gitlab.get_snippet_raw", "utilities.types.Arguments", "utilities.validate.api_result", "utilities.types.SecretsMonitor" ]
[((114, 131), 'utilities.types.Arguments', 'types.Arguments', ([], {}), '()\n', (129, 131), False, 'from utilities import validate, types\n'), ((747, 781), 'api.gitlab.get_snippet_raw', 'gitlab.get_snippet_raw', (['snippet_id'], {}), '(snippet_id)\n', (769, 781), False, 'from api import gitlab\n'), ((878, 900), 'utilit...
import requests if __name__ == "__main__": headers = { 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', 'Accept-Language': 'zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3', 'User-Agent': 'Mozilla/5.0 (Macintosh; ...
[ "requests.Session" ]
[((497, 515), 'requests.Session', 'requests.Session', ([], {}), '()\n', (513, 515), False, 'import requests\n')]
import matplotlib.pyplot as plt import requests import pandas as pd import json data = requests.get(r'https://www.bitstamp.net/api/v2/order_book/ethbtc') data = data.json() bids = pd.DataFrame() bids['quantity'] = [i[1] for i in data['bids']] bids['price'] = [i[0] for i in data['bids']] asks = pd.DataFrame() asks['pr...
[ "matplotlib.pyplot.vlines", "matplotlib.pyplot.hlines", "requests.get", "matplotlib.pyplot.figure", "pandas.DataFrame", "matplotlib.pyplot.ylim", "json.dump", "matplotlib.pyplot.show" ]
[((88, 153), 'requests.get', 'requests.get', (['"""https://www.bitstamp.net/api/v2/order_book/ethbtc"""'], {}), "('https://www.bitstamp.net/api/v2/order_book/ethbtc')\n", (100, 153), False, 'import requests\n'), ((182, 196), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (194, 196), True, 'import pandas as pd\n'...
import os import aiohttp import asyncio import json import time import datetime import logging import gidgethub import requests from gidgethub import aiohttp as gh_aiohttp import sys import pandas as pd sys.path.append("..") from utils.auth import get_jwt, get_installation, get_installation_access_token from utils.test...
[ "logging.getLogger", "pandas.read_csv", "utils.readConfig.ReadConfig", "utils.auth.get_jwt", "datetime.timedelta", "sys.path.append", "os.path.exists", "json.dumps", "pandas.DataFrame", "time.localtime", "asyncio.get_event_loop", "utils.auth.get_installation_access_token", "requests.get", ...
[((203, 224), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (218, 224), False, 'import sys\n'), ((398, 540), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO', 'filename': '"""../logs/regularMark.log"""', 'format': '"""%(asctime)s - %(name)s - %(levelname)s - %(message)...
from .abstract import AbstractAgentBasedModel import keras.backend as K import numpy as np from tensorflow import TensorShape from keras.layers import Dense, Reshape class TrajectorySamplerNetwork(AbstractAgentBasedModel): ''' Supervised model. Takes in a set of trajectories from the current state; lear...
[ "keras.backend.sum", "keras.backend.sqrt", "keras.backend.mean", "keras.backend.square", "keras.layers.Dense", "keras.layers.Reshape" ]
[((1029, 1076), 'keras.layers.Dense', 'Dense', (['(num_samples * traj_length * feature_size)'], {}), '(num_samples * traj_length * feature_size)\n', (1034, 1076), False, 'from keras.layers import Dense, Reshape\n'), ((1145, 1194), 'keras.layers.Reshape', 'Reshape', (['(num_samples, traj_length, feature_size)'], {}), '(...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Start Pymol and Bokeh server """ from __future__ import print_function import time import shlex import subprocess __author__ = "<NAME>" __copyright__ = "Copyright 2016, <NAME>" __lience__ = "MIT" __maintainer__ = "<NAME>" __email__ = "<EMAIL>" def execute_command...
[ "shlex.split", "subprocess.Popen", "time.sleep" ]
[((343, 364), 'shlex.split', 'shlex.split', (['cmd_line'], {}), '(cmd_line)\n', (354, 364), False, 'import shlex\n'), ((373, 443), 'subprocess.Popen', 'subprocess.Popen', (['args'], {'stdout': 'subprocess.PIPE', 'stderr': 'subprocess.PIPE'}), '(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n', (389, 443), False...
import numpy as np from rampwf.utils import BaseGenerativeRegressor class GenerativeRegressor(BaseGenerativeRegressor): def __init__(self, max_dists, target_dim): self.decomposition = 'autoregressive' def fit(self, X_array, y_array): pass def predict(self, X_array): # constant p...
[ "numpy.full", "numpy.zeros", "numpy.ones", "numpy.concatenate" ]
[((431, 475), 'numpy.full', 'np.full', ([], {'shape': '(n_samples, 1)', 'fill_value': '(10)'}), '(shape=(n_samples, 1), fill_value=10)\n', (438, 475), True, 'import numpy as np\n'), ((493, 517), 'numpy.zeros', 'np.zeros', (['(n_samples, 1)'], {}), '((n_samples, 1))\n', (501, 517), True, 'import numpy as np\n'), ((536, ...
#!/usr/bin/python import argparse from src.SCXML_Parser.Scxml_parsor import Scxml_parsor from src.arduino_helper.generate_fsm import generate_fsm parser = argparse.ArgumentParser() parser.add_argument('-f', action='store', dest='file', type=str, required=False, default="fsm.xml") inargs = parser.parse_args() print ...
[ "src.arduino_helper.generate_fsm.generate_fsm", "argparse.ArgumentParser", "src.SCXML_Parser.Scxml_parsor.Scxml_parsor" ]
[((157, 182), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (180, 182), False, 'import argparse\n'), ((372, 397), 'src.SCXML_Parser.Scxml_parsor.Scxml_parsor', 'Scxml_parsor', (['inargs.file'], {}), '(inargs.file)\n', (384, 397), False, 'from src.SCXML_Parser.Scxml_parsor import Scxml_parsor\n...
""" Generate Validation Certificate bases on Azure IoT Hub Verification Code Based on sample code from the cryptography library docs: https://cryptography.io/en/latest/x509/tutorial/#creating-a-self-signed-certificate """ import datetime from pathlib import Path from cryptography.hazmat.primitives import has...
[ "config.PASSPHRASE.keys", "cryptography.x509.random_serial_number", "pathlib.Path", "datetime.datetime.utcnow", "cryptography.x509.CertificateBuilder", "cryptography.hazmat.primitives.hashes.SHA256", "cryptography.hazmat.primitives.serialization.load_pem_private_key", "datetime.timedelta", "cryptogr...
[((571, 588), 'config.PASSPHRASE.keys', 'PASSPHRASE.keys', ([], {}), '()\n', (586, 588), False, 'from config import AZURE_IOT_VERIFICATION_CODE, COMPANY_INFO, PASSPHRASE, PATH_TO_CERTS, VALID_DAYS\n'), ((671, 737), 'cryptography.hazmat.primitives.serialization.load_pem_private_key', 'serialization.load_pem_private_key'...
import numpy as np import tensorflow as tf def deconv_layer(output_shape, filter_shape, activation, strides, name): scale = 1.0 / np.prod(filter_shape[:3]) seed = int(np.random.randint(0, 1000)) # 123 with tf.name_scope('conv_mnist/conv'): W = tf.Variable(tf.random_uniform(filter_shape, ...
[ "tensorflow.nn.conv2d", "numpy.prod", "numpy.sqrt", "tensorflow.nn.relu", "tensorflow.split", "tensorflow.random_uniform", "numpy.random.randint", "tensorflow.nn.sigmoid", "tensorflow.name_scope", "tensorflow.matmul", "tensorflow.nn.conv2d_transpose", "tensorflow.trainable_variables", "tenso...
[((1354, 1376), 'numpy.arange', 'np.arange', (['(0)', 'N_layers'], {}), '(0, N_layers)\n', (1363, 1376), True, 'import numpy as np\n'), ((1604, 1626), 'numpy.arange', 'np.arange', (['(0)', 'N_layers'], {}), '(0, N_layers)\n', (1613, 1626), True, 'import numpy as np\n'), ((3784, 3820), 'tensorflow.trainable_variables', ...
import random a1 = str(input(' diga o nome do aluno 1 ')) a2 = str(input(' diga o nome do aluno 2 ')) a3 = str(input(' diga o nome do aluno 3 ')) a4 = str(input(' diga o nome do aluno 4 ')) lista = [a1, a2, a3, a4] escolhido = random.choice(lista) print('O aluno soteado é o aluno {}'.format(escolhido))
[ "random.choice" ]
[((230, 250), 'random.choice', 'random.choice', (['lista'], {}), '(lista)\n', (243, 250), False, 'import random\n')]
import typing from collections import Counter import numpy as np from pytest import approx from zero_play.connect4.game import Connect4State from zero_play.game_state import GameState from zero_play.heuristic import Heuristic from zero_play.mcts_player import SearchNode, MctsPlayer, SearchManager from zero_play.playo...
[ "pytest.approx", "zero_play.playout.Playout", "zero_play.tictactoe.state.TicTacToeState", "zero_play.mcts_player.MctsPlayer", "zero_play.connect4.game.Connect4State", "collections.Counter", "numpy.stack", "zero_play.mcts_player.SearchNode", "numpy.array", "numpy.random.seed", "numpy.nonzero", ...
[((1770, 1796), 'zero_play.tictactoe.state.TicTacToeState', 'TicTacToeState', (['board_text'], {}), '(board_text)\n', (1784, 1796), False, 'from zero_play.tictactoe.state import TicTacToeState\n'), ((1908, 1925), 'zero_play.mcts_player.SearchNode', 'SearchNode', (['board'], {}), '(board)\n', (1918, 1925), False, 'from ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: scenes/main_menu_manager.py # ------------------- # Divine Oasis # Text Based RPG Game # By wsngamerz # ------------------- import logging import random from divineoasis.assets import Assets from divineoasis.audio_manager import AudioManager from divineoasi...
[ "logging.getLogger", "random.shuffle", "pyglet.sprite.Sprite", "pyglet.window.FPSDisplay", "divineoasis.scenes.main_menu.menu_scene.MenuScene", "divineoasis.scenes.main_menu.options_scene.OptionsScene", "divineoasis.scene.Scene.__init__" ]
[((717, 768), 'divineoasis.scene.Scene.__init__', 'Scene.__init__', (['self', 'assets', 'window', 'audio_manager'], {}), '(self, assets, window, audio_manager)\n', (731, 768), False, 'from divineoasis.scene import Scene\n'), ((792, 819), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (809...
""" Custom decorators ================= Custom decorators for various tasks and to bridge Flask with Eve """ from flask import current_app as app, request, Response, abort from functools import wraps from ext.auth.tokenauth import TokenAuth from ext.auth.helpers import Helpers # Because of circu...
[ "ext.auth.tokenauth.TokenAuth", "ext.auth.helpers.Helpers", "ext.app.eve_helper.eve_abort", "functools.wraps", "flask.current_app.globals.get", "flask.request.authorization.get" ]
[((726, 734), 'functools.wraps', 'wraps', (['f'], {}), '(f)\n', (731, 734), False, 'from functools import wraps\n'), ((2326, 2334), 'functools.wraps', 'wraps', (['f'], {}), '(f)\n', (2331, 2334), False, 'from functools import wraps\n'), ((2389, 2398), 'ext.auth.helpers.Helpers', 'Helpers', ([], {}), '()\n', (2396, 2398...
from collections import OrderedDict from graphene import Field # , annotate, ResolveInfo from graphene.relay import Connection, Node from graphene.types.objecttype import ObjectType, ObjectTypeOptions from graphene.types.utils import yank_fields_from_attrs from mongoengine import DoesNotExist from .converter import...
[ "collections.OrderedDict", "graphene.relay.Connection.create_type" ]
[((597, 610), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (608, 610), False, 'from collections import OrderedDict\n'), ((3211, 3272), 'graphene.relay.Connection.create_type', 'Connection.create_type', (['f"""{cls.__name__}Connection"""'], {'node': 'cls'}), "(f'{cls.__name__}Connection', node=cls)\n", (3...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ "os.path.isfile", "subprocess.Popen" ]
[((1637, 1706), 'subprocess.Popen', 'subprocess.Popen', (["['size', '-A', binary_path]"], {'stdout': 'subprocess.PIPE'}), "(['size', '-A', binary_path], stdout=subprocess.PIPE)\n", (1653, 1706), False, 'import subprocess\n'), ((3996, 4123), 'subprocess.Popen', 'subprocess.Popen', (["['ld', binary_path, '-T', rel_ld_scr...
import card_dispenser import time card_dispenser_object = card_dispenser.card_dispenser() while True: card_dispenser_object.give_card() time.sleep(10)
[ "card_dispenser.card_dispenser", "time.sleep" ]
[((59, 90), 'card_dispenser.card_dispenser', 'card_dispenser.card_dispenser', ([], {}), '()\n', (88, 90), False, 'import card_dispenser\n'), ((145, 159), 'time.sleep', 'time.sleep', (['(10)'], {}), '(10)\n', (155, 159), False, 'import time\n')]
# -*- coding: utf-8 -*- import logging from typing import Any, Dict, List, Mapping try: from collections import Mapping as CollectionsMapping except ImportError: from collections.abc import Mapping as CollectionsMapping from brewtils.models import Parameter, Resolvable from brewtils.resolvers.bytes import By...
[ "logging.getLogger", "brewtils.resolvers.chunks.ChunksResolver", "brewtils.resolvers.bytes.BytesResolver", "brewtils.models.Resolvable", "brewtils.models.Parameter", "brewtils.resolvers.identity.IdentityResolver", "brewtils.schema_parser.SchemaParser.serialize" ]
[((587, 605), 'brewtils.resolvers.identity.IdentityResolver', 'IdentityResolver', ([], {}), '()\n', (603, 605), False, 'from brewtils.resolvers.identity import IdentityResolver\n'), ((646, 672), 'brewtils.resolvers.bytes.BytesResolver', 'BytesResolver', (['easy_client'], {}), '(easy_client)\n', (659, 672), False, 'from...
from dudes.Ranks import Ranks import numpy as np import sys def printDebug(DEBUG, l): if DEBUG: sys.stderr.write(str(l) + "\n") def group_max(groups, data, pre_order=None): if pre_order is None: order = np.lexsort((data, groups)) else: order = pre_order groups = groups[order] #this is only needed if grou...
[ "numpy.lexsort", "dudes.Ranks.Ranks.ranks.index" ]
[((870, 893), 'dudes.Ranks.Ranks.ranks.index', 'Ranks.ranks.index', (['rank'], {}), '(rank)\n', (887, 893), False, 'from dudes.Ranks import Ranks\n'), ((213, 239), 'numpy.lexsort', 'np.lexsort', (['(data, groups)'], {}), '((data, groups))\n', (223, 239), True, 'import numpy as np\n')]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Feb 3 10:27:25 2019 @author: alishbaimran """ import pandas as pd import numpy as np import matplotlib.pyplot as plt from imutils import paths from sklearn.metrics import classification_report from sklearn.metrics import accuracy_score f...
[ "matplotlib.pyplot.ylabel", "keras.preprocessing.image.ImageDataGenerator", "keras.optimizers.SGD", "imutils.paths.list_images", "keras.layers.Dense", "numpy.arange", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.style.use", "keras.models.Model", "keras.callbacks.EarlyStopping", "keras.applicat...
[((1032, 1090), 'keras.preprocessing.image.ImageDataGenerator', 'ImageDataGenerator', ([], {'rescale': '(1.0 / 255)', 'fill_mode': '"""nearest"""'}), "(rescale=1.0 / 255, fill_mode='nearest')\n", (1050, 1090), False, 'from keras.preprocessing.image import ImageDataGenerator\n'), ((1125, 1183), 'keras.preprocessing.imag...
# encoding: utf-8 from antlr4 import * from io import StringIO from typing.io import TextIO import sys def serializedATN(): with StringIO() as buf: buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3@") buf.write("\u027b\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7") buf.writ...
[ "io.StringIO" ]
[((134, 144), 'io.StringIO', 'StringIO', ([], {}), '()\n', (142, 144), False, 'from io import StringIO\n')]
# -*- coding: utf-8 -*- from __future__ import unicode_literals """Specifies static assets (CSS, JS) required by the CATMAID front-end. This module specifies all the static files that are required by the synapsesuggestor front-end. """ from collections import OrderedDict JAVASCRIPT = OrderedDict() JAVASCRIPT['syna...
[ "collections.OrderedDict" ]
[((289, 302), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (300, 302), False, 'from collections import OrderedDict\n')]
from pathlib import Path import click import cligj import geojson import mercantile from shapely.geometry import asShape, box from shapely.ops import split @click.command() @cligj.features_in_arg @click.option( '-z', '--min-zoom', type=int, required=True, help='Min zoom level to create tiles for'...
[ "geojson.dumps", "shapely.ops.split", "pathlib.Path", "click.option", "shapely.geometry.asShape", "geojson.Feature", "click.Path", "click.command", "mercantile.bounds" ]
[((160, 175), 'click.command', 'click.command', ([], {}), '()\n', (173, 175), False, 'import click\n'), ((200, 305), 'click.option', 'click.option', (['"""-z"""', '"""--min-zoom"""'], {'type': 'int', 'required': '(True)', 'help': '"""Min zoom level to create tiles for"""'}), "('-z', '--min-zoom', type=int, required=Tru...
from __future__ import annotations from typing import List, Optional from xrpl import CryptoAlgorithm from xrpl.core.addresscodec import encode_account_public_key, encode_node_public_key from xrpl.core.keypairs import derive_keypair, generate_seed from xrpl.wallet import Wallet from slk.config.helper_classes import ...
[ "slk.config.helper_classes.Ports", "xrpl.core.keypairs.derive_keypair", "xrpl.core.keypairs.generate_seed", "xrpl.wallet.Wallet.create" ]
[((1596, 1636), 'xrpl.wallet.Wallet.create', 'Wallet.create', (['CryptoAlgorithm.SECP256K1'], {}), '(CryptoAlgorithm.SECP256K1)\n', (1609, 1636), False, 'from xrpl.wallet import Wallet\n'), ((553, 579), 'slk.config.helper_classes.Ports', 'Ports', (['(start_cfg_index + i)'], {}), '(start_cfg_index + i)\n', (558, 579), F...
### DEPRECATE THESE? OLD VERSIONS OF CLEANING FUNCTIONS FOR JUST EBIKES ### NO LONGER WORKING WITH THESE import pandas as pd import numpy as np from shapely.geometry import Point import geopandas as gpd from cabi.utils import which_anc, station_anc_dict from cabi.get_data import anc_gdf gdf = anc_gdf() anc_dict = st...
[ "pandas.read_pickle", "numpy.select", "cabi.utils.station_anc_dict", "cabi.get_data.anc_gdf", "pandas.DataFrame" ]
[((297, 306), 'cabi.get_data.anc_gdf', 'anc_gdf', ([], {}), '()\n', (304, 306), False, 'from cabi.get_data import anc_gdf\n'), ((318, 336), 'cabi.utils.station_anc_dict', 'station_anc_dict', ([], {}), '()\n', (334, 336), False, 'from cabi.utils import which_anc, station_anc_dict\n'), ((533, 579), 'pandas.read_pickle', ...
""" Copyright (C) 2022 <NAME> Released under MIT License. See the file LICENSE for details. This module describes 2D/3D tracks. GUTS's output is a list of instances of these classes. """ import numpy as np from filter import filter2D, filter3D from options import Options, Filter2DParams, Filter3DPa...
[ "numpy.mean", "numpy.abs", "util.dict_merge", "util.to_aabb", "filter.filter2D", "util.weighted_angle", "filter.filter3D", "numpy.array", "util.dict_copy", "numpy.isnan", "numpy.arctan2", "activecorners.activecorners", "position.Position", "util.vector_dist" ]
[((3262, 3439), 'filter.filter2D', 'filter2D', (['[x, y]', '[x2 - x1, y2 - y1]'], {'P_factor': 'p.P_factor', 'Q_c': 'p.Q_c', 'Q_s': 'p.Q_s', 'Q_v': 'p.Q_v', 'Q_ds': 'p.Q_ds', 'Q_a': 'p.Q_a', 'Q_cov': 'p.Q_cov', 'Q_scov': 'p.Q_scov', 'R_c': 'p.R_c', 'R_s': 'p.R_s'}), '([x, y], [x2 - x1, y2 - y1], P_factor=p.P_factor, Q_...
# -*- coding:utf-8 -*- # 1.导入拓展 from flask import Flask from flask_restful import Api import config from app.api.view.auth import wx_login from app.api.view.talk import Reply # 2.创建flask应用实例,__name__用来确定资源所在的路径 app = Flask(__name__) app.config.from_object(config.DevelopmentConfig) api = Api(app) # 3.定义全局变量 # 4.定义路由和视...
[ "app.api.view.auth.wx_login.as_view", "flask_restful.Api", "app.api.view.talk.Reply.as_view", "flask.Flask" ]
[((218, 233), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (223, 233), False, 'from flask import Flask\n'), ((289, 297), 'flask_restful.Api', 'Api', (['app'], {}), '(app)\n', (292, 297), False, 'from flask_restful import Api\n'), ((384, 411), 'app.api.view.auth.wx_login.as_view', 'wx_login.as_view', (['"...
import numpy.random as rand import numpy as np import pandas as pd import random import math import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib.animation import FuncAnimation from Particle import Particle #Initialization of the plots fig = plt.figure(figsize=(20,10)) axes = [None...
[ "random.uniform", "numpy.random.random_sample", "pandas.read_csv", "Particle.Particle", "matplotlib.animation.FuncAnimation", "matplotlib.pyplot.figure", "numpy.zeros", "matplotlib.pyplot.show" ]
[((280, 308), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': '(20, 10)'}), '(figsize=(20, 10))\n', (290, 308), True, 'import matplotlib.pyplot as plt\n'), ((926, 950), 'numpy.zeros', 'np.zeros', (['total_n_values'], {}), '(total_n_values)\n', (934, 950), True, 'import numpy as np\n'), ((962, 1014), 'Particl...
#ASAPY import requests __URL_GLOBAL = "https://www.urionlinejudge.com.br"; def printme(pagina): body = getCorpo(__URL_GLOBAL+"/judge/pt/problems/view/"+pagina); iInicio = find_str(body, "<iframe"); pos = (body[iInicio:]); iFim = find_str(pos, ">")+1; tupla = pos[:iFim]; page2 = getAttr(tupl...
[ "requests.get" ]
[((1048, 1065), 'requests.get', 'requests.get', (['req'], {}), '(req)\n', (1060, 1065), False, 'import requests\n')]
from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI from direct.distributed.ClockDelta import * import ButterflyGlobals import random class DistributedButterflyAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory("Distri...
[ "random.uniform", "ButterflyGlobals.getNextPos", "ButterflyGlobals.getFirstRoute", "ButterflyGlobals.generateIndexes", "direct.directnotify.DirectNotifyGlobal.directNotify.newCategory", "direct.distributed.DistributedObjectAI.DistributedObjectAI.__init__" ]
[((269, 338), 'direct.directnotify.DirectNotifyGlobal.directNotify.newCategory', 'DirectNotifyGlobal.directNotify.newCategory', (['"""DistributedButterflyAI"""'], {}), "('DistributedButterflyAI')\n", (312, 338), False, 'from direct.directnotify import DirectNotifyGlobal\n'), ((377, 416), 'direct.distributed.Distributed...
from io import IncrementalNewlineDecoder from django.db import models # Classe de departamento class Departamento(models.Model): id = models.IntegerField(primary_key=True, editable=False) nome = models.CharField(max_length=255, blank=False) numero_projetos = models.IntegerField(default=0) # Quantidade de p...
[ "django.db.models.CharField", "django.db.models.IntegerField" ]
[((139, 192), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'primary_key': '(True)', 'editable': '(False)'}), '(primary_key=True, editable=False)\n', (158, 192), False, 'from django.db import models\n'), ((204, 249), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(255)', 'blank':...
import argparse import os import torch import matplotlib.pyplot as plt from torch.utils.data.distributed import DistributedSampler from torch import distributed as dist from torch import optim from tqdm import tqdm from torch_ema import ExponentialMovingAverage from cifr.core.config import Config from cifr.models.bui...
[ "cifr.models.losses.contextual_loss.ContextualLoss", "torch.nn.L1Loss", "cifr.models.losses.gan_loss.d_logistic_loss", "torch.utils.data.distributed.DistributedSampler", "torch.distributed.get_rank", "torch.distributed.is_available", "torch.distributed.barrier", "cifr.models.builder.build_dataset", ...
[((959, 980), 'torch.distributed.get_world_size', 'dist.get_world_size', ([], {}), '()\n', (978, 980), True, 'from torch import distributed as dist\n'), ((1024, 1038), 'torch.distributed.barrier', 'dist.barrier', ([], {}), '()\n', (1036, 1038), True, 'from torch import distributed as dist\n'), ((1151, 1172), 'torch.dis...
from __future__ import annotations import ast import pytest from flake8_pie import Flake8PieCheck from flake8_pie.pie804_no_unnecessary_dict_kwargs import PIE804 from flake8_pie.tests.utils import Error, ex, to_errors EXAMPLES = [ ex( code=""" foo(**{"bar": True}) """, errors=[PIE804(lineno=2, c...
[ "flake8_pie.pie804_no_unnecessary_dict_kwargs.PIE804", "pytest.mark.parametrize", "flake8_pie.Flake8PieCheck", "ast.parse", "flake8_pie.tests.utils.ex" ]
[((1060, 1108), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""code,errors"""', 'EXAMPLES'], {}), "('code,errors', EXAMPLES)\n", (1083, 1108), False, 'import pytest\n'), ((820, 1040), 'flake8_pie.tests.utils.ex', 'ex', ([], {'code': '"""\nfoo(**{**data, "foo": "buzz"})\nfoo(**buzz)\nfoo(**{"bar-foo": True}...
import pyClarion.base as clb import pyClarion.numdicts as nd import unittest import unittest.mock as mock class TestProcess(unittest.TestCase): @mock.patch.object(clb.Process, "_serves", clb.ConstructType.chunks) def test_check_inputs_accepts_good_input_structure(self): process = clb.Process( ...
[ "pyClarion.base.terminus", "pyClarion.base.chunks", "pyClarion.base.buffer", "pyClarion.numdicts.NumDict", "unittest.mock.patch.object" ]
[((153, 220), 'unittest.mock.patch.object', 'mock.patch.object', (['clb.Process', '"""_serves"""', 'clb.ConstructType.chunks'], {}), "(clb.Process, '_serves', clb.ConstructType.chunks)\n", (170, 220), True, 'import unittest.mock as mock\n'), ((642, 709), 'unittest.mock.patch.object', 'mock.patch.object', (['clb.Process...
import random import requests def clean_proxies(): proxies = [] with open('proxies', 'r') as handle: contents = handle.read().strip() for proxy in contents.split('\n'): proxies.append(proxy) proxy2 = [] print(proxies) for proxy in proxies: try: response = requests.get('https://google.com', proxies={'...
[ "requests.get" ]
[((275, 377), 'requests.get', 'requests.get', (['"""https://google.com"""'], {'proxies': "{'https': 'https://' + proxy}", 'timeout': '(8)', 'verify': '(False)'}), "('https://google.com', proxies={'https': 'https://' + proxy},\n timeout=8, verify=False)\n", (287, 377), False, 'import requests\n')]
from django.shortcuts import render,redirect from django.http import HttpResponse from .models import * from .forms import * # Create your views here. def index(request): tasks = Task.objects.all() form=TaskForm() if request.method =='POST': form = TaskForm(request.POST) if form....
[ "django.shortcuts.render", "django.shortcuts.redirect" ]
[((446, 483), 'django.shortcuts.render', 'render', (['request', '"""list.html"""', 'context'], {}), "(request, 'list.html', context)\n", (452, 483), False, 'from django.shortcuts import render, redirect\n'), ((767, 811), 'django.shortcuts.render', 'render', (['request', '"""update_task.html"""', 'context'], {}), "(requ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import jinja2 import webapp2 import logging import threading from mandrill_email import * from webapp2_extras import routes from cookie import * from settings import * from decorators import * from functions import * from google.appengine.api import taskqueue from google.ap...
[ "threading.local", "google.appengine.ext.ndb.put_multi", "application.models.apidata.APIData.query", "webapp2.Route", "jinja2.FileSystemLoader" ]
[((5624, 5641), 'threading.local', 'threading.local', ([], {}), '()\n', (5639, 5641), False, 'import threading\n'), ((5691, 5739), 'jinja2.FileSystemLoader', 'jinja2.FileSystemLoader', (['"""application/frontend/"""'], {}), "('application/frontend/')\n", (5714, 5739), False, 'import jinja2\n'), ((5216, 5235), 'google.a...
from railrl.data_management.simple_replay_pool import SimpleReplayPool from railrl.predictors.dynamics_model import FullyConnectedEncoder, InverseModel, ForwardModel import tensorflow as tf import time import numpy as np from sandbox.rocky.tf.optimizers.penalty_lbfgs_optimizer import PenaltyLbfgsOptimizer from railrl.m...
[ "numpy.clip", "tensorflow.shape", "numpy.random.rand", "tensorflow.get_variable", "tensorflow.get_default_session", "tensorflow.gradients", "numpy.argsort", "tensorflow.contrib.opt.ScipyOptimizerInterface", "numpy.moveaxis", "numpy.linalg.norm", "numpy.cov", "railrl.misc.pyhelper_fns.vis_utils...
[((886, 937), 'tensorflow.op_scope', 'tf.op_scope', (['[params, indices]', 'name', '"""gather_cols"""'], {}), "([params, indices], name, 'gather_cols')\n", (897, 937), True, 'import tensorflow as tf\n'), ((987, 1030), 'tensorflow.convert_to_tensor', 'tf.convert_to_tensor', (['params'], {'name': '"""params"""'}), "(para...
# coding: utf-8 """ Thingsboard REST API For instructions how to authorize requests please visit <a href='http://thingsboard.io/docs/reference/rest-api/'>REST API documentation page</a>. OpenAPI spec version: 2.0 Contact: <EMAIL> Generated by: https://github.com/swagger-api/swagger-codegen.git ""...
[ "unittest.main", "swagger_client.apis.auth_controller_api.AuthControllerApi" ]
[((1941, 1956), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1954, 1956), False, 'import unittest\n'), ((676, 735), 'swagger_client.apis.auth_controller_api.AuthControllerApi', 'swagger_client.apis.auth_controller_api.AuthControllerApi', ([], {}), '()\n', (733, 735), False, 'import swagger_client\n')]
import numpy as np import matplotlib.pyplot as plt from docx import Document from docx.shared import Cm import math def split_file(file): """split the file by different queries into seperate list element and return one list as a whole. """ answer = [[]] j = 0 for i in file: if i == "\n": ...
[ "matplotlib.pyplot.savefig", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "matplotlib.pyplot.clf", "docx.shared.Cm", "math.log2", "matplotlib.pyplot.axis", "matplotlib.pyplot.close", "matplotlib.pyplot.title", "matplotlib.pyplot.cla", "docx.Document" ]
[((4774, 4825), 'matplotlib.pyplot.plot', 'plt.plot', (['final_recall', 'final_precision'], {'marker': '"""."""'}), "(final_recall, final_precision, marker='.')\n", (4782, 4825), True, 'import matplotlib.pyplot as plt\n'), ((4829, 4849), 'matplotlib.pyplot.xlabel', 'plt.xlabel', (['"""Recall"""'], {}), "('Recall')\n", ...
import csv import re import netifaces as ni from twisted.internet import defer from twisted.names import client from pygear.logging import log from pygear.core.six.moves.urllib.parse import urlparse, urljoin from .interfaces import ITaskStorage csv.register_dialect('pipes', delimiter='|') client_callback_schemes = ...
[ "csv.register_dialect", "pygear.logging.log.warn", "re.compile", "twisted.names.client.getHostByName", "twisted.internet.defer.returnValue", "netifaces.ifaddresses", "pygear.core.six.moves.urllib.parse.urljoin", "pygear.core.six.moves.urllib.parse.urlparse", "csv.reader" ]
[((249, 293), 'csv.register_dialect', 'csv.register_dialect', (['"""pipes"""'], {'delimiter': '"""|"""'}), "('pipes', delimiter='|')\n", (269, 293), False, 'import csv\n'), ((447, 504), 're.compile', 're.compile', (['"""^\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}$"""'], {}), "('^\\\\d{1,3}\\\\.\\\\d{1,3}\\...
import os import json import math from neuralparticles.tensorflow.tools.hyper_parameter import HyperParameter, ValueType, SearchType from neuralparticles.tensorflow.tools.hyper_search import HyperSearch import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import keras from neuralparticles.tensor...
[ "neuralparticles.tools.data_helpers.extract_particles", "numpy.count_nonzero", "neuralparticles.tensorflow.tools.eval_helpers.EvalCallback", "numpy.arange", "os.path.exists", "keras.utils.plot_model", "neuralparticles.tensorflow.models.PUNet.PUNet", "neuralparticles.tools.data_helpers.load_patches_fro...
[((224, 245), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (238, 245), False, 'import matplotlib\n'), ((1881, 1905), 'os.mkdir', 'os.mkdir', (['tmp_model_path'], {}), '(tmp_model_path)\n', (1889, 1905), False, 'import os\n'), ((1943, 1966), 'os.mkdir', 'os.mkdir', (['tmp_eval_path'], {}), '(tmp...
from collections import defaultdict from copy import copy import re import json from django.conf import settings from django.test import override_settings, TestCase import responses from prison.models import PrisonerLocation from prison.tests.utils import ( load_prisoner_locations_from_dev_prison_api, random_...
[ "prison.tests.utils.random_prisoner_dob", "prison.tests.utils.random_prisoner_number", "re.compile", "json.dumps", "django.test.override_settings", "collections.defaultdict", "prison.tests.utils.random_prisoner_name", "responses.RequestsMock", "copy.copy", "prison.models.PrisonerLocation.objects.f...
[((2932, 3114), 'django.test.override_settings', 'override_settings', ([], {'HMPPS_CLIENT_SECRET': '"""test-secret"""', 'HMPPS_AUTH_BASE_URL': '"""https://sign-in-dev.hmpps.local/auth/"""', 'HMPPS_PRISON_API_BASE_URL': '"""https://api-dev.prison.local/"""'}), "(HMPPS_CLIENT_SECRET='test-secret', HMPPS_AUTH_BASE_URL=\n ...
from BridgePython import Bridge bridge = Bridge(api_key='myapikey') class PongHandler(object): def pong(self): print ("PONG!") bridge.store_service("pong", PongHandler()) bridge.get_service("ping").ping() bridge.connect()
[ "BridgePython.Bridge" ]
[((41, 67), 'BridgePython.Bridge', 'Bridge', ([], {'api_key': '"""myapikey"""'}), "(api_key='myapikey')\n", (47, 67), False, 'from BridgePython import Bridge\n')]
import torch.nn as nn class FcNet(nn.Module): def __init__(self, config, input_features, nr_labels): super(FcNet, self).__init__() self.config = config # create the blocks self.layers = self._make_block(self.config["num_layers"], input_features) self.fc_layer = nn.Linear(...
[ "torch.nn.ReLU", "torch.nn.Dropout", "torch.nn.Sequential", "torch.nn.BatchNorm1d", "torch.nn.Linear" ]
[((951, 973), 'torch.nn.Sequential', 'nn.Sequential', (['*blocks'], {}), '(*blocks)\n', (964, 973), True, 'import torch.nn as nn\n'), ((1338, 1395), 'torch.nn.Linear', 'nn.Linear', (['in_features', "config['num_units_%i' % block_nr]"], {}), "(in_features, config['num_units_%i' % block_nr])\n", (1347, 1395), True, 'impo...
from __future__ import annotations import os import string import random import logging import vapoursynth as vs from pathlib import Path from requests import Session from functools import partial from requests_toolbelt import MultipartEncoder, MultipartEncoderMonitor from typing import Any, Mapping, Callable, Dict, F...
[ "PyQt5.QtCore.pyqtSignal", "requests.Session", "requests_toolbelt.MultipartEncoderMonitor", "logging.warning", "PyQt5.QtWidgets.QHBoxLayout", "PyQt5.QtWidgets.QProgressBar", "typing.cast", "random.choices", "PyQt5.QtWidgets.QLabel", "functools.partial", "PyQt5.QtWidgets.QPushButton", "PyQt5.Qt...
[((1311, 1323), 'PyQt5.QtCore.pyqtSignal', 'pyqtSignal', ([], {}), '()\n', (1321, 1323), False, 'from PyQt5.QtCore import QObject, QThread, pyqtSignal\n'), ((1343, 1358), 'PyQt5.QtCore.pyqtSignal', 'pyqtSignal', (['int'], {}), '(int)\n', (1353, 1358), False, 'from PyQt5.QtCore import QObject, QThread, pyqtSignal\n'), (...
# see https://www.spinningbytes.com/resources/germansentiment/ and https://github.com/aritter/twitter_download for obtaining the data. import os from pathlib import Path import pandas as pd import numpy as np from sklearn.model_selection import train_test_split from conversion import convert_examples_to_features, conv...
[ "numpy.savez", "pathlib.Path", "sklearn.model_selection.train_test_split", "conversion.convert_text_to_examples", "numpy.logical_not", "os.path.join", "numpy.array", "conversion.convert_examples_to_features", "numpy.load" ]
[((990, 1049), 'sklearn.model_selection.train_test_split', 'train_test_split', (['X', 'y'], {'test_size': 'test_size', 'random_state': '(0)'}), '(X, y, test_size=test_size, random_state=0)\n', (1006, 1049), False, 'from sklearn.model_selection import train_test_split\n'), ((421, 461), 'os.path.join', 'os.path.join', ([...
# # -*- coding: utf-8 -*- # # Copyright (c) 2020 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/licenses/LICENSE-2.0 # # Unless required by app...
[ "tensorflow.compat.v1.placeholder", "lpot.Benchmark", "lpot.adaptor.tf_utils.util.get_slim_graph", "argparse.ArgumentParser", "tensorflow.compat.v1.logging.set_verbosity", "tensorflow.compat.v1.app.run", "tensorflow.compat.v1.disable_eager_execution", "lpot.Quantization", "numpy.array", "copy.deep...
[((805, 867), 'tensorflow.compat.v1.logging.set_verbosity', 'tf.compat.v1.logging.set_verbosity', (['tf.compat.v1.logging.ERROR'], {}), '(tf.compat.v1.logging.ERROR)\n', (839, 867), True, 'import tensorflow as tf\n'), ((868, 906), 'tensorflow.compat.v1.disable_eager_execution', 'tf.compat.v1.disable_eager_execution', (...
import unittest from musket_core import projects from musket_core import parralel import os fl=__file__ fl=os.path.dirname(fl) class TestCoders(unittest.TestCase): def test_basic_network(self): pr = projects.Project(os.path.join(fl, "project")) exp = pr.byName("exp01") tasks = exp.fit() ...
[ "os.path.dirname", "os.path.join", "musket_core.parralel.get_executor" ]
[((109, 128), 'os.path.dirname', 'os.path.dirname', (['fl'], {}), '(fl)\n', (124, 128), False, 'import os\n'), ((338, 365), 'musket_core.parralel.get_executor', 'parralel.get_executor', (['(1)', '(1)'], {}), '(1, 1)\n', (359, 365), False, 'from musket_core import parralel\n'), ((231, 258), 'os.path.join', 'os.path.join...
#!/usr/bin/env python3 """ Based on template: https://github.com/FedericoStra/cython-package-example """ from setuptools import setup with open("requirements.txt") as fp: install_requires = fp.read().strip().split("\n") with open("requirements_dev.txt") as fp: dev_requires = fp.read().strip().split("\n") s...
[ "setuptools.setup" ]
[((319, 441), 'setuptools.setup', 'setup', ([], {'install_requires': 'install_requires', 'extras_require': "{'dev': dev_requires, 'docs': ['sphinx', 'sphinx-rtd-theme']}"}), "(install_requires=install_requires, extras_require={'dev':\n dev_requires, 'docs': ['sphinx', 'sphinx-rtd-theme']})\n", (324, 441), False, 'fr...
import sys, re if __name__=='__main__': sys.path.append(sys.path[0]+'\\..') from body.bone import NetP from body.soul import Karma from body.body_motor import Motor from body.body_pool import Pool from body.body_brain import Brain from body.body_debugger import Debugger from tools import tools_sl, tools_ba...
[ "body.body_pool.Pool", "body.bone.NetP", "PyQt5.QtGui.QFont", "tools.tools_basic.setPoint", "tools.tools_basic.buildPoints_tokener", "body.body_brain.Brain", "tools.tools_basic.getAllSystemPt", "PyQt5.QtWidgets.QMessageBox.Warning", "PyQt5.QtWidgets.QApplication", "body.body_debugger.Debugger", ...
[((46, 83), 'sys.path.append', 'sys.path.append', (["(sys.path[0] + '\\\\..')"], {}), "(sys.path[0] + '\\\\..')\n", (61, 83), False, 'import sys, re\n'), ((9798, 9820), 'PyQt5.QtWidgets.QApplication', 'QApplication', (['sys.argv'], {}), '(sys.argv)\n', (9810, 9820), False, 'from PyQt5.QtWidgets import QTextEdit, QAppli...
from django.views.generic import DeleteView from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib import messages from django.urls import reverse from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from schedule.models import Calendar from schedule.views i...
[ "django.contrib.messages.error" ]
[((975, 1034), 'django.contrib.messages.error', 'messages.error', (['self.request', '"""Event created successfully."""'], {}), "(self.request, 'Event created successfully.')\n", (989, 1034), False, 'from django.contrib import messages\n'), ((1740, 1798), 'django.contrib.messages.error', 'messages.error', (['self.reques...
"""Defines the application configuration for the product application""" from __future__ import unicode_literals from django.apps import AppConfig class ProductConfig(AppConfig): """Configuration for the product application""" name = 'product' label = 'product' verbose_name = 'Product' def ready(...
[ "product.configuration.product_data_file.ProductDataFileStore" ]
[((658, 680), 'product.configuration.product_data_file.ProductDataFileStore', 'ProductDataFileStore', ([], {}), '()\n', (678, 680), False, 'from product.configuration.product_data_file import ProductDataFileStore\n')]
# -*- coding: utf-8 -*- from dateutil.parser import isoparse class ISODateTime(object): def __init__(self, initval=None): self.val = initval def __get__(self, obj, obj_type): return self.val def __set__(self, obj, string_date): if string_date is None: self.val = None ...
[ "dateutil.parser.isoparse" ]
[((394, 415), 'dateutil.parser.isoparse', 'isoparse', (['string_date'], {}), '(string_date)\n', (402, 415), False, 'from dateutil.parser import isoparse\n')]
# Copyright 2018 Cognibit Solutions LLP. # # 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 ...
[ "matplotlib.pyplot.imshow", "sklearn.metrics.confusion_matrix.max", "matplotlib.pyplot.title", "matplotlib.pyplot.xticks", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.colorbar", "matplotlib.pyplot.fill_between", "matplotlib.pyplot.yticks", "matplotlib.pyplot.tight_la...
[((2206, 2269), 'matplotlib.pyplot.step', 'plt.step', (['recall', 'precision'], {'color': '"""b"""', 'alpha': '(0.2)', 'where': '"""post"""'}), "(recall, precision, color='b', alpha=0.2, where='post')\n", (2214, 2269), True, 'import matplotlib.pyplot as plt\n'), ((2271, 2328), 'matplotlib.pyplot.fill_between', 'plt.fil...
import numpy as np from models import * from datasets import * from util import parse_funct_arguments import pickle import itertools def mse(y_true, y_mdl): return np.mean((y_true - y_mdl)**2) def train(mdl, dset): # Get train u_train, y_train = dset.get_train() # Fit X_train, z_train = construc...
[ "numpy.mean", "pickle.dump", "argparse.ArgumentParser", "tqdm.tqdm.write", "tqdm.tqdm", "os.path.isdir", "util.parse_funct_arguments", "numpy.concatenate", "numpy.random.seed", "pandas.DataFrame", "os.mkdir", "numpy.logspace" ]
[((170, 200), 'numpy.mean', 'np.mean', (['((y_true - y_mdl) ** 2)'], {}), '((y_true - y_mdl) ** 2)\n', (177, 200), True, 'import numpy as np\n'), ((1948, 2054), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Estimate NARX model for different n features / n samples rate."""'}), "(descript...
from pymodm import MongoModel, fields from models.target import Target from models.user import User class Dive(MongoModel): diver = fields.ReferenceField(User) target = fields.ReferenceField(Target) created_at = fields.DateTimeField() location_correct = fields.BooleanField() new_x_coordinate = fie...
[ "pymodm.fields.ReferenceField", "pymodm.fields.BooleanField", "pymodm.fields.CharField", "pymodm.fields.DateTimeField" ]
[((138, 165), 'pymodm.fields.ReferenceField', 'fields.ReferenceField', (['User'], {}), '(User)\n', (159, 165), False, 'from pymodm import MongoModel, fields\n'), ((179, 208), 'pymodm.fields.ReferenceField', 'fields.ReferenceField', (['Target'], {}), '(Target)\n', (200, 208), False, 'from pymodm import MongoModel, field...
from tkinter import * import os from datetime import datetime import webbrowser from tkinter import messagebox from tkinter import ttk import tkinter.filedialog import tkinter as tk import openpyxl from REPORTE import * datos = [] #reporte precios = [] #precios preciosmq=[] #precios mq subtotales = [] def CREAR_INTER...
[ "tkinter.ttk.Style", "openpyxl.load_workbook", "tkinter.ttk.Frame", "tkinter.ttk.Combobox", "webbrowser.open_new_tab", "tkinter.messagebox.showinfo", "tkinter.ttk.Notebook" ]
[((24549, 24567), 'tkinter.ttk.Notebook', 'ttk.Notebook', (['root'], {}), '(root)\n', (24561, 24567), False, 'from tkinter import ttk\n'), ((24615, 24626), 'tkinter.ttk.Style', 'ttk.Style', ([], {}), '()\n', (24624, 24626), False, 'from tkinter import ttk\n'), ((24836, 24872), 'tkinter.ttk.Frame', 'ttk.Frame', (['nt'],...
""" Plot data split by compartments Classes: * :py:class:`CompartmentPlot`: compartment plotting tool """ # Standard lib from typing import Tuple, Optional, Dict # 3rd party imports import numpy as np import matplotlib.pyplot as plt import pandas as pd import seaborn as sns # Our own imports from .styling impo...
[ "numpy.nanstd", "numpy.nanpercentile", "numpy.logical_and", "numpy.max", "numpy.argsort", "numpy.nanmean", "numpy.stack", "numpy.linspace", "numpy.isnan", "numpy.isfinite", "numpy.min", "pandas.DataFrame", "matplotlib.pyplot.subplots" ]
[((2280, 2298), 'numpy.argsort', 'np.argsort', (['values'], {}), '(values)\n', (2290, 2298), True, 'import numpy as np\n'), ((3264, 3293), 'numpy.nanmean', 'np.nanmean', (['bin_value'], {'axis': '(1)'}), '(bin_value, axis=1)\n', (3274, 3293), True, 'import numpy as np\n'), ((3312, 3340), 'numpy.nanstd', 'np.nanstd', ([...
import torch from torch import nn import torch.optim as optim import torch.multiprocessing as mp import numpy as np import time class MPManager(object): def __init__(self, num_workers): """ manage a single-instruction-multiple-data (SIMD) scheme :param int num_workers: The number of proces...
[ "torch.multiprocessing.Pool", "torch.multiprocessing.set_start_method" ]
[((353, 381), 'torch.multiprocessing.set_start_method', 'mp.set_start_method', (['"""spawn"""'], {}), "('spawn')\n", (372, 381), True, 'import torch.multiprocessing as mp\n'), ((513, 543), 'torch.multiprocessing.Pool', 'mp.Pool', ([], {'processes': 'num_workers'}), '(processes=num_workers)\n', (520, 543), True, 'import...
import tensorflow as tf from tensorflow.keras.layers import Layer, Dense, Reshape, Embedding, Concatenate, Conv2D from tensorflow.keras.models import Model import numpy as np class SelfAttention(Model): def __init__(self, d_model, spatial_dims, positional_encoding=True, name="self_attention"): ''' ...
[ "numpy.prod", "tensorflow.shape", "tensorflow.math.sqrt", "tensorflow.keras.layers.Embedding", "tensorflow.range", "tensorflow.keras.layers.Dense", "tensorflow.matmul", "tensorflow.nn.softmax", "tensorflow.reshape", "tensorflow.identity" ]
[((3406, 3439), 'tensorflow.matmul', 'tf.matmul', (['q', 'k'], {'transpose_b': '(True)'}), '(q, k, transpose_b=True)\n', (3415, 3439), True, 'import tensorflow as tf\n'), ((3719, 3766), 'tensorflow.nn.softmax', 'tf.nn.softmax', (['scaled_attention_logits'], {'axis': '(-1)'}), '(scaled_attention_logits, axis=-1)\n', (37...
import csv def save_minimal_pairs(output_filename, to_output, write_header=True): if isinstance(output_filename, str): outf = open(output_filename, mode='w', encoding='utf-8-sig', newline='') needs_closed = True else: outf = output_filename needs_closed = False writer = cs...
[ "csv.writer" ]
[((318, 350), 'csv.writer', 'csv.writer', (['outf'], {'delimiter': '"""\t"""'}), "(outf, delimiter='\\t')\n", (328, 350), False, 'import csv\n')]
from typing import Callable from jax import lax from flax import linen as nn class MultiTaskDense(nn.Module): features: int n_tasks: int kernel_init: Callable = nn.initializers.lecun_normal() bias_init: Callable = nn.initializers.zeros @nn.compact def __call__(self, inputs): kernel = ...
[ "flax.linen.initializers.lecun_normal", "jax.lax.dot_general" ]
[((175, 205), 'flax.linen.initializers.lecun_normal', 'nn.initializers.lecun_normal', ([], {}), '()\n', (203, 205), True, 'from flax import linen as nn\n'), ((442, 521), 'jax.lax.dot_general', 'lax.dot_general', (['inputs', 'kernel'], {'dimension_numbers': '(((2,), (1,)), ((0,), (0,)))'}), '(inputs, kernel, dimension_n...
''' Collect results in Quantum ESPRESSO ''' import sys import numpy as np from pymatgen.core import Structure from . import structure as qe_structure from ... import utility from ...IO import pkl_data from ...IO import read_input as rin def collect_qe(current_id, work_path): # ---------- check optimization in ...
[ "pymatgen.core.Structure", "numpy.array", "numpy.isnan" ]
[((2478, 2494), 'numpy.isnan', 'np.isnan', (['energy'], {}), '(energy)\n', (2486, 2494), True, 'import numpy as np\n'), ((3957, 3993), 'numpy.array', 'np.array', (['energy_step'], {'dtype': '"""float"""'}), "(energy_step, dtype='float')\n", (3965, 3993), True, 'import numpy as np\n'), ((6166, 6198), 'numpy.array', 'np....
import src.sudoku_solver as sudoku_solver from src.sudoku import Sudoku correct_sudoku = Sudoku([[9, 5, 7, 6, 1, 3, 2, 8, 4], [4, 8, 3, 2, 5, 7, 1, 9, 6], [6, 1, 2, 8, 4, 9, 5, 3, 7], [1, 7, 8, 3, 6, 4, 9, 5, 2], [5, 2, 4, 9, 7, 1, 3, 6, 8], [3, 6, 9, 5, 2, 8, 7, 4, 1], ...
[ "src.sudoku.Sudoku" ]
[((90, 371), 'src.sudoku.Sudoku', 'Sudoku', (['[[9, 5, 7, 6, 1, 3, 2, 8, 4], [4, 8, 3, 2, 5, 7, 1, 9, 6], [6, 1, 2, 8, 4, \n 9, 5, 3, 7], [1, 7, 8, 3, 6, 4, 9, 5, 2], [5, 2, 4, 9, 7, 1, 3, 6, 8],\n [3, 6, 9, 5, 2, 8, 7, 4, 1], [8, 4, 5, 7, 9, 2, 6, 1, 3], [2, 9, 1, 4, \n 3, 6, 8, 7, 5], [7, 3, 6, 1, 8, 5, 4, 2...
"""Serializers Alquileres""" #Django REST Framework from rest_framework import serializers #Model from maquinaria.alquileres.models import Alquiler from maquinaria.maquinas.models import Maquina class AlquilerModelSerializer(serializers.ModelSerializer): """Modelo Serializer de Cliente""" class Meta: """Clase ...
[ "maquinaria.maquinas.models.Maquina.objects.get" ]
[((520, 545), 'maquinaria.maquinas.models.Maquina.objects.get', 'Maquina.objects.get', ([], {'id': '(1)'}), '(id=1)\n', (539, 545), False, 'from maquinaria.maquinas.models import Maquina\n')]
import numpy as np def projective(coords): """ Convert 2D cartesian coordinates to homogeneus/projective. """ num = np.shape(coords)[0] w = np.array([[1], ]*num) return np.append(coords, w, axis=1) def cartesian(coords): """ Convert 2D homogeneus/projective coordinates to cartesian. """ ret...
[ "numpy.append", "numpy.array", "numpy.cos", "numpy.sin", "numpy.shape" ]
[((154, 175), 'numpy.array', 'np.array', (['([[1]] * num)'], {}), '([[1]] * num)\n', (162, 175), True, 'import numpy as np\n'), ((188, 216), 'numpy.append', 'np.append', (['coords', 'w'], {'axis': '(1)'}), '(coords, w, axis=1)\n', (197, 216), True, 'import numpy as np\n'), ((411, 454), 'numpy.array', 'np.array', (['[[1...
from django.db import models from django.utils import timezone import os #BLOGS class BlogPost(models.Model): author=models.CharField(max_length=200) role=models.CharField(max_length=200) image=models.ImageField(upload_to='blogMedia/') title=models.CharField(max_length=200) displayText=models.Te...
[ "django.db.models.TextField", "django.db.models.ForeignKey", "django.db.models.DateTimeField", "django.db.models.BooleanField", "django.db.models.ImageField", "django.db.models.CharField" ]
[((125, 157), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(200)'}), '(max_length=200)\n', (141, 157), False, 'from django.db import models\n'), ((167, 199), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(200)'}), '(max_length=200)\n', (183, 199), False, 'from django.d...
import sys import typing def main() -> typing.NoReturn: n = int(input()) (*t,) = map(int, sys.stdin.read().split()) print(min(t)) main()
[ "sys.stdin.read" ]
[((106, 122), 'sys.stdin.read', 'sys.stdin.read', ([], {}), '()\n', (120, 122), False, 'import sys\n')]
#!/usr/bin/env python from setuptools import setup setup(name='django-s3file', use_scm_version=True)
[ "setuptools.setup" ]
[((52, 101), 'setuptools.setup', 'setup', ([], {'name': '"""django-s3file"""', 'use_scm_version': '(True)'}), "(name='django-s3file', use_scm_version=True)\n", (57, 101), False, 'from setuptools import setup\n')]
import argparse import os import math # import time import numpy as np import cv2 import matplotlib.pyplot as plt import tensorflow as tf import progressbar from waymo_open_dataset.utils import range_image_utils from waymo_open_dataset.utils import transform_utils from waymo_open_dataset.utils import test_utils from ...
[ "matplotlib.pyplot.grid", "tensorflow.enable_eager_execution", "numpy.column_stack", "numpy.array", "progressbar.Percentage", "tensorflow.ones_like", "os.walk", "matplotlib.pyplot.imshow", "os.path.exists", "os.listdir", "argparse.ArgumentParser", "os.mkdir", "numpy.concatenate", "matplotl...
[((27285, 27360), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Save Waymo dataset into Kitti format"""'}), "(description='Save Waymo dataset into Kitti format')\n", (27308, 27360), False, 'import argparse\n'), ((2400, 2427), 'tensorflow.enable_eager_execution', 'tf.enable_eager_executi...
# -*- coding: utf-8 -*- # # Copyright 2019 - Swiss Data Science Center (SDSC) # A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and # Eidgenössische Technische Hochschule Zürich (ETHZ). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compli...
[ "renku.utils.doi.is_doi", "urllib.parse.urlparse", "renku.cli._providers.zenodo.ZenodoProvider" ]
[((1142, 1153), 'renku.utils.doi.is_doi', 'is_doi', (['uri'], {}), '(uri)\n', (1148, 1153), False, 'from renku.utils.doi import is_doi\n'), ((1201, 1214), 'urllib.parse.urlparse', 'urlparse', (['uri'], {}), '(uri)\n', (1209, 1214), False, 'from urllib.parse import urlparse\n'), ((1418, 1448), 'renku.cli._providers.zeno...
# -*- coding: utf-8 -*- """ Created on Thu Mar 10 13:52:52 2022 @author: sarangbhagwat """ from biorefineries.TAL.system_TAL_adsorption_glucose import * from matplotlib import pyplot as plt import numpy as np column = AC401 #%% Across regeneration fluid velocity and cycle time def MPSP_at_adsorption_design(v, t): ...
[ "numpy.where", "matplotlib.pyplot.plot", "numpy.linspace", "numpy.min", "matplotlib.pyplot.subplots" ]
[((448, 474), 'numpy.linspace', 'np.linspace', (['(3.0)', '(20.0)', '(40)'], {}), '(3.0, 20.0, 40)\n', (459, 474), True, 'import numpy as np\n'), ((487, 512), 'numpy.linspace', 'np.linspace', (['(1.0)', '(4.0)', '(40)'], {}), '(1.0, 4.0, 40)\n', (498, 512), True, 'import numpy as np\n'), ((977, 997), 'numpy.min', 'np.m...
from m5stack import * from m5stack_ui import * from uiflow import * from ble import ble_uart import face screen = M5Screen() screen.clean_screen() screen.set_screen_bg_color(0x000000) mb_click = None rb_click = None lb_click = None snd_val = None st_mode = None stval = None prval = None faces_encode = face.get(face...
[ "face.get", "ble.ble_uart.init" ]
[((307, 328), 'face.get', 'face.get', (['face.ENCODE'], {}), '(face.ENCODE)\n', (315, 328), False, 'import face\n'), ((4849, 4873), 'ble.ble_uart.init', 'ble_uart.init', (['"""m5mw_01"""'], {}), "('m5mw_01')\n", (4862, 4873), False, 'from ble import ble_uart\n')]
#!/usr/bin/python3 # -*- coding: utf-8 -*- import os import shutil import argparse import subprocess import numpy as np import contextlib import onnx from cvi_toolkit.utils.mlir_shell import * from cvi_toolkit.utils.intermediate_file import IntermediateFile @contextlib.contextmanager def pushd(new_dir): previous...
[ "os.path.exists", "numpy.savez", "os.makedirs", "argparse.ArgumentParser", "subprocess.run", "os.path.join", "os.getcwd", "os.chdir", "os.path.split", "numpy.max", "numpy.random.randint", "numpy.isnan", "onnx.load", "shutil.rmtree", "cvi_toolkit.utils.intermediate_file.IntermediateFile",...
[((327, 338), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (336, 338), False, 'import os\n'), ((343, 360), 'os.chdir', 'os.chdir', (['new_dir'], {}), '(new_dir)\n', (351, 360), False, 'import os\n'), ((5242, 5267), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (5265, 5267), False, 'import argpa...
import inspect import os import sys from random import choice from typing import List __author__ = "GLNB" __copyright__ = "GLNB" __license__ = "mit" try: from .dictionaries import invisible_chars, dict_latin except ImportError: from dictionaries import invisible_chars, dict_latin __location__ = os.path.join...
[ "inspect.currentframe", "random.choice", "os.path.join", "os.getcwd" ]
[((326, 337), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (335, 337), False, 'import os\n'), ((2878, 2943), 'os.path.join', 'os.path.join', (['__location__', '"""txt_files"""', '"""confusablesSummary.txt"""'], {}), "(__location__, 'txt_files', 'confusablesSummary.txt')\n", (2890, 2943), False, 'import os\n'), ((371, 39...
#!/usr/bin/env python3 """Count the frequency of various phrases, given the path to the Python PEPs. In Python PEPs, the opposite of “subclass” is almost always “base class” — just remember that the builtin is named super(), not base()! Stats: 216 base class 0 child class 10 derived class 12 parent class 372 ...
[ "os.walk", "os.path.join", "argparse.ArgumentParser" ]
[((589, 650), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""PEP terminology counts"""'}), "(description='PEP terminology counts')\n", (612, 650), False, 'import argparse\n'), ((996, 1017), 'os.walk', 'os.walk', (['args.pepsdir'], {}), '(args.pepsdir)\n', (1003, 1017), False, 'import os\...
#!/usr/bin/env python """ Unit tests for Generalized One-Pass Sweep-line Algorithm - test_regionsweep_simple - test_regionsweep_random """ from typing import List from unittest import TestCase from sources.algorithms import \ RegionSweep, RegionSweepDebug, RegionSweepOverlaps from sources.core import \ Re...
[ "sources.core.RegionSet", "sources.algorithms.RegionSweepOverlaps.prepare", "sources.core.Region" ]
[((629, 651), 'sources.core.RegionSet', 'RegionSet', ([], {'dimension': '(2)'}), '(dimension=2)\n', (638, 651), False, 'from sources.core import Region, RegionPair, RegionSet\n'), ((521, 571), 'sources.algorithms.RegionSweepOverlaps.prepare', 'RegionSweepOverlaps.prepare', (['regions', '*subscribers'], {}), '(regions, ...
import json import requests from rotkehlchen.assets.asset import Asset from rotkehlchen.constants.timing import DEFAULT_TIMEOUT_TUPLE from rotkehlchen.errors.misc import RemoteError from rotkehlchen.errors.serialization import DeserializationError from rotkehlchen.history.deserialization import deserialize_price from...
[ "rotkehlchen.history.deserialization.deserialize_price", "rotkehlchen.errors.misc.RemoteError", "requests.get", "rotkehlchen.errors.serialization.DeserializationError" ]
[((1541, 1565), 'rotkehlchen.history.deserialization.deserialize_price', 'deserialize_price', (['price'], {}), '(price)\n', (1558, 1565), False, 'from rotkehlchen.history.deserialization import deserialize_price\n'), ((796, 844), 'requests.get', 'requests.get', (['url'], {'timeout': 'DEFAULT_TIMEOUT_TUPLE'}), '(url, ti...
def game_main(): ### IMPORTS ### import colorama from colorama import Fore from engine import engineScript from engine import clearScript from os import environ environ['PYGAME_HIDE_SUPPORT_PROMPT'] = '1' import pygame ### ENGINE INITIALIZATION ### settings = ["widt...
[ "engine.clearScript.run", "engine.engineScript.InitEngine", "pygame.init" ]
[((339, 378), 'engine.engineScript.InitEngine', 'engineScript.InitEngine', (['Fore', 'settings'], {}), '(Fore, settings)\n', (362, 378), False, 'from engine import engineScript\n'), ((384, 397), 'pygame.init', 'pygame.init', ([], {}), '()\n', (395, 397), False, 'import pygame\n'), ((441, 458), 'engine.clearScript.run',...
__all__ = ['FavIcon'] from dataclasses import dataclass, field from html import escape as html_escape @dataclass class FavIcon: href: str rel: str = "icon" mimetype: str = "image/x-icon" rendered: str = field(init=False, repr=False) def __post_init__(self): self.rendered = f'<link rel="{s...
[ "html.escape", "dataclasses.field" ]
[((221, 250), 'dataclasses.field', 'field', ([], {'init': '(False)', 'repr': '(False)'}), '(init=False, repr=False)\n', (226, 250), False, 'from dataclasses import dataclass, field\n'), ((360, 382), 'html.escape', 'html_escape', (['self.href'], {}), '(self.href)\n', (371, 382), True, 'from html import escape as html_es...
import tensorflow as tf from KENN2.layers.residual.KnowledgeEnhancer import KnowledgeEnhancer class Kenn(tf.keras.layers.Layer): def __init__(self, predicates, clauses, activation=lambda x: x, initial_clause_weight=0.5, save_training_data=False, **kwargs): """Initialize the knowledge base. :para...
[ "KENN2.layers.residual.KnowledgeEnhancer.KnowledgeEnhancer" ]
[((1396, 1501), 'KENN2.layers.residual.KnowledgeEnhancer.KnowledgeEnhancer', 'KnowledgeEnhancer', (['self.predicates', 'self.clauses', 'self.initial_clause_weight', 'self.save_training_data'], {}), '(self.predicates, self.clauses, self.initial_clause_weight,\n self.save_training_data)\n', (1413, 1501), False, 'from ...
from lake.top.memory_interface import MemoryPort, MemoryPortType from lake.top.memory_controller import MemoryController from kratos import * from lake.attributes.config_reg_attr import ConfigRegAttr from lake.passes.passes import lift_config_reg from lake.modules.reg_fifo import RegFIFO import kratos as kts class St...
[ "kratos.ternary", "kratos.const", "lake.top.memory_interface.MemoryPort" ]
[((9747, 9783), 'lake.top.memory_interface.MemoryPort', 'MemoryPort', (['MemoryPortType.READWRITE'], {}), '(MemoryPortType.READWRITE)\n', (9757, 9783), False, 'from lake.top.memory_interface import MemoryPort, MemoryPortType\n'), ((10336, 10351), 'kratos.const', 'kts.const', (['(0)', '(1)'], {}), '(0, 1)\n', (10345, 10...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('mdot_rest', '0001_initial'), ] operations = [ migrations.CreateModel( name='IntendedAudience', field...
[ "django.db.models.ManyToManyField", "django.db.models.DateTimeField", "django.db.models.BooleanField", "django.db.models.SlugField", "django.db.models.AutoField", "django.db.models.URLField", "django.db.migrations.RemoveField", "django.db.models.CharField" ]
[((1353, 1426), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""resourcelink"""', 'name': '"""Google_Play_url"""'}), "(model_name='resourcelink', name='Google_Play_url')\n", (1375, 1426), False, 'from django.db import models, migrations\n'), ((1471, 1546), 'django.db.migrations.Rem...
import numpy as np def validate_1d_array(x, size=None): '''Validate type and dimensions of an object x.''' assert isinstance(x, np.ndarray), 'Expecting a numpy array.' assert x.ndim == 1, 'Expecting a one-dimensional array.' if size is not None: assert x.size == size, 'Array size is differen...
[ "numpy.round" ]
[((885, 896), 'numpy.round', 'np.round', (['x'], {}), '(x)\n', (893, 896), True, 'import numpy as np\n')]
#!/usr/bin/env python3 import argparse import sys import yaml import logging import logging.config from datetime import datetime from classes import pcdm,ocr,util from handler import ndnp import rdflib from rdflib import RDF from lxml import etree as ET from classes.exceptions import RESTAPIException, DataReadExceptio...
[ "logging.getLogger", "classes.util.ItemLog", "argparse.ArgumentParser", "datetime.datetime.utcnow", "logging.config.dictConfig", "yaml.safe_load", "handler.ndnp.Page.from_repository", "sys.exit" ]
[((332, 359), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (349, 359), False, 'import logging\n'), ((1350, 1429), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Extract OCR text and create annotations."""'}), "(description='Extract OCR text and create ann...
import requests import json def file_sync(target, file_name): token = 'Schedule0350c8c75ddcd9fafdaA9738df4c9346bec48dc9c4915' url = 'http://127.0.0.1:10011/api/v1/schedule/file_sync/' data = {"target": target, "file_name": file_name} r = requests.get(url, data=json.dumps(data), header...
[ "json.dumps" ]
[((279, 295), 'json.dumps', 'json.dumps', (['data'], {}), '(data)\n', (289, 295), False, 'import json\n'), ((838, 854), 'json.dumps', 'json.dumps', (['data'], {}), '(data)\n', (848, 854), False, 'import json\n')]
#!/usr/bin/env python # # Copyright 2019 DFKI GmbH. # # 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, merg...
[ "numpy.array", "heapq.heappush", "heapq.heappop", "numpy.linalg.norm" ]
[((4192, 4224), 'numpy.linalg.norm', 'np.linalg.norm', (['(s.center - point)'], {}), '(s.center - point)\n', (4206, 4224), True, 'import numpy as np\n'), ((4819, 4868), 'numpy.linalg.norm', 'np.linalg.norm', (['(self.segments[idx].center - point)'], {}), '(self.segments[idx].center - point)\n', (4833, 4868), True, 'imp...
from django_summernote.admin import SummernoteModelAdmin from django.contrib.postgres import fields from django_json_widget.widgets import JSONEditorWidget from django.contrib import admin from attendees.occasions.models import * from attendees.whereabouts.models import * from .models import * # Register your models h...
[ "django.contrib.admin.site.register" ]
[((3869, 3913), 'django.contrib.admin.site.register', 'admin.site.register', (['Category', 'CategoryAdmin'], {}), '(Category, CategoryAdmin)\n', (3888, 3913), False, 'from django.contrib import admin\n'), ((3914, 3950), 'django.contrib.admin.site.register', 'admin.site.register', (['Note', 'NoteAdmin'], {}), '(Note, No...
from sklearn.metrics import mean_squared_error, log_loss from keras.models import Model from keras.models import load_model from keras.layers import Input, Dense from keras.layers.recurrent import SimpleRNN from keras.layers.merge import multiply, concatenate, add from keras import backend as K from keras import initia...
[ "numpy.random.rand", "keras.backend.sum", "keras.initializers.Identity", "keras.backend.cast_to_floatx", "numpy.log", "numpy.array", "sys.exit", "keras.layers.Dense", "numpy.mean", "keras.layers.merge.multiply", "numpy.reshape", "keras.layers.merge.concatenate", "keras.initializers.Ones", ...
[((583, 601), 'numpy.random.seed', 'np.random.seed', (['(42)'], {}), '(42)\n', (597, 601), True, 'import numpy as np\n'), ((27585, 27605), 'numpy.random.rand', 'np.random.rand', (['(3)', '(2)'], {}), '(3, 2)\n', (27599, 27605), True, 'import numpy as np\n'), ((27627, 27661), 'numpy.array', 'np.array', (['[[1, 0], [0, 1...
import zengl from defaults import defaults from grid import grid_pipeline from window import Window window = Window(1280, 720) ctx = zengl.context() image = ctx.image(window.size, 'rgba8unorm', samples=4) depth = ctx.image(window.size, 'depth24plus', samples=4) image.clear_value = (0.2, 0.2, 0.2, 1.0) ctx.includes[...
[ "window.Window", "grid.grid_pipeline", "zengl.context" ]
[((111, 128), 'window.Window', 'Window', (['(1280)', '(720)'], {}), '(1280, 720)\n', (117, 128), False, 'from window import Window\n'), ((135, 150), 'zengl.context', 'zengl.context', ([], {}), '()\n', (148, 150), False, 'import zengl\n'), ((351, 385), 'grid.grid_pipeline', 'grid_pipeline', (['ctx', '[image, depth]'], {...