text
stringlengths
1
927k
""" This project demonstrates NESTED LOOPS (i.e., loops within loops) in the context of SEQUENCES OF SUB-SEQUENCES. Authors: David Mutchler, Vibha Alangar, Matt Boutell, Dave Fisher, Mark Hays, Amanda Stouder, Aaron Wilkin, their colleagues, and Nicholas Snow. """ # Done: 1. PUT YOUR NAME IN THE ABO...
# 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 ...
""" GetOrdersFunction """ import os from typing import Optional import boto3 from aws_lambda_powertools.tracing import Tracer # pylint: disable=import-error from aws_lambda_powertools.logging import logger_setup, logger_inject_lambda_context # pylint: disable=import-error from ecom.apigateway import iam_user_id, resp...
import torch import torch_tensorrt.fx.tracer.acc_tracer.acc_ops as acc_ops from parameterized import parameterized from torch.testing._internal.common_utils import run_tests from torch_tensorrt.fx.tools.common_fx2trt import AccTestCase class TestEqConverter(AccTestCase): @parameterized.expand( [ ...
#!/usr/bin/env python3 # Template post-processing script for PeleLM convergence analysis # Must be used after multirun.py script # Input are limited by the regression framework. # Usage: # ./pprocConvOrder.py --pproc_exec prog.exe --test_name DummyTest # Input: # * --pproc_exec: the processing executable path # ...
import os import time from copy import deepcopy from shutil import copyfile from unittest.mock import patch import pytest from pysqlcipher3 import dbapi2 as sqlcipher from rotkehlchen.assets.asset import Asset, EthereumToken from rotkehlchen.constants import YEAR_IN_SECONDS from rotkehlchen.constants.assets import A_...
#!/usr/bin/env python # ----------------------------------------------------------------------- # # Copyright 2017, Gregor von Laszewski, Indiana University # # # # Licensed under the Apache License, Version 2.0 (the "License"); you ...
from gui.rejuv_gui import RejuvGUI from controller import Controller ''' Program: Rejuvenate Author: Drew Crawford Last Date Modified: 12/14/21 Purpose: The is program will update installed addons from the game The Elder Scrolls Online. Input: The uesr...
import torch import torch.nn as nn import torchvision def Conv3x3ReLU(in_channels,out_channels): return nn.Sequential( nn.Conv2d(in_channels=in_channels,out_channels=out_channels,kernel_size=3,stride=1,padding=1), nn.ReLU6(inplace=True) ) def locLayer(in_channels,out_channels): return nn.S...
import unittest2 import webtest import json import webapp2 from datetime import datetime from google.appengine.ext import ndb from google.appengine.ext import testbed from consts.event_type import EventType from controllers.api.api_team_controller import ApiTeamController, ApiTeamEventsController, ApiTeamMediaContr...
import os from setuptools import setup from pyforrst import __version__ setup( name='pyforrst', version=__version__, author='PA Parent', author_email='paparent@paparent.me', description='Python interface to Forrst API', long_description=file( os.path.join( os.path.dirname(_...
# 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 __future__ import absolute_import from __future__ import division # Copyright (c) 2010-2015 openpyxl """Manage Excel date weirdness.""" # Python stdlib imports import datetime from datetime import timedelta, tzinfo import re from jdcal import ( gcal2jd, jd2gcal, MJD_0 ) from openpyxl.compat import ...
# -*- coding: utf-8 -*- """Public forms.""" from flask_wtf import Form from wtforms import PasswordField, StringField from wtforms.validators import DataRequired from xixi.user.models import User class LoginForm(Form): """Login form.""" username = StringField('Username', validators=[DataRequired()]) pas...
from sense_hat import SenseHat import psycopg2 import numpy as np import time sense = SenseHat() sense.set_imu_config(True, False, False) # compass, not gyro, not accel database = "watermonitor" try: try: conn = psycopg2.connect( user="pi", password="piwater", host="1...
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="panvalidator", version="0.0.2", author="Gennady Denisov", author_email="denisovgena@gmail.com", description="Primary Account Number validation tool", long_description=long_description,...
# pylint: disable=missing-docstring import copy import itertools import functools import pathlib from collections import namedtuple from contextlib import suppress import pytest from rollit.runtime import Runner from rollit.runtime.towers import IncrementalTower from rollit.util import is_valid_iterable try: fro...
from dataclasses import dataclass from flask import render_template, request, redirect, url_for, flash from flask_login import login_required, current_user from app import alias_utils from app.api.serializer import get_alias_infos_with_pagination_v3, get_alias_info_v3 from app.config import ALIAS_LIMIT, PAGE_LIMIT fr...
#====================== BEGIN GPL LICENSE BLOCK ====================== # # 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 Software Foundation; either version 2 # of the License, or (at your option) any later vers...
from django.apps import AppConfig class CqaFrontendConfig(AppConfig): name = 'CQA_FRONTEND'
""" ???+ note "Child classes which are `functionality`-by-`feature` products." This could resemble template specialization in C++. """ from .functionality import ( BokehDataFinder, BokehDataAnnotator, BokehSoftLabelExplorer, BokehMarginExplorer, BokehSnorkelExplorer, ) from .feature import Bokeh...
from mbi.domain import Domain from mbi.dataset import Dataset from mbi.factor import Factor from mbi.graphical_model import GraphicalModel from mbi.inference import FactoredInference
""" .. module:: Katna.image :platform: OS X :synopsis: This module has functions related to smart cropping """ import os import cv2 import numpy as np from Katna.decorators import FileDecorators from Katna.feature_list import FeatureList from Katna.filter_list import FilterList from Katna.crop_extractor import ...
def sqrt(number): return number**0.5
""" PASSENGERS """ numPassengers = 2718 passenger_arriving = ( (5, 3, 5, 3, 2, 0, 8, 7, 6, 3, 0, 0), # 0 (3, 4, 8, 1, 1, 0, 3, 6, 9, 6, 1, 0), # 1 (6, 12, 2, 2, 1, 0, 5, 9, 1, 4, 4, 0), # 2 (3, 10, 4, 1, 2, 0, 11, 6, 5, 2, 0, 0), # 3 (3, 4, 9, 3, 4, 0, 5, 7, 4, 4, 1, 0), # 4 (5, 11, 7, 3, 0, 0, 4, 12, 3, 2...
from pygame.math import Vector2 from Balance.game_objects.mesh_objects.star import Star from pygame import mixer from pygin.time import Time from pygin.game_object import GameObject from random import uniform as randfloat from pygin.basic_objects.text import Text from pygin.material import Material from pygin.color imp...
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 """ Top-level scarab module """ __version__ = '0.1.3'
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ author: Chris Brasnett, University of Bristol, christopher.brasnett@bristol.ac.uk """ import numpy as np from QIIDderivative import derivative def nominator(F_x, F_y, F_z, F_xx, F_xy, F_yy, F_yz, F_zz, F_xz): m = np.array([[F_xx, F_xy, F_xz, F_x], ...
""" WSGI config for allauthdemo 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/2.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_S...
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # 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 ...
# Copyright 2017 Battelle Energy Alliance, 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 or agreed t...
__author__ = 'marble_xu' import os import json import pygame as pg from source import setup, tools from source import constants as c from source.states import level_state from source.components import info, stuff, brick, box, enemy, coin if c.HUMAN_PLAYER: from source.components import player else: from sourc...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2012-2019 Snowflake Computing Inc. All right reserved. # # Feature flags feature_use_pyopenssl = True # use pyopenssl API or openssl command
from keras.applications.vgg16 import VGG16 from keras import backend as K from keras.models import Model from keras.layers import Input, BatchNormalization, Conv2D, MaxPooling2D, AveragePooling2D, concatenate, Concatenate, UpSampling2D, Activation, SpatialDropout2D, RepeatVector, Reshape from resnet50_padding_same impo...
# -*- coding: utf-8 -*- """ idfy_rest_client.models.canceled This file was automatically generated for Idfy by APIMATIC v2.0 ( https://apimatic.io ) """ class Canceled(object): """Implementation of the 'Canceled' enum. TODO: type enum description here. Attributes: OFF: TODO: type descr...
# coding=utf-8 # Copyright 2020 The HuggingFace Team. 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 requir...
def count_matches(s1, s2): ''' (str, str) -> int Return the number of positions in s1 that contain the same character at the corresponding position of s2. Precondition: len(s1) == len(s2) >>> count_matches('ate', 'ape') 2 >>> count_matches('head', 'hard') 2 ''' nu...
# -*- coding: utf-8 -*- import gsxws import phonenumbers from django import forms from datetime import date from django.conf import settings from django_countries import countries from django.core.validators import RegexValidator from django.utils.safestring import mark_safe from django.utils.translation import ugett...
from pych.extern import Chapel @Chapel() def ex_sync(): """ writeln("Starting!"); sync { begin writeln("#1 line."); begin writeln("#2 line."); begin writeln("#3 line."); begin writeln("#4 line."); begin writeln("#5 line."); } writeln("DONE!"); """ ret...
""" This script is a utility for interactively annotating data categories in the dataset manifest """ from typing import Union, List import click from fidesctl.core import parse as core_parse, api_helpers from fidesctl.core.config import FidesctlConfig from fidesctl.core.utils import get_all_level_fields from fidesl...
from copy import deepcopy from functools import partial import json from unittest import TestCase import responses from tamr_unify_client import Client from tamr_unify_client.auth import UsernamePasswordAuth from tamr_unify_client.models.dataset.resource import Dataset class TestDatasetGeo(TestCase): def setUp(...
import argparse import trimesh import numpy as np import os import glob import sys from multiprocessing import Pool from functools import partial # TODO: do this better sys.path.append('..') parser = argparse.ArgumentParser('Sample a watertight mesh.') parser.add_argument('in_folder', type=str, hel...
from __future__ import unicode_literals from future.builtins import str, super import os import datetime from django import forms from django.conf import settings from django.core.files.storage import default_storage from django.db.models.fields import Field from django.db.models.fields.files import FileDescriptor fr...
#!/usr/bin/env python3 """Reads a pre-processed table of ascents and iteratively runs a WHR model. This is just a stub; see the documentation for the climbing_ratings.__main__ module instead. """ # Copyright Contributors to the Climbing Ratings project # # Licensed under the Apache License, Version 2.0 (the "License...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Sep 9 23:11:51 2020 table line detect @author: chineseocr """ from tensorflow.keras.layers import Input, concatenate, Conv2D, MaxPooling2D, BatchNormalization, UpSampling2D from tensorflow.keras.layers import LeakyReLU from tensorflow.keras.models impor...
#!/usr/bin/env python """ Copyright 2017-2018 Fizyr (https://fizyr.com) 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 applicabl...
# coding: utf-8 from dohq_teamcity.custom.base_model import TeamCityObject # from dohq_teamcity.models.changes import Changes # noqa: F401,E501 # from dohq_teamcity.models.file_changes import FileChanges # noqa: F401,E501 # from dohq_teamcity.models.items import Items # noqa: F401,E501 # from dohq_teamcity.models...
"""Views tests for the Dropbox addon.""" import httplib as http import unittest from dropbox.exceptions import ApiError from nose.tools import assert_equal from tests.base import OsfTestCase from urllib3.exceptions import MaxRetryError import mock import pytest from addons.base.tests import views as views_testing fro...
from abc import ABC, abstractmethod from ..util.scaled_FT import scaled_fourier_transform """ MPL 2.0 License Copyright (c) 2022, Rafael de la Fuente All rights reserved. """ class DOE(ABC): @abstractmethod def __init__(self): pass @abstractmethod def get_transmittance(self, xx, yy, λ): ...
const={ 'Pi':3.14 ,'Hello':"World" } print("{} is {}".format(const['Hello'], const['Pi']))
""" WSGI config for sokoapp 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/1.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sokoapp.settings") from django.core.w...
#!/usr/bin/env python3 """Home Assistant setup script.""" from datetime import datetime as dt from setuptools import find_packages, setup import homeassistant.const as hass_const PROJECT_NAME = "Home Assistant" PROJECT_PACKAGE_NAME = "homeassistant" PROJECT_LICENSE = "Apache License 2.0" PROJECT_AUTHOR = "The Home A...
""" ASGI config for restful project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTI...
#!/usr/bin/python # # Copyright 2013 Greg Neagle # # 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 ag...
#@+leo-ver=5-thin #@+node:ekr.20160519123329.1: * @file ../plugins/QNCalendarWidget.py #@@language python """ QNCalendarWidget.py - a QCalendarWidget which shows N months at a time. Not a full QCalendarWidget implementation, just enough to work with a QDateEdit (QNDateEdit) in a particular context. Terry_N_Brown@yaho...
import discord from discord.ext import commands from discord.commands import slash_command, Option import asyncio from bot import GoModBot from discord.ui import InputText, Modal class Modal(Modal): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.add_item(InputText(label...
def convert_to_bool(string): """ Converts string to bool :param string: String :str string: str :return: True or False """ if isinstance(string, bool): return string return string in ['true', 'True', '1']
from direct.showbase.DirectObject import * from pandac.PandaModules import * from direct.task import Task from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import globalClockDelta class TimeManager(DistributedObject.DistributedObject)...
from django.apps import AppConfig class SearchKeywordConfig(AppConfig): name = 'Search_Keyword'
######## # PART 1 def dragon_step(a): """ For example, after a single step of this process, 1 becomes 100. 0 becomes 001. 11111 becomes 11111000000. 111100001010 becomes 1111000010100101011110000 """ b = [0 if x==1 else 1 for x in a] b.reverse() return a + [0] + b def check...
# -*- coding: utf-8 -*- """Descriptor to access VISA attributes. Not all descriptors are used but they provide a reference regarding the possible values for each attributes. This file is part of PyVISA. :copyright: 2014-2020 by PyVISA Authors, see AUTHORS for more details. :license: MIT, see LICENSE for more details...
# -*- coding: utf-8 -*- import pkg_resources __version__ = pkg_resources.get_distribution("papavisor").version
def main(): print "Hello World!" if __name__ == '__main__': main()
### # Copyright (c) 2005, Jeremiah Fincher # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of conditi...
import torch import torch.nn as nn import torch.nn.functional as F from tqdm import tqdm, tqdm_notebook from ml_metrics import auc from sklearn.datasets import make_classification class LogsticRegression(nn.Module): def __init__(self, in_dim, n_class): super().__init__() self.fc1 = nn.Linear(in_di...
__author__ = 'Igor Nikolaev' from model.group import Group class GroupHelper: def __init__(self, app): self.app = app group_cache = None def create(self, group): wd = self.app.wd self.open_groups_page() wd.find_element_by_name("new").click() self.fill_group_form(...
import sys import numpy as np import matplotlib.pylab as plt if __name__ == "__main__": file = open(sys.argv[1], "r") X = np.loadtxt(file) X = np.matrix(X) print(X.shape) fig, ax = plt.subplots() cax = ax.matshow(X) ax.set_xticks(range(0, X.shape[1])) ax.set_yticks(range(0, X.shape[0]...
from django.conf import settings import datetime def template_settings(request): return { 'site_name': settings.SITE_NAME, 'site_desc': settings.SITE_DESC, 'site_author': settings.SITE_AUTHOR, 'site_url': settings.SITE_URL, 'site_register': settings.ALLOW_NEW_REGISTRATIONS, ...
# Import packages import copy import pickle import socket from string import ascii_lowercase import enchant from colorama import Fore, init init(autoreset=True) d = enchant.Dict("en_US") # Read config file SOLUTION_FILE = "solution_words.json" SETTINGS_FILE = "settings.json" EMPTY = "—" HEADERSIZE = 10 # Connect t...
import sys def main(filepath): with open(filepath, 'r') as f: for line in f.readlines(): if line: line = line.strip() line = line.split(',') a = map(int, line[:4]) b = map(int, line[4:]) ...
#!/usr/bin/python3 import argparse, yaml, tempfile, os, subprocess, json, jinja2, datetime, copy, re, dnf, pprint, urllib.request, sys, koji import concurrent.futures import rpm_showme as showme from functools import lru_cache import multiprocessing, asyncio # Features of this new release # - multiarch from the grou...
# """Defaults for thread-local values """ # end_pymotw_header import random import threading import logging def show_value(data): try: val = data.value except AttributeError: logging.debug("No value yet") else: logging.debug("value=%s", val) def worker(data): show_value(data...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'targets': [ { 'target_name': 'lib_relocation_packer', 'toolsets': ['host'], 'type': 'static_library', 'dependencies': [ ...
#!/usr/bin/env python # coding: utf-8 # In[1]: import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns # In[2]: #Load breast cancer dataset from sklearn.datasets import load_breast_cancer cancer_dataset = load_breast_cancer() # In[3]: type(cancer_dataset) # In[4]: ...
import pathlib from PySide6 import QtCore, QtWidgets, QtGui import json from ffpyplayer.player import MediaPlayer from classes import DowConfig from classes import DowDatabase from classes import DowGlImage from .SequenceScriptParser import DowSequenceScriptParser class DowSlideShowManager(QtWidgets.QWidget): def __...
import numpy as np, sys, os, random, pdb, json, uuid, time, argparse from pprint import pprint import logging, logging.config from collections import defaultdict as ddict # from ordered_set import OrderedSet # PyTorch related imports import torch from torch.nn import functional as F from torch.nn.init import xavier_no...
import unittest from RegExpBuilder import RegExpBuilder class Test(unittest.TestCase): def test_startOfLine(self): regex = RegExpBuilder() regex.startOfLine() regex.exactly(1).of("p") regex = regex.getRegExp() self.assertTrue(regex.match("p") is not None) self.a...
def file_func(): return "Hi from file_func"
"""Module for testing CommandTasks.""" import os, sys import time from django.test import TestCase from norc.core.models import CommandTask, Instance, Revision from norc.core.constants import Status from norc.norc_utils import log class TestTask(TestCase): """Tests for Norc tasks.""" def run_task(self,...
result = (x for x in range(1, 34) if x % 3 == 0) result = filter(odd, result) result = map(cube, result) result = list(result) result = sum(result) / len(result)
# modify : print input # get square sum def square_sum(a,b): print('input:',a,b) return a**2+b**2 # get square diff def square_diff(a,b): print('input:',a,b) return a**2-b**2 print(square_sum(3,4)) print(square_diff(3,4))
# Copyright 2018 The Cirq Developers # # 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 ...
# -*- coding: utf-8 -*- from __future__ import with_statement, absolute_import from django.conf import settings if __name__ == '__main__': # When running this file in isolation, we need to set up the configuration # before importing 'template'. settings.configure() from datetime import date, datetime, ti...
import argparse import os.path as osp import numpy as np import torch import torch.nn.functional as F from torch.utils.data import DataLoader from feat.dataloader.samplers import CategoriesSampler from feat.models.matchnet import MatchNet from feat.utils import pprint, set_gpu, ensure_path, Averager, Timer, count_acc...
import _plotly_utils.basevalidators class YanchorValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="yanchor", parent_name="layout.scene.annotation", **kwargs ): super(YanchorValidator, self).__init__( plotly_name=plotly_name, p...
import os import unittest from stex_client.private import Private class PrivateTestCase(unittest.TestCase): def setUp(self): self.option = { 'tokenObject': { 'access_token': os.environ.get('ENV_TOKEN'), }, 'accessTokenUrl': 'https://api3.stex.com/oauth/t...
from django.apps import AppConfig class UsersAppConfig(AppConfig): name = "django_broadcast.users" verbose_name = "Users" def ready(self): """Override this to put in: Users system checks Users signal registration """ try: import users.signals #...
import tkinter as tk import matplotlib.pyplot as plt from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk data = { 'Basquet': 11, 'Futbol': 222, 'Natacion': 121, 'Esqui': 321, 'Tenis': 44 } clave = data.keys() valor = ...
from dsame.trees.common.BinarySearchTreeNode import * def is_bst(root: BinarySearchTreeNode): if not root: return True if root.left and root.left.data > root.data: return False if root.right and root.right.data < root.data: return False if not is_bst(root.left) or not is_bst(ro...
from itertools import product import numpy as np from sympy import And import pytest from conftest import skipif from devito import (ConditionalDimension, Grid, Function, TimeFunction, SparseFunction, # noqa Eq, Operator, Constant, Dimension, SubDimension, switchconfig, SubDom...
# coding: utf-8 """ Ory Kratos Welcome to the ORY Kratos HTTP API documentation! # noqa: E501 The version of the OpenAPI document: v0.5.4-alpha.1 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from ory_kratos_client.configuration import Configur...
from canari.maltego.message import * __author__ = 'Tek' __copyright__ = 'Copyright 2019, binaryedge Project' __credits__ = [] __license__ = 'GPLv3' __version__ = '0.1' __maintainer__ = 'Tek' __email__ = 'tek@randhome.io' __status__ = 'Development' __all__ = []
height = int(input()) for i in range(1,height+1): for j in range(1,height+1): if(i == 1 or j == 1 or i == height or j == height or i == j or i == height-j+1): print("*",end=" ") else: print(end=" ") print() # Sample Input :- 7 # ...
import tvm from tvm import relay from tvm.relay.ir_pass import dead_code_elimination, alpha_equal from tvm.relay.op import log, add, equal, subtract class env: def __init__(self): self.a = relay.Var("a") self.b = relay.Var("b") self.c = relay.Var("c") self.d = relay.Var("d") ...
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.20.7 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six fr...
# qubit number=4 # total number=41 import cirq import qiskit from qiskit.providers.aer import QasmSimulator from qiskit.test.mock import FakeVigo from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import ...
def add_time(start, duration, day=""): start_time = start.split() dur_time = duration.split() arr_days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] star_arr = start_time[0].split(":") dur_arr = dur_time[0].split(":") hour = int(star_arr[0]) + int(dur_arr[0]) min = int(...
from time import time start = time() num = 2000000000 for i in range(1, num+1): if num % i == 0: print(f"{i} is a factor of {num}") print(f"Time taken: {round(time()-start, 3)}s")
from __future__ import absolute_import, division import os import traceback import sys import math import urwid from netlib import odict from netlib.http import CONTENT_MISSING, Headers from . import common, grideditor, signals, searchable, tabs from . import flowdetailview from .. import utils, controller, contentvi...
# -*- coding: utf-8 -*- # # nti.webhooks documentation build configuration file, created by # sphinx-quickstart on Tue Aug 2 08:43:18 2016. # # 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. ...