code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
#!python """ wflow_prepare_step2 =================== wflow data preparation script. Data preparation can be done by hand or using the two scripts. This script does the resampling. This scripts need the pcraster and gdal executables to be available in you search path. Usage:: wflow_prepare_step2 [-W workdir][-f...
[ "configparser.ConfigParser", "wflow.wflow_lib.scalar", "sys.exit", "wflow.wflow_lib.readmap", "wflow.wflow_lib.setclone", "os.path.exists", "wflow.wflow_lib.lddcreate_save", "wflow.wflow_lib.setglobaloption", "wflow.wflow_lib.find_outlet", "wflow.wflow_lib.ifthen", "wflow.wflow_lib.report", "o...
[((773, 784), 'sys.exit', 'sys.exit', (['(0)'], {}), '(0)\n', (781, 784), False, 'import sys\n'), ((1060, 1087), 'configparser.ConfigParser', 'configparser.ConfigParser', ([], {}), '()\n', (1085, 1087), False, 'import configparser\n'), ((1125, 1143), 'os.path.exists', 'os.path.exists', (['fn'], {}), '(fn)\n', (1139, 11...
from django.test import TestCase from dojo.tools.spotbugs.parser import SpotbugsParser from dojo.models import Test class TestSpotbugsParser(TestCase): def test_no_findings(self): parser = SpotbugsParser() findings = parser.get_findings("dojo/unittests/scans/spotbugs/no_finding.xml", Test()) ...
[ "dojo.models.Test", "dojo.tools.spotbugs.parser.SpotbugsParser" ]
[((204, 220), 'dojo.tools.spotbugs.parser.SpotbugsParser', 'SpotbugsParser', ([], {}), '()\n', (218, 220), False, 'from dojo.tools.spotbugs.parser import SpotbugsParser\n'), ((416, 432), 'dojo.tools.spotbugs.parser.SpotbugsParser', 'SpotbugsParser', ([], {}), '()\n', (430, 432), False, 'from dojo.tools.spotbugs.parser ...
from django.conf.urls import patterns, url contact_urls = patterns('', url(r'^$', 'crmapp.contacts.views.contact_detail', name="contact_detail"), url(r'^edit/$', 'crmapp.contacts.views.contact_cru', name='contact_update' ), )
[ "django.conf.urls.url" ]
[((77, 149), 'django.conf.urls.url', 'url', (['"""^$"""', '"""crmapp.contacts.views.contact_detail"""'], {'name': '"""contact_detail"""'}), "('^$', 'crmapp.contacts.views.contact_detail', name='contact_detail')\n", (80, 149), False, 'from django.conf.urls import patterns, url\n'), ((156, 230), 'django.conf.urls.url', '...
import logging from urllib.parse import urlparse from dbas.database import DBDiscussionSession from dbas.database.discussion_model import StatementReference, User, Statement, Issue from dbas.input_validator import is_integer from dbas.lib import get_profile_picture, get_enabled_arguments_as_query, \ get_enabled_pr...
[ "logging.getLogger", "dbas.lib.get_profile_picture", "urllib.parse.urlparse", "dbas.database.discussion_model.StatementReference", "dbas.database.DBDiscussionSession.flush", "dbas.database.DBDiscussionSession.query", "dbas.lib.get_enabled_arguments_as_query", "dbas.lib.get_enabled_premises_as_query", ...
[((343, 370), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (360, 370), False, 'import logging\n'), ((701, 733), 'dbas.lib.get_enabled_arguments_as_query', 'get_enabled_arguments_as_query', ([], {}), '()\n', (731, 733), False, 'from dbas.lib import get_profile_picture, get_enabled_argume...
# -*- coding: utf-8 -*- import os class BaseConfig: DEBUG = False TESTING = False PROJECT_ROOT = os.path.abspath('.') SQLALCHEMY_DATABASE_URI = f'sqlite:///{os.path.join(PROJECT_ROOT, "db.sqlite")}' SQLALCHEMY_TRACK_MODIFICATIONS = False JWT_SECRET_KEY = os.urandom(32) JWT_IDENTITY_CLA...
[ "os.path.abspath", "os.urandom", "os.path.join", "os.getenv" ]
[((113, 133), 'os.path.abspath', 'os.path.abspath', (['"""."""'], {}), "('.')\n", (128, 133), False, 'import os\n'), ((285, 299), 'os.urandom', 'os.urandom', (['(32)'], {}), '(32)\n', (295, 299), False, 'import os\n'), ((744, 780), 'os.getenv', 'os.getenv', (['"""SQLALCHEMY_DATABASE_URI"""'], {}), "('SQLALCHEMY_DATABAS...
""" Database schema. """ import datetime import enum import os import copy import gwemopt.utils import gwemopt.ztf_tiling from astropy import table from astropy import coordinates from astropy import units as u from flask_login.mixins import UserMixin from flask_sqlalchemy import SQLAlchemy import gcn import healpy a...
[ "astropy.table.Table", "ligo.skymap.bayestar.rasterize", "copy.deepcopy", "numpy.moveaxis", "datetime.timedelta", "astropy.table.unique", "healpy.reorder", "healpy.query_polygon", "numpy.vstack", "healpy.nside2order", "os.path.isfile", "flask_sqlalchemy.SQLAlchemy", "numpy.transpose", "pkg...
[((646, 661), 'flask_sqlalchemy.SQLAlchemy', 'SQLAlchemy', (['app'], {}), '(app)\n', (656, 661), False, 'from flask_sqlalchemy import SQLAlchemy\n'), ((1178, 1210), 'numpy.transpose', 'np.transpose', (['offsets', '(2, 0, 1)'], {}), '(offsets, (2, 0, 1))\n', (1190, 1210), True, 'import numpy as np\n'), ((4913, 4929), 't...
# Generated by Django 2.0.5 on 2019-03-08 20:54 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('TCS', '0031_auto_20190228_1417'), ] operations = [ migrations.AddField( model_name='orderservice', name='brandName',...
[ "django.db.models.CharField" ]
[((339, 383), 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'max_length': '(250)'}), '(blank=True, max_length=250)\n', (355, 383), False, 'from django.db import migrations, models\n'), ((514, 558), 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'max_length': '(25...
from pyrosim.commonFunctions import Save_Whitespace class MATERIAL: def __init__(self, name="Cyan", color_rgba=[0, 1, 1, 1]): self.depth = 3 self.string1 = f'<material name="{name}">' self.string2 = f' <color rgba="{color_rgba[0]} {color_rgba[1]} {color_rgba[2]} {color_rgba[3]}"/>' ...
[ "pyrosim.commonFunctions.Save_Whitespace" ]
[((391, 421), 'pyrosim.commonFunctions.Save_Whitespace', 'Save_Whitespace', (['self.depth', 'f'], {}), '(self.depth, f)\n', (406, 421), False, 'from pyrosim.commonFunctions import Save_Whitespace\n'), ((470, 500), 'pyrosim.commonFunctions.Save_Whitespace', 'Save_Whitespace', (['self.depth', 'f'], {}), '(self.depth, f)\...
# -*- coding: utf-8 -*- """Collection of functions for the manipulation of time series.""" from __future__ import absolute_import, division, print_function import itertools import os import warnings import mando import numpy as np import pandas as pd from mando.rst_text_formatter import RSTHelpFormatter from tstoolb...
[ "matplotlib.pyplot.grid", "matplotlib.pyplot.vlines", "matplotlib.pyplot.ylabel", "tstoolbox.tsutils.make_list", "tstoolbox.tsutils.common_kwds", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.style.use", "warnings.warn", "itertools.cycle", "matplotlib.pyplot.savefig", "matplotlib.use", "matpl...
[((365, 398), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (388, 398), False, 'import warnings\n'), ((402, 487), 'mando.command', 'mando.command', (['"""barh_stacked"""'], {'formatter_class': 'RSTHelpFormatter', 'doctype': '"""numpy"""'}), "('barh_stacked', formatter_cla...
import time import PyQt5.QtCore from nn_sandbox.backend.algorithms import RbfnAlgorithm from . import Bridge, BridgeProperty from .observer import Observable class RbfnBridge(Bridge): ui_refresh_interval = BridgeProperty(0.0) dataset_dict = BridgeProperty({}) training_dataset = BridgeProperty([]) te...
[ "nn_sandbox.backend.algorithms.RbfnAlgorithm.__init__", "time.sleep" ]
[((2281, 2319), 'nn_sandbox.backend.algorithms.RbfnAlgorithm.__init__', 'RbfnAlgorithm.__init__', (['self'], {}), '(self, **kwargs)\n', (2303, 2319), False, 'from nn_sandbox.backend.algorithms import RbfnAlgorithm\n'), ((3807, 3843), 'time.sleep', 'time.sleep', (['self.ui_refresh_interval'], {}), '(self.ui_refresh_inte...
""" P2] Se presenta una escena con objetos dibujados con diferentes materiales a la escena base """ """ Se usa imgui para generar un menu y controlar variables de reflexion para el material de los objetos """ import glfw from OpenGL.GL import * import OpenGL.GL.shaders import numpy as np import grafica.transfor...
[ "glfw.make_context_current", "glfw.swap_interval", "glfw.poll_events", "numpy.array", "grafica.transformations.lookAt", "numpy.sin", "imgui.slider_float", "imgui.end_frame", "imgui.color_edit3", "imgui.render", "grafica.lighting_shaders.SimplePhongShaderProgram", "glfw.get_time", "imgui.get_...
[((5320, 5337), 'imgui.new_frame', 'imgui.new_frame', ([], {}), '()\n', (5335, 5337), False, 'import imgui\n'), ((5376, 5447), 'imgui.begin', 'imgui.begin', (['"""Material control"""', '(False)', 'imgui.WINDOW_ALWAYS_AUTO_RESIZE'], {}), "('Material control', False, imgui.WINDOW_ALWAYS_AUTO_RESIZE)\n", (5387, 5447), Fal...
"""The WaveBlocks Project Compute the kinetic and potential energies of the homogeneous wavepackets. @author: <NAME> @copyright: Copyright (C) 2010, 2011 <NAME> @license: Modified BSD License """ from WaveBlocks import PotentialFactory from WaveBlocks import HagedornWavepacket def compute_energy(iom, blockid=0): ...
[ "WaveBlocks.PotentialFactory", "WaveBlocks.HagedornWavepacket" ]
[((1450, 1480), 'WaveBlocks.HagedornWavepacket', 'HagedornWavepacket', (['parameters'], {}), '(parameters)\n', (1468, 1480), False, 'from WaveBlocks import HagedornWavepacket\n'), ((667, 685), 'WaveBlocks.PotentialFactory', 'PotentialFactory', ([], {}), '()\n', (683, 685), False, 'from WaveBlocks import PotentialFactor...
import tensorflow as tf import math def arcface_loss(embedding, labels, out_num, w_init=None, s=64., m=0.5): ''' :param embedding: the input embedding vectors :param labels: the input labels, the shape should be eg: (batch_size, 1) :param s: scalar value default is 64 :param out_num: output class...
[ "tensorflow.div", "tensorflow.multiply", "math.cos", "tensorflow.nn.sparse_softmax_cross_entropy_with_logits", "tensorflow.cast", "tensorflow.acos", "tensorflow.matmul", "tensorflow.square", "tensorflow.cos", "tensorflow.stack", "tensorflow.one_hot", "tensorflow.variable_scope", "tensorflow....
[((485, 496), 'math.cos', 'math.cos', (['m'], {}), '(m)\n', (493, 496), False, 'import math\n'), ((509, 520), 'math.sin', 'math.sin', (['m'], {}), '(m)\n', (517, 520), False, 'import math\n'), ((567, 588), 'math.cos', 'math.cos', (['(math.pi - m)'], {}), '(math.pi - m)\n', (575, 588), False, 'import math\n'), ((4430, 4...
############################################################################## # # Copyright (c) 2009,2019 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THI...
[ "zope.interface.implementer", "ZODB.POSException.Unsupported" ]
[((976, 1002), 'zope.interface.implementer', 'implementer', (['INoBlobHelper'], {}), '(INoBlobHelper)\n', (987, 1002), False, 'from zope.interface import implementer\n'), ((1745, 1792), 'ZODB.POSException.Unsupported', 'Unsupported', (['"""No blob directory is configured."""'], {}), "('No blob directory is configured.'...
'''OpenGL extension AMD.framebuffer_sample_positions This module customises the behaviour of the OpenGL.raw.GL.AMD.framebuffer_sample_positions to provide a more Python-friendly API Overview (from the spec) In unextended GL, the sub-pixel loations of multisampled textures and renderbuffers are generall...
[ "OpenGL.extensions.hasGLExtension" ]
[((1917, 1959), 'OpenGL.extensions.hasGLExtension', 'extensions.hasGLExtension', (['_EXTENSION_NAME'], {}), '(_EXTENSION_NAME)\n', (1942, 1959), False, 'from OpenGL import extensions\n')]
# Author: <NAME> import json import numpy as np import torch from torch import nn from torch.utils.data import DataLoader import torch.optim as optim from dataset import LibriSpeechDataset import models # For decoding from ctcdecode import CTCBeamDecoder from Levenshtein import distance as levenshtein_distance # T...
[ "torch.exp", "Levenshtein.distance", "dataset.LibriSpeechDataset", "torch.nn.CTCLoss", "torch.utils.data.DataLoader", "json.load", "torch.no_grad", "models.CNNLSTM", "torch.device" ]
[((417, 470), 'torch.nn.CTCLoss', 'nn.CTCLoss', ([], {'blank': "args['pad_token']", 'reduction': '"""none"""'}), "(blank=args['pad_token'], reduction='none')\n", (427, 470), False, 'from torch import nn\n'), ((489, 532), 'dataset.LibriSpeechDataset', 'LibriSpeechDataset', (["args['train_set']", 'args'], {}), "(args['tr...
#!/usr/bin/env python3 ''' kicad-footprint-generator is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. kicad-footprint-generator is distribut...
[ "os.makedirs", "argparse.ArgumentParser", "os.path.join", "footprint_text_fields.addTextFields", "math.sqrt", "yaml.safe_load", "os.path.isdir" ]
[((804, 847), 'os.path.join', 'os.path.join', (['sys.path[0]', '""".."""', '""".."""', '""".."""'], {}), "(sys.path[0], '..', '..', '..')\n", (816, 847), False, 'import os\n'), ((1001, 1047), 'os.path.join', 'os.path.join', (['sys.path[0]', '""".."""', '""".."""', '"""tools"""'], {}), "(sys.path[0], '..', '..', 'tools'...
from rdflib.namespace import ClosedNamespace from rdflib.term import URIRef PHENO = ClosedNamespace( uri=URIRef("http://phenomebrowser.net/"), terms=[ #Classes "Disease", "Drug", "Device", "Gene", "Genotype", "Phenotype", "Pathogen", "Provenance", "Association", "Metabolite", "A...
[ "rdflib.term.URIRef" ]
[((110, 146), 'rdflib.term.URIRef', 'URIRef', (['"""http://phenomebrowser.net/"""'], {}), "('http://phenomebrowser.net/')\n", (116, 146), False, 'from rdflib.term import URIRef\n'), ((455, 496), 'rdflib.term.URIRef', 'URIRef', (['"""http://purl.obolibrary.org/obo/"""'], {}), "('http://purl.obolibrary.org/obo/')\n", (46...
import tempfile from pathlib import Path from typing import List import numpy as np from .lib.indexing import IndexCreate from .embed import SentenceEncoder, EncodeFile from .lib.text_processing import Token, BPEfastApply def lines_to_index(lang: str, lines: List, model_path: str, bpe_code_path: str, use_cpu: bool ...
[ "tempfile.TemporaryDirectory", "pathlib.Path" ]
[((407, 436), 'tempfile.TemporaryDirectory', 'tempfile.TemporaryDirectory', ([], {}), '()\n', (434, 436), False, 'import tempfile\n'), ((917, 946), 'tempfile.TemporaryDirectory', 'tempfile.TemporaryDirectory', ([], {}), '()\n', (944, 946), False, 'import tempfile\n'), ((1572, 1601), 'tempfile.TemporaryDirectory', 'temp...
from sqlalchemy import Column, Integer from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.orm import declarative_base Base = declarative_base() class Account(Base): """The Account class corresponds to the "accounts" database table. """ __tablename__ = 'accounts' id = Column(UUID(as_uuid=...
[ "sqlalchemy.dialects.postgresql.UUID", "sqlalchemy.orm.declarative_base", "sqlalchemy.Column" ]
[((139, 157), 'sqlalchemy.orm.declarative_base', 'declarative_base', ([], {}), '()\n', (155, 157), False, 'from sqlalchemy.orm import declarative_base\n'), ((359, 374), 'sqlalchemy.Column', 'Column', (['Integer'], {}), '(Integer)\n', (365, 374), False, 'from sqlalchemy import Column, Integer\n'), ((307, 325), 'sqlalche...
#!/usr/bin/env python # coding=utf-8 try: import mock except ImportError: import unittest.mock as mock from marvin_titanic_engine.prediction import Predictor class TestPredictor: def test_execute(self, mocked_params): model_mocked = { "rf": mock.MagicMock(), "svm": mock...
[ "unittest.mock.MagicMock", "marvin_titanic_engine.prediction.Predictor" ]
[((357, 386), 'marvin_titanic_engine.prediction.Predictor', 'Predictor', ([], {'model': 'model_mocked'}), '(model=model_mocked)\n', (366, 386), False, 'from marvin_titanic_engine.prediction import Predictor\n'), ((279, 295), 'unittest.mock.MagicMock', 'mock.MagicMock', ([], {}), '()\n', (293, 295), True, 'import unitte...
import argparse import collections import json import os import re import string import sys from copy import deepcopy from typing import List from bs4 import BeautifulSoup class EvalOpts: r""" The options which the matrix evaluation process needs. Arguments: data_file (str): the SQuAD-style ...
[ "collections.OrderedDict", "copy.deepcopy", "argparse.ArgumentParser", "re.compile", "json.dumps", "os.path.join", "collections.Counter", "sys.exit", "json.load", "re.sub", "json.dump" ]
[((1329, 1354), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1352, 1354), False, 'import argparse\n'), ((2012, 2023), 'sys.exit', 'sys.exit', (['(1)'], {}), '(1)\n', (2020, 2023), False, 'import sys\n'), ((2971, 3013), 're.compile', 're.compile', (['"""\\\\b(a|an|the)\\\\b"""', 're.UNICODE']...
""" Module providing testing of `halotools.mock_observables.velocity_marked_npairs_3d` """ from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np from astropy.tests.helper import pytest from astropy.utils.misc import NumpyRNGContext from ..velocity_marked_npairs_3d impor...
[ "numpy.random.random", "astropy.tests.helper.pytest.raises", "astropy.utils.misc.NumpyRNGContext" ]
[((594, 621), 'astropy.utils.misc.NumpyRNGContext', 'NumpyRNGContext', (['fixed_seed'], {}), '(fixed_seed)\n', (609, 621), False, 'from astropy.utils.misc import NumpyRNGContext\n'), ((641, 668), 'numpy.random.random', 'np.random.random', (['(npts, 3)'], {}), '((npts, 3))\n', (657, 668), True, 'import numpy as np\n'), ...
''' Train and operate with PMI-SVD embeddings ''' from collections import Counter import numpy as np import pandas as pd from scipy.sparse import linalg import umap import src.utility.general as util class PmiSvdEmbeddings: def __init__(self, texts): ''' Args: - texts (str|list): text d...
[ "pandas.Series", "numpy.argpartition", "src.utility.general.validate_input", "collections.Counter", "numpy.zeros", "numpy.dot", "umap.UMAP", "numpy.linalg.norm", "scipy.sparse.linalg.svds", "numpy.log2" ]
[((415, 441), 'src.utility.general.validate_input', 'util.validate_input', (['texts'], {}), '(texts)\n', (434, 441), True, 'import src.utility.general as util\n'), ((2013, 2022), 'collections.Counter', 'Counter', ([], {}), '()\n', (2020, 2022), False, 'from collections import Counter\n'), ((3276, 3296), 'numpy.zeros', ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from conans import ConanFile, tools, CMake class NanoIdXXConan(ConanFile): name = "nanoidxx" version = "0.1" description = "A tiny, URL-friendly, unique string ID generator for C++, implementation of ai's nanoid!" url = "https://github.com/p...
[ "conans.CMake" ]
[((774, 785), 'conans.CMake', 'CMake', (['self'], {}), '(self)\n', (779, 785), False, 'from conans import ConanFile, tools, CMake\n')]
#!/usr/bin/env python """ Some common lineshapes and distribution functions """ from __future__ import division from numpy import exp, pi, sqrt, where from scipy import special from lmfit.lineshapes import (gaussian, lorentzian, voigt, pvoigt, moffat, pearson7, breit_wigner, damped_osci...
[ "numpy.sqrt", "numpy.where", "numpy.exp", "scipy.special.erf", "scipy.special.gamma", "scipy.special.erfc", "scipy.special.wofz", "scipy.special.gammaln" ]
[((606, 618), 'numpy.sqrt', 'sqrt', (['(2 * pi)'], {}), '(2 * pi)\n', (610, 618), False, 'from numpy import exp, pi, sqrt, where\n'), ((622, 631), 'numpy.sqrt', 'sqrt', (['(2.0)'], {}), '(2.0)\n', (626, 631), False, 'from numpy import exp, pi, sqrt, where\n'), ((2630, 2644), 'scipy.special.erf', 'special.erf', (['x'], ...
import numpy as np import time import cv2 import os class YoloObjectsDetector: def __init__(self, image, yolo_path=None, min_confidence=0.5, threshold=0.3): self.image = image # get image height and width self.height = self.image.shape[0] self.width = self.image.shape[1] ...
[ "cv2.dnn.blobFromImage", "cv2.rectangle", "cv2.setMouseCallback", "numpy.argmax", "cv2.putText", "cv2.imshow", "os.path.dirname", "cv2.waitKey", "numpy.array", "cv2.dnn.NMSBoxes", "time.time", "cv2.dnn.readNetFromDarknet" ]
[((1360, 1423), 'cv2.dnn.readNetFromDarknet', 'cv2.dnn.readNetFromDarknet', (['self.config_path', 'self.weights_path'], {}), '(self.config_path, self.weights_path)\n', (1386, 1423), False, 'import cv2\n'), ((1597, 1683), 'cv2.dnn.blobFromImage', 'cv2.dnn.blobFromImage', (['self.image', '(1 / 255.0)', '(416, 416)'], {'s...
import json import os import secrets import swatcher from flask import ( abort, current_app, flash, redirect, render_template, request, send_file, session, url_for, ) from . import app from .forms import UploadImage, ResampleImage from io import BytesIO from PIL import Image def r...
[ "flask.render_template", "secrets.token_hex", "swatcher.Swatcher", "flask.session.get", "flask.flash", "flask.abort", "swatcher.color.colors_2_dicts", "json.dumps", "io.BytesIO", "os.path.join", "swatcher.palette.sample", "flask.url_for", "swatcher.export.write_ase_file", "flask.session.po...
[((407, 430), 'flask.session.pop', 'session.pop', (['"""id"""', 'None'], {}), "('id', None)\n", (418, 430), False, 'from flask import abort, current_app, flash, redirect, render_template, request, send_file, session, url_for\n'), ((435, 464), 'flask.session.pop', 'session.pop', (['"""filename"""', 'None'], {}), "('file...
from nicos.nexus.elements import ConstDataset, DetectorDataset, \ DeviceAttribute, DeviceDataset, ImageDataset, NexusSampleEnv, \ NXAttribute, NXLink, NXScanLink, NXTime from nicos.nexus.nexussink import NexusTemplateProvider from nicos_sinq.nexus.specialelements import DevStat, OptionalDeviceDataset, \ Tw...
[ "nicos.nexus.elements.DeviceDataset", "nicos.nexus.elements.NXAttribute", "nicos.nexus.elements.NexusSampleEnv", "nicos.nexus.elements.NXTime", "nicos_sinq.nexus.specialelements.OptionalDeviceDataset", "nicos.nexus.elements.ConstDataset", "nicos.nexus.elements.DeviceAttribute", "nicos_sinq.nexus.speci...
[((480, 511), 'nicos.nexus.elements.DeviceAttribute', 'DeviceAttribute', (['"""Exp"""', '"""users"""'], {}), "('Exp', 'users')\n", (495, 511), False, 'from nicos.nexus.elements import ConstDataset, DetectorDataset, DeviceAttribute, DeviceDataset, ImageDataset, NexusSampleEnv, NXAttribute, NXLink, NXScanLink, NXTime\n')...
from django.contrib import admin from admin_ordering.admin import OrderableAdmin from testapp import models class Child1Inline(OrderableAdmin, admin.TabularInline): model = models.Child1 ordering_field = "number" admin.site.register(models.Parent1, inlines=[Child1Inline]) class Child2Inline(OrderableAdmi...
[ "django.contrib.admin.site.register" ]
[((226, 285), 'django.contrib.admin.site.register', 'admin.site.register', (['models.Parent1'], {'inlines': '[Child1Inline]'}), '(models.Parent1, inlines=[Child1Inline])\n', (245, 285), False, 'from django.contrib import admin\n'), ((403, 462), 'django.contrib.admin.site.register', 'admin.site.register', (['models.Pare...
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-22 07:34 from __future__ import unicode_literals from django.db import migrations, models import django_mysql.models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateMode...
[ "django.db.models.DateTimeField", "django.db.models.SlugField", "django.db.models.AutoField", "django.db.models.CharField" ]
[((395, 488), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (411, 488), False, 'from django.db import migrations, models\...
import numpy as np import os from . import plot from . import util def label_statistics(labels): labels = (np.array(labels)).astype(np.int64) label_num = np.max(labels)+1 label_cnt = np.zeros(label_num,dtype=np.int64) for i in range(len(labels)): label_cnt[labels[i]] += 1 label_cnt_per = la...
[ "numpy.clip", "numpy.mean", "numpy.max", "numpy.array", "numpy.sum", "numpy.zeros" ]
[((196, 231), 'numpy.zeros', 'np.zeros', (['label_num'], {'dtype': 'np.int64'}), '(label_num, dtype=np.int64)\n', (204, 231), True, 'import numpy as np\n'), ((727, 775), 'numpy.zeros', 'np.zeros', (['(label_num, label_num)'], {'dtype': 'np.int64'}), '((label_num, label_num), dtype=np.int64)\n', (735, 775), True, 'impor...
# Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug # Copyright: (c) <<EMAIL>> # Released under the MIT License. from django.views.generic import View from django_redis import get_redis_connection from apscheduler.triggers.cron import CronTrigger from apps.schedule.models import Task, History from ...
[ "django_redis.get_redis_connection", "json.loads", "libs.Argument", "apps.host.models.Host.objects.filter", "libs.json_response", "apps.schedule.models.Task.objects.filter", "libs.human_datetime", "json.dumps", "apscheduler.triggers.cron.CronTrigger", "apps.schedule.models.Task.objects.create", ...
[((531, 549), 'apps.schedule.models.Task.objects.all', 'Task.objects.all', ([], {}), '()\n', (547, 549), False, 'from apps.schedule.models import Task, History\n'), ((2501, 2527), 'libs.json_response', 'json_response', ([], {'error': 'error'}), '(error=error)\n', (2514, 2527), False, 'from libs import json_response, Js...
import queue import threading from time import sleep import grpc from koapy.backend.kiwoom_open_api_plus.core.KiwoomOpenApiPlusError import ( KiwoomOpenApiPlusError, KiwoomOpenApiPlusNegativeReturnCodeError, ) from koapy.backend.kiwoom_open_api_plus.core.KiwoomOpenApiPlusRealType import ( KiwoomOpenApiPl...
[ "koapy.backend.kiwoom_open_api_plus.core.KiwoomOpenApiPlusError.KiwoomOpenApiPlusError", "koapy.backend.kiwoom_open_api_plus.utils.queue.QueueBasedBufferedIterator.QueueBasedBufferedIterator", "koapy.backend.kiwoom_open_api_plus.core.KiwoomOpenApiPlusError.KiwoomOpenApiPlusNegativeReturnCodeError", "time.slee...
[((4836, 4878), 'koapy.backend.kiwoom_open_api_plus.grpc.KiwoomOpenApiPlusService_pb2.RealRequest', 'KiwoomOpenApiPlusService_pb2.RealRequest', ([], {}), '()\n', (4876, 4878), False, 'from koapy.backend.kiwoom_open_api_plus.grpc import KiwoomOpenApiPlusService_pb2\n'), ((5040, 5090), 'koapy.backend.kiwoom_open_api_plus...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from itertools import product from pathlib import Path import numpy as np import tensorflow as tf from dotenv import load_dotenv from annotation.direction import PinDirection from annotation.piece import Piece from ..count import WhiteEffectCountLayer from ..lo...
[ "pathlib.Path", "tensorflow.placeholder", "os.environ.get", "numpy.sum", "numpy.zeros", "numpy.empty", "numpy.all", "tensorflow.squeeze" ]
[((695, 724), 'os.environ.get', 'os.environ.get', (['"""DATA_FORMAT"""'], {}), "('DATA_FORMAT')\n", (709, 724), False, 'import os\n'), ((907, 938), 'numpy.empty', 'np.empty', (['shape'], {'dtype': 'np.int32'}), '(shape, dtype=np.int32)\n', (915, 938), True, 'import numpy as np\n'), ((993, 1023), 'numpy.zeros', 'np.zero...
#!/usr/bin/env python """ simple example of how to calculate runtime """ import time # start timer run_start = time.time() # do something time.sleep(2) run_stop = time.time() # save runtime as a variable m, s = divmod(run_stop - run_start, 60) h, m = divmod(m, 60) run_time = f"{int(h):d}:{int(m):02d}:{int(s):02d}"...
[ "time.time", "time.sleep" ]
[((114, 125), 'time.time', 'time.time', ([], {}), '()\n', (123, 125), False, 'import time\n'), ((142, 155), 'time.sleep', 'time.sleep', (['(2)'], {}), '(2)\n', (152, 155), False, 'import time\n'), ((167, 178), 'time.time', 'time.time', ([], {}), '()\n', (176, 178), False, 'import time\n')]
from stockquant.util import logger from datetime import datetime from stockquant.settings import CQ_Config from stockquant.util.models import TaskTable from stockquant.util.stringhelper import TaskEnum import concurrent.futures from stockquant.util.database import get_new_session from tqdm import tqdm import time impor...
[ "stockquant.util.database.get_new_session", "tqdm.tqdm", "sqlalchemy.desc", "time.sleep", "stockquant.util.logger.Logger", "copy.deepcopy", "datetime.datetime.strftime" ]
[((366, 389), 'stockquant.util.logger.Logger', 'logger.Logger', (['__name__'], {}), '(__name__)\n', (379, 389), False, 'from stockquant.util import logger\n'), ((690, 707), 'stockquant.util.database.get_new_session', 'get_new_session', ([], {}), '()\n', (705, 707), False, 'from stockquant.util.database import get_new_s...
from PySide2 import QtWidgets from maya import cmds from .base import Button class Node(QtWidgets.QWidget): def __init__(self, parent, node, text=None): super(Node, self).__init__(parent) # variable self._node = node text = text if text else node # create layout l...
[ "maya.cmds.select", "PySide2.QtWidgets.QHBoxLayout", "maya.cmds.objExists" ]
[((328, 355), 'PySide2.QtWidgets.QHBoxLayout', 'QtWidgets.QHBoxLayout', (['self'], {}), '(self)\n', (349, 355), False, 'from PySide2 import QtWidgets\n'), ((895, 920), 'maya.cmds.objExists', 'cmds.objExists', (['self.node'], {}), '(self.node)\n', (909, 920), False, 'from maya import cmds\n'), ((934, 956), 'maya.cmds.se...
#!/usr/bin/env python3 '''usage: python3 client.py <IP address of master_client.py> ''' import time import subprocess import socket from time import sleep import os import sys import io import pycurl import stem.process from humanize import naturalsize from stem.util import term filename = open('output.txt', 'w') SO...
[ "socket.socket", "humanize.naturalsize", "pycurl.Curl", "io.BytesIO", "stem.util.term.format", "time.time" ]
[((615, 626), 'time.time', 'time.time', ([], {}), '()\n', (624, 626), False, 'import time\n'), ((1322, 1334), 'io.BytesIO', 'io.BytesIO', ([], {}), '()\n', (1332, 1334), False, 'import io\n'), ((1346, 1359), 'pycurl.Curl', 'pycurl.Curl', ([], {}), '()\n', (1357, 1359), False, 'import pycurl\n'), ((1701, 1712), 'time.ti...
# -*- coding: utf-8 -*- # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # This program is free software; you can redistribute it and/or modify # it under the terms of the MIT License. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the...
[ "zeus.common.class_factory.ClassFactory.get_cls", "logging.debug", "copy.deepcopy" ]
[((848, 891), 'logging.debug', 'logging.debug', (['"""Start to Create a Network."""'], {}), "('Start to Create a Network.')\n", (861, 891), False, 'import logging\n'), ((909, 958), 'zeus.common.class_factory.ClassFactory.get_cls', 'ClassFactory.get_cls', (['ClassType.NETWORK', '"""Module"""'], {}), "(ClassType.NETWORK,...
from django.db import models from apps.love.models import LovableModel class TestBlogPost(LovableModel): """ A model that is used for testing. """ title = models.CharField(max_length=200) slug = models.SlugField() def __unicode__(self): return self.title
[ "django.db.models.SlugField", "django.db.models.CharField" ]
[((173, 205), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(200)'}), '(max_length=200)\n', (189, 205), False, 'from django.db import models\n'), ((217, 235), 'django.db.models.SlugField', 'models.SlugField', ([], {}), '()\n', (233, 235), False, 'from django.db import models\n')]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Nov 3 16:43:16 2017 @author: <NAME> """ from aiohttp import web import aiohttp_jinja2 import json import logging import sys logging.basicConfig(format='%(name)-12s:%(lineno)-3s | %(levelname)-8s | %(message)s' , stream=sys.stdout, lev...
[ "logging.basicConfig", "json.dumps", "aiohttp.web.Response", "logging.getLogger" ]
[((194, 330), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(name)-12s:%(lineno)-3s | %(levelname)-8s | %(message)s"""', 'stream': 'sys.stdout', 'level': 'logging.DEBUG'}), "(format=\n '%(name)-12s:%(lineno)-3s | %(levelname)-8s | %(message)s', stream=sys.\n stdout, level=logging.DEBUG)\n", (...
# 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, software # d...
[ "oslo_utils.uuidutils.generate_uuid", "tempest.lib.decorators.attr", "tempest.lib.decorators.idempotent_id", "ironic_tempest_plugin.common.waiters.wait_for_allocation" ]
[((1732, 1796), 'tempest.lib.decorators.idempotent_id', 'decorators.idempotent_id', (['"""9203ea28-3c61-4108-8498-22247b654ff6"""'], {}), "('9203ea28-3c61-4108-8498-22247b654ff6')\n", (1756, 1796), False, 'from tempest.lib import decorators\n'), ((2759, 2823), 'tempest.lib.decorators.idempotent_id', 'decorators.idempot...
# (C) Copyright 2007-2021 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in LICENSE.txt and may be redistributed only under # the conditions described in the aforementioned license. The license # is also available online at...
[ "weakref.WeakKeyDictionary", "traits.api.Instance" ]
[((1007, 1034), 'weakref.WeakKeyDictionary', 'weakref.WeakKeyDictionary', ([], {}), '()\n', (1032, 1034), False, 'import weakref\n'), ((1510, 1538), 'traits.api.Instance', 'Instance', (['IExtensionRegistry'], {}), '(IExtensionRegistry)\n', (1518, 1538), False, 'from traits.api import Any, HasTraits, Instance, Str, Unde...
from django.contrib import admin from .models import Reference #admin.site.register(Post) @admin.register(Reference) class ReferenceAdmin(admin.ModelAdmin): list_display = ('title', 'slug', 'description', 'link', 'author', 'created', 'updated') list_filter = ('title', 'description', 'link', 'author', 'created'...
[ "django.contrib.admin.register" ]
[((92, 117), 'django.contrib.admin.register', 'admin.register', (['Reference'], {}), '(Reference)\n', (106, 117), False, 'from django.contrib import admin\n')]
# Copyright 2016 <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, softw...
[ "gitutils.paths.path_to_git_repo", "fudge.patch", "gitutils.paths.path_to_git_root" ]
[((813, 842), 'fudge.patch', 'fudge.patch', (['"""os.path.exists"""'], {}), "('os.path.exists')\n", (824, 842), False, 'import fudge\n'), ((1093, 1122), 'fudge.patch', 'fudge.patch', (['"""os.path.exists"""'], {}), "('os.path.exists')\n", (1104, 1122), False, 'import fudge\n'), ((1008, 1038), 'gitutils.paths.path_to_gi...
import unittest from yauber_algo.errors import * class CategorizeTestCase(unittest.TestCase): def test_categorize(self): import yauber_algo.sanitychecks as sc from numpy import array, nan, inf import os import sys import pandas as pd import numpy as np from...
[ "pandas.Series", "numpy.array", "numpy.random.random", "yauber_algo.sanitychecks.SanityChecker" ]
[((473, 495), 'yauber_algo.sanitychecks.SanityChecker', 'sc.SanityChecker', (['algo'], {}), '(algo)\n', (489, 495), True, 'import yauber_algo.sanitychecks as sc\n'), ((619, 679), 'numpy.array', 'np.array', (['[0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0]'], {}), '([0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0]...
from difflib import HtmlDiff from django.shortcuts import get_object_or_404, render_to_response, redirect from django.http import HttpResponseForbidden from django.conf import settings from django.views.decorators.http import require_POST from django.contrib.auth.decorators import login_required, user_passes_test from ...
[ "markupwiki.models.Article.objects.get", "markupwiki.forms.ArticleRenameForm", "django.contrib.messages.error", "django.shortcuts.get_object_or_404", "django.template.RequestContext", "django.http.HttpResponseForbidden", "django.contrib.messages.info", "django.contrib.auth.decorators.user_passes_test"...
[((2886, 2920), 'django.contrib.auth.decorators.user_passes_test', 'user_passes_test', (['EDITOR_TEST_FUNC'], {}), '(EDITOR_TEST_FUNC)\n', (2902, 2920), False, 'from django.contrib.auth.decorators import login_required, user_passes_test\n'), ((5667, 5704), 'django.contrib.auth.decorators.user_passes_test', 'user_passes...
# Builtin import os import inspect # NOTE: the behavior of inspect.currentframe() likely requires cpython. # https://docs.python.org/2.7/library/inspect.html#inspect.currentframe _this_file = inspect.getframeinfo(inspect.currentframe()).filename TEST_DIR = os.path.dirname(os.path.abspath(_this_file)) def get_test_fi...
[ "os.path.abspath", "inspect.currentframe", "os.path.join" ]
[((274, 301), 'os.path.abspath', 'os.path.abspath', (['_this_file'], {}), '(_this_file)\n', (289, 301), False, 'import os\n'), ((589, 622), 'os.path.join', 'os.path.join', (['TEST_DIR', 'file_name'], {}), '(TEST_DIR, file_name)\n', (601, 622), False, 'import os\n'), ((214, 236), 'inspect.currentframe', 'inspect.current...
from loguru import logger import json import sys from pathlib import Path logger.remove() logger.add(sys.stderr, level="INFO", enqueue=True) def load_dataherb_config(config_path=None, no_config_error=True): """[Deprecated] Loads the dataherb config file. Load the content from the specified file as the c...
[ "loguru.logger.add", "loguru.logger.debug", "pathlib.Path.home", "loguru.logger.error", "loguru.logger.remove", "json.load" ]
[((75, 90), 'loguru.logger.remove', 'logger.remove', ([], {}), '()\n', (88, 90), False, 'from loguru import logger\n'), ((91, 141), 'loguru.logger.add', 'logger.add', (['sys.stderr'], {'level': '"""INFO"""', 'enqueue': '(True)'}), "(sys.stderr, level='INFO', enqueue=True)\n", (101, 141), False, 'from loguru import logg...
from flask import Flask, render_template from newsapi import NewsApiClient app = Flask(__name__) @app.route('/') def Index(): newsapi = NewsApiClient(api_key="<KEY>") topheadlines = newsapi.get_top_headlines(sources="al-jazeera-english") articles = topheadlines['articles'] desc = [] ...
[ "flask.render_template", "newsapi.NewsApiClient", "flask.Flask" ]
[((89, 104), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (94, 104), False, 'from flask import Flask, render_template\n'), ((154, 184), 'newsapi.NewsApiClient', 'NewsApiClient', ([], {'api_key': '"""<KEY>"""'}), "(api_key='<KEY>')\n", (167, 184), False, 'from newsapi import NewsApiClient\n'), ((611, 655)...
#!/usr/bin/env python import argparse import os import sys import time import zwoasi as asi __author__ = '<NAME>' __version__ = '0.0.22' __license__ = 'MIT' def save_control_values(filename, settings): filename += '.txt' with open(filename, 'w') as f: for k in sorted(settings.keys()): f...
[ "zwoasi.init", "sys.exit", "zwoasi.Camera", "argparse.ArgumentParser", "os.getenv", "time.sleep", "zwoasi.get_num_cameras", "zwoasi.list_cameras" ]
[((432, 456), 'os.getenv', 'os.getenv', (['"""ZWO_ASI_LIB"""'], {}), "('ZWO_ASI_LIB')\n", (441, 456), False, 'import os\n'), ((467, 543), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Process and save images from a camera"""'}), "(description='Process and save images from a camera')\n",...
excluded_notebooks = ["Emukit-tutorial-multi-fidelity-bayesian-optimization.ipynb", "Emukit-Categorical-with-Tensorflow.ipynb"] import pytest import os from nbconvert.preprocessors import ExecutePreprocessor import nbformat notebook_directory = "./notebooks/" def get_notebook_names(): """ Get names of all notebook...
[ "nbformat.read", "os.listdir", "os.path.join", "nbconvert.preprocessors.ExecutePreprocessor" ]
[((421, 451), 'os.listdir', 'os.listdir', (['notebook_directory'], {}), '(notebook_directory)\n', (431, 451), False, 'import os\n'), ((776, 808), 'nbconvert.preprocessors.ExecutePreprocessor', 'ExecutePreprocessor', ([], {'timeout': '(120)'}), '(timeout=120)\n', (795, 808), False, 'from nbconvert.preprocessors import E...
# -*- coding: UTF-8 -*- # Authors: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # # License: BSD (3-clause) import mne import os.path import pytest import copy import itertools import numpy as np from mne.datasets import testing from mne.io.fieldtrip.utils import NOINFO_WARNING, _create_events from mne.utils import _c...
[ "pytest.mark.filterwarnings", "mne.utils._check_pandas_installed", "mne.io.fieldtrip.tests.helpers.get_data_paths", "numpy.array", "copy.deepcopy", "mne.io.fieldtrip.tests.helpers.assert_warning_in_record", "mne.io.read_evoked_fieldtrip", "numpy.arange", "mne.datasets.testing.data_path", "numpy.re...
[((1722, 1793), 'pytest.mark.filterwarnings', 'pytest.mark.filterwarnings', (['"""ignore:.*parse meas date.*:RuntimeWarning"""'], {}), "('ignore:.*parse meas date.*:RuntimeWarning')\n", (1748, 1793), False, 'import pytest\n'), ((1795, 1866), 'pytest.mark.filterwarnings', 'pytest.mark.filterwarnings', (['"""ignore:.*num...
import requests HTTP_SUCCESS_STATUS_CODES = [200, 201, 202, 203, 204] class WebClientError(Exception): def __init__(self, message, status_code, content): super().__init__(message) self.message = message self.status_code = status_code self.content = content class WebClient: d...
[ "requests.put", "requests.post", "requests.get" ]
[((426, 461), 'requests.get', 'requests.get', (['(self._base + resource)'], {}), '(self._base + resource)\n', (438, 461), False, 'import requests\n'), ((866, 975), 'requests.post', 'requests.post', (['(self._base + resource)'], {'json': 'data', 'files': "({'file': (file.filename, file)} if file else None)"}), "(self._b...
import os import signal from ..clients.adb_wrapper import AdbWrapper from ..clients.device import Device from ..log import Log def get_root(): project_root = os.path.dirname(os.path.abspath(__file__)).replace('\\', '/') project_root = os.path.abspath(project_root + '/../..') return project_root class A...
[ "os.kill", "os.path.isfile", "os.path.isdir", "os.getpid", "os.path.abspath" ]
[((246, 286), 'os.path.abspath', 'os.path.abspath', (["(project_root + '/../..')"], {}), "(project_root + '/../..')\n", (261, 286), False, 'import os\n'), ((181, 206), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (196, 206), False, 'import os\n'), ((1123, 1155), 'os.path.isfile', 'os.path.i...
# Generated by Django 3.2.11 on 2022-01-07 21:56 from django.db import migrations def update_site_forward(apps, schema_editor): """Set site domain and name.""" Transposition = apps.get_model("instruments", "Transposition") Transposition.objects.update_or_create( name="Alto Clef", ) Transp...
[ "django.db.migrations.RunPython" ]
[((985, 1053), 'django.db.migrations.RunPython', 'migrations.RunPython', (['update_site_forward', 'migrations.RunPython.noop'], {}), '(update_site_forward, migrations.RunPython.noop)\n', (1005, 1053), False, 'from django.db import migrations\n')]
# # Copyright 2018 the original author or authors. # # 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...
[ "twisted.internet.reactor.callLater", "twisted.internet.defer.failure.Failure" ]
[((2548, 2595), 'twisted.internet.reactor.callLater', 'reactor.callLater', (['(0)', 'self.perform_vlan_tagging'], {}), '(0, self.perform_vlan_tagging)\n', (2565, 2595), False, 'from twisted.internet import reactor\n'), ((7609, 7627), 'twisted.internet.defer.failure.Failure', 'failure.Failure', (['e'], {}), '(e)\n', (76...
import os import collections import copy from openpype.api import Anatomy from openpype_modules.ftrack.lib import BaseAction, statics_icon class CreateFolders(BaseAction): identifier = "create.folders" label = "Create Folders" icon = statics_icon("ftrack", "action_icons", "CreateFolders.svg") def dis...
[ "os.path.exists", "os.makedirs", "openpype_modules.ftrack.lib.statics_icon", "os.path.normpath", "collections.defaultdict", "copy.deepcopy", "openpype.api.Anatomy" ]
[((248, 307), 'openpype_modules.ftrack.lib.statics_icon', 'statics_icon', (['"""ftrack"""', '"""action_icons"""', '"""CreateFolders.svg"""'], {}), "('ftrack', 'action_icons', 'CreateFolders.svg')\n", (260, 307), False, 'from openpype_modules.ftrack.lib import BaseAction, statics_icon\n'), ((3575, 3596), 'openpype.api.A...
import autosklearn.classification import autosklearn.metrics import sklearn.model_selection import sklearn.datasets import sklearn.metrics import pandas as pd train = pd.read_csv("train_final.csv") test = pd.read_csv("test_final.csv") X = train.drop(['target'], axis=1) y = train['target'] X_train, X_test, y_train, y...
[ "pandas.read_csv" ]
[((168, 198), 'pandas.read_csv', 'pd.read_csv', (['"""train_final.csv"""'], {}), "('train_final.csv')\n", (179, 198), True, 'import pandas as pd\n'), ((206, 235), 'pandas.read_csv', 'pd.read_csv', (['"""test_final.csv"""'], {}), "('test_final.csv')\n", (217, 235), True, 'import pandas as pd\n')]
from __future__ import absolute_import import unittest import os import torch from torchvision import transforms from data import data from data import dataloaders class test_data(unittest.TestCase): def setUp(self): self.path=os.getcwd() + '/data' self.name='cifar10' self.trans= tra...
[ "data.dataloaders.CIFARX", "data.data.CIFAR", "torchvision.transforms.RandomHorizontalFlip", "os.getcwd", "torch.nonzero", "torch.randint", "torchvision.transforms.ToTensor", "torchvision.transforms.RandomResizedCrop" ]
[((558, 648), 'data.data.CIFAR', 'data.CIFAR', ([], {'root': 'self.path', 'train': '(True)', 'trans': 'self.trans', 'sample': 'None', 'name': 'self.name'}), '(root=self.path, train=True, trans=self.trans, sample=None, name=\n self.name)\n', (568, 648), False, 'from data import data\n'), ((882, 911), 'torch.randint',...
# Copyright 2014 <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 applicable law or agreed to in writ...
[ "numpy.array", "math.degrees", "math.radians" ]
[((985, 1002), 'numpy.array', 'array', (['[10, 0, 0]'], {}), '([10, 0, 0])\n', (990, 1002), False, 'from numpy import array\n'), ((3334, 3350), 'numpy.array', 'array', (['[0, 1, 0]'], {}), '([0, 1, 0])\n', (3339, 3350), False, 'from numpy import array\n'), ((1977, 1995), 'math.degrees', 'degrees', (['euler.yaw'], {}), ...
from __future__ import print_function import httplib2 import os from apiclient import discovery from oauth2client import client from oauth2client import tools from oauth2client.file import Storage try: import argparse flags = argparse.ArgumentParser(parents=[tools.argparser]).parse_args() except ImportError:...
[ "os.path.exists", "os.makedirs", "argparse.ArgumentParser", "os.path.join", "oauth2client.client.flow_from_clientsecrets", "oauth2client.tools.run", "oauth2client.file.Storage", "httplib2.Http", "oauth2client.tools.run_flow", "apiclient.discovery.build", "os.path.expanduser" ]
[((894, 917), 'os.path.expanduser', 'os.path.expanduser', (['"""~"""'], {}), "('~')\n", (912, 917), False, 'import os\n'), ((939, 977), 'os.path.join', 'os.path.join', (['home_dir', '""".credentials"""'], {}), "(home_dir, '.credentials')\n", (951, 977), False, 'import os\n'), ((1079, 1139), 'os.path.join', 'os.path.joi...
""" test GitHub queries for specific results we know were reported on various weekly Developer In Residence Reports 15 Nov - 21 Nov 2021: https://lukasz.langa.pl/4f7c2091-2a74-48ab-99d7-8521c4fa8363/ 30 Aug - 5 Sept 2021: https://lukasz.langa.pl/94b5086c-81df-498a-9f8b-f9e06f5d9538/ Tests can take some time since PyG...
[ "datetime.datetime", "weekly_pr_summary.filter_prs_from_date_range", "config.repo.get_pull", "utilities.check_github_rate_limit" ]
[((1078, 1118), 'datetime.datetime', 'datetime.datetime', (['(2021)', '(11)', '(16)', '(0)', '(0)', '(0)'], {}), '(2021, 11, 16, 0, 0, 0)\n', (1095, 1118), False, 'import datetime\n'), ((1137, 1180), 'datetime.datetime', 'datetime.datetime', (['(2021)', '(11)', '(16)', '(23)', '(59)', '(59)'], {}), '(2021, 11, 16, 23, ...
"""Support for Eufy lights.""" from __future__ import annotations import lakeside from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_HS_COLOR, SUPPORT_BRIGHTNESS, SUPPORT_COLOR, SUPPORT_COLOR_TEMP, LightEntity, ) from homeassistant.core import HomeAssistant...
[ "homeassistant.util.color.color_temperature_kelvin_to_mired", "homeassistant.util.color.color_temperature_mired_to_kelvin", "homeassistant.util.color.color_RGB_to_hs", "homeassistant.util.color.color_hsv_to_RGB", "lakeside.bulb" ]
[((1437, 1489), 'lakeside.bulb', 'lakeside.bulb', (['self._address', 'self._code', 'self._type'], {}), '(self._address, self._code, self._type)\n', (1450, 1489), False, 'import lakeside\n'), ((2932, 2964), 'homeassistant.util.color.color_temperature_kelvin_to_mired', 'kelvin_to_mired', (['EUFY_MAX_KELVIN'], {}), '(EUFY...
# -*- coding: utf-8 -*- """ Various dependencies that are required for file-metadata which need some special handling. """ from __future__ import (division, absolute_import, unicode_literals, print_function) import ctypes.util import hashlib import os import subprocess import sys from distutil...
[ "subprocess.check_output", "os.path.exists", "urllib2.urlopen", "sys.getfilesystemencoding", "os.makedirs", "subprocess.check_call", "shutil.which", "os.path.join", "os.environ.get", "sys.platform.startswith", "distro.id", "os.path.dirname", "os.path.isdir", "subprocess.call", "hashlib.s...
[((530, 555), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (545, 555), False, 'import os\n'), ((587, 643), 'os.path.join', 'os.path.join', (['PROJECT_PATH', '"""file_metadata"""', '"""datafiles"""'], {}), "(PROJECT_PATH, 'file_metadata', 'datafiles')\n", (599, 643), False, 'import os\n'), (...
import newClient as client import server import unittest import crypto_funcs as crypto import messages as Messages; class FlaskTestCase(unittest.TestCase): def setUp(self): server.key_pub_server, server.key_priv_server = server.init(); self.flaskapp = server.app; self.app = self.flaskapp.te...
[ "messages.add_rsa_decrypt", "crypto_funcs.has_attribute", "server.init", "newClient.TestRequest", "crypto_funcs.byte_to_string", "messages.SymmetricKeyAnswer.create", "unittest.main", "messages.KeyExchangeRequest.create", "crypto_funcs.create_rsa_key" ]
[((3479, 3494), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3492, 3494), False, 'import unittest\n'), ((234, 247), 'server.init', 'server.init', ([], {}), '()\n', (245, 247), False, 'import server\n'), ((475, 503), 'newClient.TestRequest', 'client.TestRequest', (['self.app'], {}), '(self.app)\n', (493, 503), T...
"""Basic Package """ import numpy as np from .base import MFPackageDIS from .reader import MFFileReader __all__ = ['BAS6'] class BAS6(MFPackageDIS): """Basic Package""" valid_options = ['XSECTION', 'CHTOCH', 'FREE', 'PRINTTIME', 'SHOWPROGRESS', 'STOPERROR'] _Options = [] @pr...
[ "numpy.empty" ]
[((4623, 4667), 'numpy.empty', 'np.empty', (['self.dis.shape3d', 'self._float_type'], {}), '(self.dis.shape3d, self._float_type)\n', (4631, 4667), True, 'import numpy as np\n'), ((3873, 3904), 'numpy.empty', 'np.empty', (['self.dis.shape3d', '"""i"""'], {}), "(self.dis.shape3d, 'i')\n", (3881, 3904), True, 'import nump...
########################################################################## # # Copyright (c) 2008-2011, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redis...
[ "StringUtil.nodeFromAttributePath", "_IECoreMaya._parameterisedHolderSetParameterisedValues", "_IECoreMaya._parameterisedHolderParameterPlug", "StringUtil.plugFromString", "_IECoreMaya._parameterisedHolderSetParameterised", "_IECoreMaya._parameterisedHolderSetNodeValue", "IECore.ClassLoader.defaultLoade...
[((5257, 5311), '_IECoreMaya._parameterisedHolderGetParameterised', '_IECoreMaya._parameterisedHolderGetParameterised', (['self'], {}), '(self)\n', (5305, 5311), False, 'import _IECoreMaya\n'), ((7127, 7187), '_IECoreMaya._parameterisedHolderSetParameterisedValues', '_IECoreMaya._parameterisedHolderSetParameterisedValu...
# # Copyright 2021 Red Hat Inc. # SPDX-License-Identifier: Apache-2.0 # """Updates report summary tables in the database.""" import logging from decimal import Decimal from dateutil import parser from tenant_schemas.utils import schema_context from api.provider.models import Provider from koku.pg_partition import Par...
[ "logging.getLogger", "masu.util.azure.common.get_bills_from_provider", "masu.util.aws.common.get_bills_from_provider", "dateutil.parser.parse", "masu.database.azure_report_db_accessor.AzureReportDBAccessor", "masu.database.cost_model_db_accessor.CostModelDBAccessor", "masu.database.provider_db_accessor....
[((1278, 1305), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1295, 1305), False, 'import logging\n'), ((5452, 5505), 'masu.util.ocp.common.get_cluster_id_from_provider', 'get_cluster_id_from_provider', (['openshift_provider_uuid'], {}), '(openshift_provider_uuid)\n', (5480, 5505), Fals...
import json import sys import fileinput data = dict() def read_out_experiment(experiment): global data with open(experiment) as json_file: data = json.load(json_file) # print(data) def node_id_to_hostname(hostname=None): if hostname is None: raise Exception('Given hostname is None...
[ "json.load", "fileinput.FileInput" ]
[((164, 184), 'json.load', 'json.load', (['json_file'], {}), '(json_file)\n', (173, 184), False, 'import json\n'), ((3422, 3480), 'fileinput.FileInput', 'fileinput.FileInput', (['filename'], {'inplace': '(True)', 'backup': '""".bak"""'}), "(filename, inplace=True, backup='.bak')\n", (3441, 3480), False, 'import fileinp...
from enum import Enum, auto """ Enum é muito utilizado quando se precisa escolher um conjunto de dados, tipos ou comandos. """ class Direction(Enum): """O 'auto' atribui automaticamente um valor aos campos.""" right = auto() left = auto() up = auto() down = auto() def move(direction): ...
[ "enum.auto" ]
[((234, 240), 'enum.auto', 'auto', ([], {}), '()\n', (238, 240), False, 'from enum import Enum, auto\n'), ((252, 258), 'enum.auto', 'auto', ([], {}), '()\n', (256, 258), False, 'from enum import Enum, auto\n'), ((268, 274), 'enum.auto', 'auto', ([], {}), '()\n', (272, 274), False, 'from enum import Enum, auto\n'), ((28...
from davis.models.database.gsdb import Gsdb from davis.models.utils.crypto import compare_psw # Users columns UID_COL = 3 USERNAME_COL = 4 PASSWORD_COL = 5 class Login(object): def __init__(self, ws): self.worksheet = Gsdb(ws) def verify_user(self, username, psw): cell = self.w...
[ "davis.models.database.gsdb.Gsdb" ]
[((244, 252), 'davis.models.database.gsdb.Gsdb', 'Gsdb', (['ws'], {}), '(ws)\n', (248, 252), False, 'from davis.models.database.gsdb import Gsdb\n')]
import flask from robostat.rulesets.xsumo import XSumoRuleset from robostat.rulesets.rescue import RescueRuleset from robostat.rulesets.tanssi import DanceInterviewRuleset, DancePerformanceRuleset from robostat.rulesets.haastattelu import HaastatteluRuleset from robostat.web.views.timetable import event_renderer @even...
[ "flask.render_template", "robostat.web.views.timetable.event_renderer.of" ]
[((316, 347), 'robostat.web.views.timetable.event_renderer.of', 'event_renderer.of', (['XSumoRuleset'], {}), '(XSumoRuleset)\n', (333, 347), False, 'from robostat.web.views.timetable import event_renderer\n'), ((457, 489), 'robostat.web.views.timetable.event_renderer.of', 'event_renderer.of', (['RescueRuleset'], {}), '...
from dataclasses import dataclass from os.path import abspath @dataclass class BaseOpts: verbose_make: bool jobs: str configure_dir: str install_dir: str mono_source_root: str mxe_prefix: str @dataclass class RuntimeOpts(BaseOpts): configuration: str release: bool enable_cxx: bo...
[ "os.path.abspath" ]
[((1140, 1167), 'os.path.abspath', 'abspath', (['args.configure_dir'], {}), '(args.configure_dir)\n', (1147, 1167), False, 'from os.path import abspath\n'), ((1191, 1216), 'os.path.abspath', 'abspath', (['args.install_dir'], {}), '(args.install_dir)\n', (1198, 1216), False, 'from os.path import abspath\n'), ((1245, 127...
"Bag Of Discriptors" import cv2 import numpy as np class Detector(object): def __init__(self, verbose=True): ''' Detector (class) constructor. Args: verbose(bool): Indicator for log and progress bar ''' self.orb = cv2.ORB_create() self.bf = cv...
[ "cv2.BFMatcher", "numpy.argmax", "numpy.max", "cv2.ORB_create", "cv2.imread" ]
[((283, 299), 'cv2.ORB_create', 'cv2.ORB_create', ([], {}), '()\n', (297, 299), False, 'import cv2\n'), ((318, 366), 'cv2.BFMatcher', 'cv2.BFMatcher', (['cv2.NORM_HAMMING'], {'crossCheck': '(True)'}), '(cv2.NORM_HAMMING, crossCheck=True)\n', (331, 366), False, 'import cv2\n'), ((713, 755), 'cv2.imread', 'cv2.imread', (...
import py_controller_binding import serial ser = serial.Serial('/dev/ttyUSB0',9600) s = [0,1] controller = py_controller_binding.controller(0.1, 0.1, 0.1, 0.1, 0.1) print(controller.GetError()) while True: read_serial=ser.readline().strip() values = read_serial.decode('ascii').split(',') a = [float(s) f...
[ "serial.Serial", "py_controller_binding.controller" ]
[((51, 86), 'serial.Serial', 'serial.Serial', (['"""/dev/ttyUSB0"""', '(9600)'], {}), "('/dev/ttyUSB0', 9600)\n", (64, 86), False, 'import serial\n'), ((110, 167), 'py_controller_binding.controller', 'py_controller_binding.controller', (['(0.1)', '(0.1)', '(0.1)', '(0.1)', '(0.1)'], {}), '(0.1, 0.1, 0.1, 0.1, 0.1)\n', ...
import numpy as np from girard import sampling def all_coordinates_are_positive(vec): return all(map(lambda pos: pos >= 0, vec)) def estimate_solid_angle(spanning_matrix, sample_size): dim = len(spanning_matrix) inverse = np.linalg.inv(spanning_matrix) points_inside_cone = 0 for i in range(sample_...
[ "numpy.linalg.inv", "girard.sampling.sample_hypersphere_point" ]
[((236, 266), 'numpy.linalg.inv', 'np.linalg.inv', (['spanning_matrix'], {}), '(spanning_matrix)\n', (249, 266), True, 'import numpy as np\n'), ((360, 398), 'girard.sampling.sample_hypersphere_point', 'sampling.sample_hypersphere_point', (['dim'], {}), '(dim)\n', (393, 398), False, 'from girard import sampling\n')]
import os from abc import abstractmethod from time import sleep from typing import TYPE_CHECKING from pyramid.httpexceptions import HTTPBadGateway from weaver.formats import CONTENT_TYPE_APP_JSON from weaver.utils import get_cookie_headers, get_settings, request_extra from weaver.wps.utils import get_wps_output_dir, ...
[ "weaver.utils.get_settings", "weaver.wps.utils.get_wps_output_dir", "weaver.utils.request_extra", "weaver.wps.utils.get_wps_output_url", "time.sleep", "weaver.utils.get_cookie_headers" ]
[((1730, 1744), 'weaver.utils.get_settings', 'get_settings', ([], {}), '()\n', (1742, 1744), False, 'from weaver.utils import get_cookie_headers, get_settings, request_extra\n'), ((1846, 1958), 'weaver.utils.request_extra', 'request_extra', (['method'], {'url': 'url', 'settings': 'self.settings', 'headers': 'self.heade...
import os import cv2 import numpy as np def convert(size, box): ''' convert (xmin, ymin, xmax, ymax) to (cx/w, cy/h, bw/w, bw/h) param: size: tuple (im_width, im_height) box: list [xmin, ymin, xmax, ymax] return: tuple (cx/w, cy/h, bw/w, bw/h) ''' dw = 1. / size[0] d...
[ "numpy.array" ]
[((957, 975), 'numpy.array', 'np.array', (['box_list'], {}), '(box_list)\n', (965, 975), True, 'import numpy as np\n')]
"""This submodule defines the "vanilla" `MODNetModel`, i.e. a single model with deterministic weights and outputs. """ from typing import List, Tuple, Dict, Optional, Callable, Any from pathlib import Path import multiprocessing import pandas as pd import numpy as np from sklearn.preprocessing import StandardScaler,...
[ "zipfile.ZipFile", "pandas.to_pickle", "multiprocessing.cpu_count", "tensorflow.keras.layers.BatchNormalization", "sklearn.metrics.roc_auc_score", "tensorflow.keras.callbacks.EarlyStopping", "numpy.array", "tensorflow.keras.layers.Dense", "numpy.nanmean", "pandas.read_pickle", "tensorflow.keras....
[((5852, 5890), 'tensorflow.keras.layers.Input', 'tf.keras.layers.Input', ([], {'shape': '(n_feat,)'}), '(shape=(n_feat,))\n', (5873, 5890), True, 'import tensorflow as tf\n'), ((8390, 8446), 'tensorflow.keras.models.Model', 'tf.keras.models.Model', ([], {'inputs': 'f_input', 'outputs': 'final_out'}), '(inputs=f_input,...
#!/bin/python3 # https://www.hackerrank.com/challenges/find-the-median import sys import math def findTheMedian(n, arr): # Complete this function arr.sort() mid = n/2 ceil = math.ceil(mid) floor = math.ceil(mid+0.45) return (arr[ceil-1] + arr[floor-1])/2 n = int(input().strip()) ...
[ "math.ceil" ]
[((200, 214), 'math.ceil', 'math.ceil', (['mid'], {}), '(mid)\n', (209, 214), False, 'import math\n'), ((228, 249), 'math.ceil', 'math.ceil', (['(mid + 0.45)'], {}), '(mid + 0.45)\n', (237, 249), False, 'import math\n')]
from django.shortcuts import render def learn_my97(request): return render(request, 'my97.html')
[ "django.shortcuts.render" ]
[((73, 101), 'django.shortcuts.render', 'render', (['request', '"""my97.html"""'], {}), "(request, 'my97.html')\n", (79, 101), False, 'from django.shortcuts import render\n')]
import unittest from traits.testing.api import doctest_for_module import codetools.util.dict as dict class DictDocTestCase(doctest_for_module(dict)): pass if __name__ == '__main__': import sys unittest.main(argv=sys.argv)
[ "unittest.main", "traits.testing.api.doctest_for_module" ]
[((125, 149), 'traits.testing.api.doctest_for_module', 'doctest_for_module', (['dict'], {}), '(dict)\n', (143, 149), False, 'from traits.testing.api import doctest_for_module\n'), ((209, 237), 'unittest.main', 'unittest.main', ([], {'argv': 'sys.argv'}), '(argv=sys.argv)\n', (222, 237), False, 'import unittest\n')]
# Copyright (c) 2019 StackHPC Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
[ "kolla_ansible.filters.service_enabled_and_mapped_to_host", "jinja2.Environment", "mock.patch.object", "kolla_ansible.filters.select_services_enabled_and_mapped_to_host", "kolla_ansible.filters.service_enabled", "kolla_ansible.filters.service_mapped_to_host" ]
[((3847, 3892), 'mock.patch.object', 'mock.patch.object', (['filters', '"""service_enabled"""'], {}), "(filters, 'service_enabled')\n", (3864, 3892), False, 'import mock\n'), ((3898, 3950), 'mock.patch.object', 'mock.patch.object', (['filters', '"""service_mapped_to_host"""'], {}), "(filters, 'service_mapped_to_host')\...
from setuptools import setup, find_packages setup( name = "TSPy", version = "0.1", packages = find_packages(), install_requires = [], author = "fkochan", description = "A Python wrapper for the TradeStation WebAPI", url = "https://github.com/fkochan/TSPy" )
[ "setuptools.find_packages" ]
[((107, 122), 'setuptools.find_packages', 'find_packages', ([], {}), '()\n', (120, 122), False, 'from setuptools import setup, find_packages\n')]
''' Author: <NAME> @ CUHK-CSE Homepage: https://dekura.github.io/ Date: 2021-04-15 20:48:22 LastEditTime: 2021-04-18 13:38:46 Contact: <EMAIL> Description: parse the results from the txt and save the results to a sqlite db. ''' import re from pathlib import Path from database import RESULT_DB my_db = RESULT_DB('./r...
[ "re.search", "database.RESULT_DB", "pathlib.Path" ]
[((306, 330), 'database.RESULT_DB', 'RESULT_DB', (['"""./result.db"""'], {}), "('./result.db')\n", (315, 330), False, 'from database import RESULT_DB\n'), ((342, 446), 'pathlib.Path', 'Path', (['"""/home/guojin/projects/develset_opc/levelset_net/multiruns/iccad13_outputs/best_results"""'], {}), "(\n '/home/guojin/pr...
from globus_cli.login_manager import LoginManager from globus_cli.parsing import command from globus_cli.termio import FORMAT_TEXT_RECORD, formatted_print from ._common import ( format_session_enforcement, group_id_arg, parse_join_requests, parse_members_visibility, parse_roles, parse_signup_fi...
[ "globus_cli.parsing.command", "globus_cli.termio.formatted_print", "globus_cli.login_manager.LoginManager.requires_login" ]
[((367, 382), 'globus_cli.parsing.command', 'command', (['"""show"""'], {}), "('show')\n", (374, 382), False, 'from globus_cli.parsing import command\n'), ((384, 435), 'globus_cli.login_manager.LoginManager.requires_login', 'LoginManager.requires_login', (['LoginManager.GROUPS_RS'], {}), '(LoginManager.GROUPS_RS)\n', (...
import torch def reference_orgqr(v, tau, checks=True): """ Unoptimized differentiable implementation of ORGQR. Memory consumption linear in matrix rank. Intended for use only within the test suite. """ if checks: assert torch.is_tensor(v) and torch.is_tensor(tau) assert v.dim()...
[ "torch.eye", "torch.orgqr", "torch.is_tensor" ]
[((474, 525), 'torch.eye', 'torch.eye', (['*v.shape'], {'dtype': 'v.dtype', 'device': 'v.device'}), '(*v.shape, dtype=v.dtype, device=v.device)\n', (483, 525), False, 'import torch\n'), ((1776, 1795), 'torch.orgqr', 'torch.orgqr', (['v', 'tau'], {}), '(v, tau)\n', (1787, 1795), False, 'import torch\n'), ((254, 272), 't...
import argparse def msg(name=None): return '''copy''' def arg_parser(): parser = argparse.ArgumentParser() parser.add_argument("-d", "--debug", help="log to console", action="store_true") parser.add_argument("-s", "--safe", help="ask for conf...
[ "argparse.ArgumentParser" ]
[((151, 176), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (174, 176), False, 'import argparse\n')]
# AUTOGENERATED! DO NOT EDIT! File to edit: 01_pigeon_animator.ipynb (unless otherwise specified). __all__ = ['PigeonAnimator', 'PigeonAnimatorFactory'] # Cell import matplotlib import matplotlib.pyplot as plt plt.rc('animation', html='jshtml') class PigeonAnimator: """Animates a pigeon skeleton using matplotlib...
[ "matplotlib.pyplot.close", "matplotlib.pyplot.figure", "matplotlib.pyplot.axes", "matplotlib.pyplot.rc" ]
[((212, 246), 'matplotlib.pyplot.rc', 'plt.rc', (['"""animation"""'], {'html': '"""jshtml"""'}), "('animation', html='jshtml')\n", (218, 246), True, 'import matplotlib.pyplot as plt\n'), ((553, 585), 'matplotlib.pyplot.figure', 'plt.figure', ([], {'figsize': 'self.figsize'}), '(figsize=self.figsize)\n', (563, 585), Tru...
#coding:utf-8 # # Copyright (c) 2018-present, the Authors of the OpenKE-PyTorch (old). # All rights reserved. # # Link to the project: https://github.com/thunlp/OpenKE/tree/OpenKE-PyTorch(old) # # Note: This code was partially adapted by <NAME> # to adapt to the case of HyperKG, described in: # https...
[ "torch.manual_seed", "ctypes.cdll.LoadLibrary", "torch.load", "numpy.array", "numpy.zeros", "torch.cuda.is_available", "os.path.dirname", "numpy.random.seed", "torch.utils.data.DataLoader" ]
[((876, 910), 'ctypes.cdll.LoadLibrary', 'ctypes.cdll.LoadLibrary', (['base_file'], {}), '(base_file)\n', (899, 910), False, 'import ctypes\n'), ((13304, 13324), 'torch.manual_seed', 'torch.manual_seed', (['(0)'], {}), '(0)\n', (13321, 13324), False, 'import torch\n'), ((13412, 13429), 'numpy.random.seed', 'np.random.s...
import unittest import solution class TestQ(unittest.TestCase): def test_case_0(self): self.assertEqual(solution.kruskals( 4, [1, 1, 4, 2, 3, 3], [2, 3, 1, 4, 2, 4], [5, 3, 6, 7, 4, 5], ), 12) def test_case_1(self): self.assertEqual(sol...
[ "unittest.main", "solution.kruskals" ]
[((512, 527), 'unittest.main', 'unittest.main', ([], {}), '()\n', (525, 527), False, 'import unittest\n'), ((119, 204), 'solution.kruskals', 'solution.kruskals', (['(4)', '[1, 1, 4, 2, 3, 3]', '[2, 3, 1, 4, 2, 4]', '[5, 3, 6, 7, 4, 5]'], {}), '(4, [1, 1, 4, 2, 3, 3], [2, 3, 1, 4, 2, 4], [5, 3, 6, 7, 4, 5]\n )\n', (1...
#!/usr/bin/python __author__ = "<NAME>" __EMAIL__ = "<EMAIL>" import boto3 s3_resource = boto3.resource("s3") bucket = s3_resource.Bucket("my_first_bucket") bucket.objects.all().delete() bucket.delete()
[ "boto3.resource" ]
[((91, 111), 'boto3.resource', 'boto3.resource', (['"""s3"""'], {}), "('s3')\n", (105, 111), False, 'import boto3\n')]
import boto3 import pandas as pd import numpy as np # user analysis def get_user_log(): s3 = boto3.resource('s3', region_name='us-east-2') bucket = s3.Bucket('nlprankings') logs = pd.DataFrame(columns=['datetime','IP','startYear','endYear','num_uni','num_author','CL','TACL','ACL_C','NAACL_C','EMNLP_C', ...
[ "pandas.Series", "matplotlib.pyplot.hist", "scipy.cluster.hierarchy.dendrogram", "pandas.read_csv", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.gca", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.barh", "boto3.resource", "matplotlib.pyplot.figure", "matplotlib.pyplot.yticks", "scipy.cluste...
[((99, 144), 'boto3.resource', 'boto3.resource', (['"""s3"""'], {'region_name': '"""us-east-2"""'}), "('s3', region_name='us-east-2')\n", (113, 144), False, 'import boto3\n'), ((196, 391), 'pandas.DataFrame', 'pd.DataFrame', ([], {'columns': "['datetime', 'IP', 'startYear', 'endYear', 'num_uni', 'num_author', 'CL',\n ...
#! /usr/bin/python2 # -*- coding: utf8 -*- import pykka import time from Manager import Manager class Big_Brother(pykka.ThreadingActor): def __init__(self): super(Big_Brother, self).__init__() self.pool = {'managers':[]} def start_manager(self, token): self.pool['managers'].append(Man...
[ "Manager.Manager.start" ]
[((317, 337), 'Manager.Manager.start', 'Manager.start', (['token'], {}), '(token)\n', (330, 337), False, 'from Manager import Manager\n')]
#!/usr/bin/env python3 # # Copyright 2020 Xiaomi Corporation (author: <NAME>) # # See ../../../LICENSE for clarification regarding multiple authors # # 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 ...
[ "k2host.is_arc_sorted", "k2host.is_acyclic", "k2host.str_to_fsa", "k2host.is_epsilon_free", "k2host.is_top_sorted", "k2host.is_deterministic", "k2host.is_connected", "k2host.has_self_loops", "unittest.main", "k2host.Fsa", "k2host.is_valid", "k2host.Fsa.create_fsa_with_size", "k2host.IntArray...
[((8142, 8157), 'unittest.main', 'unittest.main', ([], {}), '()\n', (8155, 8157), False, 'import unittest\n'), ((969, 995), 'k2host.IntArray2Size', 'k2host.IntArray2Size', (['(1)', '(0)'], {}), '(1, 0)\n', (989, 995), False, 'import k2host\n'), ((1010, 1053), 'k2host.Fsa.create_fsa_with_size', 'k2host.Fsa.create_fsa_wi...
#!/usr/bin/env python3 from setuptools import setup from sys import version_info assert version_info >= (3, 7, 0), "logbisect requires >= Python 3.7" INSTALL_REQUIRES = ["click", "python-dateutil"] setup( name="logbisect", version="1.0.0", description=("search huge log files quickly"), ...
[ "setuptools.setup" ]
[((211, 946), 'setuptools.setup', 'setup', ([], {'name': '"""logbisect"""', 'version': '"""1.0.0"""', 'description': '"""search huge log files quickly"""', 'long_description': '"""quickly search huge files containing lines with ordered timestamps using bisection"""', 'packages': "['logbisect']", 'url': '"""http://githu...
from django.urls import path, re_path, reverse_lazy from django.contrib.auth import views as auth_views from . import views app_name = 'user_auth' urlpatterns = [ path('register/', views.RegisterView.as_view(), name='register'), path('profile/', views.ProfileView.as_view(), name='profile'), re_path('profi...
[ "django.contrib.auth.views.PasswordResetDoneView.as_view", "django.contrib.auth.views.PasswordResetCompleteView.as_view", "django.contrib.auth.views.PasswordChangeDoneView.as_view", "django.urls.reverse_lazy", "django.contrib.auth.views.LogoutView.as_view" ]
[((582, 613), 'django.contrib.auth.views.LogoutView.as_view', 'auth_views.LogoutView.as_view', ([], {}), '()\n', (611, 613), True, 'from django.contrib.auth import views as auth_views\n'), ((862, 905), 'django.contrib.auth.views.PasswordChangeDoneView.as_view', 'auth_views.PasswordChangeDoneView.as_view', ([], {}), '()...
# Copyright 2020 Google LLC # # 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, s...
[ "queue.Queue.__init__", "time.sleep", "itertools.combinations", "threading.Thread", "copy.copy", "typing.TypeVar" ]
[((881, 893), 'typing.TypeVar', 'TypeVar', (['"""T"""'], {}), "('T')\n", (888, 893), False, 'from typing import Any, Callable, Dict, Iterable, Iterator, List, Sequence, TypeVar, Union\n'), ((898, 910), 'typing.TypeVar', 'TypeVar', (['"""K"""'], {}), "('K')\n", (905, 910), False, 'from typing import Any, Callable, Dict,...