content
stringlengths
4
20k
""" The eos lldp_global fact class It is in this file the configuration is collected from the device for a given resource, parsed, and the facts tree is populated based on the configuration. """ from __future__ import (absolute_import, division, print_function) __metaclass__ = type import re from copy import deepcopy...
"""System configuration library. @@get_include @@get_lib """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os.path as _os_path from mxconsole.util.all_util import remove_undocumented # pylint: disable=g-import-not-at-top def get_include(): "...
from __future__ import unicode_literals import frappe from frappe import _ from frappe.model.document import Document class BackupManager(Document): pass def take_backups_daily(): take_backups_if("Daily") def take_backups_weekly(): take_backups_if("Weekly") def take_backups_if(freq): if frappe.db.get_value("Ba...
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import ( compat_urlparse, ) class MotorsportIE(InfoExtractor): IE_DESC = 'motorsport.com' _VALID_URL = r'http://www\.motorsport\.com/[^/?#]+/video/(?:[^/?#]+/)(?P<id>[^/]+)/?(?:$|[?#])' _TEST = { ...
#!/usr/bin/env python import sys,os import reader # boilerplate from enthought.traits.api import HasTraits, Instance from enthought.traits.ui.api import View, Item from enthought.chaco.api import Plot, ArrayPlotData from enthought.enable.component_editor import ComponentEditor from numpy import linspace, sin, array, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """IDSGrep is a GNU Grep wrapper that understands IPv4-addresses, IPv4CIDRs, IPv4-Ranges and Domains """ import logging logging.basicConfig(format="%(asctime)s - %(levelname)8s - %(message)s") import sys import datetime import csv import ConfigParser import argparse imp...
# encoding: utf-8 """ operational/__init__.py Created by Thomas Mangin on 2013-09-01. Copyright (c) 2009-2015 Exa Networks. All rights reserved. """ from struct import pack from struct import unpack from exabgp.protocol.family import AFI from exabgp.protocol.family import SAFI from exabgp.bgp.message.open.routerid i...
class FailureMap(object): def __init__(self): self._failures = [] def add_regression_window(self, builder, regression_window): self._failures.append({ 'builder': builder, 'regression_window': regression_window, }) def is_empty(self): return not self....
class InvalidDefinitionError(Exception): pass class NotFoundError(Exception): pass class ProcessingError(Exception): ''' An error occurred while processing a request to the XModule. For example: if an exception occurs while checking a capa problem. ''' pass class InvalidVersionError(Ex...
""" naivefit.py A NaiveFit follows the approach described in Crundall et al. (2019). NaiveFit begins with an initial guess provided by user of an N component fit. If no guess is provided, all provided stars are assumed to be members of one component. NaiveFit will perform an Expectation Maximisation on this N compo...
import errno import http.client import json import os import socket import sys import time import urllib.parse from . import cache __all__ = ( 'GitHub', 'Checklist', 'TESTING', 'NO_TESTING', 'NOT_TESTED' ) TESTING = "Testing in progress" NOT_TESTED = "Not yet tested" NO_TESTING = "Manual testing ...
from models import CorpPOS import eveapi from API import cache_handler as handler def add_status_info(poses): """Accepts a list of corp poses and returns a list of POSes with status information attached. A posstatus object has the following attributes: itemid: the POS item id pos: POS object proc...
""" Invokes git diff [args...] and inserts file:line in front of each line of diff output where possible. This is useful from an IDE that allows you to double-click lines that begin with file:line to open and jump to that point in the file. Synopsis: %prog [git diff args...] Examples: %prog %prog HEAD ...
""" Helper functions for managing processes. """ import atexit import os import signal import subprocess import sys import psutil from paver import tasks def kill_process(proc): """ Kill the process `proc` created with `subprocess`. """ p1_group = psutil.Process(proc.pid) child_pids = p1_group....
import logging import random import tba_config import urllib import uuid from google.appengine.ext import deferred from google.appengine.api import memcache from google.appengine.api import urlfetch from controllers.gcm.gcm import GCMMessage from consts.client_type import ClientType from consts.notification_type impo...
""" Tests for the sync course runs management command. """ from unittest import mock import ddt from django.core.management import call_command from openedx.core.djangoapps.catalog.tests.factories import CourseRunFactory from openedx.core.djangoapps.catalog.management.commands.sync_course_runs import Command as sync_...
"""Handling of RSA and DSA keys. This module is unstable. Maintainer: U{Paul Swartz<mailto:<EMAIL>>} """ # base library imports import base64 import string import sha, md5 # external library imports from Crypto.Cipher import DES3 from Crypto.PublicKey import RSA, DSA from Crypto import Util #twisted from twisted.p...
""" Defines utilities useful for performing standard "configuration" style tasks. """ import re import os def configure_file(input_path, output_path, substitutions): """configure_file(input_path, output_path, substitutions) -> bool Given an input and output path, "configure" the file at the given input path ...
from lib import l10n_utils from bedrock.thunderbird.details import thunderbird_desktop from lib.l10n_utils.dotlang import _ def all_downloads(request, channel): if channel is None: channel = 'release' if channel == 'earlybird': channel = 'alpha' version = thunderbird_desktop.latest_versi...
from core.moduleguess import ModuleGuess from core.moduleexception import ModuleException, ProbeSucceed, ProbeException, ExecutionException from core.argparse import ArgumentParser WARN_NO_SUCH_FILE = 'No such file or permission denied' WARN_DELETE_FAIL = 'Cannot remove, check permission or recursion' WARN_DELETE_OK =...
from win32com.client import GetObject import hooky _OBJ_NAME = 'Win32_PrinterDriver' B32 = 'Windows NT x86' B64 = 'Windows x64' class Drivers(hooky.Dict): def __init__(self): super().__init__() self._Driver = GetObject('winmgmts:/root/cimv2').Get('Win32_PrinterDriver') def __iter__(self): ...
import sys, os sys.path = [os.path.join(os.getcwd(), "..") ] + sys.path from tileConfig import TileConfig, TileDesc, MachineDesc, SaveConfig, LoadConfig, TileLocation, Rect, LocalWindow def CreateLocalTestConfig(): c = TileConfig() t0 = TileDesc( (400, 400), (0,0), ":0", localWindowId=0) t1 = TileDesc...
''' Device capabilities As defined in USB 3.1 spec, section 9.6.2 ''' import struct from umap2.core.usb import DescriptorType from umap2.core.usb_base import USBBaseActor from umap2.fuzz.helpers import mutable class USBDeviceCapability(USBBaseActor): WIRELESS_USB = 0x01 USB_20_EXTENSION = 0x02 SUPERSPEE...
import math from gimpfu import * def sphere(radius, light, shadow, foo, bg_colour, sphere_colour): if radius < 1: radius = 1 width = int(radius * 3.75) height = int(radius * 2.5) gimp.context_push() img = gimp.Image(width, height, RGB) drawable = gimp.Layer(img, "Sphere Layer", widt...
"""Tests for tf.contrib.tensor_forest.ops.allocate_deallocate_op.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow # pylint: disable=unused-import from tensorflow.contrib.tensor_forest.python.ops import tensor_forest_ops from tensorflo...
# -*- coding: utf-8 -*- """ pygments.styles.paraiso_light ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Paraíso (Light) by Jan T. Sott Pygments template by Jan T. Sott (https://github.com/idleberg) Created with Base16 Builder by Chris Kempson (https://github.com/chriskempson/base16-builder). :copyright: ...
import unittest import numpy as np from pele.utils.hessian import * from pele.utils.hessian import get_smallest_eig_nohess, get_smallest_eig_sparse, get_smallest_eig_arpack class TestEig(unittest.TestCase): def setUp(self): np.random.seed(0) from pele.systems import LJCluster natoms = 10 ...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.module_utils.facts.utils import get_file_content from ansible.module_utils.facts.collector import BaseFactCollector class FipsFactCollector(BaseFactCollector): name = 'fips' _fact_ids = set() def collec...
""" This converter works with classes protected by a namespace with SWIG pointers (Python strings). To use it to wrap classes in a C++ namespace called "ft", use the following: class ft_converter(cpp_namespace_converter): namespace = 'ft::' """ from __future__ import absolute_import, print_functio...
#!/usr/bin/env python2 from pwn import * import time level = 1 host = 'vortex.labs.overthewire.org' user = 'vortex%i' % level chal = 'vortex%i' % level password = args['PASSWORD'] passfile = '/etc/vortex_pass/vortex%i' % (level+1) binary = '/vortex/%s' % chal shell = ssh(host=host, user=user, pas...
from yandextank.plugins.Telegraf.config import ConfigManager, AgentConfig import sys if sys.version_info[0] < 3: from ConfigParser import ConfigParser else: from configparser import ConfigParser class TestConfigManager(object): def test_rawxml_parse(self): """ raw xml read from string """ ...
#!/usr/bin/env python # # Wrapper script for Java Conda packages that ensures that the java runtime # is invoked with the right options. Adapted from the bash script (http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in/246128#246128). # # Program Parameters # import os import s...
"""Module responsible for loading the main components of the application. """ import sys import logging import os from PyQt4.QtGui import QApplication from PyQt4.QtCore import Qt from ic import log as ic_log LOG = None def create_logger(): """Set up the logging utility, using the formatter that best matches the...
import pytest from django.db.models import BooleanField, Case, When from api.base.settings.defaults import API_BASE from osf.models import Subject from osf_tests.factories import SubjectFactory @pytest.mark.django_db class TestTaxonomy: @pytest.fixture(autouse=True) def subject(self): return Subjec...
import sys import os.path if sys.hexversion >= 0x03000000: from PyQt4.uic.port_v3.as_string import as_string else: from PyQt4.uic.port_v2.as_string import as_string class IconCache(object): """Maintain a cache of icons. If an icon is used more than once by a GUI then ensure that only one copy is cre...
""" Dict client protocol implementation. @author: Pavel Pergamenshchik """ from twisted.protocols import basic from twisted.internet import defer, protocol from twisted.python import log from StringIO import StringIO def parseParam(line): """Chew one dqstring or atom from beginning of line and return (param, rem...
# -*- coding: utf-8 -*- """ tests.internal ~~~~~~~~~~~~~~ Internal tests. :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import pytest from datetime import datetime from warnings import filterwarnings, resetwarnings from werkzeug.wrappers import Request,...
""" Set of basic operations/utilities that are used by the build. """ from contextlib import contextmanager import ast import cStringIO import copy import errno import fnmatch import glob import json import os import re import shutil import socket import stat import subprocess import sys import threading import time i...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'UserSignupSource.user_id' db.delete_column('student_usersignupsource', 'user_id_id') ...
"""Prints the information in a sln file in a diffable way. It first outputs each projects in alphabetical order with their dependencies. Then it outputs a possible build order. """ from __future__ import print_function import os import re import sys import pretty_vcproj __author__ = 'nsylvain (Nicolas Syl...
#!/usr/bin/env python from utils.munin.base import MuninGraph class NBMuninGraph(MuninGraph): @property def graph_config(self): return { 'graph_category' : 'NewsBlur', 'graph_title' : 'NewsBlur Users', 'graph_vlabel' : 'users', 'graph_args' : '-l 0', ...
from django.core.exceptions import PermissionDenied from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.views.decorators.http import require_http_methods from django.utils.translation import ugettext as _ from django.views.decorators.http import require_POST...
import re import string import sys import generate import rfc3454 if len(sys.argv) != 3: print("usage: %s rfc3454.txt outdir" % sys.argv[0]) sys.exit(1) tables = rfc3454.read(sys.argv[1]) bidi_h = generate.Header('%s/bidi_table.h' % sys.argv[2]) bidi_c = generate.Implementation('%s/bidi_table.c' % sys.argv...
import logging import re from django.contrib.staticfiles.storage import staticfiles_storage from django.contrib.staticfiles import finders from django.conf import settings from static_replace.models import AssetBaseUrlConfig, AssetExcludedExtensionsConfig from xmodule.modulestore.django import modulestore from xmodul...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import math import os import random import zipfile import numpy as np from six.moves import urllib from six.moves import xrange # pylint: disable=redefined-builtin import tensorflow as tf ...
""" Manage hosts in the current zone. """ import nova.scheduler.base_baremetal_host_manager as bbhm from nova.scheduler import host_manager class BaremetalNodeState(bbhm.BaseBaremetalNodeState): """Mutable and immutable information tracked for a host. This is an attempt to remove the ad-hoc data structures ...
""" X25519 key management """ from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import x25519 from .general import KeyClass class X25519UsageError(Exception): pass class X25519Public(KeyClass): d...
""" Machine Learning module in python ================================= sklearn is a Python module integrating classical machine learning algorithms in the tightly-knit world of scientific Python packages (numpy, scipy, matplotlib). It aims to provide simple and efficient solutions to learning problems that are acces...
"""Unittests for TestRunResults.""" import unittest from base_test_result import BaseTestResult from base_test_result import TestRunResults from base_test_result import ResultType class TestTestRunResults(unittest.TestCase): def setUp(self): self.p1 = BaseTestResult('p1', ResultType.PASS, log='pass1') oth...
from django.contrib.gis.gdal import OGRGeomType from django.db.backends.sqlite3.introspection import ( DatabaseIntrospection, FlexibleFieldLookupDict, ) from django.utils import six class GeoFlexibleFieldLookupDict(FlexibleFieldLookupDict): """ Sublcass that includes updates the `base_data_types_...
import os from importlib import import_module from django.core.exceptions import ImproperlyConfigured from django.utils._os import upath from django.utils.module_loading import module_has_submodule MODELS_MODULE_NAME = 'models' class AppConfig(object): """ Class representing a Django application and its con...
#!/usr/bin/env python from sys import platform import subprocess from subprocess import Popen, PIPE import sys def platform_check(): if platform == "linux" or platform == "linux2": print "Linux" elif platform == "darwin": print "OS X" elif platform == "win32": print "Windows" e...
import time from django.conf import settings from django.utils.cache import patch_vary_headers from django.utils.http import cookie_date from django.utils.importlib import import_module class SessionMiddleware(object): def process_request(self, request): engine = import_module(settings.SESSION_ENGINE) ...
""" .. dialect:: oracle+zxjdbc :name: zxJDBC for Jython :dbapi: zxjdbc :connectstring: oracle+zxjdbc://user:pass@host/dbname :driverurl: http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html .. note:: Jython is not supported by current versions of SQLAlchemy. The zxjdbc...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'certified'} DOCUMENTATION = r''' --- module: bigip_message_routing_protocol short_description: Manage ge...
from __future__ import division, absolute_import, print_function from distutils.command.build_py import build_py as old_build_py from numpy.distutils.misc_util import is_string class build_py(old_build_py): def run(self): build_src = self.get_finalized_command('build_src') if build_src.py_modules...
from optparse import OptionParser import sys import graph def init_parser(): parser = OptionParser() parser.add_option("-f", "--file", dest = "File", type = "string", help = "") parser.add_option("-o", "--output", dest = "Output", type = "string", help = "") (options, args) = parser.parse_args() # use...
__author__ = '<EMAIL> (Jeff Scudder)' import base64 class BasicAuth(object): """Sets the Authorization header as defined in RFC1945""" def __init__(self, user_id, password): self.basic_cookie = base64.encodestring( '%s:%s' % (user_id, password)).strip() def modify_request(self, http_request): ...
# f1/s/docker/rfidreader.py # import time from f1.s.docker.f1time import Time from f1.s.docker.base_device import BaseDevice from autobahn.wamp.message import Published from twisted.internet.defer import inlineCallbacks from autobahn.twisted.util import sleep from autobahn.twisted.wamp import ApplicationSession from...
"""Run all tests from *_test.py files.""" import os import unittest def ModuleName(filename, base_dir): """Given a filename, convert to the python module name.""" filename = filename.replace(base_dir, '') filename = filename.lstrip(os.path.sep) filename = filename.replace(os.path.sep, '.') if filename.ends...
from unittest.mock import patch from django.contrib.auth.models import User from django.core.management import call_command from django.shortcuts import reverse from django.test import Client, TestCase from dataschema_manager.models import DataSchema from experiments_manager.models import Experiment from git_manager....
import os import tempfile import unittest import mock from azure.cli.core.util import CLIError from azure.cli.command_modules.acs.custom import ( _validate_service_principal, load_acs_service_principal, store_acs_service_principal, _build_service_principal) class AcsServicePrincipalTest(unittest.Test...
# -*- coding: utf-8 - Python 3.5.1 *- """ Description: Grab Time Series data From USGS Web Service Input(s) : USGS Gages, Parameters Output(s) : .rdb time series files <EMAIL> Created on Tue Apr 19 15:08:33 2016 """ # Import libraries import pandas as pd import requests import json from datetime import...
""" Warning class to hold info about each warning. """ class Warning : "Class which holds error information." def __init__(self, file, line, err) : if hasattr(file, "function") : file = file.function.func_code.co_filename elif hasattr(file, "co_filename") : file = file...
from typing import Optional from gi.repository import Gtk, GObject from injector import inject from opendrop.app.common.services.acquisition import AcquirerType, ImageAcquisitionService, ImageAcquirer from opendrop.appfw import Presenter, TemplateChild, component @component( template_path='./image_acquisition.u...
import subprocess document_template = r"""\documentclass{article} \usepackage{amsmath} \begin{document} %s \end{document} """ def latexml(math_code, reporter=None): """Convert LaTeX math code to MathML with LaTeXML_ .. _LaTeXML: http://dlmf.nist.gov/LaTeXML/ """ p = subprocess.Popen(['latexml', ...
#!/usr/bin/python -Wall # ================================================================ # John Kerl # <EMAIL> # 2010-02-02 # ================================================================ from __future__ import division import sys, re import tabutil_m, stats_m from math import log, exp # ------------------------...
# -*- coding:utf-8 -*- from datetime import datetime, timedelta from calendar import timegm from django.test import TestCase from django.utils.http import parse_etags, quote_etag FULL_RESPONSE = 'Test conditional get response' LAST_MODIFIED = datetime(2007, 10, 21, 23, 21, 47) LAST_MODIFIED_STR = 'Sun, 21 Oct 2007 23...
"""Simple class to read IFF chunks. An IFF chunk (used in formats such as AIFF, TIFF, RMFF (RealMedia File Format)) has the following structure: +----------------+ | ID (4 bytes) | +----------------+ | size (4 bytes) | +----------------+ | data | | ... | +----------------+ The ID is a 4-byte s...
from ophyd import PVPositioner, EpicsSignal, EpicsSignalRO, Device from ophyd.signal import AttributeSignal from ophyd.mixins import EpicsSignalPositioner from ophyd import Component as C from ophyd import Component as Cpt from ophyd.device import DeviceStatus class CS700TemperatureController(PVPositioner): readb...
import datetime import hmac import logging import math import random import re import sys import time import urllib from django import http from django.conf import settings from django.utils import safestring from common import clean from common import exception try: import uuid _generate_uuid = lambda: uuid.uui...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import re import time import glob from ansible.plugins.action.vyos import ActionModule as _ActionModule from ansible.module_utils._text import to_text from ansible.module_utils.six.moves.urllib.parse import urlsplit from...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Task.elapsed_time' db.alter_column(u'grabstat_task', 'elapsed_time', self.gf('django.db.m...
import os.path import gzip import tarfile TARGZ_DEFAULT_COMPRESSION_LEVEL = 9 def make_tarball(tarball_path, sources, base_dir, prefix_dir=''): """Parameters: tarball_path: output path of the .tar.gz file sources: list of sources to include in the tarball, relative to the current directory base_dir: i...
from django.contrib.auth.forms import UserCreationForm, UserChangeForm from django.contrib.auth import get_user_model from django import forms from django.utils.translation import ugettext, ugettext_lazy as _ from captcha.fields import CaptchaField from accounts.models import CustomUser from accounts.mixins import Remo...
#!/usr/bin/env python import os import sys from _jb_utils import FileChangesTracker, jb_escape_output from fix_getpass import fixGetpass from pycharm_run_utils import adjust_django_sys_path try: from runpy import run_module except ImportError: from runpy_compat import run_module adjust_django_sys_path() base...
from heat.common import exception from heat.common.i18n import _ from heat.engine import constraints from heat.engine import properties from heat.engine.resources.openstack.neutron import neutron from heat.engine import support class SecurityGroup(neutron.NeutronResource): support_status = support.SupportStatus(...
"""A minimal subset of the locale module used at interpreter startup (imported by the _io module), in order to reduce startup time. Don't import directly from third-party code; use the `locale` module instead! """ import sys import _locale if sys.platform.startswith("win"): def getpreferredencoding(do_setlocale=...
"""Implementation of treadmill-admin CLI plugin.""" import logging import pkgutil import click import dns.exception # pylint: disable=E0611 import kazoo import kazoo.exceptions import ldap3 from treadmill import restclient from treadmill import cli from treadmill import context __path__ = pkgutil.extend_path(__p...
from __future__ import print_function from builtins import object from Exscript.protocols.drivers import drivers class OsGuesser(object): """ The OsGuesser monitors everything that happens on a Protocol, and attempts to collect data out of the network activity. It watches for specific patterns in the...
"Base Cache class." from __future__ import unicode_literals import time import warnings from django.core.exceptions import ImproperlyConfigured, DjangoRuntimeWarning from django.utils.module_loading import import_string class InvalidCacheBackendError(ImproperlyConfigured): pass class CacheKeyWarning(DjangoRun...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.errors.yaml_strings import ( YAML_POSITION_DETAILS, YAML_COMMON_UNQUOTED_VARIABLE_ERROR, YAML_COMMON_DICT_ERROR, YAML_COMMON_UNQUOTED_COLON_ERROR, YAML_COMMON_PARTIALLY_QUOTED_LINE_ERROR...
"""Helper functions for tracker file functionality.""" import errno import hashlib import json import os import re from boto import config from gslib.exception import CommandException from gslib.util import CreateDirIfNeeded from gslib.util import GetGsutilStateDir from gslib.util import ResumableThreshold from gslib...
# classifier from sklearn.linear_model import LogisticRegression from gensim.models import Doc2Vec import numpy from GeneraVectores import GeneraVectores from sklearn import svm from NNet import NeuralNet if __name__ == '__main__': model = Doc2Vec.load('./imdb_dbow.d2v') #print model["TRAIN_POS_8029"] #exit() dim...
import json import os import multiprocessing import signal import socket import sys import time from mozlog.structured import get_default_logger, handlers from wptlogging import LogLevelRewriter here = os.path.split(__file__)[0] serve = None sslutils = None hostnames = ["web-platform.test", "www.web-...
# -*- coding: utf-8 -*- """ oauthlib.oauth2.rfc6749.grant_types ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ from __future__ import unicode_literals, absolute_import import json from oauthlib.common import log from .base import GrantTypeBase from .. import errors from ..request_validator import RequestValidator class Re...
# -*- coding: utf-8 -*- """ tests.blueprints ~~~~~~~~~~~~~~~~ Blueprints (and currently modules) :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import pytest import flask from flask._compat import text_type from werkzeug.http import parse_cache_control_...
class Waveband(dict): """Base class to define a waveband""" def __init__(self): super(Waveband,self).__init__() self.ucd = None class Radio(Waveband): def __init__(self): super(Radio,self).__init__() self.ucd = 'em.radio' class Millimeter(Waveband): def __init__(self): ...
# coding: utf-8 """ Wavefront REST API <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST ...
"""cryptomath module This module has basic math/crypto code.""" import os import sys import math import base64 import binascii if sys.version_info[:2] <= (2, 4): from sha import sha as sha1 else: from hashlib import sha1 from .compat import * # ******************************************************************...
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsServer WMS GetPrint. From build dir, run: ctest -R PyQgsServerWMSGetMapDxf -V .. note:: 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...
# -*- coding: utf-8 -*- import win32con import sys import os import ctypes from ProcessWithLogon import CreateProcessWithLogonW from ProcessWithLogon import STARTUPINFO from win32com.shell.shell import ShellExecuteEx from win32com.shell import shellcon import logging log = logging.getLogger(__name__) def get_privi...
from shinken_test import * class TestServiceWhithBadHost(ShinkenTest): def setUp(self): try: self.setup_with_file('etc/shinken_srv_badhost.cfg') except AttributeError: pass # Nagios allow service with no host to exist, it will just drop them def test_ServiceWhitNoH...
import zipfile from xml.sax import make_parser,handler from xml.sax.xmlreader import InputSource import xml.sax.saxutils from cStringIO import StringIO MANIFESTNS="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0" #----------------------------------------------------------------------------- # # ODFMANIFESTHANDLER ...
from django.conf.urls import url, include from django.conf import settings from django.conf.urls.static import static from django.urls import path from tmv_app.views import * from django.contrib.auth.decorators import login_required app_name = 'tmv_app' urlpatterns = [ url(r'^$', login_required(runs), name='inde...
"""\ Observer.\ """ __license__ = """\ Copyright (c) 2014 - 2017 Jiří Kučera. 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, ...
""" Support for monitoring pyLoad. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.pyload/ """ from datetime import timedelta import logging from aiohttp.hdrs import CONTENT_TYPE import requests import voluptuous as vol from homeassistant.compone...
from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from pex.pex_info import PexInfo from pants.backend.python.targets.python_binary import PythonBinary from pants.backend.python.tasks.python_task import Pyt...
"Módulo para Trazabilidad de Precursores Químicos RENPRE Resolución 900/12" # Información adicional y documentación: # http://www.sistemasagiles.com.ar/trac/wiki/TrazabilidadPrecursoresQuimicos __author__ = "Mariano Reingart <<EMAIL>>" __copyright__ = "Copyright (C) 2011 Mariano Reingart" __license__ = "GPL 3.0+" __v...
import unittest from empty_dir_file_system import EmptyDirFileSystem from instance_servlet import InstanceServlet from servlet import Request from fail_on_access_file_system import FailOnAccessFileSystem from test_branch_utility import TestBranchUtility from test_util import DisableLogging # XXX(kalman): what is this...