text
stringlengths
2
999k
# 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 ...
# coding=utf-8 # Copyright (c) 2020, NVIDIA CORPORATION. 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 re...
# Problem: https://www.hackerrank.com/challenges/python-lists/problem # Score: 10 def handler(result): inp = input().split() command = inp[0] values = inp[1:] if command == 'print': print(result) else: execute = 'result.' + command + "(" + ",".join(values) + ")" ...
# 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...
# Copyright 2007 Robin Gottfried <copyright@kebet.cz> # # 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 ...
""" Created by @mrconfused for TeleBot syntax :- .song song name modified by @its_xditya """ import os from bs4 import BeautifulSoup import requests from telethon import events import subprocess from telethon.errors import MessageEmptyError, MessageTooLongError, MessageNotModifiedError import io import asyncio from u...
from __future__ import print_function, division from sympy.core.basic import Basic from sympy.core.compatibility import as_int, with_metaclass from sympy.sets.sets import Set, Interval, Intersection from sympy.core.singleton import Singleton, S from sympy.core.symbol import symbols from sympy.core.sympify import sympi...
# Copyright 2020 The Kubernetes 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 applicable law or agreed to ...
# -*- coding: utf-8 -*- # # complexity documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # 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. # # ...
#! usr/bin/env python # coding:utf-8 #===================================================== # Copyright (C) 2020 * Ltd. All rights reserved. # # Author : Chen_Sheng19 # Editor : VIM # Create time : 2020-04-29 # File name : utils.py # Description : Implement load_weight,read classes name,read prior anchors,...
# -*- coding: utf-8 -*- # # Annotator documentation build configuration file, created by # sphinx-quickstart on Wed Jan 22 17:02:43 2014. # # 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. # #...
from datetime import date, datetime import pickle import os.path from dateutil.relativedelta import relativedelta from googleapiclient.discovery import build from google_auth_oauthlib.flow import InstalledAppFlow from google.auth.transport.requests import Request from tzlocal import get_localzone from .serializers.ev...
build_config = { "version": "0.1", "debug": True, "projects": { "build\\bin\\w32-exec-calc-shellcode.bin": { "architecture": "x86", "files": { "build\\bin\\w32-exec-calc-shellcode.bin": { "sources": ["w32-exec-calc-shellcode.asm"], }, }, }, "buil...
from selenium import webdriver from selenium.webdriver.common.keys import Keys from functional_tests.base import FunctionalTest class LayOutAndStylingTest(FunctionalTest): def test_layout_and_styling(self): #edith goes to the home page self.browser.get(self.live_server_url) self.browser.set...
# coding: utf-8 from utg.relations import * from utg import data from utg import logic # receive and return only serialized data def migrate(word_data): if word_data['type'] == 3: # verb migrate_forms(word_data, OLD_VERB_CACHE, data.WORDS_CACHES[WORD_TYPE.VERB]) return word_data def migrate_forms(w...
# Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: # @param head, a ListNode # @return a list node def detectCycle(self, head): if head is None or head.next is None: return None sl...
def check_arguments(args): return True
class Tweet: def __init__(self, _tweet, _geo, _sentiment=""): self.tweet = _tweet.strip() self.geo = _geo.strip() self.sentiment = _sentiment def __str__(self): return ("text: " + self.tweet + " | sentiment: " + self.sentiment) def __repr__(self): return ("text: " ...
#!/usr/bin/env python3 import uvicorn import argparse import sys import yaml import os from suzieq.utils import load_sq_config, get_sq_install_dir from suzieq.restServer.query import app_init def get_cert_files(cfg): sqdir = get_sq_install_dir() ssl_certfile = cfg.get('rest', {}) \ .ge...
import asyncio from typing import ( List, Dict, Optional, Any, ) from hummingbot.core.utils.wallet_setup import ( create_and_save_wallet, import_and_save_wallet, list_wallets, unlock_wallet, save_wallet ) from hummingbot.client.config.config_var import ConfigVar from hummingbot.clie...
# -*- 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 os import argparse import torch if __name__ == "__main__": parser = argparse.ArgumentParser(description='FCOS Helper.') parser.add_argument('--mode', action='store', required=True, type=str, help='train : Training mode, ' + \ 'overfit_train : Overfit Train on only single image, convert : C...
from tkinter import ttk, Canvas class ScrollFrame(ttk.Frame): def __init__(self, parent, *args, **kwargs): super().__init__(parent, *args, **kwargs) self.canvas = Canvas(self, borderwidth=0) self.viewport = ttk.Frame(self.canvas, width=kwargs["width"]) self.vsb = ttk.Scrollbar(sel...
#!/usr/bin/env python3 """ Test for urlfetch limit """ import tempfile import unittest from base_test import PschedTestBase from pscheduler.limitprocessor.limit.urlfetch import * LIMIT = { "url": "filled-in-later", "timeout": "PT3S", "params": { "foo": 123, "bar": 456 }, "params-transform": { ...
""" Curried versions of math functions. Should we add to contrib? Should we automate creation of those kinds of models? """ import math as _math # from .builtins import _execute_with, _create_fn_functions # from .functions import fn # # We only define functions that differ from the math module # @fn.curry(2) def c...
from abc import abstractmethod, ABC class Repo(ABC): @abstractmethod def deps(self, package_name): pass class HTTPRepo(Repo): def deps(self, package_name): raise NotImplementedError
# -*- 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 or...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2019 The FATE 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/lic...
src_data_file = 'nginx_logs_head.txt' parsed_data_file = 'nginx_logs_parsed.csv' parsed_data = [] def row_parse(item): remote_IP_address, row_tail = item.split(maxsplit=1) _, _request_datetime = row_tail.split('[', maxsplit=1) request_datetime, row_tail = _request_datetime.split(']', maxsplit=1) _, _...
import collections import pandas as pd class Losses(object): """ Calculates prediction losses on test datasets achieved by the trained estimators. When the class is instantiated it creates a dictionary that stores the losses. Parameters ---------- metric: `mlaut.analyze_results.scores` object ...
class MetaCProp(type): def __getattr__(prop_cls,key): print 'cprop getter' def cprop2(f1, f2): def cprop3(cls): cprops = class_cprops.get(cls,{}) cprops[key]=(f1,f2) class_cprops[cls]=cprops return cls return cpr...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division import numpy as np from dipy.tracking.metrics import length, downsample from dipy.tracking.streamline import set_number_of_points def filter_streamlines_by_length(streamlines, data_per_point, ...
"""Create a mosaic plot from a contingency table. It allows to visualize multivariate categorical data in a rigorous and informative way. see the docstring of the mosaic function for more informations. """ # Author: Enrico Giampieri - 21 Jan 2013 from statsmodels.compat.python import lrange, lzip import numpy as np ...
"""Set of utility functions for unasync that transform into sync counterparts cleanly""" import inspect _original_next = next def is_async_mode(): """Tests if we're in the async part of the code or not""" async def f(): """Unasync transforms async functions in sync functions""" return None ...
from datetime import datetime from django import template def format_minutes(value): return '{:2d}h {:2d}m'.format(*divmod(value, 60)) register = template.Library() register.filter('format_minutes', format_minutes)
from django.forms import ModelForm, ModelChoiceField from django.contrib import admin from django.utils.translation import gettext_lazy as _ from dal import autocomplete from .models import ( DiscountCategory, DiscountCombo, DiscountComboComponent, PointGroup, PricingTierGroup, RegistrationDiscount, Custo...
''' Pycache directory(.pyc) Pycache is basically a folder that contains Python3 byte code, which has already been complied and is ready to be executed. They make my program start faster. They are automatically created after a module has been imported and used. They are created in the same irectory as th...
import logging from pyramid.settings import asbool from weaver.formats import OUTPUT_FORMAT_JSON LOGGER = logging.getLogger(__name__) def includeme(config): from weaver.wps_restapi import api, swagger_definitions as sd settings = config.registry.settings if asbool(settings.get("weaver.wps_restapi", Tr...
"""Support for the Xiaomi vacuum cleaner robot.""" import asyncio from functools import partial import logging from miio import DeviceException, Vacuum # pylint: disable=import-error import voluptuous as vol from homeassistant.components.vacuum import ( ATTR_CLEANED_AREA, DOMAIN, PLATFORM_SCHEMA, STA...
# Copyright 2021 Zilliz. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
import json import os from collections import namedtuple from flask import current_app as app def register_script(url): app.plugin_scripts.append(url) def register_stylesheet(url): app.plugin_stylesheets.append(url) def register_admin_script(url): app.admin_plugin_scripts.append(url) def register_a...
import _plotly_utils.basevalidators class ThicknessValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="thickness", parent_name="indicator.gauge.bar", **kwargs ): super(ThicknessValidator, self).__init__( plotly_name=plotly_name, par...
from django import forms from django.contrib.auth.models import User from django.forms import ModelForm from room_reservation.models import RoomStatus, Equipment, Location, Room from room_reservation.validators import date_validator class LoginForm(forms.Form): login = forms.CharField(max_length=20, label='Login...
# 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 agreed to in writing, ...
from Bio import Phylo import pandas as pd import plotly.graph_objs as go import numpy as np def get_x_coordinates(tree): """Associates to each clade an x-coord. returns dict {clade: x-coord} """ xcoords = tree.depths() # tree.depth() maps tree clades to depths (by branch length). # returns...
import numpy as np import pytest from packaging.version import parse as parse_version pytestmark = pytest.mark.gpu import dask.array as da from dask.array.numpy_compat import _numpy_120 from dask.array.utils import assert_eq cupy = pytest.importorskip("cupy") cupy_version = parse_version(cupy.__version__) @pytest....
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.d (the "License"); # you may not use this file except in compliance with the License. # """A module for helping ban group join spammers.""" from asyncio import sleep from requests import get from telethon....
#!/usr/bin/env python3 import unittest import subprocess import mockdock class MockDockTest(unittest.TestCase): def test_generate_certificate(self): domains = ["patrick.star"] cert_file, key_file = mockdock.generate_certificate(domains) cert_result = subprocess.check_output(["openssl", "x...
import random import copy import logging import sys from collections import defaultdict import itertools from sim_lite2 import SimulationLite import compress_pickle import functools import random_patterns import time import numpy as np import os from random_patterns import generate_patterns SILENT_MODE = False if "SIL...
import requests from bs4 import BeautifulSoup import sys def query(query): url = "http://www.amazon.in/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=" for x in query: url = url+x+"+" url=url[0:-1] return url def getproductid(url): pid="" try: response_code = requests.get(url) #print response_cod...
# Copyright 2018-2020 Alvaro Bartolome, alvarobartt @ GitHub # See LICENSE for details. FINANCIAL_SUMMARY_TYPES = { 'income_statement': 0, 'balance_sheet': 1, 'cash_flow_statement': 2 } FINANCIAL_SUMMARY_PERIODS = { "annual": "Annual", "quarterly": "Interim" } PRODUCT_FILTERS = { 'indices': ...
"""Tests of builtins (in pytd/builtins/{version}/__builtins__.pytd). File 1/3. Split into parts to enable better test parallelism. """ import textwrap from pytype import collections_overlay from pytype.pytd import pytd_utils from pytype.tests import test_base class BuiltinTests(test_base.TargetIndependentTest): ...
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 10 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import isi_sdk_9_0_0 from ...
# pip install nvitop pyspectator psutil ite8291r3-ctl from pyspectator.processor import Cpu from nvitop.core import Device from time import sleep import psutil from ite8291r3_ctl import ite8291r3 import math def sigmoid(x): return 1 / (1 + math.exp(-x)) gpu = Device(0) ite = ite8291r3.get() def get_gpu_temp():...
# -*- coding: utf-8 -*- # This work is part of the Core Imaging Library developed by # Visual Analytics and Imaging System Group of the Science Technology # Facilities Council, STFC # Copyright 2020 Edoardo Pasca # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file...
# 1119 # (^([0-9]*[.][0-9]*[1-9]+[0-9]*)$)|(^([0-9]*[1-9]+[0-9]*[.][0-9]+)$)|(^([1-9]+[0-9]*)$) # EXPONENT # nums:5 # EXPONENT AttackString:".1"+"1"*1024+"!1 _SLQ_2" import re2 as re from time import perf_counter regex = """(^([0-9]*[.][0-9]*[1-9]+[0-9]*)$)|(^([0-9]*[1-9]+[0-9]*[.][0-9]+)$)|(^([1-9]+[0-9]*)$)""" REGE...
import logging import re import sys import traceback from .extractor import TemplateExtractor logger = logging.getLogger(__name__) PROJECT_NAME = "wikiproject" PROJECT_RE = re.compile(r"^статья[\s_]проекта\b", re.I) def from_template(template): template_name = str(template.name).lower().strip() if PROJECT_...
""" Client implementation and util functions to interact with EncoderDecoder service """ #TODO: Move encode and decode calls to the CoderClient class import grpc from pyproxy.playcloud_pb2 import DecodeRequest, EncodeRequest, File, FragmentsNeededRequest, ReconstructRequest, Strip import pyproxy.coder.coding_servicer...
# -*- coding: utf-8 -*- # Copyright (C) 2017-2018 Andreas Franck and Giacomo Costantini # Copyright (C) 2017-2018 University of Southampton # VISR Binaural Synthesis Toolkit (BST) # Authors: Andreas Franck and Giacomo Costantini # Project page: http://cvssp.org/data/s3a/public/BinauralSynthesisToolkit/ # The Binaur...
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.package import * class PyIrpf90(PythonPackage): """IRPF90 is a Fortran90 preprocessor written in Python f...
from ...extensions import cache from flask import render_template from . import pages @pages.route('/ui/buttons', methods=['GET', 'POST']) # @cache.cached(timeout=90, key_prefix='post') def buttons(): return render_template('pages/UI/buttons.html') pass @pages.route('/ui/general', methods=['GET', 'POST']) #...
from zeroos.core0 import client import unittest import time import uuid import logging import configparser import requests import json import os class BaseTest(unittest.TestCase): def __init__(self, *args, **kwargs): config = configparser.ConfigParser() config.read('config.ini') self.targe...
import os from decouple import config, Csv # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/2.1/howto/deployment/checklis...
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Title(_BaseLayoutHierarchyType): # font # ---- @property def font(self): """ Sets this color bar's title font. Note that the title's font used to be set by the now d...
import unittest from typing import Callable, List, Tuple import torch import torch.fx import torch.fx.experimental.fx_acc.acc_tracer as acc_tracer from fx2trt_oss.fx import ( TRTInterpreter, InputTensorSpec, TRTModule, ) from torch.testing._internal.common_utils import TestCase from torch.fx.experimental.n...
from PyQt5.QtCore import Qt from PyQt5.QtChart import QChart, QLineSeries, QAreaSeries, QDateTimeAxis, QValueAxis from PyQt5.QtGui import QColor class DollarIndexChart(QChart): """ Line chart to display USDX data """ data_series = None def __init__(self, parent=None): """ Initiali...
#!/usr/bin/env python """Tool for mounting AFF4 datastore over FUSE.""" import datetime import errno import getpass import stat import sys # pylint: disable=unused-import,g-bad-import-order from grr.lib import server_plugins # pylint: enable=unused-import,g-bad-import-order import logging from grr.config import co...
#!/usr/bin/env python import zauxpy.formatting import zauxpy.intan ZAUX_PACKAGE_IMPORTED = True
# Copyright 2015 The TensorFlow 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 applica...
"""The tests for the Demo Media player platform.""" import datetime import socket import unittest import pysonos.snapshot from unittest import mock import pysonos from pysonos import alarms from homeassistant.setup import setup_component from homeassistant.components.sonos import media_player as sonos from homeassista...
#!/usr/bin/env python # -*- coding: UTF-8 -*- # @Time : 2020/2/10 23:42 # @Software: PyCharm # @Author : https://github.com/Valuebai/ """ ddt.test ~~~~~~~~~~~~~~~ 测试ddt模块 """ import unittest from ddt import ddt, data, unpack @ddt class MyTest(unittest.TestCase): @data((8, 6), (4, 0), (15, 6)) ...
from main import app,auth from flask import jsonify,request,abort from models.esutils import ESUtils @app.route('/api/v1.0/organizations', methods=['GET']) @auth.login_required def get_all_orgs(): search = request.args.get('q') or None results = ESUtils.search(1000,0,search,the_sort='',the_index='admin',the_doc_t...
""" Problem Description You are given a 1D integer array B containing A integers. Count the number of ways to split all the elements of the array into 3 contiguous parts so that the sum of elements in each part is the same. Such that : sum(B[1],..B[i]) = sum(B[i+1],...B[j]) = sum(B[j+1],...B[n]) In - numbers: Lis...
#!/usr/bin/python import os import sys from setuptools import setup, find_packages # Must be ran as root or as sudo if os.getuid() != 0: print('ERROR: Need to run as root') sys.exit(1) # Install the requirements if the system does not have it installed print('INFO: Checking and installing requirements') os.s...
# Generated by Django 2.2.13 on 2020-06-10 08:03 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('layers', '0028_auto_20200610_0759'), ] operations = [ migrations.AlterField( model_name='attribute', name='featurei...
from rest_framework import status from rest_framework.response import Response from rest_framework.decorators import api_view from push_notifications.models import PushNotificationToken from push_notifications.serializers import PushNotificationTokenSerializer from drf_yasg2.utils import swagger_auto_schema @swagger_...
import numpy as np import pandas as pd from sklearn import linear_model from sklearn import metrics from sklearn import preprocessing def run(fold): #load training data (with folds) df=pd.read_csv("../input/train_data_folds.csv") #all cols are feature except id, redemption_status and kfold features=[...
# exported from PySB model 'model' from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU', 'C3pro']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', '...
#!/usr/bin/env python3 ## ## This file is part of the `src-run/raspetub-project` package. ## ## (c) Rob Frawley 2nd <rmf@src.run> ## ## For the full copyright and license information, view the LICENSE.md ## file distributed with this source code. ## import time import statistics # Import SPI library (for hardware SP...
""" Examples of Combinatorial Species """ #***************************************************************************** # Copyright (C) 2008 Mike Hansen <mhansen@gmail.com>, # # Distributed under the terms of the GNU General Public License (GPL) # # This code is distributed in the hope that it will be useful...
''' Functions for creating ASTs. ''' from stringfuzz.ast import * __all__ = [ 'smt_var', 'smt_const', 'smt_new_var', 'smt_new_const', 'smt_str_lit', 'smt_int_lit', 'smt_bool_lit', 'smt_assert', 'smt_equal', 'smt_gt', 'smt_lt', 'smt_gte', 'smt_lte', 'smt_concat',...
""" Entradas Sueldo-->int-->s Horas-->int-->h Salidas Neto-->int-->sn """ s=int(input("Ingrese el salario: ")) h=int(input("Ingrese las horas trabajadas: ")) #caja negra a=(1*s)/h b=s*0.2 sn=s-b #Salidas print("El precio por hora es $","{:.0f}".format(a)) print("El salario neto es: $","{:.0f}".format(sn))
from random import * import string def random_username(prefix, maxlen): symbols = string.ascii_letters + string.digits*10 return prefix + "".join([choice(symbols) for i in range(randrange(maxlen))]) def test_signup_new_account(app): username = random_username("user_", 10) email = username + "@localho...
import optparse, yaml, json class OptionResolver(object): """Resolve user input options""" def __init__(self): self.parser = optparse.OptionParser() self.set_options() def set_options(self): """Use optparser to manage options""" self.parser.add_option(...
async def run(worker, *args, **kwargs): worker.logger.info('OK')
import re # Entity format GAME_ENTITY = "GameEntity" _E = r"(%s|UNKNOWN HUMAN PLAYER|\[.+\]|\d+|.+)" % (GAME_ENTITY) ENTITY_RE = re.compile("\[.*\s*id=(\d+)\s*.*\]") # Line format TIMESTAMP_POWERLOG_FORMAT = r"%H:%M:%S.%f" TIMESTAMP_RE = re.compile(r"^(D|W) ([\d:.]+) (.+)$") POWERLOG_LINE_RE = re.compile(r"([^(]+)\(...
import gensim import numpy import math import networkx from sklearn.feature_extraction.text import CountVectorizer import regex as re from HTMLParser import HTMLParser import logging from ranking import graph_influence logger = logging.getLogger('universal_logger') # --------------------- preprocessing methods ---...
# coding: utf-8 """ DocuSign Click API DocuSign Click lets you capture consent to standard agreement terms with a single click: terms and conditions, terms of service, terms of use, privacy policies, and more. The Click API lets you include this customizable clickwrap solution in your DocuSign integrations. ...
from collections import Counter class Solution: def minWindow(self, s: str, t: str) -> str: t_map = Counter(t) start, counter = 0, len(t) # chars to be matched min_start, min_len = 0, len(s) + 1 for end, ke in enumerate(s): if t_map[ke] > 0: counter -= ...
# -*- coding: utf-8 -*- # # scikits.cuda documentation build configuration file, created by # sphinx-quickstart on Fri Jul 19 10:11:54 2013. # # 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. # ...
import os import imp from setuptools import setup from setuptools import Extension dirname = os.path.dirname(__file__) path_version = os.path.join(dirname, 'vaex/meta/_version.py') version = imp.load_source('version', path_version) name = 'vaex' author = 'Maarten A. Breddels' author_email = 'maartenbreddels@gmail.co...
# 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...
#!/usr/bin/env python # Copyright 2013 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 re...
8*sqrt(7)*sqrt(pi)*nu*r(0)**3*v(0)**10/21
# -*- coding: utf-8 -*- """ sphinx.writers ~~~~~~~~~~~~~~ Custom docutils writers. :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """
import FWCore.ParameterSet.Config as cms import DQMOffline.CalibCalo.MonitorAlCaHcalPhisym_cfi import DQMOffline.CalibCalo.MonitorHcalDiJetsAlCaReco_cfi import DQMOffline.CalibCalo.MonitorHcalIsoTrackAlCaReco_cfi import DQMOffline.CalibCalo.MonitorHcalIsolatedBunchAlCaReco_cfi import DQMOffline.CalibCalo.MonitorHOAlCa...
#!/usr/bin/python3 import json from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.urls import fetch_url class VaultReadModule(): argument_spec = dict( vault_addr=dict(type='str', required=True), role_id=dict(type='str', required=True), secret_id=dict(type='str...
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/stable/config # -- Path setup ------------------------------------------------------------...
#!/usr/bin/env python # # March 2017, Glenn F. Matthews # Copyright (c) 2017 the COT project developers. # See the COPYRIGHT.txt file at the top-level directory of this distribution # and at https://github.com/glennmatthews/cot/blob/master/COPYRIGHT.txt. # # This file is part of the Common OVF Tool (COT) project. # It ...
from pydantic import BaseModel, Field from typing import Optional from app.db.pyobjectid import PyObjectId from bson import ObjectId class CategoryCreate(BaseModel): title: str color: str class CategoryUpdate(BaseModel): title: Optional[str] color: Optional[str] class Category(CategoryCreate): ...