content
stringlengths
4
20k
import time from eucaops import Eucaops from eucaops import ELBops from boto.ec2.elb import LoadBalancer from eutester.eutestcase import EutesterTestCase import os import random class LoadBalancing(EutesterTestCase): def __init__(self, extra_args= None): self.setuptestcase() self.setup_parser() ...
""" NLTK Twitter client This module offers methods for collecting and processing Tweets. Most of the functionality depends on access to the Twitter APIs, and this is handled via the third party Twython library. If one of the methods below returns an integer, it is probably a `Twitter error code <https://dev.twitter.c...
from scrapy.spider import BaseSpider class InitSpider(BaseSpider): """Base Spider with initialization facilities""" def __init__(self, *a, **kw): super(InitSpider, self).__init__(*a, **kw) self._postinit_reqs = [] self._init_complete = False self._init_started = False ...
from problem import Ccpp from reportclient import ask_yes_no from abrtcli import config from abrtcli.match import match_get_problems from abrtcli.i18n import _ from abrtcli.utils import format_problems from . import Command, run_command class Info(Command): aliases = ['bt'] name = 'backtrace' description...
#!/usr/bin/env python # -*- coding: utf-8 -*- import jieba import threading def inittokenizer(tokenizer, group): print('===> Thread %s:%s started' % (group, threading.current_thread().ident)) tokenizer.initialize() print('<=== Thread %s:%s finished' % (group, threading.current_thread().ident)) tokrs1 = [jieba.Tok...
""" FILE: sample_batching.py DESCRIPTION: These samples demonstrate how to use the batch transaction API to perform multiple operations within a single request USAGE: python sample_batching.py Set the environment variables with your own values before running the sample: 1) AZURE_STORAGE_CONNECTIO...
from __future__ import division from . import der, ecdsa class UnknownCurveError(Exception): pass def orderlen(order): return (1+len("%x"%order))//2 # bytes # the NIST curves class Curve: def __init__(self, name, curve, generator, oid): self.name = name self.curve = curve self.ge...
# -*- coding: utf-8 -*- """ Django settings for cmrkinc project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ from __future__ import absolute_import, unicode_lit...
__version__=''' $Id$ ''' __doc__='''Utility functions to position and resize boxes within boxes''' def aspectRatioFix(preserve,anchor,x,y,width,height,imWidth,imHeight): """This function helps position an image within a box. It first normalizes for two cases: - if the width is None, it assumes imWidth ...
# coding: utf-8 from django.db import models class Author(models.Model): name = models.CharField(max_length=100) age = models.IntegerField() friends = models.ManyToManyField('self', blank=True) def __unicode__(self): return self.name class Publisher(models.Model): name = models.CharField...
from os import environ import os from twisted.internet.defer import inlineCallbacks from autobahn.twisted.util import sleep from autobahn.twisted.wamp import ApplicationSession, ApplicationRunner class ClientSession(ApplicationSession): """ An application component that publishes an event every second. "...
from statsmodels.compat.python import range import numpy as np from numpy.testing import (assert_array_almost_equal, assert_almost_equal, assert_equal) from statsmodels.tsa.arima_process import (arma_generate_sample, arma_acovf, arma_acf, arma_impulse_response, lpol_...
""" RenderPipeline Copyright (c) 2014-2016 tobspr <<EMAIL>> 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, mo...
from java.lang import IllegalThreadStateException, InterruptedException from java.util import Collections, WeakHashMap from java.util.concurrent import Semaphore, CyclicBarrier from java.util.concurrent.locks import ReentrantLock from org.python.util import jython from org.python.core import Py from thread import _newF...
ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'committer', 'version': '1.0'} DOCUMENTATION = r''' --- module: win_chocolatey version_added: "1.9" short_description: Installs packages using chocolatey description: - Installs packages using Chocolatey (http://choc...
### import sys import numpy as np from dynamic_graph import plug import dynamic_graph.signal_base as dgsb from dynamic_graph.sot.core import Stack_of_vector, OpPointModifier, MatrixHomoToPose, Multiply_matrixHomo_vector from dynamic_graph.sot.application.state_observation.initializations.hrp2_model_base_flex_estimator_...
from . import product
"""opening_freqs.py -- Analyze SGFs for opening pattern frequency information Opening_freqs.py looks at subdirectories of SGFs and extracts joseki frequency information to a sqlite DB. It tracks the first MAX_JOSEKI_LENGTH stones played in each corner, moving to the next file when all four corners are 'finished'. The ...
"""Model Analyzer. Analyze model, including shape, params, time, memory, structure, etc. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function # Import the names here for existing users. # pylint: disable=unused-import from tensorflow.python.profiler import ...
from openerp import tools from openerp.osv import fields,osv import openerp.addons.decimal_precision as dp class account_entries_report(osv.osv): _name = "account.entries.report" _description = "Journal Items Analysis" _auto = False _rec_name = 'date' _columns = { 'date': fields.date('Effec...
import webob from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova.consoleauth import rpcapi as consoleauth_rpcapi from nova.i18n import _ ALIAS = "os-console-auth-tokens" authorize = extensions.extension_authorizer('compute', 'v3:' + ALIAS) class ConsoleAuthTokensController(wsgi.C...
import unittest import tqdm from ieml.ieml_database import GitInterface, IEMLDatabase from ieml.usl import Word, PolyMorpheme, Lexeme from ieml.usl.table import enumerate_partitions from ieml.usl.usl import usl class TestVariationsTestCase(unittest.TestCase): def test_enumerate_variations(self): u = usl...
#!/usr/bin/env python import six try: import unittest2 as unittest except ImportError: import unittest from csvkit.utilities.in2csv import In2CSV class TestIn2CSV(unittest.TestCase): def test_convert_xls(self): args = ['-f', 'xls', 'examples/test.xls'] output_file = six.StringIO() ...
"""Tests for arithmetic transforms.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys # TODO: #6568 Remove this hack that makes dlopen() not crash. if hasattr(sys, "getdlopenflags") and hasattr(sys, "setdlopenflags"): import ctypes sys.setd...
source("../shared/qmls.py") def main(): editorArea = startQtCreatorWithNewAppAtQMLEditor(tempDir(), "SampleApp", "Rectangle {") if not editorArea: return type(editorArea, "<Return>") type(editorArea, "Color") for i in range(3): type(editorArea, "<Left>") invokeMenuItem("File", "...
import logging from telemetry.core import exceptions class InspectorNetworkException(Exception): pass class InspectorNetworkResponseData(object): def __init__(self, inspector_network, params): self._inspector_network = inspector_network self._request_id = params['requestId'] self._timestamp = param...
from __future__ import unicode_literals import frappe from frappe.utils import getdate, nowdate from frappe import _ from frappe.model.document import Document from erpnext.hr.utils import set_employee_name class Attendance(Document): def validate_duplicate_record(self): res = frappe.db.sql("""select name from `ta...
import unittest from webkitpy.common.system.executive_mock import MockExecutive2 from webkitpy.common.system.systemhost_mock import MockSystemHost from webkitpy.tool.mocktool import MockOptions from webkitpy.layout_tests.models import test_run_results from webkitpy.layout_tests.port import browser_test from webkitpy....
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.errors import * from ansible.plugins.action import ActionBase class ActionModule(ActionBase): ''' Create inventory groups based on variables ''' ### We need to be able to modify the inventory BYPASS_HOST_...
__author__ = 'api.jscudder (Jeffrey Scudder)' import unittest import gdata.codesearch import gdata.test_data class CodeSearchDataTest(unittest.TestCase): def setUp(self): self.feed = gdata.codesearch.CodesearchFeedFromString( gdata.test_data.CODE_SEARCH_FEED) def testCorrectXmlConversion(self): s...
#!/usr/bin/env python # This tests vtkAMRResampleFilter import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() class TestAMRResampleFilter(Testing.vtkTest): def testAMR(self): filename= VTK_DATA_ROOT +"/Data/AMR/Enzo/DD0010/moving7_0010.hierarchy" ...
""" termcolors.py """ color_names = ('black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white') foreground = dict([(color_names[x], '3%s' % x) for x in range(8)]) background = dict([(color_names[x], '4%s' % x) for x in range(8)]) RESET = '0' opt_dict = {'bold': '1', 'underscore': '4', 'blink': '5...
ANSIBLE_METADATA = {'metadata_version': '1.0', 'status': ['preview'], 'supported_by': 'community'} try: import boto.ec2 from boto.exception import BotoServerError HAS_BOTO = True except ImportError: HAS_BOTO = False try: import boto3 from botocore.excep...
""" ============================================= Comparison of kernel ridge regression and SVR ============================================= Both kernel ridge regression (KRR) and SVR learn a non-linear function by employing the kernel trick, i.e., they learn a linear function in the space induced by the respective k...
"""Tests for create_python_api.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import imp import sys from tensorflow.python.platform import test from tensorflow.python.util.tf_export import tf_export from tensorflow.tools.api.generator import create_py...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf class BatchMatrixBandPartTest(tf.test.TestCase): pass # Filled in below def _GetBatchMatrixBandPartTest(dtype_, batch_shape_, shape_, use_gpu_): def Test(sel...
from openerp.osv import fields, osv class lunch_cancel(osv.Model): """ lunch cancel """ _name = 'lunch.cancel' _description = 'cancel lunch order' def cancel(self,cr,uid,ids,context=None): return self.pool.get('lunch.order.line').cancel(cr, uid, ids, context=context)
"""\ ============================= Simple Translation Interactor ============================= A simple interactor for moving OpenGLComponents along th X,Y plane. SimpleTranslationInteractor is a subclass of Interactor. Example Usage ------------- The following example shows four SimpleCubes which can be moved by dr...
# -*- coding: utf-8 -*- """ Exodus Add-on Copyright (C) 2016 Exodus 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 l...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django.contrib.sites.models from django.contrib.sites.models import _simple_domain_name_validator from django.db import migrations, models class Migration(migrations.Migration): dependencies = [] operations = [ migrations.Create...
import datetime from oslo_db.sqlalchemy import test_base from oslo_db.sqlalchemy import utils as db_utils from glance.db.sqlalchemy.alembic_migrations import data_migrations from glance.tests.functional.db import test_migrations class TestOcataContract01Mixin(test_migrations.AlembicMigrationsMixin): def _get_r...
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contain...
from Tkinter import * from idlelib.EditorWindow import EditorWindow import re import tkMessageBox from idlelib import IOBinding class OutputWindow(EditorWindow): """An editor window that can serve as an output file. Also the future base class for the Python shell window. This class has no input facilitie...
# Test the signal module from test.test_support import verbose, TestSkipped, TestFailed, vereq import signal import os, sys, time if sys.platform[:3] in ('win', 'os2') or sys.platform=='riscos': raise TestSkipped, "Can't test signal on %s" % sys.platform MAX_DURATION = 20 # Entire test should last at most 20 se...
from datetime import date import random import re import time import traceback from couchpotato import get_db from couchpotato.api import addApiView from couchpotato.core.event import addEvent, fireEvent, fireEventAsync from couchpotato.core.helpers.encoding import simplifyString from couchpotato.core.helpers.variable...
import gtk class SettingsWidget(gtk.Notebook): def __init__(self, app): gtk.Notebook.__init__(self) self.app = app self.set_tab_pos(gtk.POS_LEFT) self.append_page(self._generic_settings(), gtk.Label("Generic")) self.append_page(self._completion_settings(), gtk.Label("Comple...
# -*- coding: iso-8859-1 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para tu.tv # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core im...
# -*- coding: utf-8 -*- from __future__ import with_statement import io import os import unittest import XiteWin keywordsHTML = [ b"b body content head href html link meta " b"name rel script strong title type xmlns", b"function", b"sub" ] class TestLexers(unittest.TestCase): def setUp(self): self.xite = Xite...
# Ed25519 digital signatures # Based on http://ed25519.cr.yp.to/python/ed25519.py # See also http://ed25519.cr.yp.to/software.html # Adapted by Ron Garret # Sped up considerably using coordinate transforms found on: # http://www.hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html # Specifically add-2008-hwcd-4 and d...
def f(): return <warning descr="This code is unreachable">a = 1</warning> def f(): if 0: return a = 1 # pass def f(): raise Exception() <warning descr="This code is unreachable">a = 1</warning> def f(): for x in []: break <warning descr="This code is unreachable...
import json import os import unittest from telemetry.core import bitmap from telemetry.timeline import inspector_timeline_data from telemetry.timeline import model from metrics import speedindex # Sample timeline data in the json format provided by devtools. # The sample events will be used in several tests below. _T...
""" Some portions adapted from https://github.com/warner/python-ecdsa/ Copyright (c) 2010 Brian Warner who granted its use under this license: 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 witho...
from __future__ import absolute_import, division, print_function __metaclass__ = type import pytest from ansible.module_utils._text import to_native from ansible.module_utils.common.validation import check_type_bits def test_check_type_bits(): test_cases = ( ('1', 1), (99, 99), (1.5, 2),...
import devedeng.configuration_data import devedeng.mplayer import devedeng.avconv import devedeng.avprobe import devedeng.ffmpeg import devedeng.ffprobe import devedeng.vlc import devedeng.brasero import devedeng.k3b import devedeng.mkisofs import devedeng.genisoimage import devedeng.mpv class converter: current_...
"""Produces graphviz .dot output of a KeywordTree. Much of this is mimicing the example FSM from the Graphviz gallery here: http://www.graphviz.org/Gallery/directed/fsm.html The only function that's intended for the public is dotty(). Everything else is meant to be private. This code is really really messy. I'...
import os import numpy as np from ._fortran import * from .system_info import combine_dict # Don't use the deprecated NumPy C API. Define this to a fixed version instead of # NPY_API_VERSION in order not to break compilation for released SciPy versions # when NumPy introduces a new deprecation. Use in setup.py:: # #...
""" Renders all files in a directory to page TGA images and an XML dump and checks these renderings against a previous known-good reference rendering, creating TGA difference files for easier comparison. Use for regression testing: reftest.py /dir/to/test -refdir /dir/for/references reftest.py /dir/one /dir/t...
import murano.dsl.murano_object as murano_object class AttributeStore(object): def __init__(self): self._attributes = {} def set(self, tagged_object, owner_type, name, value): if isinstance(value, murano_object.MuranoObject): value = value.object_id key = (tagged_object.o...
"""Platform for Bosch BMP280 Environmental Sensor integration.""" from datetime import timedelta import logging from adafruit_bmp280 import Adafruit_BMP280_I2C import board from busio import I2C import voluptuous as vol from homeassistant.components.sensor import ( DEVICE_CLASS_PRESSURE, DEVICE_CLASS_TEMPERAT...
# encoding: utf-8 from __future__ import unicode_literals import re import itertools from .common import InfoExtractor from ..compat import ( compat_str, ) from ..utils import ( ExtractorError, unified_strdate, ) class RutubeIE(InfoExtractor): IE_NAME = 'rutube' IE_DESC = 'Rutube videos' _VA...
# -*- coding:utf-8 -*- from __future__ import unicode_literals from django.conf.urls import url from django.contrib.auth import views as auth_views from django.views.generic import RedirectView from . import views from .models import Article, DateArticle date_based_info_dict = { 'queryset': Article.objects.all()...
from __future__ import absolute_import, print_function, unicode_literals, division from flask_restful import abort from jormungandr.interfaces.v1.converters_collection_type import collections_to_resource_type from jormungandr.interfaces.v1.converters_collection_type import resource_type_to_collection from jormungandr.i...
import json import tarfile from StringIO import StringIO from file_system import FileNotFoundError from future import Future from patcher import Patcher _CHROMIUM_REPO_BASEURLS = [ 'https://src.chromium.org/svn/trunk/src/', 'http://src.chromium.org/svn/trunk/src/', 'svn://svn.chromium.org/chrome/trunk/src', ...
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsPoint. .. 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 version 2 of the License, or (at your option) any later version. """ __author...
#!/usr/bin/python """ Copyright (c) 2009 Colin Stewart (http://www.owlfish.com/) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyr...
import logging from reportlab.pdfbase import ttfonts from odoo import api, fields, models from odoo.modules.registry import RegistryManager from odoo.report.render.rml2pdf import customfonts """This module allows the mapping of some system-available TTF fonts to the reportlab engine. This file could be customized pe...
from __future__ import nested_scopes """ ################################################################################ # # SOAPpy - Cayce Ullman (<EMAIL>) # Brian Matthews (<EMAIL>) # Gregory Warnes (<EMAIL>) # Christopher Blunck (<EMAIL>) # #################################...
import consoleHelper import bcolors import clientPackets import serverPackets import glob import Rohwabot import exceptions def handle(userToken, packetData): """ Event called when someone sends a private message userToken -- request user token packetData -- request data bytes """ try: # Get usertoken userna...
# -*- coding: utf-8 -*- from ansible.modules.messaging.rabbitmq import rabbitmq_user from units.compat.mock import patch from units.modules.utils import AnsibleExitJson, AnsibleFailJson, ModuleTestCase, set_module_args class TestRabbitMQUserModule(ModuleTestCase): def setUp(self): super(TestRabbitMQUserM...
import numpy as np from itertools import product from numpy.testing import assert_equal, assert_allclose from pytest import raises as assert_raises import pytest from scipy.signal import upfirdn, firwin, lfilter from scipy.signal._upfirdn import _output_len, _upfirdn_modes from scipy.signal._upfirdn_apply import _pad...
""" This config file follows the dev enviroment, but adds the requirement of a celery worker running in the background to process celery tasks. The worker can be executed using: django_admin.py celery worker """ # We intentionally define lots of variables that aren't used, and # want to import all variables from bas...
""" Wrapper around the eventloop that gives some time to the Tkinter GUI to process events when it's loaded and while we are waiting for input at the REPL. This way we don't block the UI of for instance ``turtle`` and other Tk libraries. (Normally Tkinter registeres it's callbacks in ``PyOS_InputHook`` to integrate in...
from django.conf.urls import url from . import views # Blog - URL Routes urlpatterns = [ url(r'^$', views.post_list), url(r'^post/(?P<pk>[0-9]+)/$', views.post_detail), url(r'^post/new/$', views.post_new, name='post_new'), url(r'^post/(?P<pk>[0-9]+)/edit/$', views.post_edit, name='post_edit'), url(r'^drafts/$', ...
# -*- coding: utf-8 -*- from lxml import etree as et import sys import os # for TTS(default system TTS) import pyttsx #coding: utf-8 #function that reads the xhtml file and returns the root of the document def getData(fname): f=open(fname) d=f.read() data = d.replace('\n','') root = et.fromstring(data) retu...
#!/usr/bin/python3 # Halide tutorial lesson 10. # This lesson demonstrates how to use Halide as an more traditional # ahead-of-time (AOT) compiler. # This lesson is split across two files. The first (this one), builds # a Halide pipeline and compiles it to an object file and header. The # second (lesson_10_aot_compil...
from io import BytesIO from unittest import TestCase from os.path import join, abspath, dirname from gzip import GzipFile from scrapy.spiders import Spider from scrapy.http import Response, Request, HtmlResponse from scrapy.downloadermiddlewares.httpcompression import HttpCompressionMiddleware from tests import tests_...
"""Tests for functional operations.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.eager import def_function from tensorflow.python.framework import dtypes from tensorflow.python.framework import function from tensorflow.python.fr...
from __future__ import unicode_literals from datetime import date from django.test.utils import override_settings from .base import SitemapTestsBase class HTTPSSitemapTests(SitemapTestsBase): protocol = 'https' urls = 'django.contrib.sitemaps.tests.urls.https' def test_secure_sitemap_index(self): ...
"""This code gets the ad unit hierarchy and displays it as a tree. To create ad units, run create_ad_units.py The LoadFromStorage method is pulling credentials and properties from a "googleads.yaml" file. By default, it looks for this file in your home directory. For more information, see the "Caching authentication ...
"""Acceptance tests for LMS-hosted Programs pages""" from common.test.acceptance.fixtures.catalog import CatalogFixture, CatalogIntegrationMixin from common.test.acceptance.fixtures.course import CourseFixture from common.test.acceptance.fixtures.programs import ProgramsConfigMixin from common.test.acceptance.pages.c...
from spack import * class PyPyutilib(PythonPackage): """The PyUtilib project supports a collection of Python utilities, including a well-developed component architecture and extensions to the PyUnit testing framework. PyUtilib has been developed to support several Python-centric projects, especially P...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import json import uuid import socket import getpass from datetime import datetime from os.path import basename from ansible.module_utils.urls import open_url from ansible.parsing.ajson import AnsibleJSONEncoder from ansible.plug...
#!/usr/bin/env python # -*- mode: python; encoding: utf-8 -*- """Test client actions.""" import __builtin__ import logging import os import platform import posix import stat import psutil # Populate the action registry # pylint: disable=unused-import, g-bad-import-order from grr.client import client_plugins from gr...
# Brute force algo sicne the constraints are pretty small # Including standard libraries import sys ''' Function that solves the program ''' def getMaxOr(candidates): maxSkills = len(candidates[0]) # Player indices are hashed to the corresponding entry a = [[] for x in range(maxSkills+1)] for i in...
ANSIBLE_METADATA = {'metadata_version': '1.0', 'status': ['preview'], 'supported_by': 'core'} from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.netcfg import NetworkConfig, dumps from ansible.module_utils.nxos import get_config, load_config, run_com...
from __future__ import unicode_literals import frappe from frappe import _ def execute(filters=None): columns = get_columns() sl_entries = get_stock_ledger_entries(filters) item_details = get_item_details(filters) opening_row = get_opening_balance(filters, columns) data = [] if opening_row: data.append(ope...
#!/usr/bin/env python import gzip from itertools import count, izip import re import sys #import os lemma_pos = {} lemma_count = {} lemma_set = set() for arg in sys.argv[4:]: #FIXME: Bug var burada. Ayni lemma'ya sahip kelimeler var. # Onlari eziyor. (trace.n, trace.v; book.n, book.v) match = re.search("...
from __future__ import unicode_literals import unicodedata from django import forms from django.contrib.auth import ( authenticate, get_user_model, password_validation, ) from django.contrib.auth.hashers import ( UNUSABLE_PASSWORD_PREFIX, identify_hasher, ) from django.contrib.auth.models import User from dja...
import os import json from shutil import copy import sys import traceback import MySQLdb from email.mime.text import MIMEText import smtplib import datetime def check_current_3rd_libs(): #get current_libs config backup_files = range(2) current_files = range(2) config_file_paths = ['external/config.json'...
from django.contrib import auth from django import db from django.utils.encoding import force_bytes def check_password(environ, username, password): """ Authenticates against Django's auth database mod_wsgi docs specify None, True, False as return value depending on whether the user exists and authen...
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : GdalTools Description : Integrate gdal tools into qgis Date : 17/Sep/09 copyright : (C) 2009 by Lorenzo Masini (Faunalia) email : <EMAIL> *...
from ui.screen.menuscreen import MenuScreen from ui.navigator.book import BookNavigator from ui.menu.bookcyrillicmenu import BookCyrillicMenu, CHAR_ROWS, CHAR_COLUMNS from util.keys import KEY_CHOOSE_AUTHOR, LABELS, KEY_PAGE_DOWN, KEY_PAGE_UP class BookAbc(MenuScreen): """ Abc screen """ def __init__(self...
import re import os from Giraffe.template import template import utils.Configuration class AddSection(object): def __init__(self, args, kw): self.args = args self.kwargs = kw self.error = '' self.configPath = 'config/' self.filename = '' def _SaveSection(self): ...
data = ( 'He ', # 0x00 'Lan ', # 0x01 'Biao ', # 0x02 'Rong ', # 0x03 'Li ', # 0x04 'Mo ', # 0x05 'Bao ', # 0x06 'Ruo ', # 0x07 'Lu ', # 0x08 'La ', # 0x09 'Ao ', # 0x0a 'Xun ', # 0x0b 'Kuang ', # 0x0c 'Shuo ', # 0x0d '[?] ', # 0x0e 'Li ', # 0x0f 'Lu ', # 0x10 'Jue ', ...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'certified'} from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.six import it...
"""Migrate iframe in dashboard to markdown component Revision ID: 978245563a02 Revises: f2672aa8350a Create Date: 2020-08-12 00:24:39.617899 """ import collections import json import logging import uuid from collections import defaultdict from alembic import op from sqlalchemy import and_, Column, ForeignKey, Intege...
"""Provides the Module and Type base classes that user code inherits from.""" __all__ = ["Module", "Type", "member"] from framer import struct, template from framer.function import Function, Method from framer.member import member from framer.slots import * from framer.util import cstring, unindent from types import...
## # A wrapper script to loop over tasks and produce RUnits # Each line of tasks is a set of params for building the RUnit ## import os from writers import * from makeTestTasks import genTasks from GenUtils import setup_random_seed import GenUtils def writeFU(FU, data, dataPath, dataTask, taskType, FUParams): wt ...
import argparse from collections import defaultdict import json import os import re import subprocess import sys import suppressions def ReadReportsFromFile(filename): """ Returns a list of (report_hash, report) and the URL of the report on the waterfall. """ input_file = file(filename, 'r') # reports is a...
# -*- coding: utf-8 -*- """ Display days/hours/minutes spent and calculate the price of your service. Configuration parameters: - config_file: file path to store the time already spent and restore it the next session - hour_price : your price per hour - tax : tax value (1.02 = 2%) @aut...