text
stringlengths
2
999k
#!/usr/bin/env python # -*- coding: UTF-8 -*- ''' This code contains an adapted version of the voltage-dependent triplet STDP rule from: Clopath et al., Connectivity reflects coding: a model of voltage-based STDP with homeostasis, Nature Neuroscience, 2010 (http://dx.doi.org/10.1038/nn.2479) The plasticity rule is ada...
import math import torch import numpy as np import operators as op import stability import nn from PIL import Image with Image.open("../demo_images/test_image.png") as im: im.save("stab-ground-truth.png") X = np.asarray(im).astype(np.float64) / 255 # parameters eta = 1e-1 N, _ = X.shape inner_iters = 5 outer_...
import logging from jmeter_api.basics.config.elements import BasicConfig from jmeter_api.basics.utils import Renderable, tree_to_str class HTTPCacheManager(BasicConfig, Renderable): root_element_name = 'CacheManager' def __init__(self, *, clear_each_iteration: bool = False, ...
# -------------------------------------------------------------------------- # 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 cause incor...
import abc from typing import Any from typing import Dict from typing import Optional from typing import Union from spine_json_lib.graph.spamnode import SpamNode class INodeFactory(object): """ This is an ABSTRACT class You need to extend this for de/serializing Graphs """ __metaclass__ = abc.A...
import json import eventlet from random import randint import sys import time import random import string sys.path = sys.path + ['.','../'] import app.sdk_client_tasks as sdk pool = eventlet.GreenPool(10000) template={'name': 'default', 'flags': 0, 'kv': {u'city': u'$str5', u'num': u'$int', u'b': u'$boo', u'flo': u'$...
import argparse import getpass import io import os import six import sys from eclcli.common import command from eclcli.bare import bare_utils from eclcli.common import utils class ListVersion(command.Lister): """List baremetal API versions""" def get_parser(self, prog_name): parser = super(ListVersi...
import binascii import datetime import json import os import shutil import struct import traceback import uuid import mxnet as mx import numpy as np import yaml import pai import redis from mxnet import gluon, autograd from pai.pouw import message_map, overdrive from pai.pouw.constants import TEMP_FOLDER, BUCKET, BLO...
""" Helper functions for PyTorch. Functions: get_trainable_parameters save_model_weights Class: Measurement PSNR SSIM """ import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import numpy as np from datetime import datetime from math import exp fr...
import cv2 def draw_yolo_detections(image, detections, color=(0,255,0)): img = image.copy() with open("..//Data//model//yolov4/coco.names", 'rt') as f: classes = f.read().rstrip('\n').split('\n') for detect in detections: bbox = detect[1] category = classes[int(detect[0])] ...
# -*- coding: utf-8 -*- import os REPO_NAME = "" # Used for FREEZER_BASE_URL DEBUG = True # Assumes the app is located in the same directory # where this file resides APP_DIR = os.path.dirname(os.path.abspath(__file__)) def parent_dir(path): '''Return the parent of a directory.''' return os.path.abspath(os...
# $Id$ #----------------------------------------------------------------------- # Copyright (C) 2005,2019 # Associated Universities, Inc. Washington DC, USA. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free So...
import this, codecs zen_string = codecs.encode(this.s, 'rot13') print("\nвходжень слова better - ", zen_string.count("better")) print("входжень слова never - ", zen_string.count("never")) print("входжень слова is - ", zen_string.count("is"), "\n") print("Далі текст у верхньому регістрі\n") print(f"{zen_string.upper()}...
# -*- coding: utf-8 -*- """column style""" __all__ = ['Style'] from .default import ValueFetcher from PyQt5 import QtWidgets, QtGui from typing import Union, Tuple class Style: """ Column style including: - font color - background color """ def __init__(self, color: Union[str, Tuple[int], N...
import json from django import forms from django.template.loader import render_to_string from django.urls import reverse from django.utils.translation import gettext_lazy as _ from wagtail.admin.staticfiles import versioned_static from wagtail.admin.widgets import AdminChooser from wagtail.images import get_image_mod...
""" coral_model v3 - hydrodynamics @author: Gijs G. Hendrickx """ import numpy as np import os from scipy.optimize import fsolve # TODO: Check if the BMI-package can be removed from this project; i.e. check if once installed, it is no longer needed. import bmi.wrapper import faulthandler faulthandler.enable() class...
""" Implementation of the core Tensor object for autodifferentiation. """ from .autodiff import Variable from .tensor_data import TensorData from . import operators class Tensor(Variable): """ Tensor is a generalization of Scalar in that it is a Variable that handles multidimensional arrays. Attribut...
# Copyright 2009 by David Winter. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. import os import sys import unittest from Bio import MissingExternalDependencyError from Bio i...
from django.conf import settings # Default dummy provider PAYMENT_PROVIDERS = { 'default': ('payments.dummy.DummyProvider', {})} # Cache used to store providers PROVIDER_CACHE = {} class BaseProvider(object): """ This class defines the provider API. Providers need to subclass this and implement thei...
# Copyright 2020 MONAI Consortium # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, s...
from flask import Flask, request, jsonify, redirect, url_for import pyexcel.ext.xlsx import pandas as pd from werkzeug import secure_filename UPLOAD_FOLDER = 'upload' ALLOWED_EXTENSIONS = set(['xlsx']) app=Flask(__name__) app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER def allowed_file(filename): return '.' in fil...
#!/usr/bin/env python3 """ This is an example to train a task with VPG algorithm. Here it runs CartPole-v1 environment with 100 iterations. Results: AverageReturn: 100 RiseTime: itr 16 """ from garage.experiment import run_experiment from garage.np.baselines import LinearFeatureBaseline from garage.tf.algos i...
# Copyright 2014 Florian Ludwig # # 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 writin...
"""Tests for bdpy.util""" import unittest import numpy as np import bdpy class TestUtil(unittest.TestCase): """Tests for 'util' module""" def test_create_groupvector_pass0001(self): """Test for create_groupvector (list and scalar inputs).""" x = [1, 2, 3] y = 2 exp_outpu...
import hashlib from utils import random_number_generator import binascii from functools import reduce import math def getChecksumBitCount(mnemonic_length: int): if (mnemonic_length % 3) != 0: raise ValueError('Invalid Mnemonic code length') checksum_bit_count = mnemonic_length // 3 ...
# ****************************************************************************** # Copyright 2017-2018 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.apa...
import json import boto3 import logging dynamodb = boto3.client('dynamodb') logger = logging.getLogger() logger.setLevel(logging.INFO) def get_todo(id): try: res = dynamodb.get_item( TableName='todos', Key={'id': { 'N': str(id), }}, AttributesToGet=['id', 'descriptio...
""" Scrapy signals These signals are documented in docs/topics/signals.rst. Please don't add new signals here without documenting them there. """ engine_started = object() engine_stopped = object() spider_opened = object() spider_idle = object() spider_closed = object() spider_error = object() request_received = obje...
num = int(input('Digite um número inteiro: \n')) print('Escolha uma das bases a seguir para conversão:') print('[1] para converter em BINÁRIO') print('[2] para coverter em OCTAL') print('[3] para converter em HEXADECIMAL') opcao = int(input('Por favor, escolha uma opção digitando 1, 2 ou 3: \n')) if opcao == 1: pr...
from django.contrib.auth import get_user_model from django.contrib.auth.models import ( Permission ) from papermerge.core.models import ( Document, Role ) User = get_user_model() def create_root_user(): user = User.objects.create_user( 'admin', 'admin@mail.com', is_active=Tru...
import re import functools class Group: def __init__(self, army, units, hp, weak, immune, dmg, dmg_type, initiative): GLOBS['last_id'] += 1 self.id = GLOBS['last_id'] self.army = army self.units = units self.hp = hp self.weak = weak self.immune = immune ...
import numpy as np def sigmoid(x): """ Compute the sigmoid of x Arguments: x -- A scalar or numpy array of any size. Return: s -- sigmoid(x) """ s = 1/(1+np.exp(-x)) return s def relu(x): """ Compute the relu of x Arguments: x -- A scalar or numpy array of any si...
#!/usr/bin/env python3 """Biopython Sphinx documentation build configuration file. After generating ``*.rst`` files from the source code, this file controls running ``sphinx-build`` to turn these into human readable documentation. """ import os import shutil import sys import tempfile from sphinx.ext import autodoc ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2018 ICON Foundation # # 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 requi...
from .models import Review, Profile, Project from django import forms from django.forms import ModelForm, Textarea, IntegerField # class NewImageForm(forms.ModelForm): # class Meta: # model = Image # exclude = ['user',] class NewProjectForm(forms.ModelForm): class Meta: model = Proje...
# This file is part of the MapProxy project. # Copyright (C) 2010 Omniscale <http://omniscale.de> # # 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...
import torch from homura.modules import cross_entropy_with_softlabels from torch.distributions import Categorical from torch.nn import functional as F from backends.loss import kl_div, normalize from backends.utils import SSLTrainerBase, disable_bn_stats, get_task class VATTrainer(SSLTrainerBase): def labeled(se...
#Escreva um programa em Python que leia um número inteiro qualquer e peça para o usuário escolher qual será a base de conversão: # 1 para binário, 2 para octal e 3 para hexadecimal. num = int(input('Digite um número inteiro: ')) print('''Escolha uma das bases para conversão: [ 1 ] converter para BINÁRIO [ 2 ] converte...
settings_1_9_0 = """ # Only for cross building, 'os_build/arch_build' is the system that runs Conan os_build: [Windows, WindowsStore, Linux, Macos, FreeBSD, SunOS] arch_build: [x86, x86_64, ppc64le, ppc64, armv6, armv7, armv7hf, armv8, sparc, sparcv9, mips, mips64, avr, armv7s, armv7k] # Only for building cross compil...
"""Package for managing execution of external programs in Kattis Problemtools. """ import re import os from .buildrun import BuildRun from .checktestdata import Checktestdata from .errors import ProgramError from .executable import Executable from .program import Program from .source import SourceCode from .viva impor...
from wsgiref.simple_server import make_server def application(environ, start_response): status = '200 OK' response_headers = [('Content-type', 'text/plain')] start_response(status, response_headers) return [b'Hello world'] with make_server('', 8000, application) as httpd: print("Serving on port ...
from decimal import Decimal from typing import TYPE_CHECKING, Iterable, Optional, Tuple, Union from django.core.handlers.wsgi import WSGIRequest from django.http import HttpResponse, HttpResponseNotFound, JsonResponse from django_countries.fields import Country from prices import Money, TaxedMoney from ...account.mod...
"""Constants in meteobridge integration.""" import logging # from homeassistant.const import ( # CONF_UNIT_SYSTEM_METRIC, # CONF_UNIT_SYSTEM_IMPERIAL, # ) from pymeteobridgeio import ( DEVICE_TYPE_BINARY_SENSOR, DEVICE_TYPE_SENSOR, UNIT_TYPE_DIST_KM, UNIT_TYPE_DIST_MI, UNIT_TYPE_PRESSURE_HP...
import os import shutil import unittest from os import remove, removedirs from tempfile import mkdtemp import numpy as np from src.core.common.utils import (cosine_dist_mels, get_basename, get_chunk_name, get_subfolders, make_same_dim, pass_lines) ...
#!/usr/bin/env python import pickle import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from scipy.stats import pearsonr, spearmanr # distributions of the individual scores # load the full properties df_full = pickle.load(open('Properties/full_props.pkl', 'rb')) # pairwis...
import numpy as np import tensorflow as tf from ncem.estimators import EstimatorNoGraph from ncem.models import ModelCVAE class EstimatorCVAE(EstimatorNoGraph): """Estimator class for conditional variational autoencoder models. Subclass of EstimatorNoGraph.""" def __init__( self, use_type_co...
from __future__ import print_function from future import standard_library standard_library.install_aliases() from builtins import range from past.builtins import basestring import sys, os import numpy as np import operator try: # works with python 2.7 not 3 from StringIO import StringIO except: # works ...
# # Rokko: Integrated Interface for libraries of eigenvalue decomposition # # Copyright (C) 2015 by Rokko Developers https://github.com/t-sakashita/rokko # # Distributed under the Boost Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # from rokko...
# -*- coding:utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import os import django BASE_DIR = os.path.dirname(os.path.dirname(__file__)) DEBUG = True SECRET_KEY = 'NOTASECRET' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAM...
from os import path from tkinter.filedialog import askdirectory, askopenfile from tkinter.ttk import Progressbar from tkinter import Menu, messagebox from tor_handler import TorHandler from toplevel_window_manager import ToplevelManager from video_quality_selector_manager import VideoQualitySelector import threading im...
# Problem Set 2, hangman.py # Name: # Collaborators: # Time spent: # Hangman Game # ----------------------------------- # Helper code # You don't need to understand this helper code, # but you will have to know how to use the functions # (so be sure to read the docstrings!) import random import string WORDLIST_FILEN...
#------------------------------------------------------------------------------ # Copyright (c) 2013-2017, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #--------------------------------------------...
#!/usr/bin/env python #-*- coding: utf-8 -*- import rospy from bb2_pkg.Module_Gps_Class_20 import MoveByGPS if __name__ == '__main__': rospy.init_node('Test_FlyWithoutRotate') target_lati = float(input("목표 지점의 위도를 입력하세요:")) target_long = float(input("목표 지점의 경도를 입력하세요:")) mg = MoveByGPS() mg.fly_without_ro...
# Copyright 2019 Google LLC. 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...
# Copyright 2015-2017 Espressif Systems (Shanghai) PTE 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 ...
from views import db import datetime class Task(db.Model): __tablename__ = "tasks" task_id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String, nullable=False) due_date = db.Column(db.Date, nullable=False) priority = db.Column(db.Integer, nullable=False) status = db.Column(d...
from .module import Module class View(Module): def __init__(self, shape): super(View, self).__init__() if type(shape) is not tuple: shape = (shape,) self.shape = shape def update_output(self, x): self.output = x.view().reshape((x.shape[0],) + self.shape) r...
import asyncio import collections import logging import time import pytest from aio_throttle import MaxFractionCapacityQuota from aio_throttle import Throttler DELAY = 1 SUCCEED = "+" FAILED = "-" FIRST_CONSUMER = "first" SECOND_CONSUMER = "second" logger = logging.getLogger(__name__) class Server: def __init...
from ast import parse from torch.autograd.grad_mode import no_grad from torch.functional import Tensor from torch.nn.modules.loss import BCELoss, CrossEntropyLoss from dataset import WakeWordDataset from model import CNNNetwork from torch.utils.data import DataLoader from tqdm import tqdm from typing import Tuple impo...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
from assemblyline.common.charset import safe_str from assemblyline.common.isotime import epoch_to_iso from assemblyline.al.common import forge from assemblyline.al.common import task from assemblyline.al.common.forge import get_constants, get_config constants = get_constants() config = get_config() class NoticeExcep...
test = { 'name': 'q4_4', 'points': 1, 'suites': [{'cases': [{'code': '>>> isinstance(strongest_earthquake_magnitude, float)\nTrue', 'hidden': False, 'locked': False}], 'scored': True, 'setup': '', 'teardown': '', 'type': 'doctest'}]}
# SPDX-License-Identifier: Apache-2.0 # # Copyright (C) 2015, ARM Limited and contributors. # # 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 # # ...
import json as json_parser import doctest class JSObject: """Allow to use json as an Python object with attributes >>> jso = JSObject({'attr1': {'attr2': 'val1'}, 'attr3': ['val2', {'attr4': 'val3'}]}) >>> jso.attr1.attr2 'val1' >>> jso.attr3[1].attr4 'val3' >>> jso.new_attr = 'new val' ...
import random import collections def rundata(): n1 = random.randint(5, 15) n2 = random.randint(20, 100) string = str(n1) + " " + str(n2) + "\n" for i in range(0, n2, 1): n3 = random.randint(1, 3) if n3 == 1: n4 = random.randint(1, n1) string += "1 " + str(n4) + "...
import collections from collections import defaultdict, Counter import functools import itertools from itertools import product, permutations, combinations import bisect import math from rich import print import parse import operator from heapq import heappop, heappush wsen = {"E": (1, 0), "S": (0, -1), "W...
import keyword import clr from System.Reflection import BindingFlags from util_methods import * from constants import * class emptylistdict(dict): """defaultdict not available before 2.5; simplest reimplementation using [] as default""" def __getitem__(self, item): if item in self: retur...
#!/usr/bin/env python from __future__ import absolute_import, division, print_function, with_statement import base64 import binascii from contextlib import closing import copy import functools import sys import threading import datetime from io import BytesIO from tornado.escape import utf8 from tornado import gen f...
# Copyright 1999-2021 Alibaba Group Holding 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 a...
""" OEML - REST API This section will provide necessary information about the `CoinAPI OEML REST API` protocol. This API is also available in the Postman application: <a href=\"https://postman.coinapi.io/\" target=\"_blank\">https://postman.coinapi.io/</a> # noqa: E501 The version of the OpenAPI d...
import logging from datetime import datetime, timedelta from dispatch.conversation.enums import ConversationCommands from dispatch.database import SessionLocal, resolve_attr from dispatch.incident import service as incident_service from dispatch.incident.models import Incident from dispatch.messaging.strings import (...
# coding: utf-8 """ SimScale API The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from simscale_sdk.configuration import Configuration class PerfectGasEquationOfStateEConstThermo(object): """NOTE: This cl...
"""Definitions of common exceptions for :mod:`sympy.core` module. """ from __future__ import print_function, division class BaseCoreError(Exception): """Base class for core related exceptions. """ class NonCommutativeExpression(BaseCoreError): """Raised when expression didn't have commutative property. """...
# Copyright 2017 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...
from ConfigSpace.configuration_space import ConfigurationSpace from ConfigSpace.hyperparameters import UniformFloatHyperparameter, \ UniformIntegerHyperparameter, CategoricalHyperparameter, UnParametrizedHyperparameter from autosklearn.pipeline.components.base import ( AutoSklearnClassificationAlgorithm, I...
import unittest import numpy as np from pycqed.simulations.CZ_leakage_simulation import \ simulate_CZ_trajectory, ket_to_phase class Test_CZ_single_trajectory_analysis(unittest.TestCase): @classmethod def setUpClass(self): pass def test_single_trajectory(self): params_dict = {'leng...
# 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 agreed to...
import numpy as np import pytest import pandas as pd from pandas import DataFrame, Series, Timestamp import pandas._testing as tm class TestDataFrameAppend: def test_append_empty_list(self): # GH 28769 df = DataFrame() result = df.append([]) expected = df tm....
import httpx from pytest_httpx import HTTPXMock # TODO Remove def get_header(httpx_mock: HTTPXMock, auth: httpx.Auth) -> dict: # Mock a dummy response httpx_mock.add_response(url="https://authorized_only", method="GET") # Send a request to this dummy URL with authentication response = httpx.get("https...
from string import * from numpy import * import os # ************************************************* # ********** function definitions **************** # ************************************************* def get_path(): # Requiring inputs from user # the list id composed of all the text files located in...
from urllib.parse import urlencode from proxy_connector import Connection import discord import aiohttp import re import traceback import os import time import asyncio import sys import io import random import string import json class env: proxy_token = os.getenv("PROXY_TOKEN") proxy_ip = os.getenv("PROXY_IP") pro...
from __future__ import absolute_import from .Node import Op import numpy as np from .. import ndarray from .._base import DNNL_LIB from ..cpu_links import batch_norm as cpu_batch_norm from ..cpu_links import batch_norm_inference as cpu_batch_norm_inference from ..cpu_links import batch_norm_gradient as cpu_batch_norm_g...
# encoding: utf-8 ''' The application's Globals object ''' from __future__ import annotations import logging import re from threading import Lock from typing import Any, Union import ckan import ckan.model as model from ckan.logic.schema import update_configuration_schema from ckan.common import asbool, config, asli...
#!/usr/bin/env python # -*- coding: utf-8 -*- from .rotation_tools import * from .starspot import * from .phase_dispersion_minimization import * from .stitch import * from .sigma_clipping import *
#!/usr/bin/env python3 import os import sys import yaml import signal import subprocess from time import sleep from json import dumps,loads import paho.mqtt.client as mqtt # uses signal to shutdown and hard kill opened processes and self def shutdown(signum, frame): mqtt_client.connect(host=mqtt_host, port=mqtt_p...
import math from dataclasses import dataclass from functools import partial from typing import ( List, Callable, Any, Optional ) import numpy as np from core.composer.optimisers.crossover import CrossoverTypesEnum, crossover from core.composer.optimisers.heredity import heredity, GeneticSch...
#!/usr/bin/python import sys import getopt import re # # File : merge-fastq.py # Created on December 1, 2011 # Author : Sriram PC <sriram.pc@gmail.com> # # This file is part of Error Correction Review Toolkit. # Error Correction Review Toolkit is free software: you can # redistribute it and/or modify it under t...
from setuptools import setup, find_packages with open("README.md", "r") as fh: long_description = fh.read() setup( name='lora-rn2483', version="0.1", license='Apache License, Version 2.0', description='rn2483 library', author='Alexandros Antoniades', author_email='alex.rogue.antoniades@gma...
from pyrogram import Client, filters import asyncio import os from pytube import YouTube from pyrogram.types import InlineKeyboardMarkup from pyrogram.types import InlineKeyboardButton from youtubesearchpython import VideosSearch from AlexaSongBot.mrdarkprince import ignore_blacklisted_users, get_arg from AlexaSongBot ...
import os import logging from github import Github from sretoolbox.utils import retry import reconcile.utils.gql as gql from reconcile.github_org import get_config from reconcile.utils.raw_github_api import RawGithubApi ROLES_QUERY = """ { roles: roles_v1 { name users { github_username } bo...
import six from datetime import datetime def validate_zeropush_payload(payload, expiry_check=datetime.now()): """ All the validation is according to the payload description described here: https://zeropush.com/documentation/api_reference#notify """ # We need to do this because querystrings are no...
def test_binary_byte_str_code(fake): assert isinstance(fake.binary_byte_str(code=True), str) def test_decimal_byte_str_code(fake): assert isinstance(fake.decimal_byte_str(code=True), str) def test_binary_byte_str(fake): assert isinstance(fake.binary_byte_str(), str) def test_decimal_byte_str(fake): ...
# 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, overload from ... import _utilities fro...
#!/usr/bin/env python3 # https://abc072.contest.atcoder.jp/tasks/abc072_b print(input()[::2])
import tempfile from PIL import Image from django.test import TestCase, override_settings from django.urls import reverse from ..models import User, Profile from ..forms import SignUpForm class TestSignUpView(TestCase): def setUp(self): self.user = User.objects.create_user( username='user1',...
"""Implementation of magic functions that control various automatic behaviors. """ #----------------------------------------------------------------------------- # Copyright (c) 2012 The IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING...
import _plotly_utils.basevalidators class BValidator(_plotly_utils.basevalidators.DataArrayValidator): def __init__(self, plotly_name="b", parent_name="scattercarpet", **kwargs): super(BValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_ty...
# coding: utf-8 import pprint import re import six class CreatePublicIpOption: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the val...
from __future__ import print_function, with_statement import ast import atexit import distutils.cmd import distutils.log import distutils.sysconfig import os.path import platform import shutil import subprocess import sys import tempfile from setuptools import Extension, setup system_sass = os.environ.get('SYSTEM_SA...
# Copyright 2014 Sardar Yumatov # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...