text
stringlengths
2
999k
""" mbed SDK Copyright (c) 2011-2015 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wr...
import asyncio from typing import Callable, List from playwright.async_api import Page, TimeoutError from tqdm import tqdm from tiktokpy.client import Client from tiktokpy.utils import unique_dicts_by_key from tiktokpy.utils.client import catch_response_and_store, catch_response_info from tiktokpy.utils.logger import...
from pyfrc.test_support import controller import robotmap from networktables import NetworkTables def test_dashButton(hal_data: controller.hal_data, control: controller.TestController, fake_time, robot): def tController(t): table = NetworkTables.getTable("SmartDashboard") if t < 2: ta...
from itertools import tee, zip_longest def pairwise(iterable): a, b = tee(iterable) next(b, None) return zip(a, b) def modelname(model): return '%s.%s' % (model._meta.app_label, model._meta.verbose_name) def is_sublist(needle, haystack): if not needle: return True if not haystack: ...
""" Torre de Hanoi iterativo """ def hanoi(n: int, orig='A', aux='B', dest='C') -> None: pilha = [(False, n, orig, aux, dest)] while pilha: print_flag, n, orig, aux, dest = pilha.pop() if n < 1: continue if not print_flag: pilha.append((True, n, orig, aux, de...
# -*- coding: utf-8 -*- # # Doppler documentation build configuration file, created by # sphinx-quickstart on Sun Jan 8 13:17:19 2012. # # 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...
# coding: utf-8 """ OrderCloud No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.0 Contact: ordercloud@four51.com Generated by: https://github.com/swagger-api/swagger-codegen.git Licensed under the Apache License, Ve...
""" Cisco_IOS_XR_ip_iarm_v6_oper This module contains a collection of YANG definitions for Cisco IOS\-XR ip\-iarm\-v6 package operational data. This module contains definitions for the following management objects\: ipv6arm\: IPv6 Address Repository Manager (IPv6 ARM) operational data Copyright (c) 2013\-2017...
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutStringManipulation(Koan): def test_use_format_to_interpolate_variables(self): value1 = 'one' value2 = 2 string = "The values are {0} and {1}".format(value1, value2) self.assertEqual("The values are ...
#import easyocr #reader = easyocr.Reader(['ch_sim', 'en']) # need to run only once to load model into memory #result = reader.readtext('bing/black+protest/Scrapper_19.jpg') #print(result) import pandas as pd df = pd.read_csv("ucla_test.txt", delimiter=",") sorted_df = df.sort_values("fname") sorted_df.to_csv("an...
from datetime import datetime from flask_sqlalchemy import SQLAlchemy from utils.cookies import generate_uuid db = SQLAlchemy() BASE_UUID_LENGTH = 32 URL_MAX_LENGTH = 256 class BaseUUID(db.Model): __abstract__ = True id = db.Column(db.Integer, primary_key=True) uuid = db.Column(db.String(BASE_UUID_LENG...
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Intangible() result.template = "object/draft_schematic/structure/city/shared_garden_large.iff" result.attribute_t...
# (C) Copyright 2019 Hewlett Packard Enterprise Development LP. # 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...
"""This component provides HA sensor support for Ring Door Bell/Chimes.""" from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.binary_sensor import ( PLATFORM_SCHEMA, BinarySensorDevice) from homeassistant.const import ( ATTR_ATTRIBUTION, CONF_ENTITY_NAMESPACE,...
import pytest from _pytest import python from _pytest import runner class TestOEJSKITSpecials(object): def test_funcarg_non_pycollectobj(self, testdir): # rough jstests usage testdir.makeconftest( """ import pytest def pytest_pycollect_makeitem(collector, name, obj): ...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # ----------------------------------------------------------------...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** 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 from ... import _utilities, _tables from...
# Generated by Django 3.0.5 on 2021-06-26 09:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('quiz', '0011_auto_20210626_0206'), ] operations = [ migrations.AlterField( model_name='question', name='answer2', ...
# This file is taken from Requests v2.25.0 with the following modifications: # - Removed Python 2 compatibility # - Removed UTF-8 coding header comment # # It was originally released under the following licence: # ``` # Copyright 2019 Kenneth Reitz # # Licensed under the Apache License, Version 2.0 (the "License...
import _plotly_utils.basevalidators class LegendgrouptitleValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="legendgrouptitle", parent_name="funnel", **kwargs): super(LegendgrouptitleValidator, self).__init__( plotly_name=plotly_name, parent_...
from __future__ import annotations from typing import TYPE_CHECKING from tcod.console import Console from tcod.map import compute_fov from src.display.messageLog import MessageLog from src.engine.inputHandlers import MainGameEventHandler from src.display.renderFunctions import renderBar, renderNamesAtMouseLoc...
# The MIT License # Copyright (c) 2021- Nordic Institute for Interoperability Solutions (NIIS) # Copyright (c) 2017-2020 Estonian Information System Authority (RIA) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"...
from ._kaa import Sprite, Texture
# Copyright 2018 Red Hat, Inc. # # 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 ...
"""Provide methods to bootstrap a Home Assistant instance.""" import asyncio from collections import OrderedDict import logging import logging.handlers import os import sys from time import time from typing import Any, Dict, Optional, Set import voluptuous as vol from homeassistant import config as conf_util, config_...
"""Support for HLK-SW16 relay switches.""" import logging import voluptuous as vol from homeassistant.const import ( CONF_HOST, CONF_PORT, EVENT_HOMEASSISTANT_STOP, CONF_SWITCHES, CONF_NAME) from homeassistant.core import callback import homeassistant.helpers.config_validation as cv from homeassistant.helpers...
# coding: utf-8 from leancloud import Engine from app import app engine = Engine(app) @engine.define def hello(**params): if 'name' in params: return 'Hello, {}!'.format(params['name']) else: return 'Hello, LeanCloud!'
# Copyright 2015 - Alcatel-Lucent # # 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...
# 08_uebung_einträge_vertikale_zu_hotizontale_anordnung.py # In dieser Übung geht es darum Einträge einer Tabelle die Vertikal geordnet # sind horizontal auszurichten import openpyxl, os os.chdir(os.path.dirname(__file__)) example_file='.\\example.xlsx' target_file='.\\output.xlsx' if os.path.exists(target_file): ...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
from pathlib import Path import cv2 import argparse import timeit import numpy as np cv2.LineSegmentDetector from src.pathfinder import Pathfinder from src.utilities import eval_path def get_args(): parser = argparse.ArgumentParser('intelligent-scissors') parser.add_argument('impath', help='image path') ...
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
class ConfigOptions: def __init__(self, config): self.config = config self.pre_processor = config.get('pre_processor', None) self.compiler = config.get('compiler', None) # TODO: better design pattern for this stuff # try get include_path from pre_processor if self.p...
# -*- coding: utf-8 -*- import hashlib import re import time from ...core.network.request_factory import get_url from ..base.account import BaseAccount class WebshareCz(BaseAccount): __name__ = "WebshareCz" __type__ = "account" __version__ = "0.16" __status__ = "testing" __pyload_version__ = "0...
from setuptools import setup, find_packages def read_requirements(): with open('requirements.txt') as req: content = req.read() requirements = content.split('\n') return requirements setup( name='stm', version='0.1', packages=find_packages(), include_package_data=True, inst...
import json import os from collections import defaultdict import networkx as nx import pandas as pd import stanza from networkx.algorithms.isomorphism import DiGraphMatcher from sklearn.metrics import precision_recall_fscore_support from tqdm import tqdm from tuw_nlp.grammar.text_to_4lang import TextTo4lang from tuw_n...
""" Unit tests for masquerade. """ import json import pickle from datetime import datetime from importlib import import_module from unittest.mock import patch import pytest import ddt from operator import itemgetter from django.conf import settings from django.test import TestCase, RequestFactory from django.urls impo...
import f1 import p1.f2 import p1.p2.p3.f3 import p1.p2.intra.f4mod print("main") print("p1.p2 is ", type(p1.p2)) f1.func() p1.f2.func() p1.p2.p3.f3.func() p1.f2.p2() print("f1 is ", type(f1)) print("p1 is ", type(p1)) print("p1.intra.f4mod.f4 is", type(p1.p2.intra.f4mod.f4)) p1.p2.intra.f4mod.f4()
# -*- coding: utf-8 -*- # # titanic 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 val...
# Copyright 2019 Wirepas Ltd licensed under Apache License, Version 2.0 # # See file LICENSE for full license details. # import logging import os from time import time from uuid import getnode from threading import Thread import wirepas_messaging from wirepas_gateway.dbus.dbus_client import BusClient from wirepas_gate...
# This program is free software: you can redistribute it and/or modify it under the # terms of the Apache License (v2.0) as published by the Apache Software Foundation. # # This program is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or...
############################################################################### # # The MIT License (MIT) # # Copyright (c) Crossbar.io Technologies GmbH # # 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 ...
#!/usr/bin/env python3 # # Copyright (c) 2021, General Electric Company, Inc. # # All Rights Reserved # # This material is based upon work supported by the Defense Advanced Research # Projects Agency (DARPA) under Contract No. FA8750-20-C-0203. # # Any opinions, findings and conclusions or recommendations expressed in ...
from sqlalchemy import FetchedValue from sqlalchemy import ForeignKey from sqlalchemy import Integer from sqlalchemy import String from sqlalchemy import testing from sqlalchemy.orm import mapper from sqlalchemy.orm import Session from sqlalchemy.testing import eq_ from sqlalchemy.testing import fixtures from sqlalchem...
# Supplier of Reagents version 0.2 # by DrLecter for the Official L2J Datapack Project. # Visit http://forum.l2jdp.com for more details. # Rate fix by Gnat import sys from ru.catssoftware import Config from ru.catssoftware.gameserver.model.quest import State from ru.catssoftware.gameserver.model.quest import QuestState...
""" Provides metadata version information. """ # This file is auto-generated! Do not edit! # Use `python -m incremental.update metadata` to change this file. from incremental import Version __version__ = Version("metadata", 0, 11, 0, dev=10) __all__ = ["__version__"]
import numpy as np import random import CoolProp.CoolProp as CP import time random.seed("coolprop_test") p = 101325 # 1 atmosphere T = np.random.uniform(120, 400, 10000) + 273.15 # Random points from 120 to 400 deg C, gas phase only # Make sure the objects exist and create tables if needed normal_state = CP.Abstrac...
#player #***************************************** #Copyright 2015 Sasha <movr1r2@gmail.com> #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT #WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, #INCLUDING BUT NOT LIMITED TO THE WARRANTIES #OF MERCHANTABILITY,FITNESS FOR A PARTICULAR #PURPOSE AND NONINFRINGEMENT. IN NO EVENT #SHAL...
#!/usr/bin/python2 """ 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"); yo...
from abc import ABC from datetime import datetime import numpy as np import polars as pl from lxml import etree NS_MAP_VALUES = [ "http://www.broservices.nl/xsd/brocommon/", "http://www.broservices.nl/xsd/isbhr-gt/", "http://www.opengis.net/gml/", "http://www.broservices.nl/xsd/bhrgtcommon/", ] clas...
from src.base.node import Node from src.detection.walker import Walker from src.data.osm.overpass_api import OverpassApi class OsmObjectWalker(Walker): def __init__(self, tile, tags, square_image_length=50, zoom_level=19, step_width=0.66): super(OsmObjectWalker, self).__init__(tile, square_image_length, z...
""" WSGI config for django_graphql 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('DJANG...
""" Support for HydroQuebec. Get data from 'My Consumption Profile' page: https://www.hydroquebec.com/portail/en/group/clientele/portrait-de-consommation For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.hydroquebec/ """ import logging from datetime...
""" Reference Compositions ======================= This page presents the range of compositions within the reference compositon database accessible within :mod:`pyrolite`. It's currently a work in progress, but will soon contain extended descriptions and notes for some of the compositions and associated referen...
# coding=utf-8 # pylint: disable-msg=E1101,W0612 import re import sys from datetime import datetime, timedelta import operator import string from inspect import getargspec from itertools import product, starmap from distutils.version import LooseVersion import warnings import random import nose from numpy import nan...
import collections import random from typing import Counter import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 def parse_data(list_content): lists_data = [] list_collections: Counter = collections.Counter(list_content) top_lists = list_collections.most_common(10) ...
"""This module contains the general information for BiosVfExecuteDisableBit ManagedObject.""" from ...imcmo import ManagedObject from ...imccoremeta import MoPropertyMeta, MoMeta from ...imcmeta import VersionMeta class BiosVfExecuteDisableBitConsts: VP_EXECUTE_DISABLE_BIT_DISABLED = "Disabled" VP_EXECUTE_DI...
from functools import reduce from heapq import heappush as hpush, heappop as hpop, heapify as hpify from bisect import bisect_right as br, bisect_left as bl, insort_right as ir, insort_left as il arounds = [(-1, 0), (1, 0), (0, -1), (0, 1)] V = lambda n, default=0: [default for _ in range(n)] V2 = lambda m, n, default...
# This is the local_settings.py file to be packaged within Scale's Docker image # Include all the default settings. from settings import * import elasticsearch # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = os.environ.get('SCALE_SECRET_KEY', INSECURE_DEFAULT_KEY) # Use the following ...
import sys from subprocess import Popen, PIPE if not (sys.version_info.major >= 3 and sys.version_info.minor >= 4): print(f'Python version is too old! Your version is {sys.version.split()[0]} and a version newer than 3.4.0 is required') sys.exit(1) print(f'You are using Python version {sys.version.split()[0...
#!/usr/bin/env python # noinspection PyUnresolvedReferences import vtkmodules.vtkInteractionStyle # noinspection PyUnresolvedReferences import vtkmodules.vtkRenderingOpenGL2 from vtkmodules.vtkCommonColor import vtkNamedColors from vtkmodules.vtkFiltersSources import ( vtkRegularPolygonSource, vtkSphereSource ...
from django.http import HttpResponse from django.shortcuts import render def hello(request): return HttpResponse("hello_world Python demo App")
import telebot import requests import textwrap import time from bs4 import BeautifulSoup from flask import Flask, request token = "" host = "https://www.ivi.ru/search" logo = "https://www.ivi.ru/images/social/ivi_1000x523.jpg" secret = "" url = "https://latsis.pythonanywhere.com/" + secret bot = telebot.TeleBot(toke...
""" pyshtools Spherical Harmonic I/O, Storage, and Conversion Routines. This submodule of pyshtools defines the following functions: Spherical harmonic I/O ---------------------- shread Read spherical harmonic coefficients from a text file. SHRead2 Read spherical harmonic coefficients from a CHAMP ...
# Copyright (c) SecretBiology 2020. # # Library Name: SecretColors # Author: Rohit Suratekar # Website: https://github.com/secretBiology/SecretColors # # X11 color names # https://gitlab.freedesktop.org/xorg/app/rgb/raw/master/rgb.txt X11_DATA = {'snow': '#fffafa', 'ghost white': '#f8f8ff', 'GhostWh...
from django.shortcuts import render from django.views.generic import ListView, DetailView, CreateView, UpdateView, DeleteView # Create your views here. from poems.models import Poem, Poet def home_page(request): poems = Poem.emelyanova.all() poet = poems[0].poet_name return render(request, 'poems/index....
""" Copyright 2020 The OneFlow 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 law or agr...
''' Created on Apr 2, 2016 @author: Lucas Lehnert (lucas.lehnert@mail.mcgill.ca) ''' def simulateEpisode( mdp, pi, agent, maxTransitions=10000 ): ''' Simulates an episode and returns the number of update steps the agent needs. ''' s = mdp.getStartState() episodeEnd = False updateStep = 0 ...
# Copyright 2015 HGST # 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 agree...
import torch import torch.nn as nn class BatchNorm1dWithChannel(nn.BatchNorm1d): def __init__( self, num_channels: int, num_features: int, eps: float = 1e-5, momentum: float = 0.1, affine: bool = True, track_running_stats: bool = True, ) -> None: ...
# # cogs/journal/__init__.py # # futaba - A Discord Mod bot for the Programming server # Copyright (c) 2017-2020 Jake Richardson, Ammon Smith, jackylam5 # # futaba is available free of charge under the terms of the MIT # License. You are free to redistribute and/or modify it under those # terms. It is distributed in th...
import argparse from os import path as osp from basicsr.utils import scandir from basicsr.utils.lmdb_util import make_lmdb_from_imgs, make_lmdb_from_flows def create_lmdb_for_div2k(): """Create lmdb files for DIV2K dataset. Usage: Before run this script, please run `extract_subimages.py`. Ty...
#!/usr/bin/python # PostObsPIR.py # an attempt at mashing up existing scripts (oh boy!) # and cleaning them up while we're at it # Last Edited: march 19 2014 AC import time, datetime, requests, json, RPi.GPIO as GPIO ID = " RPi 1 " class data: def __init__(self,ID): self.ID = ID def __str__(s...
########################## # Custom Libraries # ########################## # Built-in Libraries # import pygame as pg class Text(pg.sprite.Sprite): # Constructor def __init__(self, text, font, color): # Call the parent class (Sprite) constructor pg.sprite.Sprite.__init__...
#!/usr/bin/env python # Copyright (C) 2016 Hewlett Packard Enterprise Development LP # # # 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 # # ...
# Copyright (c) 2011-2021, Camptocamp SA # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions an...
from .config import GlobalConfiguration, config
# Genie from genie.ops.base import Base class Arp(Base): exclude = ['in_requests_pkts', 'in_replies_pkts', 'in_requests_pkts', 'out_replies_pkts', 'out_requests_pkts', 'in_drops', 'in_replies_pkts', ...
""" MIT License Copyright (c) 2017 verixx / king1600 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, publ...
"""Create city_code table Revision ID: ea02faf8bc7a Revises: 52b3c1a122ce Create Date: 2017-06-19 12:15:14.513435 """ # revision identifiers, used by Alembic. revision = 'ea02faf8bc7a' down_revision = '52b3c1a122ce' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def upgrade(...
# coding=utf-8 import uuid from src.entity.person import Person class Dwelling: """Class holding data about a one room""" def __init__(self, block: str = '', floor: int = 0, cell: int = 0, room: str = '', space: int = 1, ...
# Generated by Django 2.2.7 on 2019-11-08 14:06 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('products', '0002_CourseGenitiveName'), ] operations = [ migrations.AlterModelOptions( name='course', options={'ordering': ['...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** 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 from ... import _utilities, _tables from...
""" Setuptools based setup module """ from setuptools import setup, find_packages import versioneer setup( name='pyiron-atomistics', version=versioneer.get_version(), description='pyiron - an integrated development environment (IDE) for computational materials science.', long_description='http://pyiro...
from . import envs from . import models from . import control from . import training from . import tools
"""Platform for light integration.""" import logging from smarttub import SpaLight from openpeerpower.components.light import ( ATTR_BRIGHTNESS, ATTR_EFFECT, EFFECT_COLORLOOP, SUPPORT_BRIGHTNESS, SUPPORT_EFFECT, LightEntity, ) from .const import ( ATTR_LIGHTS, DEFAULT_LIGHT_BRIGHTNESS...
# util/compat.py # Copyright (C) 2005-2020 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Handle Python version/platform incompatibilities.""" import collections import co...
from .slim_interface import simulate
# Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
def soln(s): print(any([char.isalnum() for char in s])) print(any([char.isalpha() for char in s])) print(any([char.isdigit() for char in s])) print(any([char.islower() for char in s])) print(any([char.isupper() for char in s])) if __name__ == '__main__': s = input() soln(s)
class Song: def __init__(self, song_name, singer, link): self.song_name = song_name self.singer = singer self.link = link def to_dict(self): return { "song_name": self.song_name, "singer": self.singer, "link": self.link }
## Program generuje dowolną ilość kluczy prywatnych oraz przekształca je w opcjonalnie w adresy Legacy bądź SegWit. ## Następnie odpytuje blockstream.info i oblicza saldo danego konta. ## To tylko zabawa, szansa na to że trafi się na tzw kolizję jest praktycznie zerowa, jak 1 do 2^256. ## ## Kod jest zlepkiem kilku roz...
# coding=utf-8 # pylint: disable-msg=E1101,W0612 from datetime import datetime import numpy as np import pytest from pandas.compat import lrange, range, zip from pandas import DataFrame, Index, MultiIndex, RangeIndex, Series import pandas.util.testing as tm class TestSeriesAlterAxes(object): def test_setinde...
"""Constants for the FAA Delays integration.""" from openpeerpower.const import ATTR_ICON, ATTR_NAME DOMAIN = "faa_delays" FAA_BINARY_SENSORS = { "GROUND_DELAY": { ATTR_NAME: "Ground Delay", ATTR_ICON: "mdi:airport", }, "GROUND_STOP": { ATTR_NAME: "Ground Stop", ATTR_ICON:...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' from PyQt5 import Qt class MainWindow(Qt.QMainWindow): def __init__(self): super().__init__() self.widget = Qt.QWidget() self.widget.resize(100, 100) button = Qt.QPushButton('Click!', clicked=self.show_and_...
# Web_App/Twitoff/routes/twitter_routes.py from flask import Blueprint, render_template, jsonify from Twitoff.models import db, User, Tweet, parse_records from Twitoff.services.twitter_service import twitter_api_client from Twitoff.services.basilica_service import basilica_api_client twitter_routes = Blueprint("twit...
""" Copyright (c) https://github.com/lcswillems/torch-rl """ #!/usr/bin/env python3 import argparse import gym import time try: import gym_minigrid except ImportError: pass import utils # Parse arguments parser = argparse.ArgumentParser() parser.add_argument("--env", required=True, ...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.7.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
import json as _json import multiprocessing as _mp import os as _os from collections import Callable from functools import partial as _partial from os import sep as _sep import numpy as _np import torch as _torch import torch.utils.data as _data from torch.utils.data import DataLoader as _DataLoader, Dataset as _Datas...
# encoding: UTF-8 """ 火币交易接口 """ import re import urllib import base64 import json import zlib import hashlib import hmac from copy import copy from datetime import datetime from vnpy.event import Event from vnpy.api.rest import RestClient, Request from vnpy.api.websocket import WebsocketClient from vnpy.trader.cons...