code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# -*- coding: utf-8 -*- """\ This is a python port of "Goose" orignialy licensed to Gravity.com under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Python port was written by <NAME> Gravity.com licenses this file t...
[ "urllib.request.Request", "urllib.request.urlopen" ]
[((1178, 1215), 'urllib.request.Request', 'request.Request', (['url'], {'headers': 'headers'}), '(url, headers=headers)\n', (1193, 1215), False, 'from urllib import request\n'), ((1251, 1271), 'urllib.request.urlopen', 'request.urlopen', (['req'], {}), '(req)\n', (1266, 1271), False, 'from urllib import request\n')]
""" Helper functions. """ import os import json import six import argparse import subprocess def ensure_dir(d, verbose=True): if not os.path.exists(d): if verbose: print("Directory {} do not exist; creating...".format(d)) os.makedirs(d) class FileLogger(object): """ A file logg...
[ "os.path.exists", "os.makedirs", "os.remove" ]
[((138, 155), 'os.path.exists', 'os.path.exists', (['d'], {}), '(d)\n', (152, 155), False, 'import os\n'), ((255, 269), 'os.makedirs', 'os.makedirs', (['d'], {}), '(d)\n', (266, 269), False, 'import os\n'), ((472, 496), 'os.path.exists', 'os.path.exists', (['filename'], {}), '(filename)\n', (486, 496), False, 'import o...
# Django from django.db import models # Utilities from utils.models import CommonModel class Author(CommonModel): """Author model. Model to store the data of the authors of the books. """ name = models.CharField( 'name', max_length=150, blank=False, null=False, ...
[ "django.db.models.CharField" ]
[((215, 310), 'django.db.models.CharField', 'models.CharField', (['"""name"""'], {'max_length': '(150)', 'blank': '(False)', 'null': '(False)', 'help_text': '"""Name author"""'}), "('name', max_length=150, blank=False, null=False, help_text\n ='Name author')\n", (231, 310), False, 'from django.db import models\n')]
from PyQt5 import uic, QtWidgets import mysql.connector from reportlab.pdfgen import canvas global_id = 0 #Cria o banco de dados para ser usado na aplicação. banco_de_dados = mysql.connector.connect( host="localhost", user="root", password="", database='cadastro_produtos' ) def funcao_principal(): ...
[ "PyQt5.uic.loadUi", "PyQt5.QtWidgets.QApplication", "reportlab.pdfgen.canvas.Canvas" ]
[((4847, 4873), 'PyQt5.QtWidgets.QApplication', 'QtWidgets.QApplication', (['[]'], {}), '([])\n', (4869, 4873), False, 'from PyQt5 import uic, QtWidgets\n'), ((4902, 4931), 'PyQt5.uic.loadUi', 'uic.loadUi', (['"""formulario01.ui"""'], {}), "('formulario01.ui')\n", (4912, 4931), False, 'from PyQt5 import uic, QtWidgets\...
#!/usr/bin/env python2 import argparse from PIL import Image from onnx import onnx import os import sys import struct def read_array_from_tensor(filename): tensor = onnx.TensorProto() with open(filename, 'rb') as file: tensor.ParseFromString(file.read()) assert tensor.data_type == 1 # only allows...
[ "onnx.onnx.TensorProto", "struct.unpack", "os.path.splitext", "argparse.ArgumentParser" ]
[((171, 189), 'onnx.onnx.TensorProto', 'onnx.TensorProto', ([], {}), '()\n', (187, 189), False, 'from onnx import onnx\n'), ((512, 556), 'struct.unpack', 'struct.unpack', (["('%sf' % size)", 'tensor.raw_data'], {}), "('%sf' % size, tensor.raw_data)\n", (525, 556), False, 'import struct\n'), ((963, 1041), 'argparse.Argu...
from django.urls import path from rest_framework_jwt.views import obtain_jwt_token from rest_framework import routers from .views import (BankingUserCreateViewSet, BankingUserVerifyViewSet, BankAccountViewSet, TransactionViewSet) router = routers.SimpleRouter() router.register('account', BankAccou...
[ "rest_framework.routers.SimpleRouter", "django.urls.path" ]
[((261, 283), 'rest_framework.routers.SimpleRouter', 'routers.SimpleRouter', ([], {}), '()\n', (281, 283), False, 'from rest_framework import routers\n'), ((616, 673), 'django.urls.path', 'path', (['"""auth/login/"""', 'obtain_jwt_token'], {'name': '"""user-verify"""'}), "('auth/login/', obtain_jwt_token, name='user-ve...
import os import flopy.utils.binaryfile as bf class ReadConcentration: _filename = None def __init__(self, workspace): for file in os.listdir(workspace): if file.upper() == "MT3D001.UCN": self._filename = os.path.join(workspace, file) pass def read_times(self)...
[ "os.listdir", "os.path.join", "flopy.utils.binaryfile.UcnFile" ]
[((150, 171), 'os.listdir', 'os.listdir', (['workspace'], {}), '(workspace)\n', (160, 171), False, 'import os\n'), ((357, 412), 'flopy.utils.binaryfile.UcnFile', 'bf.UcnFile', ([], {'filename': 'self._filename', 'precision': '"""single"""'}), "(filename=self._filename, precision='single')\n", (367, 412), True, 'import ...
from unittest.mock import patch, MagicMock, PropertyMock import pytest from cincoconfig.core import ConfigFormat from cincoconfig.formats.json import JsonConfigFormat from cincoconfig.formats.bson import BsonConfigFormat from cincoconfig.formats.yaml import YamlConfigFormat from cincoconfig.formats.xml import XmlConfig...
[ "cincoconfig.core.ConfigFormat.get", "unittest.mock.MagicMock", "cincoconfig.core.ConfigFormat.register", "cincoconfig.core.ConfigFormat.initialize_registry", "pytest.raises", "unittest.mock.patch.object" ]
[((1055, 1104), 'unittest.mock.patch.object', 'patch.object', (['ConfigFormat', '"""initialize_registry"""'], {}), "(ConfigFormat, 'initialize_registry')\n", (1067, 1104), False, 'from unittest.mock import patch, MagicMock, PropertyMock\n'), ((613, 647), 'cincoconfig.core.ConfigFormat.register', 'ConfigFormat.register'...
from DaPy.core import Series, SeriesSet from DaPy.core import is_seq from copy import copy def proba2label(seq, labels): if hasattr(seq, 'shape') is False: seq = SeriesSet(seq) if seq.shape[1] > 1: return clf_multilabel(seq, labels) return clf_binlabel(seq, labels) def clf_multilabel(seq,...
[ "DaPy.core.is_seq", "copy.copy", "DaPy.core.SeriesSet", "DaPy.core.Series" ]
[((343, 358), 'DaPy.core.is_seq', 'is_seq', (['groupby'], {}), '(groupby)\n', (349, 358), False, 'from DaPy.core import is_seq\n'), ((712, 774), 'DaPy.core.Series', 'Series', (['(labels[0] if _ >= cutpoint else labels[1] for _ in seq)'], {}), '(labels[0] if _ >= cutpoint else labels[1] for _ in seq)\n', (718, 774), Fal...
import os import shutil try: input = raw_input except NameError: pass def uniform_meta(f): xmp_path = "" f_list = [] for root, dirs, files in os.walk(f): for f in files: if f.split(".")[-1].upper() == "ARW": f_list.append(os.path.join(root, f)) if f...
[ "shutil.copyfile", "os.path.join", "os.walk" ]
[((165, 175), 'os.walk', 'os.walk', (['f'], {}), '(f)\n', (172, 175), False, 'import os\n'), ((836, 866), 'shutil.copyfile', 'shutil.copyfile', (['xmp_path', 'dst'], {}), '(xmp_path, dst)\n', (851, 866), False, 'import shutil\n'), ((281, 302), 'os.path.join', 'os.path.join', (['root', 'f'], {}), '(root, f)\n', (293, 30...
import numpy as np import matplotlib.pyplot as plt import os import cv2 from tensorflow.python.keras.callbacks import TensorBoard from tqdm import tqdm import tensorflow as tf from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Dropout, Activation, Flatten from tensorflow.keras.lay...
[ "logging.config.dictConfig", "pickle.load", "tensorflow.keras.models.load_model", "time.time", "cv2.resize", "cv2.imread" ]
[((687, 721), 'logging.config.dictConfig', 'logging.config.dictConfig', (['LOGGING'], {}), '(LOGGING)\n', (712, 721), False, 'import logging\n'), ((882, 924), 'cv2.imread', 'cv2.imread', (['filepath', 'cv2.IMREAD_GRAYSCALE'], {}), '(filepath, cv2.IMREAD_GRAYSCALE)\n', (892, 924), False, 'import cv2\n'), ((984, 1027), '...
# MIT License # # (C) Copyright [2022] Hewlett Packard Enterprise Development LP # # 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 righ...
[ "logging.getLogger", "click.Choice", "click.File", "click.echo", "sys.exit", "re.search", "click.secho", "click.option", "pathlib.Path", "json.dumps", "click.command", "network_modeling.NetworkPort.NetworkPort", "click.prompt", "network_modeling.NetworkNodeFactory.NetworkNodeFactory", "r...
[((1879, 1922), 'os.path.join', 'path.join', (['project_root', '"""canu"""', '""".version"""'], {}), "(project_root, 'canu', '.version')\n", (1888, 1922), False, 'from os import path\n'), ((2034, 2068), 'logging.getLogger', 'logging.getLogger', (['"""validate_shcd"""'], {}), "('validate_shcd')\n", (2051, 2068), False, ...
""" Calculation of the superfluid neutron and superconducting proton gap in the neutron star core following the parametrisation introduced in Andersson et al. (2005) with the parameters given in Ho et al. (2015) Authors: <NAME> (<EMAIL>) Copyright (c) <NAME> """ from scipy.optimize import newton import ...
[ "scipy.optimize.newton" ]
[((1311, 1341), 'scipy.optimize.newton', 'newton', (['gap_neutrons_full', '(1.1)'], {}), '(gap_neutrons_full, 1.1)\n', (1317, 1341), False, 'from scipy.optimize import newton\n'), ((1360, 1390), 'scipy.optimize.newton', 'newton', (['gap_neutrons_full', '(3.5)'], {}), '(gap_neutrons_full, 3.5)\n', (1366, 1390), False, '...
import requests import json from auth import ( user, password ) class Scrape: def __init__(self) -> None: self.url = 'https://'+user+':'+password + \ '@opensky-network.org/api/states/all?lamin=52.311624&lomin=13.426828&lamax=52.416285&lomax=13.636693' self.all_flights = [] ...
[ "json.loads", "requests.get" ]
[((489, 515), 'requests.get', 'requests.get', ([], {'url': 'self.url'}), '(url=self.url)\n', (501, 515), False, 'import requests\n'), ((538, 561), 'json.loads', 'json.loads', (['result.text'], {}), '(result.text)\n', (548, 561), False, 'import json\n')]
# -*- coding: utf-8 -*- from odoo import http from odoo.addons.website_sale_delivery.controllers.main import WebsiteSaleDelivery from odoo.http import request class WebsiteSaleCouponDelivery(WebsiteSaleDelivery): @http.route() def update_eshop_carrier(self, **post): Monetary = request.env['ir.qweb.fi...
[ "odoo.http.request.website.sale_get_order", "odoo.http.route" ]
[((221, 233), 'odoo.http.route', 'http.route', ([], {}), '()\n', (231, 233), False, 'from odoo import http\n'), ((1496, 1508), 'odoo.http.route', 'http.route', ([], {}), '()\n', (1506, 1508), False, 'from odoo import http\n'), ((436, 468), 'odoo.http.request.website.sale_get_order', 'request.website.sale_get_order', ([...
# Copyright 2021 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
[ "neurallog.language.language.Predicate", "neurallog.network.trainer.Trainer", "neurallog.language.parser.ply.neural_log_parser.NeuralLogParser", "os.path.join", "neurallog.language.language.Constant", "os.path.realpath", "neurallog.language.parser.ply.neural_log_parser.NeuralLogLexer", "neurallog.run....
[((1146, 1186), 'os.path.join', 'os.path.join', (['RESOURCE_PATH', '"""vocab.txt"""'], {}), "(RESOURCE_PATH, 'vocab.txt')\n", (1158, 1186), False, 'import os\n'), ((1100, 1126), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (1116, 1126), False, 'import os\n'), ((3991, 4007), 'neurallog.lan...
""" This tests ensures that there is no memory leakage when params.cpp:ExecuteMulti function does conversion of Unicode to Bytes. In ExecuteMulti function after DoExecute label SQLExecute returns One scenario where SQLParamData function will be used is when there is a varchar(max), a parameter with an unknown size i...
[ "pyodbc.connect", "tests3.testutils.add_to_path", "psutil.Process", "tests3.testutils.load_setup_connection_string", "os.path.basename", "unittest.main" ]
[((1397, 1410), 'tests3.testutils.add_to_path', 'add_to_path', ([], {}), '()\n', (1408, 1410), False, 'from tests3.testutils import add_to_path, load_setup_connection_string\n'), ((1610, 1626), 'psutil.Process', 'psutil.Process', ([], {}), '()\n', (1624, 1626), False, 'import psutil\n'), ((3435, 3450), 'unittest.main',...
import torch import torch.nn as nn import torch.nn.functional as F from torch.distributions import Bernoulli from src.models.nns import Decoder class ConvDecoder(nn.Module): def __init__(self, z_dim): super().__init__() self.z_dim = z_dim self.decoder = Decoder( 128, ...
[ "torch.distributions.Bernoulli", "torch.nn.Linear", "src.models.nns.Decoder" ]
[((285, 315), 'src.models.nns.Decoder', 'Decoder', (['(128)', 'z_dim', '(28)', '(28)', '(1)'], {}), '(128, z_dim, 28, 28, 1)\n', (292, 315), False, 'from src.models.nns import Decoder\n'), ((1282, 1306), 'torch.distributions.Bernoulli', 'Bernoulli', ([], {'probs': 'loc_img'}), '(probs=loc_img)\n', (1291, 1306), False, ...
#!/usr/bin/env python import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'https://getudata.org' RELATIVE_URLS = False FEED_DOMAIN = SITEURL FEED_ALL_ATOM = 'feeds/all.atom' CATEGORY_FEED_ATOM = 'feeds/%s.atom' ARTICLE_URL = 'blog/{date:%Y}/{date:%m}/{date:%d}/{slug}/' CATEGORY_URL =...
[ "sys.path.append" ]
[((44, 70), 'sys.path.append', 'sys.path.append', (['os.curdir'], {}), '(os.curdir)\n', (59, 70), False, 'import sys\n')]
import json from channels.generic.websocket import AsyncWebsocketConsumer #from asgiref.sync import await_to_sync from chat.services import chat_save_message class ChatConsumer(AsyncWebsocketConsumer): """ handshake websocket front end """ room_name = None room_group_name = None async def connect(s...
[ "json.loads", "json.dumps" ]
[((1015, 1036), 'json.loads', 'json.loads', (['text_data'], {}), '(text_data)\n', (1025, 1036), False, 'import json\n'), ((2179, 2299), 'json.dumps', 'json.dumps', (["{'message': message, 'username': username, 'image_caption': image_caption,\n 'message_type': message_type}"], {}), "({'message': message, 'username': ...
"""Increase length of artist name column Revision ID: <KEY> Revises: <KEY>8 Create Date: 2020-12-27 00:44:46.286228 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'f<PASSWORD>' down_revision = '<KEY>' branch_labels = None depends_on = None def upgrade(): ...
[ "sqlalchemy.VARCHAR", "sqlalchemy.String" ]
[((450, 471), 'sqlalchemy.VARCHAR', 'sa.VARCHAR', ([], {'length': '(32)'}), '(length=32)\n', (460, 471), True, 'import sqlalchemy as sa\n'), ((494, 515), 'sqlalchemy.String', 'sa.String', ([], {'length': '(160)'}), '(length=160)\n', (503, 515), True, 'import sqlalchemy as sa\n'), ((743, 764), 'sqlalchemy.String', 'sa.S...
from dao.squad_dao import SquadDao from model.squad import Squad from controller.squad_controller import SquadController class FrameworkFrontEndController: dao=FrameworkFrontEndDao() squad_controller=SquadController() def listar_todos(self): return self.dao.listar_todos() def buscar_por_id(se...
[ "controller.squad_controller.SquadController" ]
[((209, 226), 'controller.squad_controller.SquadController', 'SquadController', ([], {}), '()\n', (224, 226), False, 'from controller.squad_controller import SquadController\n')]
from django.contrib import admin from thing.models import APIKey, BlueprintInstance, Campaign, Character, CharacterConfig, Corporation, \ Alliance, APIKeyFailure, Asset, AssetSummary, BlueprintComponent, Blueprint, CorpWallet, \ TaskState, CharacterDetails, Contract, UserProfile, Transaction, JournalEntry, Colo...
[ "django.contrib.admin.site.register" ]
[((3751, 3791), 'django.contrib.admin.site.register', 'admin.site.register', (['APIKey', 'APIKeyAdmin'], {}), '(APIKey, APIKeyAdmin)\n', (3770, 3791), False, 'from django.contrib import admin\n'), ((3792, 3838), 'django.contrib.admin.site.register', 'admin.site.register', (['Character', 'CharacterAdmin'], {}), '(Charac...
""" Copyright (c) 2021, NVIDIA 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 applicable law or agreed to in ...
[ "tensorflow.python.framework.ops.add_to_collection", "tensorflow.python.framework.ops.get_collection" ]
[((1719, 1780), 'tensorflow.python.framework.ops.get_collection', 'ops.get_collection', (['_SparseOperationKitEmbeddingLayerStoreKey'], {}), '(_SparseOperationKitEmbeddingLayerStoreKey)\n', (1737, 1780), False, 'from tensorflow.python.framework import ops\n'), ((1854, 1929), 'tensorflow.python.framework.ops.add_to_coll...
from asgard.app import app from asgard.handlers import http app.run()
[ "asgard.app.app.run" ]
[((61, 70), 'asgard.app.app.run', 'app.run', ([], {}), '()\n', (68, 70), False, 'from asgard.app import app\n')]
import numpy as np from numpy.testing import assert_equal import scipy.sparse as sp import tensorflow as tf from .math import (sparse_scalar_multiply, sparse_tensor_diag_matmul, _diag_matmul_py, _diag_matmul_transpose_py) from .convert import sparse_to_tensor class MathTest(tf.test.TestCase): ...
[ "numpy.testing.assert_equal", "numpy.array", "tensorflow.constant", "scipy.sparse.coo_matrix", "tensorflow.sparse_tensor_to_dense" ]
[((406, 422), 'scipy.sparse.coo_matrix', 'sp.coo_matrix', (['a'], {}), '(a)\n', (419, 422), True, 'import scipy.sparse as sp\n'), ((508, 536), 'tensorflow.sparse_tensor_to_dense', 'tf.sparse_tensor_to_dense', (['a'], {}), '(a)\n', (533, 536), True, 'import tensorflow as tf\n'), ((771, 787), 'scipy.sparse.coo_matrix', '...
#!/usr/bin/env python import os import pprint import sys # pretty printer settings pp = pprint.PrettyPrinter(indent=4) # the label label = 'all' # the used ratio ratio = '90_10' # specify the classifier path classifier_path = 'food/binary/unbalanced' # source path source = 'data/prepared/{}/{}/{}'.format(classifi...
[ "os.path.exists", "os.listdir", "os.makedirs", "os.path.join", "os.symlink", "pprint.PrettyPrinter" ]
[((90, 120), 'pprint.PrettyPrinter', 'pprint.PrettyPrinter', ([], {'indent': '(4)'}), '(indent=4)\n', (110, 120), False, 'import pprint\n'), ((867, 883), 'os.listdir', 'os.listdir', (['path'], {}), '(path)\n', (877, 883), False, 'import os\n'), ((984, 1006), 'os.path.exists', 'os.path.exists', (['target'], {}), '(targe...
""" Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT """ import os import pytest from Automated.atom_utils import hydra_test_utils as hydra from Automated.atom_utils.a...
[ "os.path.dirname", "Automated.atom_utils.hydra_test_utils.launch_and_validate_results", "pytest.mark.parametrize", "pytest.fixture", "os.system" ]
[((383, 408), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (398, 408), False, 'import os\n'), ((437, 485), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""project"""', "['AtomTest']"], {}), "('project', ['AtomTest'])\n", (460, 485), False, 'import pytest\n'), ((487, 552), 'pytes...
import pdfcutter import helper import json #For writing PDF Link JSON File import os #To check if PDF Link JSON File exists #get_session is main method for parsing session to Senats/Bundesrats Texts dict class MainExtractorMethod: #In: Can't init TextExtractorHolder before (missing paras in get_beschluesse_text),...
[ "os.path.exists", "helper.get_session_pdf_filename", "json.dump" ]
[((775, 802), 'os.path.exists', 'os.path.exists', (['URLFILENAME'], {}), '(URLFILENAME)\n', (789, 802), False, 'import os\n'), ((1053, 1103), 'helper.get_session_pdf_filename', 'helper.get_session_pdf_filename', (['session', 'PDF_URLS'], {}), '(session, PDF_URLS)\n', (1084, 1103), False, 'import helper\n'), ((992, 1014...
import neptune from tensorflow.keras.callbacks import BaseLogger class NeptuneMonitor(BaseLogger): def __init__(self, name, api_token, prj_name, params: tuple = None): assert api_token is not None assert prj_name is not None super(BaseLogger, self).__init__() self.my_name = name ...
[ "neptune.create_experiment", "neptune.init" ]
[((379, 445), 'neptune.init', 'neptune.init', ([], {'api_token': 'api_token', 'project_qualified_name': 'prj_name'}), '(api_token=api_token, project_qualified_name=prj_name)\n', (391, 445), False, 'import neptune\n'), ((497, 556), 'neptune.create_experiment', 'neptune.create_experiment', ([], {'name': 'self.my_name', '...
from merc import errors from merc import feature from merc import message class KillFeature(feature.Feature): NAME = __name__ install = KillFeature.install @KillFeature.register_user_command class Kill(message.Command): NAME = "KILL" MIN_ARITY = 2 def __init__(self, nickname, reason, *args): self.nic...
[ "merc.errors.Error" ]
[((624, 655), 'merc.errors.Error', 'errors.Error', (['disconnect_reason'], {}), '(disconnect_reason)\n', (636, 655), False, 'from merc import errors\n')]
"""Operator to delete an Export Collection by name.""" from bpy.props import StringProperty from bpy.types import Operator from ..functions import get_export_collection_by_name class EmbarkDeleteExportCollection(Operator): # pylint: disable=too-few-public-methods """Deletes the named Export Collection, but lea...
[ "bpy.props.StringProperty" ]
[((624, 658), 'bpy.props.StringProperty', 'StringProperty', ([], {'options': "{'HIDDEN'}"}), "(options={'HIDDEN'})\n", (638, 658), False, 'from bpy.props import StringProperty\n')]
# coding: utf8 import clinica.pipelines.engine as cpe class DwiNoddi(cpe.Pipeline): """NODDI model for corrected DWI datasets.""" def check_custom_dependencies(self): """Check dependencies that can not be listed in the `info.json` file. """ pass def get_input_fields(self): ...
[ "clinica.pipelines.dwi_processing_noddi.dwi_processing_noddi_utils.matlab_noddi_processing", "nipype.interfaces.utility.Function", "clinica.pipelines.dwi_processing_noddi.dwi_processing_noddi_utils.grab_noddi_preprocessed_files", "nipype.interfaces.io.DataSink" ]
[((1417, 1488), 'clinica.pipelines.dwi_processing_noddi.dwi_processing_noddi_utils.grab_noddi_preprocessed_files', 'utils.grab_noddi_preprocessed_files', (['self.caps_directory', 'self.tsv_file'], {}), '(self.caps_directory, self.tsv_file)\n', (1452, 1488), True, 'import clinica.pipelines.dwi_processing_noddi.dwi_proce...
import sys from mattermostdriver import Driver from jira import JIRA from datetime import datetime import urllib3 import json import re import webhook import requests def getAdjustDict(): adjust_dict = {'h1\. ': '## ', 'h2\. ': '## ', 'h3\. ': '### ', 'h4\....
[ "webhook.projectSearchString.format", "re.compile", "datetime.datetime.strptime", "jira.JIRA", "datetime.datetime.now", "json.load", "json.dump", "mattermostdriver.Driver" ]
[((3606, 3655), 'datetime.datetime.strptime', 'datetime.strptime', (['date[:-9]', '"""%Y-%m-%dT%H:%M:%S"""'], {}), "(date[:-9], '%Y-%m-%dT%H:%M:%S')\n", (3623, 3655), False, 'from datetime import datetime\n'), ((11781, 11845), 'jira.JIRA', 'JIRA', (['webhook.jiraUrl'], {'auth': '(webhook.username, webhook.password)'}),...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Cerealizer # Copyright (C) 2005-2006 <NAME> # # This program is free software. # It is available under the Python licence. import imp import unittest import cerealizer class TestBasicType(unittest.TestCase): def setUp(self): self.obj = [1, 2, "jiba"] ...
[ "cerealizer.register_alias", "cerealizer.loads", "cerealizer.register", "imp.reload", "cerealizer.dumps" ]
[((2336, 2361), 'cerealizer.register', 'cerealizer.register', (['Obj1'], {}), '(Obj1)\n', (2355, 2361), False, 'import cerealizer\n'), ((2921, 2949), 'cerealizer.register', 'cerealizer.register', (['ObjList'], {}), '(ObjList)\n', (2940, 2949), False, 'import cerealizer\n'), ((3535, 3564), 'cerealizer.register', 'cereal...
#!/usr/bin/python import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BOARD) GPIO.setup(11, GPIO.OUT) p = GPIO.PWM(11,50) p.start(7.5) try: while True: # MID #p.ChangeDutyCycle(7.5) #time.sleep(1) # LEFT p.ChangeDutyCycle(20) time.sleep(1) # RIGHT ...
[ "RPi.GPIO.cleanup", "RPi.GPIO.setup", "time.sleep", "RPi.GPIO.PWM", "RPi.GPIO.setmode" ]
[((56, 80), 'RPi.GPIO.setmode', 'GPIO.setmode', (['GPIO.BOARD'], {}), '(GPIO.BOARD)\n', (68, 80), True, 'import RPi.GPIO as GPIO\n'), ((81, 105), 'RPi.GPIO.setup', 'GPIO.setup', (['(11)', 'GPIO.OUT'], {}), '(11, GPIO.OUT)\n', (91, 105), True, 'import RPi.GPIO as GPIO\n'), ((110, 126), 'RPi.GPIO.PWM', 'GPIO.PWM', (['(11...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Sep 22 13:13:06 2021 @author: hossam """ from base import BaseTrain import numpy as np import matplotlib.pylab as plt from matplotlib.pyplot import savefig from scipy.stats import multivariate_normal class vaeTrainer(BaseTrain): def __init__(self, ...
[ "numpy.mean", "matplotlib.pylab.subplots", "numpy.ones", "numpy.squeeze", "numpy.zeros", "matplotlib.pylab.close" ]
[((5772, 5814), 'numpy.squeeze', 'np.squeeze', (["self.data.test_set_vae['data']"], {}), "(self.data.test_set_vae['data'])\n", (5782, 5814), True, 'import numpy as np\n'), ((5836, 5864), 'numpy.squeeze', 'np.squeeze', (['self.output_test'], {}), '(self.output_test)\n', (5846, 5864), True, 'import numpy as np\n'), ((743...
import astropy.io.fits as pft import numpy as np from astropy.time import Time import itertools from astropy.stats import sigma_clipped_stats from scipy.signal import convolve def group_image_pairs(file_list, by_next=False, by_exptime=False): if by_next: image_pair_lists = [[file_list[2*i], file_list[2*i+...
[ "numpy.mean", "scipy.signal.convolve", "numpy.median", "numpy.ones", "numpy.where", "itertools.combinations", "numpy.stddev", "astropy.io.fits.open", "astropy.stats.sigma_clipped_stats" ]
[((1312, 1347), 'scipy.signal.convolve', 'convolve', (['img', 'kernel'], {'mode': '"""valid"""'}), "(img, kernel, mode='valid')\n", (1320, 1347), False, 'from scipy.signal import convolve\n'), ((1004, 1033), 'astropy.stats.sigma_clipped_stats', 'sigma_clipped_stats', (['diff_img'], {}), '(diff_img)\n', (1023, 1033), Fa...
import unittest import pytexcount.parser as P from pytexcount.count import WordCounter class LexerTestCase(unittest.TestCase): def test_lexer_base(self): expected = [ P.Token(P.TokenType.CHAR, 'a'), P.Token(P.TokenType.SPACE, ' '), P.Token(P.TokenType.BACKSLASH, '\\')...
[ "pytexcount.parser.Lexer", "pytexcount.parser.Parser", "pytexcount.count.WordCounter", "pytexcount.parser.Token" ]
[((195, 225), 'pytexcount.parser.Token', 'P.Token', (['P.TokenType.CHAR', '"""a"""'], {}), "(P.TokenType.CHAR, 'a')\n", (202, 225), True, 'import pytexcount.parser as P\n'), ((239, 270), 'pytexcount.parser.Token', 'P.Token', (['P.TokenType.SPACE', '""" """'], {}), "(P.TokenType.SPACE, ' ')\n", (246, 270), True, 'import...
import os class Config: SQLALCHEMY_TRACK_MODIFICATIONS = False CSRF_ENABLED = True FLASK_DEBUG = True SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL', 'mysql+mysqlconnector://root:root@localhost:8889/lak_db') DATABASE_URL = os.environ.get('CLEARDB_DATABASE_URL', 'mysql+mysqlconnector://roo...
[ "os.environ.get" ]
[((146, 238), 'os.environ.get', 'os.environ.get', (['"""DATABASE_URL"""', '"""mysql+mysqlconnector://root:root@localhost:8889/lak_db"""'], {}), "('DATABASE_URL',\n 'mysql+mysqlconnector://root:root@localhost:8889/lak_db')\n", (160, 238), False, 'import os\n'), ((254, 356), 'os.environ.get', 'os.environ.get', (['"""C...
from yowsup.structs import ProtocolEntity, ProtocolTreeNode class ChatstateProtocolEntity(ProtocolEntity): ''' INCOMING <chatstate from="<EMAIL>"> <{{composing|paused}}></{{composing|paused}}> </chatstate> OUTGOING <chatstate to="<EMAIL>"> <{{composing|paused}}></{{composing|paused}}...
[ "yowsup.structs.ProtocolTreeNode" ]
[((878, 907), 'yowsup.structs.ProtocolTreeNode', 'ProtocolTreeNode', (['self._state'], {}), '(self._state)\n', (894, 907), False, 'from yowsup.structs import ProtocolEntity, ProtocolTreeNode\n')]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jun 12 09:36:00 2019 @author: minjie """ import SimpleITK as sitk import numpy as np from pathlib import Path import os import cv2 import pydicom import h5py from scipy.ndimage import binary_dilation fn1 = 'resources/CT/01/data/A_1.mha' fn2 = 'resour...
[ "numpy.clip", "pydicom.dcmread", "numpy.ones", "pathlib.Path", "numpy.where", "SimpleITK.GetArrayFromImage", "h5py.File", "numpy.stack", "numpy.zeros", "SimpleITK.ReadImage", "numpy.zeros_like" ]
[((541, 560), 'SimpleITK.ReadImage', 'sitk.ReadImage', (['fn1'], {}), '(fn1)\n', (555, 560), True, 'import SimpleITK as sitk\n'), ((657, 676), 'SimpleITK.ReadImage', 'sitk.ReadImage', (['fn2'], {}), '(fn2)\n', (671, 676), True, 'import SimpleITK as sitk\n'), ((1198, 1252), 'numpy.stack', 'np.stack', (['(labels0, labels...
import asyncio import argparse import http import json import os import time import subprocess import sys import websockets def check(rm_hostname): try: model = subprocess.run( [ "ssh", "-o", "ConnectTimeout=2", rm_hostname, ...
[ "asyncio.gather", "argparse.ArgumentParser", "os.rename", "asyncio.get_event_loop", "subprocess.run", "json.dumps", "time.sleep", "websockets.serve", "os._exit", "sys.exit", "os.stat", "asyncio.create_subprocess_shell", "time.time" ]
[((706, 717), 'time.time', 'time.time', ([], {}), '()\n', (715, 717), False, 'import time\n'), ((8797, 8853), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""stream remarkable"""'}), "(description='stream remarkable')\n", (8820, 8853), False, 'import argparse\n'), ((10012, 10176), 'websoc...
from pynput import keyboard from pycreate2 import Create2 import time #Robot initialization________________________________________________________________ if __name__ == "__main__": port = '/dev/ttyUSB0' baud = { 'default': 115200, 'alt': 19200 # shouldn't need this unless you accidentally s...
[ "pycreate2.Create2", "pynput.keyboard.Listener" ]
[((351, 391), 'pycreate2.Create2', 'Create2', ([], {'port': 'port', 'baud': "baud['default']"}), "(port=port, baud=baud['default'])\n", (358, 391), False, 'from pycreate2 import Create2\n'), ((1409, 1468), 'pynput.keyboard.Listener', 'keyboard.Listener', ([], {'on_press': 'on_press', 'on_release': 'on_release'}), '(on_...
# Copyright 2019 The Regents of the University of California. # # 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 applic...
[ "swift.common.utils.split_path", "swift.common.utils.get_logger", "swift.common.constraints.valid_api_version", "swift.common.utils.list_from_csv", "avro_streamer.avro_streamer.GenericStrippingAvroParser" ]
[((6924, 6985), 'avro_streamer.avro_streamer.GenericStrippingAvroParser', 'GenericStrippingAvroParser', (['resp.app_iter', 'resp.body', 'tostrip'], {}), '(resp.app_iter, resp.body, tostrip)\n', (6950, 6985), False, 'from avro_streamer.avro_streamer import GenericStrippingAvroParser\n'), ((1946, 1986), 'swift.common.uti...
""" Nozomi Character Module author: <EMAIL> """ from nozomi.temporal.time import NozomiTime from nozomi.security.ip_address import IpAddress from nozomi.http.user_agent import UserAgent from nozomi.http.accept_language import AcceptLanguage from nozomi.http.headers import Headers from nozomi.ancillary.configuration imp...
[ "nozomi.http.accept_language.AcceptLanguage.from_headers", "nozomi.security.ip_address.IpAddress.from_headers", "nozomi.http.user_agent.UserAgent.from_headers" ]
[((1108, 1281), 'nozomi.security.ip_address.IpAddress.from_headers', 'IpAddress.from_headers', ([], {'headers': 'self._headers', 'boundary_ip_header': 'self._configuration.boundary_ip_header', 'debug': 'self._configuration.debug', 'debug_address': '"""127.0.0.1"""'}), "(headers=self._headers, boundary_ip_header=self.\n...
# Fix for #17 (and ulauncher's #703): explicitly defining Gdk version import gi gi.require_version('GLib', '2.0') gi.require_version('Gtk', '3.0') gi.require_version('Gdk', '3.0') gi.require_version('GObject', '2.0') gi.require_version('Gio', '2.0') gi.require_version('GdkX11', '3.0') gi.require_version('GdkPixbuf', '2...
[ "logging.getLogger", "spotipy.Spotify", "ulauncher.api.shared.action.RenderResultListAction.RenderResultListAction", "ulauncher.api.shared.action.DoNothingAction.DoNothingAction", "urllib.parse.quote_plus", "ulauncher.api.shared.action.HideWindowAction.HideWindowAction", "os.path.exists", "gettext.tra...
[((80, 113), 'gi.require_version', 'gi.require_version', (['"""GLib"""', '"""2.0"""'], {}), "('GLib', '2.0')\n", (98, 113), False, 'import gi\n'), ((114, 146), 'gi.require_version', 'gi.require_version', (['"""Gtk"""', '"""3.0"""'], {}), "('Gtk', '3.0')\n", (132, 146), False, 'import gi\n'), ((147, 179), 'gi.require_ve...
""" AIOHappyBase connection module. """ import os import logging from typing import AnyStr, List, Dict, Any from thriftpy2.contrib.aio.transport import ( TAsyncBufferedTransportFactory, TAsyncFramedTransportFactory, ) from thriftpy2.contrib.aio.protocol import ( TAsyncBinaryProtocolFactory, TAsyncComp...
[ "logging.getLogger", "thriftpy2.contrib.aio.transport.TAsyncFramedTransportFactory", "thriftpy2.contrib.aio.transport.TAsyncBufferedTransportFactory", "Hbase_thrift.ColumnDescriptor", "thriftpy2.contrib.aio.protocol.TAsyncCompactProtocolFactory", "os.environ.get", "thriftpy2.contrib.aio.protocol.TAsyncB...
[((874, 901), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (891, 901), False, 'import logging\n'), ((975, 1023), 'os.environ.get', 'os.environ.get', (['"""AIOHAPPYBASE_HOST"""', '"""localhost"""'], {}), "('AIOHAPPYBASE_HOST', 'localhost')\n", (989, 1023), False, 'import os\n'), ((1105, ...
# Generated by Django 3.1.7 on 2021-03-09 12:17 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('songs', '0005_auto_20210309_1203'), ] operations = [ migrations.AddField( model_name='song', name='spotify_id', ...
[ "django.db.models.IntegerField" ]
[((334, 422), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'blank': '(True)', 'default': 'None', 'null': '(True)', 'verbose_name': '"""Spotify Id"""'}), "(blank=True, default=None, null=True, verbose_name=\n 'Spotify Id')\n", (353, 422), False, 'from django.db import migrations, models\n')]
import sys sys.path.append("../modules/") import numpy as np import matplotlib.pyplot as plt from skimage import feature from utils import conf if __name__ == "__main__": filename = conf.dir_data_temp + "slice.npy" img = np.load(filename) filename = conf.dir_data_mask + "endocardial_mask.npy" endoca...
[ "matplotlib.pyplot.figure", "skimage.feature.canny", "numpy.load", "sys.path.append", "matplotlib.pyplot.show" ]
[((11, 41), 'sys.path.append', 'sys.path.append', (['"""../modules/"""'], {}), "('../modules/')\n", (26, 41), False, 'import sys\n'), ((233, 250), 'numpy.load', 'np.load', (['filename'], {}), '(filename)\n', (240, 250), True, 'import numpy as np\n'), ((333, 350), 'numpy.load', 'np.load', (['filename'], {}), '(filename)...
'''This module extends PTPDevice for Sony devices. Use it in a master module that determines the vendor and automatically uses its extension. This is why inheritance is not explicit. ''' from contextlib import contextmanager from construct import Container, Struct, Range, Computed, Enum, Array, PrefixedArray, Pass, Ex...
[ "logging.getLogger", "construct.Enum", "construct.PrefixedArray", "construct.Computed", "construct.Container", "construct.ExprAdapter" ]
[((381, 408), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (398, 408), False, 'import logging\n'), ((3703, 3758), 'construct.Enum', 'Enum', (['self._UInt8'], {'Disabled': '(0)', 'Enabled': '(1)', 'DisplayOnly': '(2)'}), '(self._UInt8, Disabled=0, Enabled=1, DisplayOnly=2)\n', (3707, 375...
import functools import itertools from typing import Callable, Dict, Iterable, List, Union from omegaconf import DictConfig, MissingMandatoryValue, OmegaConf class InvalidArgumentError(Exception): """Invalid argument on command line""" pass class OptionHandler: """Handling an option""" arg: List[...
[ "omegaconf.OmegaConf.load", "omegaconf.MissingMandatoryValue", "itertools.groupby", "functools.wraps" ]
[((1564, 1603), 'functools.wraps', 'functools.wraps', (['OptionHandler.__init__'], {}), '(OptionHandler.__init__)\n', (1579, 1603), False, 'import functools\n'), ((2177, 2225), 'itertools.groupby', 'itertools.groupby', (['self.configuration_list', 'type'], {}), '(self.configuration_list, type)\n', (2194, 2225), False, ...
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class PropertiesConfig(AppConfig): name = 'apartacho.properties' verbose_name = _("Properties")
[ "django.utils.translation.gettext_lazy" ]
[((179, 194), 'django.utils.translation.gettext_lazy', '_', (['"""Properties"""'], {}), "('Properties')\n", (180, 194), True, 'from django.utils.translation import gettext_lazy as _\n')]
from analyzer import matcher, common_pb2 from tests import * fieldType = common_pb2.FieldTypes() fieldType.name = common_pb2.FieldTypesEnum.Name(common_pb2.UK_NHS) types = [fieldType] def test_valid_uk_nhs(): num = '401-023-2137' results = match.analyze_text(num, types) assert len(results) == 1 asser...
[ "analyzer.common_pb2.FieldTypesEnum.Name", "analyzer.common_pb2.FieldTypes" ]
[((74, 97), 'analyzer.common_pb2.FieldTypes', 'common_pb2.FieldTypes', ([], {}), '()\n', (95, 97), False, 'from analyzer import matcher, common_pb2\n'), ((115, 164), 'analyzer.common_pb2.FieldTypesEnum.Name', 'common_pb2.FieldTypesEnum.Name', (['common_pb2.UK_NHS'], {}), '(common_pb2.UK_NHS)\n', (145, 164), False, 'fro...
import unittest import imp import sys import shapy class TestSettings(unittest.TestCase): def setUp(self): self.settings = imp.new_module('test_settings') sys.modules.update(test_settings=self.settings) setattr(self.settings, 'UNITS', 'override') setattr(self.settings, 'NEW_OPTION'...
[ "shapy.register_settings", "sys.modules.update", "imp.new_module" ]
[((137, 168), 'imp.new_module', 'imp.new_module', (['"""test_settings"""'], {}), "('test_settings')\n", (151, 168), False, 'import imp\n'), ((177, 224), 'sys.modules.update', 'sys.modules.update', ([], {'test_settings': 'self.settings'}), '(test_settings=self.settings)\n', (195, 224), False, 'import sys\n'), ((376, 416...
#This program displays a simple math quiz import random def main(): number1 = random.randint(1,350) number2 = random.randint(1,350) correct_answer = calculate_correct_answer(number1,number2) print('\t',number1,'\n+\t',number2) question = int(input('Enter the answer : ')) check_answer(question,c...
[ "random.randint" ]
[((83, 105), 'random.randint', 'random.randint', (['(1)', '(350)'], {}), '(1, 350)\n', (97, 105), False, 'import random\n'), ((119, 141), 'random.randint', 'random.randint', (['(1)', '(350)'], {}), '(1, 350)\n', (133, 141), False, 'import random\n')]
from urllib import request from urllib import parse head = request.urlopen("https://mp.weixin.qq.com/s?__biz=MzU3NTc0NzE0Mw==&mid=2247483739&idx=1&sn" "=e62a61120c73ebb93029a2897ca60ccd&chksm" "=fd1f2473ca68ad658b9b0388e6fc122951812ba08ada771f3acc4f1f25953de92df837f21795&m...
[ "urllib.parse.urlencode", "urllib.request.urlopen", "urllib.request.urlretrieve" ]
[((60, 739), 'urllib.request.urlopen', 'request.urlopen', (['"""https://mp.weixin.qq.com/s?__biz=MzU3NTc0NzE0Mw==&mid=2247483739&idx=1&sn=e62a61120c73ebb93029a2897ca60ccd&chksm=fd1f2473ca68ad658b9b0388e6fc122951812ba08ada771f3acc4f1f25953de92df837f21795&mpshare=1&scene=1&srcid=&sharer_sharetime=1584410683814&sharer_sha...
import unittest if __name__ == "__main__": # Finds all tests in submodules ending in *tests.py and runs them suite = unittest.TestLoader().discover('.', pattern = "*tests.py") unittest.TextTestRunner().run(suite)
[ "unittest.TextTestRunner", "unittest.TestLoader" ]
[((126, 147), 'unittest.TestLoader', 'unittest.TestLoader', ([], {}), '()\n', (145, 147), False, 'import unittest\n'), ((189, 214), 'unittest.TextTestRunner', 'unittest.TextTestRunner', ([], {}), '()\n', (212, 214), False, 'import unittest\n')]
""" Pattern matching utilities. """ import re from functools import wraps from typing import Iterable def match_subgroup(sequence, pattern): """Yield the sub-group element dictionary that match a regex pattern.""" for element in sequence: match = re.match(pattern, element) if match: ...
[ "re.match", "functools.wraps" ]
[((545, 568), 'functools.wraps', 'wraps', (['pattern_function'], {}), '(pattern_function)\n', (550, 568), False, 'from functools import wraps\n'), ((267, 293), 're.match', 're.match', (['pattern', 'element'], {}), '(pattern, element)\n', (275, 293), False, 'import re\n')]
''' qc command tests ''' import mock import unittest from cirrus.quality_control import main, run_linters, build_parser class QCCommandTests(unittest.TestCase): """ test coverage for qc command module """ def test_build_parser(self): """test build_parser call""" args = [ ...
[ "mock.patch", "cirrus.quality_control.main", "cirrus.quality_control.build_parser", "mock.Mock", "cirrus.quality_control.run_linters", "unittest.main" ]
[((1141, 1196), 'mock.patch', 'mock.patch', (['"""cirrus.quality_control.load_configuration"""'], {}), "('cirrus.quality_control.load_configuration')\n", (1151, 1196), False, 'import mock\n'), ((1202, 1246), 'mock.patch', 'mock.patch', (['"""cirrus.quality_control.FACTORY"""'], {}), "('cirrus.quality_control.FACTORY')\...
# -*- coding: utf-8 -*- import requests import json import tensorflow as tf import sys,os father_path = os.path.join(os.getcwd()) print(father_path, "==father path==") def find_bert(father_path): if father_path.split("/")[-1] == "BERT": return father_path output_path = "" for fi in os.listdir(father_path): i...
[ "tensorflow.gfile.Open", "requests.post", "os.listdir", "distributed_pair_sentence_classification.tf_serving_data_prepare.get_feeddict", "distributed_single_sentence_classification.tf_serving_data_prepare.get_feeddict", "os.path.join", "os.getcwd", "sys.path.extend", "json.dump", "tensorflow.app.r...
[((591, 626), 'os.path.join', 'os.path.join', (['bert_path', '"""t2t_bert"""'], {}), "(bert_path, 't2t_bert')\n", (603, 626), False, 'import sys, os\n'), ((627, 670), 'sys.path.extend', 'sys.path.extend', (['[bert_path, t2t_bert_path]'], {}), '([bert_path, t2t_bert_path])\n', (642, 670), False, 'import sys, os\n'), ((1...
import numpy as np import torch.nn as nn import torch.nn.functional as F import torch class Generator(nn.Module): def __init__(self, configs, shape): super(Generator, self).__init__() self.label_emb = nn.Embedding(configs.n_classes, configs.n_classes) self.shape = shape def block(...
[ "numpy.prod", "torch.nn.Dropout", "torch.nn.Tanh", "torch.nn.LeakyReLU", "torch.nn.BatchNorm1d", "torch.nn.Linear", "torch.nn.Embedding" ]
[((223, 273), 'torch.nn.Embedding', 'nn.Embedding', (['configs.n_classes', 'configs.n_classes'], {}), '(configs.n_classes, configs.n_classes)\n', (235, 273), True, 'import torch.nn as nn\n'), ((1308, 1358), 'torch.nn.Embedding', 'nn.Embedding', (['configs.n_classes', 'configs.n_classes'], {}), '(configs.n_classes, conf...
import BotDecidesPos import numpy as np class Collision_check: def __init__(self): self.m=0.0 self.n=0.0 def load_data(self,bot): tgx,tgy=bot.getTarget() mpx,mpy=bot.getPos() spd=bot.getSpeed() return spd,mpx,mpy,tgx,tgy def checkCollisio...
[ "numpy.absolute" ]
[((958, 982), 'numpy.absolute', 'np.absolute', (['(eta1 - eta2)'], {}), '(eta1 - eta2)\n', (969, 982), True, 'import numpy as np\n')]
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Dataset conversion script Author: <NAME> """ import json import argparse import clevercsv def month2index(month): return { "Jan": "01", "Feb": "02", "Mar": "03", "Apr": "04", "May": "05", "Jun": "06", "Ju...
[ "json.dump", "clevercsv.DictReader", "argparse.ArgumentParser" ]
[((481, 506), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (504, 506), False, 'import argparse\n'), ((793, 861), 'clevercsv.DictReader', 'clevercsv.DictReader', (['fp'], {'delimiter': '""","""', 'quotechar': '""""""', 'escapechar': '""""""'}), "(fp, delimiter=',', quotechar='', escapechar='')...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os dirs = ['/tmp/CTP_L2data/', '/tmp/CTP_tradedata/'] for d in dirs: if not os.path.isdir(d): os.makedirs(d)
[ "os.path.isdir", "os.makedirs" ]
[((135, 151), 'os.path.isdir', 'os.path.isdir', (['d'], {}), '(d)\n', (148, 151), False, 'import os\n'), ((161, 175), 'os.makedirs', 'os.makedirs', (['d'], {}), '(d)\n', (172, 175), False, 'import os\n')]
# Generated by Django 2.2.13 on 2020-08-15 07:28 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pipeline', '0053_auto_20200813_0521'), ] operations = [ migrations.AddField( model_name='censussubdivision', name='...
[ "django.db.models.FloatField", "django.db.models.IntegerField" ]
[((366, 396), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'null': '(True)'}), '(null=True)\n', (385, 396), False, 'from django.db import migrations, models\n'), ((547, 577), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'null': '(True)'}), '(null=True)\n', (566, 577), False, 'from djan...
import numpy as np import matplotlib.pyplot as plt def sigmoid(x, w, b): return 1/(1 + np.exp(-x*w+b)) x = np.arange(-5.0, 5.0, 0.1) y1 = sigmoid(x, 0.5, 0) y2 = sigmoid(x, 1, 0) y3 = sigmoid(x, 2, 0) plt.plot(x, y1, "r", linestyle='--') plt.plot(x, y2, 'g') plt.plot(x, y3, 'b', linestyle='--') plt.plot([0, 0],...
[ "matplotlib.pyplot.plot", "numpy.exp", "matplotlib.pyplot.title", "numpy.arange", "matplotlib.pyplot.show" ]
[((114, 139), 'numpy.arange', 'np.arange', (['(-5.0)', '(5.0)', '(0.1)'], {}), '(-5.0, 5.0, 0.1)\n', (123, 139), True, 'import numpy as np\n'), ((209, 245), 'matplotlib.pyplot.plot', 'plt.plot', (['x', 'y1', '"""r"""'], {'linestyle': '"""--"""'}), "(x, y1, 'r', linestyle='--')\n", (217, 245), True, 'import matplotlib.p...
import torch from torch import nn from torch.utils.data import DataLoader from nn_model import NeuralNetwork, FrankWolfeDataset train_dataset = FrankWolfeDataset("train_dataset") test_dataset = FrankWolfeDataset("test_dataset") train_dataloader = DataLoader(train_dataset, batch_size=128, shuffle=True) test_dataloade...
[ "nn_model.FrankWolfeDataset", "torch.nn.MSELoss", "torch.cuda.is_available", "torch.utils.data.DataLoader", "torch.no_grad", "nn_model.NeuralNetwork" ]
[((146, 180), 'nn_model.FrankWolfeDataset', 'FrankWolfeDataset', (['"""train_dataset"""'], {}), "('train_dataset')\n", (163, 180), False, 'from nn_model import NeuralNetwork, FrankWolfeDataset\n'), ((196, 229), 'nn_model.FrankWolfeDataset', 'FrankWolfeDataset', (['"""test_dataset"""'], {}), "('test_dataset')\n", (213, ...
from setuptools import setup # Read the README.md file with open('README.md') as file_handle: file_content = file_handle.read() setup( name='kamalsql', packages=['kamalsql'], version='1.0.0', license='MIT', description='A simple Python wrapper for your MySQL needs.', long_description=file_...
[ "setuptools.setup" ]
[((134, 912), 'setuptools.setup', 'setup', ([], {'name': '"""kamalsql"""', 'packages': "['kamalsql']", 'version': '"""1.0.0"""', 'license': '"""MIT"""', 'description': '"""A simple Python wrapper for your MySQL needs."""', 'long_description': 'file_content', 'long_description_content_type': '"""text/markdown"""', 'auth...
import pickle import tempfile import os from .XGBoostParser import parse_model as parse_model_xgb def load_model(filename, feature_names=None): with open(filename, 'rb') as f: model = pickle.load(f) _, tmp = tempfile.mkstemp(text=True) model.get_booster().dump_model(tmp) trees = parse_mod...
[ "pickle.load", "tempfile.mkstemp", "os.remove" ]
[((229, 256), 'tempfile.mkstemp', 'tempfile.mkstemp', ([], {'text': '(True)'}), '(text=True)\n', (245, 256), False, 'import tempfile\n'), ((372, 386), 'os.remove', 'os.remove', (['tmp'], {}), '(tmp)\n', (381, 386), False, 'import os\n'), ((200, 214), 'pickle.load', 'pickle.load', (['f'], {}), '(f)\n', (211, 214), False...
import random # If the input list is empty or contains just one element, it is already sorted. Return it. # If not, divide the list of numbers into two roughly equal parts. # Sort each part recursively using the merge sort algorithm. You'll get back two sorted lists. # Merge the two sorted lists to get a single sorted...
[ "random.shuffle" ]
[((1049, 1072), 'random.shuffle', 'random.shuffle', (['in_list'], {}), '(in_list)\n', (1063, 1072), False, 'import random\n')]
from typing import Union from estruturas.excecoes import EstruturaException from estruturas.no import Node class ListaEncadeada: def __init__(self) -> None: self.__head = None self.__tamanho = 0 @property def head(self) -> object: return self.__head @head.setter def head(...
[ "estruturas.no.Node", "estruturas.excecoes.EstruturaException" ]
[((1445, 1455), 'estruturas.no.Node', 'Node', (['dado'], {}), '(dado)\n', (1449, 1455), False, 'from estruturas.no import Node\n'), ((862, 872), 'estruturas.no.Node', 'Node', (['dado'], {}), '(dado)\n', (866, 872), False, 'from estruturas.no import Node\n'), ((983, 993), 'estruturas.no.Node', 'Node', (['dado'], {}), '(...
import numpy as np from scipy.optimize import fsolve from scipy.linalg import expm import matplotlib.pyplot as plt # Some utilities # map a vector to a skew symmetric matrix def skew(x): return np.array([[0, -x[2], x[1]], [x[2], 0, -x[0]], [-x[1], x[0], 0]]) # map a twist to its adjoint form def adjoint(x): r...
[ "numpy.eye", "numpy.reshape", "numpy.diag", "numpy.array", "numpy.zeros", "numpy.linalg.inv", "matplotlib.pyplot.pause", "numpy.zeros_like", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ]
[((199, 263), 'numpy.array', 'np.array', (['[[0, -x[2], x[1]], [x[2], 0, -x[0]], [-x[1], x[0], 0]]'], {}), '([[0, -x[2], x[1]], [x[2], 0, -x[0]], [-x[1], x[0], 0]])\n', (207, 263), True, 'import numpy as np\n'), ((981, 998), 'numpy.zeros', 'np.zeros', (['(N, 12)'], {}), '((N, 12))\n', (989, 998), True, 'import numpy as...
# !/usr/bin/env python # -*-coding:utf-8-*- from flask import jsonify,request,g,url_for,current_app from .. import db from ..models import ShareCategory,Topic from . import api from .errors import forbidden @api.route('/getCategory') def get_category(): u""" 获取主题信息,可以通过type确定返回为JsonArray还是Json. :return: ...
[ "flask.request.args.get", "flask.jsonify" ]
[((421, 453), 'flask.request.args.get', 'request.args.get', (['"""type"""', '"""list"""'], {}), "('type', 'list')\n", (437, 453), False, 'from flask import jsonify, request, g, url_for, current_app\n'), ((953, 966), 'flask.jsonify', 'jsonify', (['json'], {}), '(json)\n', (960, 966), False, 'from flask import jsonify, r...
import GradientBasedOptimization as gbopt import openpyxl as pyxl import time from QAnsatz import * from QSubspaceEigensolver import * import k_nearest_data as k_data from QMeasure import HadamardTest_Analytical W_Hamiltonian = Hamiltonian_in_Pauli_String(qubits=3, ...
[ "openpyxl.load_workbook", "GradientBasedOptimization.steepest", "time.localtime", "openpyxl.Workbook" ]
[((6498, 6513), 'openpyxl.Workbook', 'pyxl.Workbook', ([], {}), '()\n', (6511, 6513), True, 'import openpyxl as pyxl\n'), ((6547, 6575), 'openpyxl.load_workbook', 'pyxl.load_workbook', (['filename'], {}), '(filename)\n', (6565, 6575), True, 'import openpyxl as pyxl\n'), ((7046, 7074), 'openpyxl.load_workbook', 'pyxl.lo...
import datetime import json from datetime import datetime from django.core.exceptions import PermissionDenied from django.http import Http404 from django.shortcuts import get_object_or_404, redirect, render from django.template import loader from django.utils import translation from django.views.generic import Templat...
[ "registry.models.Pilot.objects.all", "registry.models.Operator.objects.all", "registry.models.Aircraft.objects.all", "registry.models.Aircraft.objects.filter", "rest_framework.response.Response", "registry.models.Operator.objects.get", "registry.serializers.AircraftSerializer", "registry.models.Contac...
[((1357, 1379), 'registry.models.Operator.objects.all', 'Operator.objects.all', ([], {}), '()\n', (1377, 1379), False, 'from registry.models import Activity, Authorization, Contact, Operator, Aircraft, Pilot, Test, TestValidity\n'), ((1678, 1700), 'registry.models.Operator.objects.all', 'Operator.objects.all', ([], {})...
import json import os import time import ray from ray.train import Trainer from ray.train.examples.horovod.horovod_example import ( train_func as horovod_torch_train_func, ) if __name__ == "__main__": ray.init(address=os.environ.get("RAY_ADDRESS", "auto")) start_time = time.time() num_workers = 8 ...
[ "json.dumps", "time.time", "os.environ.get", "ray.train.Trainer" ]
[((284, 295), 'time.time', 'time.time', ([], {}), '()\n', (293, 295), False, 'import time\n'), ((351, 382), 'ray.train.Trainer', 'Trainer', (['"""horovod"""', 'num_workers'], {}), "('horovod', num_workers)\n", (358, 382), False, 'from ray.train import Trainer\n'), ((738, 749), 'time.time', 'time.time', ([], {}), '()\n'...
import numpy as np from gtsam import SfmTrack from gtsfm.common.image import Image import gtsfm.utils.images as image_utils def test_get_average_point_color(): """ Ensure 3d point color is computed as mean of RGB per 2d measurement.""" # random point; 2d measurements below are dummy locations (not actual pro...
[ "gtsfm.utils.images.get_rescaling_factor_per_axis", "gtsfm.utils.images.get_downsampling_factor_per_axis", "numpy.isclose", "numpy.array", "numpy.zeros", "gtsfm.utils.images.get_average_point_color", "gtsfm.common.image.Image", "gtsam.SfmTrack" ]
[((351, 370), 'numpy.array', 'np.array', (['[1, 2, 1]'], {}), '([1, 2, 1])\n', (359, 370), True, 'import numpy as np\n'), ((386, 411), 'gtsam.SfmTrack', 'SfmTrack', (['triangulated_pt'], {}), '(triangulated_pt)\n', (394, 411), False, 'from gtsam import SfmTrack\n'), ((578, 617), 'numpy.zeros', 'np.zeros', (['(100, 200,...
from setuptools import setup, find_packages import os version = '0.0' requires = [ "setuptools>=0.7", "pyramid", ] tests_require = [ "pytest", "testfixtures", "webtest", ] long_description = ( open('README.rst').read() + '\n' + 'Contributors\n' '============\n' + '\n' + o...
[ "setuptools.find_packages" ]
[((1084, 1104), 'setuptools.find_packages', 'find_packages', (['"""src"""'], {}), "('src')\n", (1097, 1104), False, 'from setuptools import setup, find_packages\n')]
from collections import defaultdict from advent_of_code.core import parse_input, mapt test_input = """0,9 -> 5,9 8,0 -> 0,8 9,4 -> 3,4 2,2 -> 2,1 7,0 -> 7,4 6,4 -> 2,0 0,9 -> 2,9 3,4 -> 1,4 0,0 -> 8,8 5,5 -> 8,2""" def count(iterable, predicate=bool): return sum(1 for item in iterable if predicate(item)) def ...
[ "collections.defaultdict" ]
[((1087, 1103), 'collections.defaultdict', 'defaultdict', (['int'], {}), '(int)\n', (1098, 1103), False, 'from collections import defaultdict\n')]
import os import pandas as pd from sqlalchemy.sql import column from igf_data.igfdb.baseadaptor import BaseAdaptor from igf_data.igfdb.igfTables import File, File_attribute class FileAdaptor(BaseAdaptor): ''' An adaptor class for File tables ''' def store_file_and_attribute_data(self,data,autosave=True): '...
[ "igf_data.igfdb.baseadaptor.BaseAdaptor.divide_data_to_table_and_attribute", "pandas.DataFrame", "os.remove" ]
[((2153, 2382), 'igf_data.igfdb.baseadaptor.BaseAdaptor.divide_data_to_table_and_attribute', 'BaseAdaptor.divide_data_to_table_and_attribute', (['self'], {'data': 'data', 'required_column': 'required_column', 'table_columns': 'file_columns', 'attribute_name_column': 'attribute_name_column', 'attribute_value_column': 'a...
import os import subprocess from E2E.configuration_loader import Configuration config = Configuration().get_configuration() EXE_FOLDER, EXE_NAME = os.path.split(config['shotExtractor']) SHOTS_OUTPUT_SUFFIX = '_shot_scene.txt' KEYFRAMES_DIR = 'Keyframes' class Keyframe: def __init__(self, keyframe_name): ...
[ "os.path.exists", "os.path.join", "os.path.split", "os.chdir", "os.path.isdir", "os.path.basename", "E2E.configuration_loader.Configuration" ]
[((149, 187), 'os.path.split', 'os.path.split', (["config['shotExtractor']"], {}), "(config['shotExtractor'])\n", (162, 187), False, 'import os\n'), ((90, 105), 'E2E.configuration_loader.Configuration', 'Configuration', ([], {}), '()\n', (103, 105), False, 'from E2E.configuration_loader import Configuration\n'), ((3012...
from typing import Union import httpx from aos_sw_api.validate import validate_200 from ._model import TacacsProfileModel class TacacsProfile: def __new__(cls, session: Union[httpx.Client, httpx.AsyncClient], **kwargs): if isinstance(session, httpx.Client): return TacacsProfileSync(session=...
[ "aos_sw_api.validate.validate_200" ]
[((891, 906), 'aos_sw_api.validate.validate_200', 'validate_200', (['r'], {}), '(r)\n', (903, 906), False, 'from aos_sw_api.validate import validate_200\n'), ((1236, 1251), 'aos_sw_api.validate.validate_200', 'validate_200', (['r'], {}), '(r)\n', (1248, 1251), False, 'from aos_sw_api.validate import validate_200\n')]
import os import glob import platform import sys sys.path = sys.path[1:] from hops import __get_abspath__ as hops__get_abspath__ name = 'hops' here = os.path.abspath(os.path.dirname(__file__)) shortcut = open(os.path.join(here, 'shortcut.txt')).read() shortcut = shortcut.replace('{{x}}', hops__get_abspath__()) # c...
[ "os.path.join", "os.path.dirname", "platform.system", "os.system", "hops.__get_abspath__", "os.path.expanduser" ]
[((170, 195), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (185, 195), False, 'import os\n'), ((293, 314), 'hops.__get_abspath__', 'hops__get_abspath__', ([], {}), '()\n', (312, 314), True, 'from hops import __get_abspath__ as hops__get_abspath__\n'), ((432, 449), 'platform.system', 'platfo...
"""Build outline module.""" # Official Libraries # My Modules from stobu.formats.outline import format_outlines_data from stobu.syss import messages as msg from stobu.tools.elmchecker import is_enable_the_elm from stobu.tools.storydatareader import elm_outline_of, elm_title_of from stobu.tools.translater import tran...
[ "stobu.syss.messages.PROC_START.format", "stobu.syss.messages.PROC_SUCCESS.format", "stobu.types.outline.OutlineRecord", "stobu.types.output.OutputsData", "stobu.tools.storydatareader.elm_title_of", "stobu.utils.assertion.is_instance", "stobu.tools.translater.translate_tags_text_list", "stobu.tools.st...
[((2216, 2251), 'stobu.formats.outline.format_outlines_data', 'format_outlines_data', (['outlines_data'], {}), '(outlines_data)\n', (2236, 2251), False, 'from stobu.formats.outline import format_outlines_data\n'), ((2399, 2440), 'stobu.tools.translater.translate_tags_text_list', 'translate_tags_text_list', (['formatted...
r""" Difference between magnetic dipole and loop sources =================================================== In this example we look at the differences between an electric loop loop, which results in a magnetic source, and a magnetic dipole source. The derivation of the electromagnetic field in Hunziker et al. (2015)...
[ "numpy.log10", "empymod.loop", "numpy.arange", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "matplotlib.pyplot.style.use", "matplotlib.pyplot.ylim", "matplotlib.pyplot.axis", "matplotlib.pyplot.yscale", "numpy.logspace", "numpy.abs", "matplotlib.pyplot.gca", "numpy.size", "empymod...
[((2839, 2862), 'matplotlib.pyplot.style.use', 'plt.style.use', (['"""ggplot"""'], {}), "('ggplot')\n", (2852, 2862), True, 'import matplotlib.pyplot as plt\n'), ((3261, 3284), 'numpy.logspace', 'np.logspace', (['(-1)', '(5)', '(301)'], {}), '(-1, 5, 301)\n', (3272, 3284), True, 'import numpy as np\n'), ((3312, 3335), ...
import csv from binance.client import Client import pandas as pd KEY ='<KEY>' SECRET='<KEY>' client = Client(KEY, SECRET) candlesticks = client.get_historical_klines("BTCUSDT", Client.KLINE_INTERVAL_1DAY, "1 Jan, 2020", "12 Feb, 2020") print(candlesticks) time=[] open=[] high=[] low=[] close=[] cols=['time', 'open', '...
[ "pandas.DataFrame", "binance.client.Client" ]
[((102, 121), 'binance.client.Client', 'Client', (['KEY', 'SECRET'], {}), '(KEY, SECRET)\n', (108, 121), False, 'from binance.client import Client\n'), ((510, 536), 'pandas.DataFrame', 'pd.DataFrame', ([], {'columns': 'cols'}), '(columns=cols)\n', (522, 536), True, 'import pandas as pd\n')]
from django.contrib.auth import authenticate from rest_framework import exceptions, serializers from .models import Projects, Users class MerchSerializer(serializers.ModelSerializer): class Meta: model = Projects fields = ('title', 'description', 'image','link','date_posted','user') class MerchUse...
[ "django.contrib.auth.authenticate", "rest_framework.serializers.CharField", "rest_framework.exceptions.ValidationError" ]
[((971, 994), 'rest_framework.serializers.CharField', 'serializers.CharField', ([], {}), '()\n', (992, 994), False, 'from rest_framework import exceptions, serializers\n'), ((1010, 1033), 'rest_framework.serializers.CharField', 'serializers.CharField', ([], {}), '()\n', (1031, 1033), False, 'from rest_framework import ...
from __future__ import absolute_import from django.core.urlresolvers import reverse from sentry.testutils import APITestCase from sentry.models import UserReport class ProjectUserReportsTest(APITestCase): def test_simple(self): self.login_as(user=self.user) project = self.create_project() ...
[ "sentry.models.UserReport.objects.create", "django.core.urlresolvers.reverse" ]
[((385, 516), 'sentry.models.UserReport.objects.create', 'UserReport.objects.create', ([], {'project': 'project', 'event_id': "('a' * 32)", 'name': '"""Foo"""', 'email': '"""<EMAIL>"""', 'comments': '"""Hello world"""', 'group': 'group'}), "(project=project, event_id='a' * 32, name='Foo',\n email='<EMAIL>', comments...
""" Script for visualizing a robot from a URDF. Author: <NAME> """ import argparse import urdfpy if __name__ == '__main__': # Parse Args parser = argparse.ArgumentParser( description='Visualize a robot from a URDF file' ) parser.add_argument('urdf', type=str, help='Pat...
[ "urdfpy.URDF.load", "argparse.ArgumentParser" ]
[((157, 230), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Visualize a robot from a URDF file"""'}), "(description='Visualize a robot from a URDF file')\n", (180, 230), False, 'import argparse\n'), ((625, 652), 'urdfpy.URDF.load', 'urdfpy.URDF.load', (['args.urdf'], {}), '(args.urdf)\n...
# -*- coding:utf-8 -*- import os import sys sys.path.insert(0, '../') import unittest import membership_pb2 import utils import models class HeaderTest(utils.TestCase): SERVICE_PLATFORM = models.service_platform() PROTOCOL_VERSION = models.protocol_version() def setUp(self): app = models.app(app_id=1) ...
[ "models.service_platform", "sys.path.insert", "models.protocol_version", "models.app" ]
[((45, 70), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""../"""'], {}), "(0, '../')\n", (60, 70), False, 'import sys\n'), ((195, 220), 'models.service_platform', 'models.service_platform', ([], {}), '()\n', (218, 220), False, 'import models\n'), ((242, 267), 'models.protocol_version', 'models.protocol_version', (...
import requests from json import loads from termcolor import colored from configparser import RawConfigParser def init(domain): PDCH = [] print(colored("[*]-Searching Project Discovery Chaos...", "yellow")) parser = RawConfigParser() parser.read("config.ini") CHAOS_KEY = parser.get("PDChaos", "CHAOS_API_KEY") ...
[ "json.loads", "configparser.RawConfigParser", "requests.get", "termcolor.colored" ]
[((223, 240), 'configparser.RawConfigParser', 'RawConfigParser', ([], {}), '()\n', (238, 240), False, 'from configparser import RawConfigParser\n'), ((149, 210), 'termcolor.colored', 'colored', (['"""[*]-Searching Project Discovery Chaos..."""', '"""yellow"""'], {}), "('[*]-Searching Project Discovery Chaos...', 'yello...
from pathlib import Path def absolute_path(path): src_path = str(Path(__file__).parent.resolve()) return src_path + "/" + path # Paths DATASET_DIRECTORY = absolute_path("../dataset") CLEAN_DATA_PATH = absolute_path("clean_data") TIME_SERIES_PATH = absolute_path("clean_data/series.npy") TRAINED_MODELS_PATH =...
[ "pathlib.Path" ]
[((897, 922), 'pathlib.Path', 'Path', (['TRAINED_MODELS_PATH'], {}), '(TRAINED_MODELS_PATH)\n', (901, 922), False, 'from pathlib import Path\n'), ((959, 980), 'pathlib.Path', 'Path', (['CLEAN_DATA_PATH'], {}), '(CLEAN_DATA_PATH)\n', (963, 980), False, 'from pathlib import Path\n'), ((71, 85), 'pathlib.Path', 'Path', ([...
from pykafka import KafkaClient, exceptions import logging, time from robot.api import logger import re logging.basicConfig() # RobotFramework.logger: http://robot-framework.readthedocs.org/en/2.9.2/_modules/robot/api/logger.html # Print message to RobotFramework console & python output def msg_print(msg): print...
[ "logging.basicConfig", "pykafka.KafkaClient", "robot.api.logger.info", "time.time", "re.search" ]
[((105, 126), 'logging.basicConfig', 'logging.basicConfig', ([], {}), '()\n', (124, 126), False, 'import logging, time\n'), ((347, 380), 'robot.api.logger.info', 'logger.info', (["('[Lib_Kafka] ' + msg)"], {}), "('[Lib_Kafka] ' + msg)\n", (358, 380), False, 'from robot.api import logger\n'), ((528, 582), 'pykafka.Kafka...
'''OpenGL extension ANGLE.program_binary This module customises the behaviour of the OpenGL.raw.GLES2.ANGLE.program_binary to provide a more Python-friendly API Overview (from the spec) This extension makes available a program binary format, PROGRAM_BINARY_ANGLE. It enables retrieving and loading of pre-linked ...
[ "OpenGL.extensions.hasGLExtension" ]
[((884, 926), 'OpenGL.extensions.hasGLExtension', 'extensions.hasGLExtension', (['_EXTENSION_NAME'], {}), '(_EXTENSION_NAME)\n', (909, 926), False, 'from OpenGL import extensions\n')]
import subprocess import os def getBlame(f): folder = os.path.split(f)[0] cwd = os.getcwd() os.chdir(folder) cmd = "git blame --abbrev=0 -e \"" + f + "\"" try: sub = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) response, err = sub.comm...
[ "os.chdir", "os.path.split", "subprocess.Popen", "os.getcwd" ]
[((92, 103), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (101, 103), False, 'import os\n'), ((108, 124), 'os.chdir', 'os.chdir', (['folder'], {}), '(folder)\n', (116, 124), False, 'import os\n'), ((920, 933), 'os.chdir', 'os.chdir', (['cwd'], {}), '(cwd)\n', (928, 933), False, 'import os\n'), ((1080, 1091), 'os.getcwd'...
import numpy as np import pandas as pd from sklearn import preprocessing import math def load_datasets_feature(filename): features_df = pd.read_csv(filename, delimiter='\\s*,\\s*', header=0) return features_df def load_join_data3(features_df, result_file, histograms_path, num_rows, num_columns): cols = ...
[ "numpy.dstack", "numpy.multiply", "pandas.read_csv", "math.pow", "pandas.merge", "numpy.sum", "numpy.array", "sklearn.preprocessing.minmax_scale", "pandas.DataFrame", "sklearn.preprocessing.MinMaxScaler" ]
[((142, 196), 'pandas.read_csv', 'pd.read_csv', (['filename'], {'delimiter': '"""\\\\s*,\\\\s*"""', 'header': '(0)'}), "(filename, delimiter='\\\\s*,\\\\s*', header=0)\n", (153, 196), True, 'import pandas as pd\n'), ((501, 573), 'pandas.read_csv', 'pd.read_csv', (['result_file'], {'delimiter': '"""\\\\s*,\\\\s*"""', 'h...
from mycroft.messagebus.message import Message, dig_for_message from mycroft.skills.core import FallbackSkill, intent_file_handler, intent_handler from adapt.intent import IntentBuilder from jarbas_hive_mind_red import get_listener from jarbas_hive_mind.settings import CERTS_PATH from jarbas_hive_mind.database import C...
[ "jarbas_hive_mind_red.get_listener", "mycroft.messagebus.message.dig_for_message", "adapt.intent.IntentBuilder", "time.sleep", "mycroft.skills.core.intent_file_handler", "mycroft.messagebus.message.Message", "time.time", "jarbas_utils.create_daemon", "jarbas_hive_mind.database.ClientDatabase" ]
[((4545, 4583), 'mycroft.skills.core.intent_file_handler', 'intent_file_handler', (['"""pingnode.intent"""'], {}), "('pingnode.intent')\n", (4564, 4583), False, 'from mycroft.skills.core import FallbackSkill, intent_file_handler, intent_handler\n'), ((4846, 4891), 'mycroft.skills.core.intent_file_handler', 'intent_file...
from setuptools import setup, find_packages setup( name='GitHub Actions Workflow Representation', version='0.9.2', description='Workflow representation for GitHub Actions.', long_description='See README.md', author='YOCKOW', url='https://github.com/YOCKOW/PythonGitHubActionsWorkflowRepresentati...
[ "setuptools.find_packages" ]
[((357, 406), 'setuptools.find_packages', 'find_packages', ([], {'exclude': "('workflow_tests', 'docs')"}), "(exclude=('workflow_tests', 'docs'))\n", (370, 406), False, 'from setuptools import setup, find_packages\n')]
import os import numpy as np import random from math import isclose import torch import matplotlib.pyplot as plt from modelZoo.DyanOF import OFModel, fista from torch.autograd import Variable import torch.nn def gridRing(N): # epsilon_low = 0.25 # epsilon_high = 0.15 # rmin = (1 - epsilon_low) # rmax ...
[ "numpy.logical_and", "modelZoo.DyanOF.fista", "numpy.conjugate", "torch.Tensor", "numpy.angle", "torch.matmul", "numpy.meshgrid", "numpy.arange" ]
[((967, 996), 'numpy.arange', 'np.arange', (['(-rmax)', 'rmax', 'delta'], {}), '(-rmax, rmax, delta)\n', (976, 996), True, 'import numpy as np\n'), ((1008, 1041), 'numpy.meshgrid', 'np.meshgrid', (['xv', 'xv'], {'sparse': '(False)'}), '(xv, xv, sparse=False)\n', (1019, 1041), True, 'import numpy as np\n'), ((1068, 1134...