text
stringlengths
475
200k
# -*- coding: utf-8 -*- import os import socket from django import forms from django.conf import settings from django.db.models import Q from django.forms.models import BaseModelFormSet, modelformset_factory from django.utils.safestring import mark_safe from django.utils.translation import ugettext, ugettext_lazy as _...
import os from django import forms from django.utils.translation import gettext_lazy as _ from wagtail.admin.widgets import AdminPageChooser from wagtail.contrib.redirects.models import Redirect from wagtail.core.models import Site class RedirectForm(forms.ModelForm): site = forms.ModelChoiceField( labe...
"""Presence management service. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import collections import logging import sys import kazoo from treadmill import appcfg from treadmill import context from treadmill...
''' Read excel file easyer @author: Weizhong Tu 2013-09-19 08:59:20 modified @ 2013.12.28 23:14 ''' import os import re from xlrd import open_workbook class OpenExcel: ''' #Usage: import OpenExcel f = OpenExcel(path) #default sheet(1) you can use `f = OpenExcel(path,sheet=2)` ########### read data ###########...
from __future__ import print_function import copy import math import sys import time from mavros_msgs.msg import CommandCode from mavros_msgs.msg import State from mavros_msgs.msg import Waypoint from mavros_msgs.srv import CommandBool from mavros_msgs.srv import CommandTOL from mavros_msgs.srv import CommandTOLReque...
""" You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security system connected and it will automatically contact the police if two adjacent houses were broken int...
# Lint as: python2, python3 # Copyright 2021 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 # ...
"""A parser for ext2 file system images""" from stat import * from . import * from ..io import * from ..util import * Ext2Header = Struct('Ext2Header', [ ('bootRecord', 1024), ('inodesCount', Struct.INT32), ('blocksCount', Struct.INT32), ('...', 16), ('blockSize', Struct.INT32), ('...', 4), ('blocksPerGroup',...
# -*-: coding utf-8 -*- """ Skeleton Snips skill. """ import re import json import os import datetime from text2num import text2num from collections import defaultdict FORMAT = '%Y.%m.%dT%H:%M:%S' class PingPongSkill(object): """ Skeleton Snips skill. """ def __init__(self): pass def handle_lo...
# 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 ...
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Update audit permissions. Revision ID: 2785a204a673 Revises: c460b4f8cc3 Create Date: 2013-12-11 00:11:13.431124 """ # revision identifiers, used by Alembic. revision = '2785a204a673' down_revision = ...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe import smtplib import email.utils import _socket from frappe.utils import cint from frappe import _ def send(email, append_to=None): """send the message or add it...
# # ovirt-engine-setup -- ovirt engine setup # Copyright (C) 2013 Red Hat, 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 r...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # This file is part of Ansible # # Ansible 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 #...
import time try: import picamera testcam = picamera.PiCamera() testcam.close() except: import bawt.mock.picamera as picamera print picamera.PiCamera.ANNOUNCEMENT from bawt.bawt import Bawt import bawt.log as logging from bawt.subsystems.file import File LOG = logging.get_logger(__name__) class ...
# # PAIMEIdiff # Copyright (C) 2006 Peter Silberman <[EMAIL]> # # $Id: FunctionViewListCtrl.py 194 2007-04-05 15:31:53Z cameron $ # # 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 ve...
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Invoke-UserHunter', 'Author': ['@harmj0y'], 'Description': ('Finds which machines users of a specified group are logged into. ' 'P...
"""Support for deCONZ lights.""" from pydeconz.light import Light from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_EFFECT, ATTR_FLASH, ATTR_HS_COLOR, ATTR_TRANSITION, DOMAIN, EFFECT_COLORLOOP, FLASH_LONG, FLASH_SHORT, SUPPORT_BRIGHTNESS, ...
from .. import BaseStandaloneRoutine from psychopy.localization import _translate from psychopy.experiment import Param from pathlib import Path from psychopy.alerts import alert class EyetrackerCalibrationRoutine(BaseStandaloneRoutine): categories = ['Eyetracking'] targets = ["PsychoPy"] iconFile = Path(...
import sys import traceback def import_module(name, required=True): """ Import module by name :param name: Module name :param required: If set to `True` and module was not found - will throw exception. If set to `False` and module was not found - will r...
# Copyright 2012, SIL International # All rights reserved. # # 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 Foundation; either version 2.1 of License, or # (at your option) any lat...
import logging import os import uuid from itertools import chain from django.conf import settings from django.contrib.auth.models import User from django.core.files.storage import default_storage from django.core.mail import send_mail from django.db import models from django.db.models import Q, Manager, ManyToManyFiel...
# -*- coding: utf-8 -*- # Copyright 2008 Jaap Karssenberg <[EMAIL]> '''Test cases for the zim.fs module.''' from __future__ import with_statement import tests import os import time import zim.fs from zim.fs import * from zim.errors import Error def modify_file_mtime(path, func): '''Helper function to modify a ...
# # Copyright 2016 The BigDL 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 ...
from django.shortcuts import render, get_object_or_404 from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from computes.models import Compute from interfaces.forms import AddInterface from vrtManager.interface import wvmInterface, wvmInterfaces from libvirt import libvirtError d...
# Copyright (c) Facebook, Inc. and its affiliates. # # 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 ...
from abc import ABC, abstractmethod from copy import copy import openmc from openmc.checkvalue import check_greater_than, check_value class CompositeSurface(ABC): """Multiple primitive surfaces combined into a composite surface""" def translate(self, vector, inplace=False): surf = self if inplace el...
# -*- coding: utf-8 -*- import fauxfactory import pytest from random import sample import utils from cfme.intelligence.reports.reports import CustomReport from utils.providers import get_mgmt_by_name, setup_a_provider from utils.version import since_date_or_version from cfme import test_requirements @pytest.fixture(...
#!/usr/bin/env python """Test for depth estimation TODO: Render Baxter's hand at the goal position in Rviz, as well as the arm position that induced this goal position """ import rospy from geometry_msgs.msg import Pose, PoseArray, Point, Quaternion from visualization_msgs.msg import Marker, MarkerArray import visua...
# Abraxas Master Password # # Responsible for reading and managing the data from the master password file. # # Copyright (C) 2013-14 Kenneth S. Kundert and Kale Kundert # License (fold) # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publ...
#!/usr/bin/env python from gnuradio import gr from gnuradio import trellis, digital from gnuradio import eng_notation import math import sys import random import fsm_utils def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,Es,N0,IT,seed): tb = gr.top_block () # TX src = gr....
import csv from promrep.models import Praenomen, Person def run(): # U flag: universal new-line mode ifile = open('promrep/scripts/data/OldRENumbersv6.csv', 'rU') reader = csv.reader(ifile, delimiter=',', skipinitialspace=True) total = 0 found = 0 with open('re_update_log.csv', 'wb') as csv...
#r# This example shows the simulation of a capacitor and an inductor. #r# #r# To go further, you can read these pages on Wikipedia: `RC circuit <https://en.wikipedia.org/wiki/RC_circuit>`_ #r# and `RL circuit <https://en.wikipedia.org/wiki/RL_circuit>`_. ################################################################...
import sys sys.path.insert(1, "../../../") import h2o from tests import pyunit_utils from h2o.estimators.gbm import H2OGradientBoostingEstimator def set_parallel(value): h2o.rapids("(setproperty \"{}\" \"{}\")".format("sys.ai.h2o.sharedtree.crossvalidation.parallelMainModelBuilding", str(value).lower())) def s...
# Copyright 2018 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...
# coding=utf-8 '''Define Schema''' from __future__ import absolute_import import hashlib from datetime import datetime from flask import url_for, current_app from mongoengine import fields, DENY from werkzeug import security from flask_babel import gettext as _ from flask_mail import Message from flask_login import lo...
# -*- coding: utf-8 -*- # # Author: François Rossigneux <[EMAIL]> # # 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...
""" Various plotting function """ import numpy as np def blandAltman(s1, s2, ax=None): """ Generate a Bland-Altman plot. Arguments: :type s1: numpy.array :param s1: An array of sample1 data. :type s2: numpy.array :param s2: An array of sample2 data. :param ax: ...
from collections import OrderedDict from django.contrib import admin from edc_export.actions import export_as_csv_action from ..forms import InfantBirthDataForm from ..models import InfantBirthData from .base_infant_scheduled_modeladmin import BaseInfantScheduleModelAdmin class InfantBirthDataAdmin(BaseInfantSche...
"""Class-based request view for passing HTTP requests to Request instances""" from nidhogg.common.json import json_response from nidhogg.common.views import MethodView from nidhogg.common.decorators import method, mime from nidhogg.protocol.yggdrasil import request as req class YggdrasilView(MethodView): """Class...
# -*- coding: utf-8 -*- # @Author: YangZhou # @Date: 2015-12-16 17:25:09 # @Last Modified by: YangZhou # @Last Modified time: 2017-06-18 22:32:53 from numpy.fft import rfft, irfft, fft import numpy as np from aces.graph import series, plot, imshow from aces.velocityh5 import velocity from scipy.optimize import leas...
# 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 program is distributed in the hope that it will be useful, # bu...
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base...
#!/usr/bin/env python # 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 # "Li...
##################################################################################### # # Copyright (C) Tavendo GmbH # # Unless a separate license agreement exists between you and Tavendo GmbH (e.g. you # have purchased a commercial license), the license terms below apply. # # Should you enter into a separate licen...
from decimal import Decimal from django.conf import settings from django.test import TestCase from ....cart.tests import TestCart from ....pricing import Price, PriceRange from ....pricing.handler import PricingQueue from ....product.tests import DeadParrot from .models import ProductPrice class Pricing(TestCase): ...
#!/usr/bin/python ###################################################################### # Cloud Routes Bridge # ------------------------------------------------------------------- # Actions Module ###################################################################### import rethinkdb as r from rethinkdb.errors import...
from __future__ import unicode_literals from moto.core.responses import BaseResponse class AccountAttributes(BaseResponse): def describe_account_attributes(self): template = self.response_template(DESCRIBE_ACCOUNT_ATTRIBUTES_RESULT) return template.render() DESCRIBE_ACCOUNT_ATTRIBUTES_RESULT = ...
# This file is part of OpenHatch. # Copyright (C) 2009 OpenHatch, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later v...
# -*- coding: utf-8 -*- from . import protocol from .. import db from ..models import Protocol, Design from flask import jsonify, json, request from flask.ext.login import login_required @protocol.route('/setB') def all_protocols(): """ :Usage: Get the setB of protocols. :Output: A list of setB...
"""\ Functions to expose over the RPC interface. For all modify* and delete* functions that ask for an 'id' parameter to identify the object to operate on, the id may be either * the database row ID * the name of the object (label name, hostname, user login, etc.) * a dictionary containing uniquely identifying fiel...
import astropy.units as u import numpy as np from fastimgproto.coords import xyz_to_uvw_rotation_matrix # Define the basis vectors with component co-ordinates in their # own systems: e_u = e_x = np.array([1, 0, 0], dtype=np.float_) e_v = e_y = np.array([0, 1, 0], dtype=np.float_) e_w = e_z = np.array([0, 0, 1], dtype...
#!/usr/bin/env python import gzip import json import optparse import os import os.path import re import shutil import sys import urllib import zipfile from pysam import ctabix """ # Install dbNSFP databases # from DbNsfp site # Download dbNSFP database $ wget ftp://dbnsfp:[EMAIL]/dbNSFPv2.4.zip # Uncompress ...
import numpy as np from gpaw.overlap import Overlap from gpaw.fd_operators import Laplace from gpaw.lfc import LocalizedFunctionsCollection as LFC from gpaw.utilities import unpack from gpaw.io import FileReference from gpaw.lfc import BasisFunctions from gpaw.utilities.blas import axpy from gpaw.transformers import T...
# Copyright 2012 Cisco Systems, 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 requir...
"""Support for monitoring the rtorrent BitTorrent client API.""" import logging import xmlrpc.client import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( CONF_URL, CONF_NAME, CONF_MONITORED_VARIABLES, STATE_IDLE) from homeassistant.helpers.enti...
# -*- coding: utf-8 -*- # # This file is part of Inspire. # Copyright (C) 2016 CERN. # # Inspire 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...
# Copyright 2011 OpenStack Foundation. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance w...
from collections import OrderedDict import json import os import re from tasks.meta import OBSColumn, DENOMINATOR, OBSTag from tasks.base_tasks import ColumnsTask, TagsTask from tasks.tags import UnitTags, SectionTags, SubsectionTags, LicenseTags def load_definition(): with open(os.path.join(os.path.dirname(__fi...
from trac.perm import PermissionCache, PermissionSystem from trac.ticket.api import TicketSystem from trac.ticket.model import Ticket from trac.test import EnvironmentStub, Mock import unittest class TicketSystemTestCase(unittest.TestCase): def setUp(self): self.env = EnvironmentStub() self.perm...
from django.contrib import admin from django.utils.translation import ugettext as _ from nodeshot.core.layers.admin import LayerAdmin from nodeshot.core.nodes.admin import NodeAdmin from .models import LayerExternal, NodeExternal from .settings import settings from .tasks import synchronize_external_layers class La...
# Copyright (C) 2007-2010 Canonical Ltd # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distribute...
"""WSGI server interface (see PEP 333). This adds some CP-specific bits to the framework-agnostic wsgiserver package. """ import cherrypy from cherrypy import wsgiserver class CPHTTPRequest(wsgiserver.HTTPRequest): def __init__(self, sendall, environ, wsgi_app): s = cherrypy.server ...
import os import math from ij.io import OpenDialog from ij.gui import GenericDialog from ij import IJ from ij import WindowManager # Gets the input LSM image theOpenDialog = OpenDialog("Choose large LSM file to open...") theFilePath = theOpenDialog.getPath() if not(theFilePath is None): theDirectory = theOpenDialog.g...
import os import sys import xml_utils import datetime from iaux import Reserved, Chars class CreateAPI(): def __init__(self): path = os.path.abspath(os.path.dirname(__file__)) self.char = Chars() signature = {'call' : ['name', 'method', 'url'], 'response' : ['element', 'attribute']} self.api, unus...
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """Script to encrypt config files. Usage: scripts/encrypt_conf.py confname1 confname2 ... confnameN scripts/encrypt_conf.py credentials """ import io import click import yaycl_crypt from cfme.utils import conf from . import link_config @click.group(help='Functi...
# -*- coding: utf-8 -*- from .base import * # noqa # Extra installed apps INSTALLED_APPS += ( # 'raven.contrib.django.raven_compat', # enable Raven plugin 'pipeline', ) # define template function (example for underscore) # PIPELINE_TEMPLATE_FUNC = '_.template' # enable cached storage - requires uglify.js (...
import time from weakref import ref as weakref from redis import StrictRedis from redis.exceptions import ConnectionError, TimeoutError from rb.promise import Promise from rb.poll import poll def assert_open(client): if client.closed: raise ValueError('I/O operation on closed file') class CommandBuff...
#!/usr/bin/env python3 """RPC协议如下 version:1 byte 版本号,固定值为1 type:1 byte,1表示RPC请求,2表示RPC响应 reverse:2 bytes 保留字节 length:4 bytes 负载长度 rpc_request_id:4 bytes 发送request的客户端ID,由RPC中转服务器自动生成,通常为文件描述符 RPC request 格式: namespace_length:1 byte 命名空间长度 fn_name_length:1 byte 函数名长度 namespace: 256 bytes 命名空间 function:256 bytes 函数名 arg...
# -*- coding: utf-8 -*- """ *************************************************************************** NearestNeighbourAnalysis.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com **************...
import os, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) print("current_dir=" + currentdir) parentdir = os.path.join(currentdir, "../gym") os.sys.path.insert(0, parentdir) import pybullet as p import pybullet_data import time cid = p.connect(p.SHARED_MEMORY) if (cid ...
#!/usr/local/bin/python2.7 # encoding: utf-8 ''' mdh.FC is a fuzzy classifier that classifies iris data into three classes provided with membership functions for all terms of linguistic variables and a database of fuzzy rules. It defines classes_and_methods @author: Vukan Turkolov <[EMAIL]> Mihaela St...
# -*- coding: utf-8 -*- # Copyright (C) 2004-2012 Bastian Kleineidam # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #...
"""Automatically adapted for numpy Sep 19, 2005 by convertcode.py """ from __future__ import division, absolute_import, print_function import functools import warnings __all__ = ['iscomplexobj', 'isrealobj', 'imag', 'iscomplex', 'isreal', 'nan_to_num', 'real', 'real_if_close', 'typename', 'asfar...
import argparse import numpy import cPickle as pkl from nmt import build_sampler, gen_sample, \ load_params, \ init_params, \ init_tparams from multiprocessing import Process, Queue def translate_model(queue, rqueue, pid, model, options, k, normalize): import the...
import numpy import scipy.linalg """ An implementation of the primal Canonincal Correlation Analysis (CCA) algorithm. """ class PrimalCCA(object): def __init__(self, tau): """ Intialise the object with regularisation parameter tau between 0 (no regularisation) and 1 (full regularisation)...
# # plaintext.py: plaintext docstring parsing # Edward Loper # # Created [04/10/01 12:00 AM] # $Id: plaintext.py 1444 2007-02-10 19:26:54Z dvarrazzo $ # """ Parser for plaintext docstrings. Plaintext docstrings are rendered as verbatim output, preserving all whitespace. """ __docformat__ = 'epytext en' from epydoc.m...
# -*- coding: utf-8 -*- """ =================================== Demo of DBSCAN clustering algorithm =================================== Finds core samples of high density and expands clusters from them. """ print __doc__ import numpy as np from scipy.spatial import distance from sklearn.cluster import DBSCAN from sk...
# -*- coding: utf-8 -*- """ etc ~~~ An etcd client library for humans. - Don't mix "camelCase" on your Python code. - Test without real etcd by mockup clients. - Proper options for actions. - Sugars for most cases. :copyright: (c) 2016-2017 by Heungsub Lee :license: BSD, see LICENSE for mo...
__author__ = 'ntrepid8' from functools import wraps, partial from collections import deque from time import time, sleep from pprint import pformat as lib_pformat import requests import json import re import logging import sys logging.basicConfig(stream=sys.stdout, level=logging.DEBUG, format="%(message)s") logging.get...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # 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...
VariableGenerator_1 = VariableGenerator( Variable=( Struct( observations=Struct( tunnelflowrate=Float(-0.43), pressurecorner=Float(0.0) ) ) ) ) Workflow_2 = Workflow() Flow123d_3 = Flow123dAction( Inputs=[ Workflow_2.input() ...
#!/usr/bin/env python # # listdomains.py - Copyright (C) 2009 Red Hat, Inc. # Written by Darryl L. Pierce <[EMAIL]> # # 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; version 2 of the License. # ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals import codecs import os from setuptools import find_packages, setup def read(file_name): file_path = os.path.join(os.path.dirname(__file__), file_name) return codecs.open(file_path, encoding='utf-8').read() PACKAGE = "ad...
#!/usr/bin/python from Treelogy_Agent import * from Treelogy_Identifier import Treelogy_Identifier from socket import * from Queue import * import signal, sys, time #1st Google Compute Engine Ip = 104.154.18.233 #2nd Google Compute Engine Ip = 104.197.247.77 #1st Amazon EC2 Instance Ip = 54.213.7.195 HOST = '192.168.0...
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2016, John McNamara, [EMAIL] # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """ Test f...
""" Test lldb 'image list' on object files across multiple architectures. This exercises classes like ObjectFileELF and their support for opening foreign-architecture object files. """ import os.path import re import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.t...
import pytest from flexget.components.imdb.utils import ImdbParser @pytest.mark.online class TestImdbParser: def test_parsed_data(self): parser = ImdbParser() parser.parse('tt0114814') assert parser.actors == { 'nm0000592': 'Pete Postlethwaite', 'nm0261452': 'Chris...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 CERN. # # Invenio 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 ver...
# 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 ...
#!/usr/bin/python # # Copyright 2015 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 b...
# # Regions # AP_NORTHEAST_1 = 'ap-northeast-1' AP_NORTHEAST_2 = 'ap-northeast-2' AP_SOUTHEAST_1 = 'ap-southeast-1' AP_SOUTHEAST_2 = 'ap-southeast-2' EU_WEST_1 = 'eu-west-1' EU_CENTRAL_1 = 'eu-central-1' SA_EAST_1 = 'sa-east-1' US_EAST_1 = 'us-east-1' US_WEST_1 = 'us-west-1' US_WEST_2 = 'us-west-2' # # Availability Z...
#! -*- coding: utf-8 -*- # 常见的excel一些用法整理 import xlrd import xlwt import os import functools class MisExcelReader(object): def __init__(self, excelfile): self.excel_reader = xlrd.open_workbook(excelfile) self.filename = self._trans(excelfile) def _trans(self, file): return os.path.rel...
"""flavify URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-ba...
#!/usr/bin/python # # This file is part of Ansible # # Ansible 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. # # Ansible is distribut...
# Copyright 2010-2019 Kurt McKee <[EMAIL]> # Copyright 2002-2008 Mark Pilgrim # All rights reserved. # # This file is a part of feedparser. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source...
# # Copyright (C) 2016 Savoir-faire Linux Inc # # Authors: Seva Ivanov <[EMAIL]> # # 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 lat...
#!/usr/bin/env python # -*- coding: utf8 -*- import sys, os import argparse from pprint import pprint as pp import tempfile # import gnupg import subprocess import shutil from staller import checked_archive, key_import, downloadChunks def main(argv=None): parser = argparse.ArgumentParser( ) parser.add_argumen...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Pydoc Checker # Copyright © 2013 Stefano Maggiolo <[EMAIL]> # # 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...