code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# signals (eventos) y slots (metodos que procesan los eventos) from PySide6.QtWidgets import QApplication, QMainWindow, QPushButton, QWidget, QVBoxLayout, QHBoxLayout, QLabel, QLineEdit, QMessageBox from PySide6.QtCore import QSize import sys class VentanaPrincipal(QMainWindow): def __init__(self): super(...
[ "PySide6.QtWidgets.QApplication", "PySide6.QtWidgets.QPushButton" ]
[((1467, 1489), 'PySide6.QtWidgets.QApplication', 'QApplication', (['sys.argv'], {}), '(sys.argv)\n', (1479, 1489), False, 'from PySide6.QtWidgets import QApplication, QMainWindow, QPushButton, QWidget, QVBoxLayout, QHBoxLayout, QLabel, QLineEdit, QMessageBox\n'), ((412, 437), 'PySide6.QtWidgets.QPushButton', 'QPushBut...
from flask import Flask, request, jsonify from db_user_interactions import user_respond from pymongo import MongoClient from datetime import date, datetime, timedelta import re #today's date today_int = date.today() print("test_app - Today's date:", today_int) today_str = str(today_int) #mongodb setup client = MongoC...
[ "db_user_interactions.user_respond", "flask.Flask", "flask.jsonify", "flask.request.get_json", "re.sub", "pymongo.MongoClient", "datetime.date.today", "re.search" ]
[((204, 216), 'datetime.date.today', 'date.today', ([], {}), '()\n', (214, 216), False, 'from datetime import date, datetime, timedelta\n'), ((314, 354), 'pymongo.MongoClient', 'MongoClient', (['"""your_api_server_ip"""', '(27017)'], {}), "('your_api_server_ip', 27017)\n", (325, 354), False, 'from pymongo import MongoC...
from qft import get_fft_from_counts, loadBackend, qft_framework from fft import fft_framework from frontend import frontend, signal, transform from qiskit.circuit.library import QFT as qiskit_qft # --- Standard imports # Importing standard Qiskit libraries and configuring account from qiskit import QuantumCircuit, e...
[ "frontend.signal", "qiskit.execute", "qiskit.compiler.transpile", "qft.loadBackend", "qiskit.ignis.mitigation.measurement.complete_meas_cal", "qiskit.IBMQ.load_account", "qiskit.circuit.library.QFT", "frontend.transform", "numpy.linalg.norm", "qiskit.QuantumCircuit", "qft.get_fft_from_counts", ...
[((499, 518), 'qiskit.IBMQ.load_account', 'IBMQ.load_account', ([], {}), '()\n', (516, 518), False, 'from qiskit import QuantumCircuit, execute, Aer, IBMQ\n'), ((997, 1039), 'qiskit.ignis.mitigation.measurement.complete_meas_cal', 'complete_meas_cal', ([], {'qr': 'qr', 'circlabel': '"""mcal"""'}), "(qr=qr, circlabel='m...
from unittest.mock import Mock import pytest from friendly_iter.iterator_modifiers import flatten, take, skip, step def test_flatten(): result = flatten([range(4), [], [4, 5]]) assert list(result) == [0, 1, 2, 3, 4, 5] def test_take_limits_number_of_resulting_items(): result = take(3, range(10)) a...
[ "unittest.mock.Mock", "friendly_iter.iterator_modifiers.step", "friendly_iter.iterator_modifiers.skip", "pytest.fail", "pytest.raises" ]
[((526, 550), 'friendly_iter.iterator_modifiers.skip', 'skip', (['(2)', '[1, 2, 3, 4, 5]'], {}), '(2, [1, 2, 3, 4, 5])\n', (530, 550), False, 'from friendly_iter.iterator_modifiers import flatten, take, skip, step\n'), ((659, 674), 'friendly_iter.iterator_modifiers.skip', 'skip', (['(3)', '[1, 2]'], {}), '(3, [1, 2])\n...
# -*- coding: utf-8 -*- """ Created on Fri Jun 9 10:56:12 2017 @author: tneises """ import json import matplotlib.pyplot as plt import numpy as np import matplotlib.lines as mlines import sys import os absFilePath = os.path.abspath(__file__) fileDir = os.path.dirname(os.path.abspath(__file__)) parentDir = os.pat...
[ "sco2_plots.C_sco2_TS_PH_overlay_plot", "sco2_plots.C_sco2_TS_PH_plot", "os.path.join", "os.path.dirname", "sco2_cycle_ssc.C_sco2_sim", "sco2_plots.C_des_stacked_outputs_plot", "sco2_cycle_ssc.get_one_des_dict_from_par_des_dict", "os.path.abspath", "sys.path.append", "numpy.arange" ]
[((223, 248), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (238, 248), False, 'import os\n'), ((314, 338), 'os.path.dirname', 'os.path.dirname', (['fileDir'], {}), '(fileDir)\n', (329, 338), False, 'import os\n'), ((349, 380), 'os.path.join', 'os.path.join', (['parentDir', '"""core"""'], {}...
from random import randint import datetime import pymysql import cgi def getConnection(): return pymysql.connect(host='localhost', user='root', password='<PASSWORD>', db='BookFetch') def newStudent(): fName = input("First Name:...
[ "datetime.datetime.now", "pymysql.connect", "random.randint" ]
[((104, 194), 'pymysql.connect', 'pymysql.connect', ([], {'host': '"""localhost"""', 'user': '"""root"""', 'password': '"""<PASSWORD>"""', 'db': '"""BookFetch"""'}), "(host='localhost', user='root', password='<PASSWORD>', db=\n 'BookFetch')\n", (119, 194), False, 'import pymysql\n'), ((1689, 1712), 'datetime.datetim...
from flask_wtf import FlaskForm from wtforms import StringField, TextAreaField, SubmitField, SelectField from wtforms.validators import Required class BlogForm(FlaskForm): blog_title = StringField("Blog title", validators=[Required()]) blog_description = StringField("Blog description", validators=[Required()...
[ "wtforms.validators.Required", "wtforms.SubmitField" ]
[((699, 718), 'wtforms.SubmitField', 'SubmitField', (['"""Post"""'], {}), "('Post')\n", (710, 718), False, 'from wtforms import StringField, TextAreaField, SubmitField, SelectField\n'), ((835, 857), 'wtforms.SubmitField', 'SubmitField', (['"""Comment"""'], {}), "('Comment')\n", (846, 857), False, 'from wtforms import S...
# Generated by Django 3.0.4 on 2020-03-29 14:14 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('role', '0002_auto_20200329_1412'), ] operations = [ migrations.AlterField( model_name='role', name='name', ...
[ "django.db.models.CharField" ]
[((329, 385), 'django.db.models.CharField', 'models.CharField', ([], {'default': '""""""', 'max_length': '(50)', 'unique': '(True)'}), "(default='', max_length=50, unique=True)\n", (345, 385), False, 'from django.db import migrations, models\n')]
from pynamodb.attributes import UnicodeAttribute class UserModel: class Meta: table_name = "goslinks-users" read_capacity_units = 1 write_capacity_units = 1 email = UnicodeAttribute(hash_key=True) name = UnicodeAttribute() photo = UnicodeAttribute() @property def orga...
[ "pynamodb.attributes.UnicodeAttribute", "goslinks.db.factory.get_model" ]
[((200, 231), 'pynamodb.attributes.UnicodeAttribute', 'UnicodeAttribute', ([], {'hash_key': '(True)'}), '(hash_key=True)\n', (216, 231), False, 'from pynamodb.attributes import UnicodeAttribute\n'), ((243, 261), 'pynamodb.attributes.UnicodeAttribute', 'UnicodeAttribute', ([], {}), '()\n', (259, 261), False, 'from pynam...
"""Tests for creating file structure.""" import os from pathlib import Path import tempfile from unittest import TestCase import carpyt TEST_TEMPLATES = Path(os.path.abspath(__file__)).parent / 'test_templates' class TestTemplateParsing(TestCase): """Tests that templates are parsed correctly.""" def test...
[ "os.path.abspath", "tempfile.TemporaryDirectory", "carpyt.run_template_parser", "pathlib.Path" ]
[((476, 517), 'carpyt.run_template_parser', 'carpyt.run_template_parser', (['template_path'], {}), '(template_path)\n', (502, 517), False, 'import carpyt\n'), ((988, 1029), 'carpyt.run_template_parser', 'carpyt.run_template_parser', (['template_path'], {}), '(template_path)\n', (1014, 1029), False, 'import carpyt\n'), ...
#!/usr/bin/env python3 import pytest import argparse import configparser from tools.rest_tools import * from tools.rest_helper import * parser = argparse.ArgumentParser(description="Single test") parser.add_argument( '-m', '--mod_name', help="exec only one directory under tapplet/") parser.add_argument( '-f', '--t...
[ "configparser.ConfigParser", "argparse.ArgumentParser", "pytest.main" ]
[((147, 197), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Single test"""'}), "(description='Single test')\n", (170, 197), False, 'import argparse\n'), ((1297, 1324), 'configparser.ConfigParser', 'configparser.ConfigParser', ([], {}), '()\n', (1322, 1324), False, 'import configparser\n...
from dotenv import load_dotenv import os load_dotenv() class ApplicationConfig: SECRET_KEY = "asdadsd" SQLALCHEMY_TRACK_MODIFICATIONS = False SQLALCHEMY_ECHO = True SQLALCHEMY_DATABASE_URI = r"sqlite:///./db.sqlite" SESSION_TYPE = "filesystem" SESSION_PERMANENT = False SESSION_USE_SIGNER...
[ "dotenv.load_dotenv" ]
[((42, 55), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (53, 55), False, 'from dotenv import load_dotenv\n')]
from typing import List import pandas as pd from logzero import logger from sqlalchemy.orm import Session from covigator import SYNONYMOUS_VARIANT, MISSENSE_VARIANT from covigator.database.model import DataSource, PrecomputedSynonymousNonSynonymousCounts, RegionType, \ VARIANT_OBSERVATION_TABLE_NAME, SAMPLE_ENA_TA...
[ "covigator.database.model.PrecomputedOccurrence", "covigator.database.queries.Queries", "logzero.logger.exception", "logzero.logger.error" ]
[((584, 613), 'covigator.database.queries.Queries', 'Queries', ([], {'session': 'self.session'}), '(session=self.session)\n', (591, 613), False, 'from covigator.database.queries import Queries\n'), ((2816, 3155), 'covigator.database.model.PrecomputedOccurrence', 'PrecomputedOccurrence', ([], {'total': "row['total']", '...
### evaluation import numpy as np from sklearn.linear_model import LinearRegression class Evaluate(object): def __init__(self, model_names, X_train, y_preds, config,verbose=0): self.distance_min = config['distance_min'] self.point_min = config['point_min'] #0.05, point_min = 50 self.model_n...
[ "numpy.sqrt", "numpy.amin", "numpy.max", "numpy.vstack", "numpy.min", "numpy.argmin", "sklearn.linear_model.LinearRegression" ]
[((2206, 2300), 'numpy.sqrt', 'np.sqrt', (['((clsuter_a_i[0] - cluster_b[:, 0]) ** 2 + (clsuter_a_i[1] - cluster_b[:, 1\n ]) ** 2)'], {}), '((clsuter_a_i[0] - cluster_b[:, 0]) ** 2 + (clsuter_a_i[1] -\n cluster_b[:, 1]) ** 2)\n', (2213, 2300), True, 'import numpy as np\n'), ((2308, 2330), 'numpy.amin', 'np.amin',...
#!/usr/local/CyberCP/bin/python import os, sys sys.path.append('/usr/local/CyberCP') import django os.environ.setdefault("DJANGO_SETTINGS_MODULE", "CyberCP.settings") django.setup() import threading as multi from plogical.acl import ACLManager from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging ...
[ "os.environ.setdefault", "threading.Thread.__init__", "django.setup", "websiteFunctions.website.WebsiteManager", "plogical.acl.ACLManager.findAllSites", "sys.path.append" ]
[((48, 85), 'sys.path.append', 'sys.path.append', (['"""/usr/local/CyberCP"""'], {}), "('/usr/local/CyberCP')\n", (63, 85), False, 'import os, sys\n'), ((100, 167), 'os.environ.setdefault', 'os.environ.setdefault', (['"""DJANGO_SETTINGS_MODULE"""', '"""CyberCP.settings"""'], {}), "('DJANGO_SETTINGS_MODULE', 'CyberCP.se...
from flask import render_template, redirect, url_for, escape, request from app import app from app.forms import URLForm, FilesForm from app.utils import perform_url_request, perform_upload_request import requests import base64 import json @app.route('/url-api', methods=['POST']) def url_api(): urls = request.form...
[ "flask.render_template", "app.forms.URLForm", "requests.post", "app.utils.perform_url_request", "json.dumps", "app.utils.perform_upload_request", "flask.url_for", "requests.get", "app.app.errorhandler", "app.app.route", "app.forms.FilesForm" ]
[((242, 281), 'app.app.route', 'app.route', (['"""/url-api"""'], {'methods': "['POST']"}), "('/url-api', methods=['POST'])\n", (251, 281), False, 'from app import app\n'), ((863, 913), 'app.app.route', 'app.route', (['"""/multilabel-url-api"""'], {'methods': "['POST']"}), "('/multilabel-url-api', methods=['POST'])\n", ...
""" orbit.py "Frankly, a very limited and highly specific implementation of an Orbit class. If used for applications other than the original usecase, this class will either need to be bypassed or heavily expanded upon." @author: <NAME> (https://github.com/Hans-Bananendans/) """ from numpy import log class O...
[ "numpy.log" ]
[((1541, 1552), 'numpy.log', 'log', (['self.h'], {}), '(self.h)\n', (1544, 1552), False, 'from numpy import log\n')]
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ "tensorflow.compat.v1.logging.warn", "tensorflow.compat.v1.disable_v2_behavior", "functools.wraps", "tensorflow.__version__.startswith" ]
[((1743, 1762), 'functools.wraps', 'functools.wraps', (['fn'], {}), '(fn)\n', (1758, 1762), False, 'import functools\n'), ((2058, 2077), 'functools.wraps', 'functools.wraps', (['fn'], {}), '(fn)\n', (2073, 2077), False, 'import functools\n'), ((2383, 2402), 'functools.wraps', 'functools.wraps', (['fn'], {}), '(fn)\n', ...
import importlib as _importlib import six as _six from flytekit.common.exceptions import scopes as _exception_scopes from flytekit.common.exceptions import user as _user_exceptions from flytekit.configuration import sdk as _sdk_config from flytekit.models import literals as _literal_models class _TypeEngineLoader(o...
[ "flytekit.type_engines.default.flyte.FlyteDefaultTypeEngine", "flytekit.common.exceptions.scopes.user_entry_point", "flytekit.configuration.sdk.TYPE_ENGINES.get", "flytekit.common.exceptions.user.FlyteValueException", "six.iteritems" ]
[((2084, 2179), 'flytekit.common.exceptions.user.FlyteValueException', '_user_exceptions.FlyteValueException', (['t', '"""Could not resolve to an SDK type for this value."""'], {}), "(t,\n 'Could not resolve to an SDK type for this value.')\n", (2120, 2179), True, 'from flytekit.common.exceptions import user as _use...
from django.test import TestCase # Create your tests here. from gigs.models import Venue, Event from gigs.views import LookupView from factory.fuzzy import BaseFuzzyAttribute from django.contrib.gis.geos import Point from django.utils import timezone from django.test import RequestFactory from django.urls import revers...
[ "django.test.RequestFactory", "gigs.models.Event.objects.all", "random.uniform", "django.utils.timezone.now", "gigs.views.LookupView.as_view", "django.urls.reverse", "gigs.models.Venue.objects.all" ]
[((1032, 1046), 'django.utils.timezone.now', 'timezone.now', ([], {}), '()\n', (1044, 1046), False, 'from django.utils import timezone\n'), ((1226, 1245), 'gigs.models.Venue.objects.all', 'Venue.objects.all', ([], {}), '()\n', (1243, 1245), False, 'from gigs.models import Venue, Event\n'), ((1799, 1818), 'gigs.models.E...
from tkinter import Frame,Label,Button,Checkbutton,Scale,StringVar,IntVar,Entry,Tk import serial import time import threading import pandas as pd import mysql.connector class MainFrame(Frame): cad = str() def __init__(self, master=None): super().__init__(master, width=420, height=270)...
[ "tkinter.IntVar", "tkinter.Entry", "time.sleep", "tkinter.Button", "tkinter.StringVar", "tkinter.Tk", "serial.Serial", "tkinter.Label", "threading.Thread" ]
[((4143, 4147), 'tkinter.Tk', 'Tk', ([], {}), '()\n', (4145, 4147), False, 'from tkinter import Frame, Label, Button, Checkbutton, Scale, StringVar, IntVar, Entry, Tk\n'), ((485, 543), 'threading.Thread', 'threading.Thread', ([], {'target': 'self.getSensorValues', 'daemon': '(True)'}), '(target=self.getSensorValues, da...
""" Multivariate from independent marginals and copula ================================================== """ #%% md # # - How to define α bivariate distribution from independent marginals and change its structure based on a copula supported by UQpy # - How to plot the pdf of the distribution # - How to modify the p...
[ "UQpy.distributions.JointCopula", "UQpy.distributions.JointIndependent", "UQpy.distributions.Normal", "UQpy.distributions.Gumbel", "numpy.meshgrid", "matplotlib.pyplot.subplots", "numpy.arange", "matplotlib.pyplot.show" ]
[((1055, 1072), 'UQpy.distributions.Gumbel', 'Gumbel', ([], {'theta': '(3.0)'}), '(theta=3.0)\n', (1061, 1072), False, 'from UQpy.distributions import Gumbel, JointCopula\n'), ((1143, 1170), 'UQpy.distributions.JointIndependent', 'JointIndependent', (['marginals'], {}), '(marginals)\n', (1159, 1170), False, 'from UQpy....
import logging from dd.bdd import BDD as _BDD from dd.bdd import preimage from dd import autoref from dd import bdd as _bdd import nose.tools as nt import networkx as nx import networkx.algorithms.isomorphism as iso class BDD(_BDD): """Disables refcount check upon shutdown. This script tests the low-level ma...
[ "logging.getLogger", "logging.StreamHandler", "networkx.algorithms.isomorphism.GraphMatcher", "dd.bdd.BDD", "nose.tools.assert_raises", "dd.bdd._request_reordering", "dd.bdd._enumerate_minterms", "dd.bdd._assert_valid_ordering", "dd.bdd._assert_isomorphic_orders", "dd.bdd.image", "dd.bdd.preimag...
[((5305, 5315), 'dd.bdd.BDD', '_bdd.BDD', ([], {}), '()\n', (5313, 5315), True, 'from dd import bdd as _bdd\n'), ((6899, 6935), 'dd.bdd._enumerate_minterms', '_bdd._enumerate_minterms', (['cube', 'bits'], {}), '(cube, bits)\n', (6923, 6935), True, 'from dd import bdd as _bdd\n'), ((7216, 7252), 'dd.bdd._enumerate_minte...
""" Abstract analyser """ from functools import wraps from inspect import getmembers, ismethod from typing import Callable from ..type_hints import AnalyserResults, AnalyserHelper from ..utils import SyntaxTree, BaseViolation, ViolationResult def register_check(error_format: str): """ Registers a new checker...
[ "inspect.getmembers", "functools.wraps" ]
[((454, 473), 'functools.wraps', 'wraps', (['check_method'], {}), '(check_method)\n', (459, 473), False, 'from functools import wraps\n'), ((2502, 2538), 'inspect.getmembers', 'getmembers', (['self'], {'predicate': 'ismethod'}), '(self, predicate=ismethod)\n', (2512, 2538), False, 'from inspect import getmembers, ismet...
from __future__ import absolute_import, division, print_function import numpy as np import tensorflow as tf from IPython.core.debugger import Tracer; debug_here = Tracer(); batch_size = 5 max_it = tf.constant(6) char_mat_1 = [[0.0, 0.0, 0.0, 0.9, 0.0, 0.0], [0.0, 0.0, 0.0, 0.9, 0.0, 0.0], ...
[ "tensorflow.Tensor.get_shape", "IPython.core.debugger.Tracer", "tensorflow.initialize_all_variables", "tensorflow.transpose", "tensorflow.logical_or", "tensorflow.ones", "tensorflow.logical_not", "tensorflow.Session", "numpy.array", "tensorflow.argmax", "tensorflow.constant", "tensorflow.great...
[((164, 172), 'IPython.core.debugger.Tracer', 'Tracer', ([], {}), '()\n', (170, 172), False, 'from IPython.core.debugger import Tracer\n'), ((199, 213), 'tensorflow.constant', 'tf.constant', (['(6)'], {}), '(6)\n', (210, 213), True, 'import tensorflow as tf\n'), ((1507, 1525), 'numpy.array', 'np.array', (['char_lst'], ...
from typing import List, Tuple import seaborn as sns import matplotlib matplotlib.use('TkAgg') from matplotlib import pyplot as plt import pandas as pd import numpy as np """ Plots of tensorboard results with adjusted theming for presentation """ label_dict = {0: 'akiec', 1: 'bcc', 2: 'bkl', 3: 'df', 4: 'mel', 5: 'nv...
[ "matplotlib.use", "seaborn.set_context", "seaborn.heatmap", "numpy.sum", "seaborn.dark_palette", "seaborn.barplot", "matplotlib.pyplot.subplots" ]
[((72, 95), 'matplotlib.use', 'matplotlib.use', (['"""TkAgg"""'], {}), "('TkAgg')\n", (86, 95), False, 'import matplotlib\n'), ((334, 378), 'seaborn.set_context', 'sns.set_context', ([], {'rc': "{'patch.linewidth': 0.0}"}), "(rc={'patch.linewidth': 0.0})\n", (349, 378), True, 'import seaborn as sns\n'), ((1067, 1117), ...
""" A module for a mixture density network layer (_Mixture Desity Networks_ by Bishop, 1994.) """ import sys import torch import torch.tensor as ts import torch.nn as nn import torch.optim as optim from torch.distributions import Categorical import math # Draw distributions import numpy as np import matplotlib.pyplot ...
[ "torch.distributions.Categorical", "torch.max", "torch.sqrt", "torch.exp", "torch.min", "numpy.array", "torch.sum", "torch.mean", "torch.prod", "numpy.linspace", "numpy.meshgrid", "torch.sort", "matplotlib.pyplot.register_cmap", "matplotlib.patches.Ellipse", "matplotlib.colors.LinearSegm...
[((4004, 4027), 'torch.prod', 'torch.prod', (['prob'], {'dim': '(2)'}), '(prob, dim=2)\n', (4014, 4027), False, 'import torch\n'), ((4285, 4307), 'torch.sum', 'torch.sum', (['prob'], {'dim': '(1)'}), '(prob, dim=1)\n', (4294, 4307), False, 'import torch\n'), ((4691, 4706), 'torch.mean', 'torch.mean', (['nll'], {}), '(n...
import io from atws.wrapper import Wrapper from django.core.management import call_command from django.test import TestCase from djautotask.tests import fixtures, mocks, fixture_utils from djautotask import models def sync_summary(class_name, created_count, updated_count=0): return '{} Sync Summary - Created: {},...
[ "djautotask.tests.fixture_utils.init_service_calls", "djautotask.tests.fixture_utils.init_account_types", "djautotask.tests.mocks.service_api_get_use_types_call", "djautotask.tests.fixture_utils.init_use_types", "djautotask.tests.fixture_utils.init_accounts", "djautotask.tests.fixture_utils.init_resource_...
[((761, 774), 'io.StringIO', 'io.StringIO', ([], {}), '()\n', (772, 774), False, 'import io\n'), ((909, 940), 'django.core.management.call_command', 'call_command', (['*args'], {'stdout': 'out'}), '(*args, stdout=out)\n', (921, 940), False, 'from django.core.management import call_command\n'), ((1146, 1159), 'io.String...
#!/usr/bin/evn python # -*- coding:utf-8 -*- # FileName adbtools.py # Author: HeyNiu # Created Time: 2016/9/19 """ adb 工具类 """ import os import platform import re import time #import utils.timetools class AdbTools(object): def __init__(self, device_id=''): self.__system = platform.s...
[ "os.path.exists", "re.compile", "os.path.join", "time.sleep", "platform.system", "os.popen", "re.findall", "os.path.expanduser" ]
[((310, 327), 'platform.system', 'platform.system', ([], {}), '()\n', (325, 327), False, 'import platform\n'), ((2267, 2280), 'os.popen', 'os.popen', (['cmd'], {}), '(cmd)\n', (2275, 2280), False, 'import os\n'), ((2520, 2533), 'os.popen', 'os.popen', (['cmd'], {}), '(cmd)\n', (2528, 2533), False, 'import os\n'), ((323...
# use sys._getframe() -- it returns a frame object, whose attribute # f_code is a code object, whose attribute co_name is the name: import sys this_function_name = sys._getframe().f_code.co_name # the frame and code objects also offer other useful information: this_line_number = sys._getframe().f_lineno this_filename ...
[ "sys._getframe" ]
[((281, 296), 'sys._getframe', 'sys._getframe', ([], {}), '()\n', (294, 296), False, 'import sys\n'), ((164, 179), 'sys._getframe', 'sys._getframe', ([], {}), '()\n', (177, 179), False, 'import sys\n'), ((322, 337), 'sys._getframe', 'sys._getframe', ([], {}), '()\n', (335, 337), False, 'import sys\n'), ((583, 599), 'sy...
from collections import defaultdict from PIL import Image import operator image = Image.open("images\\test.png") pixel_map = image.load() initial_coordinate = tuple(int(x.strip()) for x in input("Initial coordinates: ").split(',')) pixel_list = [] directions = [(1, 0), (0, -1), (1, -1), ...
[ "PIL.Image.new", "PIL.Image.open" ]
[((83, 113), 'PIL.Image.open', 'Image.open', (['"""images\\\\test.png"""'], {}), "('images\\\\test.png')\n", (93, 113), False, 'from PIL import Image\n'), ((857, 900), 'PIL.Image.new', 'Image.new', (['"""RGBA"""', 'image.size', '(0, 0, 0, 0)'], {}), "('RGBA', image.size, (0, 0, 0, 0))\n", (866, 900), False, 'from PIL i...
import logging import os from figcli.config.style.color import Color from figcli.io.input import Input from figcli.svcs.config_manager import ConfigManager from figcli.config.aws import * from figcli.config.constants import * log = logging.getLogger(__name__) class AWSConfig: """ Utility methods for interac...
[ "logging.getLogger", "os.path.exists", "figcli.svcs.config_manager.ConfigManager", "os.path.dirname", "figcli.config.style.color.Color" ]
[((234, 261), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (251, 261), False, 'import logging\n'), ((450, 462), 'figcli.config.style.color.Color', 'Color', (['(False)'], {}), '(False)\n', (455, 462), False, 'from figcli.config.style.color import Color\n'), ((537, 572), 'figcli.svcs.conf...
import itertools as it import os import pathlib from collections.abc import MutableMapping from typing import TYPE_CHECKING, Any, Iterator, Optional, Union import xarray as xr from netCDF4 import Dataset, Group, Variable from eopf.exceptions import StoreNotOpenError from eopf.product.store import EOProductStore from ...
[ "os.path.expanduser", "eopf.product.utils.decode_attrs", "pathlib.Path", "pandas.Timedelta", "netCDF4.Dataset", "eopf.product.utils.reverse_conv", "eopf.product.core.EOVariable", "eopf.product.utils.conv", "xarray.open_dataset", "pandas.to_datetime", "eopf.exceptions.StoreNotOpenError" ]
[((1049, 1072), 'os.path.expanduser', 'os.path.expanduser', (['url'], {}), '(url)\n', (1067, 1072), False, 'import os\n'), ((5806, 5839), 'netCDF4.Dataset', 'Dataset', (['self.url', 'mode'], {}), '(self.url, mode, **kwargs)\n', (5813, 5839), False, 'from netCDF4 import Dataset, Group, Variable\n'), ((7784, 7807), 'os.p...
''' Aqui o programa conterá uma função que permite listar tanto diretórios, como arquivos na forma de árvores, ou seja, seus ramos terão linhas, e também, espaçamentos mostrando a profundidade de cada diretório dado uma pasta raíz. ''' #só pode ser importado: __all__ = ['arvore'] # ********* bibliotecas ...
[ "os.system", "os.listdir" ]
[((1489, 1510), 'os.listdir', 'listdir', ([], {'path': 'caminho'}), '(path=caminho)\n', (1496, 1510), False, 'from os import listdir, chdir, system\n'), ((4922, 4966), 'os.system', 'system', (["('ren %s %s' % (arqBuffer, novo_nome))"], {}), "('ren %s %s' % (arqBuffer, novo_nome))\n", (4928, 4966), False, 'from os impor...
from __future__ import absolute_import from contextlib import contextmanager from multiprocessing import TimeoutError import signal import datetime import os import subprocess import time import urllib import zipfile import shutil import pytest from .adb import ADB from ..logger import Logger def get_center(bounds)...
[ "multiprocessing.TimeoutError", "signal.signal", "shutil.copyfileobj", "zipfile.ZipFile", "urllib.urlretrieve", "pytest.config.getoption", "time.sleep", "datetime.datetime.now", "os.path.basename", "signal.alarm" ]
[((1327, 1350), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (1348, 1350), False, 'import datetime\n'), ((1461, 1484), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (1482, 1484), False, 'import datetime\n'), ((2278, 2310), 'multiprocessing.TimeoutError', 'TimeoutError', (['s...
#!/usr/bin/env python """ mbed SDK Copyright (c) 2011-2015 ARM Limited 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 ...
[ "platform.version", "platform.release", "platform.system", "mbed_lstools.main.mbed_lstools_os_info", "mbed_lstools.main.mbed_os_support", "mbed_lstools.main.create", "unittest.main" ]
[((1776, 1791), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1789, 1791), False, 'import unittest\n'), ((1104, 1126), 'mbed_lstools.main.mbed_lstools_os_info', 'mbed_lstools_os_info', ([], {}), '()\n', (1124, 1126), False, 'from mbed_lstools.main import mbed_lstools_os_info\n'), ((1207, 1224), 'mbed_lstools.mai...
from chess.pieces import Pawn, Knight, Bishop, Rook, Queen, King class TestPiece: def test_sum(self): groups = ((Pawn(), Knight(), Bishop()), (Knight(), Bishop(), Queen()), (Pawn(), Pawn(), Pawn(), Pawn())) actual_sums = tuple(map(sum, groups)) expected...
[ "chess.pieces.Bishop", "chess.pieces.Rook", "chess.pieces.Queen", "chess.pieces.Knight", "chess.pieces.Pawn", "chess.pieces.King" ]
[((515, 523), 'chess.pieces.Knight', 'Knight', ([], {}), '()\n', (521, 523), False, 'from chess.pieces import Pawn, Knight, Bishop, Rook, Queen, King\n'), ((527, 535), 'chess.pieces.Knight', 'Knight', ([], {}), '()\n', (533, 535), False, 'from chess.pieces import Pawn, Knight, Bishop, Rook, Queen, King\n'), ((551, 559)...
# Purpose: Standard definitions # Created: 08.07.2015 # Copyright (c) 2015-2020, <NAME> # License: MIT License # pattern type: predefined (1) from ezdxf.math import Vec2 PATTERN_NEW = { "ANSI31": [[45.0, (0.0, 0.0), (-2.2627, 2.2627), []]], "ANSI32": [ [45.0, (0.0, 0.0), (-6.7882, 6.7882), []], ...
[ "ezdxf.math.Vec2" ]
[((19347, 19363), 'ezdxf.math.Vec2', 'Vec2', (['base_point'], {}), '(base_point)\n', (19351, 19363), False, 'from ezdxf.math import Vec2\n'), ((19403, 19415), 'ezdxf.math.Vec2', 'Vec2', (['offset'], {}), '(offset)\n', (19407, 19415), False, 'from ezdxf.math import Vec2\n')]
#!/usr/bin/env python3.3 import requests def grab_website_data(): '''Get raw data as HTML string from the NOAA website.''' url = 'http://www.nws.noaa.gov/mdl/gfslamp/docs/stations_info.shtml' page = requests.get(url) return page.text def extract_section(text): '''Find Illinois data segment (in a P...
[ "requests.get" ]
[((212, 229), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (224, 229), False, 'import requests\n')]
import datetime import os from dataclasses import dataclass, field from operator import attrgetter from typing import List, Dict, Optional, cast, Set from tarpn.ax25 import AX25Call from tarpn.netrom import NetRomPacket, NetRomNodes, NodeDestination from tarpn.network import L3RoutingTable, L3Address import tarpn.net...
[ "operator.attrgetter", "os.path.exists", "tarpn.netrom.NetRomNodes", "tarpn.netrom.NodeDestination", "tarpn.util.json_dump", "typing.cast", "datetime.datetime.now", "tarpn.ax25.AX25Call.parse", "datetime.datetime.fromisoformat", "tarpn.ax25.AX25Call", "tarpn.util.json_load", "dataclasses.field...
[((1665, 1719), 'dataclasses.field', 'field', ([], {'default_factory': 'dict', 'compare': '(False)', 'hash': '(False)'}), '(default_factory=dict, compare=False, hash=False)\n', (1670, 1719), False, 'from dataclasses import dataclass, field\n'), ((2635, 2679), 'dataclasses.field', 'field', ([], {'default_factory': 'date...
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.humidifiers_and_dehumidifiers import HumidifierSteamGas log = logging.getLogger(__name__) class TestHumidifierSteamGas(unittest.TestCase): def setUp(self): self.fd,...
[ "logging.getLogger", "pyidf.humidifiers_and_dehumidifiers.HumidifierSteamGas", "pyidf.idf.IDF", "tempfile.mkstemp", "os.remove" ]
[((204, 231), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (221, 231), False, 'import logging\n'), ((333, 351), 'tempfile.mkstemp', 'tempfile.mkstemp', ([], {}), '()\n', (349, 351), False, 'import tempfile\n'), ((385, 405), 'os.remove', 'os.remove', (['self.path'], {}), '(self.path)\n',...
""" This example shows how to interact with the Determined PyTorch Lightning Adapter interface to build a basic MNIST network. LightningAdapter utilizes the provided LightningModule with Determined's PyTorch control loop. """ from determined.pytorch import PyTorchTrialContext, DataLoader from determined.pytorch.lightn...
[ "determined.pytorch.DataLoader" ]
[((1155, 1231), 'determined.pytorch.DataLoader', 'DataLoader', (['dl.dataset'], {'batch_size': 'dl.batch_size', 'num_workers': 'dl.num_workers'}), '(dl.dataset, batch_size=dl.batch_size, num_workers=dl.num_workers)\n', (1165, 1231), False, 'from determined.pytorch import PyTorchTrialContext, DataLoader\n'), ((1368, 144...
# graph from datetime import date import numpy as np from bokeh.client import push_session from bokeh.io import output_server, show, vform from bokeh.palettes import RdYlBu3 from bokeh.plotting import figure, curdoc, vplot, output_server from bokeh.models import ColumnDataSource from bokeh.models.widgets im...
[ "bokeh.models.widgets.DateFormatter", "bokeh.plotting.figure", "bokeh.models.widgets.DataTable", "bokeh.models.ColumnDataSource", "bokeh.models.widgets.TableColumn", "bokeh.io.vform", "datetime.date", "bokeh.plotting.curdoc", "random.randint" ]
[((444, 486), 'bokeh.plotting.figure', 'figure', ([], {'x_range': '(0, 100)', 'y_range': '(0, 100)'}), '(x_range=(0, 100), y_range=(0, 100))\n', (450, 486), False, 'from bokeh.plotting import figure, curdoc, vplot, output_server\n'), ((976, 998), 'bokeh.models.ColumnDataSource', 'ColumnDataSource', (['data'], {}), '(da...
from unittest import TestCase from decimal import Decimal, ROUND_UP from monon.currency import DefaultCurrenciesProvider class DefaultCurrenciesProviderTestCase(TestCase): def setUp(self): self.provider = DefaultCurrenciesProvider() self.isocode = 'USD' def test_decimal_places(self): ...
[ "monon.currency.DefaultCurrenciesProvider", "decimal.Decimal" ]
[((221, 248), 'monon.currency.DefaultCurrenciesProvider', 'DefaultCurrenciesProvider', ([], {}), '()\n', (246, 248), False, 'from monon.currency import DefaultCurrenciesProvider\n'), ((661, 681), 'decimal.Decimal', 'Decimal', (['"""43321.123"""'], {}), "('43321.123')\n", (668, 681), False, 'from decimal import Decimal,...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: <NAME> (1459333) """ from os import path from . import model as md from tensorflow import keras class Exporter: def __init__(self, verbosity = False): self.verbosity = verbosity def load(self, base_dir = 'storage/models/'...
[ "os.path.exists", "tensorflow.keras.models.load_model" ]
[((414, 437), 'os.path.exists', 'path.exists', (['model_path'], {}), '(model_path)\n', (425, 437), False, 'from os import path\n'), ((585, 620), 'tensorflow.keras.models.load_model', 'keras.models.load_model', (['model_path'], {}), '(model_path)\n', (608, 620), False, 'from tensorflow import keras\n')]
#!/usr/bin/env python # encoding: utf-8 import os import re import sys import argparse import glob import logging from numpy import nan as NaN import pandas as pd import shutil import zipfile def get_arguments(): parser = argparse.ArgumentParser( formatter_class=argparse.RawDescriptionHelpFormatter, ...
[ "logging.basicConfig", "os.path.exists", "argparse.ArgumentParser", "pandas.read_csv", "zipfile.ZipFile", "os.path.join", "shutil.rmtree", "os.path.basename", "os.mkdir", "sys.exit", "re.findall", "pandas.read_fwf", "glob.glob" ]
[((230, 458), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'formatter_class': 'argparse.RawDescriptionHelpFormatter', 'description': '""""""', 'epilog': '"""\n Convert behavioural data from cimaq to bids format\n Input: Folder with zip files\n """'}), '(formatter_class=argparse.\n ...
import numpy as np import pytest from opytimizer.math import hypercomplex def test_norm(): array = np.array([[1, 1]]) norm_array = hypercomplex.norm(array) assert norm_array > 0 def test_span(): array = np.array([[0.5, 0.75, 0.5, 0.9]]) lb = [0] ub = [10] span_array = hypercomplex....
[ "numpy.array", "opytimizer.math.hypercomplex.span", "opytimizer.math.hypercomplex.norm" ]
[((106, 124), 'numpy.array', 'np.array', (['[[1, 1]]'], {}), '([[1, 1]])\n', (114, 124), True, 'import numpy as np\n'), ((143, 167), 'opytimizer.math.hypercomplex.norm', 'hypercomplex.norm', (['array'], {}), '(array)\n', (160, 167), False, 'from opytimizer.math import hypercomplex\n'), ((226, 259), 'numpy.array', 'np.a...
import datetime from django.core.validators import MaxValueValidator, MinValueValidator from django.db import models class Collection(models.Model): ''' A collection of cards. ''' name = models.CharField(max_length=250) class Card(models.Model): first_name = models.CharField(max_length=150) ...
[ "django.core.validators.MinValueValidator", "django.db.models.ManyToManyField", "datetime.datetime.now", "django.db.models.DecimalField", "django.db.models.CharField" ]
[((206, 238), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(250)'}), '(max_length=250)\n', (222, 238), False, 'from django.db import models\n'), ((284, 316), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(150)'}), '(max_length=150)\n', (300, 316), False, 'from django.d...
import torch from scipy.sparse.linalg import LinearOperator, cg from typing import Callable, Optional from torch import Tensor import numpy as np import time class CG(torch.autograd.Function): @staticmethod def forward(ctx, z: Tensor, AcquisitionModel, beta: Tensor, y, G: Callable, GH: Callable, GHG: Optional[...
[ "numpy.prod", "scipy.sparse.linalg.cg", "time.time", "torch.from_numpy" ]
[((1002, 1028), 'scipy.sparse.linalg.cg', 'cg', (['H', 'b'], {'tol': '(0.001)', 'x0': 'x0'}), '(H, b, tol=0.001, x0=x0)\n', (1004, 1028), False, 'from scipy.sparse.linalg import LinearOperator, cg\n'), ((1149, 1173), 'torch.from_numpy', 'torch.from_numpy', (['xprime'], {}), '(xprime)\n', (1165, 1173), False, 'import to...
#! /usr/bin/env python # Copyright (c) 2018 - 2019 <NAME> <<EMAIL>> # # 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 appl...
[ "pythutils.fileutils.get_ext", "pythutils.mathutils.sort_points", "numpy.sqrt", "cv2.getPerspectiveTransform", "cv2.VideoWriter", "os.path.isfile", "numpy.array", "cv2.warpPerspective", "numpy.zeros", "os.path.dirname", "cv2.VideoCapture", "cv2.VideoWriter_fourcc", "os.path.isdir", "cv2.re...
[((2904, 2919), 'pythutils.fileutils.get_ext', 'get_ext', (['filein'], {}), '(filein)\n', (2911, 2919), False, 'from pythutils.fileutils import get_ext\n'), ((3084, 3115), 'cv2.VideoWriter_fourcc', 'cv2.VideoWriter_fourcc', (["*'mp4v'"], {}), "(*'mp4v')\n", (3106, 3115), False, 'import cv2\n'), ((3129, 3175), 'cv2.Vide...
import boto3 import subprocess successes = 0 # Dummy AWS Handler to kick off high level processes def lambda_handler(source_region, destination_region, credentials): session = boto3.Session() # Load Records into KINESIS CLIENT_NAME = 'kinesis' kinesis = session.client(CLIENT_NAME, region_name=source...
[ "boto3.Session", "subprocess.call" ]
[((183, 198), 'boto3.Session', 'boto3.Session', ([], {}), '()\n', (196, 198), False, 'import boto3\n'), ((3807, 3839), 'subprocess.call', 'subprocess.call', (['cmd'], {'shell': '(True)'}), '(cmd, shell=True)\n', (3822, 3839), False, 'import subprocess\n')]
# -*- coding: utf-8 -*- import os import sys reload(sys).setdefaultencoding("UTF-8") from setuptools import setup, find_packages from distutils.core import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() version = '0.2' setup( name='django-rules', version=versio...
[ "os.path.dirname", "setuptools.find_packages" ]
[((1001, 1016), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (1014, 1016), False, 'from setuptools import setup, find_packages\n'), ((210, 235), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (225, 235), False, 'import os\n')]
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
[ "logging.getLogger", "demo.utils.get_warmup_and_linear_decay", "paddle.optimizer.AdamW", "paddle.static.default_main_program", "paddle.fluid.contrib.mixed_precision.decorate", "paddle.nn.ClipGradByGlobalNorm" ]
[((963, 990), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (980, 990), False, 'import logging\n'), ((1666, 1696), 'paddle.nn.ClipGradByGlobalNorm', 'P.nn.ClipGradByGlobalNorm', (['(1.0)'], {}), '(1.0)\n', (1691, 1696), True, 'import paddle as P\n'), ((1852, 1995), 'paddle.optimizer.Adam...
#!/usr/bin/env python3 # # Fix ToUnicode CMap in PDF # https://github.com/trueroad/pdf-fix-tuc # # build_bfrange2.py: # Build bfrange2 PDF. # # Copyright (C) 2021 <NAME>. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the foll...
[ "sys.stdout.buffer.write", "re.compile" ]
[((1535, 1579), 're.compile', 're.compile', (['"""(\\\\d+)\\\\s+beginbfrange\\\\r?\\\\n?"""'], {}), "('(\\\\d+)\\\\s+beginbfrange\\\\r?\\\\n?')\n", (1545, 1579), False, 'import re\n'), ((1714, 1743), 'sys.stdout.buffer.write', 'sys.stdout.buffer.write', (['line'], {}), '(line)\n', (1737, 1743), False, 'import sys\n')]
from typing import List, Union from fedot.core.data.data import data_has_categorical_features, InputData from fedot.core.data.multi_modal import MultiModalData from fedot.core.pipelines.node import PrimaryNode, SecondaryNode, Node from fedot.core.pipelines.pipeline import Pipeline from fedot.core.repository.tasks impo...
[ "fedot.core.data.data.data_has_categorical_features", "fedot.core.pipelines.pipeline.Pipeline", "fedot.core.pipelines.node.PrimaryNode", "fedot.core.pipelines.node.SecondaryNode" ]
[((625, 660), 'fedot.core.data.data.data_has_categorical_features', 'data_has_categorical_features', (['data'], {}), '(data)\n', (654, 660), False, 'from fedot.core.data.data import data_has_categorical_features, InputData\n'), ((1036, 1056), 'fedot.core.pipelines.pipeline.Pipeline', 'Pipeline', (['node_final'], {}), '...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ File: ParkingLot.py Author: <NAME>(Scott) Email: <EMAIL> Copyright: Copyright (c) 2021, Skybility Software Co.,Ltd. All rights reserved. Description: """ from datetime import datetime from TException import SpotOccupiedError, NoSuitableSpotsError from Ticket import Ti...
[ "datetime.datetime.now", "Ticket.Ticket", "Utils.CalculateTime", "TException.NoSuitableSpotsError" ]
[((1028, 1050), 'Ticket.Ticket', 'Ticket', (['spots', 'vehicle'], {}), '(spots, vehicle)\n', (1034, 1050), False, 'from Ticket import Ticket\n'), ((1300, 1354), 'TException.NoSuitableSpotsError', 'NoSuitableSpotsError', (['"""can not find spots for vehicle"""'], {}), "('can not find spots for vehicle')\n", (1320, 1354)...
import kaldi_io import numpy as np import os def get_parser(): import argparse parser = argparse.ArgumentParser() parser.add_argument("w2v_dir", help="wav2vec feature and text directory") parser.add_argument("tar_root", help="output data directory in kaldi's format") parser.add_argument(...
[ "os.makedirs", "argparse.ArgumentParser", "os.path.join", "kaldi_io.open_or_fd", "numpy.cumsum", "kaldi_io.write_mat" ]
[((105, 130), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (128, 130), False, 'import argparse\n'), ((552, 591), 'os.path.join', 'os.path.join', (['args.tar_root', 'args.split'], {}), '(args.tar_root, args.split)\n', (564, 591), False, 'import os\n'), ((597, 632), 'os.makedirs', 'os.makedirs'...
from datetime import date from uuid import UUID import pytest from app.domain.models.Arkivuttrekk import Arkivuttrekk, ArkivuttrekkStatus, ArkivuttrekkType from app.domain.models.Depotinstitusjoner import DepotinstitusjonerEnum from app.routers.dto.Arkivuttrekk import ArkivuttrekkCreate as Arkivuttrekk_dto @pytest....
[ "uuid.UUID", "datetime.date.fromisoformat", "app.domain.models.Depotinstitusjoner.DepotinstitusjonerEnum" ]
[((430, 474), 'uuid.UUID', 'UUID', (['"""df53d1d8-39bf-4fea-a741-58d472664ce2"""'], {}), "('df53d1d8-39bf-4fea-a741-58d472664ce2')\n", (434, 474), False, 'from uuid import UUID\n'), ((828, 860), 'datetime.date.fromisoformat', 'date.fromisoformat', (['"""1864-04-10"""'], {}), "('1864-04-10')\n", (846, 860), False, 'from...
from modern_jokes import modern_jokes from soviet_jokes import soviet_jokes import random import argparse def soviet_joke(): return random.choice(soviet_jokes) def modern_joke(): return random.choice(modern_jokes) def random_joke(): return random.choice(soviet_jokes + modern_jokes) # TODO: Auto-gene...
[ "random.choice", "argparse.ArgumentParser" ]
[((138, 165), 'random.choice', 'random.choice', (['soviet_jokes'], {}), '(soviet_jokes)\n', (151, 165), False, 'import random\n'), ((198, 225), 'random.choice', 'random.choice', (['modern_jokes'], {}), '(modern_jokes)\n', (211, 225), False, 'import random\n'), ((258, 300), 'random.choice', 'random.choice', (['(soviet_j...
#!/opt/tljh/user/bin/python import cgitb; cgitb.enable() # pour débogage import os entete_http = "Content-type: text/html; charset=utf-8\n" # gabarit html ... deux zones d'insertions html_tpl = """ <!DOCTYPE html> <head> <title>cookie</title> </head> <body> <a href="/">retour...</a> <h2>{message}</h2> ...
[ "cgitb.enable" ]
[((43, 57), 'cgitb.enable', 'cgitb.enable', ([], {}), '()\n', (55, 57), False, 'import cgitb\n')]
import attr from attr import attrib, s from typing import Tuple, List, Optional, Callable, Mapping, Union, Set from collections import defaultdict from ..tensor import Operator @attr.s(auto_attribs=True) class GOp: cost : float size : Tuple[int] alias : Tuple[int] args : Tuple['GTensor'] result ...
[ "attr.attrib", "attr.s", "collections.defaultdict" ]
[((180, 205), 'attr.s', 'attr.s', ([], {'auto_attribs': '(True)'}), '(auto_attribs=True)\n', (186, 205), False, 'import attr\n'), ((1632, 1657), 'attr.s', 'attr.s', ([], {'auto_attribs': '(True)'}), '(auto_attribs=True)\n', (1638, 1657), False, 'import attr\n'), ((1998, 2023), 'attr.s', 'attr.s', ([], {'auto_attribs': ...
from __future__ import annotations from typing import Generic, TypeVar, Optional, Any, Dict from collections.abc import Mapping from ..base_schema import Schema, SchemaAnything from .DOMElement import DOMElement from .DOMObject import DOMObject from . import DOMInfo from .DOMProperties import DOMProperties T_co = T...
[ "typing.TypeVar" ]
[((319, 334), 'typing.TypeVar', 'TypeVar', (['"""T_co"""'], {}), "('T_co')\n", (326, 334), False, 'from typing import Generic, TypeVar, Optional, Any, Dict\n')]
import dataclasses import typing from dataclasses import dataclass from typing import List from typing import Optional from profiles.settings import DENOM_DKEY, VALUE_DKEY, GEOG_DKEY, TIME_DKEY if typing.TYPE_CHECKING: from indicators.models import CensusVariable, CKANVariable @dataclass class Datum: variab...
[ "dataclasses.replace" ]
[((2238, 2312), 'dataclasses.replace', 'dataclasses.replace', (['self'], {'denom': 'denom_val', 'percent': '(self.value / denom_val)'}), '(self, denom=denom_val, percent=self.value / denom_val)\n', (2257, 2312), False, 'import dataclasses\n')]
import os import re import logging import sqlite3 import json import threading from picaapi import PicaApi from urllib import parse from multiprocessing.pool import ThreadPool class PicaAction: def __init__(self, account, password, proxies=None, threadn=5, data_path=os.path.join(...
[ "os.path.exists", "json.loads", "sqlite3.connect", "os.makedirs", "json.dumps", "os.path.join", "os.path.split", "multiprocessing.pool.ThreadPool", "urllib.parse.urljoin", "picaapi.PicaApi", "re.sub", "logging.info" ]
[((610, 645), 'logging.info', 'logging.info', (['"""PicaAction启动中......"""'], {}), "('PicaAction启动中......')\n", (622, 645), False, 'import logging\n'), ((669, 761), 'picaapi.PicaApi', 'PicaApi', ([], {'proxies': 'proxies', 'global_url': 'global_url', 'api_key': 'api_key', 'secret_key': 'secret_key'}), '(proxies=proxies...
'''HAllA setup To install: python setup.py install ''' import sys try: import setuptools from setuptools.command.install import install except ImportError: sys.exit('Please install setuptools.') VERSION = '0.8.20' AUTHOR = 'HAllA Development Team' MAINTAINER_EMAIL = '<EMAIL>' class PostInstallCommand(...
[ "setuptools.command.install.install.run", "setuptools.find_packages", "rpy2.robjects.packages.importr", "sys.exit" ]
[((171, 209), 'sys.exit', 'sys.exit', (['"""Please install setuptools."""'], {}), "('Please install setuptools.')\n", (179, 209), False, 'import sys\n'), ((407, 424), 'setuptools.command.install.install.run', 'install.run', (['self'], {}), '(self)\n', (418, 424), False, 'from setuptools.command.install import install\n...
""" Plot an all-sky average proper motion map, using statistics downloaded from the Gaia archive with a query similar to the following: select gaia_healpix_index(5, source_id) as healpix_5, avg(pmra) as avg_pmra, avg(pmdec) as avg_pmdec from gaiaedr3.gaia_source where parallax_over_error>=10 and parallax*paralla...
[ "numpy.median", "numpy.sqrt", "matplotlib.pyplot.savefig", "argparse.ArgumentParser", "matplotlib.pyplot.show", "numpy.fliplr", "cartopy.crs.Mollweide", "matplotlib.pyplot.imread", "cartopy.crs.PlateCarree", "matplotlib.patches.ArrowStyle.Fancy", "matplotlib.pyplot.figure", "matplotlib.gridspe...
[((1082, 1100), 'cartopy.crs.PlateCarree', 'ccrs.PlateCarree', ([], {}), '()\n', (1098, 1100), True, 'import cartopy.crs as ccrs\n'), ((1116, 1132), 'cartopy.crs.Mollweide', 'ccrs.Mollweide', ([], {}), '()\n', (1130, 1132), True, 'import cartopy.crs as ccrs\n'), ((1147, 1217), 'matplotlib.pyplot.imread', 'plt.imread', ...
# python3 import sys def compute_min_refills(distance, tank, stops): # write your code here if distance <= tank: return 0 else: stops.append(distance) n_stops = len(stops) - 1 count = 0 refill = tank for i in range(n_stops): if refill < stops[i...
[ "sys.stdin.read" ]
[((566, 582), 'sys.stdin.read', 'sys.stdin.read', ([], {}), '()\n', (580, 582), False, 'import sys\n')]
import xlwt if __name__ == '__main__': workbook = xlwt.Workbook(encoding='utf-8') # 创建workbook 对象 worksheet = workbook.add_sheet('sheet1') # 创建工作表sheet # 往表中写内容,第一各参数 行,第二个参数列,第三个参数内容 worksheet.write(0, 0, 'hello world') worksheet.write(0, 1, '你好') workbook.save('first.xls') # 保存表为students.x...
[ "xlwt.Workbook" ]
[((55, 86), 'xlwt.Workbook', 'xlwt.Workbook', ([], {'encoding': '"""utf-8"""'}), "(encoding='utf-8')\n", (68, 86), False, 'import xlwt\n')]
# Generated by Django 2.0.7 on 2018-07-19 14:38 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('kiestze', '0003_gemeente'), ] operations = [ migrations.RemoveField( model_name='gemeente', ...
[ "django.db.models.ForeignKey", "django.db.migrations.RemoveField", "django.db.models.IntegerField" ]
[((258, 314), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""gemeente"""', 'name': '"""id"""'}), "(model_name='gemeente', name='id')\n", (280, 314), False, 'from django.db import migrations, models\n'), ((459, 513), 'django.db.models.IntegerField', 'models.IntegerField', ([], {'pr...
import random from Card import Card suits = ('Hearts', 'Diamonds', 'Spades', 'Clubs') ranks = ('Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten', 'Jack', 'Queen', 'King', 'Ace') class Deck: def __init__(self): # Note this only happens once upon creation of a new Deck ...
[ "Card.Card", "random.shuffle" ]
[((614, 644), 'random.shuffle', 'random.shuffle', (['self.all_cards'], {}), '(self.all_cards)\n', (628, 644), False, 'import random\n'), ((516, 532), 'Card.Card', 'Card', (['suit', 'rank'], {}), '(suit, rank)\n', (520, 532), False, 'from Card import Card\n')]
# -*- coding: utf-8 -*- """ users.py ~~~~~~~~~~~ user manage :copyright: (c) 2015 by <NAME>. :license: Apache, see LICENSE for more details. """ import hashlib from datetime import datetime from werkzeug import generate_password_hash, check_password_hash, \ cached_property from flask.ext.sql...
[ "werkzeug.check_password_hash", "flask.ext.principal.Permission", "flask.ext.principal.UserNeed", "flask.ext.principal.RoleNeed", "Smaug.extensions.db.String", "werkzeug.generate_password_hash", "Smaug.extensions.db.or_", "Smaug.extensions.db.Unicode", "Smaug.extensions.db.Column" ]
[((1763, 1802), 'Smaug.extensions.db.Column', 'db.Column', (['db.Integer'], {'primary_key': '(True)'}), '(db.Integer, primary_key=True)\n', (1772, 1802), False, 'from Smaug.extensions import db\n'), ((1953, 1990), 'Smaug.extensions.db.Column', 'db.Column', (['db.Integer'], {'default': 'MEMBER'}), '(db.Integer, default=...
import os from libdotfiles.util import ( HOME_DIR, PKG_DIR, REPO_ROOT_DIR, create_symlink, run, ) create_symlink( PKG_DIR / "launcher.json", HOME_DIR / ".config" / "launcher.json" ) os.chdir(REPO_ROOT_DIR / "opt" / "launcher") run( ["python3", "-m", "pip", "install", "--user", "--upgrade"...
[ "os.chdir", "libdotfiles.util.create_symlink", "libdotfiles.util.run" ]
[((120, 205), 'libdotfiles.util.create_symlink', 'create_symlink', (["(PKG_DIR / 'launcher.json')", "(HOME_DIR / '.config' / 'launcher.json')"], {}), "(PKG_DIR / 'launcher.json', HOME_DIR / '.config' /\n 'launcher.json')\n", (134, 205), False, 'from libdotfiles.util import HOME_DIR, PKG_DIR, REPO_ROOT_DIR, create_sy...
""" Test for OWL 2 RL/RDF rules from Table 8. The Semantics of Datatypes https://www.w3.org/TR/owl2-profiles/#Reasoning_in_OWL_2_RL_and_RDF_Graphs_using_Rules NOTE: The following axioms are skipped on purpose - dt-eq - dt-diff """ from rdflib import Graph, Literal, Namespace, RDF, XSD, RDFS import owlrl DAML...
[ "rdflib.Namespace", "rdflib.Graph", "owlrl.DeductiveClosure", "rdflib.Literal" ]
[((323, 381), 'rdflib.Namespace', 'Namespace', (['"""http://www.daml.org/2002/03/agents/agent-ont#"""'], {}), "('http://www.daml.org/2002/03/agents/agent-ont#')\n", (332, 381), False, 'from rdflib import Graph, Literal, Namespace, RDF, XSD, RDFS\n'), ((386, 415), 'rdflib.Namespace', 'Namespace', (['"""http://test.org/"...
# pylint: disable=import-error, wrong-import-position, wrong-import-order, invalid-name """Test model provider interface""" from common import * from trustyai.model import Model, feature def foo(): return "works!" def test_basic_model(): """Test basic model""" def test_model(inputs): outputs ...
[ "trustyai.model.feature", "trustyai.model.feature.value.as_number", "trustyai.model.Model" ]
[((496, 513), 'trustyai.model.Model', 'Model', (['test_model'], {}), '(test_model)\n', (501, 513), False, 'from trustyai.model import Model, feature\n'), ((540, 596), 'trustyai.model.feature', 'feature', ([], {'name': 'f"""f-num{i}"""', 'value': '(i * 2.0)', 'dtype': '"""number"""'}), "(name=f'f-num{i}', value=i * 2.0,...
#!/usr/bin/env python from __future__ import print_function from sklearn.feature_extraction import FeatureHasher from sklearn.ensemble import RandomForestClassifier from sklearn.pipeline import make_pipeline from sklearn.metrics import log_loss import ctr learner = RandomForestClassifier(verbose = False, n_jobs = -1...
[ "ctr.data", "sklearn.ensemble.RandomForestClassifier" ]
[((269, 317), 'sklearn.ensemble.RandomForestClassifier', 'RandomForestClassifier', ([], {'verbose': '(False)', 'n_jobs': '(-1)'}), '(verbose=False, n_jobs=-1)\n', (291, 317), False, 'from sklearn.ensemble import RandomForestClassifier\n'), ((337, 369), 'ctr.data', 'ctr.data', (['ctr.train'], {'batchsize': '(1)'}), '(ct...
"""Add Review Table Revision ID: <PASSWORD> Revises: Create Date: 2019-08-07 13:09:49.691184 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '<PASSWORD>' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto gener...
[ "sqlalchemy.ForeignKeyConstraint", "alembic.op.create_foreign_key", "sqlalchemy.DateTime", "alembic.op.drop_constraint", "alembic.op.drop_table", "sqlalchemy.Text", "sqlalchemy.PrimaryKeyConstraint", "sqlalchemy.Integer" ]
[((1266, 1365), 'alembic.op.create_foreign_key', 'op.create_foreign_key', (['None', '"""submission"""', '"""assignment_group"""', "['assignment_group_id']", "['id']"], {}), "(None, 'submission', 'assignment_group', [\n 'assignment_group_id'], ['id'])\n", (1287, 1365), False, 'from alembic import op\n'), ((1485, 1543...
#!/usr/bin/env python # Copyright (c) 2019, The Personal Robotics Lab, The MuSHR Team, The Contributors of MuSHR # License: BSD 3-Clause. See LICENSE.md file in root directory. from threading import Lock import numpy as np import rospy from std_msgs.msg import Float64 from vesc_msgs.msg import VescStateStamped # Tu...
[ "numpy.random.normal", "numpy.tan", "threading.Lock", "numpy.cos", "numpy.sin", "rospy.Subscriber" ]
[((3544, 3617), 'rospy.Subscriber', 'rospy.Subscriber', (['servo_state_topic', 'Float64', 'self.servo_cb'], {'queue_size': '(1)'}), '(servo_state_topic, Float64, self.servo_cb, queue_size=1)\n', (3560, 3617), False, 'import rospy\n'), ((3711, 3798), 'rospy.Subscriber', 'rospy.Subscriber', (['motor_state_topic', 'VescSt...
from collections import defaultdict from heapq import heappop, heappush class Region(object): def __init__(self, y, x, gi, el, t): self.y = y self.x = x self.gi = gi self.el = el self.t = t def pos(self): return (self.y, self.x) tools = { '.': set(['c', '...
[ "heapq.heappop", "heapq.heappush", "collections.defaultdict" ]
[((588, 607), 'collections.defaultdict', 'defaultdict', (['Region'], {}), '(Region)\n', (599, 607), False, 'from collections import defaultdict\n'), ((1322, 1332), 'heapq.heappop', 'heappop', (['q'], {}), '(q)\n', (1329, 1332), False, 'from heapq import heappop, heappush\n'), ((1699, 1750), 'heapq.heappush', 'heappush'...
#!/usr/bin/python # -*-coding: utf-8 -*- # https://github.com/frictionlessdata/tableschema-py/tree/1d9750248de06a075029c1278404c5db5311fbc5/tableschema/types # type and format # Support types and formats: # string # email # uri # uuid # ipv4 # ipv6 # hostname # datetime # number # integer # boolean # i...
[ "datetime.datetime.strptime", "re.match", "rfc3986.is_valid_uri" ]
[((1672, 1707), 're.match', 're.match', (['self.EMAIL_PATTERN', 'value'], {}), '(self.EMAIL_PATTERN, value)\n', (1680, 1707), False, 'import re\n'), ((1792, 1840), 'rfc3986.is_valid_uri', 'rfc3986.is_valid_uri', (['value'], {'require_scheme': '(True)'}), '(value, require_scheme=True)\n', (1812, 1840), False, 'import rf...
from difflib import SequenceMatcher """ A Python program to demonstrate the adjacency list representation of the graph """ # weights arreay by value weights = [1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7] # A class to represent the adjacency list of the node class AdjNode: def __init__(s...
[ "difflib.SequenceMatcher" ]
[((3108, 3149), 'difflib.SequenceMatcher', 'SequenceMatcher', (['None', 'node1[i]', 'node2[i]'], {}), '(None, node1[i], node2[i])\n', (3123, 3149), False, 'from difflib import SequenceMatcher\n')]
from selenium.webdriver.firefox.options import Options from webdriver_manager.firefox import GeckoDriverManager from seleniumwire import webdriver from .fetch import fetchUser as fetchUser_ class TwitterUser(object): # __CONSTRUCTOR def __init__(self, allowed_connection_retries=20, allowed_parsing_retries=500...
[ "selenium.webdriver.firefox.options.Options", "webdriver_manager.firefox.GeckoDriverManager" ]
[((581, 590), 'selenium.webdriver.firefox.options.Options', 'Options', ([], {}), '()\n', (588, 590), False, 'from selenium.webdriver.firefox.options import Options\n'), ((825, 845), 'webdriver_manager.firefox.GeckoDriverManager', 'GeckoDriverManager', ([], {}), '()\n', (843, 845), False, 'from webdriver_manager.firefox...
import cv2 as cv from os import listdir from os.path import isfile, join import json folders = [ # Img sets to use "octopus", "elephant", "flamingo", "kangaroo", "leopards", "sea_horse" ] files = [f for f in listdir("./data/camera") if isfile(join("./data/camera", f))] # Get all file names train_file_nam...
[ "json.dumps", "os.listdir", "os.path.join", "cv2.imread" ]
[((219, 243), 'os.listdir', 'listdir', (['"""./data/camera"""'], {}), "('./data/camera')\n", (226, 243), False, 'from os import listdir\n'), ((254, 278), 'os.path.join', 'join', (['"""./data/camera"""', 'f'], {}), "('./data/camera', f)\n", (258, 278), False, 'from os.path import isfile, join\n'), ((447, 494), 'cv2.imre...
from ase import Atoms from ase.calculators.emt import EMT from ase.io.trajectory import Trajectory from ase.io import read import numpy as np import pandas as pd import argparse import copy import os import pdb import pickle from model_eval import model_evaluation from gmp_feature_selection import backward_eliminati...
[ "model_eval.model_evaluation.dataset", "gmp_feature_selection.backward_elimination.backward_elimination", "numpy.log10", "os.path.join", "model_eval.model_evaluation.get_model_eval_params", "ase.calculators.emt.EMT", "numpy.linspace", "numpy.random.seed", "numpy.cos", "numpy.random.uniform", "nu...
[((419, 470), 'os.path.join', 'os.path.join', (['dir_prefix', '"""pace/parallel_workspace"""'], {}), "(dir_prefix, 'pace/parallel_workspace')\n", (431, 470), False, 'import os\n'), ((488, 522), 'os.path.join', 'os.path.join', (['dir_prefix', '"""output"""'], {}), "(dir_prefix, 'output')\n", (500, 522), False, 'import o...
from cytoolz import assoc from cytoolz import merge from functools import partial from merlin import chipmunk from merlin import chips from merlin import dates from merlin import formats from merlin import specs import os ubids = {'chipmunk-ard': {'reds': ['LC08_SRB4', 'LE07_SRB3', 'LT05_SRB3', 'LT04_SRB...
[ "cytoolz.merge", "functools.partial", "cytoolz.assoc" ]
[((4768, 4796), 'cytoolz.assoc', 'assoc', (['p', '"""profile"""', 'profile'], {}), "(p, 'profile', profile)\n", (4773, 4796), False, 'from cytoolz import assoc\n'), ((2314, 2364), 'functools.partial', 'partial', (['specs.mapped'], {'ubids': "ubids['chipmunk-ard']"}), "(specs.mapped, ubids=ubids['chipmunk-ard'])\n", (23...
from vivid.core import BaseBlock, network_hash def test_network_hash(): a = BaseBlock('a') b = BaseBlock('b') assert network_hash(a) != network_hash(b) assert network_hash(a) == network_hash(a) c = BaseBlock('c', parent=[a, b]) hash1 = network_hash(c) a._parent = [BaseBlock('z')] hash...
[ "vivid.core.network_hash", "vivid.core.BaseBlock" ]
[((82, 96), 'vivid.core.BaseBlock', 'BaseBlock', (['"""a"""'], {}), "('a')\n", (91, 96), False, 'from vivid.core import BaseBlock, network_hash\n'), ((105, 119), 'vivid.core.BaseBlock', 'BaseBlock', (['"""b"""'], {}), "('b')\n", (114, 119), False, 'from vivid.core import BaseBlock, network_hash\n'), ((221, 250), 'vivid...
from __future__ import absolute_import from chainer import backend from chainer import functions as F from chainer.functions import sigmoid_cross_entropy from chainer.functions import softmax_cross_entropy from .sigmoid_soft_cross_entropy import sigmoid_soft_cross_entropy def noised_softmax_cross_entropy(y, t, mc_it...
[ "chainer.functions.exp", "chainer.functions.sum", "chainer.functions.softmax_cross_entropy", "chainer.functions.sigmoid_cross_entropy", "chainer.backend.get_array_module" ]
[((1201, 1228), 'chainer.backend.get_array_module', 'backend.get_array_module', (['t'], {}), '(t)\n', (1225, 1228), False, 'from chainer import backend\n'), ((1275, 1289), 'chainer.functions.exp', 'F.exp', (['log_std'], {}), '(log_std)\n', (1280, 1289), True, 'from chainer import functions as F\n'), ((2804, 2831), 'cha...
#!/usr/bin/python """ Run_long_script governs the running of long gazebo_ros_tensorflow simulations. The core functionality lies in: 1. parsing the correct arguments at different levels (tensorflow dnn, gazebo environment, ros supervision) 2. different crash handling when for instance starting gazebo / tensorfl...
[ "shlex.split", "yaml.load", "time.sleep", "sys.exit", "numpy.sin", "geometry_msgs.msg.Pose", "os.remove", "os.listdir", "argparse.ArgumentParser", "subprocess.Popen", "rospy.ServiceProxy", "os.path.isdir", "subprocess.call", "numpy.random.seed", "gazebo_msgs.srv.SetModelStateRequest", ...
[((5271, 5653), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Run_simulation_scripts governs the running of long gazebo_ros_tensorflow simulations.\n The core functionality lies in:\n 1. parsing the correct arguments at different levels (tensorflow dnn, gazebo environment,...
from rubrik_polaris import PolarisClient domain = 'my-company' username = '<EMAIL>' password = '<PASSWORD>)' client = PolarisClient(domain, username, password, insecure=True) print(client.get_storage_object_ids_ebs(tags = {"Class": "Management"}))
[ "rubrik_polaris.PolarisClient" ]
[((122, 178), 'rubrik_polaris.PolarisClient', 'PolarisClient', (['domain', 'username', 'password'], {'insecure': '(True)'}), '(domain, username, password, insecure=True)\n', (135, 178), False, 'from rubrik_polaris import PolarisClient\n')]
import torch from torch.utils.data import DataLoader from src import qmodel, rmodel from src.loss import IQALoss, PredictLoss from src.framework import IQAnModel, RecognitionModel, TripRecognitionModel from src.dataset import get_eye_dataset, EyePairDataset, FaceDataset def set_r_model(config): if 'r_model_name'...
[ "src.rmodel.VniNet", "src.rmodel.VGG11BN", "src.loss.IQALoss", "src.dataset.FaceDataset", "src.framework.RecognitionModel", "src.qmodel.ResUnet", "src.rmodel.LightCNN", "src.rmodel.Resnet18", "src.qmodel.Unet", "src.rmodel.Embedding", "src.rmodel.Maxout", "src.loss.PredictLoss", "src.dataset...
[((1845, 1886), 'src.loss.PredictLoss', 'PredictLoss', ([], {'loss_type': "config['rec_loss']"}), "(loss_type=config['rec_loss'])\n", (1856, 1886), False, 'from src.loss import IQALoss, PredictLoss\n'), ((2490, 2550), 'src.loss.IQALoss', 'IQALoss', ([], {'loss_type': "config['qua_loss']", 'alpha': "config['alpha']"}), ...
from win32ctypes.pywin32 import win32api import win32.lib.win32con as win32con import win32.win32gui as win32gui from wx.lib.delayedresult import startWorker import PIL import wx import wx.aui as aui import wx.adv as adv import wx.lib.newevent import os import threading import datetime import random import mouse from s...
[ "wx.Display", "wx.NewId", "wx.Frame.__init__", "wx.Colour", "random.randint", "wx.PaintDC", "random.randrange", "PIL.ImageChops.invert", "PIL.ImageDraw.floodfill", "win32.win32gui.SetWindowLong", "wx.Point", "PIL.Image.open", "win32.win32gui.GetWindowLong", "os.path.join", "wx.Timer", ...
[((991, 1011), 'random.randint', 'random.randint', (['(0)', '(1)'], {}), '(0, 1)\n', (1005, 1011), False, 'import random\n'), ((2348, 2393), 'PIL.ImageDraw.floodfill', 'ImageDraw.floodfill', (['dstPilImage', '(0, 0)', '(255)'], {}), '(dstPilImage, (0, 0), 255)\n', (2367, 2393), False, 'from PIL import Image, ImageDraw,...
#!/usr/bin/env python # # Copyright (c) 2019, Pycom Limited. # # This software is licensed under the GNU GPL version 3 or any # later version, with permitted additional terms. For more information # see the Pycom Licence v1.0 document supplied with this file, or # available at https://www.pycom.io/opensource/licensing ...
[ "Message.Message" ]
[((2237, 2316), 'Message.Message', 'Message', (['message.content', 'message.sender', 'message.target', '(0)', '(True)', '(False)', '(False)'], {}), '(message.content, message.sender, message.target, 0, True, False, False)\n', (2244, 2316), False, 'from Message import Message\n')]
from new_movies.random_data_utility import random_generator available_movies = random_generator.generate_random_movies(movies_number=15) available_games = random_generator.generate_random_games() def add_movie(movie): available_movies.append(movie)
[ "new_movies.random_data_utility.random_generator.generate_random_movies", "new_movies.random_data_utility.random_generator.generate_random_games" ]
[((80, 137), 'new_movies.random_data_utility.random_generator.generate_random_movies', 'random_generator.generate_random_movies', ([], {'movies_number': '(15)'}), '(movies_number=15)\n', (119, 137), False, 'from new_movies.random_data_utility import random_generator\n'), ((156, 196), 'new_movies.random_data_utility.ran...
from django.shortcuts import render # Create your views here. from rest_framework.views import APIView from contents.serializers import HotSKUListSerializer from goods.models import SKU class HomeAPIView(APIView): pass ''' 列表数据 热销数据:应该是到哪个分类去获取哪个分类的热销数据中 1.获取分类id 2.根据id获取数据 3.将数据转化为字典 4返回相应 ''' from rest_f...
[ "goods.models.SKU.objects.filter" ]
[((487, 530), 'goods.models.SKU.objects.filter', 'SKU.objects.filter', ([], {'category_id': 'category_id'}), '(category_id=category_id)\n', (505, 530), False, 'from goods.models import SKU\n')]
# -*- coding: utf-8 -*- """ Tera Python SDK. It needs a libtera_c.so TODO(taocipian) __init__.py """ from ctypes import CFUNCTYPE, POINTER from ctypes import byref, cdll, string_at from ctypes import c_bool, c_char_p, c_void_p from ctypes import c_int32, c_int64, c_ubyte, c_uint64 class ScanDescriptor(object): ...
[ "ctypes.CFUNCTYPE", "ctypes.byref", "ctypes.POINTER", "ctypes.cdll.LoadLibrary", "ctypes.string_at", "ctypes.c_char_p", "ctypes.c_uint64" ]
[((5437, 5462), 'ctypes.CFUNCTYPE', 'CFUNCTYPE', (['None', 'c_void_p'], {}), '(None, c_void_p)\n', (5446, 5462), False, 'from ctypes import CFUNCTYPE, POINTER\n'), ((16413, 16447), 'ctypes.cdll.LoadLibrary', 'cdll.LoadLibrary', (['"""./libtera_c.so"""'], {}), "('./libtera_c.so')\n", (16429, 16447), False, 'from ctypes ...
#!/usr/bin/env python import roslib; roslib.load_manifest('tms_ts_smach') import rospy import smach import smach_ros from smach_ros import ServiceState from smach import Concurrence from tms_msg_rp.srv import * from tms_msg_ts.srv import * def smc0(): smc0 = smach.Concurrence( outcomes=['succeeded', 'aborted'],...
[ "smach_ros.IntrospectionServer", "rospy.init_node", "smach.Concurrence", "smach.StateMachine", "roslib.load_manifest", "rospy.spin" ]
[((38, 74), 'roslib.load_manifest', 'roslib.load_manifest', (['"""tms_ts_smach"""'], {}), "('tms_ts_smach')\n", (58, 74), False, 'import roslib\n'), ((267, 477), 'smach.Concurrence', 'smach.Concurrence', ([], {'outcomes': "['succeeded', 'aborted']", 'default_outcome': '"""aborted"""', 'outcome_map': "{'succeeded': {'0r...
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from google.cloud.bigtable_admin_v2.proto import ( bigtable_table_admin_pb2 as google_dot_cloud_dot_bigtable__admin__v2_dot_proto_dot_bigtable__table__admin_...
[ "grpc.method_handlers_generic_handler", "grpc.experimental.unary_unary", "grpc.unary_unary_rpc_method_handler" ]
[((28917, 29026), 'grpc.method_handlers_generic_handler', 'grpc.method_handlers_generic_handler', (['"""google.bigtable.admin.v2.BigtableTableAdmin"""', 'rpc_method_handlers'], {}), "(\n 'google.bigtable.admin.v2.BigtableTableAdmin', rpc_method_handlers)\n", (28953, 29026), False, 'import grpc\n'), ((20697, 21024), ...
# coding=utf-8 # 爬虫抓学校官网首页 import requests import re import urllib.request from bs4 import BeautifulSoup import os import lxml # 保存文件 def file_save(data, path): if not os.path.exists(os.path.split(path)[0]): os.makedirs(os.path.split(path)[0]) try: with open(path, 'wb') as f: f.writ...
[ "bs4.BeautifulSoup", "requests.get", "os.path.split" ]
[((963, 990), 'bs4.BeautifulSoup', 'BeautifulSoup', (['data', '"""lxml"""'], {}), "(data, 'lxml')\n", (976, 990), False, 'from bs4 import BeautifulSoup\n'), ((839, 865), 'requests.get', 'requests.get', (['url', 'headers'], {}), '(url, headers)\n', (851, 865), False, 'import requests\n'), ((188, 207), 'os.path.split', '...
import setuptools from setuptools import setup """Setup module for model_ensembler """ with open("README.md", "r") as fh: long_description = fh.read() setup( name="model-ensembler", version="0.5.2", author="<NAME>", author_email="<EMAIL>", description="Model Ensemble for batch workflows on ...
[ "setuptools.find_packages" ]
[((600, 626), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (624, 626), False, 'import setuptools\n')]
# Generated by Django 4.0 on 2022-01-13 10:17 import uuid import ckeditor_uploader.fields import django.db.models.deletion from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('funuser', '0004_alter_funuse...
[ "django.db.models.TextField", "django.db.models.ForeignKey", "django.db.models.ManyToManyField", "django.db.models.FileField", "django.db.models.CharField", "django.db.models.DateTimeField", "django.db.migrations.swappable_dependency", "django.db.models.UUIDField" ]
[((399, 456), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (430, 456), False, 'from django.db import migrations, models\n'), ((611, 715), 'django.db.models.UUIDField', 'models.UUIDField', ([], {'default': 'uuid.uuid4'...
""" `bq25883` ==================================================== CircuitPython driver for the BQ25883 2-cell USB boost-mode charger. * Author(s): <NAME> Implementation Notes -------------------- """ from micropython import const from adafruit_bus_device.i2c_device import I2CDevice from adafruit_...
[ "adafruit_register.i2c_bits.RWBits", "adafruit_register.i2c_bit.RWBit", "adafruit_bus_device.i2c_device.I2CDevice", "micropython.const", "adafruit_register.i2c_bits.ROBits" ]
[((517, 525), 'micropython.const', 'const', (['(0)'], {}), '(0)\n', (522, 525), False, 'from micropython import const\n'), ((548, 556), 'micropython.const', 'const', (['(1)'], {}), '(1)\n', (553, 556), False, 'from micropython import const\n'), ((580, 588), 'micropython.const', 'const', (['(2)'], {}), '(2)\n', (585, 58...