src
stringlengths
721
1.04M
# -*- coding: utf-8 -*- # # This file is part of the python-chess library. # Copyright (C) 2012-2015 Niklas Fiekas <niklas.fiekas@tu-clausthal.de> # # 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 Foundatio...
#!/usr/bin/python # Takes in a dictionary of words # Verifies that all functions return the same answers # Generates random hands from the probability of getting tiles from the bunch # Then prints out how long each function takes to find all matching words # Generates various hand sizes to see if there's any scaling ...
# Copyright 2014 - Numergy # # 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, s...
#!/usr/bin/python # System imports import sys, math, os # Panda imports from panda3d.core import * from pandac.PandaModules import * from direct.actor.Actor import Actor from direct.interval.IntervalGlobal import * from direct.task import Task from direct.showbase.DirectObject import DirectObject from panda3d.core im...
# -*- coding: utf8 -*- # Copyright (c) 2015 by Ecreall under licence AGPL terms # available on http://www.gnu.org/licenses/agpl.html # licence: AGPL # author: Amen Souissi import json import requests import re from persistent.list import PersistentList # from urllib.request import urlopen from pyramid.threadlocal im...
import inspect import numpy as np class AnalysisGeneratorClass(object): # This serves as a template for the user of pyda to implement # their own analysis generation. The initial conditions and # parameters used in the ensemble are contained passed to the # analysis scheme in one array. Hence the initi...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import unittest from utils.read_data_file import read_int_array from sorting.insertion_sort import sort BASE_DIR = os.path.dirname(os.path.abspath(__file__)) class InsertionSortTester(unittest.TestCase): # Test sort in default order, i.e., in ascending ...
import __builtin__ import sys import types import unittest import popen2 # trigger early the warning from popen2.py from copy import deepcopy from test import test_support class OperatorsTest(unittest.TestCase): def __init__(self, *args, **kwargs): unittest.TestCase.__init__(self, *args, **kwargs) ...
# Copyright (C) 2012 by Kevin L. Mitchell <klmitch@mit.edu> # # 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 3 of the # License, or (at your option) any later version. # # This p...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui_LoadSettings.ui' # # Created by: PyQt5 UI code generator 5.7 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_qDialog_load(object): def setupUi(self, qDialog_load): ...
# # Copyright (c) 2014 Tom Carroll # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, dis...
import parasail result = parasail.sw_table("asdf","asdfasdf",10,1,parasail.blosum62) print result print result.saturated print result.score print result.matches print result.similar print result.length print result.score_table result = parasail.sw_stats_table("asdf","asdfasdf",10,1,parasail.blosum62) print result pri...
# Copyright 2017 The TensorFlow Agents 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 ag...
#!/usr/bin/env python3 import sys import json import argparse import os.path as path import pandas as pd import numpy as np import pandas.api.types as pd_types DEBUG = True filename = 'storage/PATH_004.jsonl' filename = 'storage/HD_001.jsonl' filename = 'storage/PA_004.jsonl' if __name__ == '__main__': parser = ...
# encoding=utf-8 from hashlib import sha1 import requests import json import tempfile import shutil import os from .crypt import WXBizMsgCrypt from .models import WxRequest, WxResponse from .models import WxMusic, WxArticle, WxImage, WxVoice, WxVideo, WxLink from .models import WxTextResponse, WxImageResponse, WxVoic...
#!/usr/bin/env python3 import os, pytest, tempfile, datetime from cozify import cloud_api from cozify.test import debug from cozify.test.fixtures import * from cozify.Error import AuthenticationError, APIError, ConnectionError from mbtest.imposters import Imposter, Predicate, Stub, Response @pytest.mark.mbtest def...
"""Resource manager for postgres-database 9.x """ # Common stdlib imports import sys import os import os.path ## import commands # fix path if necessary (if running from source or running as test) try: import engage.utils except: sys.exc_clear() dir_to_add_to_python_path = os.path.abspath((os.path.join(...
#!/usr/bin/env python2 # encoding=utf-8 from __future__ import division, print_function from glob import glob from itertools import izip from matplotlib import pyplot as plt import numpy as np input_files = glob("csv/convergence-256000-0.*.csv") #input_files = glob("csv/convergence-500000-0.*.csv") #input_files = glo...
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc import generated.proto_out.sensors_pb2 as sensors__pb2 class FrontEndStub(object): """http://www.grpc.io/docs/guides/concepts.html is good reference for #tags #FrontEnd #Simple The FrontEnd server is the endpoint that most clien...
# -*- coding: utf-8 -*- """ Created on Tue Nov 3 15:07:16 2017 @author: Suhas Somnath """ from __future__ import division, print_function, unicode_literals, absolute_import import unittest import os import h5py import numpy as np import sys sys.path.append("../../../pycroscopy/") from pycroscopy.io.virtual_data imp...
from pipeline.pipeline import * from pipeline.entitylinker import * from pipeline.triplealigner import * from pipeline.datareader import DBpediaAbstractsDataReader from pipeline.writer import * from pipeline.coreference import * from pipeline.placeholdertagger import * from utils.triplereader import * from utils.triple...
# coding=utf-8 from math import sin, cos, pi, atan2, sqrt from tkinter import * import numpy as np WIDTH = 800 HEIGHT = 600 mousepos = np.array([WIDTH / 2, HEIGHT / 2]) is_mouse_down = False is_rmouse_down = False class Pendulum: def __init__(self, anchor_x, anchor_y, lenght, radius): # self.position ...
# 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...
import sys import time import threading import pyaudio class Player(object): def __init__(self, buffer, chunk_size=None, rate=None, live=None): self.rate = rate self.buffer_size = buffer.size / 2 assert chunk_size < self.buffer_size assert buffer.dtype == np.float32 self.buf...
#!/usr/bin/env python from __future__ import with_statement import re import cgi colorcodes = {'bold':{True:'\033[1m',False:'\033[22m'}, 'cyan':{True:'\033[1;36m',False:'\033[0;0m'}, #'#8E4429':{True:'\033[1;33m',False:'\033[0;0m'}, '#8E4429':{True:'\033[0;33m',False:'\033[0;0m'}, ...
from gwv.dump import Dump import gwv.filters as filters from gwv.kagedata import KageData from gwv.validators import Validator from gwv.validators import ErrorCodes error_codes = ErrorCodes( NOT_ALIAS="0", # エイリアスでない(し、koseki-xxxxx0がtoki-00xxxxx0のエイリアスというわけでもない) NOT_ALIAS_OF_KOSEKI="1", # koseki-xxxxx0のエイリア...
from core.models.export_request import ExportRequest from core.models.user import AtmosphereUser from core.models.instance import Instance from rest_framework import serializers class ExportRequestSerializer(serializers.ModelSerializer): """ """ name = serializers.CharField(source='export_name') inst...
"""Unit-tests for blackjack/player.py module.""" import unittest import unittest.mock import blackjack.card import blackjack.player class TestPlayer(unittest.TestCase): def setUp(self): self.deck = blackjack.card.Deck() self.player = blackjack.player.Player('John', 5) self.player.hand =...
# -*- mode: python; tab-width: 4; indent-tabs-mode: nil -*- # # Copyright (C) 2012-2015 Marco Craveiro <marco.craveiro@gmail.com> # # 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...
# coding: utf-8 """ ProductsApi.py Copyright 2015 SmartBear Software 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 ...
# 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 ...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
################################################################################ # Copyright 2016 Martin Grap # # 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/li...
from thefuck.specific.apt import apt_available from thefuck.utils import memoize, which from thefuck.shells import shell try: from CommandNotFound import CommandNotFound command_not_found = CommandNotFound() enabled_by_default = apt_available except ImportError: enabled_by_default = False def _get_e...
import os import tempfile import unittest from unittest import mock from dbt import linker try: from queue import Empty except ImportError: from Queue import Empty def _mock_manifest(nodes): manifest = mock.MagicMock(nodes={ n: mock.MagicMock(unique_id=n) for n in nodes }) manifest.expect...
import random from combat import Combat class Character(Combat): attack_limit = 10 experience = 0 base_hit_points = 10 def attack(self): roll = random.randint(1, self.attack_limit) if self.weapon == 'sword': roll += 1 elif self.weapon == 'axe': roll +=2 return roll > 4 def ...
# -*- coding: utf-8 -*- # # This file is part of HEPData. # Copyright (C) 2016 CERN. # # HEPData 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...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
import unittest from startzeile.web import create_app class WebTestCase(unittest.TestCase): def setUp(self): app = create_app(None, None) app.config['TESTING'] = True self.client = app.test_client() def tearDown(self): pass class BasicDefaultTestCase(WebTestCase): def runTest(self): resp = self.clie...
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
from unittest import TestCase from haleasy import HALEasy import responses class TestHaleasyHaltalk(TestCase): haltalk_root = '''{ "_links": { "self": { "href":"/" }, "curies": [ { "name": "ht", "hr...
from gi.repository import Gtk from plugin_base.find_extension import FindExtension class SizeFindFiles(FindExtension): """Size extension for find files tool""" def __init__(self, parent): FindExtension.__init__(self, parent) # create container table = Gtk.Table(2, 4, False) table.set_border_width(5) ta...
# -*- coding: utf-8 -*- # vim:et sts=4 sw=4 # # ibus-sdim - The Tables engine for IBus # # Copyright (c) 2008-2009 Yu Yuwei <acevery@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Found...
# Copyright 2020 The DMLab2D 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 in...
#!/usr/bin/env python3 from game import * from debugger import Debugger from logSaver import Logger from gameconfig import gc from popup_menu import * import sys import time #TODO more comments #TODO clean up this mess class App: def __init__(self): # flag for shutdown of the simulation self._run...
from setuptools import setup, find_packages setup( name = 'cos_monitoring', version = '0.0.1', description = 'Provide utilities and monotiring of cos data', author = 'Justin Ely', author_email = 'ely@stsci.edu', keywords = ['astronomy'], classifiers = ['Programming Language :: Python', ...
#!/usr/bin/python ###################################################################### # Ascii TMS Viewer # #-------------------------------------------------------------------- # Brian Hone | Initial Release #-------------------------------------------------------------------- # ...
from collections import OrderedDict from itertools import groupby from django.db import models from django.db.models import F from common.fields import AutoOneToOneField from open_humans.models import Member from private_sharing.models import ( DataRequestProjectMember, ProjectDataFile, id_label_to_projec...
# deftity - a tool for interaction architect # # Copyright (C) 2011 Matti Katila # # 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 late...
# -*- coding: UTF-8 -*- # Efficient Clipping of Arbitrary Polygons # # Copyright (c) 2011, 2012 Helder Correia <helder.mc@gmail.com> # # 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 vers...
__author__ = 'ptoth' import config.sr_network_configuration_test as base_config import unittest import numpy as np from recurrent_network.Network import * class SerializationTest(unittest.TestCase): def test_pickle(self): params = base_config.get_config() params['global']['epochs'] = 2 ...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.6.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
########################################################################### # # Copyright (c) 2015 Adobe Systems Incorporated. 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 Licens...
# 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, ...
"""Single slice vgg with normalised scale. """ from default import * import theano import theano.tensor as T import lasagne as nn import deep_learning_layers import preprocess import postprocess import objectives import theano_printer import updates from preprocess import preprocess, preprocess_with_augmentation, s...
# Copyright 2013 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 # # Unless requ...
""" Reader for the http://entilocali.opencontent.it/ """ import datetime import posixpath import urlparse import requests from datacat.readers import BaseReader from datacat.schema import DATE_FORMAT def urljoin(base, *parts): """A mix between urlparse.urljoin() and posixpath.join()""" return urlparse.urlj...
def keyset(d): return set(d.keys()) def union(d1, d2): return keyset(d1).union(keyset(d2)) def zip(d1, d2, std = None): """ Return a dictionary of tuples by putting together values with the same keys. Ex.: > zip({'name': "John", 'age': 20, 'favoriteMovie': "Godfather"}, {'name': "Mary", 'age': 26}, ...
# -*- coding: utf-8 -*- import sys import interpolacao as z from interpolacaoUi import * import numpy as np import pylab as plt from sympy import * from PyQt4.QtGui import * reload(sys) sys.setdefaultencoding('utf8') def str2list(texto): resultado = map(float,texto.split()) if type(resultado) is list: ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # CodeDog documentation build configuration file, created by # sphinx-quickstart on Tue Dec 1 11:27:30 2020. # # 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 # au...
import cv2 import numpy as np from scipy import misc def flip_image(image_array, steering_angle): return np.fliplr(image_array), -steering_angle def preprocess_image(image_array, output_shape=None): if output_shape is None: output_shape = (66, 200) image_array = cv2.cvtColor(image_array, cv2.COL...
# 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 ...
import logging import requests from ask_sdk_core.skill_builder import SkillBuilder from ask_sdk_core.dispatch_components import ( AbstractRequestHandler, AbstractExceptionHandler, AbstractRequestInterceptor, AbstractResponseInterceptor) from ask_sdk_core.utils import is_request_type, is_intent_name from ask_sd...
# -*- coding: utf-8 -*- "test for lab4 R5&R6" from django.shortcuts import render_to_response from django.shortcuts import render #from django.http import HttpResponseRedirect from django.http import HttpResponse from models import Book from models import Author # Create your views here. def index(request): return...
#!/usr/bin/python import unittest from testutils import setup_test_env setup_test_env() from softwarecenter.db.pkginfo import get_pkg_info class TestSCAddons(unittest.TestCase): """ tests the addons """ def setUp(self): self.cache = get_pkg_info() self.cache.open() def test_get_addons...
from . import cache, mapping, enrichments CELL_TYPE_COLS = { 'Homo sapiens': { 'Astrocyte': [ '8yo', '13yo', '16yo', '21yo.1', '22yo.1', '35yo', '47yo', '51yo', '53yo', '60yo', '63yo - 1', '63yo - 2', ], 'Neuron': [ '25yo', ], ...
# 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: release-1.18 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
# # Copyright (c) 2010 Matteo Boscolo # # This file is part of PythonCAD. # # PythonCAD 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 version....
__author__ = 'ggdhines' import matplotlib matplotlib.use('WXAgg') import aggregation_api import cv2 import numpy as np import matplotlib.pyplot as plt from aggregation_api import AggregationAPI from sklearn.cluster import KMeans import matplotlib.cbook as cbook jungle = AggregationAPI(153,"development") # jungle.__mig...
# 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...
#!/usr/bin/env python #-*- coding: utf-8 -*- import random import unittest from srcnip.languages import languages from srcnip.storage import Snippet, MemoryStorage, parse_timediff from srcnip.parser import parse, simplify, parse_tags, ParseError, LexerError, SyntaxError class LanguagesTestCase(unittest.TestCase):...
# coding: utf8 import re import logging _log = logging.getLogger(__name__) class EventProcessed(Exception): """ A special exception to end the current event processing """ def to_bytes(val): if isinstance(val, unicode): return val.encode('utf-8') return val def get_html2text(config): tr...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Grid Dynamics # 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/l...
# -*- coding: UTF-8 -*- ## Copyright 2012 Luc Saffre ## This file is part of the Lino project. ## Lino 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 3 of the License, or ## (at your option)...
import os import sys import errno import pathlib import tempfile import unittest import time import shutil import subprocess from inspect import signature from subprocess import Popen, PIPE from tempfile import TemporaryDirectory from multiprocessing.dummy import Pool from memory_profiler import profile as profile_memo...
# # Copyright (c) 2017 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 applicable law or agreed to...
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-07-13 17:57 from __future__ import unicode_literals from decimal import Decimal import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): replaces = [('gwells', '0009...
"""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, PLATFORM_SCHEMA, STATE_CLEANING,...
""" Summarize all downloaded airport weather station data files. Uses UTC time zone. Use -m gather_weather_data.wunderground.summarize_raw_airport_data to run the demo """ import os import json import datetime import logging import numpy import pandas import metar.Metar # needs https://github.com/tomp/python-meta...
#!/usr/bin/env python import numpy as np from matplotlib import pyplot as pl from argparse import ArgumentParser parser = ArgumentParser() parser.add_argument('--figsize', type=float, nargs=2, help="figure size, passed to rcParams['figure.figsize']") parser.add_argument('--levels', type=int, defau...
# 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...
from _ReadNexusExt import * from phycas.datamatrix._DataMatrix import DataMatrix import re _ROUND_TRIP_EVERY_NEXUS_READ = False class FileFormats: NEXUS, FASTA, PHYLIP, PDF, RAW_TEXT = range(5) _names = ["NEXUS", "FASTA", "PHYLIP", "PDF", "RAW_TEXT"] def to_str(v): if v < 0 or v > len(FileFormats....
#!/usr/bin/python import sys import json import urllib import urllib2 import time import logging from tinydb import TinyDB, where from apscheduler.schedulers.blocking import BlockingScheduler # Multiple Projects, each with multiple Events (release, blog post...), each with multiple Links (Reddit, HN, FB, Twitter...)...
# coding=utf-8 import os import re FUCK_STR = ' ' PATTERN_PHASE_FILE = re.compile('\S+-weeklyblog-phase-(\d+)\.md') PATTERN_POST = re.compile('-\s*\[(.+)\]\((https?://\S+)\)\s*\(\[@(.+)\]\((.+)\)\)') PATTERN_CATEGORY = re.compile('#{5}\s*(.*?)\n') BLOG_DIR = '_posts/' def get_post(f, phase): phase_summary = '...
import csv import matplotlib.pyplot as plt from numpy import * import scipy.interpolate import math from pylab import * from matplotlib.ticker import MultipleLocator, FormatStrFormatter import matplotlib.patches as patches from matplotlib.path import Path import os # ---------------------------------------------------...
""" Utilities for parsing/pretty-printing resource definitions and instances. Objects that can be converted to/from JSON have the following methods: * from_json(parsed_data) [static method] - given json data that has been parsed into python via json.load() or json.loads(), construct an instance of the associat...
import pytest import io import os import copy import json import base64 import hashlib from http import client import aiohttpretty from waterbutler.core import streams from waterbutler.core import exceptions from waterbutler.core.path import WaterButlerPath from waterbutler.core.provider import build_url from water...
import z3 from z3 import is_true, is_false from examples import * import time import mcnet.components as components import random import sys """Check time as increase in nodes""" def ResetZ3 (): z3._main_ctx = None z3.main_ctx() z3.set_param('auto_config', False) z3.set_param('smt.mbqi', True) z3.se...
#!/usr/bin/python # -*- coding:utf-8 -*- # JiraStoryMaker.py # Created by Henry on 2018/4/9 # Description : from selenium import webdriver from selenium.webdriver.support.ui import Select from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selen...
# Copyright 2013 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 # # Unless requ...
from BaseVLTestCase import BaseVLTestCase #@UnusedImport import main #@UnusedImport from voicelink_test.unit_tests.testSelection import testPickPrompt from Custom_Selection.PickPromptMultipleCustom import PVID_VERIFICATION from selection.PickPrompt import SLOT_VERIFICATION, ENTER_QTY,\ QUANTITY_VERIFICATION, LOT_T...
import numpy as np def parse_raw_data(path): input_sentences = [] target_sentences = [] with open(path) as f: in_sentence = [] target_sentence = [] for line in f: if line != "\n": in_target = line.split('\t') in_sentence.append(in_target[...
################################################################## # Copyright 2018 Open Source Geospatial Foundation and others # # licensed under MIT, Please consult LICENSE.txt for details # ################################################################## import os import tempfile import pywps.configuratio...
age = 20 name = 'Shaikh' print('{0} was {1} years old when he wrote this book'.format(name, age)) print('Why is {0} playing with that python?'.format(name)) # Omit the index in '{}' print('{} was {} years old when he wrote this book'.format(name, age)) print('Why is {} playing with that python?'.format(name)) # Mor...
# -*- coding:utf-8 -*- # # Copyright 2020, Couchbase, 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...
"""Functionality for the Hades command-line utilities in :mod:`hades.bin`.""" import argparse import logging.handlers import os import sys import textwrap from gettext import gettext as _ from hades import constants class ArgumentParser(argparse.ArgumentParser): """ArgumentParser subclass that exists with :data:...
import uuid from importlib import import_module import os import numbers try: from urllib import parse except ImportError: from urlparse import urlparse as parse import ipywidgets as widgets from traitlets import List, Unicode, Dict, observe, Integer from .basedatatypes import BaseFigure, BasePlotlyType from ...
# Copyright 2016 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...
"""Contains the implementation of the HTML color group.""" __all__ = ( 'HTML', ) import enum from colors import base class HTML(base.ColorGroup): """ The color group for HTML 4.01 approved colors. These are the colors as defined in the HTML 4.01 specification from 1999. See Also: `Wiki...
from nose.tools import eq_ from gi.repository import IBus from preedit_backend import PreeditBackend try: from unittest.mock import Mock except: from mock import Mock class TestPreeditBackend(): def setup(self): self.engine = Mock() self.config = { "skip-non-vietnamese": True...