text
stringlengths
2
999k
class CoopSyncingPopup: pass
import cartopy.crs as ccrs import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt from math import floor import numpy as np filename = input("Input filename: ") tinp = input("Starting time (hhmmss): ") hour=int(tinp[:2]) mint=int(tinp[2:4]) secd=int(tinp[4:]) tstart=(hour-1)*3600+mint*60+secd tinp =...
# -*- coding: utf-8 -*- # Copyright (c) 2021, TeamPRO and Contributors # See license.txt from __future__ import unicode_literals # import frappe import unittest class TestCustomer(unittest.TestCase): pass
# -*- coding: utf-8 -*- # # watchme documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a...
<<<<<<< HEAD ======= from pprint import pprint >>>>>>> 7ceb3e02de11b992feb0c55257fb1e645320622b vowels = "aeiou" sentence = "here is a sentence with a bunch of vowels" vowels_in_sentence = filter(lambda x: x in vowels, sentence) report = {'a':0, 'e':0, 'i':0, 'o':0, 'u':0} for char in vowels_in_sentence: ...
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ # pylint: skip-file from enum import Enum, EnumMeta from six import with_metaclass from typing import Mapping, Optional, Union, Any try: from typing import Protocol...
# Copyright 2020 Unibg Seclab (https://seclab.unibg.it) # # 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 l...
__all__ = ['TiffFiles'] import time from .tiff_file import TiffFile from .tiff_array import TiffArray from .tiff_sample_plane import TiffSamplePlane, TiffSamplePlaneLazy from .tiff_base import TiffBase class TiffFiles(TiffBase): """Represent a collection of TIFF files as a single TIFF source object. See al...
# String Validators in Python: s = input() for a in ('isalnum', 'isalpha', 'isdigit', 'islower', 'isupper'): print(any(eval("c." + a + "()") for c in s)) ######################################################################################################################################### # Alternate simple So...
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
""" A factory for Database sockets """ def storage_socket_factory(url, port, project_name, username=None, password=None, storage_type="mongo", logger=None, ...
""" MIT License Copyright (c) 2021 TheHamkerCat 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 Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, ...
import random WORLD_WIDTH = 60 WORLD_HEIGHT = 40 class SnakeGrid: def __init__(self): self.segments = [(10,10)] self.speed = (-1, 0) self.desired_length = 5 self.grid_width = 37 self.grid_height = 37 def update(self): """Moves the snake at the current speed, ...
""" Some functions used for image stacking - including scalable mean and median algorithms for large data sets. """ import numpy as np from astropy.io import fits from . import fits_tools import matplotlib.pyplot as plt def mean_fits(data_stack): """ Returns the mean value across the same element in each fits...
from decimal import Decimal from typing import Iterable import requests from django.conf import settings from django.core.cache import cache from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from prices import flat_tax, Money from . import LineItem, tax_amount from .models import Tax, TaxC...
#!/usr/bin/python # Copyright (c) 2017, 2021 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
# ------------------------------------------------ # output file name # ------------------------------------------------ fout_name = "ExamplesAndTests_Wimp_reach/test_single_bkg_nu_GSNB_10" # ------------------------------------------------ # parameter block for sample and read-out info # ----------------------------...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys, os # DATA packaged import numpy as np import pandas as pd from pandas import Series, DataFrame # ML packages import tensorflow as tf from keras import backend as K K.clear_session # Word embedding import gensim #from gensim.models import Word2Vec from gens...
# coding: utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import argparse import datetime from functools import partial from .get import get_data from .get import most_recent_year from .models import _load_users...
# -*- coding: utf-8 -*- """ Created on Sun Dec 19 12:38:13 2021 @author: quent """ import numpy as np import geometrylib import flowsolver import massflowlib import matplotlib.pyplot as plt def initFlow(P0,T0,X0,A,grid,gas,process='quick'): from scipy.interpolate import interp1d r0 = np.zeros(len(grid)) ...
import os import sys import logging from flask import Flask, request, jsonify, render_template, redirect, flash from flask_cors import CORS from datetime import datetime from model import ml_predict from flask_wtf import Form from wtforms.fields import IntegerField, SubmitField from wtforms import validators, Validatio...
from .api_pb2_grpc import * from .api_pb2 import *
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Time : 18-6-26 下午8:52 # @Author : MaybeShewill-CV # @Site : https://github.com/MaybeShewill-CV/attentive-gan-derainnet # @File : vgg16.py # @IDE: PyCharm """ 实现pretrained vgg用于特征提取计算attentive gan损失 """ from collections import OrderedDict import tensorflow as ...
# Copyright 2015 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 a...
import datetime from unittest import mock from django.db import IntegrityError, connection, transaction from django.db.models import CheckConstraint, Deferrable, F, Func, Q from django.utils import timezone from . import PostgreSQLTestCase from .models import HotelReservation, RangesModel, Room try: from django....
from .. import misc class Param(misc.Loggable): """ Represents a single parameter key-value pair in the config. """ def __init__(self, key, *args, **kwargs): # Setup - self.key is the key (duh!) self.key = key self.args = args self.kwargs = kwargs # Children i...
""" PynamoDB exceptions """ from typing import Any, Optional import botocore.exceptions class PynamoDBException(Exception): """ A common exception class """ def __init__(self, msg: Optional[str] = None, cause: Optional[Exception] = None) -> None: self.msg = msg self.cause = cause ...
from .ctc import CTCModel from .speech2text import SpeechToText from .lm import BertPretrainLanguageModel, RecurrentLanguageModel, TransformerLanguageModel End2EndModel = { 'ctc': CTCModel, 'speech2text': SpeechToText } LanguageModel = { 'rnn_lm': RecurrentLanguageModel, 'transformer_lm': Transformer...
from django.conf.urls import include, url from django.contrib import admin urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^', include('NextGenThreat.urls')), ]
from .utils import * def show(object_list): """ Helper method called by the CLI. :arg client: The Elasticsearch client connection :arg object_list: A list of indices or snapshots to show :rtype: bool """ for obj in ensure_list(object_list): print('{0}'.format(obj)) return True
""" Django settings for orange_mud_29648 project. Generated by 'django-admin startproject' using Django 2.2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ imp...
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
#!/usr/bin/env python3 from re import findall from typing import List from dataclasses import dataclass from exceptions import UnknownFileTypeError from numpy import float64 from pandas import DataFrame @dataclass(frozen=True) class Dataset: file_name: str file_type: str cols: List[str] def _row_re...
# # 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 us...
# Copyright (C) 2015-2020 Chris Lalancette <clalancette@gmail.com> # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; # version 2.1 of the License. # This library is distributed in the ho...
#!/usr/bin/env python # This code is a direct translation of the Tcl code in # ImagePlaneWidget.tcl. It could easily be written using a nice class # to do the job but the present code should definitely make for an # illustrative example. # This example demonstrates how to use the vtkImagePlaneWidget # to pro...
# coding:utf-8 from app import app if __name__ == '__main__': """ 项目总入口 """ app.logger.info(">>>>>>>>>>>>>>>>>>>>> myt_blog init <<<<<<<<<<<<<") app.run()
from pyqt_feedback_flow import __version__ def test_version(): assert __version__ == '0.1.5'
# -*- coding: utf-8 -*- import pandas as pd import sklearn.decomposition import sklearn.utils class Preparator: """ This class prepares a Pandas's DataFrame to be used. """ def __init__(self): """ Constructor. """ pass def prepare(self, dataset, columns): """ Prepares the dataset....
from django.contrib import admin from .models import Song from .models import Album from .models import Organization # Register your models here. admin.site.register(Song) admin.site.register(Album) admin.site.register(Organization)
import unittest import numpy as np import legume import matplotlib.pyplot as plt import scipy.io class Test_Guided(unittest.TestCase): """ Test of the guided mode computation vs. stored data for a three-layer grating as in Zhou et al. Optica 3 (2016) """ def test_gm(self): """ Te...
from __future__ import annotations import json import os.path import numpy as np from gcdf1.utils.dialogue import ( get_dialogue_outline, get_intent_by_turn, get_utterances, ) np.random.seed(0) def print_dialogue( dialogue: dict, print_index: bool = False, show_intent: bool = False ): """ ...
from checkov.common.models.consts import ANY_VALUE from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck from checkov.common.models.enums import CheckCategories class ImagebuilderDistributionConfigurationEncryptedWithCMK(BaseResourceValueCheck): def __init__(self) -> None:...
"""""" #################################################################################################### # IMPORTS ################################################################################ IMPORTS # #################################################################################################### # Standa...
""" Django settings for awardproject project. Generated by 'django-admin startproject' using Django 1.11. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import...
#!/usr/bin/env python import sys import os import getopt import httplib2 from xml.etree import ElementTree as ET from xml.dom import minidom from ConfigParser import ConfigParser from ConfigParser import NoSectionError import getpass import socket import re import urllib2 from pac_api import * def logon_usage(): pri...
import abc import logging import typing as tp from plumbum import local from rich import print from rich.markdown import Markdown from benchbuild.environments.adapters import buildah from benchbuild.environments.adapters.common import ( run, run_tee, run_fg, bb_podman, MaybeCommandError, ) from be...
"""Test patches.datasets.pilgrimm.pilgrimm. """ import unittest import numpy as np from .. import messages as msg from .. import layers from .. import pilgrimm from .layers import TestOccluder class TestAtom(TestOccluder): """Test atoms. """ def setUp(self): super().setUp() self.atom = ...
import time import datetime import json import redis from .sensor import Sensor from nanpy import (ArduinoApi, SerialManager) default_connection = SerialManager(device='/dev/ttyUSB0') r = redis.Redis(host='127.0.0.1', port=6379) class LightSensor(Sensor): def __init__(self, pin, name='LightSensor', key=None, connec...
from datetime import datetime from typing import Tuple from app.characters.models import CharacterModel from app.comments.models import CommentModel from app.episodes.models import EpisodeModel from flask.testing import FlaskClient from ..test_app import client RESOURCE_COMMENTS = "/comments/" def add_episode_with...
import numpy as np from itertools import compress from sklearn.base import BaseEstimator, TransformerMixin from randomForest_classifier.processing.errors import InvalidModelInputError class LogTransformer(BaseEstimator, TransformerMixin): """Logarithm transformer.""" def __init__(self, variables=None): ...
n = input("digite algum caracter do seu teclado: ") print("o tipo primitivo eh: ",type(n)) print("so tem espaços: ",n.isspace()) print("eh um nhmero: ",n.isnumeric()) print("eh alfabetico: ",n.isalpha()) print("eh alphanumerico: ",n.isalnum()) print("esta em minusculas: ",n.isupper()) print("esta em minusculo: ",n....
""" WSGI config for p2pmc project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTING...
import sys from pathlib import Path if 'set env': sys.path.insert(0, str(Path(__file__).parent.parent)) from youtube_dl_cli import __version__, __exe_name__, __description__ from youtube_dl_cli.download_youtube_video import YLFormat, YoutubeKeeper from youtube_dl_cli.common.consoleHelper import text_co...
# coding=utf-8 """ This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_resource import InstanceResource from twilio.base.list_resource import ListResource from twilio.base.page i...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Entry point module """ # pragma: no cover from __future__ import print_function import json import logging import os import sys import six from rebulk.__version__ import __version__ as __rebulk_version__ from guessit import api from guessit.__version__ import __versi...
hdx_version = 'v1.57.12'
from pyhpo.similarity.base import SimScore from pyhpo.similarity.defaults import register_defaults register_defaults(SimScore) __all__ = ( 'SimScore', )
# Import required libraries : import numpy as np # Define input features : input_features = np.array([[0,0],[0,1],[1,0],[1,1]]) print (input_features.shape) print (input_features)# Define target output : target_output = np.array([[0,1,1,1]]) # Reshaping our target output into vector : target_output = target_output.re...
def run(test): """ Test the repr and string implementations """ v = 1 test.check( repr(v) ) test.check( str(v) ) v = "asdf" test.check( repr(v) ) test.check( str(v) ) v = True test.check( repr(v) ) test.check( str(v) ) v = False test.check( repr(v) ) test.check(...
import asyncio import functools import inspect from gd.logging import get_logger from gd.typing import ( Any, Awaitable, Callable, Coroutine, Iterable, List, Optional, Sequence, Set, Tuple, Union, ) __all__ = ( "run_blocking_io", "wait", "run", "gather", ...
#!/usr/bin/env python3 # command line program import argparse # deepcopy import copy # file import os.path # numpy import numpy as np import scipy as sp import scipy.integrate import scipy.linalg import scipy.interpolate # internal modules import libpost # tmp plot import matplotlib.pyplot as plt # nu: 0.000185 # eps...
from .atss import ATSS from .base import BaseDetector from .cascade_rcnn import CascadeRCNN from .cornernet import CornerNet from .detr import DETR from .fast_rcnn import FastRCNN from .faster_rcnn import FasterRCNN from .fcos import FCOS from .fovea import FOVEA from .fsaf import FSAF from .gfl import GFL f...
#!/usr/bin/python # -*- coding: utf-8 -*- """ PyCOMPSs Testbench Tasks ======================== """ # Imports import os import time from pycompss.api.api import compss_stop from pycompss.api.parameter import FILE_INOUT, FILE_IN, FILE_OUT from pycompss.api.task import task from pycompss.api.exceptions import COMPSsEx...
# Copyright 2014 The Bazel 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 applicable la...
import requests from cachetools import TTLCache, cached from utils import download_data, add_program @cached(cache=TTLCache(maxsize=10, ttl=300)) def get(program): if program in __programs: return __programs[program]() add_program('mozilla', 'mozilla/firefox', 'firefox') add_program('mozilla', 'mozilla...
import concurrent.futures import json import numpy import pytest import pyproj from pyproj import CRS from pyproj.crs import ( CoordinateOperation, CoordinateSystem, Datum, Ellipsoid, PrimeMeridian, ) from pyproj.crs.enums import CoordinateOperationType, DatumType from pyproj.enums import ProjVers...
# Imports for urn construction utility methods from datahub.emitter.mce_builder import make_data_platform_urn, make_dataset_urn from datahub.emitter.mcp import MetadataChangeProposalWrapper from datahub.emitter.rest_emitter import DatahubRestEmitter # Imports for metadata model classes from datahub.metadata.schema_cla...
from unittest import TestCase import os import mock import pytest from PyQt5 import QtWidgets import application import audio class TestApplication(): @pytest.fixture(scope="function", autouse=True) def setup(self, qtbot): # Create dialog to show this instance self.dialog = QtWidgets.QMainWindow() # ...
#***************************************************************************** # Distributed under the terms of the GNU General Public License (GPL) # # This code is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FO...
import base64 import json import os import sys import traceback import requests from anubis.app import create_app from anubis.models import db, User, Course, InCourse, TAForCourse, ProfessorForCourse, AssignmentRepo from anubis.utils.data import with_context from anubis.utils.seed import create_name, create_netid os...
# This file is part of Indico. # Copyright (C) 2002 - 2019 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals from indico.modules.legal.controllers import RHDisplayPrivacyPoli...
import os import json from unittest import mock import pytest import scrypt from conda_smithy.feedstock_tokens import ( generate_and_write_feedstock_token, read_feedstock_token, feedstock_token_exists, register_feedstock_token, register_feedstock_token_with_proviers, is_valid_feedstock_token, ...
import torch import torch.nn as nn from operations import * from torch.autograd import Variable from utils import drop_path class Cell(nn.Module): def __init__(self, genotype, C_prev_prev, C_prev, C, reduction, reduction_prev): super(Cell, self).__init__() print(C_prev_prev, C_prev, C) if reduction_pr...
# Copyright 2016 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 law or agreed to in wri...
from pyautonifty.constants import DRAWING_SIZE, BLACK from pyautonifty.pos import Pos from pyautonifty.drawing import Drawing from pyautonifty.renderer import Renderer # Draw straight lines that combine to create impression of curved lines def curved_lines(drawing, n=20): # init drawing step = DRAWING_SIZE / ...
from func import * with db: for i in db.execute("SELECT * FROM note"): # WHERE id=1 print(i)
import numpy as np import random from collections import namedtuple, deque from model import QNetwork import torch import torch.nn.functional as F import torch.optim as optim BUFFER_SIZE = int(1e5) # replay buffer size BATCH_SIZE = 64 # minibatch size GAMMA = 0.99 # discount factor TAU = 1e-3 ...
import numpy as np from scipy.sparse import csr_matrix from sklearn.utils.testing import (assert_allclose, assert_allclose_dense_sparse) from pyrfm import SignedCirculantRandomMatrix from sklearn.metrics.pairwise import rbf_kernel from scipy.linalg import circulant from scipy.fft impo...
import os import os.path import shutil #stopwords = ("meet","illumination","thanks","little","caused","held","ends","work","way","care","city","gastech","pok","abila","elodis","kronos","end","time","pm","am","ii","january","ago","today","and","or","one","day","man","bring","a", "b", "c", "d", "e", "f", "g", "h", "i", ...
import unittest from advisers import reduce_set_of_guards, flip_guard_bit, replace_guard_bit class TestAdviser(unittest.TestCase): def setUp(self): pass def test_replace_guard_bit(self): # replace a literal self.assertEqual(replace_guard_bit('000', 1, 'X'), '0X0') def test_flip_...
""" This file implements a matplotlib Normalize object which mimics the functionality of scaling functions in ds9 The transformation from data values to normalized (0-1) display intensities are as follows: - Data to normal: y = clip( (x - vmin) / (vmax - vmin), 0, 1) - normal to warped: Apply a monotonic, non-line...
"""Entrypoints for the videotracker""" import sys from PyQt5.QtWidgets import QApplication from . import windows from . import cli def gui(): """GUI entrypoint""" parser = cli.parser args = parser.parse_args() app = QApplication(sys.argv) cli.setup_interrupt_handling() sys.excepthook = cli.p...
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the Partially Signed Transaction RPCs. """ from test_framework.test_framework import GlobalBitcoinTest...
import requests, textwrap from PIL import Image, ImageFont, ImageDraw, ImageOps, ImageColor from io import BytesIO from datetime import datetime DEFAULT_AVATAR = "https://i.pinimg.com/564x/70/a6/08/70a60868bcef89d9bc93c7693af1481e.jpg" DEFAULT_MESSAGE = "Hello!" DEFAULT_NAME = "BytesToBits" DEFAULT_COLOR = "ffffff" ...
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# For the fixtures to be found in other files, the file must be called conftest.py! import pytest from sqlalchemy import Integer, Column, String, MetaData, ForeignKey, insert from rapdevpy.database.sql_alchemy_operator import SqlAlchemyOperator from rapdevpy.database.sql_alchemy_tables import SqlAlchemyTables from te...
import logging import torch import torch.nn.functional as F loss_i = 0 def custom_loss(output, target, args, epoch): n_element = output.numel() # mae mse_loss = F.mse_loss(output, target) mse_loss *= args.loss_regression_weight # continuous motion diff = [abs(output[:, n, :] - output[:, n-1, ...
""" A simple Point class. NOTE: This is NOT rosegraphics -- it is your OWN Point class. Authors: David Mutchler, Vibha Alangar, Dave Fisher, Amanda Stouder, their colleagues and PUT_YOUR_NAME_HERE. """ # TODO: 1. PUT YOUR NAME IN THE ABOVE LINE. def main(): """ Calls the TEST functions in this ...
# # javadoc.py: javadoc docstring parsing # Edward Loper # # Created [07/03/03 12:37 PM] # $Id: javadoc.py,v 1.8 2004/03/09 05:02:50 edloper Exp $ # """ Epydoc parser for U{Javadoc<http://java.sun.com/j2se/javadoc/>} docstrings. Javadoc is an HTML-based markup language that was developed for documenting Java APIs wit...
# -*- coding: utf-8 -*- # flake8: noqa # Generated by Django 1.11.20 on 2019-04-19 20:43 from __future__ import absolute_import, unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('icds_reports', '0111_service_delivery_dashboard'), ] ...
import os from syn.base import Attr from syn.conf import Vars from syn.five import STR #------------------------------------------------------------------------------- # Vars def test_vars(): class A(Vars): _opts = dict(init_validate = True) _attrs = dict(a = Attr(int), b = A...
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AlipayPcreditHuabeiAuthPageSignModel import AlipayPcreditHuabeiAuthPageSignModel class AlipayPcreditHuabeiAuthPageSign...
from .label import TyreEnergyLabel
from typing import Union, List, Optional from pyspark.sql.types import ( StructType, StructField, StringType, ArrayType, BooleanType, DataType, ) # This file is auto-generated by generate_schema so do not edit it manually # noinspection PyPep8Naming class ValueSetSchema: """ A ValueSe...
#!/usr/bin/env python import unittest from ..TestCase import TestCase class TestEppPoll(TestCase): def test_render_epp_poll_request_min(self): self.assertRequest('''<?xml version="1.0" ?> <epp xmlns="urn:ietf:params:xml:ns:epp-1.0"> <command> <poll op="req"/> <clTRID>XXXX-11</clTRID>...
""" Problem 50: Consecutive prime sum https://projecteuler.net/problem=50 The prime 41, can be written as the sum of six consecutive primes: 41 = 2 + 3 + 5 + 7 + 11 + 13 This is the longest sum of consecutive primes that adds to a prime below one-hundred. The longest sum of consecutive primes below one-thousand that...
__author__ = 'utente' t = ("uno", "due", "tre", "quattro") int = t[0:2] print(int) print(type(int)) l = ["cinque", "sei", "sette", "otto", "nove", "dieci", ] for x in l: print(x, end=" ") print("\n") lista = ["primo", "secondo", "terzo"] atsil = list(reversed(lista)) atsil.reverse() # print(dir(lista)) pri...
from modmerger_options import * try: DEBUG_MODE except NameError: DEBUG_MODE = 0 try: logger except NameError: import logging logger = logging.getLogger("mnb_warband") if( DEBUG_MODE == 1): logger.setLevel(logging.DEBUG) elif( DEBUG_MODE == -1): logger.setLevel(logging.WARN) elif( DEBUG_MODE =...
import random import json import copy from collections import OrderedDict from datetime import datetime, timedelta from django.utils import timezone from django.db.models import Count from django.http import HttpResponse from django.shortcuts import render_to_response, redirect from django.db import connection, trans...