text
stringlengths
2
999k
#!d:\e-commers\scripts\python.exe from django.core import management if __name__ == "__main__": management.execute_from_command_line()
from generate_data_random import generate_df_gammas_random from estimate_splink import estimate import statsmodels.api as sm settings = { "proportion_of_matches": 0.3, "link_type": "dedupe_only", "comparison_columns": [ { "col_name": "first_name", "num_levels": 3, ...
# # Autogenerated by Thrift Compiler (0.11.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from ..thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from ..thrift.protocol.TProtocol import TProtocolException from ..thrift.TRecursiv...
# -*- coding: UTF-8 -*- class UsrSap(object): ''' Class used for /usr/sap attributes. Attributes and methods are passed to other LVM Classes. ''' name = 'usrsap' vg_args = '' lv_size = '-l 100%VG' lv_args = lv_size fs_type = 'ext3' fs_mount_point = '/usr/sap' fs_a...
# Copyright (c) 2021 Institute for Quantum Computing, Baidu Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
Graphical output for comparison of models - Bigram, Trigram and Quadgram Line Plots for Probability Vs Perplexity, Number of Words Vs Perplexity, Number of conditions, Number of words predicted etc. Predicts upto ten (different or same) words following a sequence of words for language models Results may vary for predic...
#!/usr/bin/env python # Adam Bowen - Apr 2016 # This script refreshes a vdb # Updated by Corey Brune Oct 2016 # requirements # pip install --upgrade setuptools pip docopt delphixpy.v1_8_0 # The below doc follows the POSIX compliant standards and allows us to use # this doc to also define our arguments for the script. ...
import binascii import json import os from base64 import urlsafe_b64encode from urllib.parse import urlencode, urlparse from django.conf import settings from django.http import HttpResponseRedirect from django.urls import reverse from django.utils.encoding import force_str from django.utils.http import is_safe_url i...
from __future__ import unicode_literals from .common import InfoExtractor class EroProfileIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?eroprofile\.com/m/videos/view/(?P<id>[^/]+)' _TEST = { 'url': 'http://www.eroprofile.com/m/videos/view/sexy-babe-softcore', 'md5': 'c26f351332edf23e1e...
from gradle import parseGradle,parserDefs import re from build_utils import * import maven as mvn import os.path as path from manifest import Manifest class CyclicException(Exception): pass class Dependency(): globalDeps = {} def __init__(self,name): super().__init__() self.name=name ...
# Copyright (c) 2019-2021 - for information on the respective copyright owner # see the NOTICE file and/or the repository # https://github.com/boschresearch/pylife # # 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 co...
# Copyright 2020 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Lint as: python3 # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
# clear message buffer import pika class RpcClear(object): def __init__(self): self.connection = pika.BlockingConnection(pika.ConnectionParameters(host='localhost')) self.channel = self.connection.channel() self.channel.queue_declare(queue='my_rpc_queue') self.channel.basic_qos(p...
#!/usr/bin/env python """Test the process list module.""" from __future__ import absolute_import from __future__ import unicode_literals import os from grr_response_core.lib import flags from grr_response_core.lib.rdfvalues import client as rdf_client from grr_response_core.lib.rdfvalues import client_network as rdf_...
import pytest from notifications import email class NotificationMissingProperties(email.NotificationBase): pass def test_notification_base_rejects_if_required_properties_missing(): with pytest.raises(TypeError) as exc_info: NotificationMissingProperties() assert exc_info.exconly() == ( ...
import matplotlib.pyplot as plt import datetime import pandas as pd date_config = '%m/%d/%y' # separation character start_line = "//-" # if the lines contains any word on this list, they will be omitted forbidden_keywords = ["added", "left", "changed", "created", "removed", "Creaste", "Añadiste", "Eliminaste", ...
import tensorflow as tf import os import cv2 # tf.python.gfile.GFile model_name='detection/model.pb' f=tf.python.gfile.FastGFile(model_name,'rb')#['image'] ['output/boxes', 'output/scores', 'output/labels'] # a=tf.compat.v1.GraphDef() graph_def=tf.GraphDef() print(graph_def) graph_def.ParseFromString(f.read()) return_e...
# encoding: utf-8 # Natural Language Toolkit: Senna POS Tagger # # Copyright (C) 2001-2019 NLTK Project # Author: Rami Al-Rfou' <ralrfou@cs.stonybrook.edu> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ Senna POS tagger, NER Tagger, Chunk Tagger The input is: - path to the directory that con...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: Jonathan S. Prieto from atxt.check import check_os from kitchen.text.converters import to_unicode from log_conf import Logger log = Logger.log def encoding_path(s): s = s.strip() if check_os() == 'Windows': return to_unicode(s, 'utf-8') s = ...
import cv2, time, base64 import numpy as np import requests import datetime import os import playsound url = "http://admin:a@192.168.29.179/IMAGE.JPG" #replace this url with your url for an image #the next two lines are the login headers. Replace it with your login. If you dont know it, it probebly is what is put down...
import pandas as pd import numpy as np import plotly.graph_objects as go import dash dash.__version__ import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input,Output import dash_bootstrap_components as dbc import plotly.io as pio import os print(os.getcwd()) df_input_l...
import multiprocessing from ekstep_data_pipelines.common import BaseProcessor from ekstep_data_pipelines.common import CatalogueDao from ekstep_data_pipelines.common.file_system.gcp_file_systen import GCPFileSystem from ekstep_data_pipelines.common.utils import get_logger from ekstep_data_pipelines.data_marker.constan...
from .clusterer import Clusterer from .pmap import PMap
import tweepy import time import random auth = tweepy.OAuthHandler('7docZNy3gfhJZKeQJWYvKK1x2', '3tTcpkhR23oefPiqqJ13OT1OAULlNfgVVvgrR32xiXUnV1eEBR') auth.set_access_token('1300088460619984897-I05axT8KWk9SWOFbW6kREgvEhEQnil', 'gaIZVjAod2lUUbS5Gre5SyLaLVDAVDJVHy0nBNamZeE7Y') api = tweepy.API(auth, wait_on_rate...
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_str, compat_urllib_parse_unquote, ) from ..utils import ( int_or_none, parse_iso8601, strip_or_none, try_get, unescapeHTML, urljoin, ) class KinjaEmbedIE(...
from django.db import models from django.utils.translation import gettext_lazy as _ from colorsys import hsv_to_rgb from ogc.models.layer import Layer import json import pandas as pd def hsv2hex(h,s=1,v=1): h = 0.6667 * (1.0 - h) # reverse colors and clip at 245 degrees (blue) r,g,b = map(lambda c: int(c*255),...
def has_subpattern(string): count=1 while count<len(string)//2: if len(string)%count!=0: count+=1 continue temp=string[:count] flag=True for i in range(count, len(string), count): if string[i:i+count]!=temp: flag=False ...
import tensorflow as tf class BackwardKLDivergence(tf.keras.metrics.KLDivergence): def __init__(self, name='backward_kl_divergence', **kwargs): """ Custom Keras metric that calculates backward KL-Divergence, which is just the KLDivergence metric class in Keras with the y_true and y_pred p...
import sys import syslog from abc import ABC, abstractmethod class AbstractLogger(ABC): @abstractmethod def log(self): pass class FileLogger(AbstractLogger): def __init__(self, file): self.file = file def log(self, message): self.file.write(message + '\n') self.file....
# -*- coding: utf-8 -*- """ ------------------------------------------------- File Name: setting.py Description : 配置文件 Author : JHao date: 2019/2/15 ------------------------------------------------- Change Activity: 2019/2/15: -------------------------------------...
import random import copy import math import time from tkinter.constants import W import numpy as np def Print(worduko): for i in range(9): for j in range(9): print(worduko[i][j], end=' '), print('\n') def count_conflict(worduko,irow,icol): # print(worduko) # print...
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-28 01:12 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('upload', '0025_auto_20170728_0016'), ] operations = [ migrations.AlterField...
from .link_preview import LinkPreview, LinkDetailType from .helpers.content_type import ContentType from .helpers.image_asset import ImageAsset from .helpers.link_details import LinkDetails, YouTubeDetails, TwitterDetails
# # This file is part of AceQL Python Client SDK. # AceQL Python Client SDK: Remote SQL access over HTTP with AceQL HTTP. # Copyright (C) 2021, KawanSoft SAS # (http://www.kawansoft.com). All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in comp...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from base import MyZotero, echo, fetch_github_metadata, lstrip_doi, strip_braces zot = MyZotero() collection = zot.get_collection( "github-stars-ashwinvis" ) # Get everything items = zot.everything(zot.collection_items(collection["key"])) apply_filters = { # "Cr...
# 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 ...
""" File: boggle.py Name: Justin Huang ---------------------------------------- TODO: Boggle Mission """ # This is the file name of the dictionary txt file # we will be checking if a word exists by searching through it FILE = 'dictionary.txt' dic_list = [] time = 0 def main(): """ TODO: """ boggle = [] read_dic...
from .directory import Directory
import json import zmq import numpy as np import modelparameters as mp import worker as wrk import reward #Executed at the loading of script def initScript(): # Get parameters and inputs lists GDict['parameters'] = mp.ModelParameters() GDict['parameters'].make_param(GObject, GSolver, GDict) GDic...
import pytest from hon.book import Book from hon.filters import relative_path @pytest.fixture def philosophy_book(): book = Book( name='Groundwork of the Metaphysic of Morals', author='Immanual Kant', path='/hon/src' ) return book @pytest.mark.parametrize('page_path, expected', [...
# Copyright 2009 Google 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 to in writing, ...
#!/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. from habitat.core.dataset import Dataset from habitat.core.registry import registry def _try_register_r2r_vln_dataset()...
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-07-06 21:18 from __future__ import unicode_literals from __future__ import absolute_import from django.db import migrations from corehq.form_processor.models import XFormInstanceSQL, XFormOperationSQL from corehq.sql_db.operations import RawSQLMigration mi...
# 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 required by applicabl...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Jun 14 12:13:34 2020 @author: frederik """ import rospy #import video_stream_opencv import cv2 import sys import numpy as np from std_msgs.msg import Bool from sensor_msgs.msg import Image from cv_bridge import CvBridge, CvBridgeError init = 1 backgro...
import selectors import socket import struct class TcpServer: def __init__(self, host, port): self.socket = socket.socket() self.socket.bind((host, port)) self.socket.listen(100) self.socket.setblocking(False) self.selector = selectors.DefaultSelector() def read(con...
#!/usr/bin/env python import rospy import crazyflie import time import uav_trajectory if __name__ == '__main__': rospy.init_node('test_high_level') cf_name = "cf1" cf = crazyflie.Crazyflie(cf_name, '/vicon/'+cf_name+'/'+cf_name) cf.setParam("commander/enHighLevel", 1) cf.setParam("stabilize...
# This file is part of QuTiP: Quantum Toolbox in Python. # # Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # ...
#!/usr/bin/env python3 """ Author : Dawei Zhang <davyzhang325@gmail.com> Date : 2021-06-23 Purpose: Rock the Casbah """ import argparse # -------------------------------------------------- def get_args(): """Get command-line arguments""" parser = argparse.ArgumentParser( description='Gashlycrumb',...
import numpy as np import sys from .reference_signal import * from .helper import * class Amplifier: """ A software Lock-in Amplifier """ def __init__(self, cutoff, pbar = True): """ Takes in a cutoff frequency (float) as an input as well as whether or not to display the progress bar. """ self.cutoff ...
#! /usr/bin/env python # -*- coding: utf-8 ''' Python implementation of Krippendorff's alpha -- inter-rater reliability (c)2011-17 Thomas Grill (http://grrrr.org) Python version >= 2.4 required ''' from __future__ import print_function import get_data_from_MT try: import numpy as np except ImportError: np = ...
import setuptools # meta-data NAME = 'tjsp' DESCRIPTION = 'Package used to scrape and parse decisions from TJ-SP' URL = 'https://github.com/abjur/uncabj' EMAIL = 'andre.assumpcao@gmail.com' AUTHOR = 'Andre Assumpcao' REQUIRES_PYTHON = '>=3.6.0' VERSION = '0.1' # r...
import logging import numpy as np import pandas as pd from fastapi import APIRouter from pydantic import BaseModel, Field import pickle with open("app/api/vec", 'rb') as file: vec = pickle.load(file) with open("app/api/near", 'rb') as file: near = pickle.load(file) log = logging.getLogger(__name__) router = ...
# Generated by Django 3.0.2 on 2020-01-19 17:30 import common.fields from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_M...
from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import numpy as np from scipy import special def deg2rad(deg): return deg / 180.0 * np.pi def rad2deg(rad): return rad * 180.0 / np.pi def AnBnfun(n, radius, x0, rho, rho1, I=1.0): con...
from math import pi, sqrt, exp import itertools import plotly.express as px import numpy as np import multiprocessing def clamp(lo, hi, x): return max(lo, min(hi, x)) def mix(lo, hi, x): return (hi-lo)*x+lo def step(lo, hi, x): return (x-lo)/(lo-hi) def rho(x,z,r): return exp(r-sqrt(x**2+z**2)) de...
import unittest import redis import pandas as pd from app.demo import DataGenerator class DataGeneratorTest(unittest.TestCase): @classmethod def setUpClass(cls): # Set up redis connection cls.redis_conn = redis.Redis(host="localhost", port="6379") if not cls.redis_conn.ping(): ...
""" 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 use this ...
from __future__ import division import os import torch import torchvision.transforms as transforms import torchvision.transforms.functional as F from torch._utils_internal import get_file_path_2 import unittest import math import random import numpy as np from PIL import Image try: import accimage except ImportErro...
import argparse import os import time import pickle import torch import torch.utils.data import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import numpy as np from tensorboardX import SummaryWriter from torch.optim.lr_scheduler import StepLR from model.dataset import * from model.gpd im...
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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 applicab...
import os # from django.conf import settings from django.template import Context, Template from django.test import override_settings from ..forms import NewMessageForm, NewMessageFormMultiple from ..hooks import hookset from ..models import Message, Thread from .test import TestCase class TestCaseMixin(object): ...
from tensorflow.python.keras.engine.training import Model from tensorflow.keras.optimizers import Adam, SGD from models.nets import * from helper.losses import * import math def sr_gan(hr_shape, upscale_num, gen_loss='vgg'): if gen_loss == 'vgg': loss_fun = vgg_loss(hr_shape) elif gen_loss == 'mse': ...
import torch.nn as nn from rflib.cnn import ConvModule from rfvision.models.builder import HEADS from rfvision.components.utils import build_linear_layer from .bbox_head import BBoxHead @HEADS.register_module() class ConvFCBBoxHead(BBoxHead): r"""More general bbox head, with shared conv and fc layers and two opt...
from __future__ import absolute_import from . import np_utils from . import generic_utils from . import data_utils from . import io_utils from . import conv_utils # Globally-importable utils. from .io_utils import HDF5Matrix from .io_utils import h5dict from .data_utils import get_file from .data_utils import Sequence...
## @file # This file is used to parse meta files # # Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR> # (C) Copyright 2015-2018 Hewlett Packard Enterprise Development LP<BR> # This program and the accompanying materials # are licensed and made available under the terms and conditions of the ...
# coding=utf-8 # Copyright 2022 The Balloon Learning Environment 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 require...
from functools import wraps def timer(func): @wraps(func) #copies metadata, id, docstring etc def wrapper(*args, **kwargs): import time t0 = time.perf_counter() result = func(*args, **kwargs) tf = time.perf_counter() print(func.__name__, tf-t0) ...
import json from tark.entities.models import rule, rule_variable, rule_equation class RuleManager(object): @classmethod def create_rule(cls, name, lhs, comparator, rhs, description=''): #TODO:: Add validation return rule.Rule.create(name=name, lhs=lhs, comparator=comparator, rhs=rhs, descrip...
# -*- coding: utf-8 -*- # Copyright (c) 2015, indictrans and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe.model.naming import make_autoname from datetime import datetime, timedelta from frappe...
# 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 __...
from django.conf import settings from django.core.cache import caches from django.utils import timezone from django_cron.backends.lock.base import DjangoCronJobLock class CacheLock(DjangoCronJobLock): """ One of simplest lock backends, uses django cache to prevent parallel runs of commands. """ DE...
import tensorflow as tf import time from . import help from . import flow from .ops import op_create, identity from .ops import HEADER, LINE from .framework import create_framework from ..dark.darknet import Darknet import json import os class TFNet(object): _TRAINER = dict({ 'rmsprop': tf.train.RMSPropOptimizer, ...
# Copyright (c) 2013-2014 OpenStack Foundation # 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 # # Un...
from fastapi import FastAPI app = FastAPI() @app.get("/") async def read_main(): return {"msg": "Hello World"}
# Generated by Django 3.1.7 on 2021-05-29 15:55 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('booksmanager', '0038_auto_20210529_1851'), ] operations = [ migrations.AddField( model_name='toreadbook', name='curr...
from .norms.api import * from .losses.api import * from .sampler import selective_sampler_MH
# -*- coding: utf-8 -*- ''' Routines to set up a minion ''' # Import python libs from __future__ import absolute_import import os import imp import sys import salt import time import logging import inspect import tempfile from collections import MutableMapping # Import salt libs from salt.exceptions import LoaderErro...
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- from __future__ import absolute_import from __future__ import division f...
"""Alexa message handlers.""" import logging import math from homeassistant import core as ha from homeassistant.components import ( camera, cover, fan, group, input_number, light, media_player, timer, vacuum, ) from homeassistant.components.climate import const as climate from home...
"""Create a topic and a direct message.""" import logging from math import ceil from .. import pub from ..address import Address from ..commands import commands from ..constants import RampRate from ..topics import ( ASSIGN_TO_ALL_LINK_GROUP, ASSIGN_TO_COMPANION_GROUP, BRIGHTEN_ONE_STEP, DELETE_FROM_AL...
#!/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. r"""Implements tasks and measurements needed for training and benchmarking of ``habitat.Agent`` inside ``habitat.Env``. "...
import frappe @frappe.whitelist() def run(dashboard_name=None, filters=None): if not dashboard_name: frappe.throw('Dashboard Name Required') dashboard_doc = frappe.get_doc('Dashboard Configuration', dashboard_name) if not dashboard_doc: frappe.throw('Dashboard %s not found', dashboard_n...
# -*- coding: utf-8 -*- import io import os import requests import sqlite3 import sys import zipfile class OpenCNLImporter(object): """ Essa classe é responsável por baixar uma base atualizada diretamente da ANATEL e convertê-la para um banco de dados SQLite3. """ def __init__(self, caminho_da_ba...
__version__ = '0.1.6' from docxlatex.docxlatex import Document from docxlatex import tagparsers from docxlatex import cleaners
import pandas as pd import numpy as np from dateutil.parser import parse import time # 生成样例数据 table = {} table['time'] = ['2021-01-04 09:30', '2021-02-10 09:30', '2021-03-03 09:30', '2021-03-29 09:30', '2021-04-19 09:30', '2021-05-31 09:30'] table['value'] = [1000, 1005, 1018, 1025, 1030, 1020] table['price_H...
""" * * Author: Juarez Paulino(coderemite) * Email: juarez.paulino@gmail.com * """ a=[*open(0)][1] s={} r=0 for x,y in [*zip(a,a[1:])][::2]: s[x.upper()]=s.get(x.upper(),0)+1 if s.get(y,0)>0:s[y]-=1 else:r+=1 print(r)
#!/Users/ericleijonmarck/dev/projects/dicommunify/dicommunify/bin/python3.5 # $Id: rst2xml.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ A minimal front end to the Docutils Publisher, producing Docutils XML. """ ...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
import holoviews as hv import pandas as pd import pytest import sid from resources import CONTACT_MODELS from sid.plotting import plot_infection_rates_by_contact_models from sid.plotting import plot_policy_gantt_chart POLICIES_FOR_GANTT_CHART = { "closed_schools": { "affected_contact_model": "school", ...
""" A double-square number is an integer X which can be expressed as the sum of two perfect squares. For example, 10 is a double-square because 10 = 3^2 + 1^2. Your task in this problem is, given X, determine the number of ways in which it can be written as the sum of two squares. For example, 10 can only be written a...
# type: ignore """ test_index_calculation.py Tests for Tokenizer module Copyright (C) 2021 by Miðeind ehf. This software is licensed under the MIT License: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation ...
import time import prometheus_client as prom_cli from pjrpc.client import tracer from pjrpc.client.backend import requests as pjrpc_client method_latency_hist = prom_cli.Histogram('method_latency', 'Method latency', labelnames=['method']) method_call_total = prom_cli.Counter('method_call_total', 'Method call count', ...
try: from urllib.parse import quote_plus except ImportError: from urllib import quote_plus import processout from processout.networking.request import Request from processout.networking.response import Response # The content of this file was automatically generated class PaymentDataThreeDSRequest(object): ...
from dataclasses import dataclass from dataclasses import make_dataclass from dataclasses import replace from typing import Iterator from unittest import mock from unittest import TestCase from lxml.etree import QName from tests.fixtures.books import BookForm from tests.fixtures.books import Books from tests.fixtures...
""" This file is part of Totara Enterprise Extensions. Copyright (C) 2020 onwards Totara Learning Solutions LTD Totara Enterprise Extensions is provided only to Totara Learning Solutions LTD's customers and partners, pursuant to the terms and conditions of a separate agreement with Totara Learning Solutions LTD or it...
dados_pessoa: dict = dict() lista_pessoas: list = list() media: list = list() mulheres: list = list() while True: dados_pessoa['nome'] = str(input('Nome: ').strip().upper()) dados_pessoa['idade'] = int(input('Idade: ')) media.append(dados_pessoa['idade']) sexo = ' ' while sexo not in 'MmFf': ...
# Copyright (c) 2011, SD Elements. See LICENSE.txt for details. import os import sys import subprocess from distutils.core import Command from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.md')) as f: readme = f.read() class Test(Command): user_options = [] def initi...
from enum import Enum from sys import byteorder from bitstring import BitArray, CreationError, InterpretError class DataType(Enum): INT = {"byteBased": True, "size": 32, "id": "int"} FLOAT = {"byteBased": True, "size": 32, "id": "float"} DOUBLE = {"byteBased": True, "size": 64, "id": "float"} BYTE = ...