text stringlengths 28 881k |
|---|
#!/usr/bin/env python3NEWLINE# -*- coding: utf-8 -*-NEWLINENEWLINE# Licensed to the Apache Software Foundation (ASF) under oneNEWLINE# or more contributor license agreements. See the NOTICE fileNEWLINE# distributed with this work for additional informationNEWLINE# regarding copyright ownership. The ASF licenses this ... |
"""Support to select a date and/or a time."""NEWLINEimport datetimeNEWLINEimport loggingNEWLINEimport typingNEWLINENEWLINEimport voluptuous as volNEWLINENEWLINEfrom homeassistant.const import (NEWLINE ATTR_DATE,NEWLINE ATTR_EDITABLE,NEWLINE ATTR_TIME,NEWLINE CONF_ICON,NEWLINE CONF_ID,NEWLINE CONF_NAME... |
from abc import ABCNEWLINEimport loggingNEWLINENEWLINEimport ci_sdrNEWLINEimport fast_bss_evalNEWLINEimport torchNEWLINENEWLINENEWLINEfrom espnet2.enh.loss.criterions.abs_loss import AbsEnhLossNEWLINENEWLINENEWLINEclass TimeDomainLoss(AbsEnhLoss, ABC):NEWLINE """Base class for all time-domain Enhancement loss module... |
from decimal import DecimalNEWLINENEWLINEimport jsonNEWLINEimport requestsNEWLINENEWLINEfrom cypherpunkpay.prices.price_source import PriceSourceNEWLINENEWLINENEWLINEclass CwatchCoinPriceSource(PriceSource):NEWLINENEWLINE def get(self, coin: str, fiat: str) -> [Decimal, None]:NEWLINE if fiat != 'usd':NEWLINE ... |
def map_list(list, key, default=None):NEWLINE return filter(None, (item.get(key, default) for item in list))NEWLINENEWLINENEWLINEclass FilterModule(object):NEWLINE def filters(self):NEWLINE return {NEWLINE 'select': map_listNEWLINE }NEWLINE |
import osNEWLINEimport numpy as npNEWLINEimport cv2NEWLINEimport torchNEWLINEimport torchvisionNEWLINEimport carlaNEWLINENEWLINEfrom PIL import Image, ImageDrawNEWLINENEWLINEfrom carla_project.src.image_model import ImageModelNEWLINEfrom carla_project.src.converter import ConverterNEWLINENEWLINEfrom team_code.base_agen... |
# Author: Steven J. Bethard <steven.bethard@gmail.com>.NEWLINENEWLINE"""Command-line parsing libraryNEWLINENEWLINEThis module is an optparse-inspired command-line parsing library that:NEWLINENEWLINE - handles both optional and positional argumentsNEWLINE - produces highly informative usage messagesNEWLINE - su... |
"""NEWLINE OpenVINO DL WorkbenchNEWLINE Dataset annotator moduleNEWLINENEWLINE Copyright (c) 2021 Intel CorporationNEWLINENEWLINE 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 ... |
# Copyright (C) 2018-2021 Intel CorporationNEWLINE# SPDX-License-Identifier: Apache-2.0NEWLINENEWLINEimport numpy as npNEWLINENEWLINEfrom openvino.tools.mo.ops.splice import SpliceNEWLINEfrom openvino.tools.mo.front.common.partial_infer.utils import int64_arrayNEWLINEfrom openvino.tools.mo.graph.graph import Graph, Nod... |
import osNEWLINEimport shutilNEWLINENEWLINEimport mathNEWLINEimport sysNEWLINENEWLINEANSI_ESCAPE_SEQUENCE_START = '\x1b'NEWLINEANSI_ESCAPE_SEQUENCE_END = 'm'NEWLINENEWLINENEWLINEdef get_terminal_width():NEWLINE # when piping stdout linux is executing commands in separate process (terminal-less), that's why shutil wo... |
# coding=utf-8NEWLINE# --------------------------------------------------------------------------NEWLINE# Copyright (c) Microsoft Corporation. All rights reserved.NEWLINE# Licensed under the MIT License. See License.txt in the project root for license information.NEWLINE# Code generated by Microsoft (R) AutoRest Code G... |
import unittestNEWLINENEWLINEfrom tests.mapreduce import MapReduceTestCaseNEWLINENEWLINENEWLINEdef all_tests():NEWLINE suite = unittest.TestSuite()NEWLINE suite.addTest(unittest.makeSuite(MapReduceTestCase))NEWLINE return suiteNEWLINE |
# Copyright 2019 kubeflow.org.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 req... |
# by Kami BigdelyNEWLINE# Extract classNEWLINEWELL_DONE = 3000NEWLINEMEDIUM = 2500NEWLINECOOKED_CONSTANT = 0.05NEWLINENEWLINENEWLINEdef is_cookeding_criteria_satisfied(food):NEWLINE return is_well_done(NEWLINE food.time, NEWLINE food.temperature, NEWLINE food.pressure, NEWLINE ... |
# Copyright 2019 The Vitess Authors.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# ... |
'''NEWLINEWSGI config for server project.NEWLINENEWLINEIt exposes the WSGI callable as a module-level variable named ``application``.NEWLINENEWLINEFor more information on this file, seeNEWLINEhttps://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/NEWLINE'''NEWLINENEWLINEimport osNEWLINENEWLINEfrom django.core.wsg... |
import osNEWLINEfrom pathlib import PathNEWLINEimport reNEWLINEimport dbusNEWLINEimport psutilNEWLINEfrom .bash import exec_bash, BashErrorNEWLINEfrom .log_utils import get_loggerNEWLINENEWLINENEWLINEclass CheckError(Exception):NEWLINE passNEWLINENEWLINENEWLINEdef is_ac_power_connected():NEWLINENEWLINE for power_... |
# -*- coding: utf-8 -*-NEWLINENEWLINE"""NEWLINEtaiga_ncurses.ui.signalsNEWLINE~~~~~~~~~~~~~~~~~~~~~~~~NEWLINE"""NEWLINENEWLINEimport urwidNEWLINENEWLINEconnect = urwid.connect_signalNEWLINEdisconnect = urwid.disconnect_signalNEWLINENEWLINEdef emit(widget, signal):NEWLINE widget._emit(signal)NEWLINE |
from django.core.cache import get_cacheNEWLINEfrom avocado.conf import settingsNEWLINEfrom .model import instance_cache_key, NEVER_EXPIRENEWLINENEWLINENEWLINEdef post_save_cache(sender, instance, **kwargs):NEWLINE """General post-save handler for caching model instances. NOTE: This mustNEWLINE be used in conjunct... |
try:NEWLINE from django.conf.urls import url, includeNEWLINEexcept ImportError:NEWLINE from django.urls import url, includeNEWLINENEWLINEurlpatterns = [NEWLINE url(r'^', include('notify.urls', namespace='notifications')),NEWLINE]NEWLINE |
from __future__ import print_function, absolute_import, divisionNEWLINENEWLINEfrom timeit import default_timer as timerNEWLINEimport numpy as npNEWLINENEWLINEfrom .reduction import device_reduce_sumNEWLINENEWLINENEWLINEdef benchmark_intp(nelem):NEWLINE data = np.random.randint(0, 100, nelem).astype(np.intp)NEWLINENE... |
#Escreva um programa que leia o nome completo de uma pessoa, mostrando em seguida o primeiro e o último nome separadamente.NEWLINE#Ex.: Ana Maria de SouzaNEWLINE#primeiro = AnaNEWLINE#último = SouzaNEWLINEnome = str(input('Digite seu nome: ')).strip()NEWLINEs = nome.split()NEWLINEprint('Seu primeiro nome é {}'.format(s... |
# model settingsNEWLINEmodel = dict(NEWLINE type="RPN",NEWLINE pretrained="open-mmlab://resnet50_caffe",NEWLINE backbone=dict(NEWLINE type="ResNet",NEWLINE depth=50,NEWLINE num_stages=4,NEWLINE out_indices=(0, 1, 2, 3),NEWLINE frozen_stages=1,NEWLINE norm_cfg=dict(type... |
"""NEWLINEDataset module for managing text datasets.NEWLINE"""NEWLINE__author__ = 'victor'NEWLINEfrom collections import OrderedDictNEWLINEimport randomNEWLINEimport numpy as npNEWLINENEWLINENEWLINEclass InvalidFieldsException(Exception):NEWLINE passNEWLINENEWLINENEWLINEclass Dataset(object):NEWLINE """NEWLINE ... |
from Find_the_last_Fibonacci_digit_hardcore_version_6_kyu import last_fib_digitNEWLINEimport unittestNEWLINENEWLINEclass Fibonacci(unittest.TestCase):NEWLINE def test_1(self):NEWLINE n = 7000006NEWLINE result = 3NEWLINE self.assertEqual(last_fib_digit(n), result)NEWLINE def test_1(self):NEWLI... |
from typing import ListNEWLINENEWLINEfrom bleak.backends.service import BleakGATTServiceNEWLINEfrom bleak.backends.bluezdbus.characteristic import BleakGATTCharacteristicBlueZDBusNEWLINENEWLINENEWLINEclass BleakGATTServiceBlueZDBus(BleakGATTService):NEWLINE """GATT Service implementation for the BlueZ DBus backend""... |
# Generated by Django 2.2.8 on 2019-12-23 10:46NEWLINENEWLINEimport datetimeNEWLINEfrom django.db import migrations, modelsNEWLINEfrom django.utils.timezone import utcNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE initial = TrueNEWLINENEWLINE dependencies = [NEWLINE ]NEWLINENEWLINE ... |
from functools import wrapsNEWLINENEWLINEfrom flask import Flask, render_template, url_for, redirect, request, session, flash, get_flashed_messages, abort, BlueprintNEWLINEfrom sqlalchemy import create_engine, or_, and_NEWLINEfrom sqlalchemy.orm import sessionmakerNEWLINEfrom werkzeug.security import check_password_has... |
# -*- coding: utf-8 -*-NEWLINE# Generated by Django 1.10.5 on 2017-04-11 07:35NEWLINEfrom __future__ import unicode_literalsNEWLINENEWLINEfrom django.conf import settingsNEWLINEfrom django.db import migrations, modelsNEWLINEimport django.db.models.deletionNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLI... |
from django.contrib import adminNEWLINEfrom .models import OrderItem,orderNEWLINEfrom import_export.admin import ImportExportActionModelAdminNEWLINEfrom django.urls import reverseNEWLINEfrom django.utils.safestring import mark_safeNEWLINENEWLINENEWLINEdef order_pdf(obj):NEWLINE return mark_safe('<a href="{}">PDF</a>'.f... |
"""NEWLINE==============================NEWLINEWFIRST Instruments (pre-alpha)NEWLINE==============================NEWLINENEWLINEWARNING: This model has not yet been validated against other PSFNEWLINE simulations, and uses several approximations (e.g. forNEWLINE mirror polishing errors, which are taken f... |
# Copyright 2021 Google LLCNEWLINE#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 requ... |
import boto3NEWLINEimport sysNEWLINEfrom st2actions.runners.pythonrunner import ActionNEWLINENEWLINEclass GetStackBuildStatus(Action):NEWLINE def run(self, stack_name_or_id):NEWLINE region = self.config['region']NEWLINENEWLINE stack_states = ['CREATE_COMPLETE', 'CREATE_FAILED', 'ROLLBACK_COMPLETE']NEWL... |
import plataNEWLINENEWLINENEWLINEdef plata_context(request):NEWLINE """NEWLINE Adds a few variables from Plata to the context if they are available:NEWLINENEWLINE * ``plata.shop``: The current :class:`plata.shop.views.Shop` instanceNEWLINE * ``plata.order``: The current orderNEWLINE * ``plata.contact``: ... |
# -*- coding: utf-8 -*-NEWLINE"""The app module, containing the app factory function."""NEWLINEfrom flask import Flask, render_templateNEWLINENEWLINEfrom hamcwebc import commands, public, userNEWLINEfrom hamcwebc.assets import assetsNEWLINEfrom hamcwebc.extensions import bcrypt, cache, csrf_protect, db, debug_toolbar, ... |
'''NEWLINEFile name: common_utils.pyNEWLINEProgrammed by: Mike BernardNEWLINEDate: 2019-11-08NEWLINENEWLINECommon helper functions used in multiple scripts.NEWLINE'''NEWLINENEWLINEfrom nav.utils.constants import PASSNEWLINENEWLINENEWLINEdef weighted_avg(values, weights):NEWLINE '''NEWLINE Takes a list of values a... |
# 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# Autogenerated by Thrift Compiler (0.11.0)NEWLINE#NEWLINE# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOINGNEWLINE#NEWLINE# options string: pyNEWLINE#NEWLINENEWLINEfrom thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationExceptionNEWLINEfrom thrift.protocol.TProtocol... |
#!/usr/bin/env pythonNEWLINENEWLINEimport numpy as npNEWLINEimport roslibNEWLINEimport rospyNEWLINEimport mathNEWLINEimport tfNEWLINEimport timeNEWLINEfrom nav_msgs.msg import OdometryNEWLINEfrom asv_msgs.msg import RobotGoal, SonarData, SonarDataListNEWLINEfrom asv_msgs.srv import SetRobotPath, SetRobotPathResponseNEW... |
# SPDX-License-Identifier: MITNEWLINENEWLINE""":class:`~calingen.interfaces.plugin_api.LayoutProvider` implementation for a simple event list.NEWLINENEWLINEWarningsNEWLINE--------NEWLINEThis layout is included in **django-calingen**'s CI test setup, mainly to verifyNEWLINEthat the :func:`TeX escaping <calingen.template... |
"""NEWLINEProcess missing data within a dataset. NEWLINE"""NEWLINEimport missingno as msnoNEWLINEfrom pandas import DataFrameNEWLINEfrom pandas import SeriesNEWLINEfrom typing import ListNEWLINENEWLINENEWLINEdef visualize(df):NEWLINE """Plot missing cells heatmap"""NEWLINE msno.matrix(df)NEWLINENEWLINENEWLINEdef remove... |
#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 required by applicable law or agreed to... |
#!/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... |
import disnakeNEWLINEfrom replit import dbNEWLINEfrom disnake.ext import commandsNEWLINEimport randomNEWLINEimport asyncioNEWLINEimport requestsNEWLINEimport jsonNEWLINEimport timeNEWLINEimport osNEWLINEapikey = os.environ['perapi']NEWLINENEWLINEfrom pyspective import pyspectiveNEWLINENEWLINEperspective = pyspective.Py... |
from django.db import migrationsNEWLINENEWLINENEWLINEdef create_site(apps, schema_editor):NEWLINE Site = apps.get_model("sites", "Site")NEWLINE custom_domain = "app-1-33544.botics.co"NEWLINENEWLINE site_params = {NEWLINE "name": "App 1",NEWLINE }NEWLINE if custom_domain:NEWLINE site_params[... |
import pytestNEWLINEfrom click.testing import CliRunnerNEWLINEfrom nest import trans_cliNEWLINENEWLINENEWLINEclass TestTranslate:NEWLINENEWLINE @pytest.fixture(autouse=True)NEWLINE def setup(self):NEWLINE self.runner = CliRunner()NEWLINENEWLINE def test_trans_cli(self):NEWLINE result = self.runne... |
from datetime import dateNEWLINENEWLINEimport database.db_actions_general as db_genNEWLINEfrom database.db_connect import CURSOR, DBNEWLINENEWLINENEWLINE############################NEWLINE# Add bookreadNEWLINE############################NEWLINEdef add_bookread_to_db(NEWLINE bookread_id: str,NEWLINE book_id: int,N... |
import pendulumNEWLINEfrom dagster.core.scheduler.job import JobStatusNEWLINEfrom dagster_graphql.test.utils import (NEWLINE execute_dagster_graphql,NEWLINE infer_repository_selector,NEWLINE infer_schedule_selector,NEWLINE main_repo_location_name,NEWLINE main_repo_name,NEWLINE)NEWLINENEWLINEGET_SCHEDULES... |
import _plotly_utils.basevalidatorsNEWLINENEWLINENEWLINEclass LenValidator(_plotly_utils.basevalidators.NumberValidator):NEWLINE def __init__(NEWLINE self, plotly_name="len", parent_name="scatterpolargl.marker.colorbar", **kwargsNEWLINE ):NEWLINE super(LenValidator, self).__init__(NEWLINE ... |
#!/usr/bin/env python3NEWLINE# -*- coding: utf-8 -*-NEWLINENEWLINE# @author Copyright (c) 2022 Damir Dzeko AnticNEWLINE# @license MIT No AttributionNEWLINE# @version 0.1.2NEWLINE# @lastUpdate 2022-02-05NEWLINENEWLINE# ChangeLog:NEWLINE# - can be tested with: python3 -m unittest tomtomLookup.pyNEWLINE# - added object de... |
# coding: utf-8NEWLINENEWLINE"""NEWLINE KubernetesNEWLINENEWLINE No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)NEWLINENEWLINE OpenAPI spec version: v1.13.5NEWLINE NEWLINE Generated by: https://github.com/swagger-api/swagger-codegen.gitNEWLINE"""NEWLI... |
#!/usr/bin/python3NEWLINE# -*- coding: utf-8 -*-NEWLINENEWLINE#NEWLINE# Copyright (C) 2017 Kévin MathieuNEWLINE#NEWLINE# This software may be modified and distributed under the termsNEWLINE# of the MIT license. See the LICENSE file for details.NEWLINE#NEWLINENEWLINEimport requestsNEWLINENEWLINENEWLINEclass URL:NEWLINE... |
from sympy.sets import (ConditionSet, Intersection, FiniteSet,NEWLINE EmptySet, Union, Contains, imageset)NEWLINEfrom sympy import (Symbol, Eq, S, Abs, sin, asin, pi, Interval,NEWLINE And, Mod, oo, Function, Lambda)NEWLINEfrom sympy.testing.pytest import raises, XFAIL, warns_deprecated_sympyNEWLINENEWLINENEWLINEw... |
#!/usr/bin/env pythonNEWLINE# Jonas Schnelli, 2013NEWLINE# make sure the Lissomcoin-Qt.app contains the right plist (including the right version)NEWLINE# fix made because of serval bugs in Qt mac deployment (https://bugreports.qt-project.org/browse/QTBUG-21267)NEWLINENEWLINEfrom string import TemplateNEWLINEfrom dateti... |
import taichi as tiNEWLINENEWLINEti.init()NEWLINENEWLINEn = 512NEWLINEx = ti.field(dtype=ti.f32, shape=(n, n))NEWLINENEWLINENEWLINE@ti.kernelNEWLINEdef paint():NEWLINE for i, j in ti.ndrange(n * 4, n * 4):NEWLINE # 4x4 super sampling:NEWLINE ret = ti.taichi_logo(ti.Vector([i, j]) / (n * 4))NEWLINE ... |
# vim: tabstop=4 shiftwidth=4 softtabstop=4NEWLINENEWLINE# Copyright 2011 OpenStack FoundationNEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License"); you mayNEWLINE# not use this file except in compliance with the License. You may obtainNEWLINE# a copy of the License atNEWLINE#NEWLI... |
#!/usr/bin/env pythonNEWLINENEWLINEfrom __future__ import print_functionNEWLINENEWLINEfrom builtins import rangeNEWLINEimport osNEWLINEimport reNEWLINEimport sysNEWLINEimport globNEWLINEimport jsonNEWLINEimport mathNEWLINEimport bisectNEWLINEimport randomNEWLINEimport signalNEWLINEif sys.version_info[0]>2:NEWLINE impo... |
genero = ''NEWLINEwhile genero != 'F' and genero != 'M':NEWLINE genero = str(input('Gênero [M/F]: ')).upper()NEWLINE if genero == 'F':NEWLINE print('Seu gênero é FEMININO!')NEWLINE if genero == 'M':NEWLINE print('Seu gênero é MASCULINO!')NEWLINEprint('FIM') |
#!/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 datetimeNEWLINEimport mockNEWLINEimport pytestNEWLINEfrom urllib.request import HTTPErrorNEWLINENEWLINEfrom marshmallow.exceptions import ValidationErrorNEWLINEimport responsesNEWLINEfrom werkzeug.security import generate_password_hash, check_password_hashNEWLINENEWLINEfrom database.models import AttestationType... |
import sysNEWLINEimport importlib.resourcesNEWLINEimport pickleNEWLINEimport argparseNEWLINEimport reNEWLINEfrom contextlib import contextmanagerNEWLINEfrom collections import CounterNEWLINEfrom apycula import chipdbNEWLINENEWLINEclass Bba(object):NEWLINENEWLINE def __init__(self, file):NEWLINE self.file = fi... |
#!/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... |
NEWLINEimport sys, jsonNEWLINEimport cv2NEWLINEimport torchNEWLINENEWLINEPATH_EL = "../entity-linking/"NEWLINEsys.path.insert(0, PATH_EL)NEWLINENEWLINEimport clickNEWLINEimport tqdmNEWLINEfrom pycorenlp import StanfordCoreNLPNEWLINENEWLINEfrom entitylinking import core as ELNEWLINEfrom entitylinking.core.sentence impor... |
# coding: UTF-8NEWLINENEWLINEfrom __future__ import print_functionNEWLINEfrom configparser import ConfigParserNEWLINEfrom contextlib import contextmanagerNEWLINEimport osNEWLINEimport datetimeNEWLINEfrom os.path import basename, exists, dirname, join, expanduserNEWLINEimport sysNEWLINEimport subprocessNEWLINEimport tim... |
# Copyright 1999-2021 Alibaba Group Holding Ltd.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... |
# -*- coding: utf-8 -*-NEWLINE"""NEWLINENEWLINEScript Name: ProFile.pyNEWLINEAuthor: Do Trinh/Jimmy - 3D artist.NEWLINENEWLINEDescription:NEWLINENEWLINE"""NEWLINE# -------------------------------------------------------------------------------------------------------------NEWLINENEWLINEfrom pyPLM.Widgets import GroupGr... |
from typing import ListNEWLINENEWLINENEWLINEclass InvoiceProfiles:NEWLINE def __init__(self, invoice_profiles: List[str]):NEWLINE self.invoice_profiles = invoice_profilesNEWLINENEWLINE def as_list(self) -> List:NEWLINE return [{"value": invoice_profile} for invoice_profile in self.invoice_profiles]N... |
import loggingNEWLINEimport mathNEWLINEimport osNEWLINEimport pickleNEWLINEimport sysNEWLINEimport timeNEWLINENEWLINEimport psutilNEWLINENEWLINEfrom .catboost_utils import construct_custom_catboost_metricNEWLINEfrom .hyperparameters.parameters import get_param_baselineNEWLINEfrom .hyperparameters.searchspaces import ge... |
from django.contrib import adminNEWLINEfrom .models import ItemNEWLINENEWLINE# Register your models here.NEWLINEadmin.site.register(Item) |
"""Labware state store tests."""NEWLINEimport pytestNEWLINEfrom collections import OrderedDictNEWLINEfrom contextlib import nullcontext as does_not_raiseNEWLINEfrom typing import List, NamedTuple, Optional, Sequence, Tuple, Type, UnionNEWLINENEWLINEfrom opentrons.protocol_engine import EngineStatus, commands as cmd, er... |
import ipaddressNEWLINEimport structNEWLINEimport pytestNEWLINENEWLINEfrom mitmproxy import dnsNEWLINEfrom mitmproxy import flowfilterNEWLINEfrom mitmproxy.test import tflowNEWLINEfrom mitmproxy.test import tutilsNEWLINENEWLINENEWLINEclass TestResourceRecord:NEWLINENEWLINE def test_str(self):NEWLINE assert st... |
# Licensed under a 3-clause BSD style license - see LICENSE.rstNEWLINENEWLINE"""NEWLINEThis module provides utility functions for the models packageNEWLINE"""NEWLINENEWLINENEWLINEfrom collections import dequeNEWLINEfrom collections.abc import MutableMappingNEWLINEfrom inspect import signatureNEWLINENEWLINEimport numpy ... |
"""boon-backend URL ConfigurationNEWLINENEWLINEThe `urlpatterns` list routes URLs to views. For more information please see:NEWLINE https://docs.djangoproject.com/en/3.2/topics/http/urls/NEWLINEExamples:NEWLINEFunction viewsNEWLINE 1. Add an import: from my_app import viewsNEWLINE 2. Add a URL to urlpatterns:... |
# Try getting setup from setuptools first, then distutils.core.NEWLINE# http://goo.gl/BC32zk (StackOverflow)NEWLINEtry:NEWLINE from setuptools import setupNEWLINEexcept ImportError:NEWLINE from distutils.core import setupNEWLINENEWLINEclassifiers = [NEWLINE 'Development Status :: 3 - Alpha',NEWLINE 'Intende... |
#!/usr/bin/env pythonNEWLINE# -*- coding: utf-8 -*-NEWLINE#NEWLINE# Project: Fast Azimuthal integrationNEWLINE# https://github.com/silx-kit/pyFAINEWLINE#NEWLINE# Copyright (C) 2017-2019 European Synchrotron Radiation Facility, Grenoble, FranceNEWLINE#NEWLINE# Principal author: Jérôme Kieffer ... |
from __future__ import annotations # type: ignore[attr-defined]NEWLINEfrom dataclasses import dataclass, fieldNEWLINEfrom enum import EnumNEWLINEfrom typing import (NEWLINE Callable,NEWLINE Dict,NEWLINE List,NEWLINE Optional,NEWLINE UnionNEWLINE)NEWLINEimport weakrefNEWLINENEWLINEimport copyNEWLINEimpor... |
from __future__ import print_function, division, absolute_importNEWLINENEWLINEimport osNEWLINEimport timeNEWLINEimport subprocessNEWLINEfrom contextlib import contextmanagerNEWLINENEWLINEimport pytestNEWLINENEWLINEimport skeinNEWLINENEWLINENEWLINE@contextmanagerNEWLINEdef set_skein_config(tmpdir):NEWLINE tmpdir = st... |
# SETTINGNEWLINEimport osNEWLINENEWLINEencoding_ = 'utf_8_sig'NEWLINEtime_zone = 'Asia/Shanghai'NEWLINEpool_max_workers = 8NEWLINEdefault_options_ = {NEWLINE 'encoding': encoding_,NEWLINE}NEWLINEbase_dir = os.path.dirname(os.path.abspath(__file__)).replace("\\", "/")NEWLINEstatic_dir = os.path.join(base_dir, 'static... |
from __future__ import absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7NEWLINENEWLINE# Importing the Kratos LibraryNEWLINEimport KratosMultiphysicsNEWLINENEWLINE# Import applicationsNEWLINEimport KratosMultiphysics.ConvectionDiffusionApplication as KratosConvDiffNEWLINEimp... |
from pylinsql.async_database import ConnectionParametersNEWLINEimport unittestNEWLINENEWLINENEWLINEclass DatabaseTestCase(unittest.IsolatedAsyncioTestCase):NEWLINE params: ConnectionParametersNEWLINENEWLINE def __init__(self, method_name: str):NEWLINE super().__init__(method_name)NEWLINE self.params... |
from __future__ import absolute_importNEWLINEfrom __future__ import divisionNEWLINEfrom __future__ import unicode_literalsNEWLINEfrom collections import defaultdictNEWLINEfrom unittest import skipUnless, SkipTestNEWLINEfrom uuid import uuid4, UUIDNEWLINENEWLINEfrom django.conf import settingsNEWLINEfrom django.test imp... |
import osNEWLINEimport pytestNEWLINEimport subprocessNEWLINEimport sysNEWLINEimport timeNEWLINEimport fsspecNEWLINEfrom distutils.version import LooseVersionNEWLINENEWLINEfrom dask.bytes.core import open_filesNEWLINEfrom dask.bytes._compatibility import FSSPEC_042NEWLINEfrom dask.utils import tmpdirNEWLINENEWLINEfiles ... |
#!/usr/bin/pythonNEWLINE#NEWLINE# pybuddyDXNEWLINE# python e-buddy (ibuddy alike sold on DX) daemonNEWLINE# http://code.google.com/p/pybuddyDXNEWLINE#NEWLINE# protocol reverse engineered and implemented byNEWLINE# peter.dhoye@gmail.comNEWLINE#NEWLINE# borrows code from http://code.google.com/p/pybuddyNEWLINE# by Jose.C... |
from rest_framework.status import HTTP_404_NOT_FOUNDNEWLINENEWLINENEWLINEERROR_GRID_DOES_NOT_EXIST = (NEWLINE "ERROR_GRID_DOES_NOT_EXIST",NEWLINE HTTP_404_NOT_FOUND,NEWLINE "The requested grid view does not exist.",NEWLINE)NEWLINE |
# coding=utf-8NEWLINE# --------------------------------------------------------------------------NEWLINE# Copyright (c) Microsoft Corporation. All rights reserved.NEWLINE# Licensed under the MIT License. See License.txt in the project root for license information.NEWLINE# Code generated by Microsoft (R) AutoRest Code G... |
# coding=utf-8NEWLINE# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***NEWLINE# *** Do not edit by hand unless you're certain you know what you are doing! ***NEWLINENEWLINEimport jsonNEWLINEimport warningsNEWLINEimport pulumiNEWLINEimport pulumi.runtimeNEWLINEfrom typing import Unio... |
"""!NEWLINE@brief Improved Experiment Argument Parser for SudoRmRfNEWLINENEWLINE@author Efthymios Tzinis {etzinis2@illinois.edu}NEWLINE@copyright University of Illinois at Urbana-ChampaignNEWLINE"""NEWLINENEWLINEimport argparseNEWLINENEWLINENEWLINEdef get_args():NEWLINE """! Command line parser """NEWLINE parser ... |
from __future__ import absolute_import, unicode_literalsNEWLINEimport pytestNEWLINEimport loggingNEWLINEimport osNEWLINENEWLINEfrom psd_tools.api import pil_ioNEWLINEfrom psd_tools.api.psd_image import PSDImageNEWLINEfrom psd_tools.constants import ColorModeNEWLINEfrom psd_tools.psd.patterns import PatternNEWLINEfrom .... |
from IPython import get_ipythonNEWLINEfrom IPython.core.magic import (magics_class, line_magic)NEWLINEfrom IPython.core.magics.osm import OSMagicsNEWLINEfrom johnstarich.ipython.shell import find_varNEWLINEimport keywordNEWLINEimport shutilNEWLINENEWLINENEWLINE@magics_classNEWLINEclass Bashisms(OSMagics):NEWLINE @pr... |
def troca(numeros):NEWLINE cont = 0NEWLINE for x in numeros:NEWLINE if numeros[cont] > 0:NEWLINE numeros[cont] = 1NEWLINE else:NEWLINE numeros[cont] = 0NEWLINE cont = cont + 1NEWLINE print(numeros)NEWLINENEWLINENEWLINENEWLINEnumeros = []NEWLINEfor i in range(30):NEWLI... |
"""NEWLINESimple recurrent model - either with LSTM or GRU cells.NEWLINE"""NEWLINEfrom copy import copyNEWLINEfrom typing import Dict, List, Tuple, UnionNEWLINENEWLINEimport numpy as npNEWLINEimport torchNEWLINEimport torch.nn as nnNEWLINENEWLINEfrom pytorch_forecasting.data.encoders import MultiNormalizer, NaNLabelEnc... |
"""Resnet v1 model variants.NEWLINECode branched out from slim/nets/resnet_v1.py, and please refer to it forNEWLINEmore details.NEWLINEThe original version ResNets-v1 were proposed by:NEWLINE[1] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian SunNEWLINE Deep Residual Learning for Image Recognition. arXiv:1512.03385NEW... |
# TRANSMITTER HAS A DIRECTIONAL ANTENNA - POINTED IN 12 DIFFERENT POSESNEWLINE# RECEIVER HAS AN OMNI DIRECTIONAL ANTENNANEWLINE# DISTANCE BETWEEN RECEIVER AND TRANSMITTER - (5, 10, 15) FEETNEWLINE# IMPEMENTING HIERARCHICAL MACHINE LEARNINGNEWLINE# IMPLEMENTING TRANSFER LEARNINGNEWLINE# DATA COLLECTED IN INDOOR ENVIRON... |
# TRANSMITTER HAS A DIRECTIONAL ANTENNA - POINTED IN 12 DIFFERENT POSESNEWLINE# RECEIVER HAS AN OMNI DIRECTIONAL ANTENNANEWLINE# DISTANCE BETWEEN RECEIVER AND TRANSMITTER - (5, 10, 15) FEETNEWLINE# IMPEMENTING HIERARCHICAL MACHINE LEARNINGNEWLINE# IMPLEMENTING TRANSFER LEARNINGNEWLINE# DATA COLLECTED IN INDOOR ENVIRON... |
from tkinter import *NEWLINEfrom new_main import semaphore_algoNEWLINENEWLINEwindow = Tk()NEWLINEwindow.title("Timetable Generation OS Project")NEWLINENEWLINENEWLINEclass ProvideException(object):NEWLINE def __init__(self, func):NEWLINE self._func = funcNEWLINENEWLINE def __call__(self, *args):NEWLINE ... |
from unittest import mockNEWLINENEWLINEimport pytestNEWLINENEWLINEfrom bgmi.lib.models import Bangumi, Filter, FollowedNEWLINEfrom bgmi.main import mainNEWLINEfrom bgmi.website.bangumi_moe import BangumiMoeNEWLINENEWLINENEWLINEdef test_gen_nginx_conf():NEWLINE main("gen nginx.conf --server-name _".split())NEWLINENEW... |
"""DSM 7 SYNO.Core.* datas."""NEWLINE |
"""NEWLINEMIT LicenseNEWLINENEWLINECopyright (c) 2020-present phenom4n4nNEWLINENEWLINEPermission is hereby granted, free of charge, to any person obtaining a copyNEWLINEof this software and associated documentation files (the "Software"), to dealNEWLINEin the Software without restriction, including without limitation t... |
# Copyright (c) 2022 PaddlePaddle 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/LICE... |
#!/usr/bin/env python2.7NEWLINENEWLINEimport argparseNEWLINEimport randomNEWLINEimport reNEWLINEimport stringNEWLINENEWLINEparser = argparse.ArgumentParser(description='Email Campaign Formatter')NEWLINEparser.add_argument('-s', action="store", dest='subject', default="CHANGE SUBJECT", help="email subject surrounded... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.