content
stringlengths
5
1.05M
# encoding: utf-8 import sys from PyQt5 import QtQuick from PyQt5.QtCore import QObject, pyqtSlot, QTimer from PyQt5.QtGui import QIcon from PyQt5.QtQml import QQmlApplicationEngine from PyQt5.QtWidgets import QWidget, QApplication, QLabel from resources import resources print(QtQuick) print(resources) class MyApp...
import logging import os import posixpath from dvc.config import Config from dvc.config import ConfigError from dvc.utils import relpath from dvc.utils.compat import urlparse logger = logging.getLogger(__name__) class RemoteConfig(object): def __init__(self, config): self.config = config def get_s...
# DAACS ~= NASA Earthdata data centers DAACS = [ { "short-name": "NSIDC", "name": "National Snow and Ice Data Center", "homepage": "https://nsidc.org", "cloud-providers": ["NSIDC_CPRD"], "on-prem-providers": ["NSIDC_ECS"], "s3-credentials": "https://data.nsidc.earthda...
from tkinter import * from SMExp import* from DMExp import* import pygame import time import random class SMPage(Frame): MUTE = False INFO = False DIM = 0 def __init__(self, parent, controller): Frame.__init__(self, parent) pygame.mixer.init() SGMWall = PhotoImage(fi...
#!/usr/bin/env python3 # # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import functools import multiprocessing import sys import unittest from io import StringIO import click import tempf...
import random import json import requests from flask import Flask, request, render_template from flask_sqlalchemy import SQLAlchemy app = Flask(__name__) @app.route('/', methods=['GET', 'POST']) def home(): rcomb = request.args.get('rcomb','http://appcombiner:5003/rcomb') return render_template('index.html',...
from django.urls import reverse from django.views import generic from . import forms class KindeditorFormView(generic.FormView): form_class = forms.KindeditorForm template_name = "form.html" def get_success_url(self): return reverse("kindeditor-form") kindeditor_form_view = KindeditorFormView....
#!/usr/bin/env python # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Michael A.G. Aivazis # California Institute of Technology # (C) 1998-2003 All Rights Reserved # # <LicenseText> # # ~~~~~~~~~~~~~~~~~~~~~~~~...
from pathlib import Path from typing import List def get_asset(name: str) -> Path: try: path = next(Path(__file__).parent.rglob(name)) except StopIteration: raise FileNotFoundError(name) return path def find_asset(name: str) -> List[Path]: paths = list(Path(__file__).parent.rglob(nam...
import pandas as pd import numpy as np from scipy.stats import multivariate_normal from sklearn.metrics import accuracy_score def bayesiano(classes,x_train,y_train,x_test,y_test): #### Realiza a classificacao #### # Matriz que armazena as probabilidades para cada classe P = pd.DataFram...
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from google.ads.google_ads.v3.proto.resources import bidding_strategy_pb2 as google_dot_ads_dot_googleads__v3_dot_proto_dot_resources_dot_bidding__strategy__pb2 from google.ads.google_ads.v3.proto.services import bidding_strategy_service...
# coding: utf-8 # 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 # "...
import re, sys, glob from os.path import join from tabulate import tabulate indir = sys.argv[1] outfile = join(indir, "xfold_eval.txt") name2fold = {} for fold in range(5): if fold not in name2fold: name2fold[fold] = {} file = join(indir, f"fold{fold}/eval.txt") with open(file, 'r') as f: tuple_performance,...
# coding: utf-8 __doc__ = """包含一些继承自默认Qt控件的自定义行为控件。""" import os from PyQt5.QtCore import Qt from PyQt5.QtWidgets import QLineEdit, QTextEdit class QLineEditMod(QLineEdit): def __init__(self, accept="dir", file_filter=set()): super().__init__() self.setContextMenuPolicy(Qt.NoContextMenu) ...
""" A collection of constants including error message """ ERROR_CLONE_TIMEOUT_EXPIRED = 'Timeout expired error' ERROR_CLONE_FAILED = 'Cloning failed error'
########################################################################## # # Copyright (c) 2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
from fastapi import Request from geobook.db.backends.mongodb import exceptions from starlette.responses import JSONResponse async def validation_exception_handler( request: Request, exc: exceptions.ValidationError, ) -> JSONResponse: headers = getattr(exc, 'headers', None) if headers: return J...
# Generated by Django 2.0.5 on 2018-06-12 17:31 import django.contrib.postgres.fields.jsonb from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('webarchives', '0004_auto_20180609_1839'), ] operations = [ migrations.AlterField( model_name...
from collections import deque import numpy as np from gym import spaces from gym.envs.atari.atari_env import AtariEnv from . import utils class MultiFrameAtariEnv(AtariEnv): metadata = {'render.modes': ['human', 'rgb_array']} no_op_steps = 30 def __init__(self, game='pong', obs_type='image', buf_size=4, gr...
from random import randint from time import sleep computador = randint(0, 5) print('-=' * 20) print('Vou pensar em um número entre 0 e 5.Tente adivinhar...') print('-=' * 20) jogador = int(input('Em que número eu pensei? ')) print('Processando...') sleep(3) if jogador == computador: print('Parabéns! Você acertou!')...
try: from pycaret.internal.pycaret_experiment import TimeSeriesExperiment using_pycaret=True except ImportError: using_pycaret=False
#! /usr/bin/env python import json import argparse from dashboard.common import elastic_access from dashboard.common import logger_utils from dashboard.conf import config from dashboard.conf import testcases from dashboard_assembler import DashboardAssembler from visualization_assembler import VisualizationAssembler ...
#!/home/ubuntu/DEF/PG/project/venv3/bin/python3 from django.core import management if __name__ == "__main__": management.execute_from_command_line()
from .layers import *
import os import json class Config: def __init__(self, configpath): self._data = self._get_config_data(configpath) self.client_id = self._data['client_id'] self.username = self._data['username'] self.account_id = self._data['account_id'] self.redirect = self._data['redirect...
class OpenL3Error(Exception): """The root OpenL3 exception class""" pass
from aiogram.dispatcher.filters.state import State, StatesGroup class AddStoreForm(StatesGroup): city_id = State() store_id = State() class SearchSku(StatesGroup): select_sku = State()
import os import json from flask import request, abort, jsonify, make_response, Response from jsonschema import validate, ErrorTree, Draft4Validator as Validator from app.properties import properties_bp from .models import Property from .repositories import PropertyRepository as Repository from .utils import load @pr...
from .annotation_decorator import annotate from .annotation_decorator import annotate_class from .annotation_decorator import annotate_method from .application import WinterApplication from .component import Component from .component import component from .component import is_component from .component_method import Com...
import sys printf = lambda fmt,*args: sys.stdout.write(fmt%args) printf ("This is a %s of %is of possibilities of %s","test",1000,printf)
#!/usr/bin/python import pickle import pandas as pd import numpy as np def convert_and_clean_data(data_dict, fill_na = 1.e-5): ''' Takes a dataset as a dictionary, then converts it into a Pandas DataFrame for convenience. Replaces all NA values by the value specified in 'fill_na' (or None). Cleans up...
SIZE = (640,480) TITLE = "Pipboy" TEXT_COLOUR = (0,255,0) TEXT_SIZE = 12 TEXT_FONT = '../resources/monofonto.ttf' BOARDER_SPACE = 10 TOP_BOARDER = 6 BOX_SPACE = 20
import os import sys import copy import argparse from avalon import io from avalon.tools import publish import pyblish.api import pyblish.util from pype.api import Logger import pype import pype.hosts.celaction from pype.hosts.celaction import api as celaction log = Logger().get_logger("Celaction_cli_publisher") p...
# Copyright 2018 Canonical 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 in writin...
import numpy as np; import numpy.matlib as npm; import DataHelper; # consume class is 0, 1, ..., discrete feature values is 0, 1, 2, ... class NaiveBayes: def __init__(self, smoothingFactor): self.__smoothingFactor = smoothingFactor; self.__discreteFeatureIndices = None; self.__discreteFe...
# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html # For details: https://github.com/PyCQA/astroid/blob/main/LICENSE # Copyright (c) https://github.com/PyCQA/astroid/blob/main/CONTRIBUTORS.txt """This module contains mixin classes for scoped nodes.""" from typing import TYPE_CHECKIN...
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-07-14 12:19 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True depe...
>>> 3 3 >>> _*_, _**0.5 (9, 1.7320508075688772) >>>
import bson import os, base64, zlib, random from bson import BSONCoding, import_class class Member(BSONCoding): def __init__(self, username = "", code = "00", password = ""): self.username = username self.code = code self.password = password def __str__(self): di...
# library/package semantic version __api_version__ = '1.4' __generation__ = 1
from math import ( sin, cos, tan, acos, radians, degrees, ) from datetime import ( timedelta, ) def earth_declination(n): return 23.45 * sin(radians(360/365 * (284+n))) def td(lat): dec = earth_declination(119) #TODO Change this literal cofactor = -(tan(radians(lat)) * tan(rad...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Test app.""" from __future__ import absolute_import import pytest from flask imp...
''' Tests for the lookup module. ''' import sys import unittest from io import StringIO from unittest.mock import patch from modules import rec_lookup sys.path.insert(0, "0_1_0/") class TestLookup(unittest.TestCase): '''Lokup Tests''' def setUp(self): self.nodes_json = StringIO( ...
# author: Artan Zandian # date: 2022-02-18 import tensorflow as tf from tensorflow.keras.layers import ( Input, Conv2D, MaxPooling2D, Dropout, Conv2DTranspose, concatenate, ) def encoder_block(inputs=None, n_filters=32, dropout=0, max_pooling=True): """ Convolutional e...
##parameters=add='', edit='', preview='' ## from Products.PythonScripts.standard import structured_text from Products.CMFCore.utils import getUtilityByInterfaceName from Products.CMFDefault.utils import decode from Products.CMFDefault.utils import html_marshal from Products.CMFDefault.utils import Message as _ atool =...
import pytest from django.urls import reverse from google.auth.exceptions import GoogleAuthError from crm.factories import UserSocialAuthFactory, ProjectMessageFactory from crm.models import ProjectMessage @pytest.mark.django_db def test_project_message_index(admin_app, project_message...
""" Copyright 2015 INTEL RESEARCH AND INNOVATION IRELAND 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...
from django.contrib.auth import authenticate from django.test import TestCase from django.urls import resolve from .models import User from .views import index_view, dashboard_view from django.contrib.auth.views import LoginView, LogoutView from django.contrib.auth.decorators import login_required class UserLoggedInT...
""" Example Vis Receive workflow """ # pylint: disable=C0103 import logging import ska_sdp_config import os # Initialise logging and configuration logging.basicConfig() log = logging.getLogger('main') log.setLevel(logging.INFO) config = ska_sdp_config.Config() # Find processing block configuration from the configur...
# coding:utf-8 from django.contrib.auth import authenticate,login,logout from django.shortcuts import render_to_response from django.contrib.auth.decorators import login_required, permission_required,user_passes_test from django.views.decorators.csrf import csrf_exempt from django.shortcuts import get_object_or_404 fro...
import random import numpy as np a = [5, -1, 0, -1, 2] b=-9 if sum(a) > 3 and b < -1: print(True)
from keras.callbacks import TensorBoard import tensorflow as tf from keras.callbacks import EarlyStopping, ModelCheckpoint from exercise_performance_scorer.data_creator import ExercisePerformanceDataCreator from exercise_performance_scorer.model import ExercisePerformanceModel class ExercisePerformanceTrainer: de...
from urllib.parse import urlparse from app import logger import requests class ControllerService: def init_app(self, app): return def send_command(self, gate, command='open', conditional=False): try: if gate.type == 'gatekeeper': if command == 'open' and not conditional: requests....
from quart import Blueprint home = Blueprint("home", __name__) @home.route("/") def index(): """Home view. This view will return an empty JSON mapping. """ return {}
from django.contrib import admin from froide.helper.admin_utils import ForeignKeyFilter class FollowerAdmin(admin.ModelAdmin): raw_id_fields = ( "user", "content_object", ) date_hierarchy = "timestamp" list_display = ("user", "email", "content_object", "timestamp", "confirmed") li...
""" @author: Viet Nguyen <nhviet1009@gmail.com> """ import cv2 import numpy as np from collections import OrderedDict # https://github.com/tensorflow/datasets/blob/master/tensorflow_datasets/image_classification/quickdraw_labels.txt # Rule: key of category = index -1, with index from the link above CLASS_IDS = Ordere...
import json import os TEST_FILE_BASE_PATH = 'tests' def __test_pages(app): testapp = app.test_client() pages = ('/') for page in pages: resp = testapp.get(page) assert resp.status_code == 200 def test_nearest_stations_mapper(): from transporter.utils import NearestStationsMapper ...
import unittest from pyalink.alink import * import numpy as np import pandas as pd class TestPrintStreamOp(unittest.TestCase): def test_printstreamop(self): df = pd.DataFrame([ [0, "abcde", "aabce"], [1, "aacedw", "aabbed"], [2, "cdefa", "bbcefa"], [3, "bdefh...
from sqlalchemy import * from sqlalchemy.orm import relationship, validates from db import db class ConfigTemplate(db.Model): __tablename__ = "config_template" id = Column(String, primary_key=True) doc = Column(Text, nullable=False) language_id = Column(String, ForeignKey('language.id')) ser...
import random import logging from . import scheme __all__ = ('MTProtoSessionData',) log = logging.getLogger(__package__) class MTProtoSessionData: def __init__(self, id): if id is None: id = random.SystemRandom().getrandbits(64) log.debug('no session_id provided,...
import argparse import torch import os from tqdm import tqdm from datetime import datetime import torch.nn as nn import torch.utils.data as data from torch.utils.tensorboard import SummaryWriter import deepab from deepab.models.PairedSeqLSTM import PairedSeqLSTM from deepab.util.util import RawTextArgumentDefaultsHelp...
from flask_wtf import FlaskForm as Form from wtforms import StringField from wtforms.validators import DataRequired class LoginForm(Form): username = StringField('username', validators=[DataRequired()]) password = StringField('password', validators=[DataRequired()])
import os import json import numpy as np import matplotlib.pyplot as plt def compute_iou(box_1, box_2): ''' This function takes a pair of bounding boxes and returns intersection-over- union (IoU) of two bounding boxes. ''' iou = np.random.random() width = min(box_1[2], box_2[2]) - max(box_1[0],...
# # Project: # glideinWMS # # File Version: # # Description: # This module implements functions and classes # to handle forking of processes # and the collection of results # # Author: # Burt Holzman and Igor Sfiligoi # import cPickle import os import time import select from pidSupport import register_sighan...
from click import Option from preacher.app.cli.executor import PROCESS_POOL_FACTORY, THREAD_POOL_FACTORY from preacher.app.cli.option import LevelType, ExecutorFactoryType from preacher.core.status import Status def test_level_type(): tp = LevelType() param = Option(["--level"]) assert tp.get_metavar(pa...
# Represents smallest unit of a list with value, reference to succeding Node and referenece previous Node class Node(object): def __init__(self, value, succeeding=None, previous=None): pass class LinkedList(object): def __init__(self): pass
## @package csnListener # Definition of observer pattern related classes. class Event: """ Generic event class. """ def __init__(self, code, source): self.__code = code self.__source = source def GetCode(self): return self.__code def GetSource(self): return self._...
#code for feature1
import unittest import pytest from botocore.exceptions import ClientError from localstack import config from localstack.utils.aws import aws_stack from localstack.utils.common import short_uid from .lambdas import lambda_integration from .test_integration import PARTITION_KEY, TEST_TABLE_NAME TEST_STREAM_NAME = lam...
import json import os import tkinter as tk def cancelclick(): exit(0) class GUI: def okclick(self): data = {"url": self.urlentry.get(), "telegramAPIKEY": self.apikeyentry.get(), "telegramCHATID": self.chatidentry.get(), "databaseFile": self.databaseent...
import io from collections import deque from concurrent.futures import ThreadPoolExecutor import numba from bampy.mt import CACHE_JIT, THREAD_NAME, DEFAULT_THREADS from . import zlib from ...bgzf import Block from ...bgzf.reader import BufferReader, EmptyBlock, StreamReader, _Reader as __Reader @numba.jit(nopython=...
"""test format Revision ID: b45b1bf02a80 Revises: a980b74a499f Create Date: 2022-05-11 22:31:19.613893 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'b45b1bf02a80' down_revision = 'a980b74a499f' branch_labels = None depends_on = None def upgrade(): # ##...
from myhdl import * import random from random import randrange from .alu import def_alu from .ctrl import def_ctrl random.seed(4) def test_ctrl(): """Test bench for the ALU control. """ clk = Signal(bool(0)) reset = ResetSignal(0, active=1, async=True) alu_op = Signal(intbv(0)[2:]) func...
import asyncio import logging from datetime import datetime, timedelta from .login import BiliUser from .api import WebApi, medals, get_info, WebApiRequestError logging.basicConfig( level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s" ) logger = logging.getLogger("dailyclockin") cla...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2016-2017 China Telecommunication 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/lice...
import os from awacs.aws import Policy, Allow, Statement, Principal, Action from cfn_encrypt import Encrypt, EncryptionContext, SecureParameter, GetSsmValue from troposphere import (Template, iam, GetAtt, Join, Ref, logs, Output, Sub, Parameter, awslambda, Base64, Export) from sys import argv...
# Copyright 2016 - Nokia # # 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, sof...
import os import pandas as pd import glob import random import shutil INDEX = { 'Shift_png':0, 'Random_png':1, 'Original_png':2, 'Expand_png':3, 'Contract_png':4 } def make_label_csv(input_path,csv_path,mid_dir=None): info = [] for subdir in os.scandir(input_path): index = INDEX...
# coding=utf-8 import numpy as np from time import time from aux import * ''' Obre un fitxer a partir del seu nom i guarda cada una de les seves línies en cada posició d'una llista Paràmetres: - fileName: Nom del fitxer que es vol obrir. Return: - llista amb les paraules que conformen la llista Swadesh d'un id...
def swap_case(s): swapped_s = '' for letter in s: swapped_s += letter.lower() if letter.isupper() else letter.upper() return swapped_s if __name__ == '__main__': s = input() result = swap_case(s) print(result)
# 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 u...
from os.path import join import matplotlib.pylab as plt import numpy as np from matplotlib.backends.backend_pdf import PdfPages from sklearn.metrics import roc_curve, auc import src.utils from src.methods.methods import good_methods as methods from src.methods.methods import mutliple_time_series_combiner from src.rea...
#!/usr/bin/env python # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Defines functionality for pipelined execution of interfaces The `EngineBase` class implements the more general view of a task. .. testsetup:: # Chan...
from netCDF4 import Dataset #------------------------------------------------------------------------------- def set_difference_fields(): files = {"./output_hex_wachspress_0082x0094_120/output.2000.nc": ["./output_hex_pwl_0082x0094_120/output.2000.nc", "./output_hex_weak_0082x0094_120/...
import imp import librosa import numpy as np from keras.models import load_model genres = {0: "metal", 1: "disco", 2: "classical", 3: "hiphop", 4: "jazz", 5: "country", 6: "pop", 7: "blues", 8: "reggae", 9: "rock"} song_samples = 660000 def load_song(filepath): y, sr = librosa.load(filepath...
""" Tests for the StarCluster Job """ import sure from mock import Mock from .fixtures import * from metapipe.models import sge_job def test_qstat_queued(): j = sge_job.SGEJob('', None) sge_job.call = Mock(return_value=sge_job_qstat_queued) j.is_queued().should.equal(True) def test_qstat_running(): ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def initial_log_action(apps, schema_editor): LogAction = apps.get_model('logs', 'LogAction') action, created = LogAction.objects.get_or_create( name='USER_CREATE', ) action.template = 'Use...
__author__ = 'Neil Butcher' from Institution import InstitutionSavingObject
import sys import os.path def main(): sys.argv[:] = sys.argv[1:] # Must rewrite the command line arguments progname = sys.argv[0] sys.path.insert(0, os.path.dirname(progname)) with open(progname, 'rb') as fp: code = compile(fp.read(), progname, 'exec') globs = { '__file__' : progna...
from __future__ import unicode_literals import os import shutil import subprocess import sys import optparse import datetime import time sys.path[:0] = ['.'] from yt_dlp.utils import check_executable try: iterations = str(int(os.environ['ZOPFLI_ITERATIONS'])) except BaseException: iterations = '30' parser ...
import json from django.http.response import HttpResponseRedirect, HttpResponse from django.shortcuts import render_to_response from django.urls.base import reverse from lykops.views import Base class Report(Base): def summary(self,request): result = self._is_login(request) if result[0] : ...
## # 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, software # distributed under the...
""" Loader for Maya api sub-package """ from __future__ import absolute_import from __future__ import print_function from __future__ import division # this can be imported without having maya fully initialized from .allapi import *
#!/usr/bin/python # # Copyright (c) 2012 Mikkel Schubert <MSchubert@snm.ku.dk> # # 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 #...
import sys import srvdb db = srvdb.SrvDb("./pdb-aggregator.db") file = sys.argv[1] print(file) with open(file) as f: content = f.read().splitlines() print(content) ips = [] for ip in content: if ip not in ips: print("Adding node {}".format(ip)) db.add_node(ip, False, 0, "") ips.ap...
# Copyright (c) 2020 PaddlePaddle 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 appli...
from output.models.nist_data.list_pkg.qname.schema_instance.nistschema_sv_iv_list_qname_pattern_2_xsd.nistschema_sv_iv_list_qname_pattern_2 import NistschemaSvIvListQnamePattern2 __all__ = [ "NistschemaSvIvListQnamePattern2", ]
#!/usr/bin/env python3 from datetime import datetime, timedelta from math import floor import sys from time import perf_counter from betterprint.betterprint import bp, bp_dict from modules.notations import byte_notation from modules.createfolder import folder_logic, folder_stat_reset from betterprint.colortext import...
# https://www.hackerrank.com/challenges/s10-geometric-distribution-2/problem # Enter your code here. Read input from STDIN. Print output to STDOUT x,y = map(int, input().split()) p = x/y n = int(input()) answer = 0 for z in range(1,n+1): temp = (1-p)**(z-1) * p answer = answer + temp print(round(answer,3))
# Generated by Django 3.0 on 2021-07-21 11:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wwwrate', '0007_auto_20210720_1450'), ] operations = [ migrations.AlterModelOptions( name='project', options={'orderin...