text stringlengths 28 881k |
|---|
"""Fixes for CESM2-WACCM model."""NEWLINEfrom netCDF4 import DatasetNEWLINENEWLINEfrom .cesm2 import Cl as BaseClNEWLINEfrom .cesm2 import Fgco2 as BaseFgco2NEWLINEfrom .cesm2 import Tas as BaseTasNEWLINEfrom ..common import SiconcFixScalarCoordNEWLINENEWLINENEWLINEclass Cl(BaseCl):NEWLINE """Fixes for cl."""NEWLINE... |
#!/usr/bin/env pythonNEWLINE# -*- coding: utf-8 -*-NEWLINEfrom PyQt5 import QtWidgets, QtCoreNEWLINEfrom PyQt5.Qt import QTreeWidgetNEWLINEfrom src.gui.sharedcomnponets.sharedcomponets import GUIToolKitNEWLINEfrom src.simpleFOCConnector import SimpleFOCDeviceNEWLINEfrom src.simpleFOCConnector import CommandNEWLINENEWLI... |
from app import socketioNEWLINEfrom config import *NEWLINEfrom .spi import *NEWLINEfrom ..socketio_queue import EmitQueueNEWLINENEWLINEfrom flask_socketio import NamespaceNEWLINENEWLINEimport loggingNEWLINENEWLINElogger = logging.getLogger("SIO_Server")NEWLINENEWLINENEWLINEclass XApiNamespace(Namespace):NEWLINE md =... |
from ignite.metrics.accumulation import Average, GeometricAverage, VariableAccumulationNEWLINEfrom ignite.metrics.accuracy import AccuracyNEWLINEfrom ignite.metrics.classification_report import ClassificationReportNEWLINEfrom ignite.metrics.confusion_matrix import ConfusionMatrix, DiceCoefficient, IoU, JaccardIndex, mI... |
"""Program to draw Mandelbrot fractals: the graphical user interface.NEWLINENEWLINEAuthor: Lars van den Haak and Tom VerhoeffNEWLINENEWLINECopyright (c) 2020 - Eindhoven University of Technology, The NetherlandsNEWLINENEWLINEThis software is made available under the terms of the MIT License.NEWLINENEWLINE* Contributor ... |
from __future__ import absolute_importNEWLINENEWLINEfrom google.appengine.api import usersNEWLINENEWLINE# CUSTOMIZE can_see_experiments however you want to specifyNEWLINE# whether or not the currently-logged-in user has accessNEWLINE# to the experiment dashboard.NEWLINEdef can_control_experiments():NEWLINE return us... |
from typing import ListNEWLINENEWLINEfrom .en import FILTERS as EN_FILTERSNEWLINEfrom .de import FILTERS as DE_FILTERSNEWLINEfrom .fr import FILTERS as FR_FILTERSNEWLINEfrom .es import FILTERS as ES_FILTERSNEWLINEfrom .mx import FILTERS as MX_FILTERSNEWLINEfrom .ru import FILTERS as RU_FILTERSNEWLINEfrom .cn import FIL... |
"""NEWLINE@author: Junguang JiangNEWLINE@contact: JiangJunguang1123@outlook.comNEWLINE"""NEWLINEimport randomNEWLINEimport timeNEWLINEimport warningsNEWLINEimport sysNEWLINEimport argparseNEWLINEimport shutilNEWLINEimport os.path as ospNEWLINENEWLINEimport torchNEWLINEimport torch.nn as nnNEWLINEimport torch.backends.c... |
print('This is for test #1') |
import osNEWLINEimport reNEWLINEimport shutilNEWLINEimport subprocessNEWLINEimport jsonNEWLINENEWLINEfrom core.python import help_textNEWLINEfrom core.python.python_terraform import IsNotFlaggedNEWLINEfrom core.python.utils import PatchedTerraform as TerraformNEWLINEfrom core.python.utils import (NEWLINE check_own_i... |
from pycocotools.coco import COCONEWLINENEWLINEimport matplotlib.pyplot as pltNEWLINEimport cv2NEWLINENEWLINEimport osNEWLINEimport numpy as npNEWLINEimport randomNEWLINEimport torchNEWLINEimport torchvision.transforms as transformsNEWLINEfrom torch.utils.data import DataLoader,DatasetNEWLINEfrom skimage import io,tran... |
"""Base definitions for RPC."""NEWLINEfrom __future__ import absolute_importNEWLINENEWLINEimport socketNEWLINEimport timeNEWLINEimport jsonNEWLINEimport errnoNEWLINEimport structNEWLINEimport randomNEWLINEimport loggingNEWLINENEWLINEfrom ..._ffi.function import _init_apiNEWLINEfrom ..._ffi.base import py_strNEWLINENEWL... |
#!/usr/bin/env python3NEWLINENEWLINE__author__ = 'xtof'NEWLINENEWLINEimport argparseNEWLINEimport reNEWLINEimport loggingNEWLINEimport sysNEWLINEfrom subprocess import Popen, PIPENEWLINEfrom docker import ClientNEWLINEfrom docker.utils import kwargs_from_envNEWLINEfrom dns.resolver import ResolverNEWLINEfrom dns.except... |
#!/usr/bin/env python3NEWLINE# coding=utf-8NEWLINENEWLINEimport numpy as npNEWLINEimport pandas as pdNEWLINENEWLINENEWLINEdef show_predict_probability(frame):NEWLINE x1 = frame['x1']NEWLINE x2 = frame['x2']NEWLINE probability = frame['probabilities']NEWLINE class1_x = [x1[i] for i, x in enumerate(probabilit... |
#!/usr/bin/env pythonNEWLINENEWLINEimport jsonNEWLINEimport clickNEWLINENEWLINENEWLINE@click.command()NEWLINE@click.option("--in-private")NEWLINEdef dump_pem_to_jwks(in_private):NEWLINE try:NEWLINE from jwcrypto.jwk import JWK, JWKSetNEWLINE except ImportError as e:NEWLINE msg = "You have to install... |
from __future__ import division, absolute_import, print_functionNEWLINENEWLINE__copyright__ = "Copyright (C) 2015 Andreas Kloeckner"NEWLINENEWLINE__license__ = """NEWLINEPermission is hereby granted, free of charge, to any person obtaining a copyNEWLINEof this software and associated documentation files (the "Software"... |
"""Log consumers are responsible for fetching chia logsNEWLINEand propagating them to subscribers for further handling.NEWLINENEWLINEThis abstraction should provide an easy ability to switch betweenNEWLINElocal file reader and fetching logs from a remote machine.NEWLINEThe latter has not been implemented yet. Feel free... |
# -*- coding: utf-8 -*-NEWLINE#NEWLINE# Copyright (C) 2021 Graz University of Technology.NEWLINE# Copyright (C) 2021 CERN.NEWLINE# Copyright (C) 2021 TU Wien.NEWLINE#NEWLINE# Invenio-Records-Permissions is free software; you can redistribute itNEWLINE# and/or modify it under the terms of the MIT License; see LICENSE fi... |
#!/usr/bin/env python3NEWLINE# -*- coding:utf-8 -*-NEWLINE"""NEWLINEreceive_logs_direct.py published log messages are going to be broadcast to all the receivesNEWLINE"""NEWLINE# Pika is a pure-Python implementation of the AMQP 0-9-1 protocolNEWLINEimport pikaNEWLINEimport sysNEWLINENEWLINENEWLINE# guest user can only c... |
# Copyright 2016-2018 Intel CorporationNEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LICENSE-2.0NEWLINE#NEWLINE# ... |
import sysNEWLINEimport numpy as npNEWLINEimport pandas as pdNEWLINEimport networkx as nxNEWLINENEWLINEimport hypercomparison.utilsNEWLINEimport hypercomparison.networksNEWLINEimport hypercomparison.embedding_centeredNEWLINEfrom hypercomparison.link_prediction import LinkPredictionTaskNEWLINEfrom hypercomparison.networ... |
import clickNEWLINEfrom collections import CounterNEWLINEfrom typing import List, TupleNEWLINENEWLINEfrom .utils import assertCommitsNEWLINENEWLINENEWLINEclass EmailRedactParamType(click.ParamType):NEWLINE name = 'emailredact'NEWLINENEWLINE def convert(self, value, param, ctx) -> Tuple[str, str, str]:NEWLINE ... |
import osNEWLINEimport shutilNEWLINENEWLINEfrom riptide.config.document.command import CommandNEWLINEfrom riptide.config.files import path_in_projectNEWLINEfrom riptide.engine.abstract import ExecErrorNEWLINENEWLINEIMAGE = 'alpine'NEWLINE# TODO: Since permissions are always mapped to user->root under Windows, there won... |
# This file was automatically generated by SWIG (http://www.swig.org).NEWLINE# Version 2.0.11NEWLINE#NEWLINE# Do not make changes to this file unless you know what you are doing--modifyNEWLINE# the SWIG interface file instead.NEWLINENEWLINENEWLINENEWLINENEWLINENEWLINEfrom sys import version_infoNEWLINEif version_info >... |
# -*- coding:utf-8 -*-NEWLINENEWLINE# Copyright 2015 NEC Corporation. #NEWLINE# #NEWLINE# Licensed under the Apache License, Version 2.0 (the "License"); #NEWLINE# you may not use this file except ... |
import pyaf.Bench.TS_datasets as tsdsNEWLINEimport tests.artificial.process_artificial_dataset as artNEWLINENEWLINENEWLINENEWLINENEWLINEart.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "ConstantTrend", cycle_length = 12, transform = "RelativeDifference", sigma = 0.0, exog_count = 20, ar_order = 12); |
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LICENS... |
import FWCore.ParameterSet.Config as cmsNEWLINENEWLINEprocess = cms.Process("TEST")NEWLINENEWLINEprocess.source = cms.Source("EmptySource",NEWLINE firstRun = cms.untracked.uint32(1),NEWLINE firstLuminosityBlock = cms.untracked.uint32(2),NEWLINE firstEvent = cms.untracked.uint32(15),NEWLINE numberEventsInRun... |
# -*- coding: utf-8 -*-NEWLINENEWLINEfrom ..expr import *NEWLINENEWLINEdef_Topic(NEWLINE Title("Riemann zeta function"),NEWLINE Section("Definitions"),NEWLINE Entries(NEWLINE "e0a6a2",NEWLINE ),NEWLINE Section("Illustrations"),NEWLINE Entries(NEWLINE "3131df",NEWLINE ),NEWLINE Sect... |
from .extractor import DateExtractor, ExtractedData, ExtractorExceptionNEWLINENEWLINENEWLINEclass AmazonPrimeExtractorException(ExtractorException):NEWLINENEWLINE def __init__(self, *args, **kwargs):NEWLINE ExtractorException.__init__(self, *args, **kwargs)NEWLINENEWLINENEWLINEclass AmazonPrimeDateExtractor(D... |
# Copyright (c) ZenML GmbH 2021. All Rights Reserved.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License at:NEWLINE#NEWLINE# https://www.apache.org/licenses/LICENS... |
# Functions to load ODELAY generated MATFILESNEWLINENEWLINE# Internal LibrariesNEWLINEimport clickNEWLINEimport csvNEWLINEfrom datetime import datetimeNEWLINEimport jsonNEWLINEimport osNEWLINEimport pathlibNEWLINEimport reNEWLINEimport sysNEWLINEimport timeNEWLINENEWLINE# External LibrariesNEWLINEimport cv2NEWLINEfrom ... |
from django.contrib.sites.models import SiteNEWLINEfrom django.db import modelsNEWLINEfrom django.urls import NoReverseMatch, get_script_prefix, reverseNEWLINEfrom django.utils.encoding import iri_to_uriNEWLINEfrom django.utils.translation import gettext_lazy as _NEWLINENEWLINENEWLINEclass FlatPage(models.Model):NEWLIN... |
# Copyright (C) 2021 CyberUserBotNEWLINE# This file is a part of < https://github.com/CyberUserBot/Installer/ >NEWLINE# Please read the MIT license inNEWLINE# <https://www.github.com/CyberUserBot/Installer/blob/master/LICENSE/>.NEWLINENEWLINE# Təkrar istifadəyə icazə verilmir.NEWLINE# Yeniden kullanıma izin verilmiyor.... |
from typing import Any, Iterable, Mapping, MutableMappingNEWLINENEWLINEfrom ghaudit.query.sub_query import SubQuery, ValidValueTypeNEWLINEfrom ghaudit.query.utils import PageInfo, jinja_envNEWLINENEWLINENEWLINEclass SubQueryCommon(SubQuery):NEWLINE def __init__(NEWLINE self,NEWLINE fragments: Iterable[... |
from math import ceilNEWLINENEWLINEimport numpy as npNEWLINEfrom numpy.testing import assert_array_equalNEWLINEimport pytestNEWLINENEWLINEfrom sklearn.ensemble import StackingClassifierNEWLINEfrom sklearn.exceptions import NotFittedErrorNEWLINEfrom sklearn.neighbors import KNeighborsClassifierNEWLINEfrom sklearn.svm im... |
# MIT LICENSENEWLINE#NEWLINE# Copyright 1997 - 2020 by IXIA KeysightNEWLINE#NEWLINE# Permission is hereby granted, free of charge, to any person obtaining a copyNEWLINE# of this software and associated documentation files (the "Software"),NEWLINE# to deal in the Software without restriction, including without limitatio... |
# Copyright 2019, Google LLC.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LICENSE-2.0NEWLINE#NEWLINE# Unless re... |
#!/usr/bin/env pythonNEWLINE#NEWLINE# __COPYRIGHT__NEWLINE#NEWLINE# Permission is hereby granted, free of charge, to any person obtainingNEWLINE# a copy of this software and associated documentation files (theNEWLINE# "Software"), to deal in the Software without restriction, includingNEWLINE# without limitation the rig... |
###SRNDNANEWLINE###shared reward, block designNEWLINENEWLINEfrom psychopy import visual, core, event, gui, data, sound, loggingNEWLINEimport csvNEWLINEimport datetimeNEWLINEimport randomNEWLINEimport numpyNEWLINEimport osNEWLINENEWLINE#maindir = os.getcwd()NEWLINENEWLINENEWLINE#parametersNEWLINEuseFullScreen = TrueNEWL... |
from django.conf.urls import urlNEWLINENEWLINEfrom .views import ImageDetail, ImageListNEWLINENEWLINENEWLINEurlpatterns = [NEWLINE url(r'^(?P<pk>\d+)/$', ImageDetail.as_view(), name='image-detail'),NEWLINE url(r'^(?P<gallery_ct>[a-z]+)/(?P<gallery_id>\d+)/$', ImageList.as_view(), name='image-list'),NEWLINE]NEWLIN... |
# Copyright The IETF Trust 2018, All Rights ReservedNEWLINE# -*- coding: utf-8 -*-NEWLINEfrom __future__ import unicode_literals, print_function, divisionNEWLINENEWLINEimport datetimeNEWLINEimport i18naddressNEWLINEimport lxmlNEWLINEimport osNEWLINEimport reNEWLINE#import sysNEWLINEimport sixNEWLINEimport unicodedataNE... |
from business_register.models import (NEWLINE company_models,NEWLINE fop_models,NEWLINE kved_models,NEWLINE pep_models,NEWLINE sanction_models,NEWLINE declaration_models,NEWLINE)NEWLINE |
import torchNEWLINEimport torch.nn as nnNEWLINEfrom torch.distributions import NormalNEWLINENEWLINEfrom examples.nvae.common import DecoderResidualBlockNEWLINEfrom examples.nvae.common import ResidualBlockNEWLINEfrom examples.nvae.common import SwishNEWLINEfrom examples.nvae.losses import kl_2NEWLINEfrom examples impor... |
from rt_utils.rtstruct import RTStructNEWLINEimport pytestNEWLINEimport osNEWLINEfrom rt_utils import RTStructBuilderNEWLINENEWLINE@pytest.fixture()NEWLINEdef series_path() -> str:NEWLINE return get_and_test_series_path('mock_data')NEWLINENEWLINE@pytest.fixture()NEWLINEdef new_rtstruct() -> RTStruct:NEWLINE retur... |
# Generated by Django 2.2 on 2020-02-19 18:16NEWLINENEWLINEfrom django.db import migrations, modelsNEWLINEimport django.db.models.deletionNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE dependencies = [NEWLINE ('home', '0108_fullwidthpage_citations'),NEWLINE ]NEWLINENEWLINE ope... |
# pylint: disable=no-value-for-parameterNEWLINENEWLINEimport dagster.check as checkNEWLINENEWLINEfrom dagster import (NEWLINE DependencyDefinition,NEWLINE InProcessExecutorConfig,NEWLINE InputDefinition,NEWLINE Int,NEWLINE List,NEWLINE ModeDefinition,NEWLINE MultiDependencyDefinition,NEWLINE Not... |
"""NEWLINECreated on Apr 18, 2017NEWLINENEWLINE@author: Christopher BrunsNEWLINE"""NEWLINENEWLINEimport osNEWLINENEWLINEimport numpyNEWLINEfrom OpenGL import GLNEWLINEfrom OpenGL.GL.shaders import compileShader, compileProgramNEWLINEfrom OpenGL.arrays import vboNEWLINENEWLINEfrom openvr.glframework.glmatrix import iden... |
# Generated by Django 3.2 on 2021-06-24 12:18NEWLINENEWLINEfrom django.db import migrations, modelsNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE dependencies = [NEWLINE ('blog_email', '0001_initial'),NEWLINE ]NEWLINENEWLINE operations = [NEWLINE migrations.AlterField(N... |
import cv2NEWLINEimport osNEWLINEimport csvNEWLINEimport parzen.PARZEN as parzenNEWLINENEWLINENEWLINEdef extract_features(image_path, vector_size, label):NEWLINE img = cv2.imread(image_path)NEWLINE gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)NEWLINE small = cv2.resize(gray, (vector_size, vector_size))NEWLINENE... |
#!/usr/bin/env python3NEWLINE# SPDX-License-Identifier: Apache-2.0NEWLINE# Copyright (C) 2010-2021 Intel CorporationNEWLINE"""NEWLINELMS DBus interface unit-testsNEWLINENEWLINECall every DBus method, should not throw exception.NEWLINETest also incorrect input.NEWLINENEWLINETODO: Alarm, check output.NEWLINE"""NEWLINEimp... |
"""Tests for TypeVar."""NEWLINENEWLINEfrom pytype import file_utilsNEWLINEfrom pytype.tests import test_baseNEWLINENEWLINENEWLINEclass TypeVarTest(test_base.TargetPython3BasicTest):NEWLINE """Tests for TypeVar."""NEWLINENEWLINE def test_id(self):NEWLINE ty = self.Infer("""NEWLINE import typingNEWLINE T =... |
import cv2NEWLINEimport numpy as npNEWLINEimport osNEWLINEimport sysNEWLINEimport tensorflow as tfNEWLINENEWLINEfrom sklearn.model_selection import train_test_splitNEWLINENEWLINEEPOCHS = 10NEWLINEIMG_WIDTH = 30NEWLINEIMG_HEIGHT = 30NEWLINENUM_CATEGORIES = 43NEWLINETEST_SIZE = 0.4NEWLINENEWLINENEWLINEdef main():NEWLINEN... |
from .companies import CompanyView, CompaniesViewNEWLINEfrom .employees import (NEWLINE EmployeeView, EmployeesView, EmployeeProductsView,NEWLINE EmployeeProductDeleteViewNEWLINE)NEWLINEfrom .products import ProductView, ProductsViewNEWLINENEWLINENEWLINEHANDLERS = (NEWLINE CompanyView, CompaniesView,NEWLINE ... |
# -*- coding: utf8 -*-NEWLINE"""NEWLINE.. module:: lesscpy.plib.negated_expressionNEWLINE :synopsis: Node for unary negated expressions.NEWLINENEWLINE Copyright (c)NEWLINE See LICENSE for details.NEWLINE"""NEWLINENEWLINEfrom six import string_typesNEWLINENEWLINEfrom .node import NodeNEWLINENEWLINENEWLINEclass ... |
# Copyright 2020, Kay Hayen, mailto:kay.hayen@gmail.comNEWLINE#NEWLINE# Part of "Nuitka", an optimizing Python compiler that is compatible andNEWLINE# integrates with CPython, but also works on its own.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may n... |
from __future__ import print_functionNEWLINEimport hashlibNEWLINEimport importlibNEWLINEimport jsonNEWLINEimport loggingNEWLINEimport osNEWLINEimport sysNEWLINEfrom itertools import chainNEWLINEfrom warnings import warn as _warnNEWLINEfrom hashlib import sha1NEWLINEfrom os.path import isfileNEWLINEfrom os.path import j... |
# -*- coding: utf-8 -*-NEWLINEfrom __future__ import absolute_import, division, print_function, unicode_literalsNEWLINENEWLINEfrom copy import deepcopyNEWLINENEWLINEfrom django.test.testcases import TestCaseNEWLINENEWLINEfrom djstripe.models import CouponNEWLINENEWLINEfrom . import FAKE_COUPONNEWLINENEWLINENEWLINEclass... |
from __future__ import absolute_importNEWLINENEWLINEimport sixNEWLINEimport pytzNEWLINENEWLINEfrom datetime import datetimeNEWLINENEWLINEfrom sentry.coreapi import APIUnauthorizedNEWLINEfrom sentry.mediators import Mediator, ParamNEWLINEfrom sentry.mediators.token_exchange.validator import ValidatorNEWLINEfrom sentry.m... |
import abcNEWLINEfrom typing import Type, UnionNEWLINEimport numpy as npNEWLINENEWLINEfrom uncertainty_framework.report._report import Report as ReportBaseClassNEWLINEfrom uncertainty_framework.report.margins import MarginReportNEWLINEfrom uncertainty_framework.report.console import ConsoleReportNEWLINEfrom uncertainty... |
import jsonNEWLINEimport subprocessNEWLINEfrom pathlib import PathNEWLINEfrom pprint import pprintNEWLINEfrom urllib.parse import urlencodeNEWLINEfrom urllib.request import Request, urlopenNEWLINENEWLINEimport clickNEWLINEfrom InquirerPy import promptNEWLINENEWLINEfrom .utils import cdNEWLINENEWLINENEWLINEdef read_line... |
# PyYAML libraryNEWLINE__license__ = 'MIT'NEWLINE__author__ = 'Kirill Simonov'NEWLINE__copyright__ = """NEWLINE Copyright (c) 2017-2020 Ingy döt NetNEWLINE Copyright (c) 2006-2016 Kirill SimonovNEWLINE """NEWLINENEWLINE# For changes regarding this port for Ignition usage, please contact:NEWLINE__maintainer__ = 'Andrew ... |
for c in range(0,51):NEWLINE if c % 2 == 0:NEWLINE print(c)NEWLINEprint('Programa Finalizado')NEWLINE |
import importlibNEWLINEimport osNEWLINEimport timeNEWLINEimport randomNEWLINENEWLINEimport torchNEWLINEimport torch.nn.functional as FNEWLINEimport numpy as npNEWLINEimport ComputePostBNNEWLINEfrom utils.setlogger import get_loggerNEWLINENEWLINEfrom utils.model_profiling import model_profilingNEWLINEfrom utils.config i... |
import numpy as npNEWLINEimport copyNEWLINENEWLINEfrom . import ekf_utilsNEWLINENEWLINEgtrack_MIN_DISPERSION_ALPHA = 0.1NEWLINEgtrack_EST_POINTS = 10NEWLINEgtrack_MIN_POINTS_TO_UPDATE_DISPERSION = 3NEWLINEgtrack_KNOWN_TARGET_POINTS_THRESHOLD = 50NEWLINENEWLINENEWLINE# GTRACK Module calls this function to instantiate GT... |
#!/usr/bin/env python3NEWLINE# -*- coding: utf-8 -*-NEWLINENEWLINEfrom .effect import ShortEffectLayer, LongEffectLayer, LongEffectAllRangeLayerNEWLINEfrom .combine import CombineLayerNEWLINENEWLINE__author__ = 'Yasuhiro'NEWLINE__date__ = '2018/2/15'NEWLINE |
import osNEWLINEimport win32security,win32file,win32api,ntsecuritycon,win32conNEWLINEfrom security_enums import TRUSTEE_TYPE,TRUSTEE_FORM,ACE_FLAGS,ACCESS_MODENEWLINENEWLINEfname = os.path.join(win32api.GetTempPath(), "win32security_test.txt")NEWLINEf=open(fname, "w")NEWLINEf.write("Hello from Python\n");NEWLINEf.close... |
import numpy as npNEWLINENEWLINEfrom collections import deque, IterableNEWLINEimport sigvisa.infer.optimize.optim_utils as optim_utilsNEWLINENEWLINEclass CyclicGraphError(Exception):NEWLINE passNEWLINENEWLINENEWLINEclass DAG(object):NEWLINENEWLINE """NEWLINE Represents a directed acyclic graph.NEWLINENEWLINE ... |
# coding: utf-8NEWLINENEWLINE"""NEWLINE FlashBlade REST APINEWLINENEWLINE A lightweight client for FlashBlade REST API 2.3, developed by Pure Storage, Inc. (http://www.purestorage.com/).NEWLINENEWLINE OpenAPI spec version: 2.3NEWLINE NEWLINE Generated by: https://github.com/swagger-api/swagger-codegen.gi... |
# Определение номера столбца с наибольшим количеством отрицательных элементов,NEWLINE# составление массива из элементов матрицы, находящихся под главной диагональю.NEWLINE# Котов НикитаNEWLINENEWLINE# n - размер матрицы;NEWLINE# a - заданная матрица;NEWLINE#... |
# @version: 1.0 date: 05/06/2015 by Sidney BartheNEWLINE# @author: robin.scheibler@epfl.ch, ivan.dokmanic@epfl.ch, sidney.barthe@epfl.chNEWLINE# @copyright: EPFL-IC-LCAV 2015NEWLINENEWLINEfrom __future__ import print_functionNEWLINENEWLINEimport numpy as npNEWLINEimport scipy.spatial as spatialNEWLINEimport ctypesNEWL... |
from .models import Sentences,WordOptions,WordsinsentenceNEWLINEfrom table import TableNEWLINEfrom table.columns import ColumnNEWLINENEWLINE#this has been defined for the datatables on the siteNEWLINENEWLINE#WordOptionsTable holds required data displayed when clicked on the collapsible in the nav barNEWLINEclass WordOp... |
from flask_script import Manager, ShellNEWLINEimport osNEWLINENEWLINEfrom app import create_appNEWLINENEWLINEapp = create_app(os.getenv('APP_SETTINGS'))NEWLINEmanager = Manager(app)NEWLINENEWLINENEWLINEdef make_shell_context():NEWLINE return dict(app=app)NEWLINENEWLINEmanager.add_command("shell", Shell(make_context=... |
import torchNEWLINEimport numpy as npNEWLINENEWLINEfrom torch.nn.utils.clip_grad import clip_grad_norm_NEWLINEfrom maml.utils import accuracyNEWLINENEWLINEdef get_grad_norm(parameters, norm_type=2):NEWLINE if isinstance(parameters, torch.Tensor):NEWLINE parameters = [parameters]NEWLINE parameters = list(fi... |
#!/usr/bin/env pythonNEWLINE#NEWLINE# Copyright 2007 Google Inc.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LIC... |
import pytestNEWLINEimport mockNEWLINEimport jsonNEWLINEfrom functools import wrapsNEWLINEfrom unittest.mock import patchNEWLINENEWLINEfrom app import storageNEWLINEfrom data.registry_model.blobuploader import upload_blob, BlobUploadSettingsNEWLINEfrom image.docker.schema2.manifest import DockerSchema2ManifestBuilderNE... |
import torchNEWLINEimport loggingNEWLINENEWLINEimport models.modules.UNet_arch as UNet_archNEWLINElogger = logging.getLogger('base')NEWLINENEWLINENEWLINE####################NEWLINE# define networkNEWLINE####################NEWLINE#### GeneratorNEWLINEdef define_G(opt):NEWLINE opt_net = opt['network_G']NEWLINE whi... |
# Project: hardInfoNEWLINE# Author: George Keith WatsonNEWLINE# Date Started: March 18, 2022NEWLINE# Copyright: (c) Copyright 2022 George Keith WatsonNEWLINE# Module: model/Installation.pyNEWLINE# Date Started: March 20, 2022NEWLINE# Purpose: Store installation locat... |
import numpy as np # linear algebraNEWLINEimport pandas as pd # data processingNEWLINEimport datetime as dt # date and time processing functionsNEWLINEimport matplotlib.pyplot as plt # basic plotting NEWLINEimport matplotlib.dates as mdates # date processing in matplotlibNEWLINEfrom matplotlib.offsetbox import Anchored... |
# uncompyle6 version 3.3.1NEWLINE# Python bytecode 3.6 (3379)NEWLINE# Decompiled from: Python 3.6.2 (v3.6.2:5fd33b5926, Jul 16 2017, 20:11:06) NEWLINE# [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]NEWLINE# Embedded file name: ../../shared/problems/CR/problem1050_CR.pyNEWLINE# Compiled at: 2019-03-12 17:52:21NEWLINE# Size... |
from __future__ import annotationsNEWLINENEWLINEfrom typing import (NEWLINE TYPE_CHECKING,NEWLINE Callable,NEWLINE Dict,NEWLINE Hashable,NEWLINE List,NEWLINE Optional,NEWLINE Sequence,NEWLINE Set,NEWLINE Tuple,NEWLINE Union,NEWLINE cast,NEWLINE)NEWLINENEWLINEimport numpy as npNEWLINENEW... |
import pytestNEWLINEfrom moto import mock_s3NEWLINENEWLINEimport loggingNEWLINEimport pandas as pdNEWLINEimport boto3NEWLINENEWLINEfrom great_expectations.datasource.generator.s3_generator import S3GlobReaderBatchKwargsGeneratorNEWLINEfrom great_expectations.exceptions import BatchKwargsErrorNEWLINENEWLINENEWLINE@pytes... |
import unittestNEWLINENEWLINEfrom tag_bot.utils import read_config_with_yq, update_config_with_yqNEWLINENEWLINENEWLINEclass TestUtilityFunctions(unittest.TestCase):NEWLINE def test_read_config_with_yq_singleuser(self):NEWLINE var_path = ".singleuser.image"NEWLINE config = {"singleuser": {"image": {"nam... |
""""NEWLINEОсновной файл ботаNEWLINE"""NEWLINENEWLINEimport osNEWLINEimport platformNEWLINEimport randomNEWLINENEWLINEimport discordNEWLINEfrom discord.ext import commands, tasksNEWLINEfrom discord.ext.commands import BotNEWLINEfrom discord_slash import SlashCommand, SlashContext # Importing the newly installed librar... |
NEWLINEimport reNEWLINENEWLINENEWLINEclass RegexValidator(object):NEWLINE def __init__(self, pattern, excludes):NEWLINE if not pattern or pattern == '':NEWLINE pattern = '.*' # match anythingNEWLINE if not excludes or excludes == '':NEWLINE excludes = 'a^' # match nothingNEWLINE... |
from selenium import webdriverNEWLINEimport selenium.common.exceptionsNEWLINEfrom selenium.webdriver import FirefoxOptionsNEWLINEfrom selenium.webdriver.common.by import ByNEWLINEfrom selenium.webdriver.support.expected_conditions import (NEWLINE text_to_be_present_in_element,NEWLINE)NEWLINEfrom selenium.webdriver.s... |
from datetime import datetime, dateNEWLINEfrom marqeta.response_models.transaction_model import TransactionModelNEWLINEfrom marqeta.response_models import datetime_objectNEWLINEimport jsonNEWLINEimport reNEWLINENEWLINEclass AdvancedSimulationResponseModel(object):NEWLINENEWLINE def __init__(self, json_response):NEWL... |
#!/usr/bin/python3NEWLINE# -*- coding: utf-8 -*-NEWLINE# #%LNEWLINE# %%NEWLINE# Copyright (C) 2021 BMW Car IT GmbHNEWLINE# %%NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNE... |
# Generated by Django 3.0.3 on 2020-03-11 12:12NEWLINENEWLINEfrom django.conf import settingsNEWLINEfrom django.db import migrations, modelsNEWLINEimport django.db.models.deletionNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE dependencies = [NEWLINE ('fedireads', '0014_status_remote... |
# coding=utf-8NEWLINE# *** WARNING: this file was generated by crd2pulumi. ***NEWLINE# *** Do not edit by hand unless you're certain you know what you are doing! ***NEWLINENEWLINESNAKE_TO_CAMEL_CASE_TABLE = {NEWLINE "active_directory": "activeDirectory",NEWLINE "api_version": "apiVersion",NEWLINE "augmented_ac... |
# -*- coding: utf-8 -*-NEWLINE# Copyright (c) 2012-2015, Philip Xu <pyx@xrefactor.com>NEWLINE# License: BSD New, see LICENSE for details.NEWLINEimport pytestNEWLINENEWLINEfrom monad.actions import firstNEWLINEfrom monad.decorators import maybeNEWLINEfrom monad.exceptions import ExtractErrorNEWLINEfrom monad.types impor... |
#!/usr/bin/env pythonNEWLINENEWLINENEWLINEclass __pyndler__:NEWLINE import reNEWLINE from importlib.abc import SourceLoaderNEWLINENEWLINE py_re = re.compile('(\.py|/__init__\.py)$')NEWLINE finder = NoneNEWLINENEWLINE def __init__(self):NEWLINE import sysNEWLINE finder = __pyndler__.Finder()... |
import numpy as npNEWLINEimport sysNEWLINEimport osNEWLINEimport timeNEWLINEimport copyNEWLINEimport datetimeNEWLINEimport pickleNEWLINEimport torch.nn as nnNEWLINEfrom torch.utils.data import DataLoaderNEWLINEimport torch.optim as optimNEWLINEimport torch.optim.lr_scheduler as lr_schedulerNEWLINEimport argparseNEWLINE... |
#This file was created by Tate HaganNEWLINEimport tkinter as tkNEWLINEfrom InputGUISoloDebug import InputGUINEWLINENEWLINEroot = tk.Tk()NEWLINENEWLINEcontainer = tk.Frame(root)NEWLINEcontainer.pack(side="top", fill="both", expand=True)NEWLINEcontainer.grid_rowconfigure(0, weight=1)NEWLINEcontainer.grid_columnconfigure(... |
#!/usr/bin/env pythonNEWLINE# -*- coding: utf-8 -*-NEWLINEimport jsonNEWLINENEWLINEfrom alipay.aop.api.constant.ParamConstants import *NEWLINENEWLINENEWLINEclass FengdieActivityCreatePageData(object):NEWLINENEWLINE def __init__(self):NEWLINE self._name = NoneNEWLINE self._schema_data = NoneNEWLINENEWLI... |
import pytestNEWLINEfrom numerous.engine.model.external_mappings import ExternalMappingElementNEWLINENEWLINEfrom numerous.utils.data_loader import InMemoryDataLoaderNEWLINEfrom pytest import approxNEWLINENEWLINEfrom numerous.engine.model.external_mappings.interpolation_type import InterpolationTypeNEWLINEfrom numerous.... |
# Copyright 2015 The Chromium Authors. All rights reserved.NEWLINE# Use of this source code is governed by a BSD-style license that can beNEWLINE# found in the LICENSE file.NEWLINE"""NEWLINEGenerator that produces an externs file for the Closure Compiler.NEWLINENote: This is a work in progress, and generated externs ma... |
"""NEWLINESpontaneous nuclear decay.NEWLINENEWLINEPackage:NEWLINE RoadNarrows elements package.NEWLINENEWLINEFile:NEWLINE nucleardecay.pyNEWLINENEWLINELink:NEWLINE https://github.com/roadnarrows-robotics/NEWLINENEWLINECopyright:NEWLINE (c) 2019. RoadNarrows LLCNEWLINE http://www.roadnarrows.comNEWLINE All Rights ... |
def test_fixture(postgresql_instance):NEWLINE assert hasattr(postgresql_instance, 'port')NEWLINE |
# -*- coding: utf-8 -*-NEWLINE# Copyright 2020-2021 CERNNEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LICENSE-2.0N... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.