content
string
try: import json except ImportError: import simplejson as json import utils # noqa import XenAPIPlugin # noqa import pluginlib_nova as pluginlib # noqa pluginlib.configure_logging("xenstore") class XenstoreError(pluginlib.PluginError): """Errors that occur when calling xenstore-* through subproc...
#!/usr/bin/env python import subprocess import re import os import errno import collections import sys class Platform(object): pass sdk_re = re.compile(r'.*-sdk ([a-zA-Z0-9.]*)') def sdkinfo(sdkname): ret = {} for line in subprocess.Popen(['xcodebuild', '-sdk', sdkname, '-version'], stdout=subprocess.PIP...
# -*- coding: utf-8 -*- import sys import logging import warnings from logging.config import dictConfig from twisted.python.failure import Failure from twisted.python import log as twisted_log import scrapy from scrapy.settings import overridden_settings, Settings from scrapy.exceptions import ScrapyDeprecationWarni...
"""Extends the logging module from the standard library.""" __docformat__ = "restructuredtext en" import os import sys import logging from six import string_types from logilab.common.textutils import colorize_ansi def set_log_methods(cls, logger): """bind standard logger's methods as methods on the class""" ...
""" I am the support module for making a ftp server with twistd. """ from twisted.application import internet from twisted.cred import portal, checkers, strcred from twisted.protocols import ftp from twisted.python import usage, deprecate, versions import warnings class Options(usage.Options, strcred.AuthOptionMi...
from django.template import RequestContext from django.http import HttpResponseRedirect, HttpResponse, HttpResponseNotFound, HttpResponseForbidden from django.template.loader import render_to_string from django.shortcuts import render_to_response from django.core.urlresolvers import reverse from django.views.decorators...
__author__ = 'Kano Computing Ltd.' __email__ = '<EMAIL>' import time import atexit import datetime import json import os import subprocess import shlex from uuid import uuid1, uuid5 from kano.utils.file_operations import read_file_contents, chown_path, \ ensure_dir from kano.utils.hardware import get_cpu_id fro...
from pyramid.view import view_config import client_utils import utils @view_config(route_name='get_assignments.json') def get_assignments(request): result = {'success': False} status_code = 200 #try: if True: success, error_text, language_code, lat, lng, \ client = client_utils....
"""add task fails journal table Revision ID: 64de9cddf6c9 Revises: 211e584da130 Create Date: 2016-08-03 14:02:59.203021 """ # revision identifiers, used by Alembic. revision = '64de9cddf6c9' down_revision = '211e584da130' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def up...
#!/usr/bin/env python2 """ Syncthing-GTK - Timer manager Simple abstract class for named, cancelable timers """ from __future__ import unicode_literals from gi.repository import GLib class TimerManager(object): def __init__(self): self._timers = {} def timer(self, name, delay, callback, *data, **kwdata): """...
{ "name" : "Purchase Payment Type and Terms", "version" : "1.0", "author" : "Pexego", "website": "www.pexego.es", "license" : "GPL-3", "category" : 'Generic Modules/Sales & Purchases', "description": """Adds payment info to the purchase process. Adds payment type, terms, and bank account to...
from __future__ import division import sys import new import random from itertools import * def len(iterable): """Returns the length of an iterator.""" i = 0 for _ in iterable: i += 1 return i def trueCycle(iterable): while 1: yielded = False for x in iterable: ...
from django.conf.urls import patterns, url from django.views.generic import TemplateView js_info_dict = { 'packages': ('geonode.maps',), } urlpatterns = patterns('geonode.maps.views', url(r'^$', TemplateView.as_view( template_name='m...
{ "name": "Quality control - Sale stock", "version": "8.0.1.0.0", "author": "OdooMRP team, " "AvanzOSC, " "Serv. Tecnol. Avanzados - Pedro M. Baeza", "website": "http://www.odoomrp.com", "contributors": [ "Pedro M. Baeza <<EMAIL>", ], "category": "Quality ...
import logging from webkitpy.common.config.committervalidator import CommitterValidator from webkitpy.tool.grammar import pluralize _log = logging.getLogger(__name__) class AbstractFeeder(object): def __init__(self, tool): self._tool = tool def feed(self): raise NotImplementedError("subclas...
from lib.common import helpers import os class Stager: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'dylib', 'Author': ['@xorrior'], 'Description': ('Generates a dylib.'), 'Comments': [ '' ] } ...
"""Test settings and readings of program variables.""" import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class SetValuesTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) def setUp(self): # Call super's setUp()....
""" Create a wheel (.whl) distribution. A wheel is a built archive format. """ import csv import hashlib import os import subprocess import warnings import shutil import json import wheel try: import sysconfig except ImportError: # pragma nocover # Python < 2.7 import distutils.sysconfig as sysconfig i...
import copy_reg import unittest from test import test_support from test.pickletester import ExtensionSaver class C: pass class WithoutSlots(object): pass class WithWeakref(object): __slots__ = ('__weakref__',) class WithPrivate(object): __slots__ = ('__spam',) class WithSingleString(object): ...
import sys from twisted.internet import reactor from twisted.names.srvconnect import SRVConnector from twisted.words.xish import domish from twisted.words.protocols.jabber import xmlstream, client, jid class XMPPClientConnector(SRVConnector): def __init__(self, reactor, domain, factory): SRVConnector.__in...
"""Sanity test to check integration test aliases.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import json import textwrap import os from ... import types as t from . import ( SanityVersionNeutral, SanityMessage, SanityFailure, SanitySuccess, SanityTa...
import gtk from subprocess import Popen lyrics = """ Please report to , and be sure to provide /tmp/.pc-sysinstall/pc-sysinstall.log. """ class PyApp: def on_reboot(self, widget): Popen('sudo reboot', shell=True) gtk.main_quit() def on_close(self, widget): gtk.main_quit() def _...
"""A parser for SGML, using the derived class as a static DTD.""" # XXX This only supports those SGML features used by HTML. # XXX There should be a way to distinguish between PCDATA (parsed # character data -- the normal case), RCDATA (replaceable character # data -- only char and entity references and end tags are ...
from ..base import * try: from ..translators.translator import translate_js except: pass @Js def Function(): # convert arguments to python list of strings a = [e.to_string().value for e in arguments.to_list()] body = ';' args = () if len(a): body = '%s;' % a[-1] args = a[:-...
# Spawn Group file created with PSWG Planetary Spawn Tool import sys from java.util import Vector from services.spawn import DynamicSpawnGroup from services.spawn import MobileTemplate def addDynamicGroup(core): dynamicGroup = DynamicSpawnGroup() mobileTemplates = Vector() mobileTemplates.add('kunga_clan_leader') ...
# Setup script for the pycvc package # # Usage: python setup.py install # import os from setuptools import setup, find_packages DESCRIPTION = "pycvc: Analyze CVC stormwater data" LONG_DESCRIPTION = DESCRIPTION NAME = "pycvc" VERSION = "0.3.0" AUTHOR = "Paul Hobson (Geosyntec Consultants)" AUTHOR_EMAIL = "<EMAIL>" URL ...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['stableinterface'], 'supported_by': 'community'} DOCUMENTATION = r''' --- module: bigip_hostname short_description: Manage the hostna...
#!/usr/bin/python # -*- coding: utf-8 -*- def main(): try: import urllib2 except ImportError: module.fail_json(msg="urllib2 is required") try: import cgi except ImportError: module.fail_json(msg="cgi is required") module = AnsibleModule( argument_spec=dict...
# coding=utf-8 ######################################################################################################################## plugin_identifier = "ScreenSquish" plugin_package = "octoprint_%s" % plugin_identifier plugin_name = "OctoPrint-ScreenSquish" plugin_version = "0.4" plugin_description = "Scalable UI ...
# -*- coding: utf-8 -*- """ Необходимые классы для создания страниц с текстом """ from outwiker.core.tree import WikiPage from outwiker.pages.text.textpanel import TextPanel from outwiker.core.factory import PageFactory class TextWikiPage (WikiPage): """ Класс текстовых страниц """ def __init__(self...
try: from hashlib import md5 except ImportError: import md5 md5 = md5.new from pyasn1.type import univ from pysnmp.proto.secmod.rfc3414.auth import base from pysnmp.proto.secmod.rfc3414 import localkey from pysnmp.proto import errind, error _twelveZeros = univ.OctetString((0,)*12).asOctets() _fortyEightZer...
from __future__ import unicode_literals import getpass from optparse import make_option from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand, CommandError from django.db import DEFAULT_DB_ALIAS from django.utils.encoding import force_str class Command(BaseCommand): ...
""" parse voteview partisanship data """ HOUSE_DAT = "../data/crawl/voteview/HL01110C21_PRES_BSSE.DAT" SENATE_DAT = "../data/crawl/voteview/SL01110C21_BSSE.dat" state_map = { #@@ import to state json as icpsr 41: 'AL', 81: 'AK', 61: 'AZ', 42: 'AR', 71: 'CA', 62: 'CO', 1: 'CT', 11: 'DE', 43: 'FL', 44: 'GA', 82: 'H...
#!/usr/bin/env python ''' ansible module for zabbix users ''' # vim: expandtab:tabstop=4:shiftwidth=4 # # Zabbix user ansible module # # # Copyright 2015 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 ma...
import os import time import ldb from samba.tests.samba_tool.base import SambaToolCmdTest import random class NtACLCmdSysvolTestCase(SambaToolCmdTest): """Tests for samba-tool ntacl sysvol* subcommands""" def test_ntvfs(self): (result, out, err) = self.runsubcmd("ntacl", "sysvolreset", ...
"""abydos.tests.distance.test_distance_baroni_urbani_buser_ii. This module contains unit tests for abydos.distance.BaroniUrbaniBuserII """ import unittest from abydos.distance import BaroniUrbaniBuserII class BaroniUrbaniBuserIITestCases(unittest.TestCase): """Test BaroniUrbaniBuserII functions. abydos.di...
#! /usr/bin/env python3 import os import sys import math import numpy as np from itertools import product from mule_local.JobGeneration import * from mule.JobParallelization import * from mule.JobParallelizationDimOptions import * p = JobGeneration() verbose = False #verbose = True ###############################...
"""Script to download LLVM gold plugin from google storage.""" import find_depot_tools import json import os import shutil import subprocess import sys import zipfile SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) CHROME_SRC = os.path.abspath(os.path.join(SCRIPT_DIR, os.pardir)) DEPOT_PATH = find_depot_to...
import json from SecuML.experiments import experiment_db_tools from SecuML.experiments.Tools import dir_exp_tools experiment_factory = None def getFactory(): global experiment_factory if experiment_factory is None: experiment_factory = ExperimentFactory() return experiment_factory class Experi...
import datetime import json import logging from dateutil.parser import parse as dateutil_parse import pykube.exceptions import autoscaler.utils as utils logger = logging.getLogger(__name__) class KubePodStatus(object): RUNNING = 'Running' PENDING = 'Pending' CONTAINER_CREATING = 'ContainerCreating' ...
import argparse import json import sys from cgi import escape from collections import defaultdict import types def html_escape(item, escape_quote=False): if isinstance(item, types.StringTypes): rv = escape(item) if escape_quote: rv = rv.replace('"', "&quot;") return rv els...
{ 'name': 'Belgian Intrastat Declaration', 'version': '1.0', 'category': 'Reporting', 'description': """ Generates Intrastat XML report for declaration Based on invoices. """, 'author': 'Odoo SA', 'depends': ['report_intrastat', 'sale_stock', 'account_accountant', 'l10n_be'], 'data': [ ...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = r''' --- module: sefcontext short_description: Manages SELinux file context...
"""Sources for numpy arrays and pandas DataFrames.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.contrib.learn.python.learn.dataframe import transform from tensorflow.contrib.learn.python.learn.dataframe.queues import feeding_functions ...
class ModuleDocFragment(object): # Standard files documentation fragment DOCUMENTATION = """ options: host: description: - Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address f...
import os import unittest from tests.utils import ( setup_test_env, ) setup_test_env() from softwarecenter.backend.login import get_login_backend from softwarecenter.backend.login_impl.login_sso import ( LoginBackendDbusSSO) from softwarecenter.backend.login_impl.login_fake import ( LoginBackendDbusSSOFake...
from ..Qt import QtGui, QtCore __all__ = ['JoystickButton'] class JoystickButton(QtGui.QPushButton): sigStateChanged = QtCore.Signal(object, object) ## self, state def __init__(self, parent=None): QtGui.QPushButton.__init__(self, parent) self.radius = 200 self.setCheckable(True)...
import io import logging import os import re import sys from gunicorn._compat import unquote_to_wsgi_str from gunicorn.six import string_types, binary_type, reraise from gunicorn import SERVER_SOFTWARE import gunicorn.six as six import gunicorn.util as util try: # Python 3.3 has os.sendfile(). from os import ...
"""Contains the functions used to read the input file and print the checkpoint files with xml formatting. Copyright (C) 2013, Joshua More and Michele Ceriotti 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 Fou...
# -*- coding: utf-8 -*- """ Copyright (C) 2012 Dariusz Suchojad <dsuch at zato.io> Licensed under LGPLv3, see LICENSE.txt for terms and conditions. """ from __future__ import absolute_import, division, print_function, unicode_literals # stdlib from logging import DEBUG, getLogger from traceback import format_exc #...
# coding: utf-8 from .. import fixtures, config from ..assertions import eq_ from ..config import requirements from sqlalchemy import Integer, Unicode, UnicodeText, select from sqlalchemy import Date, DateTime, Time, MetaData, String, \ Text, Numeric, Float from ..schema import Table, Column from ... impor...
""" The Spatial Reference class, represensents OGR Spatial Reference objects. Example: >>> from django.contrib.gis.gdal import SpatialReference >>> srs = SpatialReference('WGS84') >>> print(srs) GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHOR...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community' } try: from pyVmomi import vim except ImportError: pass from ansible.module_utils.basic import AnsibleModule fro...
"""SCons.Tool.midl Tool-specific initialization for midl (Microsoft IDL compiler). There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001 - 2014 The SCons Foundation # # Permission is hereby ...
import os, sys sys.path.append(os.environ['PERF_EXEC_PATH'] + \ '/scripts/python/Perf-Trace-Util/lib/Perf/Trace') from perf_trace_context import * from Core import * from Util import syscall_name usage = "perf script -s syscall-counts-by-pid.py [comm]\n"; for_comm = None for_pid = None if len(sys.argv) > 2: sys....
#!/usr/bin/env python ''' fit best estimate of magnetometer offsets from ArduCopter flashlog using the algorithm from Bill Premerlani ''' import sys, time, os, math # command line option handling from optparse import OptionParser parser = OptionParser("magfit_flashlog.py [options]") parser.add_option("--verbose", ac...
import unittest from django.core.exceptions import ImproperlyConfigured from django.db import ProgrammingError try: from django.contrib.gis.db.backends.postgis.operations import PostGISOperations HAS_POSTGRES = True except ImportError: HAS_POSTGRES = False except ImproperlyConfigured as e: # If psycop...
import unittest from coalib.results.AbsolutePosition import AbsolutePosition, calc_line_col from coalib.misc.Constants import COMPLEX_TEST_STRING class AbsolutePositionTest(unittest.TestCase): def test_calc_line_col_newlines(self): # no newlines text = ("find position of 'z'",) z_pos = t...
"""Filename matching with shell patterns. fnmatch(FILENAME, PATTERN) matches according to the local convention. fnmatchcase(FILENAME, PATTERN) always takes case in account. The functions operate by translating the pattern into a regular expression. They cache the compiled regular expressions for speed. The function...
"""Export utilities (deprecated). This module and all its submodules are deprecated. See [contrib/learn/README.md](https://www.tensorflow.org/code/tensorflow/contrib/learn/README.md) for migration instructions. """ from __future__ import absolute_import from __future__ import division from __future__ import print_fun...
__author__ = 'chris' import sys, os, time, atexit from signal import SIGTERM class Daemon(object): """ A generic daemon class. Usage: subclass the Daemon class and override the run() method """ # pylint: disable=file-builtin def __init__(self, pidfile, stdin='/dev/null', stdout='/dev/null', st...
""" script for determing the peak in the spectrum Andre 10 July 2009 Usage python3 ./determinepeak.py [# of RCUs] """ # INIT import array import operator import os import time import sys import math import numpy # Read directory with the files to processs def open_dir(dirname) : files = list(filter(os.path.isfil...
from lib.cuckoo.common.abstracts import Signature class PcClientMutexes(Signature): name = "rat_pcclient" description = "创建常见PcClient互斥量(mutex)或相应的文件变动" severity = 3 categories = ["rat"] families = ["pcclient", "nex"] authors = ["threatlead"] references = ["https://malwr.com/analysis/MDIxN2...
import json import logging import os import subprocess import sys WORKING_DIR = os.environ.get('HEAT_ANSIBLE_WORKING', '/var/lib/heat-config/heat-config-ansible') OUTPUTS_DIR = os.environ.get('HEAT_ANSIBLE_OUTPUTS', '/var/run/heat-config/heat-config-ansible') ...
""" Run the unit tests for Signal """ import random from random import randrange random.seed(1) # random, but deterministic from types import GeneratorType import unittest from unittest import TestCase from myhdl import instance, instances def A(n): @instance def logic(): yield None return logi...
#Lab: Distance Converter #Student: Dana Stubkjaer def convert(distance, unit1, unit2): if unit1 == "mi": if unit2 == "mi": print (distance + " " + unit2) if unit2 == "km": print ((float(distance) * 1.60934)) if unit2 == "ft": print ((float...
""" housekeeping jobs, run this script as cronjob. Do not forget to change KEYTAB to the location where your janitor.keytab file is. """ from UniDomain import Classes import re def detect_bad_hosts(authen, db): """Searches for hosts which are missing from ldap or kerberos. returns a array with problems.""" ...
from __future__ import print_function, division import os.path import CoolProp import CoolProp.CoolProp import subprocess import sys import numpy as np import matplotlib matplotlib.use('Agg') #Force mpl to use a non-GUI backend import matplotlib.pyplot as plt web_dir = os.path.abspath(os.path.join(os.path.dirname(__...
""" FILE: blob_samples_copy_blob.py DESCRIPTION: This sample demos how to copy a blob from a URL. USAGE: python blob_samples_copy_blob.py Set the environment variables with your own values before running the sample. 1) AZURE_STORAGE_CONNECTION_STRING - the connection string to your storage account """ from...
""" Verify that a hard_dependency that is not exported is not pulled in as a dependency for a target if the target does not explicitly specify a dependency and none of its dependencies export the hard_dependency. """ import TestGyp test = TestGyp.TestGyp() if test.format == 'dump_dependency_json': test.skip_test('...
"""Bases class for interfaces to provide 'light' interface handling. TODO: _ implements a check method which check that an object implements the interface _ Attribute objects This module requires at least python 2.2 """ __docformat__ = "restructuredtext en" class Interface(object): """Base class for ...
from Source import Source from Components.Element import cached class List(Source, object): """The datasource of a listbox. Currently, the format depends on the used converter. So if you put a simple string list in here, you need to use a StringList converter, if you are using a "multi content list styled"-list, you ...
#coding: UTF-8 import sys import traceback from pygmapslib import PyGMaps, PyGMapsError __all__ = ['GeocodingError', 'Geocoding', 'request'] class GeocodingError(Exception): def __init__(self, error_status, params): self.error_status = error_status self.params = params def __str__(self): ...
""" Unittests for exporting to git via management command. """ import copy import os import shutil import StringIO import subprocess import unittest from uuid import uuid4 from django.conf import settings from django.core.management import call_command from django.core.management.base import CommandError from django....
import account_payment_order
from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'network'} from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.connection i...
""" This module contains classes that allow constructing filter for an LDAP search in a straightforward and intuitive manner. @author: Andy Georges @author: Stijn De Weirdt Examples: from vsc.ldap.filter import LdapFilter >>> f = LdapFilter("x=4") >>> g = LdapFilter("y=5") >>> h = LdapFilter("z=3") >>> print "f = ...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} import json import logging from pprint import pformat from ansible.module_utils.basic impor...
import os import gzip from spacewalk.common.fileutils import createPath from spacewalk.common.rhnLib import hash_object_id class MissingXmlDiskSourceFileError(Exception): pass class MissingXmlDiskSourceDirError(Exception): pass class DiskSource: subdir = None # Allow for compressed files by defaul...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the Microsoft Internet Explorer WebCache database.""" import unittest from plaso.lib import definitions from plaso.parsers.esedb_plugins import msie_webcache from tests.parsers.esedb_plugins import test_lib class MsieWebCacheESEDBPluginTest(test_lib.ESEDB...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('sampleapp', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='category', name='l...
import avango import avango.script from avango.script import field_has_changed import avango.gua from examples_common.GuaVE import GuaVE STEREO_MODE = avango.gua.StereoMode.ANAGLYPH_RED_CYAN # STEREO_MODE = avango.gua.StereoMode.ANAGLYPH_RED_GREEN # STEREO_MODE = avango.gua.StereoMode.SIDE_BY_SIDE # STEREO_MODE = avan...
""" This module contains the spatial lookup types, and the `get_geo_where_clause` routine for Oracle Spatial. Please note that WKT support is broken on the XE version, and thus this backend will not work on such platforms. Specifically, XE lacks support for an internal JVM, and Java libraries are required to use...
import logging try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from cpc.util.conf.server_conf import ServerConf, ServerIdNotFoundException from cpc.util.version import __version__ from server_command import ServerCommand from server_command import ServerCommandError from...
import storm from random import random class TesterBolt(storm.Bolt): def initialize(self, conf, context): storm.emit(['bolt initializing']) def process(self, tup): word = tup.values[0]; if (random() < 0.75): storm.emit([word + 'lalala'], anchors=[tup]) storm.ack...
import unittest import os import IECore import GafferImage class SelectTest( unittest.TestCase ) : rPath = os.path.expandvars( "$GAFFER_ROOT/python/GafferTest/images/redWithDataWindow.100x100.exr" ) gPath = os.path.expandvars( "$GAFFER_ROOT/python/GafferTest/images/greenWithDataWindow.100x100.exr" ) bPath = os.pat...
import re import sys import os import datetime import codecs if len (sys.argv) < 3: print ("Usage: %s SOURCE DESTINATION" % sys.argv[0]) exit (0) indir = sys.argv[1] outdir = sys.argv[2] basedir = os.path.join (outdir, "lib/libgcrypt-grub") try: os.makedirs (basedir) except: print ("WARNING: %s alread...
class ModuleDocFragment(object): # Standard files documentation fragment DOCUMENTATION = """ options: provider: description: - B(Deprecated) - "Starting with Ansible 2.5 we recommend using C(connection: network_cli)." - For more information please see the L(Network Guide, ../network/get...
#!/usr/bin/env python """ Copyright (c) 2006-2017 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ from lib.core.common import Backend from lib.core.data import conf from lib.core.data import kb from lib.core.dicts import DBMS_DICT from lib.core.enums import DBMS from lib.c...
import ast import os from .context import Context class BaseAnalyzer(object): """ Base code analyzer class. Takes dict `file path => ast node` as first param and path to repository as second. Subclass this class and implement `analyze_file` method if you want to create new code analyzer. """ ...
#! /usr/bin/python #coding: utf-8 import sys import os import re def findAllFile(dir): folder = [dir] file = [] while len(folder) > 0: curDir = folder[0] folder.pop(0) lst = os.listdir(curDir) for i in lst: name = curDir + '\\' + i if os.path.isfile(name) == True: file.append(name) else...
from PyQt4.Qt import * from numpy import * import Avogadro import sys import unittest from util import * class TestCamera(unittest.TestCase): def setUp(self): # create the GLWidget and load the default engines self.glwidget = Avogadro.GLWidget() self.glwidget.loadDefaultEngines() self.molecule ...
#!/usr/bin/env python """Gather information from the registry on windows.""" from grr_response_core import config from grr_response_core.lib import artifact_utils from grr_response_core.lib.rdfvalues import file_finder as rdf_file_finder from grr_response_core.lib.rdfvalues import paths as rdf_paths from grr_response_...
from django.http import HttpRequest, HttpResponse from django.utils.translation import ugettext as _ from typing import Text from zerver.decorator import to_non_negative_int from zerver.lib.actions import do_update_pointer from zerver.lib.request import has_request_variables, JsonableError, REQ from zerver.lib.respons...
""" :mod: DErrno ========================== .. module: DErrno :synopsis: Error list and utilities for handling errors in DIRAC This module contains list of errors that can be encountered in DIRAC. It complements the errno module of python. It also contains utilities to manipulate these err...
"""Process the output of the power allocator trace in the current directory's trace.dat""" from collections import OrderedDict import pandas as pd import re from trappy.base import Base from trappy.dynamic import register_ftrace_parser class Thermal(Base): """Process the thermal framework data in a FTrace dump""...
""" A poll() based implementation of the twisted main loop. To install the event loop (and you should do this before any connections, listeners or connectors are added):: from twisted.internet import pollreactor pollreactor.install() """ # System imports import errno, sys from select import error as SelectEr...
import os,sys,inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) cqsdir = os.path.abspath(os.path.dirname(currentdir) + "/CQS") sys.path.insert(0,cqsdir) import logging import argparse import string import subprocess from LocusItem import LocusItem, readBedFile from FileLis...
#!/usr/bin/env python # encoding: utf-8 """ run_lastz.py Created by Brant Faircloth on 2010-02-24. Copyright (c) 2010 Brant Faircloth. All rights reserved. # Description A helper script to run lastz. """ import pdb import sys import os import time import optparse import tempfile import subprocess import bx.seq.two...
import abc import six @six.add_metaclass(abc.ABCMeta) class RoutingDriverBase(object): """Base class that defines an abstract interface for the Routing Driver. This class defines the abstract interface/API for the Routing and NAT related operations. Driver class corresponding to a hosting device shou...