code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
import sys import logging def get_logger(name): logger = logging.getLogger(name) logger.setLevel(logging.INFO) handler = logging.StreamHandler(sys.stdout) handler.setLevel(logging.INFO) formatter = logging.Formatter( '%(asctime)s - %(threadName)s - %(levelname)s: %(message)s') handle...
[ "logging.Formatter", "logging.StreamHandler", "logging.getLogger" ]
[((64, 87), 'logging.getLogger', 'logging.getLogger', (['name'], {}), '(name)\n', (81, 87), False, 'import logging\n'), ((137, 170), 'logging.StreamHandler', 'logging.StreamHandler', (['sys.stdout'], {}), '(sys.stdout)\n', (158, 170), False, 'import logging\n'), ((222, 300), 'logging.Formatter', 'logging.Formatter', ([...
"""Run tests on documentation tests(doctest). Currently setup this way b/c pytest does not support "load_tests" protocol. """ import unittest import doctest import mochart.utils def load_tests(loader, tests, ignore): """Load doctests as unit test suite.""" tests.addTests(doctest.DocTestSuite(mochart.utils)...
[ "unittest.main", "doctest.DocTestSuite" ]
[((372, 387), 'unittest.main', 'unittest.main', ([], {}), '()\n', (385, 387), False, 'import unittest\n'), ((285, 320), 'doctest.DocTestSuite', 'doctest.DocTestSuite', (['mochart.utils'], {}), '(mochart.utils)\n', (305, 320), False, 'import doctest\n')]
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
[ "tempfile.NamedTemporaryFile", "airflow.providers.google.marketing_platform.hooks.display_video.GoogleDisplayVideo360Hook", "json.load", "csv.writer", "airflow.providers.google.cloud.hooks.gcs.GCSHook", "shutil.copyfileobj", "airflow.exceptions.AirflowException", "urllib.parse.urlparse" ]
[((4025, 4196), 'airflow.providers.google.marketing_platform.hooks.display_video.GoogleDisplayVideo360Hook', 'GoogleDisplayVideo360Hook', ([], {'gcp_conn_id': 'self.gcp_conn_id', 'delegate_to': 'self.delegate_to', 'api_version': 'self.api_version', 'impersonation_chain': 'self.impersonation_chain'}), '(gcp_conn_id=self...
# Copyright 2018-2019, <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, ...
[ "torch.zeros_like", "torch.max", "torch.nn.functional.log_softmax", "torch.zeros", "warprnnt_numba.rnnt_loss.utils.cpu_utils.cpu_rnnt.LogSoftmaxGradModification.apply" ]
[((6836, 6854), 'torch.max', 'torch.max', (['lengths'], {}), '(lengths)\n', (6845, 6854), False, 'import torch\n'), ((6867, 6891), 'torch.max', 'torch.max', (['label_lengths'], {}), '(label_lengths)\n', (6876, 6891), False, 'import torch\n'), ((1941, 2006), 'torch.zeros', 'torch.zeros', (['minibatch_size'], {'device': ...
from singleton_decorator import singleton import re from .Cardinal import Cardinal from .Ordinal import Ordinal @singleton class Date: """ Steps: - 1 Preprocess token - 1.1 Remove dots from token - 1.2 Remove "th", "nd", etc. from "5th July" while preserving "Thursday" - 1.3 Check for ...
[ "re.compile" ]
[((1096, 1114), 're.compile', 're.compile', (['"""[,\']"""'], {}), '("[,\']")\n', (1106, 1114), False, 'import re\n'), ((1185, 1322), 're.compile', 're.compile', (['"""^(?P<prefix>monday|tuesday|wednesday|thursday|friday|saturday|sunday|mon|tue|wed|thu|fri|sat|sun)\\\\.?"""'], {'flags': 're.I'}), "(\n '^(?P<prefix>m...
import sys from cx_Freeze import setup, Executable import requests import os from multiprocessing import Queue build_exe_options = { "includes": [ 'os', 'requests', 'json', 'queue' ] } base = None executable = Executable(r"auto_checkin.py", base=base, icon = "...
[ "cx_Freeze.Executable", "cx_Freeze.setup" ]
[((270, 335), 'cx_Freeze.Executable', 'Executable', (['"""auto_checkin.py"""'], {'base': 'base', 'icon': '"""auto_checkin.ico"""'}), "('auto_checkin.py', base=base, icon='auto_checkin.ico')\n", (280, 335), False, 'from cx_Freeze import setup, Executable\n'), ((340, 508), 'cx_Freeze.setup', 'setup', ([], {'name': '"""au...
""" Author:<NAME> Version: 0.1 This script is created to make life easier for ppl riggers that do a lot of connections in the Graph Editor. Its designed to be easiely extended to encompas more node simply adding more node to the typeDict dictionary in form of: {NODETYPE: (INPUTPLUG, OUTPUTPLUG)} """ import sys if not ...
[ "maya.api.OpenMaya.MDGModifier", "sys.path.append", "maya.api.OpenMaya.MFnDependencyNode", "maya.api.OpenMaya.MObjectHandle", "maya.api.OpenMaya.MGlobal.getActiveSelectionList" ]
[((507, 524), 'maya.api.OpenMaya.MDGModifier', 'om2.MDGModifier', ([], {}), '()\n', (522, 524), True, 'import maya.api.OpenMaya as om2\n'), ((2538, 2574), 'maya.api.OpenMaya.MGlobal.getActiveSelectionList', 'om2.MGlobal.getActiveSelectionList', ([], {}), '()\n', (2572, 2574), True, 'import maya.api.OpenMaya as om2\n'),...
# Copyright (c) 2020 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...
[ "collections.OrderedDict" ]
[((1217, 1621), 'collections.OrderedDict', 'OrderedDict', (["[(padding_token, 0), (mask_token, 1), (class_token, 2), (seperate_token, 3),\n (unknown_token, 4), ('A', 5), ('B', 6), ('C', 7), ('D', 8), ('E', 9), (\n 'F', 10), ('G', 11), ('H', 12), ('I', 13), ('K', 14), ('L', 15), ('M', \n 16), ('N', 17), ('O', 1...
import numpy as np import cv2 import Person import time #Contadores de entrada y salida cnt_up = 0 cnt_down = 0 #Fuente de video #cap = cv2.VideoCapture(0) cap = cv2.VideoCapture('peopleCounter.avi') #Propiedades del video ##cap.set(3, 160) #Width ##cap.set(4, 120) #Height # Imprime las propiedades de captura a con...
[ "numpy.ones", "time.strftime", "cv2.rectangle", "cv2.imshow", "cv2.contourArea", "cv2.boundingRect", "cv2.destroyAllWindows", "cv2.circle", "cv2.waitKey", "cv2.morphologyEx", "Person.MyPerson", "cv2.createBackgroundSubtractorMOG2", "cv2.putText", "cv2.polylines", "cv2.threshold", "cv2....
[((164, 201), 'cv2.VideoCapture', 'cv2.VideoCapture', (['"""peopleCounter.avi"""'], {}), "('peopleCounter.avi')\n", (180, 201), False, 'import cv2\n'), ((852, 882), 'numpy.array', 'np.array', (['[pt1, pt2]', 'np.int32'], {}), '([pt1, pt2], np.int32)\n', (860, 882), True, 'import numpy as np\n'), ((998, 1028), 'numpy.ar...
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-04-13 22:51 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Creat...
[ "django.db.models.TextField", "django.db.models.ManyToManyField", "django.db.models.TimeField", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.PositiveSmallIntegerField" ]
[((3145, 3258), 'django.db.models.ManyToManyField', 'models.ManyToManyField', ([], {'help_text': '"""Ingredients"""', 'through': '"""cookery.RecipeIngredient"""', 'to': '"""cookery.Ingredient"""'}), "(help_text='Ingredients', through=\n 'cookery.RecipeIngredient', to='cookery.Ingredient')\n", (3167, 3258), False, 'f...
# encoding: utf-8 """ Chart builder and related objects. """ from __future__ import absolute_import, print_function, unicode_literals from contextlib import contextmanager from xlsxwriter import Workbook from StringIO import StringIO class _BaseWorkbookWriter(object): """ Base class for workbook writers,...
[ "xlsxwriter.Workbook", "StringIO.StringIO" ]
[((705, 715), 'StringIO.StringIO', 'StringIO', ([], {}), '()\n', (713, 715), False, 'from StringIO import StringIO\n'), ((1228, 1268), 'xlsxwriter.Workbook', 'Workbook', (['xlsx_file', "{'in_memory': True}"], {}), "(xlsx_file, {'in_memory': True})\n", (1236, 1268), False, 'from xlsxwriter import Workbook\n')]
import argparse import os import re parser = argparse.ArgumentParser('Visualizing Training sample, top200 pairs from randomly top 2000 pairs') parser.add_argument( '--outHtml', type=str, help='output html file') parser.add_argument( '--imgDir', type=str, help='image directory') args = parser.parse_args() ...
[ "os.listdir", "argparse.ArgumentParser" ]
[((47, 149), 'argparse.ArgumentParser', 'argparse.ArgumentParser', (['"""Visualizing Training sample, top200 pairs from randomly top 2000 pairs"""'], {}), "(\n 'Visualizing Training sample, top200 pairs from randomly top 2000 pairs')\n", (70, 149), False, 'import argparse\n'), ((1559, 1582), 'os.listdir', 'os.listdi...
import random import time from actors import Wizard, Creature, SmallAnimal, Dragon def print_header(): print('--------------------------------') print(' WIZARD GAME APP') print('--------------------------------\n') def game_loop(): creatures = [ SmallAnimal('Toad', 1), Creatur...
[ "actors.Wizard", "random.choice", "time.sleep", "actors.SmallAnimal", "actors.Creature", "actors.Dragon" ]
[((461, 482), 'actors.Wizard', 'Wizard', (['"""Gandolf"""', '(75)'], {}), "('Gandolf', 75)\n", (467, 482), False, 'from actors import Wizard, Creature, SmallAnimal, Dragon\n'), ((281, 303), 'actors.SmallAnimal', 'SmallAnimal', (['"""Toad"""', '(1)'], {}), "('Toad', 1)\n", (292, 303), False, 'from actors import Wizard, ...
import json, subprocess from ... pyaz_utils import get_cli_name, get_params def create(account_name, resource_group, name, start_timestamp=None, end_timestamp=None, presentation_window_duration=None, live_backoff_duration=None, timescale=None, force_end_timestamp=None, bitrate=None, first_quality=None, tracks=None): ...
[ "subprocess.run", "json.loads" ]
[((444, 532), 'subprocess.run', 'subprocess.run', (['command'], {'shell': '(True)', 'stdout': 'subprocess.PIPE', 'stderr': 'subprocess.PIPE'}), '(command, shell=True, stdout=subprocess.PIPE, stderr=\n subprocess.PIPE)\n', (458, 532), False, 'import json, subprocess\n'), ((921, 1009), 'subprocess.run', 'subprocess.ru...
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
[ "ast.literal_eval" ]
[((1588, 1612), 'ast.literal_eval', 'ast.literal_eval', (['string'], {}), '(string)\n', (1604, 1612), False, 'import ast\n')]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Mar 23 19:42:57 2019 @author: jasoncasey """ from io import BytesIO, StringIO from zipfile import ZipFile from urllib.request import urlopen import pandas as pd import pickle # item_recode maps labels on to coded columns def item_recode(col, codings)...
[ "pandas.read_csv", "pickle.load", "urllib.request.urlopen" ]
[((1408, 1420), 'urllib.request.urlopen', 'urlopen', (['url'], {}), '(url)\n', (1415, 1420), False, 'from urllib.request import urlopen\n'), ((1719, 1731), 'urllib.request.urlopen', 'urlopen', (['url'], {}), '(url)\n', (1726, 1731), False, 'from urllib.request import urlopen\n'), ((1914, 2026), 'pandas.read_csv', 'pd.r...
from get_api_key import api_key import argparse import os from datetime import datetime youtube_instance = api_key() youtube_instance.get_api_key() youtube = youtube_instance.get_youtube() parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter,\ descript...
[ "get_api_key.api_key", "datetime.datetime.strptime", "argparse.ArgumentParser", "datetime.datetime" ]
[((109, 118), 'get_api_key.api_key', 'api_key', ([], {}), '()\n', (116, 118), False, 'from get_api_key import api_key\n'), ((201, 455), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'formatter_class': 'argparse.RawDescriptionHelpFormatter', 'description': '"""Explore the oldest videos on a Topic"""', 'epi...
#*************************************************************************************************** # Copyright 2015, 2019 National Technology & Engineering Solutions of Sandia, LLC (NTESS). # Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government retains certain rights # in this software. # Licensed...
[ "numpy.array_equal", "numpy.eye", "numpy.bitwise_xor", "numpy.zeros", "numpy.identity", "numpy.shape", "numpy.append", "numpy.random.randint", "numpy.array", "numpy.round_", "numpy.linalg.det", "numpy.dot", "numpy.diag", "numpy.linalg.multi_dot" ]
[((1528, 1571), 'numpy.zeros', '_np.zeros', (['(n1 + n2, n1 + n2)'], {'dtype': '"""int8"""'}), "((n1 + n2, n1 + n2), dtype='int8')\n", (1537, 1571), True, 'import numpy as _np\n'), ((1952, 1971), 'numpy.append', '_np.append', (['A', 'b', '(1)'], {}), '(A, b, 1)\n', (1962, 1971), True, 'import numpy as _np\n'), ((2132, ...
# Copyright (C) 2020 GreenWaves Technologies, SAS # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # This progr...
[ "stats.ranges.Ranges.range_output", "numpy.sum", "math.sqrt", "stats.scales.Scales.scale_output", "numpy.array", "stats.scales.Scales.scale_input", "stats.ranges.Ranges.range_input", "logging.getLogger" ]
[((1034, 1073), 'logging.getLogger', 'logging.getLogger', (["('nntool.' + __name__)"], {}), "('nntool.' + __name__)\n", (1051, 1073), False, 'import logging\n'), ((3704, 3762), 'stats.ranges.Ranges.range_output', 'Ranges.range_output', (["nn_0['node']"], {'weights': "nn_0['weights']"}), "(nn_0['node'], weights=nn_0['we...
import copy import os import ntpath from pandas import json_normalize from app.utility.base_svc import BaseService class DataService(BaseService): adversary_path = os.path.abspath('data/evaluations/') procedures_path = os.path.abspath('data/procedures/') apt29_categories = ['None', 'Telemetry', 'MSSP', 'G...
[ "copy.deepcopy", "os.path.abspath", "ntpath.basename", "pandas.json_normalize" ]
[((170, 206), 'os.path.abspath', 'os.path.abspath', (['"""data/evaluations/"""'], {}), "('data/evaluations/')\n", (185, 206), False, 'import os\n'), ((229, 264), 'os.path.abspath', 'os.path.abspath', (['"""data/procedures/"""'], {}), "('data/procedures/')\n", (244, 264), False, 'import os\n'), ((1342, 1368), 'copy.deep...
# -*- coding: utf-8 -*- """ Created on Mon Nov 23 12:00:26 2015 @author: pre """ import mapapi.MapClasses as MapHierarchy import warnings class Boiler(MapHierarchy.MapComponent): """Representation of AixLib.Fluid.HeatExchangers.Boiler """ def init_me(self): self.fluid_two_port() self.T_s...
[ "warnings.warn", "mapapi.molibs.MSL.Blocks.Sources.Constant.Constant" ]
[((1582, 1631), 'mapapi.molibs.MSL.Blocks.Sources.Constant.Constant', 'Constant', (['self.project', 'self.hierarchy_node', 'self'], {}), '(self.project, self.hierarchy_node, self)\n', (1590, 1631), False, 'from mapapi.molibs.MSL.Blocks.Sources.Constant import Constant\n'), ((1082, 1141), 'warnings.warn', 'warnings.warn...
# Copyright 2017 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Compass test which requires operator place the DUT heading north and south. """ import math from cros.factory.device import device_utils from cros.fa...
[ "cros.factory.utils.arg_utils.Arg", "math.hypot", "math.atan2", "cros.factory.test.i18n._", "cros.factory.utils.type_utils.Enum", "cros.factory.utils.type_utils.BindFunction", "cros.factory.device.device_utils.CreateDUTInterface" ]
[((532, 542), 'cros.factory.test.i18n._', '_', (['"""north"""'], {}), "('north')\n", (533, 542), False, 'from cros.factory.test.i18n import _\n'), ((554, 564), 'cros.factory.test.i18n._', '_', (['"""south"""'], {}), "('south')\n", (555, 564), False, 'from cros.factory.test.i18n import _\n'), ((658, 718), 'cros.factory....
# -*- coding: utf-8 -*- """ An extension of the pystruct OneSlackSSVM module to have a fit_with_valid method on it Copyright Xerox(C) 2016 <NAME> Developed for the EU project READ. The READ project has received funding from the European Union�s Horizon 2020 research and innovation pr...
[ "numpy.sum", "numpy.zeros", "time.time", "pystruct.learners.OneSlackSSVM.__init__", "numpy.dot" ]
[((1079, 1515), 'pystruct.learners.OneSlackSSVM.__init__', 'Pystruct_OneSlackSSVM.__init__', (['self', 'model'], {'max_iter': 'max_iter', 'C': 'C', 'check_constraints': 'check_constraints', 'verbose': 'verbose', 'negativity_constraint': 'negativity_constraint', 'n_jobs': 'n_jobs', 'break_on_bad': 'break_on_bad', 'show_...
__copyright__ = "Copyright (C) 2020 <NAME>" __license__ = """ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the follow...
[ "mlir.run.call_function", "numpy.empty_like", "mlir.run.mlir_opt", "pytest.main", "mlir.run.get_mlir_opt_version", "numpy.random.rand", "numpy.testing.assert_allclose" ]
[((2362, 2439), 'mlir.run.mlir_opt', 'mlirrun.mlir_opt', (['source', "['-convert-linalg-to-loops', '-convert-scf-to-std']"], {}), "(source, ['-convert-linalg-to-loops', '-convert-scf-to-std'])\n", (2378, 2439), True, 'import mlir.run as mlirrun\n'), ((2487, 2509), 'numpy.random.rand', 'np.random.rand', (['(10)', '(10)'...
# generated by shell2pipe on 2016-03-15 import os import plugin plugin_class='mkdir1' class mkdir1(plugin.AriadneOp): name='mkdir1' def run(self, args): os.system('mkdir tmp')
[ "os.system" ]
[((174, 196), 'os.system', 'os.system', (['"""mkdir tmp"""'], {}), "('mkdir tmp')\n", (183, 196), False, 'import os\n')]
"""Tests of the atom behaviour.""" # -*- coding: UTF-8 -*- import base64 import datetime import textwrap import unittest import pytest import flask.ext.webtest import mock import webtest.app import dnstwister from dnstwister import tools import patches @mock.patch('dnstwister.repository.db', patche...
[ "textwrap.dedent", "patches.SimpleKVDatabase", "dnstwister.cache.clear", "datetime.datetime", "dnstwister.tools.encode_domain", "pytest.raises", "base64.b64encode" ]
[((532, 567), 'dnstwister.tools.encode_domain', 'tools.encode_domain', (['unicode_domain'], {}), '(unicode_domain)\n', (551, 567), False, 'from dnstwister import tools\n'), ((314, 340), 'patches.SimpleKVDatabase', 'patches.SimpleKVDatabase', ([], {}), '()\n', (338, 340), False, 'import patches\n'), ((578, 613), 'pytest...
import random import numpy as np import scipy.stats as sps import torch import torch.utils.data as tud import torch.nn.utils as tnnu import models.dataset as md import utils.tensorboard as utb import utils.scaffold as usc class Action: def __init__(self, logger=None): """ (Abstract) Initializes...
[ "numpy.sum", "torch.utils.data.DataLoader", "models.dataset.Dataset", "random.sample", "utils.scaffold.join_joined_attachments", "scipy.stats.entropy", "numpy.histogram", "models.dataset.DecoratorDataset", "numpy.array", "utils.scaffold.join_first_attachment", "torch.no_grad" ]
[((5789, 5804), 'torch.no_grad', 'torch.no_grad', ([], {}), '()\n', (5802, 5804), False, 'import torch\n'), ((3927, 3994), 'models.dataset.DecoratorDataset', 'md.DecoratorDataset', (['training_set'], {'vocabulary': 'self.model.vocabulary'}), '(training_set, vocabulary=self.model.vocabulary)\n', (3946, 3994), True, 'imp...
from allauth.socialaccount.providers.oauth2.urls import default_urlpatterns from .provider import YandexProvider urlpatterns = default_urlpatterns(YandexProvider)
[ "allauth.socialaccount.providers.oauth2.urls.default_urlpatterns" ]
[((129, 164), 'allauth.socialaccount.providers.oauth2.urls.default_urlpatterns', 'default_urlpatterns', (['YandexProvider'], {}), '(YandexProvider)\n', (148, 164), False, 'from allauth.socialaccount.providers.oauth2.urls import default_urlpatterns\n')]
import os import sys from collections import namedtuple, defaultdict import json import pickle from glob import glob from datetime import datetime, timedelta import subprocess as sp import logging import traceback PARTICIPANT_NAME = 'aaalgo' CMS_HOME = os.path.abspath(os.path.dirname(__file__)) CORE_LIB_PATHS = [os....
[ "sys.path.append", "json.load", "traceback.print_exc", "logging.basicConfig", "os.path.dirname", "subprocess.check_output", "os.path.exists", "datetime.datetime", "os.environ.get", "collections.defaultdict", "pickle.load", "collections.namedtuple", "glob.glob", "sys.stderr.write", "os.pa...
[((624, 716), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO', 'format': '"""%(levelname)s %(asctime)s %(message)s"""'}), "(level=logging.INFO, format=\n '%(levelname)s %(asctime)s %(message)s')\n", (643, 716), False, 'import logging\n'), ((922, 1007), 'os.environ.get', 'os.environ.get', ...
#!/usr/bin/python ''' (C) Copyright 2019 Intel Corporation. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable ...
[ "subprocess.Popen", "env_modules.load_mpi", "subprocess.check_output", "command_utils.EnvironmentVariables", "os.path.join" ]
[((1412, 1429), 'env_modules.load_mpi', 'load_mpi', (['"""mpich"""'], {}), "('mpich')\n", (1420, 1429), False, 'from env_modules import load_mpi\n'), ((2496, 2518), 'command_utils.EnvironmentVariables', 'EnvironmentVariables', ([], {}), '()\n', (2516, 2518), False, 'from command_utils import EnvironmentVariables\n'), (...
#!/usr/bin/env python3 # This Python file uses the following encoding: utf-8 from pathlib import Path from pprint import pprint, pformat import fitz, os, queue, sys from .fitzcli import main as fitzGetText from PySide6.QtWidgets import QApplication, QFileDialog, QWidget, QRadioButton, QTextEdit from PySide6.QtGui imp...
[ "pprint.pformat", "PySide6.QtWidgets.QFileDialog.getExistingDirectory", "os.walk", "os.rename", "PySide6.QtCore.QCoreApplication.setAttribute", "os.path.isfile", "pathlib.Path", "PySide6.QtGui.QImage", "PySide6.QtWidgets.QApplication", "pprint.pprint", "PySide6.QtCore.QFile", "fitz.open", "P...
[((12164, 12220), 'PySide6.QtCore.QCoreApplication.setAttribute', 'QCoreApplication.setAttribute', (['Qt.AA_ShareOpenGLContexts'], {}), '(Qt.AA_ShareOpenGLContexts)\n', (12193, 12220), False, 'from PySide6.QtCore import QFile, Qt, QCoreApplication, QEvent\n'), ((12232, 12248), 'PySide6.QtWidgets.QApplication', 'QApplic...
import random import functools as fcn from itertools import islice, chain, combinations def get_twoopt_mutation(adjacency_matrix, mutation_probability): return fcn.partial(__twoopt_mutation, adjacency_matrix, mutation_probability) def __twoopt_mutation(adjacency_matrix, mutation_probility...
[ "functools.partial", "itertools.combinations", "random.random", "itertools.islice", "itertools.chain" ]
[((166, 236), 'functools.partial', 'fcn.partial', (['__twoopt_mutation', 'adjacency_matrix', 'mutation_probability'], {}), '(__twoopt_mutation, adjacency_matrix, mutation_probability)\n', (177, 236), True, 'import functools as fcn\n'), ((720, 745), 'itertools.chain', 'chain', (['[0]', 'genotype', '[0]'], {}), '([0], ge...
"""Publish documentation for a project on the server. Usage: client.py <host> <project> <directory> client.py -h | --help Options: -h --help Display help message and exit. """ # pylint: disable=no-value-for-parameter from __future__ import print_function, absolute_import import os import shutil...
[ "zipfile.ZipFile", "click.argument", "shutil.rmtree", "os.path.isfile", "tempfile.mkdtemp", "os.path.splitext", "click.Path", "requests_toolbelt.multipart.encoder.MultipartEncoder", "click.secho", "os.path.join" ]
[((3245, 3285), 'click.argument', 'click.argument', (['"""host"""'], {'metavar': '"""<host>"""'}), "('host', metavar='<host>')\n", (3259, 3285), False, 'import click\n'), ((3287, 3333), 'click.argument', 'click.argument', (['"""project"""'], {'metavar': '"""<project>"""'}), "('project', metavar='<project>')\n", (3301, ...
#!/usr/bin/env python # Import modules import time import math # Import files import src.py3_pi_markov as spy3 # Constant print("Disks \t Points\t Total Point \t Pi \t Error \t Time") # Number of point for nPoint in [10, 100, 1000, 10**4, 10**5, 10**6, 10**7]: # Number of disk for nDisk in [10, 100, 1000, ...
[ "math.fabs", "time.clock", "src.py3_pi_markov.fpimarkov" ]
[((380, 392), 'time.clock', 'time.clock', ([], {}), '()\n', (390, 392), False, 'import time\n'), ((445, 474), 'src.py3_pi_markov.fpimarkov', 'spy3.fpimarkov', (['nDisk', 'nPoint'], {}), '(nDisk, nPoint)\n', (459, 474), True, 'import src.py3_pi_markov as spy3\n'), ((575, 599), 'math.fabs', 'math.fabs', (['(math.pi - aPi...
# To add a new cell, type '# %%' # To add a new markdown cell, type '# %% [markdown]' # %% import torch import pandas as pd import os from learning_models.sidarthe import Sidarthe from torch_euler import Heun, euler from matplotlib import pyplot as plt # %% params = { "alpha": [0.570] * 4 + [0.422] * 18 + [0.360]...
[ "os.mkdir", "matplotlib.pyplot.show", "pandas.DataFrame.from_dict", "os.getcwd", "matplotlib.pyplot.legend", "os.path.exists", "matplotlib.pyplot.figure", "learning_models.sidarthe.Sidarthe", "matplotlib.pyplot.ylabel", "torch.no_grad", "os.path.join", "pandas.concat", "matplotlib.pyplot.sav...
[((1412, 1604), 'learning_models.sidarthe.Sidarthe', 'Sidarthe', (['params', '(1)', 'initial_values', 'euler', '(0.01)'], {'d_weight': '(0.0)', 'r_weight': '(0.0)', 't_weight': '(0.0)', 'h_weight': '(0.0)', 'e_weight': '(0.0)', 'der_1st_reg': '(0.0)', 'bound_reg': '(0.0)', 'verbose': '(False)', 'loss_type': '"""rmse"""...
""" This Module contains Training Files for the CNN extractor """ # system util imports import os import numpy as np # custom dataset imports from data_p1 import DATA_P1 from models_p1 import CNN_P1 from models_p1 import CNN_P1_UPPER import parser from visualizations import plot_p1_train_info, plot_embedding # sy...
[ "visualizations.plot_embedding", "torch.mean", "data_p1.DATA_P1", "torch.stack", "sklearn.manifold.TSNE", "torch.LongTensor", "torch.manual_seed", "torch.argmax", "torch.nn.CrossEntropyLoss", "models_p1.CNN_P1", "random.seed", "torch.randperm", "parser.arg_parse", "visualizations.plot_p1_t...
[((757, 778), 'data_p1.DATA_P1', 'DATA_P1', ([], {'mode': '"""train"""'}), "(mode='train')\n", (764, 778), False, 'from data_p1 import DATA_P1\n'), ((824, 845), 'data_p1.DATA_P1', 'DATA_P1', ([], {'mode': '"""valid"""'}), "(mode='valid')\n", (831, 845), False, 'from data_p1 import DATA_P1\n'), ((888, 901), 'models_p1.C...
"""Define a dynamical system for a 3D quadrotor""" from typing import Tuple, List, Optional import torch import numpy as np from .control_affine_system import ControlAffineSystem from .utils import grav, Scenario class Quad3D(ControlAffineSystem): """ Represents a planar quadrotor. The system has state...
[ "torch.ones_like", "torch.ones", "torch.eye", "torch.zeros_like", "torch.cos", "torch.zeros", "torch.sin", "torch.tensor" ]
[((2698, 2721), 'torch.ones', 'torch.ones', (['self.n_dims'], {}), '(self.n_dims)\n', (2708, 2721), False, 'import torch\n'), ((3491, 3522), 'torch.tensor', 'torch.tensor', (['[100, 50, 50, 50]'], {}), '([100, 50, 50, 50])\n', (3503, 3522), False, 'import torch\n'), ((3814, 3856), 'torch.ones_like', 'torch.ones_like', ...
import json import os import cv2 from car_seal.bounding_box import BoundingBox PREDICTION_THRESHOLD = 50 def normalize_bounding_box(img_name, left, top, width, height): def limit(desimal): if desimal < 0: return 0 elif desimal > 1: return 1 return desimal ima...
[ "json.dump", "cv2.imread", "os.path.dirname", "car_seal.bounding_box.BoundingBox" ]
[((444, 488), 'cv2.imread', 'cv2.imread', (['image_path', 'cv2.IMREAD_UNCHANGED'], {}), '(image_path, cv2.IMREAD_UNCHANGED)\n', (454, 488), False, 'import cv2\n'), ((352, 377), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (367, 377), False, 'import os\n'), ((2055, 2080), 'os.path.dirname', ...
import onnx from onnx import numpy_helper import numpy as np # Filter sobel = { 3: np.array([[1, 0, -1], [2, 0, -2], [1, 0, -1]], dtype='float32'), 5: np.array([[2, 1, 0, -1, -2], [3, 2, 0, -2, -3], [4, 3, 0, -3, -4], [3, 2, 0, -2, -3], [2, 1, 0, -1, -2]], dtype='float32'), 7: np.array([[...
[ "onnx.helper.make_node", "onnx.numpy_helper.from_array", "onnx.save", "onnx.helper.make_model", "onnx.helper.make_tensor_value_info", "numpy.array", "numpy.random.rand", "onnx.checker.check_model", "onnx.helper.make_graph" ]
[((86, 149), 'numpy.array', 'np.array', (['[[1, 0, -1], [2, 0, -2], [1, 0, -1]]'], {'dtype': '"""float32"""'}), "([[1, 0, -1], [2, 0, -2], [1, 0, -1]], dtype='float32')\n", (94, 149), True, 'import numpy as np\n'), ((164, 290), 'numpy.array', 'np.array', (['[[2, 1, 0, -1, -2], [3, 2, 0, -2, -3], [4, 3, 0, -3, -4], [3, ...
from django.urls import path, include from . import views from about_info import views as about_views urlpatterns = [ path('', views.home, name = 'Home-Landing'), path(r'about-me/', include('about_info.urls')), path('admin/', views.admin404, name = 'Admin404'), path('access-denied/', views.acc...
[ "django.urls.path", "django.urls.include" ]
[((127, 168), 'django.urls.path', 'path', (['""""""', 'views.home'], {'name': '"""Home-Landing"""'}), "('', views.home, name='Home-Landing')\n", (131, 168), False, 'from django.urls import path, include\n'), ((233, 280), 'django.urls.path', 'path', (['"""admin/"""', 'views.admin404'], {'name': '"""Admin404"""'}), "('ad...
import torch import cv2 import os import glob from torch.utils.data import Dataset import random class ISBI_Loader(Dataset): def __init__(self, data_path): # 初始化函数,读取所有data_path下的图片 self.data_path = data_path self.imgs_path = glob.glob(os.path.join(data_path, 'image/*.png')) def augmen...
[ "torch.utils.data.DataLoader", "random.choice", "cv2.imread", "cv2.flip", "os.path.join" ]
[((4466, 4543), 'torch.utils.data.DataLoader', 'torch.utils.data.DataLoader', ([], {'dataset': 'isbi_dataset', 'batch_size': '(4)', 'shuffle': '(True)'}), '(dataset=isbi_dataset, batch_size=4, shuffle=True)\n', (4493, 4543), False, 'import torch\n'), ((419, 444), 'cv2.flip', 'cv2.flip', (['image', 'flipCode'], {}), '(i...
#!/usr/bin/env python3 # # Copyright 2018 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 ...
[ "json.dump", "os.path.abspath", "os.makedirs", "os.stat", "os.path.basename", "os.getcwd", "os.path.isdir", "subprocess.check_output", "os.walk", "os.path.exists", "datetime.datetime.now", "time.time", "build.chronometer.Chronometer", "multiprocessing.Pool", "shutil.rmtree", "os.path.j...
[((2546, 2557), 'time.time', 'time.time', ([], {}), '()\n', (2555, 2557), False, 'import time\n'), ((7400, 7407), 'multiprocessing.Pool', 'Pool', (['(5)'], {}), '(5)\n', (7404, 7407), False, 'from multiprocessing import Pool\n'), ((17383, 17422), 'os.path.join', 'os.path.join', (['MYPATH', '"""build"""', '"""gcc.sh"""'...
import vim import re from typing import Union class PopupOptDict(object): pass class PopupPos: # __valid_keys = ('line', 'col', 'pos', 'posinvert') def __init__(self, line : Union[int, str, None] = None, col : Union[int, str, None] = None, pos : Uni...
[ "re.match" ]
[((1058, 1092), 're.match', 're.match', (['"""cursor[+-]\\\\d+$"""', 'value'], {}), "('cursor[+-]\\\\d+$', value)\n", (1066, 1092), False, 'import re\n'), ((7148, 7178), 're.match', 're.match', (['"""cursor[+-]\\\\d+$"""', 'x'], {}), "('cursor[+-]\\\\d+$', x)\n", (7156, 7178), False, 'import re\n')]
import os import shutil from django.conf import settings from django.core.management import call_command from django.core.management.base import BaseCommand class Command(BaseCommand): def handle(self, *args, **options): fixtures_dir = os.path.join(settings.PROJECT_ROOT, settings.SITE_NAME, 'core', 'fixt...
[ "os.makedirs", "os.path.isdir", "django.core.management.call_command", "os.path.join", "os.listdir" ]
[((251, 326), 'os.path.join', 'os.path.join', (['settings.PROJECT_ROOT', 'settings.SITE_NAME', '"""core"""', '"""fixtures"""'], {}), "(settings.PROJECT_ROOT, settings.SITE_NAME, 'core', 'fixtures')\n", (263, 326), False, 'import os\n'), ((350, 397), 'os.path.join', 'os.path.join', (['fixtures_dir', '"""initial_data.jso...
import argparse import logging import os from gfootball.env.config import Config from gfootball.common.args import bool_arg from gfootball.common.history import History, HistoryItem from gfootball.env import football_env from gfootball.env.football_action_set import DEFAULT_ACTION_SET, ActionSetType from gfootball.p...
[ "gfootball.policies.base_policy.PolicyConfig", "gfootball.env.football_env.FootballEnv", "argparse.ArgumentParser", "gfootball.env.config.Config", "logging.warning", "os.path.dirname" ]
[((405, 449), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Train"""'}), "(description='Train')\n", (428, 449), False, 'import argparse\n'), ((2165, 2345), 'gfootball.env.config.Config', 'Config', (["{'action_set': ActionSetType.DEFAULT, 'dump_full_episodes': False,\n 'players': play...
import sys sys.path.append("../ern/") sys.path.append("../dies/") import copy import torch import numpy as np import pandas as pd from dies.utils import listify from sklearn.metrics import mean_squared_error as mse from torch.utils.data.dataloader import DataLoader from fastai.basic_data import DataBunch from fastai.b...
[ "sys.path.append", "pandas.DataFrame", "sklearn.metrics.mean_squared_error", "pandas.read_csv", "numpy.clip", "glob.glob", "torch.utils.data.dataloader.DataLoader", "pandas.concat", "numpy.unique", "fastai.basic_data.DataBunch" ]
[((12, 38), 'sys.path.append', 'sys.path.append', (['"""../ern/"""'], {}), "('../ern/')\n", (27, 38), False, 'import sys\n'), ((39, 66), 'sys.path.append', 'sys.path.append', (['"""../dies/"""'], {}), "('../dies/')\n", (54, 66), False, 'import sys\n'), ((701, 786), 'torch.utils.data.dataloader.DataLoader', 'DataLoader'...
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Recipe module for Skia Swarming perf. import calendar import json import os DEPS = [ 'env', 'flavor', 'recipe_engine/file', 'recipe_engine/jso...
[ "json.loads" ]
[((1014, 1059), 'json.loads', 'json.loads', (["api.properties['nanobench_flags']"], {}), "(api.properties['nanobench_flags'])\n", (1024, 1059), False, 'import json\n'), ((1070, 1120), 'json.loads', 'json.loads', (["api.properties['nanobench_properties']"], {}), "(api.properties['nanobench_properties'])\n", (1080, 1120)...
import pytest import numpy as np from quantum_systems import BasisSet def test_add_spin_spf(): spf = (np.arange(15) + 1).reshape(3, 5).T n = 3 n_a = 2 n_b = n - n_a l = 2 * spf.shape[0] assert l == 10 m_a = l // 2 - n_a assert m_a == 3 m_b = l // 2 - n_b assert m_b == 4 ...
[ "numpy.testing.assert_allclose", "numpy.arange", "quantum_systems.BasisSet.add_spin_spf" ]
[((333, 363), 'quantum_systems.BasisSet.add_spin_spf', 'BasisSet.add_spin_spf', (['spf', 'np'], {}), '(spf, np)\n', (354, 363), False, 'from quantum_systems import BasisSet\n'), ((392, 438), 'numpy.testing.assert_allclose', 'np.testing.assert_allclose', (['spf[0]', 'new_spf[0]'], {}), '(spf[0], new_spf[0])\n', (418, 43...
from django.contrib.auth import get_user_model from rest_framework import mixins from rest_framework.viewsets import GenericViewSet from drive.users.permissions import IsAuthenticatedOrCreate from drive.users.serializers import UserSerializer User = get_user_model() class UsersViewSet( GenericViewSet, ...
[ "django.contrib.auth.get_user_model" ]
[((253, 269), 'django.contrib.auth.get_user_model', 'get_user_model', ([], {}), '()\n', (267, 269), False, 'from django.contrib.auth import get_user_model\n')]
from django.db import models from users.models import Profile from django.urls import reverse class Module(models.Model): #Django cannot have composite primary keys, thus, using auto increment for pri key moduleID = models.AutoField(primary_key = True) moduleCode = models.CharField(max_length=20, unique=T...
[ "django.db.models.TextField", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.AutoField", "django.urls.reverse", "django.db.models.IntegerField", "django.db.models.DateTimeField" ]
[((225, 259), 'django.db.models.AutoField', 'models.AutoField', ([], {'primary_key': '(True)'}), '(primary_key=True)\n', (241, 259), False, 'from django.db import models\n'), ((280, 324), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(20)', 'unique': '(True)'}), '(max_length=20, unique=True)\n'...
# Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html import scrapy from scrapy.pipelines.images import ImagesPipeline # useful for handling different item types with a single interface from itemadapter im...
[ "scrapy.Request" ]
[((605, 636), 'scrapy.Request', 'scrapy.Request', (["item['img_url']"], {}), "(item['img_url'])\n", (619, 636), False, 'import scrapy\n')]
""" Train a spiking Bayesian WTA network and plot weight changes, spike trains and log-likelihood live. MIT License Copyright (c) 2019 <NAME>, <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Softw...
[ "utility.sigmoid", "tqdm.tqdm", "copy.deepcopy", "numpy.log", "utility.load_mnist", "plot.SpiketrainPlotter", "plot.WeightPCAPlotter", "data_generator.DataGenerator", "numpy.std", "numpy.prod", "numpy.mean", "plot.CurvePlotter", "network.EventBasedBinaryWTANetwork", "collections.deque" ]
[((1636, 1714), 'utility.load_mnist', 'ut.load_mnist', ([], {'h': 'H', 'w': 'W', 'labels': 'labels', 'train': '(False)', 'frequencies': 'spiking_input'}), '(h=H, w=W, labels=labels, train=False, frequencies=spiking_input)\n', (1649, 1714), True, 'import utility as ut\n'), ((1723, 1865), 'network.EventBasedBinaryWTANetw...
import socket class SocketServer(object): def __init__(self, host, port): self._host = host self._port = port self._socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self._socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) self._socket.bind((self._host, ...
[ "socket.socket" ]
[((156, 205), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (169, 205), False, 'import socket\n')]
from django.urls import include, path, reverse from django.contrib import admin from django.http import HttpResponse from django.contrib.sitemaps.views import sitemap from comic.sitemaps import ComicSitemap from blog.sitemaps import BlogSitemap from .sitemaps import StaticSitemap from django.conf.urls import han...
[ "django.urls.path", "comic.sitemaps.ComicSitemap", "blog.sitemaps.BlogSitemap", "django.urls.reverse", "django.urls.include" ]
[((527, 541), 'comic.sitemaps.ComicSitemap', 'ComicSitemap', ([], {}), '()\n', (539, 541), False, 'from comic.sitemaps import ComicSitemap\n'), ((556, 569), 'blog.sitemaps.BlogSitemap', 'BlogSitemap', ([], {}), '()\n', (567, 569), False, 'from blog.sitemaps import BlogSitemap\n'), ((636, 670), 'django.urls.path', 'path...
# Copyright (c) 2020 BlenderNPR and contributors. MIT license. import math import ctypes import pyrr from Malt.GL.GL import * from Malt.GL.Shader import UBO from Malt.GL.Texture import TextureArray, CubeMapArray from Malt.GL.RenderTarget import ArrayLayerTarget, RenderTarget from Malt import Pipeline _LIGHTS_BUFFE...
[ "pyrr.Matrix44", "pyrr.Vector3", "pyrr.Matrix44.look_at", "pyrr.Matrix44.identity", "math.tan", "Malt.GL.Shader.UBO", "Malt.GL.Texture.TextureArray", "Malt.GL.RenderTarget.ArrayLayerTarget", "pyrr.Vector4", "pyrr.Matrix44.from_translation", "collections.OrderedDict", "pyrr.Matrix44.from_scale"...
[((9068, 9207), 'pyrr.Matrix44', 'pyrr.Matrix44', (['[x_scale, 0, 0, 0, 0, y_scale, 0, 0, 0, 0, -(far + near) / (far - near), -1,\n 0, 0, -2.0 * far * near / (far - near), 0]'], {}), '([x_scale, 0, 0, 0, 0, y_scale, 0, 0, 0, 0, -(far + near) / (\n far - near), -1, 0, 0, -2.0 * far * near / (far - near), 0])\n', (...
from random import choice from dataclasses import dataclass import core.constants as constants from core.state import State from pazaak.player import PazaakPlayer, Card @dataclass class PazaakState(State): def get_all_states(self, player: PazaakPlayer): position = self.board.empty_positions(player) ...
[ "pazaak.player.PazaakPlayer" ]
[((1487, 1561), 'pazaak.player.PazaakPlayer', 'PazaakPlayer', ([], {'player': 'player.player', 'stand': '(True)', 'side_deck': 'player.side_deck'}), '(player=player.player, stand=True, side_deck=player.side_deck)\n', (1499, 1561), False, 'from pazaak.player import PazaakPlayer, Card\n'), ((958, 1032), 'pazaak.player.Pa...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Created on Feb 26 15:15:37 2018 @author: <NAME>, <NAME> """ import numpy as np from PIL import Image import matplotlib.pyplot as plt from fnmatch import fnmatch import sys import os import matplotlib.image as mpimg import scipy # Make sure that caffe is on the python pat...
[ "caffe.set_mode_gpu", "os.makedirs", "os.path.isdir", "os.walk", "os.path.exists", "sys.path.insert", "PIL.Image.open", "caffe.set_device", "numpy.array", "scipy.misc.imsave", "caffe.Net", "os.path.join", "fnmatch.fnmatch" ]
[((386, 427), 'sys.path.insert', 'sys.path.insert', (['(0)', "(CAFFE_ROOT + 'python')"], {}), "(0, CAFFE_ROOT + 'python')\n", (401, 427), False, 'import sys\n'), ((443, 463), 'caffe.set_mode_gpu', 'caffe.set_mode_gpu', ([], {}), '()\n', (461, 463), False, 'import caffe\n'), ((464, 483), 'caffe.set_device', 'caffe.set_d...
import telebot from knapsack import knapsack token = "YOUR_TELEGRAM_TOKEN_HERE" bot = telebot.TeleBot(token) W, val, itens, wt = 0, [], [], [] @bot.message_handler(commands=["knapsack"]) # /knapsack def ask_itens(message): global W, val, itens, wt W, val, itens, wt = 0, [], [], [] chat_id = ...
[ "telebot.TeleBot" ]
[((91, 113), 'telebot.TeleBot', 'telebot.TeleBot', (['token'], {}), '(token)\n', (106, 113), False, 'import telebot\n')]
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
[ "pulumi.get", "pulumi.runtime.invoke", "pulumi.set", "pulumi.InvokeOptions" ]
[((706, 736), 'pulumi.set', 'pulumi.set', (['__self__', '"""id"""', 'id'], {}), "(__self__, 'id', id)\n", (716, 736), False, 'import pulumi\n'), ((865, 901), 'pulumi.set', 'pulumi.set', (['__self__', '"""names"""', 'names'], {}), "(__self__, 'names', names)\n", (875, 901), False, 'import pulumi\n'), ((1067, 1089), 'pul...
import numpy as np from py_vbc.constants import * from py_vbc.interpolations import interpolate_tf def sigma(k, tf_spline, R=8.0/hconst): """Integrand to calculate the mass fluctuations in a sphere of radius R, up to some constant of proportionality C, using transfer functions. Uses the fact that si...
[ "py_vbc.interpolations.interpolate_tf", "numpy.max", "numpy.sin", "numpy.min", "numpy.cos" ]
[((1468, 1497), 'py_vbc.interpolations.interpolate_tf', 'interpolate_tf', ([], {'flag': '"""t"""', 'z': '(0)'}), "(flag='t', z=0)\n", (1482, 1497), False, 'from py_vbc.interpolations import interpolate_tf\n'), ((1551, 1571), 'numpy.min', 'np.min', (['tf0_spline.x'], {}), '(tf0_spline.x)\n', (1557, 1571), True, 'import ...
# Generated by Django 3.2.5 on 2021-07-19 07:29 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('projects', '0003_alter_post_url'), ] operations = [ migrations.RemoveField( model_name='post', name='pub_date', ), ...
[ "django.db.migrations.RemoveField" ]
[((224, 282), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""post"""', 'name': '"""pub_date"""'}), "(model_name='post', name='pub_date')\n", (246, 282), False, 'from django.db import migrations\n')]
from django.core.management.base import BaseCommand, CommandError from grade.views import gerar_grade class Command(BaseCommand): args = 'no args can be provided' help = 'Generate grids from data dump' def handle(self, *args, **options): self.stdout.write('Started generating grids.') gerar...
[ "grade.views.gerar_grade" ]
[((315, 330), 'grade.views.gerar_grade', 'gerar_grade', (['{}'], {}), '({})\n', (326, 330), False, 'from grade.views import gerar_grade\n')]
"""REST decorators""" import logging from decorator import decorator from pylons.controllers.util import abort from pylons.decorators.util import get_pylons __all__ = ['dispatch_on', 'restrict'] log = logging.getLogger(__name__) def restrict(*methods): """Restricts access to the function depending on HTTP met...
[ "decorator.decorator", "pylons.decorators.util.get_pylons", "logging.getLogger" ]
[((205, 232), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (222, 232), False, 'import logging\n'), ((843, 867), 'decorator.decorator', 'decorator', (['check_methods'], {}), '(check_methods)\n', (852, 867), False, 'from decorator import decorator\n'), ((2029, 2050), 'decorator.decorator'...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Dict, List, Mapping, Optional, Tuple, Union from .. import ...
[ "pulumi.get", "pulumi.getter", "pulumi.set" ]
[((849, 893), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""automaticallyAfterDays"""'}), "(name='automaticallyAfterDays')\n", (862, 893), False, 'import pulumi\n'), ((1714, 1758), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""automaticallyAfterDays"""'}), "(name='automaticallyAfterDays')\n", (1727, 1758), ...
import os import torch import torch.nn.functional as F import numpy as np from collections import namedtuple import time import matplotlib.pyplot as plt # 定义是否使用GPU device = torch.device("cuda" if torch.cuda.is_available() else "cpu") def LpNormalize_cnn(input, p=2, cp=1, eps=1e-6): r'''Calculate the unit vect...
[ "torch.cuda.is_available", "numpy.average", "numpy.sqrt" ]
[((2774, 2784), 'numpy.sqrt', 'np.sqrt', (['d'], {}), '(d)\n', (2781, 2784), True, 'import numpy as np\n'), ((3545, 3555), 'numpy.sqrt', 'np.sqrt', (['d'], {}), '(d)\n', (3552, 3555), True, 'import numpy as np\n'), ((4278, 4315), 'numpy.average', 'np.average', (['w_sparsity'], {'weights': 'num_w'}), '(w_sparsity, weigh...
import pytest from tests.utils import assert_pytest_passes @pytest.fixture def basic_case_dir(testdir): case_dir = testdir.mkdir('case_dir') case_dir.join('snapshot1.txt').write_text('the valuÉ of snapshot1.txt', 'utf-8') return case_dir def test_assert_match_with_external_snapshot_path(testdir, basic_...
[ "pytest.mark.parametrize", "tests.utils.assert_pytest_passes" ]
[((3333, 3592), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""case_dir_repr"""', '["\'case_dir\'", "str(Path(\'case_dir\').absolute())", "Path(\'case_dir\')",\n "Path(\'case_dir\').absolute()"]'], {'ids': "['relative_string_case_dir', 'abs_string_case_dir',\n 'relative_path_case_dir', 'abs_path_case...
from django.contrib import messages from django.contrib.auth.mixins import PermissionRequiredMixin from django.shortcuts import redirect, render, reverse from django.views.generic import View from .filters import PeerRecordFilterSet from .forms import PeerRecordBulkEditForm from .http import PeeringDB from .models imp...
[ "django.shortcuts.render", "django.contrib.messages.error", "django.shortcuts.reverse" ]
[((1207, 1255), 'django.shortcuts.render', 'render', (['request', '"""peeringdb/cache.html"""', 'context'], {}), "(request, 'peeringdb/cache.html', context)\n", (1213, 1255), False, 'from django.shortcuts import redirect, render, reverse\n'), ((587, 663), 'django.contrib.messages.error', 'messages.error', (['request', ...
"""Plot 1d ovservables""" from gna.ui import basecmd, append_typed, qualified import matplotlib from matplotlib import pyplot as plt from matplotlib.ticker import AutoMinorLocator from mpl_tools.helpers import savefig import numpy as np from gna.bindings import common from gna.env import PartNotFoundError, env class ...
[ "gna.ui.basecmd.__init__", "numpy.savetxt", "gna.env.PartNotFoundError", "numpy.array", "gna.env.env.ns" ]
[((383, 422), 'gna.ui.basecmd.__init__', 'basecmd.__init__', (['self', '*args'], {}), '(self, *args, **kwargs)\n', (399, 422), False, 'from gna.ui import basecmd, append_typed, qualified\n'), ((1174, 1192), 'numpy.array', 'np.array', (['dt.edges'], {}), '(dt.edges)\n', (1182, 1192), True, 'import numpy as np\n'), ((157...
import turtle # set the screen height and width to 100% # of our screen height and width turtle.Screen().setup(width=1.0, height=1.0) # Write hello world using turtle turtle.write( "<NAME>", font=('Verdana', 16, 'italic'), align='center' ) # Hide turtle turtle.hideturtle() # to keep the screen on in ...
[ "turtle.write", "turtle.hideturtle", "turtle.Screen" ]
[((170, 240), 'turtle.write', 'turtle.write', (['"""<NAME>"""'], {'font': "('Verdana', 16, 'italic')", 'align': '"""center"""'}), "('<NAME>', font=('Verdana', 16, 'italic'), align='center')\n", (182, 240), False, 'import turtle\n'), ((272, 291), 'turtle.hideturtle', 'turtle.hideturtle', ([], {}), '()\n', (289, 291), Fa...
import torch def get_mean_and_std(dataset): '''Compute the mean and std value of dataset.''' dataloader = torch.utils.data.DataLoader( dataset, batch_size=1, shuffle=True, num_workers=2) mean = torch.zeros(3) std = torch.zeros(3) print('==> Computing mean and std..') for inputs, target...
[ "torch.zeros", "torch.utils.data.DataLoader" ]
[((116, 195), 'torch.utils.data.DataLoader', 'torch.utils.data.DataLoader', (['dataset'], {'batch_size': '(1)', 'shuffle': '(True)', 'num_workers': '(2)'}), '(dataset, batch_size=1, shuffle=True, num_workers=2)\n', (143, 195), False, 'import torch\n'), ((216, 230), 'torch.zeros', 'torch.zeros', (['(3)'], {}), '(3)\n', ...
import numpy as np import pandas as pd from tensorflow.keras import Input from keras.layers.core import Dropout, Dense from keras.layers import LSTM, Bidirectional, Concatenate from keras.layers.embeddings import Embedding from keras.models import Model from tensorflow.keras.preprocessing.text import Tokenizer fro...
[ "pandas.DataFrame", "model.convert_cities", "tensorflow.keras.preprocessing.text.Tokenizer", "keras.layers.embeddings.Embedding", "keras.layers.core.Dense", "model.convert_countries", "pandas.read_csv", "pandas.get_dummies", "tensorflow.keras.Input", "keras.layers.LSTM", "keras.models.Model", ...
[((440, 469), 'pandas.read_csv', 'pd.read_csv', (['"""data/train.csv"""'], {}), "('data/train.csv')\n", (451, 469), True, 'import pandas as pd\n'), ((477, 505), 'pandas.read_csv', 'pd.read_csv', (['"""data/test.csv"""'], {}), "('data/test.csv')\n", (488, 505), True, 'import pandas as pd\n'), ((546, 631), 'pandas.read_c...
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2021, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
[ "importlib.import_module" ]
[((734, 793), 'importlib.import_module', 'importlib.import_module', (['"""q2_types.ordination._transformer"""'], {}), "('q2_types.ordination._transformer')\n", (757, 793), False, 'import importlib\n')]
# ----------------------------------------------------------------------------- # Copyright (c) 2009-2016 <NAME>. All rights reserved. # Distributed under the (new) BSD License. # ----------------------------------------------------------------------------- """ """ import os import re import sys import logging import i...
[ "readline.parse_and_bind", "glumpy.gl.glEnable", "glumpy.log.log.setLevel", "importlib.import_module", "glumpy.gl.glBlendFunc", "os.getcwd", "glumpy.ext.inputhook.inputhook_manager.set_inputhook", "glumpy.ext.inputhook.stdin_ready", "os.path.basename", "glumpy.log.log.critical", "glumpy.gl.glPix...
[((2079, 2130), 're.search', 're.search', (['exp', 'backend', '(re.IGNORECASE | re.VERBOSE)'], {}), '(exp, backend, re.IGNORECASE | re.VERBOSE)\n', (2088, 2130), False, 'import re\n'), ((3051, 3062), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (3060, 3062), False, 'import os\n'), ((3126, 3155), 'importlib.import_module...
#!/usr/bin/env python3 # vim:set fenc=utf-8: import tkinter as tk import subprocess def run_cmd(cmd): p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE) out, err = p.communicate() p.wait() retval = p.returncode if retval != 0: print("An error occured when executing `{}`:".form...
[ "subprocess.Popen", "tkinter.Tk" ]
[((1379, 1386), 'tkinter.Tk', 'tk.Tk', ([], {}), '()\n', (1384, 1386), True, 'import tkinter as tk\n'), ((114, 171), 'subprocess.Popen', 'subprocess.Popen', (['cmd'], {'shell': '(True)', 'stdout': 'subprocess.PIPE'}), '(cmd, shell=True, stdout=subprocess.PIPE)\n', (130, 171), False, 'import subprocess\n')]
#!/usr/bin/env python from PIL import Image import cv2 from Crypto.Cipher import AES import hashlib import getpass import sys def decrypt(): print("Decrypting") path = raw_input("Enter full path of image : ") path = str(path) img = cv2.imread(path) binary = "" list = [...
[ "cv2.imread", "hashlib.md5", "Crypto.Cipher.AES.new" ]
[((267, 283), 'cv2.imread', 'cv2.imread', (['path'], {}), '(path)\n', (277, 283), False, 'import cv2\n'), ((1525, 1546), 'hashlib.md5', 'hashlib.md5', (['password'], {}), '(password)\n', (1536, 1546), False, 'import hashlib\n'), ((1592, 1616), 'Crypto.Cipher.AES.new', 'AES.new', (['k', 'AES.MODE_ECB'], {}), '(k, AES.MO...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf.urls import url from django.utils import timezone from clock.shifts.views import ShiftManualCreate, \ ShiftManualEdit, ShiftManualDelete from clock.shifts.views import ShiftMonthContractView, ShiftWeekView, ShiftYearView, ShiftDayVie...
[ "clock.shifts.views.ShiftManualDelete.as_view", "clock.shifts.views.ShiftWeekView.as_view", "clock.shifts.views.ShiftDayView.as_view", "clock.shifts.views.ShiftYearView.as_view", "django.utils.timezone.now", "clock.shifts.views.ShiftManualCreate.as_view", "django.conf.urls.url", "clock.shifts.views.Sh...
[((776, 833), 'django.conf.urls.url', 'url', (['"""^quick_action/$"""', 'shift_action'], {'name': '"""quick_action"""'}), "('^quick_action/$', shift_action, name='quick_action')\n", (779, 833), False, 'from django.conf.urls import url\n'), ((907, 934), 'clock.shifts.views.ShiftManualCreate.as_view', 'ShiftManualCreate....
""" Module for reading temperature from the raspbery Pi 1-wire interface. """ import os import glob import time os.system('modprobe w1-gpio') os.system('modprobe w1-therm') BASE_DIR = '/sys/bus/w1/devices/' DEVICE_FOLDER = glob.glob(BASE_DIR + '28*')[0] DEVICE_FILE = DEVICE_FOLDER + '/w1_slave' def read_temp_raw(): ...
[ "time.sleep", "os.system", "glob.glob" ]
[((113, 142), 'os.system', 'os.system', (['"""modprobe w1-gpio"""'], {}), "('modprobe w1-gpio')\n", (122, 142), False, 'import os\n'), ((143, 173), 'os.system', 'os.system', (['"""modprobe w1-therm"""'], {}), "('modprobe w1-therm')\n", (152, 173), False, 'import os\n'), ((225, 252), 'glob.glob', 'glob.glob', (["(BASE_D...
import torch.nn as nn import torch.nn.functional as F from .loss_blocks import SSIM, smooth_grad_1st, smooth_grad_2nd, TernaryLoss from utils.warp_utils import flow_warp from utils.warp_utils import get_occu_mask_bidirection, get_occu_mask_backward class unFlowLoss(nn.modules.Module): def __init__(self, cfg): ...
[ "torch.nn.functional.interpolate", "utils.warp_utils.get_occu_mask_bidirection", "utils.warp_utils.get_occu_mask_backward", "utils.warp_utils.flow_warp" ]
[((2142, 2188), 'torch.nn.functional.interpolate', 'F.interpolate', (['im1_origin', '(h, w)'], {'mode': '"""area"""'}), "(im1_origin, (h, w), mode='area')\n", (2155, 2188), True, 'import torch.nn.functional as F\n'), ((2214, 2260), 'torch.nn.functional.interpolate', 'F.interpolate', (['im2_origin', '(h, w)'], {'mode': ...
import datetime import json import os from scripts.artifact_report import ArtifactHtmlReport from scripts.ilapfuncs import logfunc, tsv, timeline, is_platform_windows def get_playStoreDevices(files_found, report_folder, seeker, wrap_text): for file_found in files_found: file_found = str(file_found) ...
[ "os.path.basename", "scripts.ilapfuncs.tsv", "scripts.ilapfuncs.timeline", "scripts.ilapfuncs.logfunc", "scripts.artifact_report.ArtifactHtmlReport" ]
[((2134, 2181), 'scripts.artifact_report.ArtifactHtmlReport', 'ArtifactHtmlReport', (['"""Google Play Store Devices"""'], {}), "('Google Play Store Devices')\n", (2152, 2181), False, 'from scripts.artifact_report import ArtifactHtmlReport\n'), ((2742, 2794), 'scripts.ilapfuncs.tsv', 'tsv', (['report_folder', 'data_head...
import numpy as np from PIL import Image def save_image_array(img_array, fname, batch_size=100, class_num=10): channels = img_array.shape[1] resolution = img_array.shape[-1] img_rows = 10 img_cols = batch_size//class_num img = np.full([channels, resolution * img_rows, resolution * img_cols], 0.0) ...
[ "numpy.full", "PIL.Image.fromarray", "numpy.rollaxis" ]
[((249, 319), 'numpy.full', 'np.full', (['[channels, resolution * img_rows, resolution * img_cols]', '(0.0)'], {}), '([channels, resolution * img_rows, resolution * img_cols], 0.0)\n', (256, 319), True, 'import numpy as np\n'), ((710, 732), 'numpy.rollaxis', 'np.rollaxis', (['img', '(0)', '(3)'], {}), '(img, 0, 3)\n', ...
#!/usr/bin/env python3 #Use these commands in Kali to install required software: # sudo apt install python3-pip # pip install python-nmap # Import nmap so we can use it for the scan import nmap # We import the ipaddress module. We want to use the ipaddress.ip_address(address) # method to see if we can instantiate a ...
[ "ipaddress.ip_address", "nmap.PortScanner", "re.compile" ]
[((640, 671), 're.compile', 're.compile', (['"""([0-9]+)-([0-9]+)"""'], {}), "('([0-9]+)-([0-9]+)')\n", (650, 671), False, 'import re\n'), ((3169, 3187), 'nmap.PortScanner', 'nmap.PortScanner', ([], {}), '()\n', (3185, 3187), False, 'import nmap\n'), ((2087, 2123), 'ipaddress.ip_address', 'ipaddress.ip_address', (['ip_...
#!/usr/bin/env python3 import logging import torch import numpy as np import torch.nn as nn from torch.nn.utils.rnn import pack_padded_sequence from pytorch_translate import rnn # noqa logger = logging.getLogger(__name__) def add_args(parser): parser.add_argument( "--char-rnn", action="store_t...
[ "pytorch_translate.rnn.Embedding", "torch.LongTensor", "torch.cat", "pytorch_translate.rnn.LSTMSequenceEncoder.LSTM", "numpy.array", "torch.nn.utils.rnn.pack_padded_sequence", "torch.sort", "logging.getLogger" ]
[((198, 225), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (215, 225), False, 'import logging\n'), ((4715, 4838), 'pytorch_translate.rnn.Embedding', 'rnn.Embedding', ([], {'num_embeddings': 'num_embeddings', 'embedding_dim': 'embed_dim', 'padding_idx': 'self.padding_idx', 'freeze_embed'...
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
[ "tensorflow.compat.v1.stack", "tensorflow.compat.v1.io.gfile.glob", "tensorflow.compat.v1.zeros", "bert.modeling.get_assignment_map_from_checkpoint", "tensorflow.compat.v1.equal", "tensorflow.compat.v1.reverse", "tensorflow.contrib.tpu.TPUConfig", "tensorflow.compat.v1.gather", "tensorflow.compat.v1...
[((1441, 1555), 'absl.flags.DEFINE_string', 'flags.DEFINE_string', (['"""eval_file"""', 'None', '"""The input data. Should be in tfrecord format ready to input to BERT."""'], {}), "('eval_file', None,\n 'The input data. Should be in tfrecord format ready to input to BERT.')\n", (1460, 1555), False, 'from absl import...
# This file is part of pybootchartgui. # pybootchartgui 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. # pybootchartgui is dis...
[ "gi.repository.Gtk.CheckButton", "gi.repository.Gdk.Cursor", "gi.require_version", "gi.repository.Gtk.VBox.__init__", "gi.repository.Gtk.main", "gi.repository.Gtk.UIManager", "gi.repository.Gtk.Adjustment", "gi.repository.Gtk.Window.__init__", "gi.repository.Gtk.Notebook", "gi.repository.Gdk.keyva...
[((699, 731), 'gi.require_version', 'gi.require_version', (['"""Gtk"""', '"""3.0"""'], {}), "('Gtk', '3.0')\n", (717, 731), False, 'import gi\n'), ((1591, 1708), 'gi.repository.GObject.property', 'GObject.property', ([], {'type': 'Gtk.ScrollablePolicy', 'default': 'Gtk.ScrollablePolicy.MINIMUM', 'flags': 'GObject.PARAM...
import networkx import judo from judo.tests.test_tree import TestNetworkxTree, to_node_id import pytest from fragile.core.tree import HistoryTree def random_powerlaw(): g = networkx.DiGraph() t = networkx.random_powerlaw_tree(500, gamma=3, tries=1000, seed=160290) graph = networkx.compose(g, t) mappi...
[ "fragile.core.tree.HistoryTree", "judo.tests.test_tree.to_node_id", "judo.ones", "pytest.fixture", "networkx.relabel_nodes", "networkx.random_powerlaw_tree", "networkx.compose", "judo.arange", "networkx.DiGraph", "judo.zeros" ]
[((799, 869), 'pytest.fixture', 'pytest.fixture', ([], {'params': '[random_powerlaw, small_tree]', 'scope': '"""function"""'}), "(params=[random_powerlaw, small_tree], scope='function')\n", (813, 869), False, 'import pytest\n'), ((180, 198), 'networkx.DiGraph', 'networkx.DiGraph', ([], {}), '()\n', (196, 198), False, '...
"""Multiview Random Gaussian Projection""" # Authors: <NAME> # # License: MIT import numpy as np from sklearn.base import TransformerMixin from sklearn.utils.validation import check_is_fitted from sklearn.random_projection import GaussianRandomProjection from .utils import check_n_views class RandomGaussianProject...
[ "numpy.random.seed", "sklearn.random_projection.GaussianRandomProjection", "sklearn.utils.validation.check_is_fitted" ]
[((2611, 2644), 'numpy.random.seed', 'np.random.seed', (['self.random_state'], {}), '(self.random_state)\n', (2625, 2644), True, 'import numpy as np\n'), ((3287, 3308), 'sklearn.utils.validation.check_is_fitted', 'check_is_fitted', (['self'], {}), '(self)\n', (3302, 3308), False, 'from sklearn.utils.validation import c...
import argparse import numpy as np import torch from torch import optim from torchvision import utils from tqdm import tqdm from model import Glow from samplers import memory_mnist, memory_fashion from utils import ( net_args, calc_z_shapes, calc_loss, string_args, create_deltas_sequence, ) parse...
[ "argparse.ArgumentParser", "torch.randn_like", "utils.create_deltas_sequence", "utils.calc_z_shapes", "model.Glow", "torch.randn", "torch.rand_like", "numpy.mean", "utils.calc_loss", "utils.string_args", "torch.no_grad" ]
[((333, 384), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Glow trainer"""'}), "(description='Glow trainer')\n", (356, 384), False, 'import argparse\n'), ((582, 599), 'utils.string_args', 'string_args', (['args'], {}), '(args)\n', (593, 599), False, 'from utils import net_args, calc_z_...
#!/usr/bin/env python3 print("Importing common model setup...") import sys sys.path.append("..") from common_model_setup import * SOLVED = False print("Using {} structures for RNN".format("solved" if SOLVED else "AF2")) device = "cuda" if torch.cuda.is_available() else "cpu" print("The device in use is", device) BA...
[ "sys.path.append" ]
[((76, 97), 'sys.path.append', 'sys.path.append', (['""".."""'], {}), "('..')\n", (91, 97), False, 'import sys\n')]
""" Game fix for Sonic the Hedgehog 4: Episode II """ #pylint: disable=C0103 from protonfixes import util def main(): """ lock to 60 fps """ util.set_environment('DXVK_FRAME_RATE', '60')
[ "protonfixes.util.set_environment" ]
[((156, 201), 'protonfixes.util.set_environment', 'util.set_environment', (['"""DXVK_FRAME_RATE"""', '"""60"""'], {}), "('DXVK_FRAME_RATE', '60')\n", (176, 201), False, 'from protonfixes import util\n')]
import logging from functools import wraps from datetime import datetime """Decorator for logging the duration of a method call""" def timer(func): @wraps(func) def wrapper(*args, **kwargs): start = datetime.now() result = func(*args, **kwargs) end = datetime.now() duration = ...
[ "logging.getLogger", "datetime.datetime.now", "functools.wraps" ]
[((156, 167), 'functools.wraps', 'wraps', (['func'], {}), '(func)\n', (161, 167), False, 'from functools import wraps\n'), ((218, 232), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (230, 232), False, 'from datetime import datetime\n'), ((286, 300), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n'...
#!/usr/bin/env python3 import numpy as np #################### # generate_stimuli # #################### def generate_stimuli(arg, env): """ Function to generate the stimuli Arguments --------- arg: Argument for which to generate stimuli (either Argument or ArrayArgument) env: Dict mapping...
[ "numpy.sin" ]
[((1759, 1773), 'numpy.sin', 'np.sin', (['in_rad'], {}), '(in_rad)\n', (1765, 1773), True, 'import numpy as np\n'), ((1827, 1856), 'numpy.sin', 'np.sin', (["inputs['value'].value"], {}), "(inputs['value'].value)\n", (1833, 1856), True, 'import numpy as np\n')]
#! /usr/bin/env python """ Launches a ParaView visualization of a simulation. User provides saved ParaView state file and output directory. Usage: .. code-block:: bash visualize-output outputs my_visu_state.pvsm Opens paraview visualization for state ``my_visu_state.pvsm`` where all pvd files are read from ``o...
[ "xml.etree.ElementTree.parse", "subprocess.Popen", "argparse.ArgumentParser", "tempfile.gettempdir", "os.path.splitext", "os.path.split", "os.path.join" ]
[((1042, 1063), 'tempfile.gettempdir', 'tempfile.gettempdir', ([], {}), '()\n', (1061, 1063), False, 'import tempfile\n'), ((2088, 2128), 'os.path.join', 'os.path.join', (['outdir', "(fieldname + '.pvd')"], {}), "(outdir, fieldname + '.pvd')\n", (2100, 2128), False, 'import os\n'), ((3027, 3045), 'xml.etree.ElementTree...
import pygame import logging class Player(): """ Player """ def __init__(self, name, avatar="assets/laughing.png", offsetX=0, offsetY=0): self.name = name self.logger = logging.getLogger(self.name) logging.basicConfig( format='%(asctime)s - %(name)s: %(levelname)s ...
[ "logging.basicConfig", "pygame.font.SysFont", "pygame.Color", "pygame.transform.scale", "pygame.image.load", "logging.getLogger" ]
[((204, 232), 'logging.getLogger', 'logging.getLogger', (['self.name'], {}), '(self.name)\n', (221, 232), False, 'import logging\n'), ((241, 347), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(asctime)s - %(name)s: %(levelname)s - %(message)s"""', 'level': 'logging.INFO'}), "(format=\n '%(ascti...
from Instrucciones.TablaSimbolos.Instruccion import Instruccion from storageManager.jsonMode import * class UpdateTable(Instruccion): def __init__(self, id, tipo, lCol, insWhere, linea, columna): Instruccion.__init__(self,tipo,linea,columna) self.identificador = id self.listaDeColumnas = lCo...
[ "Instrucciones.TablaSimbolos.Instruccion.Instruccion.__init__" ]
[((208, 256), 'Instrucciones.TablaSimbolos.Instruccion.Instruccion.__init__', 'Instruccion.__init__', (['self', 'tipo', 'linea', 'columna'], {}), '(self, tipo, linea, columna)\n', (228, 256), False, 'from Instrucciones.TablaSimbolos.Instruccion import Instruccion\n')]
import math import TextPrep as prep """ Gets cosine similarity of two documents """ def GetCosineSimilarity(doc1, doc2): # wrapper function to clean documents and return cosine similarity cleanDoc1 = prep.CleanDocument(doc1) cleanDoc2 = prep.CleanDocument(doc2) docVec1, docVec2 = __bagOfWords__(...
[ "TextPrep.CleanDocument" ]
[((215, 239), 'TextPrep.CleanDocument', 'prep.CleanDocument', (['doc1'], {}), '(doc1)\n', (233, 239), True, 'import TextPrep as prep\n'), ((256, 280), 'TextPrep.CleanDocument', 'prep.CleanDocument', (['doc2'], {}), '(doc2)\n', (274, 280), True, 'import TextPrep as prep\n')]
# -*- coding: utf-8 -*- """ Created on Fri Aug 31 22:33:41 2018 @author: Yulab """ import tensorflow as tf import numpy as np import math #%% def conv(layer_name, x, out_channels, kernel_size=[3,3], stride=[1,1,1,1], is_pretrain=True, seed=1): '''Convolution op wrapper, use RELU activation after convolution ...
[ "tensorflow.contrib.layers.xavier_initializer", "tensorflow.reduce_sum", "numpy.random.seed", "tensorflow.constant_initializer", "tensorflow.reshape", "tensorflow.matmul", "tensorflow.nn.conv2d", "tensorflow.nn.relu", "tensorflow.variable_scope", "tensorflow.nn.softmax_cross_entropy_with_logits_v2...
[((4569, 4595), 'tensorflow.cast', 'tf.cast', (['correct', 'tf.int32'], {}), '(correct, tf.int32)\n', (4576, 4595), True, 'import tensorflow as tf\n'), ((4610, 4632), 'tensorflow.reduce_sum', 'tf.reduce_sum', (['correct'], {}), '(correct)\n', (4623, 4632), True, 'import tensorflow as tf\n'), ((5753, 5773), 'numpy.rando...
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
[ "setuptools.find_packages" ]
[((1173, 1216), 'setuptools.find_packages', 'find_packages', ([], {'exclude': "['tests', 'tests.*']"}), "(exclude=['tests', 'tests.*'])\n", (1186, 1216), False, 'from setuptools import setup, find_packages\n')]
from hoomd_periodic import simulate from md_nnps_periodic import MDNNPSSolverPeriodic import numpy as np import matplotlib.pyplot as plt def run_simulations(num_particles, tf, dt): # run hoomd simulation simulate(num_particles, dt, tf, log=True) # run compyle simulation solver = MDNNPSSolverPeriodic(n...
[ "hoomd_periodic.simulate", "matplotlib.pyplot.plot", "matplotlib.pyplot.clf", "matplotlib.pyplot.legend", "numpy.genfromtxt", "matplotlib.pyplot.ylabel", "md_nnps_periodic.MDNNPSSolverPeriodic", "matplotlib.pyplot.savefig", "matplotlib.pyplot.xlabel" ]
[((213, 254), 'hoomd_periodic.simulate', 'simulate', (['num_particles', 'dt', 'tf'], {'log': '(True)'}), '(num_particles, dt, tf, log=True)\n', (221, 254), False, 'from hoomd_periodic import simulate\n'), ((298, 333), 'md_nnps_periodic.MDNNPSSolverPeriodic', 'MDNNPSSolverPeriodic', (['num_particles'], {}), '(num_partic...
# 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...
[ "numpy.abs", "numpy.allclose", "numpy.einsum", "numpy.linalg.svd", "numpy.diag", "numpy.conjugate", "numpy.round", "openfermion.hermitian_conjugated", "numpy.transpose", "numpy.isrealobj", "openfermion.FermionOperator", "numpy.conj", "numpy.complex128", "scipy.linalg.block_diag", "numpy....
[((1906, 1936), 'numpy.zeros', 'np.zeros', (['(nso ** 2, nso ** 2)'], {}), '((nso ** 2, nso ** 2))\n', (1914, 1936), True, 'import numpy as np\n'), ((2302, 2348), 'numpy.allclose', 'np.allclose', (['test_generator_mat', 'generator_mat'], {}), '(test_generator_mat, generator_mat)\n', (2313, 2348), True, 'import numpy as...
# coding: utf-8 """ DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501 OpenAPI spec version: v2.1 Contact: <EMAIL> Generated by: https://github.com/swagger-api/swagger-codegen.git """ import ...
[ "six.iteritems", "docusign_esign.client.configuration.Configuration" ]
[((6100, 6133), 'six.iteritems', 'six.iteritems', (['self.swagger_types'], {}), '(self.swagger_types)\n', (6113, 6133), False, 'import six\n'), ((1544, 1559), 'docusign_esign.client.configuration.Configuration', 'Configuration', ([], {}), '()\n', (1557, 1559), False, 'from docusign_esign.client.configuration import Con...