repo_name
stringlengths 6
100
| path
stringlengths 4
294
| copies
stringlengths 1
5
| size
stringlengths 4
6
| content
stringlengths 606
896k
| license
stringclasses 15
values | var_hash
int64 -9,223,186,179,200,150,000
9,223,291,175B
| doc_hash
int64 -9,223,304,365,658,930,000
9,223,309,051B
| line_mean
float64 3.5
99.8
| line_max
int64 13
999
| alpha_frac
float64 0.25
0.97
| autogenerated
bool 1
class |
---|---|---|---|---|---|---|---|---|---|---|---|
piosz/test-infra | gubernator/pb_glance_test.py | 36 | 1815 | # Copyright 2016 The Kubernetes 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 writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import unittest
import pb_glance
def tostr(data):
if isinstance(data, list):
return ''.join(c if isinstance(c, str) else chr(c) for c in data)
return data
class PBGlanceTest(unittest.TestCase):
def expect(self, data, expected, types=None):
result = pb_glance.parse_protobuf(tostr(data), types)
self.assertEqual(result, expected)
def test_basic(self):
self.expect(
[0, 1, # varint
0, 0x96, 1, # multi-byte varint
(1<<3)|1, 'abcdefgh', # 64-bit
(2<<3)|2, 5, 'value', # length-delimited (string)
(3<<3)|5, 'abcd', # 32-bit
],
{
0: [1, 150],
1: ['abcdefgh'],
2: ['value'],
3: ['abcd'],
})
def test_embedded(self):
self.expect([2, 2, 3<<3, 1], {0: [{3: [1]}]}, {0: {}})
def test_field_names(self):
self.expect([2, 2, 'hi'], {'greeting': ['hi']}, {0: 'greeting'})
def test_embedded_names(self):
self.expect(
[2, 4, (3<<3)|2, 2, 'hi'],
{'msg': [{'greeting': ['hi']}]},
{0: {'name': 'msg', 3: 'greeting'}})
| apache-2.0 | -8,146,854,862,760,723,000 | 3,819,102,769,118,352,000 | 31.410714 | 74 | 0.552617 | false |
a2ultimate/ultimate-league-app | src/ultimate/utils/google_api.py | 2 | 7829 | from datetime import datetime
import dateutil.parser
import httplib2
import logging
from django.conf import settings
from django.utils.timezone import make_aware
from googleapiclient.discovery import build
from oauth2client.service_account import ServiceAccountCredentials
logger = logging.getLogger('a2u.email_groups')
class GoogleAppsApi:
http = None
service = None
def __init__(self):
credentials_file = getattr(settings, 'GOOGLE_APPS_API_CREDENTIALS_FILE', False)
scopes = getattr(settings, 'GOOGLE_APPS_API_SCOPES', False)
account = getattr(settings, 'GOOGLE_APPS_API_ACCOUNT', False)
if credentials_file and scopes and account:
credentials = ServiceAccountCredentials.from_json_keyfile_name(
credentials_file, scopes=scopes)
credentials._kwargs['sub'] = account
self.http = httplib2.Http()
self.http = credentials.authorize(self.http)
def prepare_group_for_sync(self, group_name, group_id=None, group_email_address=None, force=False):
logger.debug('Preparing group "{}" for sync...'.format(group_name))
if force:
self.delete_group(group_id=group_id, group_email_address=group_email_address)
else:
self.remove_all_group_members(
group_id=group_id,
group_email_address=group_email_address,
group_name=group_name)
return self.get_or_create_group(
group_email_address=group_email_address, group_name=group_name)
# TODO need paging for when you have over 200 groups
def get_or_create_group(self, group_email_address, group_name=''):
logger.debug(' Getting or creating group {}...'.format(group_email_address))
service = build('admin', 'directory_v1', http=self.http, cache_discovery=False)
groups_response = None
target_group = None
try:
logger.debug(' Looking for existing group...')
groups_response = service.groups().list(customer='my_customer', domain='lists.annarborultimate.org', query='email={}'.format(group_email_address)).execute(http=self.http)
except Exception as e:
return None
if groups_response and groups_response.get('groups'):
for group in groups_response.get('groups'):
if group.get('email') == group_email_address:
logger.debug(' Group found!')
target_group = group
# couldn't find group, create it
if not target_group:
logger.debug(' Group not found...creating {}...'.format(group_email_address))
body = { 'email': group_email_address, }
if group_name:
body.update({ 'name': group_name, })
try:
target_group = service.groups().insert(body=body).execute(http=self.http)
logger.debug(' Success!')
except Exception as e:
logger.debug(' Failure!')
return None
group_id = target_group.get('id', None)
return group_id
def delete_group(self, group_id=None, group_email_address=None):
logger.debug(' Deleting existing group...')
service = build('admin', 'directory_v1', http=self.http, cache_discovery=False)
if group_email_address and not group_id:
try:
groups_response = service.groups().list(customer='my_customer', domain='lists.annarborultimate.org', query='email={}'.format(group_email_address)).execute(http=self.http)
if groups_response and groups_response.get('groups'):
for group in groups_response.get('groups'):
if group.get('email') == group_email_address:
group_id = group.get('id', None)
except Exception as e:
return False
if group_id:
try:
service.groups().delete(groupKey=group_id).execute(http=self.http)
logger.debug(' Success!')
except Exception as e:
logger.debug(' Failure!')
return False
return True
def remove_all_group_members(self, group_id=None, group_email_address=None, group_name=None):
logger.debug(' Removing all members from {}...'.format(group_email_address))
service = build('admin', 'directory_v1', http=self.http, cache_discovery=False)
if group_email_address and not group_id:
try:
groups_response = service.groups().list(customer='my_customer', domain='lists.annarborultimate.org', query='email={}'.format(group_email_address)).execute(http=self.http)
if groups_response and groups_response.get('groups'):
for group in groups_response.get('groups'):
if group.get('email') == group_email_address:
group_id = group.get('id', None)
except Exception as e:
logger.debug(' Group could not be found')
return False
if group_id:
try:
members_response = service.members().list(groupKey=group_id).execute(http=self.http)
if members_response and members_response.get('members'):
for member in members_response.get('members'):
member_id = member.get('id', None)
service.members().delete(groupKey=group_id, memberKey=member_id).execute(http=self.http)
except Exception as e:
logger.debug(' Group could not be found')
return False
logger.debug(' Done')
def add_group_member(self, email_address, group_id=None, group_email_address=None, group_name=None):
logger.debug('Adding {} to {}...'.format(email_address, group_email_address or 'group'))
service = build('admin', 'directory_v1', http=self.http, cache_discovery=False)
body = {
'email': email_address,
'role': 'MEMBER'
}
response = False
# look for group
if not group_id and group_email_address:
group_id = self.get_or_create_group(
group_email_address=group_email_address, group_name=group_name)
if group_id:
try:
response = service.members().insert(groupKey=group_id, body=body).execute(http=self.http)
logger.debug(' Success!')
except:
logger.debug(' Failure!')
return False
return response
def get_calendar_events(self, calendar_id, since, until):
service = build(serviceName='calendar', version='v3', http=self.http, cache_discovery=False)
since = (datetime.utcnow().replace(hour=0, minute=0, second=0, microsecond=0) - since).isoformat('T') + 'Z'
until = (datetime.utcnow().replace(hour=0, minute=0, second=0, microsecond=0) + until).isoformat('T') + 'Z'
try:
events_response = service.events().list(
calendarId=calendar_id,
orderBy='startTime',
singleEvents=True,
timeMin=since,
timeMax=until,
).execute(http=self.http)
except Exception as e:
return None
events = []
for event in events_response['items']:
events.append({
'summary': event.get('summary'),
'start': dateutil.parser.parse(event['start']['dateTime']),
'end': event['end']['dateTime'],
'location': event.get('location'),
'description': event.get('description'),
})
return events
| bsd-3-clause | -2,799,069,192,883,172,000 | -5,630,295,251,528,183,000 | 38.943878 | 186 | 0.580662 | false |
Rapportus/ansible-modules-extras | cloud/vmware/vmware_dns_config.py | 75 | 3970 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Joseph Callen <jcallen () csc.com>
#
# 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 distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
DOCUMENTATION = '''
---
module: vmware_dns_config
short_description: Manage VMware ESXi DNS Configuration
description:
- Manage VMware ESXi DNS Configuration
version_added: 2.0
author: "Joseph Callen (@jcpowermac)"
notes:
- Tested on vSphere 5.5
requirements:
- "python >= 2.6"
- PyVmomi
options:
change_hostname_to:
description:
- The hostname that an ESXi host should be changed to.
required: True
domainname:
description:
- The domain the ESXi host should be apart of.
required: True
dns_servers:
description:
- The DNS servers that the host should be configured to use.
required: True
extends_documentation_fragment: vmware.documentation
'''
EXAMPLES = '''
# Example vmware_dns_config command from Ansible Playbooks
- name: Configure ESXi hostname and DNS servers
local_action:
module: vmware_dns_config
hostname: esxi_hostname
username: root
password: your_password
change_hostname_to: esx01
domainname: foo.org
dns_servers:
- 8.8.8.8
- 8.8.4.4
'''
try:
from pyVmomi import vim, vmodl
HAS_PYVMOMI = True
except ImportError:
HAS_PYVMOMI = False
def configure_dns(host_system, hostname, domainname, dns_servers):
changed = False
host_config_manager = host_system.configManager
host_network_system = host_config_manager.networkSystem
config = host_network_system.dnsConfig
config.dhcp = False
if config.address != dns_servers:
config.address = dns_servers
changed = True
if config.domainName != domainname:
config.domainName = domainname
changed = True
if config.hostName != hostname:
config.hostName = hostname
changed = True
if changed:
host_network_system.UpdateDnsConfig(config)
return changed
def main():
argument_spec = vmware_argument_spec()
argument_spec.update(dict(change_hostname_to=dict(required=True, type='str'),
domainname=dict(required=True, type='str'),
dns_servers=dict(required=True, type='list')))
module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=False)
if not HAS_PYVMOMI:
module.fail_json(msg='pyvmomi is required for this module')
change_hostname_to = module.params['change_hostname_to']
domainname = module.params['domainname']
dns_servers = module.params['dns_servers']
try:
content = connect_to_api(module)
host = get_all_objs(content, [vim.HostSystem])
if not host:
module.fail_json(msg="Unable to locate Physical Host.")
host_system = host.keys()[0]
changed = configure_dns(host_system, change_hostname_to, domainname, dns_servers)
module.exit_json(changed=changed)
except vmodl.RuntimeFault as runtime_fault:
module.fail_json(msg=runtime_fault.msg)
except vmodl.MethodFault as method_fault:
module.fail_json(msg=method_fault.msg)
except Exception as e:
module.fail_json(msg=str(e))
from ansible.module_utils.vmware import *
from ansible.module_utils.basic import *
if __name__ == '__main__':
main()
| gpl-3.0 | -5,995,633,884,550,005,000 | 156,327,988,222,157,730 | 29.538462 | 89 | 0.674307 | false |
ecell/ecell3 | ecell/pyecell/ecell/analysis/PathwayProxy.py | 1 | 13263 | #!/usr/bin/env python
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#
# This file is part of the E-Cell System
#
# Copyright (C) 1996-2016 Keio University
# Copyright (C) 2008-2016 RIKEN
# Copyright (C) 2005-2009 The Molecular Sciences Institute
#
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#
#
# E-Cell System 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.
#
# E-Cell System is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with E-Cell System -- see the file COPYING.
# If not, write to the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
#END_HEADER
"""
A program for handling and defining a pathway.
This program is the extension package for E-Cell System Version 3.
"""
__program__ = 'PathwayProxy'
__version__ = '1.0'
__author__ = 'Kazunari Kaizu <[email protected]>'
__coyright__ = ''
__license__ = ''
import ecell.eml
from ecell.ecssupport import *
from ecell.analysis.util import createVariableReferenceFullID
import copy
import numpy
class PathwayProxy:
def __init__( self, anEmlSupport, processList=None ):
'''
anEmlSupport: Eml support object
processList: (list) a list of process full path
'''
self.theEmlSupport = anEmlSupport
if processList:
self.setProcessList( processList )
else:
self.setProcessList( [] )
# end of __init__
def setProcessList( self, processList ):
'''
set and detect a pathway
processList: (list) a list of process full ID
'''
# check the existence of processes,
# and create relatedVariableList
self.__processList = []
self.__variableList = []
for processFullID in processList:
# if not self.theEmlSupport.isEntityExist( processFullID ):
# continue
self.__processList.append( processFullID )
try:
aVariableReferenceList = self.theEmlSupport.getEntityProperty( processFullID + ':VariableReferenceList' )
except AttributeError, e:
continue
for aVariableReference in aVariableReferenceList:
fullID = createVariableReferenceFullID( aVariableReference[ 1 ], processFullID )
fullIDString = ecell.ecssupport.createFullIDString( fullID )
if self.__variableList.count( fullIDString ) == 0:
self.__variableList.append( fullIDString )
self.__processList.sort()
self.__variableList.sort()
# end of setProcessList
def getProcessList( self ):
'''
return processList
'''
return copy.copy( self.__processList )
# end of getProcessList
def addProcess( self, processFullID ):
'''
add a process to the pathway
processFullID: (str) a process full ID
'''
if not self.__processList.count( processFullID ) == 0:
return
# elif not ecell.eml.Eml.isEntityExist( processFullID ):
# return
# add process
self.__processList.append( processFullID )
self.__processList.sort()
# update the related variable list
try:
aVariableReferenceList = self.theEmlSupport.getEntityProperty( processFullID + ':VariableReferenceList' )
except AttributeError, e:
return
for aVariableReference in aVariableReferenceList:
fullID = createVariableReferenceFullID( aVariableReference[ 1 ], processFullID )
fullIDString = ecell.ecssupport.createFullIDString( fullID )
if self.__variableList.count( fullIDString ) == 0:
self.__variableList.append( fullIDString )
self.__variableList.sort()
# end of addProcess
def removeProcess( self, processIndexList ):
'''
remove processes from the pathway
processIndexList: (list) a list of indices of processes
'''
indexList = copy.copy( processIndexList )
indexList.sort()
indexList.reverse()
removedProcessList = []
for i in indexList:
if len( self.__processList ) > i:
removedProcessList.append( self.__processList.pop( i ) )
removedVariableList = []
for processFullID in removedProcessList:
# if not ecell.eml.Eml.isEntityExist( self.theEmlSupport, processFullID ):
# continue
try:
aVariableReferenceList = self.theEmlSupport.getEntityProperty( processFullID + ':VariableReferenceList' )
except AttributeError, e:
continue
for aVariableReference in aVariableReferenceList:
fullID = createVariableReferenceFullID( aVariableReference[ 1 ], processFullID )
fullIDString = ecell.ecssupport.createFullIDString( fullID )
if removedVariableList.count( fullIDString ) == 0:
removedVariableList.append( fullIDString )
for processFullID in self.__processList:
# if not self.theEmlSupport.isEntityExist( processFullID ):
# continue
try:
aVariableReferenceList = self.theEmlSupport.getEntityProperty( processFullID + ':VariableReferenceList' )
except AttributeError, e:
continue
for aVariableReference in aVariableReferenceList:
fullID = createVariableReferenceFullID( aVariableReference[ 1 ], processFullID )
fullIDString = ecell.ecssupport.createFullIDString( fullID )
if not removedVariableList.count( fullIDString ) == 0:
removedVariableList.remove( fullIDString )
for variableFullID in removedVariableList:
self.__variableList.remove( variableFullID )
# end of removeProcess
def take( self, processIndexList ):
'''
create and return a sub-pathway
processIndexList: (list) a list of indices of processes
return PathwayProxy
'''
processList = []
for i in processIndexList:
if len( self.__processList ) > i:
processList.append( self.__processList[ i ] )
subPathway = PathwayProxy( self.theEmlSupport, processList )
return subPathway
# end of removeProcess
def getVariableList( self ):
'''
return relatedVariableList
'''
return copy.copy( self.__variableList )
# end of getVariableList
def removeVariable( self, variableIndexList ):
'''
remove variables from the pathway
variableIndexList: (list) a list of indices of variables
'''
indexList = copy.copy( variableIndexList )
indexList.sort()
indexList.reverse()
for i in indexList:
if len( self.__variableList ) > i:
self.__variableList.pop( i )
# end of removeVariable
def addVariable( self, variableFullID ):
'''
recover a removed variable to the pathway
variableFullID: (str) a variable full ID
'''
if not self.__variableList.count( variableFullID ) == 0:
return 1
# elif not ecell.eml.Eml.isEntityExist( variableFullID ):
# return 0
for processFullID in self.__processList:
try:
aVariableReferenceList = self.theEmlSupport.getEntityProperty( processFullID + ':VariableReferenceList' )
except AttributeError, e:
continue
for aVariableReference in aVariableReferenceList:
fullID = createVariableReferenceFullID( aVariableReference[ 1 ], processFullID )
fullIDString = fullID[ 1 ] + ':' + fullID[ 2 ]
if fullIDString == variableFullID:
self.__variableList.append( variableFullID )
self.__variableList.sort()
return 1
return 0
# end of addProcess
def getIncidentMatrix( self, mode=0 ):
'''
create the incident matrix (array)
mode: (0 or 1) 0 means that only the \'write\' variables are checked. 0 is set as default.
return incidentMatrix
'''
incidentMatrix = numpy.zeros( ( len( self.__variableList ), len( self.__processList ) ) )
for j in range( len( self.__processList ) ):
processFullID = self.__processList[ j ]
try:
aVariableReferenceList = self.theEmlSupport.getEntityProperty( processFullID + ':VariableReferenceList' )
except AttributeError, e:
continue
for aVariableReference in aVariableReferenceList:
fullID = createVariableReferenceFullID( aVariableReference[ 1 ], processFullID )
fullIDString = ecell.ecssupport.createFullIDString( fullID )
try:
i = self.__variableList.index( fullIDString )
except ValueError:
# should some warning message be showed?
continue
if mode:
if len( aVariableReference ) > 2:
coeff = int( aVariableReference[ 2 ] )
if coeff != 0:
incidentMatrix[ i ][ j ] = 1
else:
incidentMatrix[ i ][ j ] = 1
return incidentMatrix
# end of getIncidentMatrix
def getStoichiometryMatrix( self ):
'''
create the stoichiometry matrix (array)
return stoichiometryMatrix
'''
stoichiometryMatrix = numpy.zeros( ( len( self.__variableList ), len( self.__processList ) ), float )
for j in range( len( self.__processList ) ):
processFullID = self.__processList[ j ]
try:
aVariableReferenceList = self.theEmlSupport.getEntityProperty( processFullID + ':VariableReferenceList' )
except AttributeError, e:
continue
for aVariableReference in aVariableReferenceList:
fullID = createVariableReferenceFullID( aVariableReference[ 1 ], processFullID )
fullIDString = ecell.ecssupport.createFullIDString( fullID )
try:
i = self.__variableList.index( fullIDString )
except ValueError:
# should some warning message be showed?
continue
if len( aVariableReference ) > 2:
coeff = int( aVariableReference[ 2 ] )
if coeff != 0:
stoichiometryMatrix[ i ][ j ] += coeff
return stoichiometryMatrix
# end of getStoichiometryMatrix
def getReversibilityList( self ):
'''
check and return the reversibilities (isReversible) for processes
default value is 0, irreversible
return reversibilityList
'''
reversibilityList = []
for processFullID in self.__processList:
propertyList = self.theEmlSupport.getEntityPropertyList( processFullID )
if propertyList.count( 'isReversible' ) != 0:
# isReversible is handled as float
isReversible = float( self.theEmlSupport.getEntityProperty( processFullID + ':isReversible' )[ 0 ] )
reversibilityList.append( int( isReversible ) )
else:
# default value, irreversible
reversibilityList.append( 0 )
return reversibilityList
# end of getReversibilityList
# end of PathwayProxy
if __name__ == '__main__':
from emlsupport import EmlSupport
import sys
import os
def main( filename ):
anEmlSupport = EmlSupport( filename )
pathwayProxy = anEmlSupport.createPathwayProxy()
print 'process list ='
print pathwayProxy.getProcessList()
print 'related variable list ='
print pathwayProxy.getVariableList()
print 'incident matrix ='
print pathwayProxy.getIncidentMatrix()
print 'stoichiometry matrix ='
print pathwayProxy.getStoichiometryMatrix()
print 'reversibility list ='
print pathwayProxy.getReversibilityList()
# end of main
if len( sys.argv ) > 1:
main( sys.argv[ 1 ] )
else:
filename = '../../../../doc/samples/Heinrich/Heinrich.eml'
main( os.path.abspath( filename ) )
| lgpl-3.0 | 6,977,284,070,841,852,000 | -781,294,820,057,544,800 | 30.133803 | 121 | 0.586594 | false |
pymedusa/Medusa | ext/boto/pyami/scriptbase.py | 153 | 1427 | import os
import sys
from boto.utils import ShellCommand, get_ts
import boto
import boto.utils
class ScriptBase(object):
def __init__(self, config_file=None):
self.instance_id = boto.config.get('Instance', 'instance-id', 'default')
self.name = self.__class__.__name__
self.ts = get_ts()
if config_file:
boto.config.read(config_file)
def notify(self, subject, body=''):
boto.utils.notify(subject, body)
def mkdir(self, path):
if not os.path.isdir(path):
try:
os.mkdir(path)
except:
boto.log.error('Error creating directory: %s' % path)
def umount(self, path):
if os.path.ismount(path):
self.run('umount %s' % path)
def run(self, command, notify=True, exit_on_error=False, cwd=None):
self.last_command = ShellCommand(command, cwd=cwd)
if self.last_command.status != 0:
boto.log.error('Error running command: "%s". Output: "%s"' % (command, self.last_command.output))
if notify:
self.notify('Error encountered',
'Error running the following command:\n\t%s\n\nCommand output:\n\t%s' % \
(command, self.last_command.output))
if exit_on_error:
sys.exit(-1)
return self.last_command.status
def main(self):
pass
| gpl-3.0 | 9,127,485,596,762,881,000 | -7,101,819,177,799,470,000 | 32.186047 | 109 | 0.561317 | false |
AydinSakar/node-gyp | gyp/pylib/gyp/xcode_emulation.py | 65 | 42931 | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
This module contains classes that help to emulate xcodebuild behavior on top of
other build systems, such as make and ninja.
"""
import gyp.common
import os.path
import re
import shlex
import subprocess
import sys
from gyp.common import GypError
class XcodeSettings(object):
"""A class that understands the gyp 'xcode_settings' object."""
# Populated lazily by _SdkPath(). Shared by all XcodeSettings, so cached
# at class-level for efficiency.
_sdk_path_cache = {}
def __init__(self, spec):
self.spec = spec
# Per-target 'xcode_settings' are pushed down into configs earlier by gyp.
# This means self.xcode_settings[config] always contains all settings
# for that config -- the per-target settings as well. Settings that are
# the same for all configs are implicitly per-target settings.
self.xcode_settings = {}
configs = spec['configurations']
for configname, config in configs.iteritems():
self.xcode_settings[configname] = config.get('xcode_settings', {})
# This is only non-None temporarily during the execution of some methods.
self.configname = None
# Used by _AdjustLibrary to match .a and .dylib entries in libraries.
self.library_re = re.compile(r'^lib([^/]+)\.(a|dylib)$')
def _Settings(self):
assert self.configname
return self.xcode_settings[self.configname]
def _Test(self, test_key, cond_key, default):
return self._Settings().get(test_key, default) == cond_key
def _Appendf(self, lst, test_key, format_str, default=None):
if test_key in self._Settings():
lst.append(format_str % str(self._Settings()[test_key]))
elif default:
lst.append(format_str % str(default))
def _WarnUnimplemented(self, test_key):
if test_key in self._Settings():
print 'Warning: Ignoring not yet implemented key "%s".' % test_key
def _IsBundle(self):
return int(self.spec.get('mac_bundle', 0)) != 0
def GetFrameworkVersion(self):
"""Returns the framework version of the current target. Only valid for
bundles."""
assert self._IsBundle()
return self.GetPerTargetSetting('FRAMEWORK_VERSION', default='A')
def GetWrapperExtension(self):
"""Returns the bundle extension (.app, .framework, .plugin, etc). Only
valid for bundles."""
assert self._IsBundle()
if self.spec['type'] in ('loadable_module', 'shared_library'):
default_wrapper_extension = {
'loadable_module': 'bundle',
'shared_library': 'framework',
}[self.spec['type']]
wrapper_extension = self.GetPerTargetSetting(
'WRAPPER_EXTENSION', default=default_wrapper_extension)
return '.' + self.spec.get('product_extension', wrapper_extension)
elif self.spec['type'] == 'executable':
return '.app'
else:
assert False, "Don't know extension for '%s', target '%s'" % (
self.spec['type'], self.spec['target_name'])
def GetProductName(self):
"""Returns PRODUCT_NAME."""
return self.spec.get('product_name', self.spec['target_name'])
def GetFullProductName(self):
"""Returns FULL_PRODUCT_NAME."""
if self._IsBundle():
return self.GetWrapperName()
else:
return self._GetStandaloneBinaryPath()
def GetWrapperName(self):
"""Returns the directory name of the bundle represented by this target.
Only valid for bundles."""
assert self._IsBundle()
return self.GetProductName() + self.GetWrapperExtension()
def GetBundleContentsFolderPath(self):
"""Returns the qualified path to the bundle's contents folder. E.g.
Chromium.app/Contents or Foo.bundle/Versions/A. Only valid for bundles."""
assert self._IsBundle()
if self.spec['type'] == 'shared_library':
return os.path.join(
self.GetWrapperName(), 'Versions', self.GetFrameworkVersion())
else:
# loadable_modules have a 'Contents' folder like executables.
return os.path.join(self.GetWrapperName(), 'Contents')
def GetBundleResourceFolder(self):
"""Returns the qualified path to the bundle's resource folder. E.g.
Chromium.app/Contents/Resources. Only valid for bundles."""
assert self._IsBundle()
return os.path.join(self.GetBundleContentsFolderPath(), 'Resources')
def GetBundlePlistPath(self):
"""Returns the qualified path to the bundle's plist file. E.g.
Chromium.app/Contents/Info.plist. Only valid for bundles."""
assert self._IsBundle()
if self.spec['type'] in ('executable', 'loadable_module'):
return os.path.join(self.GetBundleContentsFolderPath(), 'Info.plist')
else:
return os.path.join(self.GetBundleContentsFolderPath(),
'Resources', 'Info.plist')
def GetProductType(self):
"""Returns the PRODUCT_TYPE of this target."""
if self._IsBundle():
return {
'executable': 'com.apple.product-type.application',
'loadable_module': 'com.apple.product-type.bundle',
'shared_library': 'com.apple.product-type.framework',
}[self.spec['type']]
else:
return {
'executable': 'com.apple.product-type.tool',
'loadable_module': 'com.apple.product-type.library.dynamic',
'shared_library': 'com.apple.product-type.library.dynamic',
'static_library': 'com.apple.product-type.library.static',
}[self.spec['type']]
def GetMachOType(self):
"""Returns the MACH_O_TYPE of this target."""
# Weird, but matches Xcode.
if not self._IsBundle() and self.spec['type'] == 'executable':
return ''
return {
'executable': 'mh_execute',
'static_library': 'staticlib',
'shared_library': 'mh_dylib',
'loadable_module': 'mh_bundle',
}[self.spec['type']]
def _GetBundleBinaryPath(self):
"""Returns the name of the bundle binary of by this target.
E.g. Chromium.app/Contents/MacOS/Chromium. Only valid for bundles."""
assert self._IsBundle()
if self.spec['type'] in ('shared_library'):
path = self.GetBundleContentsFolderPath()
elif self.spec['type'] in ('executable', 'loadable_module'):
path = os.path.join(self.GetBundleContentsFolderPath(), 'MacOS')
return os.path.join(path, self.GetExecutableName())
def _GetStandaloneExecutableSuffix(self):
if 'product_extension' in self.spec:
return '.' + self.spec['product_extension']
return {
'executable': '',
'static_library': '.a',
'shared_library': '.dylib',
'loadable_module': '.so',
}[self.spec['type']]
def _GetStandaloneExecutablePrefix(self):
return self.spec.get('product_prefix', {
'executable': '',
'static_library': 'lib',
'shared_library': 'lib',
# Non-bundled loadable_modules are called foo.so for some reason
# (that is, .so and no prefix) with the xcode build -- match that.
'loadable_module': '',
}[self.spec['type']])
def _GetStandaloneBinaryPath(self):
"""Returns the name of the non-bundle binary represented by this target.
E.g. hello_world. Only valid for non-bundles."""
assert not self._IsBundle()
assert self.spec['type'] in (
'executable', 'shared_library', 'static_library', 'loadable_module'), (
'Unexpected type %s' % self.spec['type'])
target = self.spec['target_name']
if self.spec['type'] == 'static_library':
if target[:3] == 'lib':
target = target[3:]
elif self.spec['type'] in ('loadable_module', 'shared_library'):
if target[:3] == 'lib':
target = target[3:]
target_prefix = self._GetStandaloneExecutablePrefix()
target = self.spec.get('product_name', target)
target_ext = self._GetStandaloneExecutableSuffix()
return target_prefix + target + target_ext
def GetExecutableName(self):
"""Returns the executable name of the bundle represented by this target.
E.g. Chromium."""
if self._IsBundle():
return self.spec.get('product_name', self.spec['target_name'])
else:
return self._GetStandaloneBinaryPath()
def GetExecutablePath(self):
"""Returns the directory name of the bundle represented by this target. E.g.
Chromium.app/Contents/MacOS/Chromium."""
if self._IsBundle():
return self._GetBundleBinaryPath()
else:
return self._GetStandaloneBinaryPath()
def _GetSdkVersionInfoItem(self, sdk, infoitem):
job = subprocess.Popen(['xcodebuild', '-version', '-sdk', sdk, infoitem],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
out = job.communicate()[0]
if job.returncode != 0:
sys.stderr.write(out + '\n')
raise GypError('Error %d running xcodebuild' % job.returncode)
return out.rstrip('\n')
def _SdkPath(self):
sdk_root = self.GetPerTargetSetting('SDKROOT', default='macosx')
if sdk_root not in XcodeSettings._sdk_path_cache:
XcodeSettings._sdk_path_cache[sdk_root] = self._GetSdkVersionInfoItem(
sdk_root, 'Path')
return XcodeSettings._sdk_path_cache[sdk_root]
def _AppendPlatformVersionMinFlags(self, lst):
self._Appendf(lst, 'MACOSX_DEPLOYMENT_TARGET', '-mmacosx-version-min=%s')
if 'IPHONEOS_DEPLOYMENT_TARGET' in self._Settings():
# TODO: Implement this better?
sdk_path_basename = os.path.basename(self._SdkPath())
if sdk_path_basename.lower().startswith('iphonesimulator'):
self._Appendf(lst, 'IPHONEOS_DEPLOYMENT_TARGET',
'-mios-simulator-version-min=%s')
else:
self._Appendf(lst, 'IPHONEOS_DEPLOYMENT_TARGET',
'-miphoneos-version-min=%s')
def GetCflags(self, configname):
"""Returns flags that need to be added to .c, .cc, .m, and .mm
compilations."""
# This functions (and the similar ones below) do not offer complete
# emulation of all xcode_settings keys. They're implemented on demand.
self.configname = configname
cflags = []
sdk_root = self._SdkPath()
if 'SDKROOT' in self._Settings():
cflags.append('-isysroot %s' % sdk_root)
if self._Test('CLANG_WARN_CONSTANT_CONVERSION', 'YES', default='NO'):
cflags.append('-Wconstant-conversion')
if self._Test('GCC_CHAR_IS_UNSIGNED_CHAR', 'YES', default='NO'):
cflags.append('-funsigned-char')
if self._Test('GCC_CW_ASM_SYNTAX', 'YES', default='YES'):
cflags.append('-fasm-blocks')
if 'GCC_DYNAMIC_NO_PIC' in self._Settings():
if self._Settings()['GCC_DYNAMIC_NO_PIC'] == 'YES':
cflags.append('-mdynamic-no-pic')
else:
pass
# TODO: In this case, it depends on the target. xcode passes
# mdynamic-no-pic by default for executable and possibly static lib
# according to mento
if self._Test('GCC_ENABLE_PASCAL_STRINGS', 'YES', default='YES'):
cflags.append('-mpascal-strings')
self._Appendf(cflags, 'GCC_OPTIMIZATION_LEVEL', '-O%s', default='s')
if self._Test('GCC_GENERATE_DEBUGGING_SYMBOLS', 'YES', default='YES'):
dbg_format = self._Settings().get('DEBUG_INFORMATION_FORMAT', 'dwarf')
if dbg_format == 'dwarf':
cflags.append('-gdwarf-2')
elif dbg_format == 'stabs':
raise NotImplementedError('stabs debug format is not supported yet.')
elif dbg_format == 'dwarf-with-dsym':
cflags.append('-gdwarf-2')
else:
raise NotImplementedError('Unknown debug format %s' % dbg_format)
if self._Test('GCC_SYMBOLS_PRIVATE_EXTERN', 'YES', default='NO'):
cflags.append('-fvisibility=hidden')
if self._Test('GCC_TREAT_WARNINGS_AS_ERRORS', 'YES', default='NO'):
cflags.append('-Werror')
if self._Test('GCC_WARN_ABOUT_MISSING_NEWLINE', 'YES', default='NO'):
cflags.append('-Wnewline-eof')
self._AppendPlatformVersionMinFlags(cflags)
# TODO:
if self._Test('COPY_PHASE_STRIP', 'YES', default='NO'):
self._WarnUnimplemented('COPY_PHASE_STRIP')
self._WarnUnimplemented('GCC_DEBUGGING_SYMBOLS')
self._WarnUnimplemented('GCC_ENABLE_OBJC_EXCEPTIONS')
# TODO: This is exported correctly, but assigning to it is not supported.
self._WarnUnimplemented('MACH_O_TYPE')
self._WarnUnimplemented('PRODUCT_TYPE')
archs = self._Settings().get('ARCHS', ['i386'])
if len(archs) != 1:
# TODO: Supporting fat binaries will be annoying.
self._WarnUnimplemented('ARCHS')
archs = ['i386']
cflags.append('-arch ' + archs[0])
if archs[0] in ('i386', 'x86_64'):
if self._Test('GCC_ENABLE_SSE3_EXTENSIONS', 'YES', default='NO'):
cflags.append('-msse3')
if self._Test('GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS', 'YES',
default='NO'):
cflags.append('-mssse3') # Note 3rd 's'.
if self._Test('GCC_ENABLE_SSE41_EXTENSIONS', 'YES', default='NO'):
cflags.append('-msse4.1')
if self._Test('GCC_ENABLE_SSE42_EXTENSIONS', 'YES', default='NO'):
cflags.append('-msse4.2')
cflags += self._Settings().get('WARNING_CFLAGS', [])
config = self.spec['configurations'][self.configname]
framework_dirs = config.get('mac_framework_dirs', [])
for directory in framework_dirs:
cflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root))
self.configname = None
return cflags
def GetCflagsC(self, configname):
"""Returns flags that need to be added to .c, and .m compilations."""
self.configname = configname
cflags_c = []
self._Appendf(cflags_c, 'GCC_C_LANGUAGE_STANDARD', '-std=%s')
cflags_c += self._Settings().get('OTHER_CFLAGS', [])
self.configname = None
return cflags_c
def GetCflagsCC(self, configname):
"""Returns flags that need to be added to .cc, and .mm compilations."""
self.configname = configname
cflags_cc = []
clang_cxx_language_standard = self._Settings().get(
'CLANG_CXX_LANGUAGE_STANDARD')
# Note: Don't make c++0x to c++11 so that c++0x can be used with older
# clangs that don't understand c++11 yet (like Xcode 4.2's).
if clang_cxx_language_standard:
cflags_cc.append('-std=%s' % clang_cxx_language_standard)
self._Appendf(cflags_cc, 'CLANG_CXX_LIBRARY', '-stdlib=%s')
if self._Test('GCC_ENABLE_CPP_RTTI', 'NO', default='YES'):
cflags_cc.append('-fno-rtti')
if self._Test('GCC_ENABLE_CPP_EXCEPTIONS', 'NO', default='YES'):
cflags_cc.append('-fno-exceptions')
if self._Test('GCC_INLINES_ARE_PRIVATE_EXTERN', 'YES', default='NO'):
cflags_cc.append('-fvisibility-inlines-hidden')
if self._Test('GCC_THREADSAFE_STATICS', 'NO', default='YES'):
cflags_cc.append('-fno-threadsafe-statics')
# Note: This flag is a no-op for clang, it only has an effect for gcc.
if self._Test('GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO', 'NO', default='YES'):
cflags_cc.append('-Wno-invalid-offsetof')
other_ccflags = []
for flag in self._Settings().get('OTHER_CPLUSPLUSFLAGS', ['$(inherited)']):
# TODO: More general variable expansion. Missing in many other places too.
if flag in ('$inherited', '$(inherited)', '${inherited}'):
flag = '$OTHER_CFLAGS'
if flag in ('$OTHER_CFLAGS', '$(OTHER_CFLAGS)', '${OTHER_CFLAGS}'):
other_ccflags += self._Settings().get('OTHER_CFLAGS', [])
else:
other_ccflags.append(flag)
cflags_cc += other_ccflags
self.configname = None
return cflags_cc
def _AddObjectiveCGarbageCollectionFlags(self, flags):
gc_policy = self._Settings().get('GCC_ENABLE_OBJC_GC', 'unsupported')
if gc_policy == 'supported':
flags.append('-fobjc-gc')
elif gc_policy == 'required':
flags.append('-fobjc-gc-only')
def GetCflagsObjC(self, configname):
"""Returns flags that need to be added to .m compilations."""
self.configname = configname
cflags_objc = []
self._AddObjectiveCGarbageCollectionFlags(cflags_objc)
self.configname = None
return cflags_objc
def GetCflagsObjCC(self, configname):
"""Returns flags that need to be added to .mm compilations."""
self.configname = configname
cflags_objcc = []
self._AddObjectiveCGarbageCollectionFlags(cflags_objcc)
if self._Test('GCC_OBJC_CALL_CXX_CDTORS', 'YES', default='NO'):
cflags_objcc.append('-fobjc-call-cxx-cdtors')
self.configname = None
return cflags_objcc
def GetInstallNameBase(self):
"""Return DYLIB_INSTALL_NAME_BASE for this target."""
# Xcode sets this for shared_libraries, and for nonbundled loadable_modules.
if (self.spec['type'] != 'shared_library' and
(self.spec['type'] != 'loadable_module' or self._IsBundle())):
return None
install_base = self.GetPerTargetSetting(
'DYLIB_INSTALL_NAME_BASE',
default='/Library/Frameworks' if self._IsBundle() else '/usr/local/lib')
return install_base
def _StandardizePath(self, path):
"""Do :standardizepath processing for path."""
# I'm not quite sure what :standardizepath does. Just call normpath(),
# but don't let @executable_path/../foo collapse to foo.
if '/' in path:
prefix, rest = '', path
if path.startswith('@'):
prefix, rest = path.split('/', 1)
rest = os.path.normpath(rest) # :standardizepath
path = os.path.join(prefix, rest)
return path
def GetInstallName(self):
"""Return LD_DYLIB_INSTALL_NAME for this target."""
# Xcode sets this for shared_libraries, and for nonbundled loadable_modules.
if (self.spec['type'] != 'shared_library' and
(self.spec['type'] != 'loadable_module' or self._IsBundle())):
return None
default_install_name = \
'$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)'
install_name = self.GetPerTargetSetting(
'LD_DYLIB_INSTALL_NAME', default=default_install_name)
# Hardcode support for the variables used in chromium for now, to
# unblock people using the make build.
if '$' in install_name:
assert install_name in ('$(DYLIB_INSTALL_NAME_BASE:standardizepath)/'
'$(WRAPPER_NAME)/$(PRODUCT_NAME)', default_install_name), (
'Variables in LD_DYLIB_INSTALL_NAME are not generally supported '
'yet in target \'%s\' (got \'%s\')' %
(self.spec['target_name'], install_name))
install_name = install_name.replace(
'$(DYLIB_INSTALL_NAME_BASE:standardizepath)',
self._StandardizePath(self.GetInstallNameBase()))
if self._IsBundle():
# These are only valid for bundles, hence the |if|.
install_name = install_name.replace(
'$(WRAPPER_NAME)', self.GetWrapperName())
install_name = install_name.replace(
'$(PRODUCT_NAME)', self.GetProductName())
else:
assert '$(WRAPPER_NAME)' not in install_name
assert '$(PRODUCT_NAME)' not in install_name
install_name = install_name.replace(
'$(EXECUTABLE_PATH)', self.GetExecutablePath())
return install_name
def _MapLinkerFlagFilename(self, ldflag, gyp_to_build_path):
"""Checks if ldflag contains a filename and if so remaps it from
gyp-directory-relative to build-directory-relative."""
# This list is expanded on demand.
# They get matched as:
# -exported_symbols_list file
# -Wl,exported_symbols_list file
# -Wl,exported_symbols_list,file
LINKER_FILE = '(\S+)'
WORD = '\S+'
linker_flags = [
['-exported_symbols_list', LINKER_FILE], # Needed for NaCl.
['-unexported_symbols_list', LINKER_FILE],
['-reexported_symbols_list', LINKER_FILE],
['-sectcreate', WORD, WORD, LINKER_FILE], # Needed for remoting.
]
for flag_pattern in linker_flags:
regex = re.compile('(?:-Wl,)?' + '[ ,]'.join(flag_pattern))
m = regex.match(ldflag)
if m:
ldflag = ldflag[:m.start(1)] + gyp_to_build_path(m.group(1)) + \
ldflag[m.end(1):]
# Required for ffmpeg (no idea why they don't use LIBRARY_SEARCH_PATHS,
# TODO(thakis): Update ffmpeg.gyp):
if ldflag.startswith('-L'):
ldflag = '-L' + gyp_to_build_path(ldflag[len('-L'):])
return ldflag
def GetLdflags(self, configname, product_dir, gyp_to_build_path):
"""Returns flags that need to be passed to the linker.
Args:
configname: The name of the configuration to get ld flags for.
product_dir: The directory where products such static and dynamic
libraries are placed. This is added to the library search path.
gyp_to_build_path: A function that converts paths relative to the
current gyp file to paths relative to the build direcotry.
"""
self.configname = configname
ldflags = []
# The xcode build is relative to a gyp file's directory, and OTHER_LDFLAGS
# can contain entries that depend on this. Explicitly absolutify these.
for ldflag in self._Settings().get('OTHER_LDFLAGS', []):
ldflags.append(self._MapLinkerFlagFilename(ldflag, gyp_to_build_path))
if self._Test('DEAD_CODE_STRIPPING', 'YES', default='NO'):
ldflags.append('-Wl,-dead_strip')
if self._Test('PREBINDING', 'YES', default='NO'):
ldflags.append('-Wl,-prebind')
self._Appendf(
ldflags, 'DYLIB_COMPATIBILITY_VERSION', '-compatibility_version %s')
self._Appendf(
ldflags, 'DYLIB_CURRENT_VERSION', '-current_version %s')
self._AppendPlatformVersionMinFlags(ldflags)
if 'SDKROOT' in self._Settings():
ldflags.append('-isysroot ' + self._SdkPath())
for library_path in self._Settings().get('LIBRARY_SEARCH_PATHS', []):
ldflags.append('-L' + gyp_to_build_path(library_path))
if 'ORDER_FILE' in self._Settings():
ldflags.append('-Wl,-order_file ' +
'-Wl,' + gyp_to_build_path(
self._Settings()['ORDER_FILE']))
archs = self._Settings().get('ARCHS', ['i386'])
if len(archs) != 1:
# TODO: Supporting fat binaries will be annoying.
self._WarnUnimplemented('ARCHS')
archs = ['i386']
ldflags.append('-arch ' + archs[0])
# Xcode adds the product directory by default.
ldflags.append('-L' + product_dir)
install_name = self.GetInstallName()
if install_name:
ldflags.append('-install_name ' + install_name.replace(' ', r'\ '))
for rpath in self._Settings().get('LD_RUNPATH_SEARCH_PATHS', []):
ldflags.append('-Wl,-rpath,' + rpath)
config = self.spec['configurations'][self.configname]
framework_dirs = config.get('mac_framework_dirs', [])
for directory in framework_dirs:
ldflags.append('-F' + directory.replace('$(SDKROOT)', self._SdkPath()))
self.configname = None
return ldflags
def GetLibtoolflags(self, configname):
"""Returns flags that need to be passed to the static linker.
Args:
configname: The name of the configuration to get ld flags for.
"""
self.configname = configname
libtoolflags = []
for libtoolflag in self._Settings().get('OTHER_LDFLAGS', []):
libtoolflags.append(libtoolflag)
# TODO(thakis): ARCHS?
self.configname = None
return libtoolflags
def GetPerTargetSettings(self):
"""Gets a list of all the per-target settings. This will only fetch keys
whose values are the same across all configurations."""
first_pass = True
result = {}
for configname in sorted(self.xcode_settings.keys()):
if first_pass:
result = dict(self.xcode_settings[configname])
first_pass = False
else:
for key, value in self.xcode_settings[configname].iteritems():
if key not in result:
continue
elif result[key] != value:
del result[key]
return result
def GetPerTargetSetting(self, setting, default=None):
"""Tries to get xcode_settings.setting from spec. Assumes that the setting
has the same value in all configurations and throws otherwise."""
first_pass = True
result = None
for configname in sorted(self.xcode_settings.keys()):
if first_pass:
result = self.xcode_settings[configname].get(setting, None)
first_pass = False
else:
assert result == self.xcode_settings[configname].get(setting, None), (
"Expected per-target setting for '%s', got per-config setting "
"(target %s)" % (setting, spec['target_name']))
if result is None:
return default
return result
def _GetStripPostbuilds(self, configname, output_binary, quiet):
"""Returns a list of shell commands that contain the shell commands
neccessary to strip this target's binary. These should be run as postbuilds
before the actual postbuilds run."""
self.configname = configname
result = []
if (self._Test('DEPLOYMENT_POSTPROCESSING', 'YES', default='NO') and
self._Test('STRIP_INSTALLED_PRODUCT', 'YES', default='NO')):
default_strip_style = 'debugging'
if self._IsBundle():
default_strip_style = 'non-global'
elif self.spec['type'] == 'executable':
default_strip_style = 'all'
strip_style = self._Settings().get('STRIP_STYLE', default_strip_style)
strip_flags = {
'all': '',
'non-global': '-x',
'debugging': '-S',
}[strip_style]
explicit_strip_flags = self._Settings().get('STRIPFLAGS', '')
if explicit_strip_flags:
strip_flags += ' ' + _NormalizeEnvVarReferences(explicit_strip_flags)
if not quiet:
result.append('echo STRIP\\(%s\\)' % self.spec['target_name'])
result.append('strip %s %s' % (strip_flags, output_binary))
self.configname = None
return result
def _GetDebugInfoPostbuilds(self, configname, output, output_binary, quiet):
"""Returns a list of shell commands that contain the shell commands
neccessary to massage this target's debug information. These should be run
as postbuilds before the actual postbuilds run."""
self.configname = configname
# For static libraries, no dSYMs are created.
result = []
if (self._Test('GCC_GENERATE_DEBUGGING_SYMBOLS', 'YES', default='YES') and
self._Test(
'DEBUG_INFORMATION_FORMAT', 'dwarf-with-dsym', default='dwarf') and
self.spec['type'] != 'static_library'):
if not quiet:
result.append('echo DSYMUTIL\\(%s\\)' % self.spec['target_name'])
result.append('dsymutil %s -o %s' % (output_binary, output + '.dSYM'))
self.configname = None
return result
def GetTargetPostbuilds(self, configname, output, output_binary, quiet=False):
"""Returns a list of shell commands that contain the shell commands
to run as postbuilds for this target, before the actual postbuilds."""
# dSYMs need to build before stripping happens.
return (
self._GetDebugInfoPostbuilds(configname, output, output_binary, quiet) +
self._GetStripPostbuilds(configname, output_binary, quiet))
def _AdjustLibrary(self, library):
if library.endswith('.framework'):
l = '-framework ' + os.path.splitext(os.path.basename(library))[0]
else:
m = self.library_re.match(library)
if m:
l = '-l' + m.group(1)
else:
l = library
return l.replace('$(SDKROOT)', self._SdkPath())
def AdjustLibraries(self, libraries):
"""Transforms entries like 'Cocoa.framework' in libraries into entries like
'-framework Cocoa', 'libcrypto.dylib' into '-lcrypto', etc.
"""
libraries = [ self._AdjustLibrary(library) for library in libraries]
return libraries
class MacPrefixHeader(object):
"""A class that helps with emulating Xcode's GCC_PREFIX_HEADER feature.
This feature consists of several pieces:
* If GCC_PREFIX_HEADER is present, all compilations in that project get an
additional |-include path_to_prefix_header| cflag.
* If GCC_PRECOMPILE_PREFIX_HEADER is present too, then the prefix header is
instead compiled, and all other compilations in the project get an
additional |-include path_to_compiled_header| instead.
+ Compiled prefix headers have the extension gch. There is one gch file for
every language used in the project (c, cc, m, mm), since gch files for
different languages aren't compatible.
+ gch files themselves are built with the target's normal cflags, but they
obviously don't get the |-include| flag. Instead, they need a -x flag that
describes their language.
+ All o files in the target need to depend on the gch file, to make sure
it's built before any o file is built.
This class helps with some of these tasks, but it needs help from the build
system for writing dependencies to the gch files, for writing build commands
for the gch files, and for figuring out the location of the gch files.
"""
def __init__(self, xcode_settings,
gyp_path_to_build_path, gyp_path_to_build_output):
"""If xcode_settings is None, all methods on this class are no-ops.
Args:
gyp_path_to_build_path: A function that takes a gyp-relative path,
and returns a path relative to the build directory.
gyp_path_to_build_output: A function that takes a gyp-relative path and
a language code ('c', 'cc', 'm', or 'mm'), and that returns a path
to where the output of precompiling that path for that language
should be placed (without the trailing '.gch').
"""
# This doesn't support per-configuration prefix headers. Good enough
# for now.
self.header = None
self.compile_headers = False
if xcode_settings:
self.header = xcode_settings.GetPerTargetSetting('GCC_PREFIX_HEADER')
self.compile_headers = xcode_settings.GetPerTargetSetting(
'GCC_PRECOMPILE_PREFIX_HEADER', default='NO') != 'NO'
self.compiled_headers = {}
if self.header:
if self.compile_headers:
for lang in ['c', 'cc', 'm', 'mm']:
self.compiled_headers[lang] = gyp_path_to_build_output(
self.header, lang)
self.header = gyp_path_to_build_path(self.header)
def GetInclude(self, lang):
"""Gets the cflags to include the prefix header for language |lang|."""
if self.compile_headers and lang in self.compiled_headers:
return '-include %s' % self.compiled_headers[lang]
elif self.header:
return '-include %s' % self.header
else:
return ''
def _Gch(self, lang):
"""Returns the actual file name of the prefix header for language |lang|."""
assert self.compile_headers
return self.compiled_headers[lang] + '.gch'
def GetObjDependencies(self, sources, objs):
"""Given a list of source files and the corresponding object files, returns
a list of (source, object, gch) tuples, where |gch| is the build-directory
relative path to the gch file each object file depends on. |compilable[i]|
has to be the source file belonging to |objs[i]|."""
if not self.header or not self.compile_headers:
return []
result = []
for source, obj in zip(sources, objs):
ext = os.path.splitext(source)[1]
lang = {
'.c': 'c',
'.cpp': 'cc', '.cc': 'cc', '.cxx': 'cc',
'.m': 'm',
'.mm': 'mm',
}.get(ext, None)
if lang:
result.append((source, obj, self._Gch(lang)))
return result
def GetPchBuildCommands(self):
"""Returns [(path_to_gch, language_flag, language, header)].
|path_to_gch| and |header| are relative to the build directory.
"""
if not self.header or not self.compile_headers:
return []
return [
(self._Gch('c'), '-x c-header', 'c', self.header),
(self._Gch('cc'), '-x c++-header', 'cc', self.header),
(self._Gch('m'), '-x objective-c-header', 'm', self.header),
(self._Gch('mm'), '-x objective-c++-header', 'mm', self.header),
]
def MergeGlobalXcodeSettingsToSpec(global_dict, spec):
"""Merges the global xcode_settings dictionary into each configuration of the
target represented by spec. For keys that are both in the global and the local
xcode_settings dict, the local key gets precendence.
"""
# The xcode generator special-cases global xcode_settings and does something
# that amounts to merging in the global xcode_settings into each local
# xcode_settings dict.
global_xcode_settings = global_dict.get('xcode_settings', {})
for config in spec['configurations'].values():
if 'xcode_settings' in config:
new_settings = global_xcode_settings.copy()
new_settings.update(config['xcode_settings'])
config['xcode_settings'] = new_settings
def IsMacBundle(flavor, spec):
"""Returns if |spec| should be treated as a bundle.
Bundles are directories with a certain subdirectory structure, instead of
just a single file. Bundle rules do not produce a binary but also package
resources into that directory."""
is_mac_bundle = (int(spec.get('mac_bundle', 0)) != 0 and flavor == 'mac')
if is_mac_bundle:
assert spec['type'] != 'none', (
'mac_bundle targets cannot have type none (target "%s")' %
spec['target_name'])
return is_mac_bundle
def GetMacBundleResources(product_dir, xcode_settings, resources):
"""Yields (output, resource) pairs for every resource in |resources|.
Only call this for mac bundle targets.
Args:
product_dir: Path to the directory containing the output bundle,
relative to the build directory.
xcode_settings: The XcodeSettings of the current target.
resources: A list of bundle resources, relative to the build directory.
"""
dest = os.path.join(product_dir,
xcode_settings.GetBundleResourceFolder())
for res in resources:
output = dest
# The make generator doesn't support it, so forbid it everywhere
# to keep the generators more interchangable.
assert ' ' not in res, (
"Spaces in resource filenames not supported (%s)" % res)
# Split into (path,file).
res_parts = os.path.split(res)
# Now split the path into (prefix,maybe.lproj).
lproj_parts = os.path.split(res_parts[0])
# If the resource lives in a .lproj bundle, add that to the destination.
if lproj_parts[1].endswith('.lproj'):
output = os.path.join(output, lproj_parts[1])
output = os.path.join(output, res_parts[1])
# Compiled XIB files are referred to by .nib.
if output.endswith('.xib'):
output = output[0:-3] + 'nib'
yield output, res
def GetMacInfoPlist(product_dir, xcode_settings, gyp_path_to_build_path):
"""Returns (info_plist, dest_plist, defines, extra_env), where:
* |info_plist| is the sourc plist path, relative to the
build directory,
* |dest_plist| is the destination plist path, relative to the
build directory,
* |defines| is a list of preprocessor defines (empty if the plist
shouldn't be preprocessed,
* |extra_env| is a dict of env variables that should be exported when
invoking |mac_tool copy-info-plist|.
Only call this for mac bundle targets.
Args:
product_dir: Path to the directory containing the output bundle,
relative to the build directory.
xcode_settings: The XcodeSettings of the current target.
gyp_to_build_path: A function that converts paths relative to the
current gyp file to paths relative to the build direcotry.
"""
info_plist = xcode_settings.GetPerTargetSetting('INFOPLIST_FILE')
if not info_plist:
return None, None, [], {}
# The make generator doesn't support it, so forbid it everywhere
# to keep the generators more interchangable.
assert ' ' not in info_plist, (
"Spaces in Info.plist filenames not supported (%s)" % info_plist)
info_plist = gyp_path_to_build_path(info_plist)
# If explicitly set to preprocess the plist, invoke the C preprocessor and
# specify any defines as -D flags.
if xcode_settings.GetPerTargetSetting(
'INFOPLIST_PREPROCESS', default='NO') == 'YES':
# Create an intermediate file based on the path.
defines = shlex.split(xcode_settings.GetPerTargetSetting(
'INFOPLIST_PREPROCESSOR_DEFINITIONS', default=''))
else:
defines = []
dest_plist = os.path.join(product_dir, xcode_settings.GetBundlePlistPath())
extra_env = xcode_settings.GetPerTargetSettings()
return info_plist, dest_plist, defines, extra_env
def _GetXcodeEnv(xcode_settings, built_products_dir, srcroot, configuration,
additional_settings=None):
"""Return the environment variables that Xcode would set. See
http://developer.apple.com/library/mac/#documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html#//apple_ref/doc/uid/TP40003931-CH3-SW153
for a full list.
Args:
xcode_settings: An XcodeSettings object. If this is None, this function
returns an empty dict.
built_products_dir: Absolute path to the built products dir.
srcroot: Absolute path to the source root.
configuration: The build configuration name.
additional_settings: An optional dict with more values to add to the
result.
"""
if not xcode_settings: return {}
# This function is considered a friend of XcodeSettings, so let it reach into
# its implementation details.
spec = xcode_settings.spec
# These are filled in on a as-needed basis.
env = {
'BUILT_PRODUCTS_DIR' : built_products_dir,
'CONFIGURATION' : configuration,
'PRODUCT_NAME' : xcode_settings.GetProductName(),
# See /Developer/Platforms/MacOSX.platform/Developer/Library/Xcode/Specifications/MacOSX\ Product\ Types.xcspec for FULL_PRODUCT_NAME
'SRCROOT' : srcroot,
'SOURCE_ROOT': '${SRCROOT}',
# This is not true for static libraries, but currently the env is only
# written for bundles:
'TARGET_BUILD_DIR' : built_products_dir,
'TEMP_DIR' : '${TMPDIR}',
}
if xcode_settings.GetPerTargetSetting('SDKROOT'):
env['SDKROOT'] = xcode_settings._SdkPath()
else:
env['SDKROOT'] = ''
if spec['type'] in (
'executable', 'static_library', 'shared_library', 'loadable_module'):
env['EXECUTABLE_NAME'] = xcode_settings.GetExecutableName()
env['EXECUTABLE_PATH'] = xcode_settings.GetExecutablePath()
env['FULL_PRODUCT_NAME'] = xcode_settings.GetFullProductName()
mach_o_type = xcode_settings.GetMachOType()
if mach_o_type:
env['MACH_O_TYPE'] = mach_o_type
env['PRODUCT_TYPE'] = xcode_settings.GetProductType()
if xcode_settings._IsBundle():
env['CONTENTS_FOLDER_PATH'] = \
xcode_settings.GetBundleContentsFolderPath()
env['UNLOCALIZED_RESOURCES_FOLDER_PATH'] = \
xcode_settings.GetBundleResourceFolder()
env['INFOPLIST_PATH'] = xcode_settings.GetBundlePlistPath()
env['WRAPPER_NAME'] = xcode_settings.GetWrapperName()
install_name = xcode_settings.GetInstallName()
if install_name:
env['LD_DYLIB_INSTALL_NAME'] = install_name
install_name_base = xcode_settings.GetInstallNameBase()
if install_name_base:
env['DYLIB_INSTALL_NAME_BASE'] = install_name_base
if not additional_settings:
additional_settings = {}
else:
# Flatten lists to strings.
for k in additional_settings:
if not isinstance(additional_settings[k], str):
additional_settings[k] = ' '.join(additional_settings[k])
additional_settings.update(env)
for k in additional_settings:
additional_settings[k] = _NormalizeEnvVarReferences(additional_settings[k])
return additional_settings
def _NormalizeEnvVarReferences(str):
"""Takes a string containing variable references in the form ${FOO}, $(FOO),
or $FOO, and returns a string with all variable references in the form ${FOO}.
"""
# $FOO -> ${FOO}
str = re.sub(r'\$([a-zA-Z_][a-zA-Z0-9_]*)', r'${\1}', str)
# $(FOO) -> ${FOO}
matches = re.findall(r'(\$\(([a-zA-Z0-9\-_]+)\))', str)
for match in matches:
to_replace, variable = match
assert '$(' not in match, '$($(FOO)) variables not supported: ' + match
str = str.replace(to_replace, '${' + variable + '}')
return str
def ExpandEnvVars(string, expansions):
"""Expands ${VARIABLES}, $(VARIABLES), and $VARIABLES in string per the
expansions list. If the variable expands to something that references
another variable, this variable is expanded as well if it's in env --
until no variables present in env are left."""
for k, v in reversed(expansions):
string = string.replace('${' + k + '}', v)
string = string.replace('$(' + k + ')', v)
string = string.replace('$' + k, v)
return string
def _TopologicallySortedEnvVarKeys(env):
"""Takes a dict |env| whose values are strings that can refer to other keys,
for example env['foo'] = '$(bar) and $(baz)'. Returns a list L of all keys of
env such that key2 is after key1 in L if env[key2] refers to env[key1].
Throws an Exception in case of dependency cycles.
"""
# Since environment variables can refer to other variables, the evaluation
# order is important. Below is the logic to compute the dependency graph
# and sort it.
regex = re.compile(r'\$\{([a-zA-Z0-9\-_]+)\}')
def GetEdges(node):
# Use a definition of edges such that user_of_variable -> used_varible.
# This happens to be easier in this case, since a variable's
# definition contains all variables it references in a single string.
# We can then reverse the result of the topological sort at the end.
# Since: reverse(topsort(DAG)) = topsort(reverse_edges(DAG))
matches = set([v for v in regex.findall(env[node]) if v in env])
for dependee in matches:
assert '${' not in dependee, 'Nested variables not supported: ' + dependee
return matches
try:
# Topologically sort, and then reverse, because we used an edge definition
# that's inverted from the expected result of this function (see comment
# above).
order = gyp.common.TopologicallySorted(env.keys(), GetEdges)
order.reverse()
return order
except gyp.common.CycleError, e:
raise GypError(
'Xcode environment variables are cyclically dependent: ' + str(e.nodes))
def GetSortedXcodeEnv(xcode_settings, built_products_dir, srcroot,
configuration, additional_settings=None):
env = _GetXcodeEnv(xcode_settings, built_products_dir, srcroot, configuration,
additional_settings)
return [(key, env[key]) for key in _TopologicallySortedEnvVarKeys(env)]
def GetSpecPostbuildCommands(spec, quiet=False):
"""Returns the list of postbuilds explicitly defined on |spec|, in a form
executable by a shell."""
postbuilds = []
for postbuild in spec.get('postbuilds', []):
if not quiet:
postbuilds.append('echo POSTBUILD\\(%s\\) %s' % (
spec['target_name'], postbuild['postbuild_name']))
postbuilds.append(gyp.common.EncodePOSIXShellList(postbuild['action']))
return postbuilds
| mit | 6,159,920,823,751,824,000 | -4,691,176,074,124,666,000 | 38.640813 | 191 | 0.658522 | false |
BayanGroup/ansible | lib/ansible/utils/module_docs_fragments/mysql.py | 18 | 2735 | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Jonathan Mainguy <[email protected]>
#
# 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 distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
class ModuleDocFragment(object):
# Standard mysql documentation fragment
DOCUMENTATION = '''
options:
login_user:
description:
- The username used to authenticate with
required: false
default: null
login_password:
description:
- The password used to authenticate with
required: false
default: null
login_host:
description:
- Host running the database
required: false
default: localhost
login_port:
description:
- Port of the MySQL server. Requires login_host be defined as other then localhost if login_port is used
required: false
default: 3306
login_unix_socket:
description:
- The path to a Unix domain socket for local connections
required: false
default: null
config_file:
description:
- Specify a config file from which user and password are to be read
required: false
default: '~/.my.cnf'
version_added: "2.0"
ssl_ca:
required: false
default: null
version_added: "2.0"
description:
- The path to a Certificate Authority (CA) certificate. This option, if used, must specify the same certificate as used by the server.
ssl_cert:
required: false
default: null
version_added: "2.0"
description:
- The path to a client public key certificate.
ssl_key:
required: false
default: null
version_added: "2.0"
description:
- The path to the client private key.
requirements:
- MySQLdb
notes:
- Requires the MySQLdb Python package on the remote host. For Ubuntu, this
is as easy as apt-get install python-mysqldb. (See M(apt).) For CentOS/Fedora, this
is as easy as yum install MySQL-python. (See M(yum).)
- Both C(login_password) and C(login_user) are required when you are
passing credentials. If none are present, the module will attempt to read
the credentials from C(~/.my.cnf), and finally fall back to using the MySQL
default login of 'root' with no password.
'''
| gpl-3.0 | 6,915,932,834,515,062,000 | -2,146,456,283,629,870,000 | 31.559524 | 140 | 0.697623 | false |
mmilaprat/policycompass-services | apps/metricsmanager/api.py | 2 | 5677 | import json
from django.core.exceptions import ValidationError
from django import shortcuts
from rest_framework.views import APIView
from rest_framework.reverse import reverse
from rest_framework.response import Response
from rest_framework.permissions import IsAuthenticatedOrReadOnly
from rest_framework import generics, status
from policycompass_services import permissions
from .serializers import *
from .normalization import get_normalizers
from . import formula, services
class MetricsBase(APIView):
def get(self, request, format=None):
"""
:type request: Request
:param request:
:return:
"""
result = {
"Metrics": reverse('metrics-create-list', request=request),
"Normalizer": reverse('normalizers-list', request=request),
"Calculator": reverse('calculate-dataset', request=request)
}
return Response(result)
class FormulasValidate(APIView):
def get(self, request):
if "formula" not in request.QUERY_PARAMS:
return Response({"formula": "Can not be empty"},
status=status.HTTP_400_BAD_REQUEST)
if "variables" not in request.QUERY_PARAMS:
return Response({"variables": "Can not be empty"},
status=status.HTTP_400_BAD_REQUEST)
formula_str = request.QUERY_PARAMS["formula"]
try:
variables = json.loads(request.QUERY_PARAMS["variables"])
except ValueError as e:
return Response(
{"variables": "Unable to parse json: {}".format(e)},
status=status.HTTP_400_BAD_REQUEST)
try:
variables = formula.validate_variables(variables)
formula.validate_formula(formula_str, variables)
except ValidationError as e:
return Response(e.error_dict, status=status.HTTP_400_BAD_REQUEST)
return Response(status=status.HTTP_204_NO_CONTENT)
class NormalizersList(APIView):
def get(self, request):
normalizers = get_normalizers().values()
serializer = NormalizerSerializer(normalizers, many=True)
return Response(serializer.data)
class MetricsCreate(generics.ListCreateAPIView):
model = Metric
serializer_class = MetricSerializer
paginate_by = 10
paginate_by_param = 'page_size'
permission_classes = IsAuthenticatedOrReadOnly,
def pre_save(self, obj):
obj.creator_path = self.request.user.resource_path
class MetricsDetail(generics.RetrieveUpdateDestroyAPIView):
model = Metric
serializer_class = MetricSerializer
permission_classes = permissions.IsCreatorOrReadOnly,
class DatasetCalculateView(APIView):
permission_classes = IsAuthenticatedOrReadOnly,
def post(self, request):
"""
Compute a new dataset from a given formula and mappings.
Example data:
{
"title": "Some test",
"formula": "0.5 * norm(__1__, 0, 100) + 0.5 * norm(__2__, 0, 200)",
"datasets": [
{
"variable": "__1__",
"dataset": 1,
},
{
"variable": "__1__",
"dataset": 1,
}
],
"indicator_id": 0,
"unit_id": 0,
}
"""
# check resquest data
serializer = CalculateSerializer(data=request.DATA,
files=request.FILES)
if not serializer.is_valid():
return Response(serializer.errors,
status=status.HTTP_400_BAD_REQUEST)
data = serializer.object
try:
formula.validate_formula(data["formula"], data["datasets"])
data = services.validate_operationalize(data)
except ValidationError as e:
return Response(e.error_dict, status=status.HTTP_400_BAD_REQUEST)
creator_path = self.request.user.resource_path
dataset_id = services.compute_dataset(
creator_path=creator_path,
**data)
return Response({
"dataset": {
"id": dataset_id
}
})
class MetriscOperationalize(APIView):
permission_classes = IsAuthenticatedOrReadOnly,
def post(self, request, metrics_id: int):
"""
Compute a new dataset from a given metric and mappings for variables.
Example data:
{
"title" : "Some test",
"datasets": [
{
"variable": "__1__",
"dataset": 1,
}
],
"unit_id": 0,
}
"""
# check if metric exists
metric = shortcuts.get_object_or_404(Metric, pk=metrics_id)
# check resquest data
serializer = OperationalizeSerializer(data=request.DATA,
files=request.FILES)
if not serializer.is_valid():
return Response(serializer.errors,
status=status.HTTP_400_BAD_REQUEST)
data = serializer.object
try:
data = services.validate_operationalize(data)
except ValidationError as e:
return Response(e.error_dict, status=status.HTTP_400_BAD_REQUEST)
creator_path = self.request.user.resource_path
dataset_id = services.compute_dataset(
creator_path=creator_path,
formula=metric.formula,
indicator_id=metric.indicator_id,
metric_id=metric.pk,
**data)
return Response({
"dataset": {
"id": dataset_id
}
})
| agpl-3.0 | 2,845,483,447,041,911,300 | 4,768,546,898,315,967,000 | 29.196809 | 77 | 0.580588 | false |
yosukesuzuki/let-me-notify | project/kay/management/gae_bulkloader.py | 10 | 125396 | #!/usr/bin/env python
#
# Copyright 2007 Google 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 required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
"""Imports data over HTTP.
Usage:
%(arg0)s [flags]
--debug Show debugging information. (Optional)
--app_id=<string> Application ID of endpoint (Optional for
*.appspot.com)
--auth_domain=<domain> The auth domain to use for logging in and for
UserProperties. (Default: gmail.com)
--bandwidth_limit=<int> The maximum number of bytes per second for the
aggregate transfer of data to the server. Bursts
may exceed this, but overall transfer rate is
restricted to this rate. (Default 250000)
--batch_size=<int> Number of Entity objects to include in each post to
the URL endpoint. The more data per row/Entity, the
smaller the batch size should be. (Default 10)
--config_file=<path> File containing Model and Loader definitions.
(Required unless --dump or --restore are used)
--db_filename=<path> Specific progress database to write to, or to
resume from. If not supplied, then a new database
will be started, named:
bulkloader-progress-TIMESTAMP.
The special filename "skip" may be used to simply
skip reading/writing any progress information.
--download Export entities to a file.
--dry_run Do not execute any remote_api calls.
--dump Use zero-configuration dump format.
--email=<string> The username to use. Will prompt if omitted.
--exporter_opts=<string>
A string to pass to the Exporter.initialize method.
--filename=<path> Path to the file to import. (Required)
--has_header Skip the first row of the input.
--http_limit=<int> The maximum numer of HTTP requests per second to
send to the server. (Default: 8)
--kind=<string> Name of the Entity object kind to put in the
datastore. (Required)
--loader_opts=<string> A string to pass to the Loader.initialize method.
--log_file=<path> File to write bulkloader logs. If not supplied
then a new log file will be created, named:
bulkloader-log-TIMESTAMP.
--map Map an action across datastore entities.
--mapper_opts=<string> A string to pass to the Mapper.Initialize method.
--num_threads=<int> Number of threads to use for uploading entities
(Default 10)
--passin Read the login password from stdin.
--restore Restore from zero-configuration dump format.
--result_db_filename=<path>
Result database to write to for downloads.
--rps_limit=<int> The maximum number of records per second to
transfer to the server. (Default: 20)
--url=<string> URL endpoint to post to for importing data.
(Required)
The exit status will be 0 on success, non-zero on import failure.
Works with the remote_api mix-in library for google.appengine.ext.remote_api.
Please look there for documentation about how to setup the server side.
Example:
%(arg0)s --url=http://app.appspot.com/remote_api --kind=Model \
--filename=data.csv --config_file=loader_config.py
"""
import csv
import errno
import getopt
import getpass
import imp
import logging
import os
import Queue
import re
import shutil
import signal
import StringIO
import sys
import threading
import time
import traceback
import urllib2
import urlparse
from google.appengine.datastore import entity_pb
from google.appengine.api import apiproxy_stub_map
from google.appengine.api import datastore
from google.appengine.api import datastore_errors
from google.appengine.datastore import datastore_pb
from google.appengine.ext import db
from google.appengine.ext import key_range as key_range_module
from google.appengine.ext.db import polymodel
from google.appengine.ext.remote_api import remote_api_stub
from google.appengine.ext.remote_api import throttle as remote_api_throttle
from google.appengine.runtime import apiproxy_errors
from google.appengine.tools import adaptive_thread_pool
from google.appengine.tools import appengine_rpc
from google.appengine.tools.requeue import ReQueue
try:
import sqlite3
except ImportError:
pass
logger = logging.getLogger('google.appengine.tools.bulkloader')
KeyRange = key_range_module.KeyRange
DEFAULT_THREAD_COUNT = 10
DEFAULT_BATCH_SIZE = 10
DEFAULT_DOWNLOAD_BATCH_SIZE = 100
DEFAULT_QUEUE_SIZE = DEFAULT_THREAD_COUNT * 10
_THREAD_SHOULD_EXIT = '_THREAD_SHOULD_EXIT'
STATE_READ = 0
STATE_SENDING = 1
STATE_SENT = 2
STATE_NOT_SENT = 3
STATE_GETTING = 1
STATE_GOT = 2
STATE_ERROR = 3
DATA_CONSUMED_TO_HERE = 'DATA_CONSUMED_TO_HERE'
INITIAL_BACKOFF = 1.0
BACKOFF_FACTOR = 2.0
DEFAULT_BANDWIDTH_LIMIT = 250000
DEFAULT_RPS_LIMIT = 20
DEFAULT_REQUEST_LIMIT = 8
MAXIMUM_INCREASE_DURATION = 5.0
MAXIMUM_HOLD_DURATION = 12.0
def ImportStateMessage(state):
"""Converts a numeric state identifier to a status message."""
return ({
STATE_READ: 'Batch read from file.',
STATE_SENDING: 'Sending batch to server.',
STATE_SENT: 'Batch successfully sent.',
STATE_NOT_SENT: 'Error while sending batch.'
}[state])
def ExportStateMessage(state):
"""Converts a numeric state identifier to a status message."""
return ({
STATE_READ: 'Batch read from file.',
STATE_GETTING: 'Fetching batch from server',
STATE_GOT: 'Batch successfully fetched.',
STATE_ERROR: 'Error while fetching batch'
}[state])
def MapStateMessage(state):
"""Converts a numeric state identifier to a status message."""
return ({
STATE_READ: 'Batch read from file.',
STATE_GETTING: 'Querying for batch from server',
STATE_GOT: 'Batch successfully fetched.',
STATE_ERROR: 'Error while fetching or mapping.'
}[state])
def ExportStateName(state):
"""Converts a numeric state identifier to a string."""
return ({
STATE_READ: 'READ',
STATE_GETTING: 'GETTING',
STATE_GOT: 'GOT',
STATE_ERROR: 'NOT_GOT'
}[state])
def ImportStateName(state):
"""Converts a numeric state identifier to a string."""
return ({
STATE_READ: 'READ',
STATE_GETTING: 'SENDING',
STATE_GOT: 'SENT',
STATE_NOT_SENT: 'NOT_SENT'
}[state])
class Error(Exception):
"""Base-class for exceptions in this module."""
class MissingPropertyError(Error):
"""An expected field is missing from an entity, and no default was given."""
class FatalServerError(Error):
"""An unrecoverable error occurred while posting data to the server."""
class ResumeError(Error):
"""Error while trying to resume a partial upload."""
class ConfigurationError(Error):
"""Error in configuration options."""
class AuthenticationError(Error):
"""Error while trying to authenticate with the server."""
class FileNotFoundError(Error):
"""A filename passed in by the user refers to a non-existent input file."""
class FileNotReadableError(Error):
"""A filename passed in by the user refers to a non-readable input file."""
class FileExistsError(Error):
"""A filename passed in by the user refers to an existing output file."""
class FileNotWritableError(Error):
"""A filename passed in by the user refers to a non-writable output file."""
class BadStateError(Error):
"""A work item in an unexpected state was encountered."""
class KeyRangeError(Error):
"""An error during construction of a KeyRangeItem."""
class FieldSizeLimitError(Error):
"""The csv module tried to read a field larger than the size limit."""
def __init__(self, limit):
self.message = """
A field in your CSV input file has exceeded the current limit of %d.
You can raise this limit by adding the following lines to your config file:
import csv
csv.field_size_limit(new_limit)
where new_limit is number larger than the size in bytes of the largest
field in your CSV.
""" % limit
Error.__init__(self, self.message)
class NameClashError(Error):
"""A name clash occurred while trying to alias old method names."""
def __init__(self, old_name, new_name, klass):
Error.__init__(self, old_name, new_name, klass)
self.old_name = old_name
self.new_name = new_name
self.klass = klass
def GetCSVGeneratorFactory(kind, csv_filename, batch_size, csv_has_header,
openfile=open, create_csv_reader=csv.reader):
"""Return a factory that creates a CSV-based UploadWorkItem generator.
Args:
kind: The kind of the entities being uploaded.
csv_filename: File on disk containing CSV data.
batch_size: Maximum number of CSV rows to stash into an UploadWorkItem.
csv_has_header: Whether to skip the first row of the CSV.
openfile: Used for dependency injection.
create_csv_reader: Used for dependency injection.
Returns:
A callable (accepting the Progress Queue and Progress Generators
as input) which creates the UploadWorkItem generator.
"""
loader = Loader.RegisteredLoader(kind)
loader._Loader__openfile = openfile
loader._Loader__create_csv_reader = create_csv_reader
record_generator = loader.generate_records(csv_filename)
def CreateGenerator(request_manager, progress_queue, progress_generator):
"""Initialize a UploadWorkItem generator.
Args:
request_manager: A RequestManager instance.
progress_queue: A ProgressQueue instance to send progress information.
progress_generator: A generator of progress information or None.
Returns:
An UploadWorkItemGenerator instance.
"""
return UploadWorkItemGenerator(request_manager,
progress_queue,
progress_generator,
record_generator,
csv_has_header,
batch_size)
return CreateGenerator
class UploadWorkItemGenerator(object):
"""Reads rows from a row generator and generates UploadWorkItems."""
def __init__(self,
request_manager,
progress_queue,
progress_generator,
record_generator,
skip_first,
batch_size):
"""Initialize a WorkItemGenerator.
Args:
request_manager: A RequestManager instance with which to associate
WorkItems.
progress_queue: A progress queue with which to associate WorkItems.
progress_generator: A generator of progress information.
record_generator: A generator of data records.
skip_first: Whether to skip the first data record.
batch_size: The number of data records per WorkItem.
"""
self.request_manager = request_manager
self.progress_queue = progress_queue
self.progress_generator = progress_generator
self.reader = record_generator
self.skip_first = skip_first
self.batch_size = batch_size
self.line_number = 1
self.column_count = None
self.read_rows = []
self.row_count = 0
self.xfer_count = 0
def _AdvanceTo(self, line):
"""Advance the reader to the given line.
Args:
line: A line number to advance to.
"""
while self.line_number < line:
self.reader.next()
self.line_number += 1
self.row_count += 1
self.xfer_count += 1
def _ReadRows(self, key_start, key_end):
"""Attempts to read and encode rows [key_start, key_end].
The encoded rows are stored in self.read_rows.
Args:
key_start: The starting line number.
key_end: The ending line number.
Raises:
StopIteration: if the reader runs out of rows
ResumeError: if there are an inconsistent number of columns.
"""
assert self.line_number == key_start
self.read_rows = []
while self.line_number <= key_end:
row = self.reader.next()
self.row_count += 1
if self.column_count is None:
self.column_count = len(row)
else:
if self.column_count != len(row):
raise ResumeError('Column count mismatch, %d: %s' %
(self.column_count, str(row)))
self.read_rows.append((self.line_number, row))
self.line_number += 1
def _MakeItem(self, key_start, key_end, rows, progress_key=None):
"""Makes a UploadWorkItem containing the given rows, with the given keys.
Args:
key_start: The start key for the UploadWorkItem.
key_end: The end key for the UploadWorkItem.
rows: A list of the rows for the UploadWorkItem.
progress_key: The progress key for the UploadWorkItem
Returns:
An UploadWorkItem instance for the given batch.
"""
assert rows
item = UploadWorkItem(self.request_manager, self.progress_queue, rows,
key_start, key_end, progress_key=progress_key)
return item
def Batches(self):
"""Reads from the record_generator and generates UploadWorkItems.
Yields:
Instances of class UploadWorkItem
Raises:
ResumeError: If the progress database and data file indicate a different
number of rows.
"""
if self.skip_first:
logger.info('Skipping header line.')
try:
self.reader.next()
except StopIteration:
return
exhausted = False
self.line_number = 1
self.column_count = None
logger.info('Starting import; maximum %d entities per post',
self.batch_size)
state = None
if self.progress_generator:
for progress_key, state, key_start, key_end in self.progress_generator:
if key_start:
try:
self._AdvanceTo(key_start)
self._ReadRows(key_start, key_end)
yield self._MakeItem(key_start,
key_end,
self.read_rows,
progress_key=progress_key)
except StopIteration:
logger.error('Mismatch between data file and progress database')
raise ResumeError(
'Mismatch between data file and progress database')
elif state == DATA_CONSUMED_TO_HERE:
try:
self._AdvanceTo(key_end + 1)
except StopIteration:
state = None
if self.progress_generator is None or state == DATA_CONSUMED_TO_HERE:
while not exhausted:
key_start = self.line_number
key_end = self.line_number + self.batch_size - 1
try:
self._ReadRows(key_start, key_end)
except StopIteration:
exhausted = True
key_end = self.line_number - 1
if key_start <= key_end:
yield self._MakeItem(key_start, key_end, self.read_rows)
class CSVGenerator(object):
"""Reads a CSV file and generates data records."""
def __init__(self,
csv_filename,
openfile=open,
create_csv_reader=csv.reader):
"""Initializes a CSV generator.
Args:
csv_filename: File on disk containing CSV data.
openfile: Used for dependency injection of 'open'.
create_csv_reader: Used for dependency injection of 'csv.reader'.
"""
self.csv_filename = csv_filename
self.openfile = openfile
self.create_csv_reader = create_csv_reader
def Records(self):
"""Reads the CSV data file and generates row records.
Yields:
Lists of strings
Raises:
ResumeError: If the progress database and data file indicate a different
number of rows.
"""
csv_file = self.openfile(self.csv_filename, 'rb')
reader = self.create_csv_reader(csv_file, skipinitialspace=True)
try:
for record in reader:
yield record
except csv.Error, e:
if e.args and e.args[0].startswith('field larger than field limit'):
limit = e.args[1]
raise FieldSizeLimitError(limit)
else:
raise
class KeyRangeItemGenerator(object):
"""Generates ranges of keys to download.
Reads progress information from the progress database and creates
KeyRangeItem objects corresponding to incompletely downloaded parts of an
export.
"""
def __init__(self, request_manager, kind, progress_queue, progress_generator,
key_range_item_factory):
"""Initialize the KeyRangeItemGenerator.
Args:
request_manager: A RequestManager instance.
kind: The kind of entities being transferred.
progress_queue: A queue used for tracking progress information.
progress_generator: A generator of prior progress information, or None
if there is no prior status.
key_range_item_factory: A factory to produce KeyRangeItems.
"""
self.request_manager = request_manager
self.kind = kind
self.row_count = 0
self.xfer_count = 0
self.progress_queue = progress_queue
self.progress_generator = progress_generator
self.key_range_item_factory = key_range_item_factory
def Batches(self):
"""Iterate through saved progress information.
Yields:
KeyRangeItem instances corresponding to undownloaded key ranges.
"""
if self.progress_generator is not None:
for progress_key, state, key_start, key_end in self.progress_generator:
if state is not None and state != STATE_GOT and key_start is not None:
key_start = ParseKey(key_start)
key_end = ParseKey(key_end)
key_range = KeyRange(key_start=key_start,
key_end=key_end)
result = self.key_range_item_factory(self.request_manager,
self.progress_queue,
self.kind,
key_range,
progress_key=progress_key,
state=STATE_READ)
yield result
else:
key_range = KeyRange()
yield self.key_range_item_factory(self.request_manager,
self.progress_queue,
self.kind,
key_range)
class DownloadResult(object):
"""Holds the result of an entity download."""
def __init__(self, continued, direction, keys, entities):
self.continued = continued
self.direction = direction
self.keys = keys
self.entities = entities
self.count = len(keys)
assert self.count == len(entities)
assert direction in (key_range_module.KeyRange.ASC,
key_range_module.KeyRange.DESC)
if self.count > 0:
if direction == key_range_module.KeyRange.ASC:
self.key_start = keys[0]
self.key_end = keys[-1]
else:
self.key_start = keys[-1]
self.key_end = keys[0]
def Entities(self):
"""Returns the list of entities for this result in key order."""
if self.direction == key_range_module.KeyRange.ASC:
return list(self.entities)
else:
result = list(self.entities)
result.reverse()
return result
def __str__(self):
return 'continued = %s\n%s' % (
str(self.continued), '\n'.join(str(self.entities)))
class _WorkItem(adaptive_thread_pool.WorkItem):
"""Holds a description of a unit of upload or download work."""
def __init__(self, progress_queue, key_start, key_end, state_namer,
state=STATE_READ, progress_key=None):
"""Initialize the _WorkItem instance.
Args:
progress_queue: A queue used for tracking progress information.
key_start: The start key of the work item.
key_end: The end key of the work item.
state_namer: Function to describe work item states.
state: The initial state of the work item.
progress_key: If this WorkItem represents state from a prior run,
then this will be the key within the progress database.
"""
adaptive_thread_pool.WorkItem.__init__(self,
'[%s-%s]' % (key_start, key_end))
self.progress_queue = progress_queue
self.state_namer = state_namer
self.state = state
self.progress_key = progress_key
self.progress_event = threading.Event()
self.key_start = key_start
self.key_end = key_end
self.error = None
self.traceback = None
def _TransferItem(self, thread_pool):
raise NotImplementedError()
def SetError(self):
"""Sets the error and traceback information for this thread.
This must be called from an exception handler.
"""
if not self.error:
exc_info = sys.exc_info()
self.error = exc_info[1]
self.traceback = exc_info[2]
def PerformWork(self, thread_pool):
"""Perform the work of this work item and report the results.
Args:
thread_pool: An AdaptiveThreadPool instance.
Returns:
A tuple (status, instruction) of the work status and an instruction
for the ThreadGate.
"""
status = adaptive_thread_pool.WorkItem.FAILURE
instruction = adaptive_thread_pool.ThreadGate.DECREASE
try:
self.MarkAsTransferring()
try:
transfer_time = self._TransferItem(thread_pool)
if transfer_time is None:
status = adaptive_thread_pool.WorkItem.RETRY
instruction = adaptive_thread_pool.ThreadGate.HOLD
else:
logger.debug('[%s] %s Transferred %d entities in %0.1f seconds',
threading.currentThread().getName(), self, self.count,
transfer_time)
sys.stdout.write('.')
sys.stdout.flush()
status = adaptive_thread_pool.WorkItem.SUCCESS
if transfer_time <= MAXIMUM_INCREASE_DURATION:
instruction = adaptive_thread_pool.ThreadGate.INCREASE
elif transfer_time <= MAXIMUM_HOLD_DURATION:
instruction = adaptive_thread_pool.ThreadGate.HOLD
except (db.InternalError, db.NotSavedError, db.Timeout,
db.TransactionFailedError,
apiproxy_errors.OverQuotaError,
apiproxy_errors.DeadlineExceededError,
apiproxy_errors.ApplicationError), e:
status = adaptive_thread_pool.WorkItem.RETRY
logger.exception('Retrying on non-fatal datastore error: %s', e)
except urllib2.HTTPError, e:
http_status = e.code
if http_status == 403 or (http_status >= 500 and http_status < 600):
status = adaptive_thread_pool.WorkItem.RETRY
logger.exception('Retrying on non-fatal HTTP error: %d %s',
http_status, e.msg)
else:
self.SetError()
status = adaptive_thread_pool.WorkItem.FAILURE
except urllib2.URLError, e:
if IsURLErrorFatal(e):
self.SetError()
status = adaptive_thread_pool.WorkItem.FAILURE
else:
status = adaptive_thread_pool.WorkItem.RETRY
logger.exception('Retrying on non-fatal URL error: %s', e.reason)
finally:
if status == adaptive_thread_pool.WorkItem.SUCCESS:
self.MarkAsTransferred()
else:
self.MarkAsError()
return (status, instruction)
def _AssertInState(self, *states):
"""Raises an Error if the state of this range is not in states."""
if not self.state in states:
raise BadStateError('%s:%s not in %s' %
(str(self),
self.state_namer(self.state),
map(self.state_namer, states)))
def _AssertProgressKey(self):
"""Raises an Error if the progress key is None."""
if self.progress_key is None:
raise BadStateError('%s: Progress key is missing' % str(self))
def MarkAsRead(self):
"""Mark this _WorkItem as read, updating the progress database."""
self._AssertInState(STATE_READ)
self._StateTransition(STATE_READ, blocking=True)
def MarkAsTransferring(self):
"""Mark this _WorkItem as transferring, updating the progress database."""
self._AssertInState(STATE_READ, STATE_ERROR)
self._AssertProgressKey()
self._StateTransition(STATE_GETTING, blocking=True)
def MarkAsTransferred(self):
"""Mark this _WorkItem as transferred, updating the progress database."""
raise NotImplementedError()
def MarkAsError(self):
"""Mark this _WorkItem as failed, updating the progress database."""
self._AssertInState(STATE_GETTING)
self._AssertProgressKey()
self._StateTransition(STATE_ERROR, blocking=True)
def _StateTransition(self, new_state, blocking=False):
"""Transition the work item to a new state, storing progress information.
Args:
new_state: The state to transition to.
blocking: Whether to block for the progress thread to acknowledge the
transition.
"""
assert not self.progress_event.isSet()
self.state = new_state
self.progress_queue.put(self)
if blocking:
self.progress_event.wait()
self.progress_event.clear()
class UploadWorkItem(_WorkItem):
"""Holds a unit of uploading work.
A UploadWorkItem represents a number of entities that need to be uploaded to
Google App Engine. These entities are encoded in the "content" field of
the UploadWorkItem, and will be POST'd as-is to the server.
The entities are identified by a range of numeric keys, inclusively. In
the case of a resumption of an upload, or a replay to correct errors,
these keys must be able to identify the same set of entities.
Note that keys specify a range. The entities do not have to sequentially
fill the entire range, they must simply bound a range of valid keys.
"""
def __init__(self, request_manager, progress_queue, rows, key_start, key_end,
progress_key=None):
"""Initialize the UploadWorkItem instance.
Args:
request_manager: A RequestManager instance.
progress_queue: A queue used for tracking progress information.
rows: A list of pairs of a line number and a list of column values
key_start: The (numeric) starting key, inclusive.
key_end: The (numeric) ending key, inclusive.
progress_key: If this UploadWorkItem represents state from a prior run,
then this will be the key within the progress database.
"""
_WorkItem.__init__(self, progress_queue, key_start, key_end,
ImportStateName, state=STATE_READ,
progress_key=progress_key)
assert isinstance(key_start, (int, long))
assert isinstance(key_end, (int, long))
assert key_start <= key_end
self.request_manager = request_manager
self.rows = rows
self.content = None
self.count = len(rows)
def __str__(self):
return '[%s-%s]' % (self.key_start, self.key_end)
def _TransferItem(self, thread_pool, get_time=time.time):
"""Transfers the entities associated with an item.
Args:
thread_pool: An AdaptiveThreadPool instance.
get_time: Used for dependency injection.
"""
t = get_time()
if not self.content:
self.content = self.request_manager.EncodeContent(self.rows)
try:
self.request_manager.PostEntities(self.content)
except:
raise
return get_time() - t
def MarkAsTransferred(self):
"""Mark this UploadWorkItem as sucessfully-sent to the server."""
self._AssertInState(STATE_SENDING)
self._AssertProgressKey()
self._StateTransition(STATE_SENT, blocking=False)
def GetImplementationClass(kind_or_class_key):
"""Returns the implementation class for a given kind or class key.
Args:
kind_or_class_key: A kind string or a tuple of kind strings.
Return:
A db.Model subclass for the given kind or class key.
"""
if isinstance(kind_or_class_key, tuple):
try:
implementation_class = polymodel._class_map[kind_or_class_key]
except KeyError:
raise db.KindError('No implementation for class \'%s\'' %
kind_or_class_key)
else:
implementation_class = db.class_for_kind(kind_or_class_key)
return implementation_class
def KeyLEQ(key1, key2):
"""Compare two keys for less-than-or-equal-to.
All keys with numeric ids come before all keys with names. None represents
an unbounded end-point so it is both greater and less than any other key.
Args:
key1: An int or datastore.Key instance.
key2: An int or datastore.Key instance.
Returns:
True if key1 <= key2
"""
if key1 is None or key2 is None:
return True
return key1 <= key2
class KeyRangeItem(_WorkItem):
"""Represents an item of work that scans over a key range.
A KeyRangeItem object represents holds a KeyRange
and has an associated state: STATE_READ, STATE_GETTING, STATE_GOT,
and STATE_ERROR.
- STATE_READ indicates the range ready to be downloaded by a worker thread.
- STATE_GETTING indicates the range is currently being downloaded.
- STATE_GOT indicates that the range was successfully downloaded
- STATE_ERROR indicates that an error occurred during the last download
attempt
KeyRangeItems not in the STATE_GOT state are stored in the progress database.
When a piece of KeyRangeItem work is downloaded, the download may cover only
a portion of the range. In this case, the old KeyRangeItem is removed from
the progress database and ranges covering the undownloaded range are
generated and stored as STATE_READ in the export progress database.
"""
def __init__(self,
request_manager,
progress_queue,
kind,
key_range,
progress_key=None,
state=STATE_READ):
"""Initialize a KeyRangeItem object.
Args:
request_manager: A RequestManager instance.
progress_queue: A queue used for tracking progress information.
kind: The kind of entities for this range.
key_range: A KeyRange instance for this work item.
progress_key: The key for this range within the progress database.
state: The initial state of this range.
"""
_WorkItem.__init__(self, progress_queue, key_range.key_start,
key_range.key_end, ExportStateName, state=state,
progress_key=progress_key)
self.request_manager = request_manager
self.kind = kind
self.key_range = key_range
self.download_result = None
self.count = 0
self.key_start = key_range.key_start
self.key_end = key_range.key_end
def __str__(self):
return str(self.key_range)
def __repr__(self):
return self.__str__()
def MarkAsTransferred(self):
"""Mark this KeyRangeItem as transferred, updating the progress database."""
pass
def Process(self, download_result, thread_pool, batch_size,
new_state=STATE_GOT):
"""Mark this KeyRangeItem as success, updating the progress database.
Process will split this KeyRangeItem based on the content of
download_result and adds the unfinished ranges to the work queue.
Args:
download_result: A DownloadResult instance.
thread_pool: An AdaptiveThreadPool instance.
batch_size: The number of entities to transfer per request.
new_state: The state to transition the completed range to.
"""
self._AssertInState(STATE_GETTING)
self._AssertProgressKey()
self.download_result = download_result
self.count = len(download_result.keys)
if download_result.continued:
self._FinishedRange()._StateTransition(new_state, blocking=True)
self._AddUnfinishedRanges(thread_pool, batch_size)
else:
self._StateTransition(new_state, blocking=True)
def _FinishedRange(self):
"""Returns the range completed by the download_result.
Returns:
A KeyRangeItem representing a completed range.
"""
assert self.download_result is not None
if self.key_range.direction == key_range_module.KeyRange.ASC:
key_start = self.key_range.key_start
if self.download_result.continued:
key_end = self.download_result.key_end
else:
key_end = self.key_range.key_end
else:
key_end = self.key_range.key_end
if self.download_result.continued:
key_start = self.download_result.key_start
else:
key_start = self.key_range.key_start
key_range = KeyRange(key_start=key_start,
key_end=key_end,
direction=self.key_range.direction)
result = self.__class__(self.request_manager,
self.progress_queue,
self.kind,
key_range,
progress_key=self.progress_key,
state=self.state)
result.download_result = self.download_result
result.count = self.count
return result
def _SplitAndAddRanges(self, thread_pool, batch_size):
"""Split the key range [key_start, key_end] into a list of ranges."""
if self.download_result.direction == key_range_module.KeyRange.ASC:
key_range = KeyRange(
key_start=self.download_result.key_end,
key_end=self.key_range.key_end,
include_start=False)
else:
key_range = KeyRange(
key_start=self.key_range.key_start,
key_end=self.download_result.key_start,
include_end=False)
if thread_pool.QueuedItemCount() > 2 * thread_pool.num_threads():
ranges = [key_range]
else:
ranges = key_range.split_range(batch_size=batch_size)
for key_range in ranges:
key_range_item = self.__class__(self.request_manager,
self.progress_queue,
self.kind,
key_range)
key_range_item.MarkAsRead()
thread_pool.SubmitItem(key_range_item, block=True)
def _AddUnfinishedRanges(self, thread_pool, batch_size):
"""Adds incomplete KeyRanges to the thread_pool.
Args:
thread_pool: An AdaptiveThreadPool instance.
batch_size: The number of entities to transfer per request.
Returns:
A list of KeyRanges representing incomplete datastore key ranges.
Raises:
KeyRangeError: if this key range has already been completely transferred.
"""
assert self.download_result is not None
if self.download_result.continued:
self._SplitAndAddRanges(thread_pool, batch_size)
else:
raise KeyRangeError('No unfinished part of key range.')
class DownloadItem(KeyRangeItem):
"""A KeyRangeItem for downloading key ranges."""
def _TransferItem(self, thread_pool, get_time=time.time):
"""Transfers the entities associated with an item."""
t = get_time()
download_result = self.request_manager.GetEntities(self)
transfer_time = get_time() - t
self.Process(download_result, thread_pool,
self.request_manager.batch_size)
return transfer_time
class MapperItem(KeyRangeItem):
"""A KeyRangeItem for mapping over key ranges."""
def _TransferItem(self, thread_pool, get_time=time.time):
t = get_time()
download_result = self.request_manager.GetEntities(self)
transfer_time = get_time() - t
mapper = self.request_manager.GetMapper()
try:
mapper.batch_apply(download_result.Entities())
except MapperRetry:
return None
self.Process(download_result, thread_pool,
self.request_manager.batch_size)
return transfer_time
class RequestManager(object):
"""A class which wraps a connection to the server."""
def __init__(self,
app_id,
host_port,
url_path,
kind,
throttle,
batch_size,
secure,
email,
passin,
dry_run=False):
"""Initialize a RequestManager object.
Args:
app_id: String containing the application id for requests.
host_port: String containing the "host:port" pair; the port is optional.
url_path: partial URL (path) to post entity data to.
kind: Kind of the Entity records being posted.
throttle: A Throttle instance.
batch_size: The number of entities to transfer per request.
secure: Use SSL when communicating with server.
email: If not none, the username to log in with.
passin: If True, the password will be read from standard in.
"""
self.app_id = app_id
self.host_port = host_port
self.host = host_port.split(':')[0]
if url_path and url_path[0] != '/':
url_path = '/' + url_path
self.url_path = url_path
self.kind = kind
self.throttle = throttle
self.batch_size = batch_size
self.secure = secure
self.authenticated = False
self.auth_called = False
self.parallel_download = True
self.email = email
self.passin = passin
self.mapper = None
self.dry_run = dry_run
if self.dry_run:
logger.info('Running in dry run mode, skipping remote_api setup')
return
logger.debug('Configuring remote_api. url_path = %s, '
'servername = %s' % (url_path, host_port))
def CookieHttpRpcServer(*args, **kwargs):
kwargs['save_cookies'] = True
kwargs['account_type'] = 'HOSTED_OR_GOOGLE'
return appengine_rpc.HttpRpcServer(*args, **kwargs)
remote_api_stub.ConfigureRemoteDatastore(
app_id,
url_path,
self.AuthFunction,
servername=host_port,
rpc_server_factory=CookieHttpRpcServer,
secure=self.secure)
remote_api_throttle.ThrottleRemoteDatastore(self.throttle)
logger.debug('Bulkloader using app_id: %s', os.environ['APPLICATION_ID'])
def Authenticate(self):
"""Invoke authentication if necessary."""
logger.info('Connecting to %s%s', self.host_port, self.url_path)
if self.dry_run:
self.authenticated = True
return
remote_api_stub.MaybeInvokeAuthentication()
self.authenticated = True
def AuthFunction(self,
raw_input_fn=raw_input,
password_input_fn=getpass.getpass):
"""Prompts the user for a username and password.
Caches the results the first time it is called and returns the
same result every subsequent time.
Args:
raw_input_fn: Used for dependency injection.
password_input_fn: Used for dependency injection.
Returns:
A pair of the username and password.
"""
if self.email:
email = self.email
else:
print 'Please enter login credentials for %s' % (
self.host)
email = raw_input_fn('Email: ')
if email:
password_prompt = 'Password for %s: ' % email
if self.passin:
password = raw_input_fn(password_prompt)
else:
password = password_input_fn(password_prompt)
else:
password = None
self.auth_called = True
return (email, password)
def EncodeContent(self, rows, loader=None):
"""Encodes row data to the wire format.
Args:
rows: A list of pairs of a line number and a list of column values.
loader: Used for dependency injection.
Returns:
A list of datastore.Entity instances.
Raises:
ConfigurationError: if no loader is defined for self.kind
"""
if not loader:
try:
loader = Loader.RegisteredLoader(self.kind)
except KeyError:
logger.error('No Loader defined for kind %s.' % self.kind)
raise ConfigurationError('No Loader defined for kind %s.' % self.kind)
entities = []
for line_number, values in rows:
key = loader.generate_key(line_number, values)
if isinstance(key, datastore.Key):
parent = key.parent()
key = key.name()
else:
parent = None
entity = loader.create_entity(values, key_name=key, parent=parent)
def ToEntity(entity):
if isinstance(entity, db.Model):
return entity._populate_entity()
else:
return entity
if isinstance(entity, list):
entities.extend(map(ToEntity, entity))
elif entity:
entities.append(ToEntity(entity))
return entities
def PostEntities(self, entities):
"""Posts Entity records to a remote endpoint over HTTP.
Args:
entities: A list of datastore entities.
"""
if self.dry_run:
return
datastore.Put(entities)
def _QueryForPbs(self, query):
"""Perform the given query and return a list of entity_pb's."""
try:
query_pb = query._ToPb(limit=self.batch_size)
result_pb = datastore_pb.QueryResult()
apiproxy_stub_map.MakeSyncCall('datastore_v3', 'RunQuery', query_pb,
result_pb)
next_pb = datastore_pb.NextRequest()
next_pb.set_count(self.batch_size)
next_pb.mutable_cursor().CopyFrom(result_pb.cursor())
result_pb = datastore_pb.QueryResult()
apiproxy_stub_map.MakeSyncCall('datastore_v3', 'Next', next_pb, result_pb)
return result_pb.result_list()
except apiproxy_errors.ApplicationError, e:
raise datastore._ToDatastoreError(e)
def GetEntities(self, key_range_item, key_factory=datastore.Key):
"""Gets Entity records from a remote endpoint over HTTP.
Args:
key_range_item: Range of keys to get.
key_factory: Used for dependency injection.
Returns:
A DownloadResult instance.
Raises:
ConfigurationError: if no Exporter is defined for self.kind
"""
keys = []
entities = []
if self.parallel_download:
query = key_range_item.key_range.make_directed_datastore_query(self.kind)
try:
results = self._QueryForPbs(query)
except datastore_errors.NeedIndexError:
logger.info('%s: No descending index on __key__, '
'performing serial download', self.kind)
self.parallel_download = False
if not self.parallel_download:
key_range_item.key_range.direction = key_range_module.KeyRange.ASC
query = key_range_item.key_range.make_ascending_datastore_query(self.kind)
results = self._QueryForPbs(query)
size = len(results)
for entity in results:
key = key_factory()
key._Key__reference = entity.key()
entities.append(entity)
keys.append(key)
continued = (size == self.batch_size)
key_range_item.count = size
return DownloadResult(continued, key_range_item.key_range.direction,
keys, entities)
def GetMapper(self):
"""Returns a mapper for the registered kind.
Returns:
A Mapper instance.
Raises:
ConfigurationError: if no Mapper is defined for self.kind
"""
if not self.mapper:
try:
self.mapper = Mapper.RegisteredMapper(self.kind)
except KeyError:
logger.error('No Mapper defined for kind %s.' % self.kind)
raise ConfigurationError('No Mapper defined for kind %s.' % self.kind)
return self.mapper
def InterruptibleSleep(sleep_time):
"""Puts thread to sleep, checking this threads exit_flag twice a second.
Args:
sleep_time: Time to sleep.
"""
slept = 0.0
epsilon = .0001
thread = threading.currentThread()
while slept < sleep_time - epsilon:
remaining = sleep_time - slept
this_sleep_time = min(remaining, 0.5)
time.sleep(this_sleep_time)
slept += this_sleep_time
if thread.exit_flag:
return
class _ThreadBase(threading.Thread):
"""Provide some basic features for the threads used in the uploader.
This abstract base class is used to provide some common features:
* Flag to ask thread to exit as soon as possible.
* Record exit/error status for the primary thread to pick up.
* Capture exceptions and record them for pickup.
* Some basic logging of thread start/stop.
* All threads are "daemon" threads.
* Friendly names for presenting to users.
Concrete sub-classes must implement PerformWork().
Either self.NAME should be set or GetFriendlyName() be overridden to
return a human-friendly name for this thread.
The run() method starts the thread and prints start/exit messages.
self.exit_flag is intended to signal that this thread should exit
when it gets the chance. PerformWork() should check self.exit_flag
whenever it has the opportunity to exit gracefully.
"""
def __init__(self):
threading.Thread.__init__(self)
self.setDaemon(True)
self.exit_flag = False
self.error = None
self.traceback = None
def run(self):
"""Perform the work of the thread."""
logger.debug('[%s] %s: started', self.getName(), self.__class__.__name__)
try:
self.PerformWork()
except:
self.SetError()
logger.exception('[%s] %s:', self.getName(), self.__class__.__name__)
logger.debug('[%s] %s: exiting', self.getName(), self.__class__.__name__)
def SetError(self):
"""Sets the error and traceback information for this thread.
This must be called from an exception handler.
"""
if not self.error:
exc_info = sys.exc_info()
self.error = exc_info[1]
self.traceback = exc_info[2]
def PerformWork(self):
"""Perform the thread-specific work."""
raise NotImplementedError()
def CheckError(self):
"""If an error is present, then log it."""
if self.error:
logger.error('Error in %s: %s', self.GetFriendlyName(), self.error)
if self.traceback:
logger.debug(''.join(traceback.format_exception(self.error.__class__,
self.error,
self.traceback)))
def GetFriendlyName(self):
"""Returns a human-friendly description of the thread."""
if hasattr(self, 'NAME'):
return self.NAME
return 'unknown thread'
non_fatal_error_codes = set([errno.EAGAIN,
errno.ENETUNREACH,
errno.ENETRESET,
errno.ECONNRESET,
errno.ETIMEDOUT,
errno.EHOSTUNREACH])
def IsURLErrorFatal(error):
"""Returns False if the given URLError may be from a transient failure.
Args:
error: A urllib2.URLError instance.
"""
assert isinstance(error, urllib2.URLError)
if not hasattr(error, 'reason'):
return True
if not isinstance(error.reason[0], int):
return True
return error.reason[0] not in non_fatal_error_codes
class DataSourceThread(_ThreadBase):
"""A thread which reads WorkItems and pushes them into queue.
This thread will read/consume WorkItems from a generator (produced by
the generator factory). These WorkItems will then be pushed into the
thread_pool. Note that reading will block if/when the thread_pool becomes
full. Information on content consumed from the generator will be pushed
into the progress_queue.
"""
NAME = 'data source thread'
def __init__(self,
request_manager,
thread_pool,
progress_queue,
workitem_generator_factory,
progress_generator_factory):
"""Initialize the DataSourceThread instance.
Args:
request_manager: A RequestManager instance.
thread_pool: An AdaptiveThreadPool instance.
progress_queue: A queue used for tracking progress information.
workitem_generator_factory: A factory that creates a WorkItem generator
progress_generator_factory: A factory that creates a generator which
produces prior progress status, or None if there is no prior status
to use.
"""
_ThreadBase.__init__(self)
self.request_manager = request_manager
self.thread_pool = thread_pool
self.progress_queue = progress_queue
self.workitem_generator_factory = workitem_generator_factory
self.progress_generator_factory = progress_generator_factory
self.entity_count = 0
def PerformWork(self):
"""Performs the work of a DataSourceThread."""
if self.progress_generator_factory:
progress_gen = self.progress_generator_factory()
else:
progress_gen = None
content_gen = self.workitem_generator_factory(self.request_manager,
self.progress_queue,
progress_gen)
self.xfer_count = 0
self.read_count = 0
self.read_all = False
for item in content_gen.Batches():
item.MarkAsRead()
while not self.exit_flag:
try:
self.thread_pool.SubmitItem(item, block=True, timeout=1.0)
self.entity_count += item.count
break
except Queue.Full:
pass
if self.exit_flag:
break
if not self.exit_flag:
self.read_all = True
self.read_count = content_gen.row_count
self.xfer_count = content_gen.xfer_count
def _RunningInThread(thread):
"""Return True if we are running within the specified thread."""
return threading.currentThread().getName() == thread.getName()
class _Database(object):
"""Base class for database connections in this module.
The table is created by a primary thread (the python main thread)
but all future lookups and updates are performed by a secondary
thread.
"""
SIGNATURE_TABLE_NAME = 'bulkloader_database_signature'
def __init__(self,
db_filename,
create_table,
signature,
index=None,
commit_periodicity=100):
"""Initialize the _Database instance.
Args:
db_filename: The sqlite3 file to use for the database.
create_table: A string containing the SQL table creation command.
signature: A string identifying the important invocation options,
used to make sure we are not using an old database.
index: An optional string to create an index for the database.
commit_periodicity: Number of operations between database commits.
"""
self.db_filename = db_filename
logger.info('Opening database: %s', db_filename)
self.primary_conn = sqlite3.connect(db_filename, isolation_level=None)
self.primary_thread = threading.currentThread()
self.secondary_conn = None
self.secondary_thread = None
self.operation_count = 0
self.commit_periodicity = commit_periodicity
try:
self.primary_conn.execute(create_table)
except sqlite3.OperationalError, e:
if 'already exists' not in e.message:
raise
if index:
try:
self.primary_conn.execute(index)
except sqlite3.OperationalError, e:
if 'already exists' not in e.message:
raise
self.existing_table = False
signature_cursor = self.primary_conn.cursor()
create_signature = """
create table %s (
value TEXT not null)
""" % _Database.SIGNATURE_TABLE_NAME
try:
self.primary_conn.execute(create_signature)
self.primary_conn.cursor().execute(
'insert into %s (value) values (?)' % _Database.SIGNATURE_TABLE_NAME,
(signature,))
except sqlite3.OperationalError, e:
if 'already exists' not in e.message:
logger.exception('Exception creating table:')
raise
else:
self.existing_table = True
signature_cursor.execute(
'select * from %s' % _Database.SIGNATURE_TABLE_NAME)
(result,) = signature_cursor.fetchone()
if result and result != signature:
logger.error('Database signature mismatch:\n\n'
'Found:\n'
'%s\n\n'
'Expecting:\n'
'%s\n',
result, signature)
raise ResumeError('Database signature mismatch: %s != %s' % (
signature, result))
def ThreadComplete(self):
"""Finalize any operations the secondary thread has performed.
The database aggregates lots of operations into a single commit, and
this method is used to commit any pending operations as the thread
is about to shut down.
"""
if self.secondary_conn:
self._MaybeCommit(force_commit=True)
def _MaybeCommit(self, force_commit=False):
"""Periodically commit changes into the SQLite database.
Committing every operation is quite expensive, and slows down the
operation of the script. Thus, we only commit after every N operations,
as determined by the self.commit_periodicity value. Optionally, the
caller can force a commit.
Args:
force_commit: Pass True in order for a commit to occur regardless
of the current operation count.
"""
self.operation_count += 1
if force_commit or (self.operation_count % self.commit_periodicity) == 0:
self.secondary_conn.commit()
def _OpenSecondaryConnection(self):
"""Possibly open a database connection for the secondary thread.
If the connection is not open (for the calling thread, which is assumed
to be the unique secondary thread), then open it. We also open a couple
cursors for later use (and reuse).
"""
if self.secondary_conn:
return
assert not _RunningInThread(self.primary_thread)
self.secondary_thread = threading.currentThread()
self.secondary_conn = sqlite3.connect(self.db_filename)
self.insert_cursor = self.secondary_conn.cursor()
self.update_cursor = self.secondary_conn.cursor()
zero_matcher = re.compile(r'\x00')
zero_one_matcher = re.compile(r'\x00\x01')
def KeyStr(key):
"""Returns a string to represent a key, preserving ordering.
Unlike datastore.Key.__str__(), we have the property:
key1 < key2 ==> KeyStr(key1) < KeyStr(key2)
The key string is constructed from the key path as follows:
(1) Strings are prepended with ':' and numeric id's are padded to
20 digits.
(2) Any null characters (u'\0') present are replaced with u'\0\1'
(3) The sequence u'\0\0' is used to separate each component of the path.
(1) assures that names and ids compare properly, while (2) and (3) enforce
the part-by-part comparison of pieces of the path.
Args:
key: A datastore.Key instance.
Returns:
A string representation of the key, which preserves ordering.
"""
assert isinstance(key, datastore.Key)
path = key.to_path()
out_path = []
for part in path:
if isinstance(part, (int, long)):
part = '%020d' % part
else:
part = ':%s' % part
out_path.append(zero_matcher.sub(u'\0\1', part))
out_str = u'\0\0'.join(out_path)
return out_str
def StrKey(key_str):
"""The inverse of the KeyStr function.
Args:
key_str: A string in the range of KeyStr.
Returns:
A datastore.Key instance k, such that KeyStr(k) == key_str.
"""
parts = key_str.split(u'\0\0')
for i in xrange(len(parts)):
if parts[i][0] == ':':
part = parts[i][1:]
part = zero_one_matcher.sub(u'\0', part)
parts[i] = part
else:
parts[i] = int(parts[i])
return datastore.Key.from_path(*parts)
class ResultDatabase(_Database):
"""Persistently record all the entities downloaded during an export.
The entities are held in the database by their unique datastore key
in order to avoid duplication if an export is restarted.
"""
def __init__(self, db_filename, signature, commit_periodicity=1):
"""Initialize a ResultDatabase object.
Args:
db_filename: The name of the SQLite database to use.
signature: A string identifying the important invocation options,
used to make sure we are not using an old database.
commit_periodicity: How many operations to perform between commits.
"""
self.complete = False
create_table = ('create table result (\n'
'id BLOB primary key,\n'
'value BLOB not null)')
_Database.__init__(self,
db_filename,
create_table,
signature,
commit_periodicity=commit_periodicity)
if self.existing_table:
cursor = self.primary_conn.cursor()
cursor.execute('select count(*) from result')
self.existing_count = int(cursor.fetchone()[0])
else:
self.existing_count = 0
self.count = self.existing_count
def _StoreEntity(self, entity_id, entity):
"""Store an entity in the result database.
Args:
entity_id: A datastore.Key for the entity.
entity: The entity to store.
Returns:
True if this entities is not already present in the result database.
"""
assert _RunningInThread(self.secondary_thread)
assert isinstance(entity_id, datastore.Key), (
'expected a datastore.Key, got a %s' % entity_id.__class__.__name__)
key_str = buffer(KeyStr(entity_id).encode('utf-8'))
self.insert_cursor.execute(
'select count(*) from result where id = ?', (key_str,))
already_present = self.insert_cursor.fetchone()[0]
result = True
if already_present:
result = False
self.insert_cursor.execute('delete from result where id = ?',
(key_str,))
else:
self.count += 1
value = entity.Encode()
self.insert_cursor.execute(
'insert into result (id, value) values (?, ?)',
(key_str, buffer(value)))
return result
def StoreEntities(self, keys, entities):
"""Store a group of entities in the result database.
Args:
keys: A list of entity keys.
entities: A list of entities.
Returns:
The number of new entities stored in the result database.
"""
self._OpenSecondaryConnection()
t = time.time()
count = 0
for entity_id, entity in zip(keys,
entities):
if self._StoreEntity(entity_id, entity):
count += 1
logger.debug('%s insert: delta=%.3f',
self.db_filename,
time.time() - t)
logger.debug('Entities transferred total: %s', self.count)
self._MaybeCommit()
return count
def ResultsComplete(self):
"""Marks the result database as containing complete results."""
self.complete = True
def AllEntities(self):
"""Yields all pairs of (id, value) from the result table."""
conn = sqlite3.connect(self.db_filename, isolation_level=None)
cursor = conn.cursor()
cursor.execute(
'select id, value from result order by id')
for unused_entity_id, entity in cursor:
entity_proto = entity_pb.EntityProto(contents=entity)
yield datastore.Entity._FromPb(entity_proto)
class _ProgressDatabase(_Database):
"""Persistently record all progress information during an upload.
This class wraps a very simple SQLite database which records each of
the relevant details from a chunk of work. If the loader is
resumed, then data is replayed out of the database.
"""
def __init__(self,
db_filename,
sql_type,
py_type,
signature,
commit_periodicity=100):
"""Initialize the ProgressDatabase instance.
Args:
db_filename: The name of the SQLite database to use.
sql_type: A string of the SQL type to use for entity keys.
py_type: The python type of entity keys.
signature: A string identifying the important invocation options,
used to make sure we are not using an old database.
commit_periodicity: How many operations to perform between commits.
"""
self.prior_key_end = None
create_table = ('create table progress (\n'
'id integer primary key autoincrement,\n'
'state integer not null,\n'
'key_start %s,\n'
'key_end %s)'
% (sql_type, sql_type))
self.py_type = py_type
index = 'create index i_state on progress (state)'
_Database.__init__(self,
db_filename,
create_table,
signature,
index=index,
commit_periodicity=commit_periodicity)
def UseProgressData(self):
"""Returns True if the database has progress information.
Note there are two basic cases for progress information:
1) All saved records indicate a successful upload. In this case, we
need to skip everything transmitted so far and then send the rest.
2) Some records for incomplete transfer are present. These need to be
sent again, and then we resume sending after all the successful
data.
Returns:
True: if the database has progress information.
Raises:
ResumeError: if there is an error retrieving rows from the database.
"""
assert _RunningInThread(self.primary_thread)
cursor = self.primary_conn.cursor()
cursor.execute('select count(*) from progress')
row = cursor.fetchone()
if row is None:
raise ResumeError('Cannot retrieve progress information from database.')
return row[0] != 0
def StoreKeys(self, key_start, key_end):
"""Record a new progress record, returning a key for later updates.
The specified progress information will be persisted into the database.
A unique key will be returned that identifies this progress state. The
key is later used to (quickly) update this record.
For the progress resumption to proceed properly, calls to StoreKeys
MUST specify monotonically increasing key ranges. This will result in
a database whereby the ID, KEY_START, and KEY_END rows are all
increasing (rather than having ranges out of order).
NOTE: the above precondition is NOT tested by this method (since it
would imply an additional table read or two on each invocation).
Args:
key_start: The starting key of the WorkItem (inclusive)
key_end: The end key of the WorkItem (inclusive)
Returns:
A string to later be used as a unique key to update this state.
"""
self._OpenSecondaryConnection()
assert _RunningInThread(self.secondary_thread)
assert (not key_start) or isinstance(key_start, self.py_type), (
'%s is a %s, %s expected %s' % (key_start,
key_start.__class__,
self.__class__.__name__,
self.py_type))
assert (not key_end) or isinstance(key_end, self.py_type), (
'%s is a %s, %s expected %s' % (key_end,
key_end.__class__,
self.__class__.__name__,
self.py_type))
assert KeyLEQ(key_start, key_end), '%s not less than %s' % (
repr(key_start), repr(key_end))
self.insert_cursor.execute(
'insert into progress (state, key_start, key_end) values (?, ?, ?)',
(STATE_READ, unicode(key_start), unicode(key_end)))
progress_key = self.insert_cursor.lastrowid
self._MaybeCommit()
return progress_key
def UpdateState(self, key, new_state):
"""Update a specified progress record with new information.
Args:
key: The key for this progress record, returned from StoreKeys
new_state: The new state to associate with this progress record.
"""
self._OpenSecondaryConnection()
assert _RunningInThread(self.secondary_thread)
assert isinstance(new_state, int)
self.update_cursor.execute('update progress set state=? where id=?',
(new_state, key))
self._MaybeCommit()
def DeleteKey(self, progress_key):
"""Delete the entities with the given key from the result database."""
self._OpenSecondaryConnection()
assert _RunningInThread(self.secondary_thread)
t = time.time()
self.insert_cursor.execute(
'delete from progress where rowid = ?', (progress_key,))
logger.debug('delete: delta=%.3f', time.time() - t)
self._MaybeCommit()
def GetProgressStatusGenerator(self):
"""Get a generator which yields progress information.
The returned generator will yield a series of 4-tuples that specify
progress information about a prior run of the uploader. The 4-tuples
have the following values:
progress_key: The unique key to later update this record with new
progress information.
state: The last state saved for this progress record.
key_start: The starting key of the items for uploading (inclusive).
key_end: The ending key of the items for uploading (inclusive).
After all incompletely-transferred records are provided, then one
more 4-tuple will be generated:
None
DATA_CONSUMED_TO_HERE: A unique string value indicating this record
is being provided.
None
key_end: An integer value specifying the last data source key that
was handled by the previous run of the uploader.
The caller should begin uploading records which occur after key_end.
Yields:
Four-tuples of (progress_key, state, key_start, key_end)
"""
conn = sqlite3.connect(self.db_filename, isolation_level=None)
cursor = conn.cursor()
cursor.execute('select max(key_end) from progress')
result = cursor.fetchone()
if result is not None:
key_end = result[0]
else:
logger.debug('No rows in progress database.')
return
self.prior_key_end = key_end
cursor.execute(
'select id, state, key_start, key_end from progress'
' where state != ?'
' order by id',
(STATE_SENT,))
rows = cursor.fetchall()
for row in rows:
if row is None:
break
progress_key, state, key_start, key_end = row
yield progress_key, state, key_start, key_end
yield None, DATA_CONSUMED_TO_HERE, None, key_end
def ProgressDatabase(db_filename, signature):
"""Returns a database to store upload progress information."""
return _ProgressDatabase(db_filename, 'INTEGER', int, signature)
class ExportProgressDatabase(_ProgressDatabase):
"""A database to store download progress information."""
def __init__(self, db_filename, signature):
"""Initialize an ExportProgressDatabase."""
_ProgressDatabase.__init__(self,
db_filename,
'TEXT',
datastore.Key,
signature,
commit_periodicity=1)
def UseProgressData(self):
"""Check if the progress database contains progress data.
Returns:
True: if the database contains progress data.
"""
return self.existing_table
class StubProgressDatabase(object):
"""A stub implementation of ProgressDatabase which does nothing."""
def UseProgressData(self):
"""Whether the stub database has progress information (it doesn't)."""
return False
def StoreKeys(self, unused_key_start, unused_key_end):
"""Pretend to store a key in the stub database."""
return 'fake-key'
def UpdateState(self, unused_key, unused_new_state):
"""Pretend to update the state of a progress item."""
pass
def ThreadComplete(self):
"""Finalize operations on the stub database (i.e. do nothing)."""
pass
class _ProgressThreadBase(_ThreadBase):
"""A thread which records progress information for the upload process.
The progress information is stored into the provided progress database.
This class is not responsible for replaying a prior run's progress
information out of the database. Separate mechanisms must be used to
resume a prior upload attempt.
"""
NAME = 'progress tracking thread'
def __init__(self, progress_queue, progress_db):
"""Initialize the ProgressTrackerThread instance.
Args:
progress_queue: A Queue used for tracking progress information.
progress_db: The database for tracking progress information; should
be an instance of ProgressDatabase.
"""
_ThreadBase.__init__(self)
self.progress_queue = progress_queue
self.db = progress_db
self.entities_transferred = 0
def EntitiesTransferred(self):
"""Return the total number of unique entities transferred."""
return self.entities_transferred
def UpdateProgress(self, item):
"""Updates the progress information for the given item.
Args:
item: A work item whose new state will be recorded
"""
raise NotImplementedError()
def WorkFinished(self):
"""Performs final actions after the entity transfer is complete."""
raise NotImplementedError()
def PerformWork(self):
"""Performs the work of a ProgressTrackerThread."""
while not self.exit_flag:
try:
item = self.progress_queue.get(block=True, timeout=1.0)
except Queue.Empty:
continue
if item == _THREAD_SHOULD_EXIT:
break
if item.state == STATE_READ and item.progress_key is None:
item.progress_key = self.db.StoreKeys(item.key_start, item.key_end)
else:
assert item.progress_key is not None
self.UpdateProgress(item)
item.progress_event.set()
self.progress_queue.task_done()
self.db.ThreadComplete()
class ProgressTrackerThread(_ProgressThreadBase):
"""A thread which records progress information for the upload process.
The progress information is stored into the provided progress database.
This class is not responsible for replaying a prior run's progress
information out of the database. Separate mechanisms must be used to
resume a prior upload attempt.
"""
NAME = 'progress tracking thread'
def __init__(self, progress_queue, progress_db):
"""Initialize the ProgressTrackerThread instance.
Args:
progress_queue: A Queue used for tracking progress information.
progress_db: The database for tracking progress information; should
be an instance of ProgressDatabase.
"""
_ProgressThreadBase.__init__(self, progress_queue, progress_db)
def UpdateProgress(self, item):
"""Update the state of the given WorkItem.
Args:
item: A WorkItem instance.
"""
self.db.UpdateState(item.progress_key, item.state)
if item.state == STATE_SENT:
self.entities_transferred += item.count
def WorkFinished(self):
"""Performs final actions after the entity transfer is complete."""
pass
class ExportProgressThread(_ProgressThreadBase):
"""A thread to record progress information and write record data for exports.
The progress information is stored into a provided progress database.
Exported results are stored in the result database and dumped to an output
file at the end of the download.
"""
def __init__(self, kind, progress_queue, progress_db, result_db):
"""Initialize the ExportProgressThread instance.
Args:
kind: The kind of entities being stored in the database.
progress_queue: A Queue used for tracking progress information.
progress_db: The database for tracking progress information; should
be an instance of ProgressDatabase.
result_db: The database for holding exported entities; should be an
instance of ResultDatabase.
"""
_ProgressThreadBase.__init__(self, progress_queue, progress_db)
self.kind = kind
self.existing_count = result_db.existing_count
self.result_db = result_db
def EntitiesTransferred(self):
"""Return the total number of unique entities transferred."""
return self.result_db.count
def WorkFinished(self):
"""Write the contents of the result database."""
exporter = Exporter.RegisteredExporter(self.kind)
exporter.output_entities(self.result_db.AllEntities())
def UpdateProgress(self, item):
"""Update the state of the given KeyRangeItem.
Args:
item: A KeyRange instance.
"""
if item.state == STATE_GOT:
count = self.result_db.StoreEntities(item.download_result.keys,
item.download_result.entities)
self.db.DeleteKey(item.progress_key)
self.entities_transferred += count
else:
self.db.UpdateState(item.progress_key, item.state)
class MapperProgressThread(_ProgressThreadBase):
"""A thread to record progress information for maps over the datastore."""
def __init__(self, kind, progress_queue, progress_db):
"""Initialize the MapperProgressThread instance.
Args:
kind: The kind of entities being stored in the database.
progress_queue: A Queue used for tracking progress information.
progress_db: The database for tracking progress information; should
be an instance of ProgressDatabase.
"""
_ProgressThreadBase.__init__(self, progress_queue, progress_db)
self.kind = kind
self.mapper = Mapper.RegisteredMapper(self.kind)
def EntitiesTransferred(self):
"""Return the total number of unique entities transferred."""
return self.entities_transferred
def WorkFinished(self):
"""Perform actions after map is complete."""
pass
def UpdateProgress(self, item):
"""Update the state of the given KeyRangeItem.
Args:
item: A KeyRange instance.
"""
if item.state == STATE_GOT:
self.entities_transferred += item.count
self.db.DeleteKey(item.progress_key)
else:
self.db.UpdateState(item.progress_key, item.state)
def ParseKey(key_string):
"""Turn a key stored in the database into a Key or None.
Args:
key_string: The string representation of a Key.
Returns:
A datastore.Key instance or None
"""
if not key_string:
return None
if key_string == 'None':
return None
return datastore.Key(encoded=key_string)
def Validate(value, typ):
"""Checks that value is non-empty and of the right type.
Args:
value: any value
typ: a type or tuple of types
Raises:
ValueError: if value is None or empty.
TypeError: if it's not the given type.
"""
if not value:
raise ValueError('Value should not be empty; received %s.' % value)
elif not isinstance(value, typ):
raise TypeError('Expected a %s, but received %s (a %s).' %
(typ, value, value.__class__))
def CheckFile(filename):
"""Check that the given file exists and can be opened for reading.
Args:
filename: The name of the file.
Raises:
FileNotFoundError: if the given filename is not found
FileNotReadableError: if the given filename is not readable.
"""
if not os.path.exists(filename):
raise FileNotFoundError('%s: file not found' % filename)
elif not os.access(filename, os.R_OK):
raise FileNotReadableError('%s: file not readable' % filename)
class Loader(object):
"""A base class for creating datastore entities from input data.
To add a handler for bulk loading a new entity kind into your datastore,
write a subclass of this class that calls Loader.__init__ from your
class's __init__.
If you need to run extra code to convert entities from the input
data, create new properties, or otherwise modify the entities before
they're inserted, override handle_entity.
See the create_entity method for the creation of entities from the
(parsed) input data.
"""
__loaders = {}
kind = None
__properties = None
def __init__(self, kind, properties):
"""Constructor.
Populates this Loader's kind and properties map.
Args:
kind: a string containing the entity kind that this loader handles
properties: list of (name, converter) tuples.
This is used to automatically convert the input columns into
properties. The converter should be a function that takes one
argument, a string value from the input file, and returns a
correctly typed property value that should be inserted. The
tuples in this list should match the columns in your input file,
in order.
For example:
[('name', str),
('id_number', int),
('email', datastore_types.Email),
('user', users.User),
('birthdate', lambda x: datetime.datetime.fromtimestamp(float(x))),
('description', datastore_types.Text),
]
"""
Validate(kind, (basestring, tuple))
self.kind = kind
self.__openfile = open
self.__create_csv_reader = csv.reader
GetImplementationClass(kind)
Validate(properties, list)
for name, fn in properties:
Validate(name, basestring)
assert callable(fn), (
'Conversion function %s for property %s is not callable.' % (fn, name))
self.__properties = properties
@staticmethod
def RegisterLoader(loader):
"""Register loader and the Loader instance for its kind.
Args:
loader: A Loader instance.
"""
Loader.__loaders[loader.kind] = loader
def alias_old_names(self):
"""Aliases method names so that Loaders defined with old names work."""
aliases = (
('CreateEntity', 'create_entity'),
('HandleEntity', 'handle_entity'),
('GenerateKey', 'generate_key'),
)
for old_name, new_name in aliases:
setattr(Loader, old_name, getattr(Loader, new_name))
if hasattr(self.__class__, old_name) and not (
getattr(self.__class__, old_name).im_func ==
getattr(Loader, new_name).im_func):
if hasattr(self.__class__, new_name) and not (
getattr(self.__class__, new_name).im_func ==
getattr(Loader, new_name).im_func):
raise NameClashError(old_name, new_name, self.__class__)
setattr(self, new_name, getattr(self, old_name))
def create_entity(self, values, key_name=None, parent=None):
"""Creates a entity from a list of property values.
Args:
values: list/tuple of str
key_name: if provided, the name for the (single) resulting entity
parent: A datastore.Key instance for the parent, or None
Returns:
list of db.Model
The returned entities are populated with the property values from the
argument, converted to native types using the properties map given in
the constructor, and passed through handle_entity. They're ready to be
inserted.
Raises:
AssertionError: if the number of values doesn't match the number
of properties in the properties map.
ValueError: if any element of values is None or empty.
TypeError: if values is not a list or tuple.
"""
Validate(values, (list, tuple))
assert len(values) == len(self.__properties), (
'Expected %d columns, found %d.' %
(len(self.__properties), len(values)))
model_class = GetImplementationClass(self.kind)
properties = {
'key_name': key_name,
'parent': parent,
}
for (name, converter), val in zip(self.__properties, values):
if converter is bool and val.lower() in ('0', 'false', 'no'):
val = False
properties[name] = converter(val)
entity = model_class(**properties)
entities = self.handle_entity(entity)
if entities:
if not isinstance(entities, (list, tuple)):
entities = [entities]
for entity in entities:
if not isinstance(entity, db.Model):
raise TypeError('Expected a db.Model, received %s (a %s).' %
(entity, entity.__class__))
return entities
def generate_key(self, i, values):
"""Generates a key_name to be used in creating the underlying object.
The default implementation returns None.
This method can be overridden to control the key generation for
uploaded entities. The value returned should be None (to use a
server generated numeric key), or a string which neither starts
with a digit nor has the form __*__ (see
http://code.google.com/appengine/docs/python/datastore/keysandentitygroups.html),
or a datastore.Key instance.
If you generate your own string keys, keep in mind:
1. The key name for each entity must be unique.
2. If an entity of the same kind and key already exists in the
datastore, it will be overwritten.
Args:
i: Number corresponding to this object (assume it's run in a loop,
this is your current count.
values: list/tuple of str.
Returns:
A string to be used as the key_name for an entity.
"""
return None
def handle_entity(self, entity):
"""Subclasses can override this to add custom entity conversion code.
This is called for each entity, after its properties are populated
from the input but before it is stored. Subclasses can override
this to add custom entity handling code.
The entity to be inserted should be returned. If multiple entities
should be inserted, return a list of entities. If no entities
should be inserted, return None or [].
Args:
entity: db.Model
Returns:
db.Model or list of db.Model
"""
return entity
def initialize(self, filename, loader_opts):
"""Performs initialization and validation of the input file.
This implementation checks that the input file exists and can be
opened for reading.
Args:
filename: The string given as the --filename flag argument.
loader_opts: The string given as the --loader_opts flag argument.
"""
CheckFile(filename)
def finalize(self):
"""Performs finalization actions after the upload completes."""
pass
def generate_records(self, filename):
"""Subclasses can override this to add custom data input code.
This method must yield fixed-length lists of strings.
The default implementation uses csv.reader to read CSV rows
from filename.
Args:
filename: The string input for the --filename option.
Yields:
Lists of strings.
"""
csv_generator = CSVGenerator(filename, openfile=self.__openfile,
create_csv_reader=self.__create_csv_reader
).Records()
return csv_generator
@staticmethod
def RegisteredLoaders():
"""Returns a dict of the Loader instances that have been created."""
return dict(Loader.__loaders)
@staticmethod
def RegisteredLoader(kind):
"""Returns the loader instance for the given kind if it exists."""
return Loader.__loaders[kind]
class RestoreThread(_ThreadBase):
"""A thread to read saved entity_pbs from sqlite3."""
NAME = 'RestoreThread'
_ENTITIES_DONE = 'Entities Done'
def __init__(self, queue, filename):
_ThreadBase.__init__(self)
self.queue = queue
self.filename = filename
def PerformWork(self):
db_conn = sqlite3.connect(self.filename)
cursor = db_conn.cursor()
cursor.execute('select id, value from result')
for entity_id, value in cursor:
self.queue.put([entity_id, value], block=True)
self.queue.put(RestoreThread._ENTITIES_DONE, block=True)
class RestoreLoader(Loader):
"""A Loader which imports protobuffers from a file."""
def __init__(self, kind, app_id):
self.kind = kind
self.app_id = app_id
def initialize(self, filename, loader_opts):
CheckFile(filename)
self.queue = Queue.Queue(1000)
restore_thread = RestoreThread(self.queue, filename)
restore_thread.start()
def generate_records(self, filename):
while True:
record = self.queue.get(block=True)
if id(record) == id(RestoreThread._ENTITIES_DONE):
break
yield record
def create_entity(self, values, key_name=None, parent=None):
def convert_key(key, app_id):
path = key.to_path()
kwargs = {'_app_id_namespace': app_id}
return db.Key.from_path(*path,**kwargs)
import copy
key = StrKey(unicode(values[0], 'utf-8'))
entity_proto = entity_pb.EntityProto(contents=str(values[1]))
entity_proto.mutable_key().CopyFrom(key._Key__reference)
entity = datastore.Entity._FromPb(entity_proto)
new_entity = copy.copy(entity)
for k,v in entity.iteritems():
if isinstance(v, db.Key):
new_entity[k] = convert_key(v, self.app_id)
if isinstance(v, list):
new_list = []
for item in v:
if isinstance(item, db.Key):
new_list.append(convert_key(item, self.app_id))
else:
new_list.append(item)
new_entity[k] = new_list
return new_entity
class Exporter(object):
"""A base class for serializing datastore entities.
To add a handler for exporting an entity kind from your datastore,
write a subclass of this class that calls Exporter.__init__ from your
class's __init__.
If you need to run extra code to convert entities from the input
data, create new properties, or otherwise modify the entities before
they're inserted, override handle_entity.
See the output_entities method for the writing of data from entities.
"""
__exporters = {}
kind = None
__properties = None
def __init__(self, kind, properties):
"""Constructor.
Populates this Exporters's kind and properties map.
Args:
kind: a string containing the entity kind that this exporter handles
properties: list of (name, converter, default) tuples.
This is used to automatically convert the entities to strings.
The converter should be a function that takes one argument, a property
value of the appropriate type, and returns a str or unicode. The default
is a string to be used if the property is not present, or None to fail
with an error if the property is missing.
For example:
[('name', str, None),
('id_number', str, None),
('email', str, ''),
('user', str, None),
('birthdate',
lambda x: str(datetime.datetime.fromtimestamp(float(x))),
None),
('description', str, ''),
]
"""
Validate(kind, basestring)
self.kind = kind
GetImplementationClass(kind)
Validate(properties, list)
for name, fn, default in properties:
Validate(name, basestring)
assert callable(fn), (
'Conversion function %s for property %s is not callable.' % (
fn, name))
if default:
Validate(default, basestring)
self.__properties = properties
@staticmethod
def RegisterExporter(exporter):
"""Register exporter and the Exporter instance for its kind.
Args:
exporter: A Exporter instance.
"""
Exporter.__exporters[exporter.kind] = exporter
def __ExtractProperties(self, entity):
"""Converts an entity into a list of string values.
Args:
entity: An entity to extract the properties from.
Returns:
A list of the properties of the entity.
Raises:
MissingPropertyError: if an expected field on the entity is missing.
"""
encoding = []
for name, fn, default in self.__properties:
try:
encoding.append(fn(entity[name]))
except AttributeError:
if default is None:
raise MissingPropertyError(name)
else:
encoding.append(default)
return encoding
def __EncodeEntity(self, entity):
"""Convert the given entity into CSV string.
Args:
entity: The entity to encode.
Returns:
A CSV string.
"""
output = StringIO.StringIO()
writer = csv.writer(output, lineterminator='')
writer.writerow(self.__ExtractProperties(entity))
return output.getvalue()
def __SerializeEntity(self, entity):
"""Creates a string representation of an entity.
Args:
entity: The entity to serialize.
Returns:
A serialized representation of an entity.
"""
encoding = self.__EncodeEntity(entity)
if not isinstance(encoding, unicode):
encoding = unicode(encoding, 'utf-8')
encoding = encoding.encode('utf-8')
return encoding
def output_entities(self, entity_generator):
"""Outputs the downloaded entities.
This implementation writes CSV.
Args:
entity_generator: A generator that yields the downloaded entities
in key order.
"""
CheckOutputFile(self.output_filename)
output_file = open(self.output_filename, 'w')
logger.debug('Export complete, writing to file')
output_file.writelines(self.__SerializeEntity(entity) + '\n'
for entity in entity_generator)
def initialize(self, filename, exporter_opts):
"""Performs initialization and validation of the output file.
This implementation checks that the input file exists and can be
opened for writing.
Args:
filename: The string given as the --filename flag argument.
exporter_opts: The string given as the --exporter_opts flag argument.
"""
CheckOutputFile(filename)
self.output_filename = filename
def finalize(self):
"""Performs finalization actions after the download completes."""
pass
@staticmethod
def RegisteredExporters():
"""Returns a dictionary of the exporter instances that have been created."""
return dict(Exporter.__exporters)
@staticmethod
def RegisteredExporter(kind):
"""Returns an exporter instance for the given kind if it exists."""
return Exporter.__exporters[kind]
class DumpExporter(Exporter):
"""An exporter which dumps protobuffers to a file."""
def __init__(self, kind, result_db_filename):
self.kind = kind
self.result_db_filename = result_db_filename
def output_entities(self, entity_generator):
shutil.copyfile(self.result_db_filename, self.output_filename)
class MapperRetry(Error):
"""An exception that indicates a non-fatal error during mapping."""
class Mapper(object):
"""A base class for serializing datastore entities.
To add a handler for exporting an entity kind from your datastore,
write a subclass of this class that calls Mapper.__init__ from your
class's __init__.
You need to implement to batch_apply or apply method on your subclass
for the map to do anything.
"""
__mappers = {}
kind = None
def __init__(self, kind):
"""Constructor.
Populates this Mappers's kind.
Args:
kind: a string containing the entity kind that this mapper handles
"""
Validate(kind, basestring)
self.kind = kind
GetImplementationClass(kind)
@staticmethod
def RegisterMapper(mapper):
"""Register mapper and the Mapper instance for its kind.
Args:
mapper: A Mapper instance.
"""
Mapper.__mappers[mapper.kind] = mapper
def initialize(self, mapper_opts):
"""Performs initialization.
Args:
mapper_opts: The string given as the --mapper_opts flag argument.
"""
pass
def finalize(self):
"""Performs finalization actions after the download completes."""
pass
def apply(self, entity):
print 'Default map function doing nothing to %s' % entity
def batch_apply(self, entities):
for entity in entities:
self.apply(entity)
@staticmethod
def RegisteredMappers():
"""Returns a dictionary of the mapper instances that have been created."""
return dict(Mapper.__mappers)
@staticmethod
def RegisteredMapper(kind):
"""Returns an mapper instance for the given kind if it exists."""
return Mapper.__mappers[kind]
class QueueJoinThread(threading.Thread):
"""A thread that joins a queue and exits.
Queue joins do not have a timeout. To simulate a queue join with
timeout, run this thread and join it with a timeout.
"""
def __init__(self, queue):
"""Initialize a QueueJoinThread.
Args:
queue: The queue for this thread to join.
"""
threading.Thread.__init__(self)
assert isinstance(queue, (Queue.Queue, ReQueue))
self.queue = queue
def run(self):
"""Perform the queue join in this thread."""
self.queue.join()
def InterruptibleQueueJoin(queue,
thread_local,
thread_pool,
queue_join_thread_factory=QueueJoinThread,
check_workers=True):
"""Repeatedly joins the given ReQueue or Queue.Queue with short timeout.
Between each timeout on the join, worker threads are checked.
Args:
queue: A Queue.Queue or ReQueue instance.
thread_local: A threading.local instance which indicates interrupts.
thread_pool: An AdaptiveThreadPool instance.
queue_join_thread_factory: Used for dependency injection.
check_workers: Whether to interrupt the join on worker death.
Returns:
True unless the queue join is interrupted by SIGINT or worker death.
"""
thread = queue_join_thread_factory(queue)
thread.start()
while True:
thread.join(timeout=.5)
if not thread.isAlive():
return True
if thread_local.shut_down:
logger.debug('Queue join interrupted')
return False
if check_workers:
for worker_thread in thread_pool.Threads():
if not worker_thread.isAlive():
return False
def ShutdownThreads(data_source_thread, thread_pool):
"""Shuts down the worker and data source threads.
Args:
data_source_thread: A running DataSourceThread instance.
thread_pool: An AdaptiveThreadPool instance with workers registered.
"""
logger.info('An error occurred. Shutting down...')
data_source_thread.exit_flag = True
thread_pool.Shutdown()
data_source_thread.join(timeout=3.0)
if data_source_thread.isAlive():
logger.warn('%s hung while trying to exit',
data_source_thread.GetFriendlyName())
class BulkTransporterApp(object):
"""Class to wrap bulk transport application functionality."""
def __init__(self,
arg_dict,
input_generator_factory,
throttle,
progress_db,
progresstrackerthread_factory,
max_queue_size=DEFAULT_QUEUE_SIZE,
request_manager_factory=RequestManager,
datasourcethread_factory=DataSourceThread,
progress_queue_factory=Queue.Queue,
thread_pool_factory=adaptive_thread_pool.AdaptiveThreadPool):
"""Instantiate a BulkTransporterApp.
Uploads or downloads data to or from application using HTTP requests.
When run, the class will spin up a number of threads to read entities
from the data source, pass those to a number of worker threads
for sending to the application, and track all of the progress in a
small database in case an error or pause/termination requires a
restart/resumption of the upload process.
Args:
arg_dict: Dictionary of command line options.
input_generator_factory: A factory that creates a WorkItem generator.
throttle: A Throttle instance.
progress_db: The database to use for replaying/recording progress.
progresstrackerthread_factory: Used for dependency injection.
max_queue_size: Maximum size of the queues before they should block.
request_manager_factory: Used for dependency injection.
datasourcethread_factory: Used for dependency injection.
progress_queue_factory: Used for dependency injection.
thread_pool_factory: Used for dependency injection.
"""
self.app_id = arg_dict['app_id']
self.post_url = arg_dict['url']
self.kind = arg_dict['kind']
self.batch_size = arg_dict['batch_size']
self.input_generator_factory = input_generator_factory
self.num_threads = arg_dict['num_threads']
self.email = arg_dict['email']
self.passin = arg_dict['passin']
self.dry_run = arg_dict['dry_run']
self.throttle = throttle
self.progress_db = progress_db
self.progresstrackerthread_factory = progresstrackerthread_factory
self.max_queue_size = max_queue_size
self.request_manager_factory = request_manager_factory
self.datasourcethread_factory = datasourcethread_factory
self.progress_queue_factory = progress_queue_factory
self.thread_pool_factory = thread_pool_factory
(scheme,
self.host_port, self.url_path,
unused_query, unused_fragment) = urlparse.urlsplit(self.post_url)
self.secure = (scheme == 'https')
def Run(self):
"""Perform the work of the BulkTransporterApp.
Raises:
AuthenticationError: If authentication is required and fails.
Returns:
Error code suitable for sys.exit, e.g. 0 on success, 1 on failure.
"""
self.error = False
thread_pool = self.thread_pool_factory(
self.num_threads, queue_size=self.max_queue_size)
self.throttle.Register(threading.currentThread())
threading.currentThread().exit_flag = False
progress_queue = self.progress_queue_factory(self.max_queue_size)
request_manager = self.request_manager_factory(self.app_id,
self.host_port,
self.url_path,
self.kind,
self.throttle,
self.batch_size,
self.secure,
self.email,
self.passin,
self.dry_run)
try:
request_manager.Authenticate()
except Exception, e:
self.error = True
if not isinstance(e, urllib2.HTTPError) or (
e.code != 302 and e.code != 401):
logger.exception('Exception during authentication')
raise AuthenticationError()
if (request_manager.auth_called and
not request_manager.authenticated):
self.error = True
raise AuthenticationError('Authentication failed')
for thread in thread_pool.Threads():
self.throttle.Register(thread)
self.progress_thread = self.progresstrackerthread_factory(
progress_queue, self.progress_db)
if self.progress_db.UseProgressData():
logger.debug('Restarting upload using progress database')
progress_generator_factory = self.progress_db.GetProgressStatusGenerator
else:
progress_generator_factory = None
self.data_source_thread = (
self.datasourcethread_factory(request_manager,
thread_pool,
progress_queue,
self.input_generator_factory,
progress_generator_factory))
thread_local = threading.local()
thread_local.shut_down = False
def Interrupt(unused_signum, unused_frame):
"""Shutdown gracefully in response to a signal."""
thread_local.shut_down = True
self.error = True
signal.signal(signal.SIGINT, Interrupt)
self.progress_thread.start()
self.data_source_thread.start()
while not thread_local.shut_down:
self.data_source_thread.join(timeout=0.25)
if self.data_source_thread.isAlive():
for thread in list(thread_pool.Threads()) + [self.progress_thread]:
if not thread.isAlive():
logger.info('Unexpected thread death: %s', thread.getName())
thread_local.shut_down = True
self.error = True
break
else:
break
def _Join(ob, msg):
logger.debug('Waiting for %s...', msg)
if isinstance(ob, threading.Thread):
ob.join(timeout=3.0)
if ob.isAlive():
logger.debug('Joining %s failed', ob)
else:
logger.debug('... done.')
elif isinstance(ob, (Queue.Queue, ReQueue)):
if not InterruptibleQueueJoin(ob, thread_local, thread_pool):
ShutdownThreads(self.data_source_thread, thread_pool)
else:
ob.join()
logger.debug('... done.')
if self.data_source_thread.error or thread_local.shut_down:
ShutdownThreads(self.data_source_thread, thread_pool)
else:
_Join(thread_pool.requeue, 'worker threads to finish')
thread_pool.Shutdown()
thread_pool.JoinThreads()
thread_pool.CheckErrors()
print ''
if self.progress_thread.isAlive():
InterruptibleQueueJoin(progress_queue, thread_local, thread_pool,
check_workers=False)
else:
logger.warn('Progress thread exited prematurely')
progress_queue.put(_THREAD_SHOULD_EXIT)
_Join(self.progress_thread, 'progress_thread to terminate')
self.progress_thread.CheckError()
if not thread_local.shut_down:
self.progress_thread.WorkFinished()
self.data_source_thread.CheckError()
return self.ReportStatus()
def ReportStatus(self):
"""Display a message reporting the final status of the transfer."""
raise NotImplementedError()
class BulkUploaderApp(BulkTransporterApp):
"""Class to encapsulate bulk uploader functionality."""
def __init__(self, *args, **kwargs):
BulkTransporterApp.__init__(self, *args, **kwargs)
def ReportStatus(self):
"""Display a message reporting the final status of the transfer."""
total_up, duration = self.throttle.TotalTransferred(
remote_api_throttle.BANDWIDTH_UP)
s_total_up, unused_duration = self.throttle.TotalTransferred(
remote_api_throttle.HTTPS_BANDWIDTH_UP)
total_up += s_total_up
total = total_up
logger.info('%d entites total, %d previously transferred',
self.data_source_thread.read_count,
self.data_source_thread.xfer_count)
transfer_count = self.progress_thread.EntitiesTransferred()
logger.info('%d entities (%d bytes) transferred in %.1f seconds',
transfer_count, total, duration)
if (self.data_source_thread.read_all and
transfer_count +
self.data_source_thread.xfer_count >=
self.data_source_thread.read_count):
logger.info('All entities successfully transferred')
return 0
else:
logger.info('Some entities not successfully transferred')
return 1
class BulkDownloaderApp(BulkTransporterApp):
"""Class to encapsulate bulk downloader functionality."""
def __init__(self, *args, **kwargs):
BulkTransporterApp.__init__(self, *args, **kwargs)
def ReportStatus(self):
"""Display a message reporting the final status of the transfer."""
total_down, duration = self.throttle.TotalTransferred(
remote_api_throttle.BANDWIDTH_DOWN)
s_total_down, unused_duration = self.throttle.TotalTransferred(
remote_api_throttle.HTTPS_BANDWIDTH_DOWN)
total_down += s_total_down
total = total_down
existing_count = self.progress_thread.existing_count
xfer_count = self.progress_thread.EntitiesTransferred()
logger.info('Have %d entities, %d previously transferred',
xfer_count, existing_count)
logger.info('%d entities (%d bytes) transferred in %.1f seconds',
xfer_count, total, duration)
if self.error:
return 1
else:
return 0
class BulkMapperApp(BulkTransporterApp):
"""Class to encapsulate bulk map functionality."""
def __init__(self, *args, **kwargs):
BulkTransporterApp.__init__(self, *args, **kwargs)
def ReportStatus(self):
"""Display a message reporting the final status of the transfer."""
total_down, duration = self.throttle.TotalTransferred(
remote_api_throttle.BANDWIDTH_DOWN)
s_total_down, unused_duration = self.throttle.TotalTransferred(
remote_api_throttle.HTTPS_BANDWIDTH_DOWN)
total_down += s_total_down
total = total_down
xfer_count = self.progress_thread.EntitiesTransferred()
logger.info('The following may be inaccurate if any mapper tasks '
'encountered errors and had to be retried.')
logger.info('Applied mapper to %s entities.',
xfer_count)
logger.info('%s entities (%s bytes) transferred in %.1f seconds',
xfer_count, total, duration)
if self.error:
return 1
else:
return 0
def PrintUsageExit(code):
"""Prints usage information and exits with a status code.
Args:
code: Status code to pass to sys.exit() after displaying usage information.
"""
print __doc__ % {'arg0': sys.argv[0]}
sys.stdout.flush()
sys.stderr.flush()
sys.exit(code)
REQUIRED_OPTION = object()
FLAG_SPEC = ['debug',
'help',
'url=',
'filename=',
'batch_size=',
'kind=',
'num_threads=',
'bandwidth_limit=',
'rps_limit=',
'http_limit=',
'db_filename=',
'app_id=',
'config_file=',
'has_header',
'csv_has_header',
'auth_domain=',
'result_db_filename=',
'download',
'loader_opts=',
'exporter_opts=',
'log_file=',
'mapper_opts=',
'email=',
'passin',
'map',
'dry_run',
'dump',
'restore',
]
def ParseArguments(argv, die_fn=lambda: PrintUsageExit(1)):
"""Parses command-line arguments.
Prints out a help message if -h or --help is supplied.
Args:
argv: List of command-line arguments.
die_fn: Function to invoke to end the program.
Returns:
A dictionary containing the value of command-line options.
"""
opts, unused_args = getopt.getopt(
argv[1:],
'h',
FLAG_SPEC)
arg_dict = {}
arg_dict['url'] = REQUIRED_OPTION
arg_dict['filename'] = None
arg_dict['config_file'] = None
arg_dict['kind'] = None
arg_dict['batch_size'] = None
arg_dict['num_threads'] = DEFAULT_THREAD_COUNT
arg_dict['bandwidth_limit'] = DEFAULT_BANDWIDTH_LIMIT
arg_dict['rps_limit'] = DEFAULT_RPS_LIMIT
arg_dict['http_limit'] = DEFAULT_REQUEST_LIMIT
arg_dict['db_filename'] = None
arg_dict['app_id'] = ''
arg_dict['auth_domain'] = 'gmail.com'
arg_dict['has_header'] = False
arg_dict['result_db_filename'] = None
arg_dict['download'] = False
arg_dict['loader_opts'] = None
arg_dict['exporter_opts'] = None
arg_dict['debug'] = False
arg_dict['log_file'] = None
arg_dict['email'] = None
arg_dict['passin'] = False
arg_dict['mapper_opts'] = None
arg_dict['map'] = False
arg_dict['dry_run'] = False
arg_dict['dump'] = False
arg_dict['restore'] = False
def ExpandFilename(filename):
"""Expand shell variables and ~usernames in filename."""
return os.path.expandvars(os.path.expanduser(filename))
for option, value in opts:
if option == '--debug':
arg_dict['debug'] = True
elif option in ('-h', '--help'):
PrintUsageExit(0)
elif option == '--url':
arg_dict['url'] = value
elif option == '--filename':
arg_dict['filename'] = ExpandFilename(value)
elif option == '--batch_size':
arg_dict['batch_size'] = int(value)
elif option == '--kind':
arg_dict['kind'] = value
elif option == '--num_threads':
arg_dict['num_threads'] = int(value)
elif option == '--bandwidth_limit':
arg_dict['bandwidth_limit'] = int(value)
elif option == '--rps_limit':
arg_dict['rps_limit'] = int(value)
elif option == '--http_limit':
arg_dict['http_limit'] = int(value)
elif option == '--db_filename':
arg_dict['db_filename'] = ExpandFilename(value)
elif option == '--app_id':
arg_dict['app_id'] = value
elif option == '--config_file':
arg_dict['config_file'] = ExpandFilename(value)
elif option == '--auth_domain':
arg_dict['auth_domain'] = value
elif option == '--has_header':
arg_dict['has_header'] = True
elif option == '--csv_has_header':
print >>sys.stderr, ('--csv_has_header is deprecated, please use '
'--has_header.')
arg_dict['has_header'] = True
elif option == '--result_db_filename':
arg_dict['result_db_filename'] = ExpandFilename(value)
elif option == '--download':
arg_dict['download'] = True
elif option == '--loader_opts':
arg_dict['loader_opts'] = value
elif option == '--exporter_opts':
arg_dict['exporter_opts'] = value
elif option == '--log_file':
arg_dict['log_file'] = ExpandFilename(value)
elif option == '--email':
arg_dict['email'] = value
elif option == '--passin':
arg_dict['passin'] = True
elif option == '--map':
arg_dict['map'] = True
elif option == '--mapper_opts':
arg_dict['mapper_opts'] = value
elif option == '--dry_run':
arg_dict['dry_run'] = True
elif option == '--dump':
arg_dict['dump'] = True
elif option == '--restore':
arg_dict['restore'] = True
return ProcessArguments(arg_dict, die_fn=die_fn)
def ThrottleLayout(bandwidth_limit, http_limit, rps_limit):
"""Return a dictionary indicating the throttle options."""
bulkloader_limits = dict(remote_api_throttle.NO_LIMITS)
bulkloader_limits.update({
remote_api_throttle.BANDWIDTH_UP: bandwidth_limit,
remote_api_throttle.BANDWIDTH_DOWN: bandwidth_limit,
remote_api_throttle.REQUESTS: http_limit,
remote_api_throttle.HTTPS_BANDWIDTH_UP: bandwidth_limit,
remote_api_throttle.HTTPS_BANDWIDTH_DOWN: bandwidth_limit,
remote_api_throttle.HTTPS_REQUESTS: http_limit,
remote_api_throttle.ENTITIES_FETCHED: rps_limit,
remote_api_throttle.ENTITIES_MODIFIED: rps_limit,
})
return bulkloader_limits
def CheckOutputFile(filename):
"""Check that the given file does not exist and can be opened for writing.
Args:
filename: The name of the file.
Raises:
FileExistsError: if the given filename is not found
FileNotWritableError: if the given filename is not readable.
"""
full_path = os.path.abspath(filename)
if os.path.exists(full_path):
raise FileExistsError('%s: output file exists' % filename)
elif not os.access(os.path.dirname(full_path), os.W_OK):
raise FileNotWritableError(
'%s: not writable' % os.path.dirname(full_path))
def LoadConfig(config_file_name, exit_fn=sys.exit):
"""Loads a config file and registers any Loader classes present.
Args:
config_file_name: The name of the configuration file.
exit_fn: Used for dependency injection.
"""
if config_file_name:
config_file = open(config_file_name, 'r')
try:
bulkloader_config = imp.load_module(
'bulkloader_config', config_file, config_file_name,
('', 'r', imp.PY_SOURCE))
sys.modules['bulkloader_config'] = bulkloader_config
if hasattr(bulkloader_config, 'loaders'):
for cls in bulkloader_config.loaders:
Loader.RegisterLoader(cls())
if hasattr(bulkloader_config, 'exporters'):
for cls in bulkloader_config.exporters:
Exporter.RegisterExporter(cls())
if hasattr(bulkloader_config, 'mappers'):
for cls in bulkloader_config.mappers:
Mapper.RegisterMapper(cls())
except NameError, e:
m = re.search(r"[^']*'([^']*)'.*", str(e))
if m.groups() and m.group(1) == 'Loader':
print >>sys.stderr, """
The config file format has changed and you appear to be using an old-style
config file. Please make the following changes:
1. At the top of the file, add this:
from google.appengine.tools.bulkloader import Loader
2. For each of your Loader subclasses add the following at the end of the
__init__ definitioion:
self.alias_old_names()
3. At the bottom of the file, add this:
loaders = [MyLoader1,...,MyLoaderN]
Where MyLoader1,...,MyLoaderN are the Loader subclasses you want the bulkloader
to have access to.
"""
exit_fn(1)
else:
raise
except Exception, e:
if isinstance(e, NameClashError) or 'bulkloader_config' in vars() and (
hasattr(bulkloader_config, 'bulkloader') and
isinstance(e, bulkloader_config.bulkloader.NameClashError)):
print >> sys.stderr, (
'Found both %s and %s while aliasing old names on %s.'%
(e.old_name, e.new_name, e.klass))
exit_fn(1)
else:
raise
def GetArgument(kwargs, name, die_fn):
"""Get the value of the key name in kwargs, or die with die_fn.
Args:
kwargs: A dictionary containing the options for the bulkloader.
name: The name of a bulkloader option.
die_fn: The function to call to exit the program.
Returns:
The value of kwargs[name] is name in kwargs
"""
if name in kwargs:
return kwargs[name]
else:
print >>sys.stderr, '%s argument required' % name
die_fn()
def _MakeSignature(app_id=None,
url=None,
kind=None,
db_filename=None,
perform_map=None,
download=None,
has_header=None,
result_db_filename=None,
dump=None,
restore=None):
"""Returns a string that identifies the important options for the database."""
if download:
result_db_line = 'result_db: %s' % result_db_filename
else:
result_db_line = ''
return u"""
app_id: %s
url: %s
kind: %s
download: %s
map: %s
dump: %s
restore: %s
progress_db: %s
has_header: %s
%s
""" % (app_id, url, kind, download, perform_map, dump, restore, db_filename,
has_header, result_db_line)
def ProcessArguments(arg_dict,
die_fn=lambda: sys.exit(1)):
"""Processes non command-line input arguments.
Args:
arg_dict: Dictionary containing the values of bulkloader options.
die_fn: Function to call in case of an error during argument processing.
Returns:
A dictionary of bulkloader options.
"""
app_id = GetArgument(arg_dict, 'app_id', die_fn)
url = GetArgument(arg_dict, 'url', die_fn)
dump = GetArgument(arg_dict, 'dump', die_fn)
restore = GetArgument(arg_dict, 'restore', die_fn)
filename = GetArgument(arg_dict, 'filename', die_fn)
batch_size = GetArgument(arg_dict, 'batch_size', die_fn)
kind = GetArgument(arg_dict, 'kind', die_fn)
db_filename = GetArgument(arg_dict, 'db_filename', die_fn)
config_file = GetArgument(arg_dict, 'config_file', die_fn)
result_db_filename = GetArgument(arg_dict, 'result_db_filename', die_fn)
download = GetArgument(arg_dict, 'download', die_fn)
log_file = GetArgument(arg_dict, 'log_file', die_fn)
perform_map = GetArgument(arg_dict, 'map', die_fn)
errors = []
if batch_size is None:
if download or perform_map:
arg_dict['batch_size'] = DEFAULT_DOWNLOAD_BATCH_SIZE
else:
arg_dict['batch_size'] = DEFAULT_BATCH_SIZE
elif batch_size <= 0:
errors.append('batch_size must be at least 1')
if db_filename is None:
arg_dict['db_filename'] = time.strftime(
'bulkloader-progress-%Y%m%d.%H%M%S.sql3')
if result_db_filename is None:
arg_dict['result_db_filename'] = time.strftime(
'bulkloader-results-%Y%m%d.%H%M%S.sql3')
if log_file is None:
arg_dict['log_file'] = time.strftime('bulkloader-log-%Y%m%d.%H%M%S')
required = '%s argument required'
if config_file is None and not dump and not restore:
errors.append('One of --config_file, --dump, or --restore is required')
if url is REQUIRED_OPTION:
errors.append(required % 'url')
if not filename and not perform_map:
errors.append(required % 'filename')
if kind is None:
if download or map:
errors.append('kind argument required for this operation')
elif not dump and not restore:
errors.append(
'kind argument required unless --dump or --restore is specified')
if not app_id:
if url and url is not REQUIRED_OPTION:
(unused_scheme, host_port, unused_url_path,
unused_query, unused_fragment) = urlparse.urlsplit(url)
suffix_idx = host_port.find('.appspot.com')
if suffix_idx > -1:
arg_dict['app_id'] = host_port[:suffix_idx]
elif host_port.split(':')[0].endswith('google.com'):
arg_dict['app_id'] = host_port.split('.')[0]
else:
errors.append('app_id argument required for non appspot.com domains')
if errors:
print >>sys.stderr, '\n'.join(errors)
die_fn()
return arg_dict
def ParseKind(kind):
if kind and kind[0] == '(' and kind[-1] == ')':
return tuple(kind[1:-1].split(','))
else:
return kind
def _PerformBulkload(arg_dict,
check_file=CheckFile,
check_output_file=CheckOutputFile):
"""Runs the bulkloader, given the command line options.
Args:
arg_dict: Dictionary of bulkloader options.
check_file: Used for dependency injection.
check_output_file: Used for dependency injection.
Returns:
An exit code.
Raises:
ConfigurationError: if inconsistent options are passed.
"""
app_id = arg_dict['app_id']
url = arg_dict['url']
filename = arg_dict['filename']
batch_size = arg_dict['batch_size']
kind = arg_dict['kind']
num_threads = arg_dict['num_threads']
bandwidth_limit = arg_dict['bandwidth_limit']
rps_limit = arg_dict['rps_limit']
http_limit = arg_dict['http_limit']
db_filename = arg_dict['db_filename']
config_file = arg_dict['config_file']
auth_domain = arg_dict['auth_domain']
has_header = arg_dict['has_header']
download = arg_dict['download']
result_db_filename = arg_dict['result_db_filename']
loader_opts = arg_dict['loader_opts']
exporter_opts = arg_dict['exporter_opts']
mapper_opts = arg_dict['mapper_opts']
email = arg_dict['email']
passin = arg_dict['passin']
perform_map = arg_dict['map']
dump = arg_dict['dump']
restore = arg_dict['restore']
os.environ['AUTH_DOMAIN'] = auth_domain
kind = ParseKind(kind)
if not dump and not restore:
check_file(config_file)
if download and perform_map:
logger.error('--download and --map are mutually exclusive.')
if download or dump:
check_output_file(filename)
elif not perform_map:
check_file(filename)
if dump:
Exporter.RegisterExporter(DumpExporter(kind, result_db_filename))
elif restore:
Loader.RegisterLoader(RestoreLoader(kind, app_id))
else:
LoadConfig(config_file)
os.environ['APPLICATION_ID'] = app_id
throttle_layout = ThrottleLayout(bandwidth_limit, http_limit, rps_limit)
logger.info('Throttling transfers:')
logger.info('Bandwidth: %s bytes/second', bandwidth_limit)
logger.info('HTTP connections: %s/second', http_limit)
logger.info('Entities inserted/fetched/modified: %s/second', rps_limit)
throttle = remote_api_throttle.Throttle(layout=throttle_layout)
signature = _MakeSignature(app_id=app_id,
url=url,
kind=kind,
db_filename=db_filename,
download=download,
perform_map=perform_map,
has_header=has_header,
result_db_filename=result_db_filename,
dump=dump,
restore=restore)
max_queue_size = max(DEFAULT_QUEUE_SIZE, 3 * num_threads + 5)
if db_filename == 'skip':
progress_db = StubProgressDatabase()
elif not download and not perform_map and not dump:
progress_db = ProgressDatabase(db_filename, signature)
else:
progress_db = ExportProgressDatabase(db_filename, signature)
return_code = 1
if not download and not perform_map and not dump:
loader = Loader.RegisteredLoader(kind)
try:
loader.initialize(filename, loader_opts)
workitem_generator_factory = GetCSVGeneratorFactory(
kind, filename, batch_size, has_header)
app = BulkUploaderApp(arg_dict,
workitem_generator_factory,
throttle,
progress_db,
ProgressTrackerThread,
max_queue_size,
RequestManager,
DataSourceThread,
Queue.Queue)
try:
return_code = app.Run()
except AuthenticationError:
logger.info('Authentication Failed')
finally:
loader.finalize()
elif not perform_map:
result_db = ResultDatabase(result_db_filename, signature)
exporter = Exporter.RegisteredExporter(kind)
try:
exporter.initialize(filename, exporter_opts)
def KeyRangeGeneratorFactory(request_manager, progress_queue,
progress_gen):
return KeyRangeItemGenerator(request_manager, kind, progress_queue,
progress_gen, DownloadItem)
def ExportProgressThreadFactory(progress_queue, progress_db):
return ExportProgressThread(kind,
progress_queue,
progress_db,
result_db)
app = BulkDownloaderApp(arg_dict,
KeyRangeGeneratorFactory,
throttle,
progress_db,
ExportProgressThreadFactory,
0,
RequestManager,
DataSourceThread,
Queue.Queue)
try:
return_code = app.Run()
except AuthenticationError:
logger.info('Authentication Failed')
finally:
exporter.finalize()
elif not download:
mapper = Mapper.RegisteredMapper(kind)
try:
mapper.initialize(mapper_opts)
def KeyRangeGeneratorFactory(request_manager, progress_queue,
progress_gen):
return KeyRangeItemGenerator(request_manager, kind, progress_queue,
progress_gen, MapperItem)
def MapperProgressThreadFactory(progress_queue, progress_db):
return MapperProgressThread(kind,
progress_queue,
progress_db)
app = BulkMapperApp(arg_dict,
KeyRangeGeneratorFactory,
throttle,
progress_db,
MapperProgressThreadFactory,
0,
RequestManager,
DataSourceThread,
Queue.Queue)
try:
return_code = app.Run()
except AuthenticationError:
logger.info('Authentication Failed')
finally:
mapper.finalize()
return return_code
def SetupLogging(arg_dict):
"""Sets up logging for the bulkloader.
Args:
arg_dict: Dictionary mapping flag names to their arguments.
"""
format = '[%(levelname)-8s %(asctime)s %(filename)s] %(message)s'
debug = arg_dict['debug']
log_file = arg_dict['log_file']
logger.setLevel(logging.DEBUG)
logger.propagate = False
file_handler = logging.FileHandler(log_file, 'w')
file_handler.setLevel(logging.DEBUG)
file_formatter = logging.Formatter(format)
file_handler.setFormatter(file_formatter)
logger.addHandler(file_handler)
console = logging.StreamHandler()
level = logging.INFO
if debug:
level = logging.DEBUG
console.setLevel(level)
console_format = '[%(levelname)-8s] %(message)s'
formatter = logging.Formatter(console_format)
console.setFormatter(formatter)
logger.addHandler(console)
logger.info('Logging to %s', log_file)
remote_api_throttle.logger.setLevel(level)
remote_api_throttle.logger.addHandler(file_handler)
remote_api_throttle.logger.addHandler(console)
appengine_rpc.logger.setLevel(logging.WARN)
adaptive_thread_pool.logger.setLevel(logging.DEBUG)
adaptive_thread_pool.logger.addHandler(console)
adaptive_thread_pool.logger.addHandler(file_handler)
adaptive_thread_pool.logger.propagate = False
def Run(arg_dict):
"""Sets up and runs the bulkloader, given the options as keyword arguments.
Args:
arg_dict: Dictionary of bulkloader options
Returns:
An exit code.
"""
arg_dict = ProcessArguments(arg_dict)
SetupLogging(arg_dict)
return _PerformBulkload(arg_dict)
def main(argv):
"""Runs the importer from the command line."""
arg_dict = ParseArguments(argv)
errors = ['%s argument required' % key
for (key, value) in arg_dict.iteritems()
if value is REQUIRED_OPTION]
if errors:
print >>sys.stderr, '\n'.join(errors)
PrintUsageExit(1)
SetupLogging(arg_dict)
return _PerformBulkload(arg_dict)
if __name__ == '__main__':
sys.exit(main(sys.argv))
| mit | -2,423,553,175,333,068,000 | 3,795,617,682,257,590,300 | 31.612744 | 85 | 0.641065 | false |
adieu/allbuttonspressed | docutils/parsers/rst/languages/eo.py | 6 | 3808 | # $Id: eo.py 6460 2010-10-29 22:18:44Z milde $
# Author: Marcelo Huerta San Martin <[email protected]>
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be
# translated for each language: one in docutils/languages, the other in
# docutils/parsers/rst/languages.
"""
Esperanto-language mappings for language-dependent features of
reStructuredText.
"""
__docformat__ = 'reStructuredText'
directives = {
# language-dependent: fixed
u'atentu': 'attention',
u'zorgu': 'caution',
u'dangxero': 'danger',
u'dan\u011dero': 'danger',
u'eraro': 'error',
u'spuro': 'hint',
u'grava': 'important',
u'noto': 'note',
u'helpeto': 'tip',
u'averto': 'warning',
u'admono': 'admonition',
u'flankteksto': 'sidebar',
u'temo': 'topic',
u'linea-bloko': 'line-block',
u'analizota-literalo': 'parsed-literal',
u'rubriko': 'rubric',
u'epigrafo': 'epigraph',
u'elstarajxoj': 'highlights',
u'elstara\u0135oj': 'highlights',
u'ekstera-citajxo': 'pull-quote',
u'ekstera-cita\u0135o': 'pull-quote',
u'kombinajxo': 'compound',
u'kombina\u0135o': 'compound',
u'tekstingo': 'container',
u'enhavilo': 'container',
#'questions': 'questions',
#'qa': 'questions',
#'faq': 'questions',
u'tabelo': 'table',
u'tabelo-vdk': 'csv-table', # "valoroj disigitaj per komoj"
u'tabelo-csv': 'csv-table',
u'tabelo-lista': 'list-table',
u'meta': 'meta',
'math (translation required)': 'math',
#'imagemap': 'imagemap',
u'bildo': 'image',
u'figuro': 'figure',
u'inkludi': 'include',
u'senanaliza': 'raw',
u'anstatauxi': 'replace',
u'anstata\u016di': 'replace',
u'unicode': 'unicode',
u'dato': 'date',
u'klaso': 'class',
u'rolo': 'role',
u'preterlasita-rolo': 'default-role',
u'titolo': 'title',
u'enhavo': 'contents',
u'seknum': 'sectnum',
u'sekcia-numerado': 'sectnum',
u'kapsekcio': 'header',
u'piedsekcio': 'footer',
#'footnotes': 'footnotes',
#'citations': 'citations',
u'celaj-notoj': 'target-notes',
u'restructuredtext-test-directive': 'restructuredtext-test-directive'}
"""Esperanto name to registered (in directives/__init__.py) directive name
mapping."""
roles = {
# language-dependent: fixed
u'mallongigo': 'abbreviation',
u'mall': 'abbreviation',
u'komenclitero': 'acronym',
u'kl': 'acronym',
u'indekso': 'index',
u'i': 'index',
u'subskribo': 'subscript',
u'sub': 'subscript',
u'supraskribo': 'superscript',
u'sup': 'superscript',
u'titola-referenco': 'title-reference',
u'titolo': 'title-reference',
u't': 'title-reference',
u'pep-referenco': 'pep-reference',
u'pep': 'pep-reference',
u'rfc-referenco': 'rfc-reference',
u'rfc': 'rfc-reference',
u'emfazo': 'emphasis',
u'forta': 'strong',
u'litera': 'literal',
'math (translation required)': 'math',
u'nomita-referenco': 'named-reference',
u'nenomita-referenco': 'anonymous-reference',
u'piednota-referenco': 'footnote-reference',
u'citajxo-referenco': 'citation-reference',
u'cita\u0135o-referenco': 'citation-reference',
u'anstatauxa-referenco': 'substitution-reference',
u'anstata\u016da-referenco': 'substitution-reference',
u'celo': 'target',
u'uri-referenco': 'uri-reference',
u'uri': 'uri-reference',
u'url': 'uri-reference',
u'senanaliza': 'raw',
}
"""Mapping of Esperanto role names to canonical role names for interpreted text.
"""
| bsd-3-clause | 62,450,623,640,955,480 | 2,790,116,374,373,104,600 | 31.827586 | 80 | 0.612395 | false |
Syralist/pixels_clock | clock.py | 1 | 3227 | # -*- coding: utf-8 -*-
import pygame, led, sys, os, random, csv
import smbus
from pygame.locals import *
from led.PixelEventHandler import *
from time import gmtime, strftime
""" A very simple arcade shooter demo :)
"""
random.seed()
BLACK = pygame.Color(0,0,0)
WHITE = pygame.Color(255, 255, 255)
RED = pygame.Color(255, 0, 0)
GREEN = pygame.Color(0, 255, 0)
adress = 0x48
LM75 = smbus.SMBus(1)
# detect if a serial/USB port is given as argument
hasSerialPortParameter = ( sys.argv.__len__() > 1 )
# use 90 x 20 matrix when no usb port for real display provided
fallbackSize = ( 90, 20 )
if hasSerialPortParameter:
serialPort = sys.argv[1]
print "INITIALIZING WITH USB-PORT: " + serialPort
ledDisplay = led.teensy.TeensyDisplay(serialPort, fallbackSize)
else:
print "INITIALIZING WITH SERVER DISPLAY AND SIMULATOR."
ledDisplay = led.dsclient.DisplayServerClientDisplay('localhost', 8123, fallbackSize)
# use same size for sim and real LED panel
size = ledDisplay.size()
simDisplay = led.sim.SimDisplay(size)
screen = pygame.Surface(size)
gamestate = 0 #1=alive; 0=dead
def main():
pygame.init()
pygame.font.init()
clock = pygame.time.Clock()
pygame.joystick.init()
gameover = False
# Initialize first joystick
if pygame.joystick.get_count() > 0:
stick = pygame.joystick.Joystick(0)
stick.init()
global gamestate
scored = False
# Clear event list before starting the game
pygame.event.clear()
while not gameover:
# Process event queue
for pgevent in pygame.event.get():
if pgevent.type == QUIT:
pygame.quit()
sys.exit()
event = process_event(pgevent)
# End the game
if event.button == EXIT:
gameover = True
# Keypresses on keyboard and joystick axis motions / button presses
elif event.type == PUSH:
# Movements
if event.button == UP:
pass
elif event.button == DOWN:
pass
elif event.button == RIGHT:
pass
elif event.button == LEFT:
pass
# Tower selection
elif event.button == B2:
pass
# Tower placement
elif event.button == P1:
gameover = True
# Only on Keyboard
elif pgevent.type == KEYDOWN and pgevent.key == K_ESCAPE:
gameover = True
screen.fill(BLACK)
font = pygame.font.SysFont("Arial", 12)
text1 = font.render(strftime("%H:%M:%S"), 0, RED)
text1pos = text1.get_rect()
text1pos.midtop = (screen.get_rect().centerx, -1)
screen.blit(text1,text1pos)
try:
temp = LM75.read_byte(adress)
except:
temp = -1
text2 = font.render("T: "+str(temp)+"'C", 0, GREEN)
text2pos = text2.get_rect()
text2pos.midbottom = (screen.get_rect().centerx, 23)
screen.blit(text2,text2pos)
simDisplay.update(screen)
ledDisplay.update(screen)
clock.tick(10)
main()
| gpl-3.0 | -4,640,315,769,703,114,000 | -4,166,494,717,978,187,000 | 26.117647 | 89 | 0.578866 | false |
bruce3557/NTHUOJ_web | problem/admin.py | 4 | 1385 | '''
The MIT License (MIT)
Copyright (c) 2014 NTHUOJ team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
'''
from django.contrib import admin
from problem.models import Problem, Testcase, Submission, SubmissionDetail, Tag
# Register your models here.
admin.site.register(Problem)
admin.site.register(Testcase)
admin.site.register(Submission)
admin.site.register(SubmissionDetail)
admin.site.register(Tag)
| mit | 6,569,890,409,359,164,000 | -4,765,906,769,527,838,000 | 39.735294 | 79 | 0.802888 | false |
ProjexSoftware/projexui | projexui/widgets/xquerybuilderwidget/xquerybuilderwidget.py | 2 | 9247 | #!/usr/bin/python
""" Defines an interface to allow users to build their queries on the fly. """
# define authorship information
__authors__ = ['Eric Hulser']
__author__ = ','.join(__authors__)
__credits__ = []
__copyright__ = 'Copyright (c) 2011, Projex Software'
__license__ = 'LGPL'
# maintanence information
__maintainer__ = 'Projex Software'
__email__ = '[email protected]'
#------------------------------------------------------------------------------
from projex.text import nativestring
from projexui.qt import Signal
from projexui.qt.QtCore import Qt
from projexui.qt.QtGui import QWidget,\
QVBoxLayout
import projexui
from projexui.widgets.xquerybuilderwidget.xqueryrule \
import XQueryRule
from projexui.widgets.xquerybuilderwidget.xquerylinewidget \
import XQueryLineWidget
class XQueryBuilderWidget(QWidget):
""" """
saveRequested = Signal()
resetRequested = Signal()
cancelRequested = Signal()
def __init__( self, parent = None ):
super(XQueryBuilderWidget, self).__init__( parent )
# load the user interface
projexui.loadUi(__file__, self)
self.setMinimumWidth(470)
# define custom properties
self._rules = {}
self._defaultQuery = []
self._completionTerms = []
self._minimumCount = 1
# set default properties
self._container = QWidget(self)
layout = QVBoxLayout()
layout.setContentsMargins(0, 0, 0, 0)
layout.setSpacing(2)
layout.addStretch(1)
self._container.setLayout(layout)
self.uiQueryAREA.setWidget(self._container)
# create connections
self.uiResetBTN.clicked.connect( self.emitResetRequested )
self.uiSaveBTN.clicked.connect( self.emitSaveRequested )
self.uiCancelBTN.clicked.connect( self.emitCancelRequested )
self.resetRequested.connect( self.reset )
def addLineWidget( self, query = None ):
"""
Adds a new line widget to the system with the given values.
:param query | (<str> term, <str> operator, <str> vlaue) || None
"""
widget = XQueryLineWidget(self)
widget.setTerms(sorted(self._rules.keys()))
widget.setQuery(query)
index = self._container.layout().count() - 1
self._container.layout().insertWidget(index, widget)
widget.addRequested.connect( self.addLineWidget )
widget.removeRequested.connect( self.removeLineWidget )
# update the remove enabled options for these widgets
self.updateRemoveEnabled()
def addRule( self, rule ):
"""
Adds a rule to the system.
:param rule | <XQueryRule>
"""
self._rules[rule.term()] = rule
self.updateRules()
def clear( self ):
"""
Clears out all the widgets from the system.
"""
for lineWidget in self.lineWidgets():
lineWidget.setParent(None)
lineWidget.deleteLater()
def completionTerms( self ):
"""
Returns the list of terms that will be used as a global override
for completion terms when the query rule generates a QLineEdit instance.
:return [<str>, ..]
"""
return self._completionTerms
def count( self ):
"""
Returns the count of the line widgets in the system.
:return <int>
"""
return len(self.lineWidgets())
def currentQuery( self ):
"""
Returns the current query string for this widget.
:return [(<str> term, <str> operator, <str> value), ..]
"""
widgets = self.lineWidgets()
output = []
for widget in widgets:
output.append(widget.query())
return output
def defaultQuery( self ):
"""
Returns the default query for the system.
:return [(<str> term, <str> operator, <str> value), ..]
"""
return self._defaultQuery
def keyPressEvent( self, event ):
"""
Emits the save requested signal for this builder for when the enter
or return press is clicked.
:param event | <QKeyEvent>
"""
if ( event.key() in (Qt.Key_Enter, Qt.Key_Return) ):
self.emitSaveRequested()
super(XQueryBuilderWidget, self).keyPressEvent(event)
def emitCancelRequested( self ):
"""
Emits the cancel requested signal.
"""
if ( not self.signalsBlocked() ):
self.cancelRequested.emit()
def emitResetRequested( self ):
"""
Emits the reste requested signal.
"""
if ( not self.signalsBlocked() ):
self.resetRequested.emit()
def emitSaveRequested( self ):
"""
Emits the save requested signal.
"""
if ( not self.signalsBlocked() ):
self.saveRequested.emit()
def findRule( self, term ):
"""
Looks up a rule by the inputed term.
:param term | <str>
:return <XQueryRule> || None
"""
return self._rules.get(nativestring(term))
def removeLineWidget( self, widget ):
"""
Removes the line widget from the query.
:param widget | <XQueryLineWidget>
"""
widget.setParent(None)
widget.deleteLater()
self.updateRemoveEnabled()
def minimumCount( self ):
"""
Defines the minimum number of query widgets that are allowed.
:return <int>
"""
return self._minimumCount
def lineWidgets( self ):
"""
Returns a list of line widgets for this system.
:return [<XQueryLineWidget>, ..]
"""
return self.findChildren(XQueryLineWidget)
def reset( self ):
"""
Resets the system to the default query.
"""
self.setCurrentQuery(self.defaultQuery())
def setCompletionTerms( self, terms ):
"""
Sets the list of terms that will be used as a global override
for completion terms when the query rule generates a QLineEdit instance.
:param terms | [<str>, ..]
"""
self._completionTerms = terms
def setCurrentQuery( self, query ):
"""
Sets the query for this system to the inputed query.
:param query | [(<str> term, <str> operator, <str> value), ..]
"""
self.clear()
for entry in query:
self.addLineWidget(entry)
# make sure we have the minimum number of widgets
for i in range(self.minimumCount() - len(query)):
self.addLineWidget()
def setDefaultQuery( self, query ):
"""
Sets the default query that will be used when the user clicks on the \
reset button or the reset method is called.
:param query | [(<str> term, <str> operator, <str> value), ..]
"""
self._defaultQuery = query[:]
def setMinimumCount( self, count ):
"""
Sets the minimum number of line widgets that are allowed at any \
given time.
:param count | <int>
"""
self._minimumCount = count
def setRules( self, rules ):
"""
Sets all the rules for this builder.
:param rules | [<XQueryRule>, ..]
"""
if ( type(rules) in (list, tuple) ):
self._rules = dict([(x.term(), x) for x in rules])
self.updateRules()
return True
elif ( type(rules) == dict ):
self._rules = rules.copy()
self.updateRules()
return True
else:
return False
def setTerms( self, terms ):
"""
Sets a simple rule list by accepting a list of strings for terms. \
This is a convenience method for the setRules method.
:param rules | [<str> term, ..]
"""
return self.setRules([XQueryRule(term = term) for term in terms])
def updateRemoveEnabled( self ):
"""
Updates the remove enabled baesd on the current number of line widgets.
"""
lineWidgets = self.lineWidgets()
count = len(lineWidgets)
state = self.minimumCount() < count
for widget in lineWidgets:
widget.setRemoveEnabled(state)
def updateRules( self ):
"""
Updates the query line items to match the latest rule options.
"""
terms = sorted(self._rules.keys())
for child in self.lineWidgets():
child.setTerms(terms) | lgpl-3.0 | -3,552,154,672,403,835,400 | -6,676,747,004,845,780,000 | 29.153595 | 80 | 0.533254 | false |
maverickYQB/mqtt_zway | test/test_main_class.py | 1 | 2397 | #!/usr/bin/env python
'''
Created on Mars 20 2016
@author: popotvin
'''
import mqtt_zway_test
import mqtt_zway
import paho.mqtt.client as mqtt
import time
import traceback
date_time = mqtt_zway_test.date_time
# Main variables
mqtt_old_payload = []
mqtt_new_payload = []
payload = {}
publish_string = ""
# MQTT config
outgoing_topic = mqtt_zway_test.outgoing_topic
ongoing_topic = mqtt_zway_test.ongoing_topic
mqtt_ip = mqtt_zway_test.mqtt_ip
mqtt_port = mqtt_zway_test.mqtt_port
mqtt_client = mqtt_zway_test.mqtt_client
# ZWAY config
zway_ip = mqtt_zway_test.zway_ip
zway_port = mqtt_zway_test.zway_port
# list of connected devices on the zway server (device_id, device type, device level value)
zway_devList = mqtt_zway.zway_devList(zway_ip,zway_port)
# MQTT Client init
mqttc = mqtt.Client(str(mqtt_client))
mqttc.on_subscribe = mqtt_zway_test.on_subscribe
mqttc.on_message = mqtt_zway_test.on_message
mqttc.on_connect = mqtt_zway_test.on_connect
mqttc.connect(mqtt_ip, mqtt_port)
# Test zway and MQTT servers
zway_test = mqtt_zway.server_test(zway_ip, zway_port)
mqtt_test = mqtt_zway.server_test(mqtt_ip, mqtt_port)
# Main loop
if zway_test and mqtt_test:
print "ZWAY is running at: %s"% str(date_time)
print "MQTT is running at: %s"% str(date_time)
while True:
try:
mqttc.loop()
for key, value in zway_devList.dev_dict().iteritems():
for i,j in value.iteritems():
if i == "id":
dev_id = j
elif i == "type":
dev_type = j
zway_devList.dev_get(dev_id, dev_type)
payload["device_id"] = str(dev_id)
payload["type"] = str(dev_type)
payload["value"] = zway_devList.dev_value(dev_id, dev_type)
mqtt_new_payload.append(dict(payload))
time.sleep(0.1)
if mqtt_old_payload != mqtt_new_payload:
mqttc.publish(outgoing_topic, str(mqtt_new_payload))
#print "published to mQTT: %s" % mqtt_new_payload
mqtt_old_payload = mqtt_new_payload
mqtt_new_payload = []
time.sleep(0.5)
except Exception, e:
print traceback.print_exc()
break
elif not zway_test:
print "ZWAY server is offline"
elif not mqtt_test:
print "MQTT server is Offline"
| gpl-3.0 | 7,043,775,111,529,578,000 | 8,016,629,106,292,794,000 | 28.9625 | 91 | 0.619942 | false |
j4/horizon | openstack_dashboard/urls.py | 56 | 1979 | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, 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 required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""
URL patterns for the OpenStack Dashboard.
"""
from django.conf import settings
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls.static import static # noqa
from django.conf.urls import url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns # noqa
import horizon
urlpatterns = patterns(
'',
url(r'^$', 'openstack_dashboard.views.splash', name='splash'),
url(r'^api/', include('openstack_dashboard.api.rest.urls')),
url(r'', include(horizon.urls)),
)
for u in getattr(settings, 'AUTHENTICATION_URLS', ['openstack_auth.urls']):
urlpatterns += patterns(
'',
url(r'^auth/', include(u))
)
# Development static app and project media serving using the staticfiles app.
urlpatterns += staticfiles_urlpatterns()
# Convenience function for serving user-uploaded media during
# development. Only active if DEBUG==True and the URL prefix is a local
# path. Production media should NOT be served by Django.
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
if settings.DEBUG:
urlpatterns += patterns(
'',
url(r'^500/$', 'django.views.defaults.server_error')
)
| apache-2.0 | 1,331,071,395,800,136,400 | 5,923,675,076,954,813,000 | 33.719298 | 78 | 0.725619 | false |
tylerclair/py3canvas | py3canvas/apis/modules.py | 1 | 54047 | """Modules API Version 1.0.
This API client was generated using a template. Make sure this code is valid before using it.
"""
import logging
from datetime import date, datetime
from .base import BaseCanvasAPI
from .base import BaseModel
class ModulesAPI(BaseCanvasAPI):
"""Modules API Version 1.0."""
def __init__(self, *args, **kwargs):
"""Init method for ModulesAPI."""
super(ModulesAPI, self).__init__(*args, **kwargs)
self.logger = logging.getLogger("py3canvas.ModulesAPI")
def list_modules(self, course_id, include=None, search_term=None, student_id=None):
"""
List modules.
List the modules in a course
"""
path = {}
data = {}
params = {}
# REQUIRED - PATH - course_id
"""ID"""
path["course_id"] = course_id
# OPTIONAL - include
"""- "items": Return module items inline if possible.
This parameter suggests that Canvas return module items directly
in the Module object JSON, to avoid having to make separate API
requests for each module when enumerating modules and items. Canvas
is free to omit 'items' for any particular module if it deems them
too numerous to return inline. Callers must be prepared to use the
{api:ContextModuleItemsApiController#index List Module Items API}
if items are not returned.
- "content_details": Requires include['items']. Returns additional
details with module items specific to their associated content items.
Includes standard lock information for each item."""
if include is not None:
self._validate_enum(include, ["items", "content_details"])
params["include"] = include
# OPTIONAL - search_term
"""The partial name of the modules (and module items, if include['items'] is
specified) to match and return."""
if search_term is not None:
params["search_term"] = search_term
# OPTIONAL - student_id
"""Returns module completion information for the student with this id."""
if student_id is not None:
params["student_id"] = student_id
self.logger.debug("GET /api/v1/courses/{course_id}/modules with query params: {params} and form data: {data}".format(params=params, data=data, **path))
return self.generic_request("GET", "/api/v1/courses/{course_id}/modules".format(**path), data=data, params=params, all_pages=True)
def show_module(self, id, course_id, include=None, student_id=None):
"""
Show module.
Get information about a single module
"""
path = {}
data = {}
params = {}
# REQUIRED - PATH - course_id
"""ID"""
path["course_id"] = course_id
# REQUIRED - PATH - id
"""ID"""
path["id"] = id
# OPTIONAL - include
"""- "items": Return module items inline if possible.
This parameter suggests that Canvas return module items directly
in the Module object JSON, to avoid having to make separate API
requests for each module when enumerating modules and items. Canvas
is free to omit 'items' for any particular module if it deems them
too numerous to return inline. Callers must be prepared to use the
{api:ContextModuleItemsApiController#index List Module Items API}
if items are not returned.
- "content_details": Requires include['items']. Returns additional
details with module items specific to their associated content items.
Includes standard lock information for each item."""
if include is not None:
self._validate_enum(include, ["items", "content_details"])
params["include"] = include
# OPTIONAL - student_id
"""Returns module completion information for the student with this id."""
if student_id is not None:
params["student_id"] = student_id
self.logger.debug("GET /api/v1/courses/{course_id}/modules/{id} with query params: {params} and form data: {data}".format(params=params, data=data, **path))
return self.generic_request("GET", "/api/v1/courses/{course_id}/modules/{id}".format(**path), data=data, params=params, single_item=True)
def create_module(self, course_id, module_name, module_position=None, module_prerequisite_module_ids=None, module_publish_final_grade=None, module_require_sequential_progress=None, module_unlock_at=None):
"""
Create a module.
Create and return a new module
"""
path = {}
data = {}
params = {}
# REQUIRED - PATH - course_id
"""ID"""
path["course_id"] = course_id
# REQUIRED - module[name]
"""The name of the module"""
data["module[name]"] = module_name
# OPTIONAL - module[unlock_at]
"""The date the module will unlock"""
if module_unlock_at is not None:
if issubclass(module_unlock_at.__class__, str):
module_unlock_at = self._validate_iso8601_string(module_unlock_at)
elif issubclass(module_unlock_at.__class__, date) or issubclass(module_unlock_at.__class__, datetime):
module_unlock_at = module_unlock_at.strftime('%Y-%m-%dT%H:%M:%S+00:00')
data["module[unlock_at]"] = module_unlock_at
# OPTIONAL - module[position]
"""The position of this module in the course (1-based)"""
if module_position is not None:
data["module[position]"] = module_position
# OPTIONAL - module[require_sequential_progress]
"""Whether module items must be unlocked in order"""
if module_require_sequential_progress is not None:
data["module[require_sequential_progress]"] = module_require_sequential_progress
# OPTIONAL - module[prerequisite_module_ids]
"""IDs of Modules that must be completed before this one is unlocked.
Prerequisite modules must precede this module (i.e. have a lower position
value), otherwise they will be ignored"""
if module_prerequisite_module_ids is not None:
data["module[prerequisite_module_ids]"] = module_prerequisite_module_ids
# OPTIONAL - module[publish_final_grade]
"""Whether to publish the student's final grade for the course upon
completion of this module."""
if module_publish_final_grade is not None:
data["module[publish_final_grade]"] = module_publish_final_grade
self.logger.debug("POST /api/v1/courses/{course_id}/modules with query params: {params} and form data: {data}".format(params=params, data=data, **path))
return self.generic_request("POST", "/api/v1/courses/{course_id}/modules".format(**path), data=data, params=params, single_item=True)
def update_module(self, id, course_id, module_name=None, module_position=None, module_prerequisite_module_ids=None, module_publish_final_grade=None, module_published=None, module_require_sequential_progress=None, module_unlock_at=None):
"""
Update a module.
Update and return an existing module
"""
path = {}
data = {}
params = {}
# REQUIRED - PATH - course_id
"""ID"""
path["course_id"] = course_id
# REQUIRED - PATH - id
"""ID"""
path["id"] = id
# OPTIONAL - module[name]
"""The name of the module"""
if module_name is not None:
data["module[name]"] = module_name
# OPTIONAL - module[unlock_at]
"""The date the module will unlock"""
if module_unlock_at is not None:
if issubclass(module_unlock_at.__class__, str):
module_unlock_at = self._validate_iso8601_string(module_unlock_at)
elif issubclass(module_unlock_at.__class__, date) or issubclass(module_unlock_at.__class__, datetime):
module_unlock_at = module_unlock_at.strftime('%Y-%m-%dT%H:%M:%S+00:00')
data["module[unlock_at]"] = module_unlock_at
# OPTIONAL - module[position]
"""The position of the module in the course (1-based)"""
if module_position is not None:
data["module[position]"] = module_position
# OPTIONAL - module[require_sequential_progress]
"""Whether module items must be unlocked in order"""
if module_require_sequential_progress is not None:
data["module[require_sequential_progress]"] = module_require_sequential_progress
# OPTIONAL - module[prerequisite_module_ids]
"""IDs of Modules that must be completed before this one is unlocked
Prerequisite modules must precede this module (i.e. have a lower position
value), otherwise they will be ignored"""
if module_prerequisite_module_ids is not None:
data["module[prerequisite_module_ids]"] = module_prerequisite_module_ids
# OPTIONAL - module[publish_final_grade]
"""Whether to publish the student's final grade for the course upon
completion of this module."""
if module_publish_final_grade is not None:
data["module[publish_final_grade]"] = module_publish_final_grade
# OPTIONAL - module[published]
"""Whether the module is published and visible to students"""
if module_published is not None:
data["module[published]"] = module_published
self.logger.debug("PUT /api/v1/courses/{course_id}/modules/{id} with query params: {params} and form data: {data}".format(params=params, data=data, **path))
return self.generic_request("PUT", "/api/v1/courses/{course_id}/modules/{id}".format(**path), data=data, params=params, single_item=True)
def delete_module(self, id, course_id):
"""
Delete module.
Delete a module
"""
path = {}
data = {}
params = {}
# REQUIRED - PATH - course_id
"""ID"""
path["course_id"] = course_id
# REQUIRED - PATH - id
"""ID"""
path["id"] = id
self.logger.debug("DELETE /api/v1/courses/{course_id}/modules/{id} with query params: {params} and form data: {data}".format(params=params, data=data, **path))
return self.generic_request("DELETE", "/api/v1/courses/{course_id}/modules/{id}".format(**path), data=data, params=params, single_item=True)
def re_lock_module_progressions(self, id, course_id):
"""
Re-lock module progressions.
Resets module progressions to their default locked state and
recalculates them based on the current requirements.
Adding progression requirements to an active course will not lock students
out of modules they have already unlocked unless this action is called.
"""
path = {}
data = {}
params = {}
# REQUIRED - PATH - course_id
"""ID"""
path["course_id"] = course_id
# REQUIRED - PATH - id
"""ID"""
path["id"] = id
self.logger.debug("PUT /api/v1/courses/{course_id}/modules/{id}/relock with query params: {params} and form data: {data}".format(params=params, data=data, **path))
return self.generic_request("PUT", "/api/v1/courses/{course_id}/modules/{id}/relock".format(**path), data=data, params=params, single_item=True)
def list_module_items(self, course_id, module_id, include=None, search_term=None, student_id=None):
"""
List module items.
List the items in a module
"""
path = {}
data = {}
params = {}
# REQUIRED - PATH - course_id
"""ID"""
path["course_id"] = course_id
# REQUIRED - PATH - module_id
"""ID"""
path["module_id"] = module_id
# OPTIONAL - include
"""If included, will return additional details specific to the content
associated with each item. Refer to the {api:Modules:Module%20Item Module
Item specification} for more details.
Includes standard lock information for each item."""
if include is not None:
self._validate_enum(include, ["content_details"])
params["include"] = include
# OPTIONAL - search_term
"""The partial title of the items to match and return."""
if search_term is not None:
params["search_term"] = search_term
# OPTIONAL - student_id
"""Returns module completion information for the student with this id."""
if student_id is not None:
params["student_id"] = student_id
self.logger.debug("GET /api/v1/courses/{course_id}/modules/{module_id}/items with query params: {params} and form data: {data}".format(params=params, data=data, **path))
return self.generic_request("GET", "/api/v1/courses/{course_id}/modules/{module_id}/items".format(**path), data=data, params=params, all_pages=True)
def show_module_item(self, id, course_id, module_id, include=None, student_id=None):
"""
Show module item.
Get information about a single module item
"""
path = {}
data = {}
params = {}
# REQUIRED - PATH - course_id
"""ID"""
path["course_id"] = course_id
# REQUIRED - PATH - module_id
"""ID"""
path["module_id"] = module_id
# REQUIRED - PATH - id
"""ID"""
path["id"] = id
# OPTIONAL - include
"""If included, will return additional details specific to the content
associated with this item. Refer to the {api:Modules:Module%20Item Module
Item specification} for more details.
Includes standard lock information for each item."""
if include is not None:
self._validate_enum(include, ["content_details"])
params["include"] = include
# OPTIONAL - student_id
"""Returns module completion information for the student with this id."""
if student_id is not None:
params["student_id"] = student_id
self.logger.debug("GET /api/v1/courses/{course_id}/modules/{module_id}/items/{id} with query params: {params} and form data: {data}".format(params=params, data=data, **path))
return self.generic_request("GET", "/api/v1/courses/{course_id}/modules/{module_id}/items/{id}".format(**path), data=data, params=params, single_item=True)
def create_module_item(self, course_id, module_id, module_item_type, module_item_content_id, module_item_completion_requirement_min_score=None, module_item_completion_requirement_type=None, module_item_external_url=None, module_item_indent=None, module_item_new_tab=None, module_item_page_url=None, module_item_position=None, module_item_title=None):
"""
Create a module item.
Create and return a new module item
"""
path = {}
data = {}
params = {}
# REQUIRED - PATH - course_id
"""ID"""
path["course_id"] = course_id
# REQUIRED - PATH - module_id
"""ID"""
path["module_id"] = module_id
# OPTIONAL - module_item[title]
"""The name of the module item and associated content"""
if module_item_title is not None:
data["module_item[title]"] = module_item_title
# REQUIRED - module_item[type]
"""The type of content linked to the item"""
self._validate_enum(module_item_type, ["File", "Page", "Discussion", "Assignment", "Quiz", "SubHeader", "ExternalUrl", "ExternalTool"])
data["module_item[type]"] = module_item_type
# REQUIRED - module_item[content_id]
"""The id of the content to link to the module item. Required, except for
'ExternalUrl', 'Page', and 'SubHeader' types."""
data["module_item[content_id]"] = module_item_content_id
# OPTIONAL - module_item[position]
"""The position of this item in the module (1-based)."""
if module_item_position is not None:
data["module_item[position]"] = module_item_position
# OPTIONAL - module_item[indent]
"""0-based indent level; module items may be indented to show a hierarchy"""
if module_item_indent is not None:
data["module_item[indent]"] = module_item_indent
# OPTIONAL - module_item[page_url]
"""Suffix for the linked wiki page (e.g. 'front-page'). Required for 'Page'
type."""
if module_item_page_url is not None:
data["module_item[page_url]"] = module_item_page_url
# OPTIONAL - module_item[external_url]
"""External url that the item points to. [Required for 'ExternalUrl' and
'ExternalTool' types."""
if module_item_external_url is not None:
data["module_item[external_url]"] = module_item_external_url
# OPTIONAL - module_item[new_tab]
"""Whether the external tool opens in a new tab. Only applies to
'ExternalTool' type."""
if module_item_new_tab is not None:
data["module_item[new_tab]"] = module_item_new_tab
# OPTIONAL - module_item[completion_requirement][type]
"""Completion requirement for this module item.
"must_view": Applies to all item types
"must_contribute": Only applies to "Assignment", "Discussion", and "Page" types
"must_submit", "min_score": Only apply to "Assignment" and "Quiz" types
Inapplicable types will be ignored"""
if module_item_completion_requirement_type is not None:
self._validate_enum(module_item_completion_requirement_type, ["must_view", "must_contribute", "must_submit"])
data["module_item[completion_requirement][type]"] = module_item_completion_requirement_type
# OPTIONAL - module_item[completion_requirement][min_score]
"""Minimum score required to complete. Required for completion_requirement
type 'min_score'."""
if module_item_completion_requirement_min_score is not None:
data["module_item[completion_requirement][min_score]"] = module_item_completion_requirement_min_score
self.logger.debug("POST /api/v1/courses/{course_id}/modules/{module_id}/items with query params: {params} and form data: {data}".format(params=params, data=data, **path))
return self.generic_request("POST", "/api/v1/courses/{course_id}/modules/{module_id}/items".format(**path), data=data, params=params, single_item=True)
def update_module_item(self, id, course_id, module_id, module_item_completion_requirement_min_score=None, module_item_completion_requirement_type=None, module_item_external_url=None, module_item_indent=None, module_item_module_id=None, module_item_new_tab=None, module_item_position=None, module_item_published=None, module_item_title=None):
"""
Update a module item.
Update and return an existing module item
"""
path = {}
data = {}
params = {}
# REQUIRED - PATH - course_id
"""ID"""
path["course_id"] = course_id
# REQUIRED - PATH - module_id
"""ID"""
path["module_id"] = module_id
# REQUIRED - PATH - id
"""ID"""
path["id"] = id
# OPTIONAL - module_item[title]
"""The name of the module item"""
if module_item_title is not None:
data["module_item[title]"] = module_item_title
# OPTIONAL - module_item[position]
"""The position of this item in the module (1-based)"""
if module_item_position is not None:
data["module_item[position]"] = module_item_position
# OPTIONAL - module_item[indent]
"""0-based indent level; module items may be indented to show a hierarchy"""
if module_item_indent is not None:
data["module_item[indent]"] = module_item_indent
# OPTIONAL - module_item[external_url]
"""External url that the item points to. Only applies to 'ExternalUrl' type."""
if module_item_external_url is not None:
data["module_item[external_url]"] = module_item_external_url
# OPTIONAL - module_item[new_tab]
"""Whether the external tool opens in a new tab. Only applies to
'ExternalTool' type."""
if module_item_new_tab is not None:
data["module_item[new_tab]"] = module_item_new_tab
# OPTIONAL - module_item[completion_requirement][type]
"""Completion requirement for this module item.
"must_view": Applies to all item types
"must_contribute": Only applies to "Assignment", "Discussion", and "Page" types
"must_submit", "min_score": Only apply to "Assignment" and "Quiz" types
Inapplicable types will be ignored"""
if module_item_completion_requirement_type is not None:
self._validate_enum(module_item_completion_requirement_type, ["must_view", "must_contribute", "must_submit"])
data["module_item[completion_requirement][type]"] = module_item_completion_requirement_type
# OPTIONAL - module_item[completion_requirement][min_score]
"""Minimum score required to complete, Required for completion_requirement
type 'min_score'."""
if module_item_completion_requirement_min_score is not None:
data["module_item[completion_requirement][min_score]"] = module_item_completion_requirement_min_score
# OPTIONAL - module_item[published]
"""Whether the module item is published and visible to students."""
if module_item_published is not None:
data["module_item[published]"] = module_item_published
# OPTIONAL - module_item[module_id]
"""Move this item to another module by specifying the target module id here.
The target module must be in the same course."""
if module_item_module_id is not None:
data["module_item[module_id]"] = module_item_module_id
self.logger.debug("PUT /api/v1/courses/{course_id}/modules/{module_id}/items/{id} with query params: {params} and form data: {data}".format(params=params, data=data, **path))
return self.generic_request("PUT", "/api/v1/courses/{course_id}/modules/{module_id}/items/{id}".format(**path), data=data, params=params, single_item=True)
def select_mastery_path(self, id, course_id, module_id, assignment_set_id=None, student_id=None):
"""
Select a mastery path.
Select a mastery path when module item includes several possible paths.
Requires Mastery Paths feature to be enabled. Returns a compound document
with the assignments included in the given path and any module items
related to those assignments
"""
path = {}
data = {}
params = {}
# REQUIRED - PATH - course_id
"""ID"""
path["course_id"] = course_id
# REQUIRED - PATH - module_id
"""ID"""
path["module_id"] = module_id
# REQUIRED - PATH - id
"""ID"""
path["id"] = id
# OPTIONAL - assignment_set_id
"""Assignment set chosen, as specified in the mastery_paths portion of the
context module item response"""
if assignment_set_id is not None:
data["assignment_set_id"] = assignment_set_id
# OPTIONAL - student_id
"""Which student the selection applies to. If not specified, current user is
implied."""
if student_id is not None:
data["student_id"] = student_id
self.logger.debug("POST /api/v1/courses/{course_id}/modules/{module_id}/items/{id}/select_mastery_path with query params: {params} and form data: {data}".format(params=params, data=data, **path))
return self.generic_request("POST", "/api/v1/courses/{course_id}/modules/{module_id}/items/{id}/select_mastery_path".format(**path), data=data, params=params, no_data=True)
def delete_module_item(self, id, course_id, module_id):
"""
Delete module item.
Delete a module item
"""
path = {}
data = {}
params = {}
# REQUIRED - PATH - course_id
"""ID"""
path["course_id"] = course_id
# REQUIRED - PATH - module_id
"""ID"""
path["module_id"] = module_id
# REQUIRED - PATH - id
"""ID"""
path["id"] = id
self.logger.debug("DELETE /api/v1/courses/{course_id}/modules/{module_id}/items/{id} with query params: {params} and form data: {data}".format(params=params, data=data, **path))
return self.generic_request("DELETE", "/api/v1/courses/{course_id}/modules/{module_id}/items/{id}".format(**path), data=data, params=params, single_item=True)
def mark_module_item_as_done_not_done(self, id, course_id, module_id):
"""
Mark module item as done/not done.
Mark a module item as done/not done. Use HTTP method PUT to mark as done,
and DELETE to mark as not done.
"""
path = {}
data = {}
params = {}
# REQUIRED - PATH - course_id
"""ID"""
path["course_id"] = course_id
# REQUIRED - PATH - module_id
"""ID"""
path["module_id"] = module_id
# REQUIRED - PATH - id
"""ID"""
path["id"] = id
self.logger.debug("PUT /api/v1/courses/{course_id}/modules/{module_id}/items/{id}/done with query params: {params} and form data: {data}".format(params=params, data=data, **path))
return self.generic_request("PUT", "/api/v1/courses/{course_id}/modules/{module_id}/items/{id}/done".format(**path), data=data, params=params, no_data=True)
def get_module_item_sequence(self, course_id, asset_id=None, asset_type=None):
"""
Get module item sequence.
Given an asset in a course, find the ModuleItem it belongs to, and also the previous and next Module Items
in the course sequence.
"""
path = {}
data = {}
params = {}
# REQUIRED - PATH - course_id
"""ID"""
path["course_id"] = course_id
# OPTIONAL - asset_type
"""The type of asset to find module sequence information for. Use the ModuleItem if it is known
(e.g., the user navigated from a module item), since this will avoid ambiguity if the asset
appears more than once in the module sequence."""
if asset_type is not None:
self._validate_enum(asset_type, ["ModuleItem", "File", "Page", "Discussion", "Assignment", "Quiz", "ExternalTool"])
params["asset_type"] = asset_type
# OPTIONAL - asset_id
"""The id of the asset (or the url in the case of a Page)"""
if asset_id is not None:
params["asset_id"] = asset_id
self.logger.debug("GET /api/v1/courses/{course_id}/module_item_sequence with query params: {params} and form data: {data}".format(params=params, data=data, **path))
return self.generic_request("GET", "/api/v1/courses/{course_id}/module_item_sequence".format(**path), data=data, params=params, single_item=True)
def mark_module_item_read(self, id, course_id, module_id):
"""
Mark module item read.
Fulfills "must view" requirement for a module item. It is generally not necessary to do this explicitly,
but it is provided for applications that need to access external content directly (bypassing the html_url
redirect that normally allows Canvas to fulfill "must view" requirements).
This endpoint cannot be used to complete requirements on locked or unpublished module items.
"""
path = {}
data = {}
params = {}
# REQUIRED - PATH - course_id
"""ID"""
path["course_id"] = course_id
# REQUIRED - PATH - module_id
"""ID"""
path["module_id"] = module_id
# REQUIRED - PATH - id
"""ID"""
path["id"] = id
self.logger.debug("POST /api/v1/courses/{course_id}/modules/{module_id}/items/{id}/mark_read with query params: {params} and form data: {data}".format(params=params, data=data, **path))
return self.generic_request("POST", "/api/v1/courses/{course_id}/modules/{module_id}/items/{id}/mark_read".format(**path), data=data, params=params, no_data=True)
class Contentdetails(BaseModel):
"""Contentdetails Model."""
def __init__(self, unlock_at=None, due_at=None, points_possible=None, lock_info=None, lock_at=None, lock_explanation=None, locked_for_user=None):
"""Init method for Contentdetails class."""
self._unlock_at = unlock_at
self._due_at = due_at
self._points_possible = points_possible
self._lock_info = lock_info
self._lock_at = lock_at
self._lock_explanation = lock_explanation
self._locked_for_user = locked_for_user
self.logger = logging.getLogger('py3canvas.Contentdetails')
@property
def unlock_at(self):
"""unlock_at."""
return self._unlock_at
@unlock_at.setter
def unlock_at(self, value):
"""Setter for unlock_at property."""
self.logger.warn("Setting values on unlock_at will NOT update the remote Canvas instance.")
self._unlock_at = value
@property
def due_at(self):
"""due_at."""
return self._due_at
@due_at.setter
def due_at(self, value):
"""Setter for due_at property."""
self.logger.warn("Setting values on due_at will NOT update the remote Canvas instance.")
self._due_at = value
@property
def points_possible(self):
"""points_possible."""
return self._points_possible
@points_possible.setter
def points_possible(self, value):
"""Setter for points_possible property."""
self.logger.warn("Setting values on points_possible will NOT update the remote Canvas instance.")
self._points_possible = value
@property
def lock_info(self):
"""lock_info."""
return self._lock_info
@lock_info.setter
def lock_info(self, value):
"""Setter for lock_info property."""
self.logger.warn("Setting values on lock_info will NOT update the remote Canvas instance.")
self._lock_info = value
@property
def lock_at(self):
"""lock_at."""
return self._lock_at
@lock_at.setter
def lock_at(self, value):
"""Setter for lock_at property."""
self.logger.warn("Setting values on lock_at will NOT update the remote Canvas instance.")
self._lock_at = value
@property
def lock_explanation(self):
"""lock_explanation."""
return self._lock_explanation
@lock_explanation.setter
def lock_explanation(self, value):
"""Setter for lock_explanation property."""
self.logger.warn("Setting values on lock_explanation will NOT update the remote Canvas instance.")
self._lock_explanation = value
@property
def locked_for_user(self):
"""locked_for_user."""
return self._locked_for_user
@locked_for_user.setter
def locked_for_user(self, value):
"""Setter for locked_for_user property."""
self.logger.warn("Setting values on locked_for_user will NOT update the remote Canvas instance.")
self._locked_for_user = value
class Moduleitemsequenceasset(BaseModel):
"""Moduleitemsequenceasset Model."""
def __init__(self, module_id=None, type=None, id=None, title=None):
"""Init method for Moduleitemsequenceasset class."""
self._module_id = module_id
self._type = type
self._id = id
self._title = title
self.logger = logging.getLogger('py3canvas.Moduleitemsequenceasset')
@property
def module_id(self):
"""module_id."""
return self._module_id
@module_id.setter
def module_id(self, value):
"""Setter for module_id property."""
self.logger.warn("Setting values on module_id will NOT update the remote Canvas instance.")
self._module_id = value
@property
def type(self):
"""type."""
return self._type
@type.setter
def type(self, value):
"""Setter for type property."""
self.logger.warn("Setting values on type will NOT update the remote Canvas instance.")
self._type = value
@property
def id(self):
"""id."""
return self._id
@id.setter
def id(self, value):
"""Setter for id property."""
self.logger.warn("Setting values on id will NOT update the remote Canvas instance.")
self._id = value
@property
def title(self):
"""title."""
return self._title
@title.setter
def title(self, value):
"""Setter for title property."""
self.logger.warn("Setting values on title will NOT update the remote Canvas instance.")
self._title = value
class Moduleitemcompletionrequirement(BaseModel):
"""Moduleitemcompletionrequirement Model."""
def __init__(self, min_score=None, type=None, completed=None):
"""Init method for Moduleitemcompletionrequirement class."""
self._min_score = min_score
self._type = type
self._completed = completed
self.logger = logging.getLogger('py3canvas.Moduleitemcompletionrequirement')
@property
def min_score(self):
"""min_score."""
return self._min_score
@min_score.setter
def min_score(self, value):
"""Setter for min_score property."""
self.logger.warn("Setting values on min_score will NOT update the remote Canvas instance.")
self._min_score = value
@property
def type(self):
"""type."""
return self._type
@type.setter
def type(self, value):
"""Setter for type property."""
self.logger.warn("Setting values on type will NOT update the remote Canvas instance.")
self._type = value
@property
def completed(self):
"""completed."""
return self._completed
@completed.setter
def completed(self, value):
"""Setter for completed property."""
self.logger.warn("Setting values on completed will NOT update the remote Canvas instance.")
self._completed = value
class Module(BaseModel):
"""Module Model."""
def __init__(self, completed_at=None, items_count=None, unlock_at=None, workflow_state=None, items=None, prerequisite_module_ids=None, state=None, publish_final_grade=None, position=None, items_url=None, id=None, require_sequential_progress=None, name=None):
"""Init method for Module class."""
self._completed_at = completed_at
self._items_count = items_count
self._unlock_at = unlock_at
self._workflow_state = workflow_state
self._items = items
self._prerequisite_module_ids = prerequisite_module_ids
self._state = state
self._publish_final_grade = publish_final_grade
self._position = position
self._items_url = items_url
self._id = id
self._require_sequential_progress = require_sequential_progress
self._name = name
self.logger = logging.getLogger('py3canvas.Module')
@property
def completed_at(self):
"""the date the calling user completed the module (Optional; present only if the caller is a student or if the optional parameter 'student_id' is included)."""
return self._completed_at
@completed_at.setter
def completed_at(self, value):
"""Setter for completed_at property."""
self.logger.warn("Setting values on completed_at will NOT update the remote Canvas instance.")
self._completed_at = value
@property
def items_count(self):
"""The number of items in the module."""
return self._items_count
@items_count.setter
def items_count(self, value):
"""Setter for items_count property."""
self.logger.warn("Setting values on items_count will NOT update the remote Canvas instance.")
self._items_count = value
@property
def unlock_at(self):
"""(Optional) the date this module will unlock."""
return self._unlock_at
@unlock_at.setter
def unlock_at(self, value):
"""Setter for unlock_at property."""
self.logger.warn("Setting values on unlock_at will NOT update the remote Canvas instance.")
self._unlock_at = value
@property
def workflow_state(self):
"""the state of the module: 'active', 'deleted'."""
return self._workflow_state
@workflow_state.setter
def workflow_state(self, value):
"""Setter for workflow_state property."""
self.logger.warn("Setting values on workflow_state will NOT update the remote Canvas instance.")
self._workflow_state = value
@property
def items(self):
"""The contents of this module, as an array of Module Items. (Present only if requested via include[]=items AND the module is not deemed too large by Canvas.)."""
return self._items
@items.setter
def items(self, value):
"""Setter for items property."""
self.logger.warn("Setting values on items will NOT update the remote Canvas instance.")
self._items = value
@property
def prerequisite_module_ids(self):
"""IDs of Modules that must be completed before this one is unlocked."""
return self._prerequisite_module_ids
@prerequisite_module_ids.setter
def prerequisite_module_ids(self, value):
"""Setter for prerequisite_module_ids property."""
self.logger.warn("Setting values on prerequisite_module_ids will NOT update the remote Canvas instance.")
self._prerequisite_module_ids = value
@property
def state(self):
"""The state of this Module for the calling user one of 'locked', 'unlocked', 'started', 'completed' (Optional; present only if the caller is a student or if the optional parameter 'student_id' is included)."""
return self._state
@state.setter
def state(self, value):
"""Setter for state property."""
self.logger.warn("Setting values on state will NOT update the remote Canvas instance.")
self._state = value
@property
def publish_final_grade(self):
"""if the student's final grade for the course should be published to the SIS upon completion of this module."""
return self._publish_final_grade
@publish_final_grade.setter
def publish_final_grade(self, value):
"""Setter for publish_final_grade property."""
self.logger.warn("Setting values on publish_final_grade will NOT update the remote Canvas instance.")
self._publish_final_grade = value
@property
def position(self):
"""the position of this module in the course (1-based)."""
return self._position
@position.setter
def position(self, value):
"""Setter for position property."""
self.logger.warn("Setting values on position will NOT update the remote Canvas instance.")
self._position = value
@property
def items_url(self):
"""The API URL to retrive this module's items."""
return self._items_url
@items_url.setter
def items_url(self, value):
"""Setter for items_url property."""
self.logger.warn("Setting values on items_url will NOT update the remote Canvas instance.")
self._items_url = value
@property
def id(self):
"""the unique identifier for the module."""
return self._id
@id.setter
def id(self, value):
"""Setter for id property."""
self.logger.warn("Setting values on id will NOT update the remote Canvas instance.")
self._id = value
@property
def require_sequential_progress(self):
"""Whether module items must be unlocked in order."""
return self._require_sequential_progress
@require_sequential_progress.setter
def require_sequential_progress(self, value):
"""Setter for require_sequential_progress property."""
self.logger.warn("Setting values on require_sequential_progress will NOT update the remote Canvas instance.")
self._require_sequential_progress = value
@property
def name(self):
"""the name of this module."""
return self._name
@name.setter
def name(self, value):
"""Setter for name property."""
self.logger.warn("Setting values on name will NOT update the remote Canvas instance.")
self._name = value
class Moduleitemsequence(BaseModel):
"""Moduleitemsequence Model."""
def __init__(self, items=None, modules=None):
"""Init method for Moduleitemsequence class."""
self._items = items
self._modules = modules
self.logger = logging.getLogger('py3canvas.Moduleitemsequence')
@property
def items(self):
"""an array containing one hash for each appearence of the asset in the module sequence (up to 10 total)."""
return self._items
@items.setter
def items(self, value):
"""Setter for items property."""
self.logger.warn("Setting values on items will NOT update the remote Canvas instance.")
self._items = value
@property
def modules(self):
"""an array containing each Module referenced above."""
return self._modules
@modules.setter
def modules(self, value):
"""Setter for modules property."""
self.logger.warn("Setting values on modules will NOT update the remote Canvas instance.")
self._modules = value
class Completionrequirement(BaseModel):
"""Completionrequirement Model."""
def __init__(self, min_score=None, type=None, completed=None):
"""Init method for Completionrequirement class."""
self._min_score = min_score
self._type = type
self._completed = completed
self.logger = logging.getLogger('py3canvas.Completionrequirement')
@property
def min_score(self):
"""minimum score required to complete (only present when type == 'min_score')."""
return self._min_score
@min_score.setter
def min_score(self, value):
"""Setter for min_score property."""
self.logger.warn("Setting values on min_score will NOT update the remote Canvas instance.")
self._min_score = value
@property
def type(self):
"""one of 'must_view', 'must_submit', 'must_contribute', 'min_score'."""
return self._type
@type.setter
def type(self, value):
"""Setter for type property."""
self.logger.warn("Setting values on type will NOT update the remote Canvas instance.")
self._type = value
@property
def completed(self):
"""whether the calling user has met this requirement (Optional; present only if the caller is a student or if the optional parameter 'student_id' is included)."""
return self._completed
@completed.setter
def completed(self, value):
"""Setter for completed property."""
self.logger.warn("Setting values on completed will NOT update the remote Canvas instance.")
self._completed = value
class Moduleitem(BaseModel):
"""Moduleitem Model."""
def __init__(self, indent=None, title=None, url=None, completion_requirement=None, html_url=None, content_details=None, new_tab=None, external_url=None, position=None, module_id=None, content_id=None, type=None, id=None, page_url=None):
"""Init method for Moduleitem class."""
self._indent = indent
self._title = title
self._url = url
self._completion_requirement = completion_requirement
self._html_url = html_url
self._content_details = content_details
self._new_tab = new_tab
self._external_url = external_url
self._position = position
self._module_id = module_id
self._content_id = content_id
self._type = type
self._id = id
self._page_url = page_url
self.logger = logging.getLogger('py3canvas.Moduleitem')
@property
def indent(self):
"""0-based indent level; module items may be indented to show a hierarchy."""
return self._indent
@indent.setter
def indent(self, value):
"""Setter for indent property."""
self.logger.warn("Setting values on indent will NOT update the remote Canvas instance.")
self._indent = value
@property
def title(self):
"""the title of this item."""
return self._title
@title.setter
def title(self, value):
"""Setter for title property."""
self.logger.warn("Setting values on title will NOT update the remote Canvas instance.")
self._title = value
@property
def url(self):
"""(Optional) link to the Canvas API object, if applicable."""
return self._url
@url.setter
def url(self, value):
"""Setter for url property."""
self.logger.warn("Setting values on url will NOT update the remote Canvas instance.")
self._url = value
@property
def completion_requirement(self):
"""Completion requirement for this module item."""
return self._completion_requirement
@completion_requirement.setter
def completion_requirement(self, value):
"""Setter for completion_requirement property."""
self.logger.warn("Setting values on completion_requirement will NOT update the remote Canvas instance.")
self._completion_requirement = value
@property
def html_url(self):
"""link to the item in Canvas."""
return self._html_url
@html_url.setter
def html_url(self, value):
"""Setter for html_url property."""
self.logger.warn("Setting values on html_url will NOT update the remote Canvas instance.")
self._html_url = value
@property
def content_details(self):
"""(Present only if requested through include[]=content_details) If applicable, returns additional details specific to the associated object."""
return self._content_details
@content_details.setter
def content_details(self, value):
"""Setter for content_details property."""
self.logger.warn("Setting values on content_details will NOT update the remote Canvas instance.")
self._content_details = value
@property
def new_tab(self):
"""(only for 'ExternalTool' type) whether the external tool opens in a new tab."""
return self._new_tab
@new_tab.setter
def new_tab(self, value):
"""Setter for new_tab property."""
self.logger.warn("Setting values on new_tab will NOT update the remote Canvas instance.")
self._new_tab = value
@property
def external_url(self):
"""(only for 'ExternalUrl' and 'ExternalTool' types) external url that the item points to."""
return self._external_url
@external_url.setter
def external_url(self, value):
"""Setter for external_url property."""
self.logger.warn("Setting values on external_url will NOT update the remote Canvas instance.")
self._external_url = value
@property
def position(self):
"""the position of this item in the module (1-based)."""
return self._position
@position.setter
def position(self, value):
"""Setter for position property."""
self.logger.warn("Setting values on position will NOT update the remote Canvas instance.")
self._position = value
@property
def module_id(self):
"""the id of the Module this item appears in."""
return self._module_id
@module_id.setter
def module_id(self, value):
"""Setter for module_id property."""
self.logger.warn("Setting values on module_id will NOT update the remote Canvas instance.")
self._module_id = value
@property
def content_id(self):
"""the id of the object referred to applies to 'File', 'Discussion', 'Assignment', 'Quiz', 'ExternalTool' types."""
return self._content_id
@content_id.setter
def content_id(self, value):
"""Setter for content_id property."""
self.logger.warn("Setting values on content_id will NOT update the remote Canvas instance.")
self._content_id = value
@property
def type(self):
"""the type of object referred to one of 'File', 'Page', 'Discussion', 'Assignment', 'Quiz', 'SubHeader', 'ExternalUrl', 'ExternalTool'."""
return self._type
@type.setter
def type(self, value):
"""Setter for type property."""
self.logger.warn("Setting values on type will NOT update the remote Canvas instance.")
self._type = value
@property
def id(self):
"""the unique identifier for the module item."""
return self._id
@id.setter
def id(self, value):
"""Setter for id property."""
self.logger.warn("Setting values on id will NOT update the remote Canvas instance.")
self._id = value
@property
def page_url(self):
"""(only for 'Page' type) unique locator for the linked wiki page."""
return self._page_url
@page_url.setter
def page_url(self, value):
"""Setter for page_url property."""
self.logger.warn("Setting values on page_url will NOT update the remote Canvas instance.")
self._page_url = value
class Moduleitemsequencenode(BaseModel):
"""Moduleitemsequencenode Model."""
def __init__(self, current=None, prev=None, next=None):
"""Init method for Moduleitemsequencenode class."""
self._current = current
self._prev = prev
self._next = next
self.logger = logging.getLogger('py3canvas.Moduleitemsequencenode')
@property
def current(self):
"""current."""
return self._current
@current.setter
def current(self, value):
"""Setter for current property."""
self.logger.warn("Setting values on current will NOT update the remote Canvas instance.")
self._current = value
@property
def prev(self):
"""prev."""
return self._prev
@prev.setter
def prev(self, value):
"""Setter for prev property."""
self.logger.warn("Setting values on prev will NOT update the remote Canvas instance.")
self._prev = value
@property
def next(self):
"""next."""
return self._next
@next.setter
def next(self, value):
"""Setter for next property."""
self.logger.warn("Setting values on next will NOT update the remote Canvas instance.")
self._next = value
class Moduleitemcontentdetails(BaseModel):
"""Moduleitemcontentdetails Model."""
def __init__(self, unlock_at=None, due_at=None, points_possible=None, lock_info=None, lock_at=None, lock_explanation=None, locked_for_user=None):
"""Init method for Moduleitemcontentdetails class."""
self._unlock_at = unlock_at
self._due_at = due_at
self._points_possible = points_possible
self._lock_info = lock_info
self._lock_at = lock_at
self._lock_explanation = lock_explanation
self._locked_for_user = locked_for_user
self.logger = logging.getLogger('py3canvas.Moduleitemcontentdetails')
@property
def unlock_at(self):
"""unlock_at."""
return self._unlock_at
@unlock_at.setter
def unlock_at(self, value):
"""Setter for unlock_at property."""
self.logger.warn("Setting values on unlock_at will NOT update the remote Canvas instance.")
self._unlock_at = value
@property
def due_at(self):
"""due_at."""
return self._due_at
@due_at.setter
def due_at(self, value):
"""Setter for due_at property."""
self.logger.warn("Setting values on due_at will NOT update the remote Canvas instance.")
self._due_at = value
@property
def points_possible(self):
"""points_possible."""
return self._points_possible
@points_possible.setter
def points_possible(self, value):
"""Setter for points_possible property."""
self.logger.warn("Setting values on points_possible will NOT update the remote Canvas instance.")
self._points_possible = value
@property
def lock_info(self):
"""lock_info."""
return self._lock_info
@lock_info.setter
def lock_info(self, value):
"""Setter for lock_info property."""
self.logger.warn("Setting values on lock_info will NOT update the remote Canvas instance.")
self._lock_info = value
@property
def lock_at(self):
"""lock_at."""
return self._lock_at
@lock_at.setter
def lock_at(self, value):
"""Setter for lock_at property."""
self.logger.warn("Setting values on lock_at will NOT update the remote Canvas instance.")
self._lock_at = value
@property
def lock_explanation(self):
"""lock_explanation."""
return self._lock_explanation
@lock_explanation.setter
def lock_explanation(self, value):
"""Setter for lock_explanation property."""
self.logger.warn("Setting values on lock_explanation will NOT update the remote Canvas instance.")
self._lock_explanation = value
@property
def locked_for_user(self):
"""locked_for_user."""
return self._locked_for_user
@locked_for_user.setter
def locked_for_user(self, value):
"""Setter for locked_for_user property."""
self.logger.warn("Setting values on locked_for_user will NOT update the remote Canvas instance.")
self._locked_for_user = value
| mit | -1,885,659,611,099,745,500 | 439,107,017,514,431,940 | 37.412935 | 354 | 0.624493 | false |
kinnou02/navitia | source/jormungandr/jormungandr/parking_space_availability/__init__.py | 3 | 1795 | # Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobility and open public transport:
# a non ending quest to the responsive locomotion way of traveling!
#
# LICENCE: 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 version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Stay tuned using
# twitter @navitia
# channel `#navitia` on riot https://riot.im/app/#/room/#navitia:matrix.org
# https://groups.google.com/d/forum/navitia
# www.navitia.io
from __future__ import absolute_import, print_function, division
from jormungandr.parking_space_availability.abstract_parking_places_provider import AbstractParkingPlacesProvider
from jormungandr.parking_space_availability.abstract_provider_manager import AbstractProviderManager
from jormungandr.parking_space_availability.abstract_provider_manager import get_from_to_pois_of_journeys
from jormungandr.parking_space_availability.bss.stands import Stands, StandsStatus
from jormungandr.parking_space_availability.car.parking_places import ParkingPlaces
| agpl-3.0 | -4,454,748,879,910,205,400 | 7,612,478,972,548,070,000 | 51.794118 | 113 | 0.788301 | false |
IronLanguages/ironpython2 | Src/StdLib/Lib/test/test_poll.py | 4 | 7315 | # Test case for the os.poll() function
import os
import random
import select
try:
import threading
except ImportError:
threading = None
import time
import unittest
from test.test_support import TESTFN, run_unittest, reap_threads, cpython_only
try:
select.poll
except AttributeError:
raise unittest.SkipTest, "select.poll not defined -- skipping test_poll"
def find_ready_matching(ready, flag):
match = []
for fd, mode in ready:
if mode & flag:
match.append(fd)
return match
class PollTests(unittest.TestCase):
def test_poll1(self):
# Basic functional test of poll object
# Create a bunch of pipe and test that poll works with them.
p = select.poll()
NUM_PIPES = 12
MSG = " This is a test."
MSG_LEN = len(MSG)
readers = []
writers = []
r2w = {}
w2r = {}
for i in range(NUM_PIPES):
rd, wr = os.pipe()
p.register(rd)
p.modify(rd, select.POLLIN)
p.register(wr, select.POLLOUT)
readers.append(rd)
writers.append(wr)
r2w[rd] = wr
w2r[wr] = rd
bufs = []
while writers:
ready = p.poll()
ready_writers = find_ready_matching(ready, select.POLLOUT)
if not ready_writers:
raise RuntimeError, "no pipes ready for writing"
wr = random.choice(ready_writers)
os.write(wr, MSG)
ready = p.poll()
ready_readers = find_ready_matching(ready, select.POLLIN)
if not ready_readers:
raise RuntimeError, "no pipes ready for reading"
rd = random.choice(ready_readers)
buf = os.read(rd, MSG_LEN)
self.assertEqual(len(buf), MSG_LEN)
bufs.append(buf)
os.close(r2w[rd]) ; os.close( rd )
p.unregister( r2w[rd] )
p.unregister( rd )
writers.remove(r2w[rd])
self.assertEqual(bufs, [MSG] * NUM_PIPES)
def poll_unit_tests(self):
# returns NVAL for invalid file descriptor
FD = 42
try:
os.close(FD)
except OSError:
pass
p = select.poll()
p.register(FD)
r = p.poll()
self.assertEqual(r[0], (FD, select.POLLNVAL))
f = open(TESTFN, 'w')
fd = f.fileno()
p = select.poll()
p.register(f)
r = p.poll()
self.assertEqual(r[0][0], fd)
f.close()
r = p.poll()
self.assertEqual(r[0], (fd, select.POLLNVAL))
os.unlink(TESTFN)
# type error for invalid arguments
p = select.poll()
self.assertRaises(TypeError, p.register, p)
self.assertRaises(TypeError, p.unregister, p)
# can't unregister non-existent object
p = select.poll()
self.assertRaises(KeyError, p.unregister, 3)
# Test error cases
pollster = select.poll()
class Nope:
pass
class Almost:
def fileno(self):
return 'fileno'
self.assertRaises(TypeError, pollster.register, Nope(), 0)
self.assertRaises(TypeError, pollster.register, Almost(), 0)
# Another test case for poll(). This is copied from the test case for
# select(), modified to use poll() instead.
def test_poll2(self):
cmd = 'for i in 0 1 2 3 4 5 6 7 8 9; do echo testing...; sleep 1; done'
p = os.popen(cmd, 'r')
pollster = select.poll()
pollster.register( p, select.POLLIN )
for tout in (0, 1000, 2000, 4000, 8000, 16000) + (-1,)*10:
fdlist = pollster.poll(tout)
if (fdlist == []):
continue
fd, flags = fdlist[0]
if flags & select.POLLHUP:
line = p.readline()
if line != "":
self.fail('error: pipe seems to be closed, but still returns data')
continue
elif flags & select.POLLIN:
line = p.readline()
if not line:
break
continue
else:
self.fail('Unexpected return value from select.poll: %s' % fdlist)
p.close()
def test_poll3(self):
# test int overflow
pollster = select.poll()
pollster.register(1)
self.assertRaises(OverflowError, pollster.poll, 1L << 64)
x = 2 + 3
if x != 5:
self.fail('Overflow must have occurred')
# Issues #15989, #17919
self.assertRaises(OverflowError, pollster.register, 0, -1)
self.assertRaises(OverflowError, pollster.register, 0, 1 << 64)
self.assertRaises(OverflowError, pollster.modify, 1, -1)
self.assertRaises(OverflowError, pollster.modify, 1, 1 << 64)
@cpython_only
def test_poll_c_limits(self):
from _testcapi import USHRT_MAX, INT_MAX, UINT_MAX
pollster = select.poll()
pollster.register(1)
# Issues #15989, #17919
self.assertRaises(OverflowError, pollster.register, 0, USHRT_MAX + 1)
self.assertRaises(OverflowError, pollster.modify, 1, USHRT_MAX + 1)
self.assertRaises(OverflowError, pollster.poll, INT_MAX + 1)
self.assertRaises(OverflowError, pollster.poll, UINT_MAX + 1)
@unittest.skipUnless(threading, 'Threading required for this test.')
@reap_threads
def test_threaded_poll(self):
r, w = os.pipe()
self.addCleanup(os.close, r)
self.addCleanup(os.close, w)
rfds = []
for i in range(10):
fd = os.dup(r)
self.addCleanup(os.close, fd)
rfds.append(fd)
pollster = select.poll()
for fd in rfds:
pollster.register(fd, select.POLLIN)
t = threading.Thread(target=pollster.poll)
t.start()
try:
time.sleep(0.5)
# trigger ufds array reallocation
for fd in rfds:
pollster.unregister(fd)
pollster.register(w, select.POLLOUT)
self.assertRaises(RuntimeError, pollster.poll)
finally:
# and make the call to poll() from the thread return
os.write(w, b'spam')
t.join()
@unittest.skipUnless(threading, 'Threading required for this test.')
@reap_threads
def test_poll_blocks_with_negative_ms(self):
for timeout_ms in [None, -1000, -1, -1.0]:
# Create two file descriptors. This will be used to unlock
# the blocking call to poll.poll inside the thread
r, w = os.pipe()
pollster = select.poll()
pollster.register(r, select.POLLIN)
poll_thread = threading.Thread(target=pollster.poll, args=(timeout_ms,))
poll_thread.start()
poll_thread.join(timeout=0.1)
self.assertTrue(poll_thread.is_alive())
# Write to the pipe so pollster.poll unblocks and the thread ends.
os.write(w, b'spam')
poll_thread.join()
self.assertFalse(poll_thread.is_alive())
os.close(r)
os.close(w)
def test_main():
run_unittest(PollTests)
if __name__ == '__main__':
test_main()
| apache-2.0 | -5,643,315,379,002,208,000 | 3,719,751,195,046,979,600 | 30.12766 | 87 | 0.552973 | false |
gundalow/ansible | lib/ansible/executor/task_queue_manager.py | 11 | 18711 | # (c) 2012-2014, Michael DeHaan <[email protected]>
#
# 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 distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import sys
import tempfile
import threading
import time
import multiprocessing.queues
from ansible import constants as C
from ansible import context
from ansible.errors import AnsibleError
from ansible.executor.play_iterator import PlayIterator
from ansible.executor.stats import AggregateStats
from ansible.executor.task_result import TaskResult
from ansible.module_utils.six import PY3, string_types
from ansible.module_utils._text import to_text, to_native
from ansible.playbook.play_context import PlayContext
from ansible.playbook.task import Task
from ansible.plugins.loader import callback_loader, strategy_loader, module_loader
from ansible.plugins.callback import CallbackBase
from ansible.template import Templar
from ansible.vars.hostvars import HostVars
from ansible.vars.reserved import warn_if_reserved
from ansible.utils.display import Display
from ansible.utils.lock import lock_decorator
from ansible.utils.multiprocessing import context as multiprocessing_context
__all__ = ['TaskQueueManager']
display = Display()
class CallbackSend:
def __init__(self, method_name, *args, **kwargs):
self.method_name = method_name
self.args = args
self.kwargs = kwargs
class FinalQueue(multiprocessing.queues.Queue):
def __init__(self, *args, **kwargs):
if PY3:
kwargs['ctx'] = multiprocessing_context
super(FinalQueue, self).__init__(*args, **kwargs)
def send_callback(self, method_name, *args, **kwargs):
self.put(
CallbackSend(method_name, *args, **kwargs),
block=False
)
def send_task_result(self, *args, **kwargs):
if isinstance(args[0], TaskResult):
tr = args[0]
else:
tr = TaskResult(*args, **kwargs)
self.put(
tr,
block=False
)
class AnsibleEndPlay(Exception):
def __init__(self, result):
self.result = result
class TaskQueueManager:
'''
This class handles the multiprocessing requirements of Ansible by
creating a pool of worker forks, a result handler fork, and a
manager object with shared datastructures/queues for coordinating
work between all processes.
The queue manager is responsible for loading the play strategy plugin,
which dispatches the Play's tasks to hosts.
'''
RUN_OK = 0
RUN_ERROR = 1
RUN_FAILED_HOSTS = 2
RUN_UNREACHABLE_HOSTS = 4
RUN_FAILED_BREAK_PLAY = 8
RUN_UNKNOWN_ERROR = 255
def __init__(self, inventory, variable_manager, loader, passwords, stdout_callback=None, run_additional_callbacks=True, run_tree=False, forks=None):
self._inventory = inventory
self._variable_manager = variable_manager
self._loader = loader
self._stats = AggregateStats()
self.passwords = passwords
self._stdout_callback = stdout_callback
self._run_additional_callbacks = run_additional_callbacks
self._run_tree = run_tree
self._forks = forks or 5
self._callbacks_loaded = False
self._callback_plugins = []
self._start_at_done = False
# make sure any module paths (if specified) are added to the module_loader
if context.CLIARGS.get('module_path', False):
for path in context.CLIARGS['module_path']:
if path:
module_loader.add_directory(path)
# a special flag to help us exit cleanly
self._terminated = False
# dictionaries to keep track of failed/unreachable hosts
self._failed_hosts = dict()
self._unreachable_hosts = dict()
try:
self._final_q = FinalQueue()
except OSError as e:
raise AnsibleError("Unable to use multiprocessing, this is normally caused by lack of access to /dev/shm: %s" % to_native(e))
self._callback_lock = threading.Lock()
# A temporary file (opened pre-fork) used by connection
# plugins for inter-process locking.
self._connection_lockfile = tempfile.TemporaryFile()
def _initialize_processes(self, num):
self._workers = []
for i in range(num):
self._workers.append(None)
def load_callbacks(self):
'''
Loads all available callbacks, with the exception of those which
utilize the CALLBACK_TYPE option. When CALLBACK_TYPE is set to 'stdout',
only one such callback plugin will be loaded.
'''
if self._callbacks_loaded:
return
stdout_callback_loaded = False
if self._stdout_callback is None:
self._stdout_callback = C.DEFAULT_STDOUT_CALLBACK
if isinstance(self._stdout_callback, CallbackBase):
stdout_callback_loaded = True
elif isinstance(self._stdout_callback, string_types):
if self._stdout_callback not in callback_loader:
raise AnsibleError("Invalid callback for stdout specified: %s" % self._stdout_callback)
else:
self._stdout_callback = callback_loader.get(self._stdout_callback)
self._stdout_callback.set_options()
stdout_callback_loaded = True
else:
raise AnsibleError("callback must be an instance of CallbackBase or the name of a callback plugin")
# get all configured loadable callbacks (adjacent, builtin)
callback_list = list(callback_loader.all(class_only=True))
# add enabled callbacks that refer to collections, which might not appear in normal listing
for c in C.CALLBACKS_ENABLED:
# load all, as collection ones might be using short/redirected names and not a fqcn
plugin = callback_loader.get(c, class_only=True)
# TODO: check if this skip is redundant, loader should handle bad file/plugin cases already
if plugin:
# avoids incorrect and dupes possible due to collections
if plugin not in callback_list:
callback_list.append(plugin)
else:
display.warning("Skipping callback plugin '%s', unable to load" % c)
# for each callback in the list see if we should add it to 'active callbacks' used in the play
for callback_plugin in callback_list:
callback_type = getattr(callback_plugin, 'CALLBACK_TYPE', '')
callback_needs_enabled = getattr(callback_plugin, 'CALLBACK_NEEDS_ENABLED', getattr(callback_plugin, 'CALLBACK_NEEDS_WHITELIST', False))
# try to get colleciotn world name first
cnames = getattr(callback_plugin, '_redirected_names', [])
if cnames:
# store the name the plugin was loaded as, as that's what we'll need to compare to the configured callback list later
callback_name = cnames[0]
else:
# fallback to 'old loader name'
(callback_name, _) = os.path.splitext(os.path.basename(callback_plugin._original_path))
display.vvvvv("Attempting to use '%s' callback." % (callback_name))
if callback_type == 'stdout':
# we only allow one callback of type 'stdout' to be loaded,
if callback_name != self._stdout_callback or stdout_callback_loaded:
display.vv("Skipping callback '%s', as we already have a stdout callback." % (callback_name))
continue
stdout_callback_loaded = True
elif callback_name == 'tree' and self._run_tree:
# TODO: remove special case for tree, which is an adhoc cli option --tree
pass
elif not self._run_additional_callbacks or (callback_needs_enabled and (
# only run if not adhoc, or adhoc was specifically configured to run + check enabled list
C.CALLBACKS_ENABLED is None or callback_name not in C.CALLBACKS_ENABLED)):
# 2.x plugins shipped with ansible should require enabling, older or non shipped should load automatically
continue
try:
callback_obj = callback_plugin()
# avoid bad plugin not returning an object, only needed cause we do class_only load and bypass loader checks,
# really a bug in the plugin itself which we ignore as callback errors are not supposed to be fatal.
if callback_obj:
# skip initializing if we already did the work for the same plugin (even with diff names)
if callback_obj not in self._callback_plugins:
callback_obj.set_options()
self._callback_plugins.append(callback_obj)
else:
display.vv("Skipping callback '%s', already loaded as '%s'." % (callback_plugin, callback_name))
else:
display.warning("Skipping callback '%s', as it does not create a valid plugin instance." % callback_name)
continue
except Exception as e:
display.warning("Skipping callback '%s', unable to load due to: %s" % (callback_name, to_native(e)))
continue
self._callbacks_loaded = True
def run(self, play):
'''
Iterates over the roles/tasks in a play, using the given (or default)
strategy for queueing tasks. The default is the linear strategy, which
operates like classic Ansible by keeping all hosts in lock-step with
a given task (meaning no hosts move on to the next task until all hosts
are done with the current task).
'''
if not self._callbacks_loaded:
self.load_callbacks()
all_vars = self._variable_manager.get_vars(play=play)
templar = Templar(loader=self._loader, variables=all_vars)
warn_if_reserved(all_vars, templar.environment.globals.keys())
new_play = play.copy()
new_play.post_validate(templar)
new_play.handlers = new_play.compile_roles_handlers() + new_play.handlers
self.hostvars = HostVars(
inventory=self._inventory,
variable_manager=self._variable_manager,
loader=self._loader,
)
play_context = PlayContext(new_play, self.passwords, self._connection_lockfile.fileno())
if (self._stdout_callback and
hasattr(self._stdout_callback, 'set_play_context')):
self._stdout_callback.set_play_context(play_context)
for callback_plugin in self._callback_plugins:
if hasattr(callback_plugin, 'set_play_context'):
callback_plugin.set_play_context(play_context)
self.send_callback('v2_playbook_on_play_start', new_play)
# build the iterator
iterator = PlayIterator(
inventory=self._inventory,
play=new_play,
play_context=play_context,
variable_manager=self._variable_manager,
all_vars=all_vars,
start_at_done=self._start_at_done,
)
# adjust to # of workers to configured forks or size of batch, whatever is lower
self._initialize_processes(min(self._forks, iterator.batch_size))
# load the specified strategy (or the default linear one)
strategy = strategy_loader.get(new_play.strategy, self)
if strategy is None:
raise AnsibleError("Invalid play strategy specified: %s" % new_play.strategy, obj=play._ds)
# Because the TQM may survive multiple play runs, we start by marking
# any hosts as failed in the iterator here which may have been marked
# as failed in previous runs. Then we clear the internal list of failed
# hosts so we know what failed this round.
for host_name in self._failed_hosts.keys():
host = self._inventory.get_host(host_name)
iterator.mark_host_failed(host)
for host_name in self._unreachable_hosts.keys():
iterator._play._removed_hosts.append(host_name)
self.clear_failed_hosts()
# during initialization, the PlayContext will clear the start_at_task
# field to signal that a matching task was found, so check that here
# and remember it so we don't try to skip tasks on future plays
if context.CLIARGS.get('start_at_task') is not None and play_context.start_at_task is None:
self._start_at_done = True
# and run the play using the strategy and cleanup on way out
try:
play_return = strategy.run(iterator, play_context)
finally:
strategy.cleanup()
self._cleanup_processes()
# now re-save the hosts that failed from the iterator to our internal list
for host_name in iterator.get_failed_hosts():
self._failed_hosts[host_name] = True
if iterator.end_play:
raise AnsibleEndPlay(play_return)
return play_return
def cleanup(self):
display.debug("RUNNING CLEANUP")
self.terminate()
self._final_q.close()
self._cleanup_processes()
# A bug exists in Python 2.6 that causes an exception to be raised during
# interpreter shutdown. This is only an issue in our CI testing but we
# hit it frequently enough to add a small sleep to avoid the issue.
# This can be removed once we have split controller available in CI.
#
# Further information:
# Issue: https://bugs.python.org/issue4106
# Fix: https://hg.python.org/cpython/rev/d316315a8781
#
try:
if (2, 6) == (sys.version_info[0:2]):
time.sleep(0.0001)
except (IndexError, AttributeError):
# In case there is an issue getting the version info, don't raise an Exception
pass
def _cleanup_processes(self):
if hasattr(self, '_workers'):
for attempts_remaining in range(C.WORKER_SHUTDOWN_POLL_COUNT - 1, -1, -1):
if not any(worker_prc and worker_prc.is_alive() for worker_prc in self._workers):
break
if attempts_remaining:
time.sleep(C.WORKER_SHUTDOWN_POLL_DELAY)
else:
display.warning('One or more worker processes are still running and will be terminated.')
for worker_prc in self._workers:
if worker_prc and worker_prc.is_alive():
try:
worker_prc.terminate()
except AttributeError:
pass
def clear_failed_hosts(self):
self._failed_hosts = dict()
def get_inventory(self):
return self._inventory
def get_variable_manager(self):
return self._variable_manager
def get_loader(self):
return self._loader
def get_workers(self):
return self._workers[:]
def terminate(self):
self._terminated = True
def has_dead_workers(self):
# [<WorkerProcess(WorkerProcess-2, stopped[SIGKILL])>,
# <WorkerProcess(WorkerProcess-2, stopped[SIGTERM])>
defunct = False
for x in self._workers:
if getattr(x, 'exitcode', None):
defunct = True
return defunct
@lock_decorator(attr='_callback_lock')
def send_callback(self, method_name, *args, **kwargs):
for callback_plugin in [self._stdout_callback] + self._callback_plugins:
# a plugin that set self.disabled to True will not be called
# see osx_say.py example for such a plugin
if getattr(callback_plugin, 'disabled', False):
continue
# a plugin can opt in to implicit tasks (such as meta). It does this
# by declaring self.wants_implicit_tasks = True.
wants_implicit_tasks = getattr(callback_plugin, 'wants_implicit_tasks', False)
# try to find v2 method, fallback to v1 method, ignore callback if no method found
methods = []
for possible in [method_name, 'v2_on_any']:
gotit = getattr(callback_plugin, possible, None)
if gotit is None:
gotit = getattr(callback_plugin, possible.replace('v2_', ''), None)
if gotit is not None:
methods.append(gotit)
# send clean copies
new_args = []
# If we end up being given an implicit task, we'll set this flag in
# the loop below. If the plugin doesn't care about those, then we
# check and continue to the next iteration of the outer loop.
is_implicit_task = False
for arg in args:
# FIXME: add play/task cleaners
if isinstance(arg, TaskResult):
new_args.append(arg.clean_copy())
# elif isinstance(arg, Play):
# elif isinstance(arg, Task):
else:
new_args.append(arg)
if isinstance(arg, Task) and arg.implicit:
is_implicit_task = True
if is_implicit_task and not wants_implicit_tasks:
continue
for method in methods:
try:
method(*new_args, **kwargs)
except Exception as e:
# TODO: add config toggle to make this fatal or not?
display.warning(u"Failure using method (%s) in callback plugin (%s): %s" % (to_text(method_name), to_text(callback_plugin), to_text(e)))
from traceback import format_tb
from sys import exc_info
display.vvv('Callback Exception: \n' + ' '.join(format_tb(exc_info()[2])))
| gpl-3.0 | 8,059,046,384,129,517,000 | -7,049,177,897,336,450,000 | 39.943107 | 156 | 0.617551 | false |
shubhamVerma/code-eval | Category - Easy/sumdigitsCodeEval.py | 1 | 1271 | '''
sumdigitsCodeEval.py - Solution to Problem Lowercase (Category - Easy)
Copyright (C) 2013, Shubham Verma
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,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
'''
'''
Description:
Given a positive integer, find the sum of its constituent digits.
Input sample:
The first argument will be a text file containing positive integers, one per line.
e.g.
23
496
Output sample:
Print to stdout, the sum of the numbers that make up the integer, one per line.
e.g.
5
19
'''
import sys
if __name__ == '__main__':
f = open(sys.argv[1], 'r')
test_cases = f.read().split('\n')
for test_case in test_cases:
print sum( map(int, test_case) )
f.close() | gpl-3.0 | 5,551,382,822,837,910,000 | -7,346,442,449,037,377,000 | 22.555556 | 83 | 0.707317 | false |
DazWorrall/ansible | lib/ansible/modules/packaging/language/composer.py | 24 | 9023 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Dimitrios Tydeas Mengidis <[email protected]>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
DOCUMENTATION = '''
---
module: composer
author:
- "Dimitrios Tydeas Mengidis (@dmtrs)"
- "René Moser (@resmo)"
short_description: Dependency Manager for PHP
version_added: "1.6"
description:
- >
Composer is a tool for dependency management in PHP. It allows you to
declare the dependent libraries your project needs and it will install
them in your project for you.
options:
command:
version_added: "1.8"
description:
- Composer command like "install", "update" and so on.
required: false
default: install
arguments:
version_added: "2.0"
description:
- Composer arguments like required package, version and so on.
required: false
default: null
executable:
version_added: "2.4"
description:
- Path to PHP Executable on the remote host, if PHP is not in PATH
required: false
default: null
aliases: [ "php_path" ]
working_dir:
description:
- Directory of your project (see --working-dir). This is required when
the command is not run globally.
- Will be ignored if C(global_command=true).
required: false
default: null
aliases: [ "working-dir" ]
global_command:
version_added: "2.4"
description:
- Runs the specified command globally.
required: false
choices: [ true, false]
default: false
aliases: [ "global-command" ]
prefer_source:
description:
- Forces installation from package sources when possible (see --prefer-source).
required: false
default: false
choices: [ true, false]
aliases: [ "prefer-source" ]
prefer_dist:
description:
- Forces installation from package dist even for dev versions (see --prefer-dist).
required: false
default: false
choices: [ true, false]
aliases: [ "prefer-dist" ]
no_dev:
description:
- Disables installation of require-dev packages (see --no-dev).
required: false
default: true
choices: [ true, false]
aliases: [ "no-dev" ]
no_scripts:
description:
- Skips the execution of all scripts defined in composer.json (see --no-scripts).
required: false
default: false
choices: [ true, false]
aliases: [ "no-scripts" ]
no_plugins:
description:
- Disables all plugins ( see --no-plugins ).
required: false
default: false
choices: [ true, false]
aliases: [ "no-plugins" ]
optimize_autoloader:
description:
- Optimize autoloader during autoloader dump (see --optimize-autoloader).
- Convert PSR-0/4 autoloading to classmap to get a faster autoloader.
- Recommended especially for production, but can take a bit of time to run.
required: false
default: true
choices: [ true, false]
aliases: [ "optimize-autoloader" ]
ignore_platform_reqs:
version_added: "2.0"
description:
- Ignore php, hhvm, lib-* and ext-* requirements and force the installation even if the local machine does not fulfill these.
required: false
default: false
choices: [ true, false]
aliases: [ "ignore-platform-reqs" ]
requirements:
- php
- composer installed in bin path (recommended /usr/local/bin)
notes:
- Default options that are always appended in each execution are --no-ansi, --no-interaction and --no-progress if available.
- We received reports about issues on macOS if composer was installed by Homebrew. Please use the official install method to avoid issues.
'''
EXAMPLES = '''
# Downloads and installs all the libs and dependencies outlined in the /path/to/project/composer.lock
- composer:
command: install
working_dir: /path/to/project
- composer:
command: require
arguments: my/package
working_dir: /path/to/project
# Clone project and install with all dependencies
- composer:
command: create-project
arguments: package/package /path/to/project ~1.0
working_dir: /path/to/project
prefer_dist: yes
# Installs package globally
- composer:
command: require
global_command: yes
arguments: my/package
'''
import re
from ansible.module_utils.basic import AnsibleModule
def parse_out(string):
return re.sub("\s+", " ", string).strip()
def has_changed(string):
return "Nothing to install or update" not in string
def get_available_options(module, command='install'):
# get all available options from a composer command using composer help to json
rc, out, err = composer_command(module, "help %s --format=json" % command)
if rc != 0:
output = parse_out(err)
module.fail_json(msg=output)
command_help_json = module.from_json(out)
return command_help_json['definition']['options']
def composer_command(module, command, arguments="", options=None, global_command=False):
if options is None:
options = []
if module.params['executable'] is None:
php_path = module.get_bin_path("php", True, ["/usr/local/bin"])
else:
php_path = module.params['executable']
composer_path = module.get_bin_path("composer", True, ["/usr/local/bin"])
cmd = "%s %s %s %s %s %s" % (php_path, composer_path, "global" if global_command else "", command, " ".join(options), arguments)
return module.run_command(cmd)
def main():
module = AnsibleModule(
argument_spec=dict(
command=dict(default="install", type="str", required=False),
arguments=dict(default="", type="str", required=False),
executable=dict(type="path", required=False, aliases=["php_path"]),
working_dir=dict(type="path", aliases=["working-dir"]),
global_command=dict(default=False, type="bool", aliases=["global-command"]),
prefer_source=dict(default=False, type="bool", aliases=["prefer-source"]),
prefer_dist=dict(default=False, type="bool", aliases=["prefer-dist"]),
no_dev=dict(default=True, type="bool", aliases=["no-dev"]),
no_scripts=dict(default=False, type="bool", aliases=["no-scripts"]),
no_plugins=dict(default=False, type="bool", aliases=["no-plugins"]),
optimize_autoloader=dict(default=True, type="bool", aliases=["optimize-autoloader"]),
ignore_platform_reqs=dict(default=False, type="bool", aliases=["ignore-platform-reqs"]),
),
required_if=[('global_command', False, ['working_dir'])],
supports_check_mode=True
)
# Get composer command with fallback to default
command = module.params['command']
if re.search(r"\s", command):
module.fail_json(msg="Use the 'arguments' param for passing arguments with the 'command'")
arguments = module.params['arguments']
global_command = module.params['global_command']
available_options = get_available_options(module=module, command=command)
options = []
# Default options
default_options = [
'no-ansi',
'no-interaction',
'no-progress',
]
for option in default_options:
if option in available_options:
option = "--%s" % option
options.append(option)
if not global_command:
options.extend(['--working-dir', "'%s'" % module.params['working_dir']])
option_params = {
'prefer_source': 'prefer-source',
'prefer_dist': 'prefer-dist',
'no_dev': 'no-dev',
'no_scripts': 'no-scripts',
'no_plugins': 'no_plugins',
'optimize_autoloader': 'optimize-autoloader',
'ignore_platform_reqs': 'ignore-platform-reqs',
}
for param, option in option_params.items():
if module.params.get(param) and option in available_options:
option = "--%s" % option
options.append(option)
if module.check_mode:
options.append('--dry-run')
rc, out, err = composer_command(module, command, arguments, options, global_command)
if rc != 0:
output = parse_out(err)
module.fail_json(msg=output, stdout=err)
else:
# Composer version > 1.0.0-alpha9 now use stderr for standard notification messages
output = parse_out(out + err)
module.exit_json(changed=has_changed(output), msg=output, stdout=out + err)
if __name__ == '__main__':
main()
| gpl-3.0 | 6,943,388,274,151,161,000 | -5,975,323,522,065,969,000 | 33.174242 | 142 | 0.619486 | false |
vmora/QGIS | python/plugins/processing/algs/gdal/rearrange_bands.py | 5 | 5727 | # -*- coding: utf-8 -*-
"""
***************************************************************************
rearrange_bands.py
---------------------
Date : August 2018
Copyright : (C) 2018 by Mathieu Pellerin
Email : nirvn dot asia at gmail dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************
"""
__author__ = 'Mathieu Pellerin'
__date__ = 'August 2018'
__copyright__ = '(C) 2018, Mathieu Pellerin'
# This will get replaced with a git SHA1 when you do a git archive
__revision__ = '$Format:%H$'
import os
import re
from qgis.PyQt.QtGui import QIcon
from qgis.core import (QgsRasterFileWriter,
QgsProcessingException,
QgsProcessingParameterEnum,
QgsProcessingParameterDefinition,
QgsProcessingParameterRasterLayer,
QgsProcessingParameterBand,
QgsProcessingParameterString,
QgsProcessingParameterRasterDestination)
from processing.algs.gdal.GdalAlgorithm import GdalAlgorithm
from processing.algs.gdal.GdalUtils import GdalUtils
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
class rearrange_bands(GdalAlgorithm):
INPUT = 'INPUT'
BANDS = 'BANDS'
OPTIONS = 'OPTIONS'
DATA_TYPE = 'DATA_TYPE'
OUTPUT = 'OUTPUT'
TYPES = ['Use input layer data type', 'Byte', 'Int16', 'UInt16', 'UInt32', 'Int32', 'Float32', 'Float64', 'CInt16', 'CInt32', 'CFloat32', 'CFloat64']
def __init__(self):
super().__init__()
def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterRasterLayer(self.INPUT, self.tr('Input layer')))
self.addParameter(QgsProcessingParameterBand(self.BANDS,
self.tr('Selected band(s)'),
None,
self.INPUT,
allowMultiple=True))
options_param = QgsProcessingParameterString(self.OPTIONS,
self.tr('Additional creation options'),
defaultValue='',
optional=True)
options_param.setFlags(options_param.flags() | QgsProcessingParameterDefinition.FlagAdvanced)
options_param.setMetadata({
'widget_wrapper': {
'class': 'processing.algs.gdal.ui.RasterOptionsWidget.RasterOptionsWidgetWrapper'}})
self.addParameter(options_param)
dataType_param = QgsProcessingParameterEnum(self.DATA_TYPE,
self.tr('Output data type'),
self.TYPES,
allowMultiple=False,
defaultValue=0)
dataType_param.setFlags(dataType_param.flags() | QgsProcessingParameterDefinition.FlagAdvanced)
self.addParameter(dataType_param)
self.addParameter(QgsProcessingParameterRasterDestination(self.OUTPUT,
self.tr('Converted')))
def name(self):
return 'rearrange_bands'
def displayName(self):
return self.tr('Rearrange bands')
def group(self):
return self.tr('Raster conversion')
def groupId(self):
return 'rasterconversion'
def icon(self):
return QIcon(os.path.join(pluginPath, 'images', 'gdaltools', 'translate.png'))
def shortHelpString(self):
return self.tr("This algorithm creates a new raster using selected band(s) from a given raster layer.\n\n"
"The algorithm also makes it possible to reorder the bands for the newly-created raster.")
def commandName(self):
return 'gdal_translate'
def getConsoleCommands(self, parameters, context, feedback, executing=True):
inLayer = self.parameterAsRasterLayer(parameters, self.INPUT, context)
if inLayer is None:
raise QgsProcessingException(self.invalidRasterError(parameters, self.INPUT))
out = self.parameterAsOutputLayer(parameters, self.OUTPUT, context)
arguments = []
bands = self.parameterAsInts(parameters, self.BANDS, context)
for band in bands:
arguments.append('-b {}'.format(band))
data_type = self.parameterAsEnum(parameters, self.DATA_TYPE, context)
if data_type:
arguments.append('-ot ' + self.TYPES[data_type])
arguments.append('-of')
arguments.append(QgsRasterFileWriter.driverForExtension(os.path.splitext(out)[1]))
options = self.parameterAsString(parameters, self.OPTIONS, context)
if options:
arguments.extend(GdalUtils.parseCreationOptions(options))
arguments.append(inLayer.source())
arguments.append(out)
return [self.commandName(), GdalUtils.escapeAndJoin(arguments)]
| gpl-2.0 | -4,240,951,323,438,373,000 | 5,857,177,719,877,313,000 | 40.5 | 153 | 0.539899 | false |
frohoff/Empire | lib/modules/powershell/exploitation/exploit_jenkins.py | 2 | 3352 | import base64
from lib.common import helpers
class Module:
def __init__(self, mainMenu, params=[]):
self.info = {
'Name': 'Exploit-Jenkins',
'Author': ['@luxcupitor'],
'Description': ("Run command on unauthenticated Jenkins Script consoles."),
'Background' : True,
'OutputExtension' : None,
'NeedsAdmin' : False,
'OpsecSafe' : False,
'Language' : 'powershell',
'MinLanguageVersion' : '2',
'Comments': [
'Pass a command to run. If windows, you may have to prepend "cmd /c ".'
]
}
# any options needed by the module, settable during runtime
self.options = {
# format:
# value_name : {description, required, default_value}
'Agent' : {
'Description' : 'Agent to run module on.',
'Required' : True,
'Value' : ''
},
'Rhost' : {
'Description' : 'Specify the host to exploit.',
'Required' : True,
'Value' : ''
},
'Port' : {
'Description' : 'Specify the port to use.',
'Required' : True,
'Value' : '8080'
},
'Cmd' : {
'Description' : 'command to run on remote jenkins script console.',
'Required' : True,
'Value' : 'whoami'
}
}
# save off a copy of the mainMenu object to access external functionality
# like listeners/agent handlers/etc.
self.mainMenu = mainMenu
for param in params:
# parameter format is [Name, Value]
option, value = param
if option in self.options:
self.options[option]['Value'] = value
def generate(self, obfuscate=False, obfuscationCommand=""):
# read in the common module source code
moduleSource = self.mainMenu.installPath + "/data/module_source/exploitation/Exploit-Jenkins.ps1"
if obfuscate:
helpers.obfuscate_module(moduleSource=moduleSource, obfuscationCommand=obfuscationCommand)
moduleSource = moduleSource.replace("module_source", "obfuscated_module_source")
try:
f = open(moduleSource, 'r')
except:
print helpers.color("[!] Could not read module source path at: " + str(moduleSource))
return ""
moduleCode = f.read()
f.close()
script = moduleCode
scriptEnd = "\nExploit-Jenkins"
scriptEnd += " -Rhost "+str(self.options['Rhost']['Value'])
scriptEnd += " -Port "+str(self.options['Port']['Value'])
command = str(self.options['Cmd']['Value'])
# if the command contains spaces, wrap it in quotes before passing to ps script
if " " in command:
scriptEnd += " -Cmd \"" + command + "\""
else:
scriptEnd += " -Cmd " + command
if obfuscate:
scriptEnd = helpers.obfuscate(psScript=scriptEnd, obfuscationCommand=obfuscationCommand)
script += scriptEnd
return script
| bsd-3-clause | 6,848,076,421,115,795,000 | 7,211,760,129,751,060,000 | 32.52 | 105 | 0.506265 | false |
schimar/ngs_tools | remove_collapsed_clusters.py | 2 | 1110 | #! /usr/bin/python
#
# This script reads a fasta file (the last vsearch run with --id 0.8 # to test for whether clusters collapse at a lower id) and removes
# all entries that have(the 2nd) seqs > 1.
#
# Usage: ./remove_collapsed_clusters.py <input-file_name.fasta> <new_file_name.fasta>
import sys
import re
#import shutil
#import tempfile
newfile = open(sys.argv[2], 'a')
n_clusters = int()
with open(sys.argv[1], 'rb') as file:
for i, line in enumerate(file):
if line[0] == ">":
cluster = re.findall(';;seqs=[0-9]+', line)[0]
seq_n = int(re.findall('[0-9]+', cluster)[0])
# newline = str(cluster + ',' + seq_n + '\n')
#newfile.write(newline)
if seq_n != 1:
continue
else:
n_clusters += 1
newfile.write(line)
else:
if seq_n == 1:
newfile.write(line)
else:
continue
print n_clusters, "uncollapsed clusters found"
file.close()
newfile.close()
| gpl-2.0 | 8,703,477,418,581,693,000 | -2,369,169,812,381,033,500 | 29 | 135 | 0.516216 | false |
kajgan/stbgui | lib/python/Components/Converter/ClientsStreaming.py | 1 | 3432 | from Converter import Converter
from Poll import Poll
from Components.Element import cached
from Components.Sources.StreamService import StreamServiceList
from enigma import eStreamServer
from ServiceReference import ServiceReference
import socket
class ClientsStreaming(Converter, Poll, object):
UNKNOWN = -1
REF = 0
IP = 1
NAME = 2
ENCODER = 3
NUMBER = 4
SHORT_ALL = 5
ALL = 6
INFO = 7
INFO_RESOLVE = 8
INFO_RESOLVE_SHORT = 9
EXTRA_INFO = 10
def __init__(self, type):
Converter.__init__(self, type)
Poll.__init__(self)
self.poll_interval = 30000
self.poll_enabled = True
if type == "REF":
self.type = self.REF
elif type == "IP":
self.type = self.IP
elif type == "NAME":
self.type = self.NAME
elif type == "ENCODER":
self.type = self.ENCODER
elif type == "NUMBER":
self.type = self.NUMBER
elif type == "SHORT_ALL":
self.type = self.SHORT_ALL
elif type == "ALL":
self.type = self.ALL
elif type == "INFO":
self.type = self.INFO
elif type == "INFO_RESOLVE":
self.type = self.INFO_RESOLVE
elif type == "INFO_RESOLVE_SHORT":
self.type = self.INFO_RESOLVE_SHORT
elif type == "EXTRA_INFO":
self.type = self.EXTRA_INFO
else:
self.type = self.UNKNOWN
self.streamServer = eStreamServer.getInstance()
@cached
def getText(self):
if self.streamServer is None:
return ""
clients = []
refs = []
ips = []
names = []
encoders = []
extrainfo = _("ClientIP") + "\t" + _("Transcode") + "\t" + _("Channel") + "\n"
info = ""
for x in self.streamServer.getConnectedClients():
refs.append((x[1]))
servicename = ServiceReference(x[1]).getServiceName() or "(unknown service)"
service_name = servicename
names.append((service_name))
ip = x[0]
ips.append((ip))
if int(x[2]) == 0:
strtype = "S"
encoder = _('NO')
else:
strtype = "T"
encoder = _('YES')
encoders.append((encoder))
if self.type == self.INFO_RESOLVE or self.type == self.INFO_RESOLVE_SHORT:
try:
raw = socket.gethostbyaddr(ip)
ip = raw[0]
except:
pass
if self.type == self.INFO_RESOLVE_SHORT:
ip, sep, tail = ip.partition('.')
info += ("%s %-8s %s\n") % (strtype, ip, service_name)
clients.append((ip, service_name, encoder))
extrainfo += ("%-8s\t%s\t%s") % (ip, encoder, service_name) +"\n"
if self.type == self.REF:
return ' '.join(refs)
elif self.type == self.IP:
return ' '.join(ips)
elif self.type == self.NAME:
return ' '.join(names)
elif self.type == self.ENCODER:
return _("Transcoding: ") + ' '.join(encoders)
elif self.type == self.NUMBER:
return str(len(clients))
elif self.type == self.EXTRA_INFO:
return extrainfo
elif self.type == self.SHORT_ALL:
return _("Total clients streaming: %d (%s)") % (len(clients), ' '.join(names))
elif self.type == self.ALL:
return '\n'.join(' '.join(elems) for elems in clients)
elif self.type == self.INFO or self.type == self.INFO_RESOLVE or self.type == self.INFO_RESOLVE_SHORT:
return info
else:
return "(unknown)"
return ""
text = property(getText)
@cached
def getBoolean(self):
if self.streamServer is None:
return False
return (self.streamServer.getConnectedClients() or StreamServiceList) and True or False
boolean = property(getBoolean)
def changed(self, what):
Converter.changed(self, (self.CHANGED_POLL,))
def doSuspend(self, suspended):
pass | gpl-2.0 | -8,307,405,761,469,166,000 | 8,380,063,537,645,595 | 23.347518 | 104 | 0.638986 | false |
viaict/viaduct | app/forms/pimpy.py | 1 | 1268 | import datetime
from flask_babel import _
from flask_login import current_user
from flask_wtf import FlaskForm
from wtforms import StringField, TextAreaField, DateTimeField, SelectField
from wtforms.ext.sqlalchemy.fields import QuerySelectField
from wtforms.validators import InputRequired, Optional
from app import constants
from app.service import group_service, pimpy_service
class AddTaskForm(FlaskForm):
name = StringField(_('Name'), validators=[InputRequired()])
content = TextAreaField(_('Content'), validators=[Optional()])
group = QuerySelectField(
_('Group'),
query_factory=lambda: group_service.get_groups_for_user(current_user),
get_label=lambda x: x.name)
users = StringField(_('Users'))
status = SelectField(_('Status'), coerce=int,
choices=pimpy_service.get_task_status_choices())
class AddMinuteForm(FlaskForm):
content = TextAreaField(_('Minute content'), validators=[InputRequired()])
group = QuerySelectField(
_('Group'),
query_factory=lambda: group_service.get_groups_for_user(current_user),
get_label=lambda x: x.name)
date = DateTimeField(_('Date'), format=constants.DATE_FORMAT,
default=datetime.date.today)
| mit | -5,933,152,833,849,623,000 | 3,564,372,230,928,478,000 | 36.294118 | 78 | 0.698738 | false |
Cito/DBUtils | tests/mock_db.py | 1 | 3341 | """This module serves as a mock object for the DB-API 2 module"""
threadsafety = 2
class Error(Exception):
pass
class DatabaseError(Error):
pass
class OperationalError(DatabaseError):
pass
class InternalError(DatabaseError):
pass
class ProgrammingError(DatabaseError):
pass
def connect(database=None, user=None):
return Connection(database, user)
class Connection:
has_ping = False
num_pings = 0
def __init__(self, database=None, user=None):
self.database = database
self.user = user
self.valid = False
if database == 'error':
raise OperationalError
self.open_cursors = 0
self.num_uses = 0
self.num_queries = 0
self.num_pings = 0
self.session = []
self.valid = True
def close(self):
if not self.valid:
raise InternalError
self.open_cursors = 0
self.num_uses = 0
self.num_queries = 0
self.session = []
self.valid = False
def commit(self):
if not self.valid:
raise InternalError
self.session.append('commit')
def rollback(self):
if not self.valid:
raise InternalError
self.session.append('rollback')
def ping(self):
cls = self.__class__
cls.num_pings += 1
if not cls.has_ping:
raise AttributeError
if not self.valid:
raise OperationalError
def cursor(self, name=None):
if not self.valid:
raise InternalError
return Cursor(self, name)
class Cursor:
def __init__(self, con, name=None):
self.con = con
self.valid = False
if name == 'error':
raise OperationalError
self.result = None
self.inputsizes = []
self.outputsizes = {}
con.open_cursors += 1
self.valid = True
def close(self):
if not self.valid:
raise InternalError
self.con.open_cursors -= 1
self.valid = False
def execute(self, operation):
if not self.valid or not self.con.valid:
raise InternalError
self.con.num_uses += 1
if operation.startswith('select '):
self.con.num_queries += 1
self.result = operation[7:]
elif operation.startswith('set '):
self.con.session.append(operation[4:])
self.result = None
elif operation == 'get sizes':
self.result = (self.inputsizes, self.outputsizes)
self.inputsizes = []
self.outputsizes = {}
else:
raise ProgrammingError
def fetchone(self):
if not self.valid:
raise InternalError
result = self.result
self.result = None
return result
def callproc(self, procname):
if not self.valid or not self.con.valid or not procname:
raise InternalError
self.con.num_uses += 1
def setinputsizes(self, sizes):
if not self.valid:
raise InternalError
self.inputsizes = sizes
def setoutputsize(self, size, column=None):
if not self.valid:
raise InternalError
self.outputsizes[column] = size
def __del__(self):
if self.valid:
self.close()
| mit | -6,081,852,044,311,527,000 | -2,875,524,616,978,107,400 | 22.695035 | 65 | 0.567495 | false |
amaret/wind.util | windutil/main.py | 1 | 5085 | # Copyright Amaret, Inc 2011-2015. All rights reserved.
''' Wind Docker Container Util '''
import os
import time
import json
from subprocess import call
from windutil.argparser import parse
from windutil.scrlogger import ScrLogger
LOG = ScrLogger()
DEFAULT_CONTAINER_CONFIG = [
{
'name': 'redis',
'priority': 0,
'run': 'docker run --name redis -p 6379:6379 -d redis',
'image': 'redis'
}
]
CONFIG_FILE_PATH = os.path.expanduser('~') + '/.wutilrc'
def _read_config():
''' look up config, if not found init '''
rcfile = os.path.expanduser('~') + '/.wutilrc'
if not os.path.exists(rcfile):
wutilrc = open(CONFIG_FILE_PATH, 'w')
LOG.debug("writing config to %s" % CONFIG_FILE_PATH)
wutilrc.write(
json.dumps(
DEFAULT_CONTAINER_CONFIG,
sort_keys=True,
indent=4,
separators=(',', ': ')))
wutilrc.close()
return DEFAULT_CONTAINER_CONFIG
LOG.debug("reading config from %s" % CONFIG_FILE_PATH)
wutilrc = open(CONFIG_FILE_PATH, 'r')
json_str = wutilrc.read()
wutilrc.close()
return json.loads(json_str)
def _load_config():
'''store by name for key'''
info = {}
for cntr in CONTAINER_CONFIG:
info[cntr['name']] = cntr
return info
CONTAINER_CONFIG = _read_config()
CONTAINER_INFO = _load_config()
def _rm(pargs):
'''rm'''
if pargs.use_all:
_container_command('rm', _sorted_config_names())
else:
_container_command('rm', pargs.containers)
def _start(pargs):
'''start'''
if pargs.use_all:
_container_command('start', _sorted_config_names())
else:
_container_command('start', pargs.containers)
def _stop(pargs):
'''stop'''
if pargs.use_all:
_container_command('stop', _reversed_config_names())
else:
_container_command('stop', pargs.containers)
def _container_command(command, names):
'''command'''
LOG.debug(command + "(ing) ")
for container in names:
LOG.debug(command + " " + container)
call(["docker", command, container])
if 'delay' in CONTAINER_INFO[container]:
secs = CONTAINER_INFO[container]['delay']
LOG.debug("sleeping %s seconds" % (secs))
time.sleep(secs)
def _run(pargs):
'''run'''
LOG.debug("run(ing)")
names = []
if pargs.use_all:
names = _sorted_config_names()
else:
names = pargs.containers
for container in names:
LOG.debug("run " + container)
arglist = CONTAINER_INFO[container]['run'].split()
call(arglist)
if 'delay' in CONTAINER_INFO[container]:
secs = CONTAINER_INFO[container]['delay']
LOG.debug("sleeping %s seconds" % (secs))
time.sleep(secs)
def _pull(pargs):
'''run'''
LOG.debug("pull(ing)")
names = []
if pargs.use_all:
names = _sorted_config_names()
else:
names = pargs.containers
for container in names:
LOG.debug("pull " + container)
img = CONTAINER_INFO[container]['image']
call(['docker', 'pull', img])
def _upgrade(pargs):
'''upgrade'''
if pargs.local is False:
_pull(pargs)
_stop(pargs)
_rm(pargs)
_run(pargs)
def _ps(pargs):
'''ps'''
option = '-a'
from subprocess import Popen, PIPE
process = Popen(["docker", "ps", option], stdout=PIPE)
(output, _) = process.communicate()
process.wait()
import string
lines = string.split(output, '\n')
status_idx = lines[0].index('STATUS')
print lines[0][status_idx:]
keys = CONTAINER_INFO.keys()
for line in lines[1:]:
if len(line) > 0:
cname = line[status_idx:].split()[-1]
if pargs.all or cname in keys:
print line[status_idx:]
def _reversed_config_names():
'''reverse list'''
return [x for x in reversed(_sorted_config_names())]
def _sorted_config_names():
'''manage dependencies'''
newlist = sorted(CONTAINER_INFO.values(), key=lambda x: x['priority'],
reverse=False)
return [x['name'] for x in newlist]
def main():
'''main entry point'''
# pylint: disable=too-many-branches
try:
cmd, pargs = parse()
pargs.use_all = 'containers' in pargs and pargs.containers[0] == 'all'
if cmd is 'init':
print "Initialized"
return
if cmd is 'ps':
_ps(pargs)
return
if cmd is 'start':
_start(pargs)
if cmd is 'login':
print "login command"
if cmd is 'pull':
_pull(pargs)
if cmd is 'rm':
_rm(pargs)
if cmd is 'run':
_run(pargs)
if cmd is 'stop':
_stop(pargs)
if cmd is 'upgrade':
_upgrade(pargs)
# pylint: disable=broad-except
except Exception, ex:
LOG.error(ex)
import traceback
trace = traceback.format_exc()
LOG.trace(trace)
| gpl-2.0 | -2,107,104,127,268,324,000 | -4,539,523,239,230,048,000 | 24.681818 | 78 | 0.559685 | false |
miconof/headphones | headphones/notifiers.py | 1 | 28911 | # This file is part of Headphones.
#
# Headphones 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.
#
# Headphones is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Headphones. If not, see <http://www.gnu.org/licenses/>.
from headphones import logger, helpers, common, request
from xml.dom import minidom
from httplib import HTTPSConnection
from urlparse import parse_qsl
from urllib import urlencode
from pynma import pynma
import base64
import cherrypy
import urllib
import urllib2
import headphones
import os.path
import subprocess
import gntp.notifier
import json
import oauth2 as oauth
import pythontwitter as twitter
from email.mime.text import MIMEText
import smtplib
import email.utils
class GROWL(object):
"""
Growl notifications, for OS X.
"""
def __init__(self):
self.enabled = headphones.CONFIG.GROWL_ENABLED
self.host = headphones.CONFIG.GROWL_HOST
self.password = headphones.CONFIG.GROWL_PASSWORD
def conf(self, options):
return cherrypy.config['config'].get('Growl', options)
def notify(self, message, event):
if not self.enabled:
return
# Split host and port
if self.host == "":
host, port = "localhost", 23053
if ":" in self.host:
host, port = self.host.split(':', 1)
port = int(port)
else:
host, port = self.host, 23053
# If password is empty, assume none
if self.password == "":
password = None
else:
password = self.password
# Register notification
growl = gntp.notifier.GrowlNotifier(
applicationName='Headphones',
notifications=['New Event'],
defaultNotifications=['New Event'],
hostname=host,
port=port,
password=password
)
try:
growl.register()
except gntp.notifier.errors.NetworkError:
logger.warning(u'Growl notification failed: network error')
return
except gntp.notifier.errors.AuthError:
logger.warning(u'Growl notification failed: authentication error')
return
# Fix message
message = message.encode(headphones.SYS_ENCODING, "replace")
# Send it, including an image
image_file = os.path.join(str(headphones.PROG_DIR),
"data/images/headphoneslogo.png")
with open(image_file, 'rb') as f:
image = f.read()
try:
growl.notify(
noteType='New Event',
title=event,
description=message,
icon=image
)
except gntp.notifier.errors.NetworkError:
logger.warning(u'Growl notification failed: network error')
return
logger.info(u"Growl notifications sent.")
def updateLibrary(self):
#For uniformity reasons not removed
return
def test(self, host, password):
self.enabled = True
self.host = host
self.password = password
self.notify('ZOMG Lazors Pewpewpew!', 'Test Message')
class PROWL(object):
"""
Prowl notifications.
"""
def __init__(self):
self.enabled = headphones.CONFIG.PROWL_ENABLED
self.keys = headphones.CONFIG.PROWL_KEYS
self.priority = headphones.CONFIG.PROWL_PRIORITY
def conf(self, options):
return cherrypy.config['config'].get('Prowl', options)
def notify(self, message, event):
if not headphones.CONFIG.PROWL_ENABLED:
return
http_handler = HTTPSConnection("api.prowlapp.com")
data = {'apikey': headphones.CONFIG.PROWL_KEYS,
'application': 'Headphones',
'event': event,
'description': message.encode("utf-8"),
'priority': headphones.CONFIG.PROWL_PRIORITY}
http_handler.request("POST",
"/publicapi/add",
headers={'Content-type': "application/x-www-form-urlencoded"},
body=urlencode(data))
response = http_handler.getresponse()
request_status = response.status
if request_status == 200:
logger.info(u"Prowl notifications sent.")
return True
elif request_status == 401:
logger.info(u"Prowl auth failed: %s" % response.reason)
return False
else:
logger.info(u"Prowl notification failed.")
return False
def updateLibrary(self):
#For uniformity reasons not removed
return
def test(self, keys, priority):
self.enabled = True
self.keys = keys
self.priority = priority
self.notify('ZOMG Lazors Pewpewpew!', 'Test Message')
class MPC(object):
"""
MPC library update
"""
def __init__(self):
pass
def notify(self):
subprocess.call(["mpc", "update"])
class XBMC(object):
"""
XBMC notifications
"""
def __init__(self):
self.hosts = headphones.CONFIG.XBMC_HOST
self.username = headphones.CONFIG.XBMC_USERNAME
self.password = headphones.CONFIG.XBMC_PASSWORD
def _sendhttp(self, host, command):
url_command = urllib.urlencode(command)
url = host + '/xbmcCmds/xbmcHttp/?' + url_command
if self.password:
return request.request_content(url, auth=(self.username, self.password))
else:
return request.request_content(url)
def _sendjson(self, host, method, params={}):
data = [{'id': 0, 'jsonrpc': '2.0', 'method': method, 'params': params}]
headers = {'Content-Type': 'application/json'}
url = host + '/jsonrpc'
if self.password:
response = request.request_json(url, method="post", data=json.dumps(data), headers=headers, auth=(self.username, self.password))
else:
response = request.request_json(url, method="post", data=json.dumps(data), headers=headers)
if response:
return response[0]['result']
def update(self):
# From what I read you can't update the music library on a per directory or per path basis
# so need to update the whole thing
hosts = [x.strip() for x in self.hosts.split(',')]
for host in hosts:
logger.info('Sending library update command to XBMC @ ' + host)
request = self._sendjson(host, 'AudioLibrary.Scan')
if not request:
logger.warn('Error sending update request to XBMC')
def notify(self, artist, album, albumartpath):
hosts = [x.strip() for x in self.hosts.split(',')]
header = "Headphones"
message = "%s - %s added to your library" % (artist, album)
time = "3000" # in ms
for host in hosts:
logger.info('Sending notification command to XMBC @ ' + host)
try:
version = self._sendjson(host, 'Application.GetProperties', {'properties': ['version']})['version']['major']
if version < 12: #Eden
notification = header + "," + message + "," + time + "," + albumartpath
notifycommand = {'command': 'ExecBuiltIn', 'parameter': 'Notification(' + notification + ')'}
request = self._sendhttp(host, notifycommand)
else: #Frodo
params = {'title': header, 'message': message, 'displaytime': int(time), 'image': albumartpath}
request = self._sendjson(host, 'GUI.ShowNotification', params)
if not request:
raise Exception
except Exception:
logger.error('Error sending notification request to XBMC')
class LMS(object):
"""
Class for updating a Logitech Media Server
"""
def __init__(self):
self.hosts = headphones.CONFIG.LMS_HOST
def _sendjson(self, host):
data = {'id': 1, 'method': 'slim.request', 'params': ["", ["rescan"]]}
data = json.JSONEncoder().encode(data)
content = {'Content-Type': 'application/json'}
req = urllib2.Request(host + '/jsonrpc.js', data, content)
try:
handle = urllib2.urlopen(req)
except Exception as e:
logger.warn('Error opening LMS url: %s' % e)
return
response = json.JSONDecoder().decode(handle.read())
try:
return response['result']
except:
logger.warn('LMS returned error: %s' % response['error'])
return response['error']
def update(self):
hosts = [x.strip() for x in self.hosts.split(',')]
for host in hosts:
logger.info('Sending library rescan command to LMS @ ' + host)
request = self._sendjson(host)
if request:
logger.warn('Error sending rescan request to LMS')
class Plex(object):
def __init__(self):
self.server_hosts = headphones.CONFIG.PLEX_SERVER_HOST
self.client_hosts = headphones.CONFIG.PLEX_CLIENT_HOST
self.username = headphones.CONFIG.PLEX_USERNAME
self.password = headphones.CONFIG.PLEX_PASSWORD
self.token = headphones.CONFIG.PLEX_TOKEN
def _sendhttp(self, host, command):
url = host + '/xbmcCmds/xbmcHttp/?' + command
if self.password:
response = request.request_response(url, auth=(self.username, self.password))
else:
response = request.request_response(url)
return response
def _sendjson(self, host, method, params={}):
data = [{'id': 0, 'jsonrpc': '2.0', 'method': method, 'params': params}]
headers = {'Content-Type': 'application/json'}
url = host + '/jsonrpc'
if self.password:
response = request.request_json(url, method="post", data=json.dumps(data), headers=headers, auth=(self.username, self.password))
else:
response = request.request_json(url, method="post", data=json.dumps(data), headers=headers)
if response:
return response[0]['result']
def update(self):
# From what I read you can't update the music library on a per directory or per path basis
# so need to update the whole thing
hosts = [x.strip() for x in self.server_hosts.split(',')]
for host in hosts:
logger.info('Sending library update command to Plex Media Server@ ' + host)
url = "%s/library/sections" % host
if self.token:
params = {'X-Plex-Token': self.token}
else:
params = False
r = request.request_minidom(url, params=params)
sections = r.getElementsByTagName('Directory')
if not sections:
logger.info(u"Plex Media Server not running on: " + host)
return False
for s in sections:
if s.getAttribute('type') == "artist":
url = "%s/library/sections/%s/refresh" % (host, s.getAttribute('key'))
request.request_response(url, params=params)
def notify(self, artist, album, albumartpath):
hosts = [x.strip() for x in self.client_hosts.split(',')]
header = "Headphones"
message = "%s - %s added to your library" % (artist, album)
time = "3000" # in ms
for host in hosts:
logger.info('Sending notification command to Plex client @ ' + host)
try:
version = self._sendjson(host, 'Application.GetProperties', {'properties': ['version']})['version']['major']
if version < 12: #Eden
notification = header + "," + message + "," + time + "," + albumartpath
notifycommand = {'command': 'ExecBuiltIn', 'parameter': 'Notification(' + notification + ')'}
request = self._sendhttp(host, notifycommand)
else: #Frodo
params = {'title': header, 'message': message, 'displaytime': int(time), 'image': albumartpath}
request = self._sendjson(host, 'GUI.ShowNotification', params)
if not request:
raise Exception
except Exception:
logger.error('Error sending notification request to Plex client @ ' + host)
class NMA(object):
def notify(self, artist=None, album=None, snatched=None):
title = 'Headphones'
api = headphones.CONFIG.NMA_APIKEY
nma_priority = headphones.CONFIG.NMA_PRIORITY
logger.debug(u"NMA title: " + title)
logger.debug(u"NMA API: " + api)
logger.debug(u"NMA Priority: " + str(nma_priority))
if snatched:
event = snatched + " snatched!"
message = "Headphones has snatched: " + snatched
else:
event = artist + ' - ' + album + ' complete!'
message = "Headphones has downloaded and postprocessed: " + artist + ' [' + album + ']'
logger.debug(u"NMA event: " + event)
logger.debug(u"NMA message: " + message)
batch = False
p = pynma.PyNMA()
keys = api.split(',')
p.addkey(keys)
if len(keys) > 1:
batch = True
response = p.push(title, event, message, priority=nma_priority, batch_mode=batch)
if not response[api][u'code'] == u'200':
logger.error(u'Could not send notification to NotifyMyAndroid')
return False
else:
return True
class PUSHBULLET(object):
def __init__(self):
self.apikey = headphones.CONFIG.PUSHBULLET_APIKEY
self.deviceid = headphones.CONFIG.PUSHBULLET_DEVICEID
def notify(self, message):
if not headphones.CONFIG.PUSHBULLET_ENABLED:
return
url = "https://api.pushbullet.com/v2/pushes"
data = {'type': "note",
'title': "Headphones",
'body': message}
if self.deviceid:
data['device_iden'] = self.deviceid
headers={'Content-type': "application/json",
'Authorization': 'Bearer ' + headphones.CONFIG.PUSHBULLET_APIKEY}
response = request.request_json(url, method="post", headers=headers, data=json.dumps(data))
if response:
logger.info(u"PushBullet notifications sent.")
return True
else:
logger.info(u"PushBullet notification failed.")
return False
class PUSHALOT(object):
def notify(self, message, event):
if not headphones.CONFIG.PUSHALOT_ENABLED:
return
pushalot_authorizationtoken = headphones.CONFIG.PUSHALOT_APIKEY
logger.debug(u"Pushalot event: " + event)
logger.debug(u"Pushalot message: " + message)
logger.debug(u"Pushalot api: " + pushalot_authorizationtoken)
http_handler = HTTPSConnection("pushalot.com")
data = {'AuthorizationToken': pushalot_authorizationtoken,
'Title': event.encode('utf-8'),
'Body': message.encode("utf-8")}
http_handler.request("POST",
"/api/sendmessage",
headers={'Content-type': "application/x-www-form-urlencoded"},
body=urlencode(data))
response = http_handler.getresponse()
request_status = response.status
logger.debug(u"Pushalot response status: %r" % request_status)
logger.debug(u"Pushalot response headers: %r" % response.getheaders())
logger.debug(u"Pushalot response body: %r" % response.read())
if request_status == 200:
logger.info(u"Pushalot notifications sent.")
return True
elif request_status == 410:
logger.info(u"Pushalot auth failed: %s" % response.reason)
return False
else:
logger.info(u"Pushalot notification failed.")
return False
class Synoindex(object):
def __init__(self, util_loc='/usr/syno/bin/synoindex'):
self.util_loc = util_loc
def util_exists(self):
return os.path.exists(self.util_loc)
def notify(self, path):
path = os.path.abspath(path)
if not self.util_exists():
logger.warn("Error sending notification: synoindex utility not found at %s" % self.util_loc)
return
if os.path.isfile(path):
cmd_arg = '-a'
elif os.path.isdir(path):
cmd_arg = '-A'
else:
logger.warn("Error sending notification: Path passed to synoindex was not a file or folder.")
return
cmd = [self.util_loc, cmd_arg, path]
logger.info("Calling synoindex command: %s" % str(cmd))
try:
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=headphones.PROG_DIR)
out, error = p.communicate()
#synoindex never returns any codes other than '0', highly irritating
except OSError, e:
logger.warn("Error sending notification: %s" % str(e))
def notify_multiple(self, path_list):
if isinstance(path_list, list):
for path in path_list:
self.notify(path)
class PUSHOVER(object):
def __init__(self):
self.enabled = headphones.CONFIG.PUSHOVER_ENABLED
self.keys = headphones.CONFIG.PUSHOVER_KEYS
self.priority = headphones.CONFIG.PUSHOVER_PRIORITY
if headphones.CONFIG.PUSHOVER_APITOKEN:
self.application_token = headphones.CONFIG.PUSHOVER_APITOKEN
else:
self.application_token = "LdPCoy0dqC21ktsbEyAVCcwvQiVlsz"
def conf(self, options):
return cherrypy.config['config'].get('Pushover', options)
def notify(self, message, event):
if not headphones.CONFIG.PUSHOVER_ENABLED:
return
url = "https://api.pushover.net/1/messages.json"
data = {'token': self.application_token,
'user': headphones.CONFIG.PUSHOVER_KEYS,
'title': event,
'message': message.encode("utf-8"),
'priority': headphones.CONFIG.PUSHOVER_PRIORITY}
headers = {'Content-type': "application/x-www-form-urlencoded"}
response = request.request_response(url, method="POST", headers=headers, data=data)
if response:
logger.info(u"Pushover notifications sent.")
return True
else:
logger.error(u"Pushover notification failed.")
return False
def updateLibrary(self):
#For uniformity reasons not removed
return
def test(self, keys, priority):
self.enabled = True
self.keys = keys
self.priority = priority
self.notify('Main Screen Activate', 'Test Message')
class TwitterNotifier(object):
REQUEST_TOKEN_URL = 'https://api.twitter.com/oauth/request_token'
ACCESS_TOKEN_URL = 'https://api.twitter.com/oauth/access_token'
AUTHORIZATION_URL = 'https://api.twitter.com/oauth/authorize'
SIGNIN_URL = 'https://api.twitter.com/oauth/authenticate'
def __init__(self):
self.consumer_key = "oYKnp2ddX5gbARjqX8ZAAg"
self.consumer_secret = "A4Xkw9i5SjHbTk7XT8zzOPqivhj9MmRDR9Qn95YA9sk"
def notify_snatch(self, title):
if headphones.CONFIG.TWITTER_ONSNATCH:
self._notifyTwitter(common.notifyStrings[common.NOTIFY_SNATCH] + ': ' + title + ' at ' + helpers.now())
def notify_download(self, title):
if headphones.CONFIG.TWITTER_ENABLED:
self._notifyTwitter(common.notifyStrings[common.NOTIFY_DOWNLOAD] + ': ' + title + ' at ' + helpers.now())
def test_notify(self):
return self._notifyTwitter("This is a test notification from Headphones at " + helpers.now(), force=True)
def _get_authorization(self):
oauth_consumer = oauth.Consumer(key=self.consumer_key, secret=self.consumer_secret)
oauth_client = oauth.Client(oauth_consumer)
logger.info('Requesting temp token from Twitter')
resp, content = oauth_client.request(self.REQUEST_TOKEN_URL, 'GET')
if resp['status'] != '200':
logger.info('Invalid respond from Twitter requesting temp token: %s' % resp['status'])
else:
request_token = dict(parse_qsl(content))
headphones.CONFIG.TWITTER_USERNAME = request_token['oauth_token']
headphones.CONFIG.TWITTER_PASSWORD = request_token['oauth_token_secret']
return self.AUTHORIZATION_URL + "?oauth_token=" + request_token['oauth_token']
def _get_credentials(self, key):
request_token = {}
request_token['oauth_token'] = headphones.CONFIG.TWITTER_USERNAME
request_token['oauth_token_secret'] = headphones.CONFIG.TWITTER_PASSWORD
request_token['oauth_callback_confirmed'] = 'true'
token = oauth.Token(request_token['oauth_token'], request_token['oauth_token_secret'])
token.set_verifier(key)
logger.info('Generating and signing request for an access token using key ' + key)
oauth_consumer = oauth.Consumer(key=self.consumer_key, secret=self.consumer_secret)
logger.info('oauth_consumer: ' + str(oauth_consumer))
oauth_client = oauth.Client(oauth_consumer, token)
logger.info('oauth_client: ' + str(oauth_client))
resp, content = oauth_client.request(self.ACCESS_TOKEN_URL, method='POST', body='oauth_verifier=%s' % key)
logger.info('resp, content: ' + str(resp) + ',' + str(content))
access_token = dict(parse_qsl(content))
logger.info('access_token: ' + str(access_token))
logger.info('resp[status] = ' + str(resp['status']))
if resp['status'] != '200':
logger.info('The request for a token with did not succeed: ' + str(resp['status']), logger.ERROR)
return False
else:
logger.info('Your Twitter Access Token key: %s' % access_token['oauth_token'])
logger.info('Access Token secret: %s' % access_token['oauth_token_secret'])
headphones.CONFIG.TWITTER_USERNAME = access_token['oauth_token']
headphones.CONFIG.TWITTER_PASSWORD = access_token['oauth_token_secret']
return True
def _send_tweet(self, message=None):
username = self.consumer_key
password = self.consumer_secret
access_token_key = headphones.CONFIG.TWITTER_USERNAME
access_token_secret = headphones.CONFIG.TWITTER_PASSWORD
logger.info(u"Sending tweet: " + message)
api = twitter.Api(username, password, access_token_key, access_token_secret)
try:
api.PostUpdate(message)
except Exception as e:
logger.info(u"Error Sending Tweet: %s" % e)
return False
return True
def _notifyTwitter(self, message='', force=False):
prefix = headphones.CONFIG.TWITTER_PREFIX
if not headphones.CONFIG.TWITTER_ENABLED and not force:
return False
return self._send_tweet(prefix + ": " + message)
class OSX_NOTIFY(object):
def __init__(self):
try:
self.objc = __import__("objc")
self.AppKit = __import__("AppKit")
except:
logger.warn('OS X Notification: Cannot import objc or AppKit')
return False
def swizzle(self, cls, SEL, func):
old_IMP = getattr(cls, SEL, None)
if old_IMP is None:
old_IMP = cls.instanceMethodForSelector_(SEL)
def wrapper(self, *args, **kwargs):
return func(self, old_IMP, *args, **kwargs)
new_IMP = self.objc.selector(
wrapper,
selector=old_IMP.selector,
signature=old_IMP.signature
)
self.objc.classAddMethod(cls, SEL.encode(), new_IMP)
def notify(self, title, subtitle=None, text=None, sound=True, image=None):
try:
self.swizzle(
self.objc.lookUpClass('NSBundle'),
'bundleIdentifier',
self.swizzled_bundleIdentifier
)
NSUserNotification = self.objc.lookUpClass('NSUserNotification')
NSUserNotificationCenter = self.objc.lookUpClass('NSUserNotificationCenter')
NSAutoreleasePool = self.objc.lookUpClass('NSAutoreleasePool')
if not NSUserNotification or not NSUserNotificationCenter:
return False
pool = NSAutoreleasePool.alloc().init()
notification = NSUserNotification.alloc().init()
notification.setTitle_(title)
if subtitle:
notification.setSubtitle_(subtitle)
if text:
notification.setInformativeText_(text)
if sound:
notification.setSoundName_("NSUserNotificationDefaultSoundName")
if image:
source_img = self.AppKit.NSImage.alloc().initByReferencingFile_(image)
notification.setContentImage_(source_img)
#notification.set_identityImage_(source_img)
notification.setHasActionButton_(False)
notification_center = NSUserNotificationCenter.defaultUserNotificationCenter()
notification_center.deliverNotification_(notification)
del pool
return True
except Exception as e:
logger.warn('Error sending OS X Notification: %s' % e)
return False
def swizzled_bundleIdentifier(self, original, swizzled):
return 'ade.headphones.osxnotify'
class BOXCAR(object):
def __init__(self):
self.url = 'https://new.boxcar.io/api/notifications'
def notify(self, title, message, rgid=None):
try:
if rgid:
message += '<br></br><a href="http://musicbrainz.org/release-group/%s">MusicBrainz</a>' % rgid
data = urllib.urlencode({
'user_credentials': headphones.CONFIG.BOXCAR_TOKEN,
'notification[title]': title.encode('utf-8'),
'notification[long_message]': message.encode('utf-8'),
'notification[sound]': "done"
})
req = urllib2.Request(self.url)
handle = urllib2.urlopen(req, data)
handle.close()
return True
except urllib2.URLError as e:
logger.warn('Error sending Boxcar2 Notification: %s' % e)
return False
class SubSonicNotifier(object):
def __init__(self):
self.host = headphones.CONFIG.SUBSONIC_HOST
self.username = headphones.CONFIG.SUBSONIC_USERNAME
self.password = headphones.CONFIG.SUBSONIC_PASSWORD
def notify(self, albumpaths):
# Correct URL
if not self.host.lower().startswith("http"):
self.host = "http://" + self.host
if not self.host.lower().endswith("/"):
self.host = self.host + "/"
# Invoke request
request.request_response(self.host + "musicFolderSettings.view?scanNow",
auth=(self.username, self.password))
class Email(object):
def notify(self, subject, message):
message = MIMEText(message, 'plain', "utf-8")
message['Subject'] = subject
message['From'] = email.utils.formataddr(('Headphones', headphones.CONFIG.EMAIL_FROM))
message['To'] = headphones.CONFIG.EMAIL_TO
try:
if (headphones.CONFIG.EMAIL_SSL):
mailserver = smtplib.SMTP_SSL(headphones.CONFIG.EMAIL_SMTP_SERVER, headphones.CONFIG.EMAIL_SMTP_PORT)
else:
mailserver = smtplib.SMTP(headphones.CONFIG.EMAIL_SMTP_SERVER, headphones.CONFIG.EMAIL_SMTP_PORT)
if (headphones.CONFIG.EMAIL_TLS):
mailserver.starttls()
mailserver.ehlo()
if headphones.CONFIG.EMAIL_SMTP_USER:
mailserver.login(headphones.CONFIG.EMAIL_SMTP_USER, headphones.CONFIG.EMAIL_SMTP_PASSWORD)
mailserver.sendmail(headphones.CONFIG.EMAIL_FROM, headphones.CONFIG.EMAIL_TO, message.as_string())
mailserver.quit()
return True
except Exception, e:
logger.warn('Error sending Email: %s' % e)
return False
| gpl-3.0 | -4,342,018,748,401,203,700 | -5,627,351,523,130,977,000 | 33.173759 | 140 | 0.593961 | false |
termoshtt/DataProcessor | lib/dataprocessor/tests/test_scan.py | 3 | 9544 | # coding=utf-8
"""Test for scan."""
import os
from .utils import TestNodeListAndDir
from ..pipes.scan import directory
class TestScan(TestNodeListAndDir):
"""Unittest for dataprocessor.pipes.scan.
Attributes
----------
tempdir_paths : list
list of project root dir path
node_list : list
"""
def setUp(self):
"""Prepare test environment."""
self._generate_test_directories()
def _generate_test_directories(self):
"""Generate test directories.
Generated directories and files are as follows,
(dir-path, including-dirs, including-files)
('/tmpdir_path', ['run0', 'run1', 'run2'], [])
('/tmpdir_path/run0', ['run0', 'run1'], ['test.conf'])
('/tmpdir_path/run0/run0', ['data'], [])
('/tmpdir_path/run0/run0/data', [], ['hoge.conf'])
('/tmpdir_path/run0/run1', [], ['test.conf'])
('/tmpdir_path/run1', [], ['test.conf'])
('/tmpdir_path/run2', ['data'], [])
('/tmpdir_path/run2/data', [], ['test.conf'])
('/tmpdir_path/run2/dummy', [], [])
('/tmpdir_path/run3', ['data'], []) # symboliclink to run2
"""
import tempfile
self.tempdir_path = tempfile.mkdtemp()
root = self.tempdir_path
for i in range(3):
os.mkdir(os.path.join(root, "run" + str(i)))
for i in range(2):
open(os.path.join(root, "run" + str(i), "test.conf"),
"w").close()
for i in range(2):
os.mkdir(os.path.join(root, "run0", "run" + str(i)))
os.mkdir(os.path.join(root, "run2", "data"))
os.mkdir(os.path.join(root, "run2", "dummy"))
os.mkdir(os.path.join(root, "run0", "run0", "data"))
open(os.path.join(root, "run0", "run1", "test.conf"), "w").close()
open(os.path.join(root, "run2", "data", "test.conf"), "w").close()
open(os.path.join(root, "run0", "run0", "data", "hoge.conf"),
"w").close()
os.symlink(os.path.join(root, "run2"), os.path.join(root, "run3"))
def test_directory_for_first_scan1(self):
"""Test for initial scan."""
node_list = []
root_dir = self.tempdir_path
# whitelist specifies directory.
node_list = directory(node_list, root_dir, "data")
compare_node_list = [
{'path': root_dir,
'parents': [],
'children': [os.path.join(root_dir, "run2")],
'name': os.path.basename(root_dir),
'type': 'project'},
{'path': os.path.join(root_dir, "run0"),
'parents': [],
'children': [os.path.join(root_dir, "run0/run0")],
'name': 'run0',
'type': 'project'},
{'path': os.path.join(root_dir, "run0/run0"),
'parents': [os.path.join(root_dir, "run0")],
'children': [],
'name': 'run0',
'type': 'run'},
{'path': os.path.join(root_dir, "run2"),
'parents': [root_dir],
'children': [],
'name': 'run2',
'type': 'run'}]
self.assertEqual(node_list, compare_node_list)
def test_directory_for_first_scan2(self):
"""Test for initial scan."""
node_list = []
root_dir = self.tempdir_path
# whitelist have two elements.
node_list = directory(node_list, root_dir,
["data/hoge*", "data/test*"])
compare_node_list = [
{'path': root_dir,
'parents': [],
'children': [os.path.join(root_dir, "run2")],
'name': os.path.basename(root_dir),
'type': 'project'},
{'path': os.path.join(root_dir, "run0"),
'parents': [],
'children': [os.path.join(root_dir, "run0/run0")],
'name': 'run0',
'type': 'project'},
{'path': os.path.join(root_dir, "run0/run0"),
'parents': [os.path.join(root_dir, "run0")],
'children': [],
'name': 'run0',
'type': 'run'},
{'path': os.path.join(root_dir, "run2"),
'parents': [root_dir],
'children': [],
'name': 'run2',
'type': 'run'}]
self.assertEqual(node_list, compare_node_list)
def test_directory_for_first_scan3(self):
"""Test for initial scan."""
node_list = []
root_dir = self.tempdir_path
# whitelist has `..`.
node_list = directory(node_list, root_dir,
"../data")
compare_node_list = [
{'path': os.path.join(root_dir, "run0", "run0"),
'parents': [],
'children': [os.path.join(root_dir, "run0", "run0", "data")],
'name': "run0",
'type': 'project'},
{'path': os.path.join(root_dir, "run0", "run0", "data"),
'parents': [os.path.join(root_dir, "run0", "run0")],
'children': [],
'name': 'data',
'type': 'run'},
{'path': os.path.join(root_dir, "run2"),
'parents': [],
'children': [os.path.join(root_dir, "run2", "data"),
os.path.join(root_dir, "run2", "dummy")],
'name': "run2",
'type': 'project'},
{'path': os.path.join(root_dir, "run2", "data"),
'parents': [os.path.join(root_dir, "run2")],
'children': [],
'name': 'data',
'type': 'run'},
# This path is also added to node list.
{'path': os.path.join(root_dir, "run2", "dummy"),
'parents': [os.path.join(root_dir, "run2")],
'children': [],
'name': 'dummy',
'type': 'run'}]
self.assertEqual(node_list, compare_node_list)
def test_directory_for_first_scan4(self):
"""Test for initial scan with symbolic link."""
node_list = []
root_dir = self.tempdir_path
# followlinks is `True`.
node_list = directory(node_list, root_dir,
"data/test.conf", followlinks=True)
compare_node_list = [
{'path': root_dir,
'parents': [],
'children': [os.path.join(root_dir, "run2"),
os.path.join(root_dir, "run3")],
'name': os.path.basename(root_dir),
'type': 'project'},
{'path': os.path.join(root_dir, "run2"),
'parents': [root_dir],
'children': [],
'name': 'run2',
'type': 'run'},
# Symbolic link is also added to node list.
{'path': os.path.join(root_dir, "run3"),
'parents': [root_dir],
'children': [],
'name': 'run3',
'type': 'run'}]
self.assertEqual(node_list, compare_node_list)
def test_directory_for_rescan(self):
"""Test for rescan."""
root_dir = self.tempdir_path
node_list = [{'path': os.path.join(root_dir, "run0"),
'parents': [], # empty
'children': [], # empty
'name': 'run0',
'type': 'run'}]
node_list = directory(node_list, root_dir, "*.conf")
compare_node_list = [
{'path': os.path.join(root_dir, 'run0'),
'parents': [root_dir], # fill
'children': [os.path.join(root_dir, 'run0/run1')], # fill
'name': 'run0',
'type': 'run'},
{'path': root_dir,
'parents': [],
'children': [os.path.join(root_dir, 'run0'),
os.path.join(root_dir, 'run1')],
'name': os.path.basename(root_dir),
'type': 'project'},
{'path': os.path.join(root_dir, 'run0/run0'),
'parents': [],
'children': [os.path.join(root_dir, 'run0/run0/data')],
'name': 'run0',
'type': 'project'},
{'path': os.path.join(root_dir, 'run0/run0/data'),
'parents': [os.path.join(root_dir, 'run0/run0')],
'children': [],
'name': 'data',
'type': 'run'},
{'path': os.path.join(root_dir, 'run0/run1'),
'parents': [os.path.join(root_dir, 'run0')],
'children': [],
'name': 'run1',
'type': 'run'},
{'path': os.path.join(root_dir, 'run1'),
'parents': [root_dir],
'children': [],
'name': 'run1',
'type': 'run'},
{'path': os.path.join(root_dir, 'run2'),
'parents': [],
'children': [os.path.join(root_dir, 'run2/data')],
'name': 'run2',
'type': 'project'},
{'path': os.path.join(root_dir, 'run2/data'),
'parents': [os.path.join(root_dir, 'run2')],
'children': [],
'name': 'data',
'type': 'run'}]
self.assertEqual(node_list, compare_node_list)
def test_rescan_failed(self):
root_dir = self.tempdir_path
node_list = [{'path': os.path.join(root_dir, "run0"),
'children': [], # empty and no parents key.
'name': 'run0',
'type': 'run'}]
with self.assertRaises(KeyError):
node_list = directory(node_list, root_dir, ["*.conf"])
| gpl-3.0 | -4,975,450,508,394,479,000 | -7,249,371,296,821,678,000 | 37.796748 | 74 | 0.459032 | false |
freakboy3742/django | tests/forms_tests/field_tests/test_charfield.py | 27 | 6355 | from django.core.exceptions import ValidationError
from django.forms import (
CharField, HiddenInput, PasswordInput, Textarea, TextInput,
)
from django.test import SimpleTestCase
from . import FormFieldAssertionsMixin
class CharFieldTest(FormFieldAssertionsMixin, SimpleTestCase):
def test_charfield_1(self):
f = CharField()
self.assertEqual('1', f.clean(1))
self.assertEqual('hello', f.clean('hello'))
with self.assertRaisesMessage(ValidationError, "'This field is required.'"):
f.clean(None)
with self.assertRaisesMessage(ValidationError, "'This field is required.'"):
f.clean('')
self.assertEqual('[1, 2, 3]', f.clean([1, 2, 3]))
self.assertIsNone(f.max_length)
self.assertIsNone(f.min_length)
def test_charfield_2(self):
f = CharField(required=False)
self.assertEqual('1', f.clean(1))
self.assertEqual('hello', f.clean('hello'))
self.assertEqual('', f.clean(None))
self.assertEqual('', f.clean(''))
self.assertEqual('[1, 2, 3]', f.clean([1, 2, 3]))
self.assertIsNone(f.max_length)
self.assertIsNone(f.min_length)
def test_charfield_3(self):
f = CharField(max_length=10, required=False)
self.assertEqual('12345', f.clean('12345'))
self.assertEqual('1234567890', f.clean('1234567890'))
msg = "'Ensure this value has at most 10 characters (it has 11).'"
with self.assertRaisesMessage(ValidationError, msg):
f.clean('1234567890a')
self.assertEqual(f.max_length, 10)
self.assertIsNone(f.min_length)
def test_charfield_4(self):
f = CharField(min_length=10, required=False)
self.assertEqual('', f.clean(''))
msg = "'Ensure this value has at least 10 characters (it has 5).'"
with self.assertRaisesMessage(ValidationError, msg):
f.clean('12345')
self.assertEqual('1234567890', f.clean('1234567890'))
self.assertEqual('1234567890a', f.clean('1234567890a'))
self.assertIsNone(f.max_length)
self.assertEqual(f.min_length, 10)
def test_charfield_5(self):
f = CharField(min_length=10, required=True)
with self.assertRaisesMessage(ValidationError, "'This field is required.'"):
f.clean('')
msg = "'Ensure this value has at least 10 characters (it has 5).'"
with self.assertRaisesMessage(ValidationError, msg):
f.clean('12345')
self.assertEqual('1234567890', f.clean('1234567890'))
self.assertEqual('1234567890a', f.clean('1234567890a'))
self.assertIsNone(f.max_length)
self.assertEqual(f.min_length, 10)
def test_charfield_length_not_int(self):
"""
Setting min_length or max_length to something that is not a number
raises an exception.
"""
with self.assertRaises(ValueError):
CharField(min_length='a')
with self.assertRaises(ValueError):
CharField(max_length='a')
msg = '__init__() takes 1 positional argument but 2 were given'
with self.assertRaisesMessage(TypeError, msg):
CharField('a')
def test_charfield_widget_attrs(self):
"""
CharField.widget_attrs() always returns a dictionary and includes
minlength/maxlength if min_length/max_length are defined on the field
and the widget is not hidden.
"""
# Return an empty dictionary if max_length and min_length are both None.
f = CharField()
self.assertEqual(f.widget_attrs(TextInput()), {})
self.assertEqual(f.widget_attrs(Textarea()), {})
# Return a maxlength attribute equal to max_length.
f = CharField(max_length=10)
self.assertEqual(f.widget_attrs(TextInput()), {'maxlength': '10'})
self.assertEqual(f.widget_attrs(PasswordInput()), {'maxlength': '10'})
self.assertEqual(f.widget_attrs(Textarea()), {'maxlength': '10'})
# Return a minlength attribute equal to min_length.
f = CharField(min_length=5)
self.assertEqual(f.widget_attrs(TextInput()), {'minlength': '5'})
self.assertEqual(f.widget_attrs(PasswordInput()), {'minlength': '5'})
self.assertEqual(f.widget_attrs(Textarea()), {'minlength': '5'})
# Return both maxlength and minlength when both max_length and
# min_length are set.
f = CharField(max_length=10, min_length=5)
self.assertEqual(f.widget_attrs(TextInput()), {'maxlength': '10', 'minlength': '5'})
self.assertEqual(f.widget_attrs(PasswordInput()), {'maxlength': '10', 'minlength': '5'})
self.assertEqual(f.widget_attrs(Textarea()), {'maxlength': '10', 'minlength': '5'})
self.assertEqual(f.widget_attrs(HiddenInput()), {})
def test_charfield_strip(self):
"""
Values have whitespace stripped but not if strip=False.
"""
f = CharField()
self.assertEqual(f.clean(' 1'), '1')
self.assertEqual(f.clean('1 '), '1')
f = CharField(strip=False)
self.assertEqual(f.clean(' 1'), ' 1')
self.assertEqual(f.clean('1 '), '1 ')
def test_strip_before_checking_empty(self):
"""
A whitespace-only value, ' ', is stripped to an empty string and then
converted to the empty value, None.
"""
f = CharField(required=False, empty_value=None)
self.assertIsNone(f.clean(' '))
def test_clean_non_string(self):
"""CharField.clean() calls str(value) before stripping it."""
class StringWrapper:
def __init__(self, v):
self.v = v
def __str__(self):
return self.v
value = StringWrapper(' ')
f1 = CharField(required=False, empty_value=None)
self.assertIsNone(f1.clean(value))
f2 = CharField(strip=False)
self.assertEqual(f2.clean(value), ' ')
def test_charfield_disabled(self):
f = CharField(disabled=True)
self.assertWidgetRendersTo(f, '<input type="text" name="f" id="id_f" disabled required>')
def test_null_characters_prohibited(self):
f = CharField()
msg = 'Null characters are not allowed.'
with self.assertRaisesMessage(ValidationError, msg):
f.clean('\x00something')
| bsd-3-clause | -6,995,283,655,703,721,000 | 2,999,044,607,705,704,400 | 40.266234 | 97 | 0.617152 | false |
shaggytwodope/qutebrowser | tests/end2end/fixtures/test_webserver.py | 9 | 2499 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2015-2016 Florian Bruhin (The Compiler) <[email protected]>
#
# This file is part of qutebrowser.
#
# qutebrowser 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.
#
# qutebrowser is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
"""Test the httpbin webserver used for tests."""
import json
import urllib.request
import urllib.error
import pytest
@pytest.mark.parametrize('path, content, expected', [
('/', '<title>httpbin(1): HTTP Client Testing Service</title>', True),
# https://github.com/Runscope/httpbin/issues/245
('/', 'www.google-analytics.com', False),
('/data/hello.txt', 'Hello World!', True),
])
def test_httpbin(httpbin, qtbot, path, content, expected):
with qtbot.waitSignal(httpbin.new_request, timeout=100):
url = 'http://localhost:{}{}'.format(httpbin.port, path)
try:
response = urllib.request.urlopen(url)
except urllib.error.HTTPError as e:
# "Though being an exception (a subclass of URLError), an HTTPError
# can also function as a non-exceptional file-like return value
# (the same thing that urlopen() returns)."
# ...wat
print(e.read().decode('utf-8'))
raise
data = response.read().decode('utf-8')
assert httpbin.get_requests() == [httpbin.ExpectedRequest('GET', path)]
assert (content in data) == expected
@pytest.mark.parametrize('line, verb, path, equal', [
({'verb': 'GET', 'path': '/', 'status': 200}, 'GET', '/', True),
({'verb': 'GET', 'path': '/foo/', 'status': 200}, 'GET', '/foo', True),
({'verb': 'GET', 'path': '/', 'status': 200}, 'GET', '/foo', False),
({'verb': 'POST', 'path': '/', 'status': 200}, 'GET', '/', False),
])
def test_expected_request(httpbin, line, verb, path, equal):
expected = httpbin.ExpectedRequest(verb, path)
request = httpbin.Request(json.dumps(line))
assert (expected == request) == equal
| gpl-3.0 | 5,301,878,519,256,962,000 | 3,647,237,545,668,249,600 | 38.046875 | 79 | 0.655062 | false |
bluestemscott/librarygadget | librarygadget/librarybot/migrations/0001_initial.py | 1 | 15532 | # encoding: 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):
# Adding model 'UserProfile'
db.create_table('librarybot_userprofile', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('user', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True)),
('api_key', self.gf('django.db.models.fields.CharField')(max_length=50, null=True)),
('account_level', self.gf('django.db.models.fields.CharField')(default='free', max_length=10)),
('paid_last_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)),
('paid_first_date', self.gf('django.db.models.fields.DateField')(null=True, blank=True)),
))
db.send_create_signal('librarybot', ['UserProfile'])
# Adding model 'Library'
db.create_table('librarybot_library', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
('state', self.gf('django.db.models.fields.CharField')(max_length=2)),
('catalogurl', self.gf('django.db.models.fields.URLField')(max_length=200)),
('librarysystem', self.gf('django.db.models.fields.CharField')(max_length=20)),
('renew_supported_code', self.gf('django.db.models.fields.CharField')(default='untested', max_length=10)),
('active', self.gf('django.db.models.fields.BooleanField')(default=True, blank=True)),
('lastmodified', self.gf('django.db.models.fields.DateField')(auto_now=True, blank=True)),
))
db.send_create_signal('librarybot', ['Library'])
# Adding model 'Patron'
db.create_table('librarybot_patron', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('library', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['librarybot.Library'])),
('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True)),
('patronid', self.gf('django.db.models.fields.CharField')(max_length=40)),
('pin', self.gf('django.db.models.fields.CharField')(max_length=75)),
('name', self.gf('django.db.models.fields.CharField')(max_length=150, null=True)),
('save_history', self.gf('django.db.models.fields.BooleanField')(default=False, blank=True)),
('lastchecked', self.gf('django.db.models.fields.DateTimeField')()),
('batch_last_run', self.gf('django.db.models.fields.DateField')(null=True)),
))
db.send_create_signal('librarybot', ['Patron'])
# Adding model 'Item'
db.create_table('librarybot_item', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('patron', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['librarybot.Patron'])),
('title', self.gf('django.db.models.fields.CharField')(max_length=1024)),
('author', self.gf('django.db.models.fields.CharField')(max_length=1024, null=True)),
('outDate', self.gf('django.db.models.fields.DateField')(null=True)),
('dueDate', self.gf('django.db.models.fields.DateField')(null=True)),
('timesRenewed', self.gf('django.db.models.fields.SmallIntegerField')(null=True)),
('isbn', self.gf('django.db.models.fields.CharField')(max_length=25, null=True)),
('asof', self.gf('django.db.models.fields.DateField')()),
))
db.send_create_signal('librarybot', ['Item'])
# Adding model 'AccessLog'
db.create_table('librarybot_accesslog', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('patron', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['librarybot.Patron'])),
('library', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['librarybot.Library'])),
('viewfunc', self.gf('django.db.models.fields.CharField')(max_length=50)),
('error', self.gf('django.db.models.fields.CharField')(max_length=150)),
('error_stacktrace', self.gf('django.db.models.fields.CharField')(max_length=3000)),
('date', self.gf('django.db.models.fields.DateField')(auto_now=True, null=True, blank=True)),
))
db.send_create_signal('librarybot', ['AccessLog'])
# Adding model 'LibraryRequest'
db.create_table('librarybot_libraryrequest', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('libraryname', self.gf('django.db.models.fields.CharField')(max_length=100)),
('state', self.gf('django.db.models.fields.CharField')(max_length=2)),
('catalogurl', self.gf('django.db.models.fields.URLField')(max_length=200)),
('name', self.gf('django.db.models.fields.CharField')(max_length=60)),
('email', self.gf('django.db.models.fields.EmailField')(max_length=75)),
('patronid', self.gf('django.db.models.fields.CharField')(max_length=40)),
('password', self.gf('django.db.models.fields.CharField')(max_length=20)),
))
db.send_create_signal('librarybot', ['LibraryRequest'])
# Adding model 'RenewalResponse'
db.create_table('librarybot_renewalresponse', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('token', self.gf('django.db.models.fields.CharField')(max_length=36)),
('response', self.gf('django.db.models.fields.TextField')()),
('cachedate', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
))
db.send_create_signal('librarybot', ['RenewalResponse'])
def backwards(self, orm):
# Deleting model 'UserProfile'
db.delete_table('librarybot_userprofile')
# Deleting model 'Library'
db.delete_table('librarybot_library')
# Deleting model 'Patron'
db.delete_table('librarybot_patron')
# Deleting model 'Item'
db.delete_table('librarybot_item')
# Deleting model 'AccessLog'
db.delete_table('librarybot_accesslog')
# Deleting model 'LibraryRequest'
db.delete_table('librarybot_libraryrequest')
# Deleting model 'RenewalResponse'
db.delete_table('librarybot_renewalresponse')
models = {
'auth.group': {
'Meta': {'object_name': 'Group'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
'auth.permission': {
'Meta': {'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
'contenttypes.contenttype': {
'Meta': {'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
'librarybot.accesslog': {
'Meta': {'object_name': 'AccessLog'},
'date': ('django.db.models.fields.DateField', [], {'auto_now': 'True', 'null': 'True', 'blank': 'True'}),
'error': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'error_stacktrace': ('django.db.models.fields.CharField', [], {'max_length': '3000'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'library': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['librarybot.Library']"}),
'patron': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['librarybot.Patron']"}),
'viewfunc': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
'librarybot.item': {
'Meta': {'object_name': 'Item'},
'asof': ('django.db.models.fields.DateField', [], {}),
'author': ('django.db.models.fields.CharField', [], {'max_length': '1024', 'null': 'True'}),
'dueDate': ('django.db.models.fields.DateField', [], {'null': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'isbn': ('django.db.models.fields.CharField', [], {'max_length': '25', 'null': 'True'}),
'outDate': ('django.db.models.fields.DateField', [], {'null': 'True'}),
'patron': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['librarybot.Patron']"}),
'timesRenewed': ('django.db.models.fields.SmallIntegerField', [], {'null': 'True'}),
'title': ('django.db.models.fields.CharField', [], {'max_length': '1024'})
},
'librarybot.library': {
'Meta': {'object_name': 'Library'},
'active': ('django.db.models.fields.BooleanField', [], {'default': 'True', 'blank': 'True'}),
'catalogurl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'lastmodified': ('django.db.models.fields.DateField', [], {'auto_now': 'True', 'blank': 'True'}),
'librarysystem': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'renew_supported_code': ('django.db.models.fields.CharField', [], {'default': "'untested'", 'max_length': '10'}),
'state': ('django.db.models.fields.CharField', [], {'max_length': '2'})
},
'librarybot.libraryrequest': {
'Meta': {'object_name': 'LibraryRequest'},
'catalogurl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'libraryname': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '60'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
'patronid': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
'state': ('django.db.models.fields.CharField', [], {'max_length': '2'})
},
'librarybot.patron': {
'Meta': {'object_name': 'Patron'},
'batch_last_run': ('django.db.models.fields.DateField', [], {'null': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'lastchecked': ('django.db.models.fields.DateTimeField', [], {}),
'library': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['librarybot.Library']"}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '150', 'null': 'True'}),
'patronid': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
'pin': ('django.db.models.fields.CharField', [], {'max_length': '75'}),
'save_history': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'})
},
'librarybot.renewalresponse': {
'Meta': {'object_name': 'RenewalResponse'},
'cachedate': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'response': ('django.db.models.fields.TextField', [], {}),
'token': ('django.db.models.fields.CharField', [], {'max_length': '36'})
},
'librarybot.userprofile': {
'Meta': {'object_name': 'UserProfile'},
'account_level': ('django.db.models.fields.CharField', [], {'default': "'free'", 'max_length': '10'}),
'api_key': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'paid_first_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
'paid_last_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'})
}
}
complete_apps = ['librarybot']
| mit | -1,083,923,306,554,213,800 | 8,915,053,311,450,826,000 | 64.660944 | 163 | 0.563675 | false |
jaredjennings/snowy | libs/openshiftlibs.py | 8 | 3967 | #!/usr/bin/env python
__author__ = 'N. Harrison Ripps'
"""
This library was written to the original django-example project -
https://github.com/openshift/django-example
by @url(https://github.com/nhr), but since it was placed inside
the django project folder I've removed it when I started working
on my fork -
https://github.com/ZackYovel/django-example
Since it is required by the .openshift/action_hooks/secure_db.py
action hook and since this library is basically a recommendation
of the openshift providers, I'm adding it again but placing it
in the libs folder, as a generic gependency and not a project
specific file.
running 'grep -r openshiftlibs' resulted in one file that
references this library: .openshift/action_hooks/secure_db.py.
"""
import hashlib, inspect, os, random, sys
# Gets the secret token provided by OpenShift
# or generates one (this is slightly less secure, but good enough for now)
def get_openshift_secret_token():
token = os.getenv('OPENSHIFT_SECRET_TOKEN')
name = os.getenv('OPENSHIFT_APP_NAME')
uuid = os.getenv('OPENSHIFT_APP_UUID')
if token is not None:
return token
elif (name is not None and uuid is not None):
return hashlib.sha256(name + '-' + uuid).hexdigest()
return None
# Loop through all provided variables and generate secure versions
# If not running on OpenShift, returns defaults and logs an error message
#
# This function calls secure_function and passes an array of:
# {
# 'hash': generated sha hash,
# 'variable': name of variable,
# 'original': original value
# }
def openshift_secure(default_keys, secure_function = 'make_secure_key'):
# Attempts to get secret token
my_token = get_openshift_secret_token()
# Only generate random values if on OpenShift
my_list = default_keys
if my_token is not None:
# Loop over each default_key and set the new value
for key, value in default_keys.iteritems():
# Create hash out of token and this key's name
sha = hashlib.sha256(my_token + '-' + key).hexdigest()
# Pass a dictionary so we can add stuff without breaking existing calls
vals = { 'hash': sha, 'variable': key, 'original': value }
# Call user specified function or just return hash
my_list[key] = sha
if secure_function is not None:
# Pick through the global and local scopes to find the function.
possibles = globals().copy()
possibles.update(locals())
supplied_function = possibles.get(secure_function)
if not supplied_function:
raise Exception("Cannot find supplied security function")
else:
my_list[key] = supplied_function(vals)
else:
calling_file = inspect.stack()[1][1]
if os.getenv('OPENSHIFT_REPO_DIR'):
base = os.getenv('OPENSHIFT_REPO_DIR')
calling_file.replace(base,'')
sys.stderr.write("OPENSHIFT WARNING: Using default values for secure variables, please manually modify in " + calling_file + "\n")
return my_list
# This function transforms default keys into per-deployment random keys;
def make_secure_key(key_info):
hashcode = key_info['hash']
key = key_info['variable']
original = key_info['original']
# These are the legal password characters
# as per the Django source code
# (django/contrib/auth/models.py)
chars = 'abcdefghjkmnpqrstuvwxyz'
chars += 'ABCDEFGHJKLMNPQRSTUVWXYZ'
chars += '23456789'
# Use the hash to seed the RNG
random.seed(int("0x" + hashcode[:8], 0))
# Create a random string the same length as the default
rand_key = ''
for _ in range(len(original)):
rand_pos = random.randint(0,len(chars))
rand_key += chars[rand_pos:(rand_pos+1)]
# Reset the RNG
random.seed()
# Set the value
return rand_key
| agpl-3.0 | -5,474,060,081,534,422,000 | 8,636,298,254,972,687,000 | 36.074766 | 138 | 0.660701 | false |
rcmachado/pysuru | pysuru/tests/test_http.py | 1 | 1256 | # coding: utf-8
try:
from unittest import mock
except ImportError:
import mock
from pysuru.http import HttpClient
def test_headers_attribute_should_always_have_authorization_header_with_token():
client = HttpClient('TARGET', 'TOKEN')
assert 'Authorization' in client.headers
assert client.headers['Authorization'] == 'bearer TOKEN'
def test_urlopen_should_build_full_url_using_target_and_path():
client = HttpClient('example.com/api', 'TOKEN')
client.conn.request = mock.MagicMock()
client.urlopen('GET', '/sample')
expected_url = 'http://example.com/api/sample'
assert client.conn.request.call_args_list == [
mock.call('GET', expected_url, headers=mock.ANY, fields=None)]
def test_urlopen_should_merge_headers_argument_with_headers_attribute():
my_headers = {
'X-Custom-Header': 'custom value'
}
expected_headers = {
'Authorization': 'bearer TOKEN',
'X-Custom-Header': 'custom value'
}
client = HttpClient('TARGET', 'TOKEN')
client.conn.request = mock.MagicMock()
client.urlopen('GET', '/sample', headers=my_headers)
assert client.conn.request.call_args_list == [
mock.call('GET', mock.ANY, headers=expected_headers, fields=None)]
| mit | -2,326,328,602,713,362,400 | 8,813,832,411,574,753,000 | 28.904762 | 80 | 0.676752 | false |
ardumont/linux | scripts/checkkconfigsymbols.py | 88 | 15783 | #!/usr/bin/env python2
"""Find Kconfig symbols that are referenced but not defined."""
# (c) 2014-2015 Valentin Rothberg <[email protected]>
# (c) 2014 Stefan Hengelein <[email protected]>
#
# Licensed under the terms of the GNU GPL License version 2
import difflib
import os
import re
import signal
import sys
from multiprocessing import Pool, cpu_count
from optparse import OptionParser
from subprocess import Popen, PIPE, STDOUT
# regex expressions
OPERATORS = r"&|\(|\)|\||\!"
FEATURE = r"(?:\w*[A-Z0-9]\w*){2,}"
DEF = r"^\s*(?:menu){,1}config\s+(" + FEATURE + r")\s*"
EXPR = r"(?:" + OPERATORS + r"|\s|" + FEATURE + r")+"
DEFAULT = r"default\s+.*?(?:if\s.+){,1}"
STMT = r"^\s*(?:if|select|depends\s+on|(?:" + DEFAULT + r"))\s+" + EXPR
SOURCE_FEATURE = r"(?:\W|\b)+[D]{,1}CONFIG_(" + FEATURE + r")"
# regex objects
REGEX_FILE_KCONFIG = re.compile(r".*Kconfig[\.\w+\-]*$")
REGEX_FEATURE = re.compile(r'(?!\B)' + FEATURE + r'(?!\B)')
REGEX_SOURCE_FEATURE = re.compile(SOURCE_FEATURE)
REGEX_KCONFIG_DEF = re.compile(DEF)
REGEX_KCONFIG_EXPR = re.compile(EXPR)
REGEX_KCONFIG_STMT = re.compile(STMT)
REGEX_KCONFIG_HELP = re.compile(r"^\s+(help|---help---)\s*$")
REGEX_FILTER_FEATURES = re.compile(r"[A-Za-z0-9]$")
REGEX_NUMERIC = re.compile(r"0[xX][0-9a-fA-F]+|[0-9]+")
REGEX_QUOTES = re.compile("(\"(.*?)\")")
def parse_options():
"""The user interface of this module."""
usage = "%prog [options]\n\n" \
"Run this tool to detect Kconfig symbols that are referenced but " \
"not defined in\nKconfig. The output of this tool has the " \
"format \'Undefined symbol\\tFile list\'\n\n" \
"If no option is specified, %prog will default to check your\n" \
"current tree. Please note that specifying commits will " \
"\'git reset --hard\'\nyour current tree! You may save " \
"uncommitted changes to avoid losing data."
parser = OptionParser(usage=usage)
parser.add_option('-c', '--commit', dest='commit', action='store',
default="",
help="Check if the specified commit (hash) introduces "
"undefined Kconfig symbols.")
parser.add_option('-d', '--diff', dest='diff', action='store',
default="",
help="Diff undefined symbols between two commits. The "
"input format bases on Git log's "
"\'commmit1..commit2\'.")
parser.add_option('-f', '--find', dest='find', action='store_true',
default=False,
help="Find and show commits that may cause symbols to be "
"missing. Required to run with --diff.")
parser.add_option('-i', '--ignore', dest='ignore', action='store',
default="",
help="Ignore files matching this pattern. Note that "
"the pattern needs to be a Python regex. To "
"ignore defconfigs, specify -i '.*defconfig'.")
parser.add_option('-s', '--sim', dest='sim', action='store', default="",
help="Print a list of maximum 10 string-similar symbols.")
parser.add_option('', '--force', dest='force', action='store_true',
default=False,
help="Reset current Git tree even when it's dirty.")
(opts, _) = parser.parse_args()
if opts.commit and opts.diff:
sys.exit("Please specify only one option at once.")
if opts.diff and not re.match(r"^[\w\-\.]+\.\.[\w\-\.]+$", opts.diff):
sys.exit("Please specify valid input in the following format: "
"\'commmit1..commit2\'")
if opts.commit or opts.diff:
if not opts.force and tree_is_dirty():
sys.exit("The current Git tree is dirty (see 'git status'). "
"Running this script may\ndelete important data since it "
"calls 'git reset --hard' for some performance\nreasons. "
" Please run this script in a clean Git tree or pass "
"'--force' if you\nwant to ignore this warning and "
"continue.")
if opts.commit:
opts.find = False
if opts.ignore:
try:
re.match(opts.ignore, "this/is/just/a/test.c")
except:
sys.exit("Please specify a valid Python regex.")
return opts
def main():
"""Main function of this module."""
opts = parse_options()
if opts.sim and not opts.commit and not opts.diff:
sims = find_sims(opts.sim, opts.ignore)
if sims:
print "%s: %s" % (yel("Similar symbols"), ', '.join(sims))
else:
print "%s: no similar symbols found" % yel("Similar symbols")
sys.exit(0)
# dictionary of (un)defined symbols
defined = {}
undefined = {}
if opts.commit or opts.diff:
head = get_head()
# get commit range
commit_a = None
commit_b = None
if opts.commit:
commit_a = opts.commit + "~"
commit_b = opts.commit
elif opts.diff:
split = opts.diff.split("..")
commit_a = split[0]
commit_b = split[1]
undefined_a = {}
undefined_b = {}
# get undefined items before the commit
execute("git reset --hard %s" % commit_a)
undefined_a, _ = check_symbols(opts.ignore)
# get undefined items for the commit
execute("git reset --hard %s" % commit_b)
undefined_b, defined = check_symbols(opts.ignore)
# report cases that are present for the commit but not before
for feature in sorted(undefined_b):
# feature has not been undefined before
if not feature in undefined_a:
files = sorted(undefined_b.get(feature))
undefined[feature] = files
# check if there are new files that reference the undefined feature
else:
files = sorted(undefined_b.get(feature) -
undefined_a.get(feature))
if files:
undefined[feature] = files
# reset to head
execute("git reset --hard %s" % head)
# default to check the entire tree
else:
undefined, defined = check_symbols(opts.ignore)
# now print the output
for feature in sorted(undefined):
print red(feature)
files = sorted(undefined.get(feature))
print "%s: %s" % (yel("Referencing files"), ", ".join(files))
sims = find_sims(feature, opts.ignore, defined)
sims_out = yel("Similar symbols")
if sims:
print "%s: %s" % (sims_out, ', '.join(sims))
else:
print "%s: %s" % (sims_out, "no similar symbols found")
if opts.find:
print "%s:" % yel("Commits changing symbol")
commits = find_commits(feature, opts.diff)
if commits:
for commit in commits:
commit = commit.split(" ", 1)
print "\t- %s (\"%s\")" % (yel(commit[0]), commit[1])
else:
print "\t- no commit found"
print # new line
def yel(string):
"""
Color %string yellow.
"""
return "\033[33m%s\033[0m" % string
def red(string):
"""
Color %string red.
"""
return "\033[31m%s\033[0m" % string
def execute(cmd):
"""Execute %cmd and return stdout. Exit in case of error."""
pop = Popen(cmd, stdout=PIPE, stderr=STDOUT, shell=True)
(stdout, _) = pop.communicate() # wait until finished
if pop.returncode != 0:
sys.exit(stdout)
return stdout
def find_commits(symbol, diff):
"""Find commits changing %symbol in the given range of %diff."""
commits = execute("git log --pretty=oneline --abbrev-commit -G %s %s"
% (symbol, diff))
return [x for x in commits.split("\n") if x]
def tree_is_dirty():
"""Return true if the current working tree is dirty (i.e., if any file has
been added, deleted, modified, renamed or copied but not committed)."""
stdout = execute("git status --porcelain")
for line in stdout:
if re.findall(r"[URMADC]{1}", line[:2]):
return True
return False
def get_head():
"""Return commit hash of current HEAD."""
stdout = execute("git rev-parse HEAD")
return stdout.strip('\n')
def partition(lst, size):
"""Partition list @lst into eveni-sized lists of size @size."""
return [lst[i::size] for i in xrange(size)]
def init_worker():
"""Set signal handler to ignore SIGINT."""
signal.signal(signal.SIGINT, signal.SIG_IGN)
def find_sims(symbol, ignore, defined = []):
"""Return a list of max. ten Kconfig symbols that are string-similar to
@symbol."""
if defined:
return sorted(difflib.get_close_matches(symbol, set(defined), 10))
pool = Pool(cpu_count(), init_worker)
kfiles = []
for gitfile in get_files():
if REGEX_FILE_KCONFIG.match(gitfile):
kfiles.append(gitfile)
arglist = []
for part in partition(kfiles, cpu_count()):
arglist.append((part, ignore))
for res in pool.map(parse_kconfig_files, arglist):
defined.extend(res[0])
return sorted(difflib.get_close_matches(symbol, set(defined), 10))
def get_files():
"""Return a list of all files in the current git directory."""
# use 'git ls-files' to get the worklist
stdout = execute("git ls-files")
if len(stdout) > 0 and stdout[-1] == "\n":
stdout = stdout[:-1]
files = []
for gitfile in stdout.rsplit("\n"):
if ".git" in gitfile or "ChangeLog" in gitfile or \
".log" in gitfile or os.path.isdir(gitfile) or \
gitfile.startswith("tools/"):
continue
files.append(gitfile)
return files
def check_symbols(ignore):
"""Find undefined Kconfig symbols and return a dict with the symbol as key
and a list of referencing files as value. Files matching %ignore are not
checked for undefined symbols."""
pool = Pool(cpu_count(), init_worker)
try:
return check_symbols_helper(pool, ignore)
except KeyboardInterrupt:
pool.terminate()
pool.join()
sys.exit(1)
def check_symbols_helper(pool, ignore):
"""Helper method for check_symbols(). Used to catch keyboard interrupts in
check_symbols() in order to properly terminate running worker processes."""
source_files = []
kconfig_files = []
defined_features = []
referenced_features = dict() # {file: [features]}
for gitfile in get_files():
if REGEX_FILE_KCONFIG.match(gitfile):
kconfig_files.append(gitfile)
else:
if ignore and not re.match(ignore, gitfile):
continue
# add source files that do not match the ignore pattern
source_files.append(gitfile)
# parse source files
arglist = partition(source_files, cpu_count())
for res in pool.map(parse_source_files, arglist):
referenced_features.update(res)
# parse kconfig files
arglist = []
for part in partition(kconfig_files, cpu_count()):
arglist.append((part, ignore))
for res in pool.map(parse_kconfig_files, arglist):
defined_features.extend(res[0])
referenced_features.update(res[1])
defined_features = set(defined_features)
# inverse mapping of referenced_features to dict(feature: [files])
inv_map = dict()
for _file, features in referenced_features.iteritems():
for feature in features:
inv_map[feature] = inv_map.get(feature, set())
inv_map[feature].add(_file)
referenced_features = inv_map
undefined = {} # {feature: [files]}
for feature in sorted(referenced_features):
# filter some false positives
if feature == "FOO" or feature == "BAR" or \
feature == "FOO_BAR" or feature == "XXX":
continue
if feature not in defined_features:
if feature.endswith("_MODULE"):
# avoid false positives for kernel modules
if feature[:-len("_MODULE")] in defined_features:
continue
undefined[feature] = referenced_features.get(feature)
return undefined, defined_features
def parse_source_files(source_files):
"""Parse each source file in @source_files and return dictionary with source
files as keys and lists of references Kconfig symbols as values."""
referenced_features = dict()
for sfile in source_files:
referenced_features[sfile] = parse_source_file(sfile)
return referenced_features
def parse_source_file(sfile):
"""Parse @sfile and return a list of referenced Kconfig features."""
lines = []
references = []
if not os.path.exists(sfile):
return references
with open(sfile, "r") as stream:
lines = stream.readlines()
for line in lines:
if not "CONFIG_" in line:
continue
features = REGEX_SOURCE_FEATURE.findall(line)
for feature in features:
if not REGEX_FILTER_FEATURES.search(feature):
continue
references.append(feature)
return references
def get_features_in_line(line):
"""Return mentioned Kconfig features in @line."""
return REGEX_FEATURE.findall(line)
def parse_kconfig_files(args):
"""Parse kconfig files and return tuple of defined and references Kconfig
symbols. Note, @args is a tuple of a list of files and the @ignore
pattern."""
kconfig_files = args[0]
ignore = args[1]
defined_features = []
referenced_features = dict()
for kfile in kconfig_files:
defined, references = parse_kconfig_file(kfile)
defined_features.extend(defined)
if ignore and re.match(ignore, kfile):
# do not collect references for files that match the ignore pattern
continue
referenced_features[kfile] = references
return (defined_features, referenced_features)
def parse_kconfig_file(kfile):
"""Parse @kfile and update feature definitions and references."""
lines = []
defined = []
references = []
skip = False
if not os.path.exists(kfile):
return defined, references
with open(kfile, "r") as stream:
lines = stream.readlines()
for i in range(len(lines)):
line = lines[i]
line = line.strip('\n')
line = line.split("#")[0] # ignore comments
if REGEX_KCONFIG_DEF.match(line):
feature_def = REGEX_KCONFIG_DEF.findall(line)
defined.append(feature_def[0])
skip = False
elif REGEX_KCONFIG_HELP.match(line):
skip = True
elif skip:
# ignore content of help messages
pass
elif REGEX_KCONFIG_STMT.match(line):
line = REGEX_QUOTES.sub("", line)
features = get_features_in_line(line)
# multi-line statements
while line.endswith("\\"):
i += 1
line = lines[i]
line = line.strip('\n')
features.extend(get_features_in_line(line))
for feature in set(features):
if REGEX_NUMERIC.match(feature):
# ignore numeric values
continue
references.append(feature)
return defined, references
if __name__ == "__main__":
main()
| gpl-2.0 | -524,674,357,738,726,000 | -1,813,281,381,221,908,500 | 32.869099 | 80 | 0.577203 | false |
JaneliaSciComp/Neuroptikon | Source/lib/CrossPlatform/networkx/generators/small.py | 1 | 12813 | """
Various small and named graphs, together with some compact generators.
"""
__author__ ="""Aric Hagberg ([email protected])\nPieter Swart ([email protected])"""
# Copyright (C) 2004-2008 by
# Aric Hagberg <[email protected]>
# Dan Schult <[email protected]>
# Pieter Swart <[email protected]>
# All rights reserved.
# BSD license.
__all__ = ['make_small_graph',
'LCF_graph',
'bull_graph',
'chvatal_graph',
'cubical_graph',
'desargues_graph',
'diamond_graph',
'dodecahedral_graph',
'frucht_graph',
'heawood_graph',
'house_graph',
'house_x_graph',
'icosahedral_graph',
'krackhardt_kite_graph',
'moebius_kantor_graph',
'octahedral_graph',
'pappus_graph',
'petersen_graph',
'sedgewick_maze_graph',
'tetrahedral_graph',
'truncated_cube_graph',
'truncated_tetrahedron_graph',
'tutte_graph']
from networkx.generators.classic import empty_graph, cycle_graph, path_graph, complete_graph
from networkx.exception import NetworkXError
#------------------------------------------------------------------------------
# Tools for creating small graphs
#------------------------------------------------------------------------------
def make_small_undirected_graph(graph_description, create_using=None):
"""
Return a small undirected graph described by graph_description.
See make_small_graph.
"""
if create_using is not None and create_using.is_directed():
raise NetworkXError("Directed Graph not supported")
return make_small_graph(graph_description, create_using)
def make_small_graph(graph_description, create_using=None):
"""
Return the small graph described by graph_description.
graph_description is a list of the form [ltype,name,n,xlist]
Here ltype is one of "adjacencylist" or "edgelist",
name is the name of the graph and n the number of nodes.
This constructs a graph of n nodes with integer labels 0,..,n-1.
If ltype="adjacencylist" then xlist is an adjacency list
with exactly n entries, in with the j'th entry (which can be empty)
specifies the nodes connected to vertex j.
e.g. the "square" graph C_4 can be obtained by
>>> G=nx.make_small_graph(["adjacencylist","C_4",4,[[2,4],[1,3],[2,4],[1,3]]])
or, since we do not need to add edges twice,
>>> G=nx.make_small_graph(["adjacencylist","C_4",4,[[2,4],[3],[4],[]]])
If ltype="edgelist" then xlist is an edge list
written as [[v1,w2],[v2,w2],...,[vk,wk]],
where vj and wj integers in the range 1,..,n
e.g. the "square" graph C_4 can be obtained by
>>> G=nx.make_small_graph(["edgelist","C_4",4,[[1,2],[3,4],[2,3],[4,1]]])
Use the create_using argument to choose the graph class/type.
"""
ltype=graph_description[0]
name=graph_description[1]
n=graph_description[2]
G=empty_graph(n, create_using)
nodes=G.nodes()
if ltype=="adjacencylist":
adjlist=graph_description[3]
if len(adjlist) != n:
raise NetworkXError,"invalid graph_description"
G.add_edges_from([(u-1,v) for v in nodes for u in adjlist[v]])
elif ltype=="edgelist":
edgelist=graph_description[3]
for e in edgelist:
v1=e[0]-1
v2=e[1]-1
if v1<0 or v1>n-1 or v2<0 or v2>n-1:
raise NetworkXError,"invalid graph_description"
else:
G.add_edge(v1,v2)
G.name=name
return G
def LCF_graph(n,shift_list,repeats,create_using=None):
"""
Return the cubic graph specified in LCF notation.
LCF notation (LCF=Lederberg-Coxeter-Fruchte) is a compressed
notation used in the generation of various cubic Hamiltonian
graphs of high symmetry. See, for example, dodecahedral_graph,
desargues_graph, heawood_graph and pappus_graph below.
n (number of nodes)
The starting graph is the n-cycle with nodes 0,...,n-1.
(The null graph is returned if n < 0.)
shift_list = [s1,s2,..,sk], a list of integer shifts mod n,
repeats
integer specifying the number of times that shifts in shift_list
are successively applied to each v_current in the n-cycle
to generate an edge between v_current and v_current+shift mod n.
For v1 cycling through the n-cycle a total of k*repeats
with shift cycling through shiftlist repeats times connect
v1 with v1+shift mod n
The utility graph K_{3,3}
>>> G=nx.LCF_graph(6,[3,-3],3)
The Heawood graph
>>> G=nx.LCF_graph(14,[5,-5],7)
See http://mathworld.wolfram.com/LCFNotation.html for a description
and references.
"""
if create_using is not None and create_using.is_directed():
raise NetworkXError("Directed Graph not supported")
if n <= 0:
return empty_graph(0, create_using)
# start with the n-cycle
G=cycle_graph(n, create_using)
G.name="LCF_graph"
nodes=G.nodes()
n_extra_edges=repeats*len(shift_list)
# edges are added n_extra_edges times
# (not all of these need be new)
if n_extra_edges < 1:
return G
for i in range(n_extra_edges):
shift=shift_list[i%len(shift_list)] #cycle through shift_list
v1=nodes[i%n] # cycle repeatedly through nodes
v2=nodes[(i + shift)%n]
G.add_edge(v1, v2)
return G
#-------------------------------------------------------------------------------
# Various small and named graphs
#-------------------------------------------------------------------------------
def bull_graph(create_using=None):
"""Return the Bull graph. """
description=[
"adjacencylist",
"Bull Graph",
5,
[[2,3],[1,3,4],[1,2,5],[2],[3]]
]
G=make_small_undirected_graph(description, create_using)
return G
def chvatal_graph(create_using=None):
"""Return the Chvatal graph."""
description=[
"adjacencylist",
"Chvatal Graph",
12,
[[2,5,7,10],[3,6,8],[4,7,9],[5,8,10],
[6,9],[11,12],[11,12],[9,12],
[11],[11,12],[],[]]
]
G=make_small_undirected_graph(description, create_using)
return G
def cubical_graph(create_using=None):
"""Return the 3-regular Platonic Cubical graph."""
description=[
"adjacencylist",
"Platonic Cubical Graph",
8,
[[2,4,5],[1,3,8],[2,4,7],[1,3,6],
[1,6,8],[4,5,7],[3,6,8],[2,5,7]]
]
G=make_small_undirected_graph(description, create_using)
return G
def desargues_graph(create_using=None):
""" Return the Desargues graph."""
G=LCF_graph(20, [5,-5,9,-9], 5, create_using)
G.name="Desargues Graph"
return G
def diamond_graph(create_using=None):
"""Return the Diamond graph. """
description=[
"adjacencylist",
"Diamond Graph",
4,
[[2,3],[1,3,4],[1,2,4],[2,3]]
]
G=make_small_undirected_graph(description, create_using)
return G
def dodecahedral_graph(create_using=None):
""" Return the Platonic Dodecahedral graph. """
G=LCF_graph(20, [10,7,4,-4,-7,10,-4,7,-7,4], 2, create_using)
G.name="Dodecahedral Graph"
return G
def frucht_graph(create_using=None):
"""Return the Frucht Graph.
The Frucht Graph is the smallest cubical graph whose
automorphism group consists only of the identity element.
"""
G=cycle_graph(7, create_using)
G.add_edges_from([[0,7],[1,7],[2,8],[3,9],[4,9],[5,10],[6,10],
[7,11],[8,11],[8,9],[10,11]])
G.name="Frucht Graph"
return G
def heawood_graph(create_using=None):
""" Return the Heawood graph, a (3,6) cage. """
G=LCF_graph(14, [5,-5], 7, create_using)
G.name="Heawood Graph"
return G
def house_graph(create_using=None):
"""Return the House graph (square with triangle on top)."""
description=[
"adjacencylist",
"House Graph",
5,
[[2,3],[1,4],[1,4,5],[2,3,5],[3,4]]
]
G=make_small_undirected_graph(description, create_using)
return G
def house_x_graph(create_using=None):
"""Return the House graph with a cross inside the house square."""
description=[
"adjacencylist",
"House-with-X-inside Graph",
5,
[[2,3,4],[1,3,4],[1,2,4,5],[1,2,3,5],[3,4]]
]
G=make_small_undirected_graph(description, create_using)
return G
def icosahedral_graph(create_using=None):
"""Return the Platonic Icosahedral graph."""
description=[
"adjacencylist",
"Platonic Icosahedral Graph",
12,
[[2,6,8,9,12],[3,6,7,9],[4,7,9,10],[5,7,10,11],
[6,7,11,12],[7,12],[],[9,10,11,12],
[10],[11],[12],[]]
]
G=make_small_undirected_graph(description, create_using)
return G
def krackhardt_kite_graph(create_using=None):
"""
Return the Krackhardt Kite Social Network.
A 10 actor social network introduced by David Krackhardt
to illustrate: degree, betweenness, centrality, closeness, etc.
The traditional labeling is:
Andre=1, Beverley=2, Carol=3, Diane=4,
Ed=5, Fernando=6, Garth=7, Heather=8, Ike=9, Jane=10.
"""
description=[
"adjacencylist",
"Krackhardt Kite Social Network",
10,
[[2,3,4,6],[1,4,5,7],[1,4,6],[1,2,3,5,6,7],[2,4,7],
[1,3,4,7,8],[2,4,5,6,8],[6,7,9],[8,10],[9]]
]
G=make_small_undirected_graph(description, create_using)
return G
def moebius_kantor_graph(create_using=None):
"""Return the Moebius-Kantor graph."""
G=LCF_graph(16, [5,-5], 8, create_using)
G.name="Moebius-Kantor Graph"
return G
def octahedral_graph(create_using=None):
"""Return the Platonic Octahedral graph."""
description=[
"adjacencylist",
"Platonic Octahedral Graph",
6,
[[2,3,4,5],[3,4,6],[5,6],[5,6],[6],[]]
]
G=make_small_undirected_graph(description, create_using)
return G
def pappus_graph():
""" Return the Pappus graph."""
G=LCF_graph(18,[5,7,-7,7,-7,-5],3)
G.name="Pappus Graph"
return G
def petersen_graph(create_using=None):
"""Return the Petersen graph."""
description=[
"adjacencylist",
"Petersen Graph",
10,
[[2,5,6],[1,3,7],[2,4,8],[3,5,9],[4,1,10],[1,8,9],[2,9,10],
[3,6,10],[4,6,7],[5,7,8]]
]
G=make_small_undirected_graph(description, create_using)
return G
def sedgewick_maze_graph(create_using=None):
"""
Return a small maze with a cycle.
This is the maze used in Sedgewick,3rd Edition, Part 5, Graph
Algorithms, Chapter 18, e.g. Figure 18.2 and following.
Nodes are numbered 0,..,7
"""
G=empty_graph(0, create_using)
G.add_nodes_from(range(8))
G.add_edges_from([[0,2],[0,7],[0,5]])
G.add_edges_from([[1,7],[2,6]])
G.add_edges_from([[3,4],[3,5]])
G.add_edges_from([[4,5],[4,7],[4,6]])
G.name="Sedgewick Maze"
return G
def tetrahedral_graph(create_using=None):
""" Return the 3-regular Platonic Tetrahedral graph."""
G=complete_graph(4, create_using)
G.name="Platonic Tetrahedral graph"
return G
def truncated_cube_graph(create_using=None):
"""Return the skeleton of the truncated cube."""
description=[
"adjacencylist",
"Truncated Cube Graph",
24,
[[2,3,5],[12,15],[4,5],[7,9],
[6],[17,19],[8,9],[11,13],
[10],[18,21],[12,13],[15],
[14],[22,23],[16],[20,24],
[18,19],[21],[20],[24],
[22],[23],[24],[]]
]
G=make_small_undirected_graph(description, create_using)
return G
def truncated_tetrahedron_graph(create_using=None):
"""Return the skeleton of the truncated Platonic tetrahedron."""
G=path_graph(12, create_using)
# G.add_edges_from([(1,3),(1,10),(2,7),(4,12),(5,12),(6,8),(9,11)])
G.add_edges_from([(0,2),(0,9),(1,6),(3,11),(4,11),(5,7),(8,10)])
G.name="Truncated Tetrahedron Graph"
return G
def tutte_graph(create_using=None):
"""Return the Tutte graph."""
description=[
"adjacencylist",
"Tutte's Graph",
46,
[[2,3,4],[5,27],[11,12],[19,20],[6,34],
[7,30],[8,28],[9,15],[10,39],[11,38],
[40],[13,40],[14,36],[15,16],[35],
[17,23],[18,45],[19,44],[46],[21,46],
[22,42],[23,24],[41],[25,28],[26,33],
[27,32],[34],[29],[30,33],[31],
[32,34],[33],[],[],[36,39],
[37],[38,40],[39],[],[],
[42,45],[43],[44,46],[45],[],[]]
]
G=make_small_undirected_graph(description, create_using)
return G
| bsd-3-clause | 2,325,567,024,006,307,300 | 6,339,469,304,179,659,000 | 30.25122 | 92 | 0.570124 | false |
firebase/grpc-SwiftPM | test/http2_test/http2_server_health_check.py | 13 | 1319 | # Copyright 2017 gRPC 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 writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import argparse
import hyper
import sys
# Utility to healthcheck the http2 server. Used when starting the server to
# verify that the server is live before tests begin.
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--server_host', type=str, default='localhost')
parser.add_argument('--server_port', type=int, default=8080)
args = parser.parse_args()
server_host = args.server_host
server_port = args.server_port
conn = hyper.HTTP20Connection('%s:%d' % (server_host, server_port))
conn.request('POST', '/grpc.testing.TestService/UnaryCall')
resp = conn.get_response()
if resp.headers.get('grpc-encoding') is None:
sys.exit(1)
else:
sys.exit(0)
| apache-2.0 | -6,991,551,170,469,663,000 | -6,414,517,464,594,949,000 | 37.794118 | 75 | 0.714177 | false |
navrasio/mxnet | example/reinforcement-learning/ddpg/ddpg.py | 42 | 13263 | # 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 this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from replay_mem import ReplayMem
from utils import discount_return, sample_rewards
import rllab.misc.logger as logger
import pyprind
import mxnet as mx
import numpy as np
class DDPG(object):
def __init__(
self,
env,
policy,
qfunc,
strategy,
ctx=mx.gpu(0),
batch_size=32,
n_epochs=1000,
epoch_length=1000,
memory_size=1000000,
memory_start_size=1000,
discount=0.99,
max_path_length=1000,
eval_samples=10000,
qfunc_updater="adam",
qfunc_lr=1e-4,
policy_updater="adam",
policy_lr=1e-4,
soft_target_tau=1e-3,
n_updates_per_sample=1,
include_horizon_terminal=False,
seed=12345):
mx.random.seed(seed)
np.random.seed(seed)
self.env = env
self.ctx = ctx
self.policy = policy
self.qfunc = qfunc
self.strategy = strategy
self.batch_size = batch_size
self.n_epochs = n_epochs
self.epoch_length = epoch_length
self.memory_size = memory_size
self.memory_start_size = memory_start_size
self.discount = discount
self.max_path_length = max_path_length
self.eval_samples = eval_samples
self.qfunc_updater = qfunc_updater
self.qfunc_lr = qfunc_lr
self.policy_updater = policy_updater
self.policy_lr = policy_lr
self.soft_target_tau = soft_target_tau
self.n_updates_per_sample = n_updates_per_sample
self.include_horizon_terminal = include_horizon_terminal
self.init_net()
# logging
self.qfunc_loss_averages = []
self.policy_loss_averages = []
self.q_averages = []
self.y_averages = []
self.strategy_path_returns = []
def init_net(self):
# qfunc init
qfunc_init = mx.initializer.Normal()
loss_symbols = self.qfunc.get_loss_symbols()
qval_sym = loss_symbols["qval"]
yval_sym = loss_symbols["yval"]
# define loss here
loss = 1.0 / self.batch_size * mx.symbol.sum(
mx.symbol.square(qval_sym - yval_sym))
qfunc_loss = loss
qfunc_updater = mx.optimizer.get_updater(
mx.optimizer.create(self.qfunc_updater,
learning_rate=self.qfunc_lr))
self.qfunc_input_shapes = {
"obs": (self.batch_size, self.env.observation_space.flat_dim),
"act": (self.batch_size, self.env.action_space.flat_dim),
"yval": (self.batch_size, 1)}
self.qfunc.define_loss(qfunc_loss)
self.qfunc.define_exe(
ctx=self.ctx,
init=qfunc_init,
updater=qfunc_updater,
input_shapes=self.qfunc_input_shapes)
# qfunc_target init
qfunc_target_shapes = {
"obs": (self.batch_size, self.env.observation_space.flat_dim),
"act": (self.batch_size, self.env.action_space.flat_dim)
}
self.qfunc_target = qval_sym.simple_bind(ctx=self.ctx,
**qfunc_target_shapes)
# parameters are not shared but initialized the same
for name, arr in self.qfunc_target.arg_dict.items():
if name not in self.qfunc_input_shapes:
self.qfunc.arg_dict[name].copyto(arr)
# policy init
policy_init = mx.initializer.Normal()
loss_symbols = self.policy.get_loss_symbols()
act_sym = loss_symbols["act"]
policy_qval = qval_sym
# note the negative one here: the loss maximizes the average return
loss = -1.0 / self.batch_size * mx.symbol.sum(policy_qval)
policy_loss = loss
policy_loss = mx.symbol.MakeLoss(policy_loss, name="policy_loss")
policy_updater = mx.optimizer.get_updater(
mx.optimizer.create(self.policy_updater,
learning_rate=self.policy_lr))
self.policy_input_shapes = {
"obs": (self.batch_size, self.env.observation_space.flat_dim)}
self.policy.define_exe(
ctx=self.ctx,
init=policy_init,
updater=policy_updater,
input_shapes=self.policy_input_shapes)
# policy network and q-value network are combined to backpropage
# gradients from the policy loss
# since the loss is different, yval is not needed
args = {}
for name, arr in self.qfunc.arg_dict.items():
if name != "yval":
args[name] = arr
args_grad = {}
policy_grad_dict = dict(zip(self.qfunc.loss.list_arguments(), self.qfunc.exe.grad_arrays))
for name, arr in policy_grad_dict.items():
if name != "yval":
args_grad[name] = arr
self.policy_executor = policy_loss.bind(
ctx=self.ctx,
args=args,
args_grad=args_grad,
grad_req="write")
self.policy_executor_arg_dict = self.policy_executor.arg_dict
self.policy_executor_grad_dict = dict(zip(
policy_loss.list_arguments(),
self.policy_executor.grad_arrays))
# policy_target init
# target policy only needs to produce actions, not loss
# parameters are not shared but initialized the same
self.policy_target = act_sym.simple_bind(ctx=self.ctx,
**self.policy_input_shapes)
for name, arr in self.policy_target.arg_dict.items():
if name not in self.policy_input_shapes:
self.policy.arg_dict[name].copyto(arr)
def train(self):
memory = ReplayMem(
obs_dim=self.env.observation_space.flat_dim,
act_dim=self.env.action_space.flat_dim,
memory_size=self.memory_size)
itr = 0
path_length = 0
path_return = 0
end = False
obs = self.env.reset()
for epoch in xrange(self.n_epochs):
logger.push_prefix("epoch #%d | " % epoch)
logger.log("Training started")
for epoch_itr in pyprind.prog_bar(range(self.epoch_length)):
# run the policy
if end:
# reset the environment and stretegy when an episode ends
obs = self.env.reset()
self.strategy.reset()
# self.policy.reset()
self.strategy_path_returns.append(path_return)
path_length = 0
path_return = 0
# note action is sampled from the policy not the target policy
act = self.strategy.get_action(obs, self.policy)
nxt, rwd, end, _ = self.env.step(act)
path_length += 1
path_return += rwd
if not end and path_length >= self.max_path_length:
end = True
if self.include_horizon_terminal:
memory.add_sample(obs, act, rwd, end)
else:
memory.add_sample(obs, act, rwd, end)
obs = nxt
if memory.size >= self.memory_start_size:
for update_time in xrange(self.n_updates_per_sample):
batch = memory.get_batch(self.batch_size)
self.do_update(itr, batch)
itr += 1
logger.log("Training finished")
if memory.size >= self.memory_start_size:
self.evaluate(epoch, memory)
logger.dump_tabular(with_prefix=False)
logger.pop_prefix()
# self.env.terminate()
# self.policy.terminate()
def do_update(self, itr, batch):
obss, acts, rwds, ends, nxts = batch
self.policy_target.arg_dict["obs"][:] = nxts
self.policy_target.forward(is_train=False)
next_acts = self.policy_target.outputs[0].asnumpy()
policy_acts = self.policy.get_actions(obss)
self.qfunc_target.arg_dict["obs"][:] = nxts
self.qfunc_target.arg_dict["act"][:] = next_acts
self.qfunc_target.forward(is_train=False)
next_qvals = self.qfunc_target.outputs[0].asnumpy()
# executor accepts 2D tensors
rwds = rwds.reshape((-1, 1))
ends = ends.reshape((-1, 1))
ys = rwds + (1.0 - ends) * self.discount * next_qvals
# since policy_executor shares the grad arrays with qfunc
# the update order could not be changed
self.qfunc.update_params(obss, acts, ys)
# in update values all computed
# no need to recompute qfunc_loss and qvals
qfunc_loss = self.qfunc.exe.outputs[0].asnumpy()
qvals = self.qfunc.exe.outputs[1].asnumpy()
self.policy_executor.arg_dict["obs"][:] = obss
self.policy_executor.arg_dict["act"][:] = policy_acts
self.policy_executor.forward(is_train=True)
policy_loss = self.policy_executor.outputs[0].asnumpy()
self.policy_executor.backward()
self.policy.update_params(self.policy_executor_grad_dict["act"])
# update target networks
for name, arr in self.policy_target.arg_dict.items():
if name not in self.policy_input_shapes:
arr[:] = (1.0 - self.soft_target_tau) * arr[:] + \
self.soft_target_tau * self.policy.arg_dict[name][:]
for name, arr in self.qfunc_target.arg_dict.items():
if name not in self.qfunc_input_shapes:
arr[:] = (1.0 - self.soft_target_tau) * arr[:] + \
self.soft_target_tau * self.qfunc.arg_dict[name][:]
self.qfunc_loss_averages.append(qfunc_loss)
self.policy_loss_averages.append(policy_loss)
self.q_averages.append(qvals)
self.y_averages.append(ys)
def evaluate(self, epoch, memory):
if epoch == self.n_epochs - 1:
logger.log("Collecting samples for evaluation")
rewards = sample_rewards(env=self.env,
policy=self.policy,
eval_samples=self.eval_samples,
max_path_length=self.max_path_length)
average_discounted_return = np.mean(
[discount_return(reward, self.discount) for reward in rewards])
returns = [sum(reward) for reward in rewards]
all_qs = np.concatenate(self.q_averages)
all_ys = np.concatenate(self.y_averages)
average_qfunc_loss = np.mean(self.qfunc_loss_averages)
average_policy_loss = np.mean(self.policy_loss_averages)
logger.record_tabular('Epoch', epoch)
if epoch == self.n_epochs - 1:
logger.record_tabular('AverageReturn',
np.mean(returns))
logger.record_tabular('StdReturn',
np.std(returns))
logger.record_tabular('MaxReturn',
np.max(returns))
logger.record_tabular('MinReturn',
np.min(returns))
logger.record_tabular('AverageDiscountedReturn',
average_discounted_return)
if len(self.strategy_path_returns) > 0:
logger.record_tabular('AverageEsReturn',
np.mean(self.strategy_path_returns))
logger.record_tabular('StdEsReturn',
np.std(self.strategy_path_returns))
logger.record_tabular('MaxEsReturn',
np.max(self.strategy_path_returns))
logger.record_tabular('MinEsReturn',
np.min(self.strategy_path_returns))
logger.record_tabular('AverageQLoss', average_qfunc_loss)
logger.record_tabular('AveragePolicyLoss', average_policy_loss)
logger.record_tabular('AverageQ', np.mean(all_qs))
logger.record_tabular('AverageAbsQ', np.mean(np.abs(all_qs)))
logger.record_tabular('AverageY', np.mean(all_ys))
logger.record_tabular('AverageAbsY', np.mean(np.abs(all_ys)))
logger.record_tabular('AverageAbsQYDiff',
np.mean(np.abs(all_qs - all_ys)))
self.qfunc_loss_averages = []
self.policy_loss_averages = []
self.q_averages = []
self.y_averages = []
self.strategy_path_returns = []
| apache-2.0 | -6,675,921,090,371,116,000 | 1,968,163,355,661,469,700 | 38.239645 | 98 | 0.570233 | false |
facebook/buck | docs/soy2html.py | 3 | 3318 | #!/usr/bin/env python
# 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 agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import print_function
import os
import subprocess
import sys
import time
URL_ROOT = "http://localhost:9814/"
def main(output_dir):
# Iterate over the files in the docs directory and copy them, as
# appropriate.
for root, dirs, files in os.walk("."):
for file_name in files:
if file_name.endswith(".soy") and not file_name.startswith("__"):
# Strip the './' prefix, if appropriate.
if root.startswith("./"):
root = root[2:]
# Construct the URL where the .soy file is being served.
soy_file = file_name
html_file = root + "/" + soy_file[: -len(".soy")] + ".html"
url = URL_ROOT + html_file
copy_dest = ensure_dir(html_file, output_dir)
subprocess.check_call(["curl", "--fail", "--output", copy_dest, url])
elif (
file_name == ".nojekyll"
or file_name == "CNAME"
or file_name.endswith(".css")
or file_name.endswith(".jpg")
or file_name.endswith(".js")
or file_name.endswith(".png")
or file_name.endswith(".gif")
or file_name.endswith(".html")
or file_name.endswith(".md")
or file_name.endswith(".svg")
or file_name.endswith(".ttf")
or file_name.endswith(".txt")
):
# Copy the static resource to output_dir.
relative_path = os.path.join(root, file_name)
with open(relative_path, "rb") as resource_file:
resource = resource_file.read()
copy_to_output_dir(relative_path, output_dir, resource)
def ensure_dir(path, output_dir):
last_slash = path.rfind("/")
if last_slash != -1:
output_subdir = os.path.join(output_dir, path[:last_slash])
if not os.path.exists(output_subdir):
os.makedirs(output_subdir)
return os.path.join(output_dir, path)
def copy_to_output_dir(path, output_dir, content):
output_file = ensure_dir(path, output_dir)
with open(output_file, "wb") as f:
f.write(content)
def pollForServerReady():
SERVER_START_POLL = 5
print("Waiting for server to start.")
for _ in range(0, SERVER_START_POLL):
result = subprocess.call(["curl", "--fail", "-I", URL_ROOT])
if result == 0:
return
time.sleep(1)
print("Server failed to start after %s seconds." % SERVER_START_POLL)
if __name__ == "__main__":
output_dir = sys.argv[1]
pollForServerReady()
main(output_dir)
| apache-2.0 | -8,327,005,969,257,951,000 | 5,349,805,728,019,043,000 | 34.297872 | 85 | 0.579867 | false |
looopTools/sw9-source | .waf-1.9.8-6657823688b736c1d1a4e2c4e8e198b4/waflib/extras/wurf/dependency.py | 1 | 2578 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file
import hashlib
import json
import collections
import pprint
class Dependency(object):
def __init__(self,**kwargs):
assert"sha1"not in kwargs
if'recurse'not in kwargs:
kwargs['recurse']=True
if'optional'not in kwargs:
kwargs['optional']=False
if'internal'not in kwargs:
kwargs['internal']=False
hash_attributes=kwargs.copy()
hash_attributes.pop('optional',None)
hash_attributes.pop('internal',None)
s=json.dumps(hash_attributes,sort_keys=True)
sha1=hashlib.sha1(s.encode('utf-8')).hexdigest()
object.__setattr__(self,'info',kwargs)
self.info['sha1']=sha1
self.info['hash']=None
object.__setattr__(self,'read_write',dict())
object.__setattr__(self,'audit',list())
self.error_messages=[]
def rewrite(self,attribute,value,reason):
if value==None:
self.__delete(attribute=attribute,reason=reason)
elif attribute not in self.info:
self.__create(attribute=attribute,value=value,reason=reason)
else:
self.__modify(attribute=attribute,value=value,reason=reason)
def __delete(self,attribute,reason):
if attribute not in self.info:
raise AttributeError("Cannot delete non existing attribute {}".format(attribute))
audit='Deleting "{}". Reason: {}'.format(attribute,reason)
del self.info[attribute]
self.audit.append(audit)
def __create(self,attribute,value,reason):
audit='Creating "{}" value "{}". Reason: {}'.format(attribute,value,reason)
self.audit.append(audit)
self.info[attribute]=value
def __modify(self,attribute,value,reason):
audit='Modifying "{}" from "{}" to "{}". Reason: {}'.format(attribute,self.info[attribute],value,reason)
self.audit.append(audit)
self.info[attribute]=value
def __getattr__(self,attribute):
if attribute in self.info:
return self.info[attribute]
elif attribute in self.read_write:
return self.read_write[attribute]
else:
return None
def __setattr__(self,attribute,value):
if attribute in self.info:
raise AttributeError("Attribute {} read-only.".format(attribute))
else:
self.read_write[attribute]=value
def __contains__(self,attribute):
return(attribute in self.info)or(attribute in self.read_write)
def __str__(self):
return"Dependency info:\n{}\nread_write: {}\naudit: {}".format(pprint.pformat(self.info,indent=2),pprint.pformat(self.read_write,indent=2),pprint.pformat(self.audit,indent=2))
def __hash__(self):
if not self.info['hash']:
self.info['hash']=hash(self.info['sha1'])
return self.info['hash']
| mit | 2,335,562,972,061,955,000 | 6,860,689,248,159,136,000 | 36.362319 | 177 | 0.713732 | false |
guijomatos/SickRage | sickbeard/providers/bitsoup.py | 7 | 10171 | # Author: Idan Gutman
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of SickRage.
#
# SickRage 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.
#
# SickRage is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with SickRage. If not, see <http://www.gnu.org/licenses/>.
import re
import traceback
import datetime
import sickbeard
import generic
from sickbeard.common import Quality
from sickbeard import logger
from sickbeard import tvcache
from sickbeard import db
from sickbeard import classes
from sickbeard import helpers
from sickbeard import show_name_helpers
from sickbeard.helpers import sanitizeSceneName
from sickbeard.bs4_parser import BS4Parser
from sickrage.helper.exceptions import AuthException
class BitSoupProvider(generic.TorrentProvider):
def __init__(self):
generic.TorrentProvider.__init__(self, "BitSoup")
self.urls = {
'base_url': 'https://www.bitsoup.me',
'login': 'https://www.bitsoup.me/takelogin.php',
'detail': 'https://www.bitsoup.me/details.php?id=%s',
'search': 'https://www.bitsoup.me/browse.php',
'download': 'https://bitsoup.me/%s',
}
self.url = self.urls['base_url']
self.supportsBacklog = True
self.public = False
self.enabled = False
self.username = None
self.password = None
self.ratio = None
self.minseed = None
self.minleech = None
self.cache = BitSoupCache(self)
self.search_params = {
"c42": 1, "c45": 1, "c49": 1, "c7": 1
}
def isEnabled(self):
return self.enabled
def imageName(self):
return 'bitsoup.png'
def getQuality(self, item, anime=False):
quality = Quality.sceneQuality(item[0], anime)
return quality
def _checkAuth(self):
if not self.username or not self.password:
raise AuthException("Your authentication credentials for " + self.name + " are missing, check your config.")
return True
def _doLogin(self):
login_params = {
'username': self.username,
'password': self.password,
'ssl': 'yes'
}
response = self.getURL(self.urls['login'], post_data=login_params, timeout=30)
if not response:
logger.log(u'Unable to connect to ' + self.name + ' provider.', logger.ERROR)
return False
if re.search('Username or password incorrect', response):
logger.log(u'Invalid username or password for ' + self.name + ' Check your settings', logger.ERROR)
return False
return True
def _get_season_search_strings(self, ep_obj):
search_string = {'Season': []}
for show_name in set(show_name_helpers.allPossibleShowNames(self.show)):
if ep_obj.show.air_by_date or ep_obj.show.sports:
ep_string = show_name + ' ' + str(ep_obj.airdate).split('-')[0]
elif ep_obj.show.anime:
ep_string = show_name + ' ' + "%d" % ep_obj.scene_absolute_number
else:
ep_string = show_name + ' S%02d' % int(ep_obj.scene_season) #1) showName SXX
search_string['Season'].append(ep_string)
return [search_string]
def _get_episode_search_strings(self, ep_obj, add_string=''):
search_string = {'Episode': []}
if not ep_obj:
return []
if self.show.air_by_date:
for show_name in set(show_name_helpers.allPossibleShowNames(self.show)):
ep_string = sanitizeSceneName(show_name) + ' ' + \
str(ep_obj.airdate).replace('-', '|')
search_string['Episode'].append(ep_string)
elif self.show.sports:
for show_name in set(show_name_helpers.allPossibleShowNames(self.show)):
ep_string = sanitizeSceneName(show_name) + ' ' + \
str(ep_obj.airdate).replace('-', '|') + '|' + \
ep_obj.airdate.strftime('%b')
search_string['Episode'].append(ep_string)
elif self.show.anime:
for show_name in set(show_name_helpers.allPossibleShowNames(self.show)):
ep_string = sanitizeSceneName(show_name) + ' ' + \
"%i" % int(ep_obj.scene_absolute_number)
search_string['Episode'].append(ep_string)
else:
for show_name in set(show_name_helpers.allPossibleShowNames(self.show)):
ep_string = sanitizeSceneName(show_name) + ' ' + \
sickbeard.config.naming_ep_type[2] % {'seasonnumber': ep_obj.scene_season,
'episodenumber': ep_obj.scene_episode} + ' %s' % add_string
search_string['Episode'].append(re.sub('\s+', ' ', ep_string))
return [search_string]
def _doSearch(self, search_strings, search_mode='eponly', epcount=0, age=0, epObj=None):
results = []
items = {'Season': [], 'Episode': [], 'RSS': []}
if not self._doLogin():
return results
for mode in search_strings.keys():
for search_string in search_strings[mode]:
logger.log(u"Search string: " + search_string, logger.DEBUG)
self.search_params['search'] = search_string
data = self.getURL(self.urls['search'], params=self.search_params)
if not data:
continue
try:
with BS4Parser(data, "html.parser") as html:
torrent_table = html.find('table', attrs={'class': 'koptekst'})
torrent_rows = torrent_table.find_all('tr') if torrent_table else []
#Continue only if one Release is found
if len(torrent_rows) < 2:
logger.log(u"The Data returned from " + self.name + " do not contains any torrent",
logger.DEBUG)
continue
for result in torrent_rows[1:]:
cells = result.find_all('td')
link = cells[1].find('a')
download_url = self.urls['download'] % cells[2].find('a')['href']
id = link['href']
id = id.replace('details.php?id=','')
id = id.replace('&hit=1', '')
try:
title = link.getText()
id = int(id)
seeders = int(cells[10].getText())
leechers = int(cells[11].getText())
except (AttributeError, TypeError):
continue
#Filter unseeded torrent
if seeders < self.minseed or leechers < self.minleech:
continue
if not title or not download_url:
continue
item = title, download_url, id, seeders, leechers
logger.log(u"Found result: " + title.replace(' ','.') + " (" + search_string + ")", logger.DEBUG)
items[mode].append(item)
except Exception, e:
logger.log(u"Failed parsing " + self.name + " Traceback: " + traceback.format_exc(), logger.ERROR)
#For each search mode sort all the items by seeders
items[mode].sort(key=lambda tup: tup[3], reverse=True)
results += items[mode]
return results
def _get_title_and_url(self, item):
title, url, id, seeders, leechers = item
if title:
title = self._clean_title_from_provider(title)
if url:
url = str(url).replace('&', '&')
return (title, url)
def findPropers(self, search_date=datetime.datetime.today()):
results = []
myDB = db.DBConnection()
sqlResults = myDB.select(
'SELECT s.show_name, e.showid, e.season, e.episode, e.status, e.airdate FROM tv_episodes AS e' +
' INNER JOIN tv_shows AS s ON (e.showid = s.indexer_id)' +
' WHERE e.airdate >= ' + str(search_date.toordinal()) +
' AND (e.status IN (' + ','.join([str(x) for x in Quality.DOWNLOADED]) + ')' +
' OR (e.status IN (' + ','.join([str(x) for x in Quality.SNATCHED]) + ')))'
)
for sqlshow in sqlResults or []:
self.show = helpers.findCertainShow(sickbeard.showList, int(sqlshow["showid"]))
if self.show:
curEp = self.show.getEpisode(int(sqlshow["season"]), int(sqlshow["episode"]))
searchString = self._get_episode_search_strings(curEp, add_string='PROPER|REPACK')
for item in self._doSearch(searchString[0]):
title, url = self._get_title_and_url(item)
results.append(classes.Proper(title, url, datetime.datetime.today(), self.show))
return results
def seedRatio(self):
return self.ratio
class BitSoupCache(tvcache.TVCache):
def __init__(self, provider):
tvcache.TVCache.__init__(self, provider)
# only poll TorrentBytes every 20 minutes max
self.minTime = 20
def _getRSSData(self):
search_strings = {'RSS': ['']}
return {'entries': self.provider._doSearch(search_strings)}
provider = BitSoupProvider()
| gpl-3.0 | -99,175,235,367,342,060 | -5,225,958,678,082,498,000 | 36.25641 | 125 | 0.545669 | false |
Qalthos/ansible | test/integration/targets/want_json_modules_posix/library/helloworld.py | 62 | 1047 | #!/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 distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# WANT_JSON
import json
import sys
try:
with open(sys.argv[1], 'r') as f:
data = json.load(f)
except (IOError, OSError, IndexError):
print(json.dumps(dict(msg="No argument file provided", failed=True)))
sys.exit(1)
salutation = data.get('salutation', 'Hello')
name = data.get('name', 'World')
print(json.dumps(dict(msg='%s, %s!' % (salutation, name))))
| gpl-3.0 | 6,649,132,589,630,236,000 | 754,383,102,674,671,400 | 32.774194 | 73 | 0.718243 | false |
SuperDARNCanada/placeholderOS | experiments/testing_archive/test_scanbound_not_increasing.py | 2 | 1568 | #!/usr/bin/python
# write an experiment that raises an exception
import sys
import os
BOREALISPATH = os.environ['BOREALISPATH']
sys.path.append(BOREALISPATH)
import experiments.superdarn_common_fields as scf
from experiment_prototype.experiment_prototype import ExperimentPrototype
class TestExperiment(ExperimentPrototype):
def __init__(self):
cpid = 1
super(TestExperiment, self).__init__(cpid)
if scf.IS_FORWARD_RADAR:
beams_to_use = scf.STD_16_FORWARD_BEAM_ORDER
else:
beams_to_use = scf.STD_16_REVERSE_BEAM_ORDER
if scf.opts.site_id in ["cly", "rkn", "inv"]:
num_ranges = scf.POLARDARN_NUM_RANGES
if scf.opts.site_id in ["sas", "pgr"]:
num_ranges = scf.STD_NUM_RANGES
slice_1 = { # slice_id = 0, there is only one slice.
"pulse_sequence": scf.SEQUENCE_7P,
"tau_spacing": scf.TAU_SPACING_7P,
"pulse_len": scf.PULSE_LEN_45KM,
"num_ranges": num_ranges,
"first_range": scf.STD_FIRST_RANGE,
"intt": 3500, # duration of an integration, in ms
"beam_angle": scf.STD_16_BEAM_ANGLE,
"beam_order": beams_to_use,
"scanbound": [i * 3.5 for i in range(len(beams_to_use)-1, -1, -1)], # Not increasing, should fail
"txfreq" : scf.COMMON_MODE_FREQ_1, #kHz
"acf": True,
"xcf": True, # cross-correlation processing
"acfint": True, # interferometer acfs
}
self.add_slice(slice_1)
| gpl-3.0 | 377,085,330,871,151,940 | -4,513,674,752,852,260,400 | 33.086957 | 110 | 0.586735 | false |
JamiiTech/mplh5canvas | examples/multi_plot.py | 4 | 1357 | #!/usr/bin/python
"""Testbed for the animation functionality of the backend, with multiple figures.
It basically produces an long series of frames that get animated on the client
browser side, this time with two figures.
"""
import matplotlib
matplotlib.use('module://mplh5canvas.backend_h5canvas')
from pylab import *
import time
def refresh_data(ax):
t = arange(0.0 + count, 2.0 + count, 0.01)
s = sin(2*pi*t)
ax.lines[0].set_xdata(t)
ax.lines[0].set_ydata(s)
ax.set_xlim(t[0],t[-1])
t = arange(0.0, 2.0, 0.01)
s = sin(2*pi*t)
plot(t, s, linewidth=1.0)
xlabel('time (s)')
ylabel('voltage (mV)')
title('Frist Post')
f = gcf()
ax = f.gca()
count = 0
f2 = figure()
ax2 = f2.gca()
ax2.set_xlabel('IMDB rating')
ax2.set_ylabel('South African Connections')
ax2.set_title('Luds chart...')
ax2.plot(arange(0.0, 5 + count, 0.01), arange(0.0, 5 + count, 0.01))
show(block=False, layout=2)
# show the figure manager but don't block script execution so animation works..
# layout=2 overrides the default layout manager which only shows a single plot in the browser window
while True:
refresh_data(ax)
d = arange(0.0, 5 + count, 0.01)
ax2.lines[0].set_xdata(d)
ax2.lines[0].set_ydata(d)
ax2.set_xlim(d[0],d[-1])
ax2.set_ylim(d[0],d[-1])
f.canvas.draw()
f2.canvas.draw()
count += 0.01
time.sleep(1)
| bsd-3-clause | -8,922,015,146,225,430,000 | -604,308,636,949,806,600 | 25.096154 | 101 | 0.661017 | false |
Artanicus/python-cozify | util/device-fade-test.py | 1 | 1301 | #!/usr/bin/env python3
from cozify import hub
import numpy, time
from absl import flags, app
FLAGS = flags.FLAGS
flags.DEFINE_string('device', None, 'Device to operate on.')
flags.DEFINE_float('delay', 0.5, 'Step length in seconds.')
flags.DEFINE_float('steps', 20, 'Amount of steps to divide into.')
flags.DEFINE_bool('verify', False, 'Verify if value went through as-is.')
green = '\u001b[32m'
yellow = '\u001b[33m'
red = '\u001b[31m'
reset = '\u001b[0m'
def main(argv):
del argv
previous = None
for step in numpy.flipud(numpy.linspace(0.0, 1.0, num=FLAGS.steps)):
hub.light_brightness(FLAGS.device, step)
time.sleep(FLAGS.delay)
read = 'N/A'
result = '?'
if FLAGS.verify:
devs = hub.devices()
read = devs[FLAGS.device]['state']['brightness']
if step == read:
result = '✔'
color = green
else:
result = '✖'
if read == previous:
color = yellow
else:
color = red
previous = step
print('{3}[{2}] set: {0} vs. read: {1}{4}'.format(step, read, result, color, reset))
if __name__ == "__main__":
flags.mark_flag_as_required('device')
app.run(main)
| mit | 4,136,685,018,950,660,000 | -8,349,391,726,274,149,000 | 27.822222 | 92 | 0.54973 | false |
tdent/pycbc | pycbc/results/table_utils.py | 6 | 4698 | # Copyright (C) 2014 Alex Nitz
#
# 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, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# =============================================================================
#
# Preamble
#
# =============================================================================
#
""" This module provides functions to generate sortable html tables
"""
import mako.template, uuid
google_table_template = mako.template.Template("""
<script type='text/javascript' src='https://www.google.com/jsapi'></script>
<script type='text/javascript'>
google.load('visualization', '1', {packages:['table']});
google.setOnLoadCallback(drawTable);
function drawTable() {
var data = new google.visualization.DataTable();
% for type, name in column_descriptions:
data.addColumn('${str(type)}', '${str(name)}');
% endfor
data.addRows(${data});
% if format_strings is not None:
% for i, format_string in enumerate(format_strings):
% if format_string is not None:
var formatter = new google.visualization.NumberFormat({pattern:'${format_string}'});
formatter.format(data, ${i});
% endif
% endfor
% endif
var table = new google.visualization.Table(document.getElementById('${div_id}'));
table.draw(data, {showRowNumber: 'true',
page: '${page_enable}',
allowHtml: 'true',
pageSize: ${page_size}});
}
</script>
<div id='${div_id}'></div>
""")
def html_table(columns, names, page_size=None, format_strings=None):
""" Return an html table of this data
Parameters
----------
columns : list of numpy arrays
names : list of strings
The list of columns names
page_size : {int, None}, optional
The number of items to show on each page of the table
format_strings : {lists of strings, None}, optional
The ICU format string for this column, None for no formatting. All
columns must have a format string if provided.
Returns
-------
html_table : str
A str containing the html code to display a table of this data
"""
if page_size is None:
page = 'disable'
else:
page = 'enable'
div_id = uuid.uuid4()
column_descriptions = []
for column, name in zip(columns, names):
if column.dtype.kind == 'S':
ctype = 'string'
else:
ctype = 'number'
column_descriptions.append((ctype, name))
data = []
for item in zip(*columns):
data.append(list(item))
return google_table_template.render(div_id=div_id,
page_enable=page,
column_descriptions = column_descriptions,
page_size=page_size,
data=data,
format_strings=format_strings,
)
static_table_template = mako.template.Template("""
<table class="table">
% if titles is not None:
<tr>
% for i in range(len(titles)):
<th>
${titles[i]}
</th>
% endfor
</tr>
% endif
% for i in range(len(data)):
<tr>
% for j in range(len(data[i])):
<td>
${data[i][j]}
</td>
% endfor
</tr>
% endfor
</table>
""")
def static_table(data, titles=None):
""" Return an html tableo of this data
Parameters
----------
data : two-dimensional numpy string array
Array containing the cell values
titles : numpy array
Vector str of titles
Returns
-------
html_table : str
A string containing the html table.
"""
return static_table_template.render(data=data, titles=titles)
| gpl-3.0 | 178,043,851,663,971,620 | -4,677,762,165,581,072,000 | 31.625 | 104 | 0.540017 | false |
BreakawayLabs/mom | test/test_bit_reproducibility.py | 3 | 1736 |
from __future__ import print_function
import os
import sys
import re
from model_test_setup import ModelTestSetup
from test_run import tests as test_specs
class TestBitReproducibility(ModelTestSetup):
def __init__(self):
super(TestBitReproducibility, self).__init__()
def checksums_to_dict(self, filename):
"""
Look at each line and make a dictionary entry.
"""
regex = re.compile(r'\[chksum\]\s+(.*)\s+(-?[0-9]+)$')
dict = {}
with open(filename) as f:
for line in f:
m = regex.match(line)
if m is not None:
dict[m.group(1).rstrip()] = int(m.group(2))
return dict
def expected_checksums(self, test_name):
filename = os.path.join(self.my_dir, 'checksums',
'{}.txt'.format(test_name))
return self.checksums_to_dict(filename)
def produced_checksums(self, test_name):
"""
Extract checksums from model run output.
"""
filename = os.path.join(self.work_dir, test_name, 'fms.out')
return self.checksums_to_dict(filename)
def check_run(self, key):
# Compare expected to produced.
expected = self.expected_checksums(key)
produced = self.produced_checksums(key)
for k in expected:
assert(k in produced)
if expected[k] != produced[k]:
print('{}: expected {}, produced {}'.format(key, expected[k],
produced[k]))
assert(expected[k] == produced[k])
def test_checksums(self):
for k in test_specs.keys():
yield self.check_run, k
| gpl-2.0 | -7,297,082,251,092,273,000 | -996,744,301,280,223,600 | 26.125 | 77 | 0.546083 | false |
vericred/vericred-python | vericred_client/models/network_comparison_response.py | 1 | 13134 | # coding: utf-8
"""
Vericred API
Vericred's API allows you to search for Health Plans that a specific doctor
accepts.
## Getting Started
Visit our [Developer Portal](https://developers.vericred.com) to
create an account.
Once you have created an account, you can create one Application for
Production and another for our Sandbox (select the appropriate Plan when
you create the Application).
## SDKs
Our API follows standard REST conventions, so you can use any HTTP client
to integrate with us. You will likely find it easier to use one of our
[autogenerated SDKs](https://github.com/vericred/?query=vericred-),
which we make available for several common programming languages.
## Authentication
To authenticate, pass the API Key you created in the Developer Portal as
a `Vericred-Api-Key` header.
`curl -H 'Vericred-Api-Key: YOUR_KEY' "https://api.vericred.com/providers?search_term=Foo&zip_code=11215"`
## Versioning
Vericred's API default to the latest version. However, if you need a specific
version, you can request it with an `Accept-Version` header.
The current version is `v3`. Previous versions are `v1` and `v2`.
`curl -H 'Vericred-Api-Key: YOUR_KEY' -H 'Accept-Version: v2' "https://api.vericred.com/providers?search_term=Foo&zip_code=11215"`
## Pagination
Endpoints that accept `page` and `per_page` parameters are paginated. They expose
four additional fields that contain data about your position in the response,
namely `Total`, `Per-Page`, `Link`, and `Page` as described in [RFC-5988](https://tools.ietf.org/html/rfc5988).
For example, to display 5 results per page and view the second page of a
`GET` to `/networks`, your final request would be `GET /networks?....page=2&per_page=5`.
## Sideloading
When we return multiple levels of an object graph (e.g. `Provider`s and their `State`s
we sideload the associated data. In this example, we would provide an Array of
`State`s and a `state_id` for each provider. This is done primarily to reduce the
payload size since many of the `Provider`s will share a `State`
```
{
providers: [{ id: 1, state_id: 1}, { id: 2, state_id: 1 }],
states: [{ id: 1, code: 'NY' }]
}
```
If you need the second level of the object graph, you can just match the
corresponding id.
## Selecting specific data
All endpoints allow you to specify which fields you would like to return.
This allows you to limit the response to contain only the data you need.
For example, let's take a request that returns the following JSON by default
```
{
provider: {
id: 1,
name: 'John',
phone: '1234567890',
field_we_dont_care_about: 'value_we_dont_care_about'
},
states: [{
id: 1,
name: 'New York',
code: 'NY',
field_we_dont_care_about: 'value_we_dont_care_about'
}]
}
```
To limit our results to only return the fields we care about, we specify the
`select` query string parameter for the corresponding fields in the JSON
document.
In this case, we want to select `name` and `phone` from the `provider` key,
so we would add the parameters `select=provider.name,provider.phone`.
We also want the `name` and `code` from the `states` key, so we would
add the parameters `select=states.name,states.code`. The id field of
each document is always returned whether or not it is requested.
Our final request would be `GET /providers/12345?select=provider.name,provider.phone,states.name,states.code`
The response would be
```
{
provider: {
id: 1,
name: 'John',
phone: '1234567890'
},
states: [{
id: 1,
name: 'New York',
code: 'NY'
}]
}
```
## Benefits summary format
Benefit cost-share strings are formatted to capture:
* Network tiers
* Compound or conditional cost-share
* Limits on the cost-share
* Benefit-specific maximum out-of-pocket costs
**Example #1**
As an example, we would represent [this Summary of Benefits & Coverage](https://s3.amazonaws.com/vericred-data/SBC/2017/33602TX0780032.pdf) as:
* **Hospital stay facility fees**:
- Network Provider: `$400 copay/admit plus 20% coinsurance`
- Out-of-Network Provider: `$1,500 copay/admit plus 50% coinsurance`
- Vericred's format for this benefit: `In-Network: $400 before deductible then 20% after deductible / Out-of-Network: $1,500 before deductible then 50% after deductible`
* **Rehabilitation services:**
- Network Provider: `20% coinsurance`
- Out-of-Network Provider: `50% coinsurance`
- Limitations & Exceptions: `35 visit maximum per benefit period combined with Chiropractic care.`
- Vericred's format for this benefit: `In-Network: 20% after deductible / Out-of-Network: 50% after deductible | limit: 35 visit(s) per Benefit Period`
**Example #2**
In [this other Summary of Benefits & Coverage](https://s3.amazonaws.com/vericred-data/SBC/2017/40733CA0110568.pdf), the **specialty_drugs** cost-share has a maximum out-of-pocket for in-network pharmacies.
* **Specialty drugs:**
- Network Provider: `40% coinsurance up to a $500 maximum for up to a 30 day supply`
- Out-of-Network Provider `Not covered`
- Vericred's format for this benefit: `In-Network: 40% after deductible, up to $500 per script / Out-of-Network: 100%`
**BNF**
Here's a description of the benefits summary string, represented as a context-free grammar:
```
root ::= coverage
coverage ::= (simple_coverage | tiered_coverage) (space pipe space coverage_modifier)?
tiered_coverage ::= tier (space slash space tier)*
tier ::= tier_name colon space (tier_coverage | not_applicable)
tier_coverage ::= simple_coverage (space (then | or | and) space simple_coverage)* tier_limitation?
simple_coverage ::= (pre_coverage_limitation space)? coverage_amount (space post_coverage_limitation)? (comma? space coverage_condition)?
coverage_modifier ::= limit_condition colon space (((simple_coverage | simple_limitation) (semicolon space see_carrier_documentation)?) | see_carrier_documentation | waived_if_admitted | shared_across_tiers)
waived_if_admitted ::= ("copay" space)? "waived if admitted"
simple_limitation ::= pre_coverage_limitation space "copay applies"
tier_name ::= "In-Network-Tier-2" | "Out-of-Network" | "In-Network"
limit_condition ::= "limit" | "condition"
tier_limitation ::= comma space "up to" space (currency | (integer space time_unit plural?)) (space post_coverage_limitation)?
coverage_amount ::= currency | unlimited | included | unknown | percentage | (digits space (treatment_unit | time_unit) plural?)
pre_coverage_limitation ::= first space digits space time_unit plural?
post_coverage_limitation ::= (((then space currency) | "per condition") space)? "per" space (treatment_unit | (integer space time_unit) | time_unit) plural?
coverage_condition ::= ("before deductible" | "after deductible" | "penalty" | allowance | "in-state" | "out-of-state") (space allowance)?
allowance ::= upto_allowance | after_allowance
upto_allowance ::= "up to" space (currency space)? "allowance"
after_allowance ::= "after" space (currency space)? "allowance"
see_carrier_documentation ::= "see carrier documentation for more information"
shared_across_tiers ::= "shared across all tiers"
unknown ::= "unknown"
unlimited ::= /[uU]nlimited/
included ::= /[iI]ncluded in [mM]edical/
time_unit ::= /[hH]our/ | (((/[cC]alendar/ | /[cC]ontract/) space)? /[yY]ear/) | /[mM]onth/ | /[dD]ay/ | /[wW]eek/ | /[vV]isit/ | /[lL]ifetime/ | ((((/[bB]enefit/ plural?) | /[eE]ligibility/) space)? /[pP]eriod/)
treatment_unit ::= /[pP]erson/ | /[gG]roup/ | /[cC]ondition/ | /[sS]cript/ | /[vV]isit/ | /[eE]xam/ | /[iI]tem/ | /[sS]tay/ | /[tT]reatment/ | /[aA]dmission/ | /[eE]pisode/
comma ::= ","
colon ::= ":"
semicolon ::= ";"
pipe ::= "|"
slash ::= "/"
plural ::= "(s)" | "s"
then ::= "then" | ("," space) | space
or ::= "or"
and ::= "and"
not_applicable ::= "Not Applicable" | "N/A" | "NA"
first ::= "first"
currency ::= "$" number
percentage ::= number "%"
number ::= float | integer
float ::= digits "." digits
integer ::= /[0-9]/+ (comma_int | under_int)*
comma_int ::= ("," /[0-9]/*3) !"_"
under_int ::= ("_" /[0-9]/*3) !","
digits ::= /[0-9]/+ ("_" /[0-9]/+)*
space ::= /[ \t]/+
```
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
from pprint import pformat
from six import iteritems
import re
class NetworkComparisonResponse(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self, networks=None, network_comparisons=None):
"""
NetworkComparisonResponse - a model defined in Swagger
:param dict swaggerTypes: The key is attribute name
and the value is attribute type.
:param dict attributeMap: The key is attribute name
and the value is json key in definition.
"""
self.swagger_types = {
'networks': 'list[Network]',
'network_comparisons': 'list[NetworkComparison]'
}
self.attribute_map = {
'networks': 'networks',
'network_comparisons': 'network_comparisons'
}
self._networks = networks
self._network_comparisons = network_comparisons
@property
def networks(self):
"""
Gets the networks of this NetworkComparisonResponse.
Networks
:return: The networks of this NetworkComparisonResponse.
:rtype: list[Network]
"""
return self._networks
@networks.setter
def networks(self, networks):
"""
Sets the networks of this NetworkComparisonResponse.
Networks
:param networks: The networks of this NetworkComparisonResponse.
:type: list[Network]
"""
self._networks = networks
@property
def network_comparisons(self):
"""
Gets the network_comparisons of this NetworkComparisonResponse.
NetworkComparisons
:return: The network_comparisons of this NetworkComparisonResponse.
:rtype: list[NetworkComparison]
"""
return self._network_comparisons
@network_comparisons.setter
def network_comparisons(self, network_comparisons):
"""
Sets the network_comparisons of this NetworkComparisonResponse.
NetworkComparisons
:param network_comparisons: The network_comparisons of this NetworkComparisonResponse.
:type: list[NetworkComparison]
"""
self._network_comparisons = network_comparisons
def to_dict(self):
"""
Returns the model properties as a dict
"""
result = {}
for attr, _ in iteritems(self.swagger_types):
value = getattr(self, attr)
if isinstance(value, list):
result[attr] = list(map(
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
value
))
elif hasattr(value, "to_dict"):
result[attr] = value.to_dict()
elif isinstance(value, dict):
result[attr] = dict(map(
lambda item: (item[0], item[1].to_dict())
if hasattr(item[1], "to_dict") else item,
value.items()
))
else:
result[attr] = value
return result
def to_str(self):
"""
Returns the string representation of the model
"""
return pformat(self.to_dict())
def __repr__(self):
"""
For `print` and `pprint`
"""
return self.to_str()
def __eq__(self, other):
"""
Returns true if both objects are equal
"""
return self.__dict__ == other.__dict__
def __ne__(self, other):
"""
Returns true if both objects are not equal
"""
return not self == other
| apache-2.0 | 2,242,162,062,046,834,000 | 3,338,235,285,508,725,000 | 36.741379 | 228 | 0.62677 | false |
emilio/servo | tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/opera.py | 15 | 3783 | from .base import Browser, ExecutorBrowser, require_arg
from .base import get_timeout_multiplier # noqa: F401
from ..webdriver_server import OperaDriverServer
from ..executors import executor_kwargs as base_executor_kwargs
from ..executors.executorselenium import (SeleniumTestharnessExecutor, # noqa: F401
SeleniumRefTestExecutor) # noqa: F401
from ..executors.executoropera import OperaDriverWdspecExecutor # noqa: F401
__wptrunner__ = {"product": "opera",
"check_args": "check_args",
"browser": "OperaBrowser",
"executor": {"testharness": "SeleniumTestharnessExecutor",
"reftest": "SeleniumRefTestExecutor",
"wdspec": "OperaDriverWdspecExecutor"},
"browser_kwargs": "browser_kwargs",
"executor_kwargs": "executor_kwargs",
"env_extras": "env_extras",
"env_options": "env_options",
"timeout_multiplier": "get_timeout_multiplier"}
def check_args(**kwargs):
require_arg(kwargs, "webdriver_binary")
def browser_kwargs(test_type, run_info_data, config, **kwargs):
return {"binary": kwargs["binary"],
"webdriver_binary": kwargs["webdriver_binary"],
"webdriver_args": kwargs.get("webdriver_args")}
def executor_kwargs(test_type, server_config, cache_manager, run_info_data,
**kwargs):
from selenium.webdriver import DesiredCapabilities
executor_kwargs = base_executor_kwargs(test_type, server_config,
cache_manager, run_info_data, **kwargs)
executor_kwargs["close_after_done"] = True
capabilities = dict(DesiredCapabilities.OPERA.items())
capabilities.setdefault("operaOptions", {})["prefs"] = {
"profile": {
"default_content_setting_values": {
"popups": 1
}
}
}
for (kwarg, capability) in [("binary", "binary"), ("binary_args", "args")]:
if kwargs[kwarg] is not None:
capabilities["operaOptions"][capability] = kwargs[kwarg]
if test_type == "testharness":
capabilities["operaOptions"]["useAutomationExtension"] = False
capabilities["operaOptions"]["excludeSwitches"] = ["enable-automation"]
if test_type == "wdspec":
capabilities["operaOptions"]["w3c"] = True
executor_kwargs["capabilities"] = capabilities
return executor_kwargs
def env_extras(**kwargs):
return []
def env_options():
return {}
class OperaBrowser(Browser):
"""Opera is backed by operadriver, which is supplied through
``wptrunner.webdriver.OperaDriverServer``.
"""
def __init__(self, logger, binary, webdriver_binary="operadriver",
webdriver_args=None):
"""Creates a new representation of Opera. The `binary` argument gives
the browser binary to use for testing."""
Browser.__init__(self, logger)
self.binary = binary
self.server = OperaDriverServer(self.logger,
binary=webdriver_binary,
args=webdriver_args)
def start(self, **kwargs):
self.server.start(block=False)
def stop(self, force=False):
self.server.stop(force=force)
def pid(self):
return self.server.pid
def is_alive(self):
# TODO(ato): This only indicates the driver is alive,
# and doesn't say anything about whether a browser session
# is active.
return self.server.is_alive()
def cleanup(self):
self.stop()
def executor_browser(self):
return ExecutorBrowser, {"webdriver_url": self.server.url}
| mpl-2.0 | -7,811,374,737,423,151,000 | 1,717,022,274,156,025,600 | 36.088235 | 84 | 0.602961 | false |
rooi/CouchPotatoServer | couchpotato/core/plugins/trailer/main.py | 8 | 1661 | from couchpotato.core.event import addEvent, fireEvent
from couchpotato.core.helpers.variable import getExt, getTitle
from couchpotato.core.logger import CPLog
from couchpotato.core.plugins.base import Plugin
import os
log = CPLog(__name__)
class Trailer(Plugin):
def __init__(self):
addEvent('renamer.after', self.searchSingle)
def searchSingle(self, message = None, group = None):
if not group: group = {}
if self.isDisabled() or len(group['files']['trailer']) > 0: return
trailers = fireEvent('trailer.search', group = group, merge = True)
if not trailers or trailers == []:
log.info('No trailers found for: %s', getTitle(group['library']))
return False
for trailer in trailers.get(self.conf('quality'), []):
ext = getExt(trailer)
filename = self.conf('name').replace('<filename>', group['filename']) + ('.%s' % ('mp4' if len(ext) > 5 else ext))
destination = os.path.join(group['destination_dir'], filename)
if not os.path.isfile(destination):
trailer_file = fireEvent('file.download', url = trailer, dest = destination, urlopen_kwargs = {'headers': {'User-Agent': 'Quicktime'}}, single = True)
if os.path.getsize(trailer_file) < (1024 * 1024): # Don't trust small trailers (1MB), try next one
os.unlink(trailer_file)
continue
else:
log.debug('Trailer already exists: %s', destination)
group['renamed_files'].append(destination)
# Download first and break
break
return True
| gpl-3.0 | 4,668,406,103,275,654,000 | -819,590,975,437,845,100 | 38.547619 | 166 | 0.605057 | false |
calamityman/ansible-modules-extras | cloud/amazon/ec2_vpc_vgw.py | 43 | 20238 | #!/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 distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
DOCUMENTATION = '''
module: ec2_vpc_vgw
short_description: Create and delete AWS VPN Virtual Gateways.
description:
- Creates AWS VPN Virtual Gateways
- Deletes AWS VPN Virtual Gateways
- Attaches Virtual Gateways to VPCs
- Detaches Virtual Gateways from VPCs
version_added: "2.2"
requirements: [ boto3 ]
options:
state:
description:
- present to ensure resource is created.
- absent to remove resource
required: false
default: present
choices: [ "present", "absent"]
name:
description:
- name of the vgw to be created or deleted
required: false
type:
description:
- type of the virtual gateway to be created
required: false
choices: [ "ipsec.1" ]
vpn_gateway_id:
description:
- vpn gateway id of an existing virtual gateway
required: false
vpc_id:
description:
- the vpc-id of a vpc to attach or detach
required: false
wait_timeout:
description:
- number of seconds to wait for status during vpc attach and detach
required: false
default: 320
tags:
description:
- dictionary of resource tags
required: false
default: null
aliases: [ "resource_tags" ]
author: Nick Aslanidis (@naslanidis)
extends_documentation_fragment:
- aws
- ec2
'''
EXAMPLES = '''
- name: Create a new vgw attached to a specific VPC
ec2_vpc_vgw:
state: present
region: ap-southeast-2
profile: personal
vpc_id: vpc-12345678
name: personal-testing
type: ipsec.1
register: created_vgw
- name: Create a new unattached vgw
ec2_vpc_vgw:
state: present
region: ap-southeast-2
profile: personal
name: personal-testing
type: ipsec.1
tags:
environment: production
owner: ABC
register: created_vgw
- name: Remove a new vgw using the name
ec2_vpc_vgw:
state: absent
region: ap-southeast-2
profile: personal
name: personal-testing
type: ipsec.1
register: deleted_vgw
- name: Remove a new vgw using the vpn_gateway_id
ec2_vpc_vgw:
state: absent
region: ap-southeast-2
profile: personal
vpn_gateway_id: vgw-3a9aa123
register: deleted_vgw
'''
RETURN = '''
result:
description: The result of the create, or delete action.
returned: success
type: dictionary
'''
try:
import json
import time
import botocore
import boto3
HAS_BOTO3 = True
except ImportError:
HAS_BOTO3 = False
def get_vgw_info(vgws):
if not isinstance(vgws, list):
return
for vgw in vgws:
vgw_info = {
'id': vgw['VpnGatewayId'],
'type': vgw['Type'],
'state': vgw['State'],
'vpc_id': None,
'tags': dict()
}
for tag in vgw['Tags']:
vgw_info['tags'][tag['Key']] = tag['Value']
if len(vgw['VpcAttachments']) != 0 and vgw['VpcAttachments'][0]['State'] == 'attached':
vgw_info['vpc_id'] = vgw['VpcAttachments'][0]['VpcId']
return vgw_info
def wait_for_status(client, module, vpn_gateway_id, status):
polling_increment_secs = 15
max_retries = (module.params.get('wait_timeout') / polling_increment_secs)
status_achieved = False
for x in range(0, max_retries):
try:
response = find_vgw(client, module, vpn_gateway_id)
if response[0]['VpcAttachments'][0]['State'] == status:
status_achieved = True
break
else:
time.sleep(polling_increment_secs)
except botocore.exceptions.ClientError:
e = get_exception()
module.fail_json(msg=str(e))
result = response
return status_achieved, result
def attach_vgw(client, module, vpn_gateway_id):
params = dict()
params['VpcId'] = module.params.get('vpc_id')
try:
response = client.attach_vpn_gateway(VpnGatewayId=vpn_gateway_id, VpcId=params['VpcId'])
except botocore.exceptions.ClientError:
e = get_exception()
module.fail_json(msg=str(e))
status_achieved, vgw = wait_for_status(client, module, [vpn_gateway_id], 'attached')
if not status_achieved:
module.fail_json(msg='Error waiting for vpc to attach to vgw - please check the AWS console')
result = response
return result
def detach_vgw(client, module, vpn_gateway_id, vpc_id=None):
params = dict()
params['VpcId'] = module.params.get('vpc_id')
if vpc_id:
try:
response = client.detach_vpn_gateway(VpnGatewayId=vpn_gateway_id, VpcId=vpc_id)
except botocore.exceptions.ClientError:
e = get_exception()
module.fail_json(msg=str(e))
else:
try:
response = client.detach_vpn_gateway(VpnGatewayId=vpn_gateway_id, VpcId=params['VpcId'])
except botocore.exceptions.ClientError:
e = get_exception()
module.fail_json(msg=str(e))
status_achieved, vgw = wait_for_status(client, module, [vpn_gateway_id], 'detached')
if not status_achieved:
module.fail_json(msg='Error waiting for vpc to detach from vgw - please check the AWS console')
result = response
return result
def create_vgw(client, module):
params = dict()
params['Type'] = module.params.get('type')
try:
response = client.create_vpn_gateway(Type=params['Type'])
except botocore.exceptions.ClientError:
e = get_exception()
module.fail_json(msg=str(e))
result = response
return result
def delete_vgw(client, module, vpn_gateway_id):
try:
response = client.delete_vpn_gateway(VpnGatewayId=vpn_gateway_id)
except botocore.exceptions.ClientError:
e = get_exception()
module.fail_json(msg=str(e))
#return the deleted VpnGatewayId as this is not included in the above response
result = vpn_gateway_id
return result
def create_tags(client, module, vpn_gateway_id):
params = dict()
try:
response = client.create_tags(Resources=[vpn_gateway_id],Tags=load_tags(module))
except botocore.exceptions.ClientError:
e = get_exception()
module.fail_json(msg=str(e))
result = response
return result
def delete_tags(client, module, vpn_gateway_id, tags_to_delete=None):
params = dict()
if tags_to_delete:
try:
response = client.delete_tags(Resources=[vpn_gateway_id], Tags=tags_to_delete)
except botocore.exceptions.ClientError:
e = get_exception()
module.fail_json(msg=str(e))
else:
try:
response = client.delete_tags(Resources=[vpn_gateway_id])
except botocore.exceptions.ClientError:
e = get_exception()
module.fail_json(msg=str(e))
result = response
return result
def load_tags(module):
tags = []
if module.params.get('tags'):
for name, value in module.params.get('tags').iteritems():
tags.append({'Key': name, 'Value': str(value)})
tags.append({'Key': "Name", 'Value': module.params.get('name')})
else:
tags.append({'Key': "Name", 'Value': module.params.get('name')})
return tags
def find_tags(client, module, resource_id=None):
if resource_id:
try:
response = client.describe_tags(Filters=[
{'Name': 'resource-id', 'Values': [resource_id]}
])
except botocore.exceptions.ClientError:
e = get_exception()
module.fail_json(msg=str(e))
result = response
return result
def check_tags(client, module, existing_vgw, vpn_gateway_id):
params = dict()
params['Tags'] = module.params.get('tags')
vgw = existing_vgw
changed = False
tags_list = {}
#format tags for comparison
for tags in existing_vgw[0]['Tags']:
if tags['Key'] != 'Name':
tags_list[tags['Key']] = tags['Value']
# if existing tags don't match the tags arg, delete existing and recreate with new list
if params['Tags'] != None and tags_list != params['Tags']:
delete_tags(client, module, vpn_gateway_id)
create_tags(client, module, vpn_gateway_id)
vgw = find_vgw(client, module)
changed = True
#if no tag args are supplied, delete any existing tags with the exception of the name tag
if params['Tags'] == None and tags_list != {}:
tags_to_delete = []
for tags in existing_vgw[0]['Tags']:
if tags['Key'] != 'Name':
tags_to_delete.append(tags)
delete_tags(client, module, vpn_gateway_id, tags_to_delete)
vgw = find_vgw(client, module)
changed = True
return vgw, changed
def find_vpc(client, module):
params = dict()
params['vpc_id'] = module.params.get('vpc_id')
if params['vpc_id']:
try:
response = client.describe_vpcs(VpcIds=[params['vpc_id']])
except botocore.exceptions.ClientError:
e = get_exception()
module.fail_json(msg=str(e))
result = response
return result
def find_vgw(client, module, vpn_gateway_id=None):
params = dict()
params['Name'] = module.params.get('name')
params['Type'] = module.params.get('type')
params['State'] = module.params.get('state')
if params['State'] == 'present':
try:
response = client.describe_vpn_gateways(Filters=[
{'Name': 'type', 'Values': [params['Type']]},
{'Name': 'tag:Name', 'Values': [params['Name']]}
])
except botocore.exceptions.ClientError:
e = get_exception()
module.fail_json(msg=str(e))
else:
if vpn_gateway_id:
try:
response = client.describe_vpn_gateways(VpnGatewayIds=vpn_gateway_id)
except botocore.exceptions.ClientError:
e = get_exception()
module.fail_json(msg=str(e))
else:
try:
response = client.describe_vpn_gateways(Filters=[
{'Name': 'type', 'Values': [params['Type']]},
{'Name': 'tag:Name', 'Values': [params['Name']]}
])
except botocore.exceptions.ClientError:
e = get_exception()
module.fail_json(msg=str(e))
result = response['VpnGateways']
return result
def ensure_vgw_present(client, module):
# If an existing vgw name and type matches our args, then a match is considered to have been
# found and we will not create another vgw.
changed = False
params = dict()
result = dict()
params['Name'] = module.params.get('name')
params['VpcId'] = module.params.get('vpc_id')
params['Type'] = module.params.get('type')
params['Tags'] = module.params.get('tags')
params['VpnGatewayIds'] = module.params.get('vpn_gateway_id')
# Check that a name argument has been supplied.
if not module.params.get('name'):
module.fail_json(msg='A name is required when a status of \'present\' is suppled')
# check if a gateway matching our module args already exists
existing_vgw = find_vgw(client, module)
if existing_vgw != [] and existing_vgw[0]['State'] != 'deleted':
vpn_gateway_id = existing_vgw[0]['VpnGatewayId']
vgw, changed = check_tags(client, module, existing_vgw, vpn_gateway_id)
# if a vpc_id was provided, check if it exists and if it's attached
if params['VpcId']:
# check that the vpc_id exists. If not, an exception is thrown
vpc = find_vpc(client, module)
current_vpc_attachments = existing_vgw[0]['VpcAttachments']
if current_vpc_attachments != [] and current_vpc_attachments[0]['State'] == 'attached':
if current_vpc_attachments[0]['VpcId'] == params['VpcId'] and current_vpc_attachments[0]['State'] == 'attached':
changed = False
else:
# detach the existing vpc from the virtual gateway
vpc_to_detach = current_vpc_attachments[0]['VpcId']
detach_vgw(client, module, vpn_gateway_id, vpc_to_detach)
time.sleep(5)
attached_vgw = attach_vgw(client, module, vpn_gateway_id)
vgw = find_vgw(client, module, [vpn_gateway_id])
changed = True
else:
# attach the vgw to the supplied vpc
attached_vgw = attach_vgw(client, module, vpn_gateway_id)
vgw = find_vgw(client, module, [vpn_gateway_id])
changed = True
# if params['VpcId'] is not provided, check the vgw is attached to a vpc. if so, detach it.
else:
existing_vgw = find_vgw(client, module, [vpn_gateway_id])
if existing_vgw[0]['VpcAttachments'] != []:
if existing_vgw[0]['VpcAttachments'][0]['State'] == 'attached':
# detach the vpc from the vgw
vpc_to_detach = existing_vgw[0]['VpcAttachments'][0]['VpcId']
detach_vgw(client, module, vpn_gateway_id, vpc_to_detach)
changed = True
vgw = find_vgw(client, module, [vpn_gateway_id])
else:
# create a new vgw
new_vgw = create_vgw(client, module)
changed = True
vpn_gateway_id = new_vgw['VpnGateway']['VpnGatewayId']
# tag the new virtual gateway
create_tags(client, module, vpn_gateway_id)
# return current state of the vgw
vgw = find_vgw(client, module, [vpn_gateway_id])
# if a vpc-id was supplied, attempt to attach it to the vgw
if params['VpcId']:
attached_vgw = attach_vgw(client, module, vpn_gateway_id)
changed = True
vgw = find_vgw(client, module, [vpn_gateway_id])
result = get_vgw_info(vgw)
return changed, result
def ensure_vgw_absent(client, module):
# If an existing vgw name and type matches our args, then a match is considered to have been
# found and we will take steps to delete it.
changed = False
params = dict()
result = dict()
params['Name'] = module.params.get('name')
params['VpcId'] = module.params.get('vpc_id')
params['Type'] = module.params.get('type')
params['Tags'] = module.params.get('tags')
params['VpnGatewayIds'] = module.params.get('vpn_gateway_id')
# check if a gateway matching our module args already exists
if params['VpnGatewayIds']:
existing_vgw_with_id = find_vgw(client, module, [params['VpnGatewayIds']])
if existing_vgw_with_id != [] and existing_vgw_with_id[0]['State'] != 'deleted':
existing_vgw = existing_vgw_with_id
if existing_vgw[0]['VpcAttachments'] != [] and existing_vgw[0]['VpcAttachments'][0]['State'] == 'attached':
if params['VpcId']:
if params['VpcId'] != existing_vgw[0]['VpcAttachments'][0]['VpcId']:
module.fail_json(msg='The vpc-id provided does not match the vpc-id currently attached - please check the AWS console')
else:
# detach the vpc from the vgw
detach_vgw(client, module, params['VpnGatewayIds'], params['VpcId'])
deleted_vgw = delete_vgw(client, module, params['VpnGatewayIds'])
changed = True
else:
# attempt to detach any attached vpcs
vpc_to_detach = existing_vgw[0]['VpcAttachments'][0]['VpcId']
detach_vgw(client, module, params['VpnGatewayIds'], vpc_to_detach)
deleted_vgw = delete_vgw(client, module, params['VpnGatewayIds'])
changed = True
else:
# no vpc's are attached so attempt to delete the vgw
deleted_vgw = delete_vgw(client, module, params['VpnGatewayIds'])
changed = True
else:
changed = False
deleted_vgw = "Nothing to do"
else:
#Check that a name and type argument has been supplied if no vgw-id
if not module.params.get('name') or not module.params.get('type'):
module.fail_json(msg='A name and type is required when no vgw-id and a status of \'absent\' is suppled')
existing_vgw = find_vgw(client, module)
if existing_vgw != [] and existing_vgw[0]['State'] != 'deleted':
vpn_gateway_id = existing_vgw[0]['VpnGatewayId']
if existing_vgw[0]['VpcAttachments'] != [] and existing_vgw[0]['VpcAttachments'][0]['State'] == 'attached':
if params['VpcId']:
if params['VpcId'] != existing_vgw[0]['VpcAttachments'][0]['VpcId']:
module.fail_json(msg='The vpc-id provided does not match the vpc-id currently attached - please check the AWS console')
else:
# detach the vpc from the vgw
detach_vgw(client, module, vpn_gateway_id, params['VpcId'])
#now that the vpc has been detached, delete the vgw
deleted_vgw = delete_vgw(client, module, vpn_gateway_id)
changed = True
else:
# attempt to detach any attached vpcs
vpc_to_detach = existing_vgw[0]['VpcAttachments'][0]['VpcId']
detach_vgw(client, module, vpn_gateway_id, vpc_to_detach)
changed = True
#now that the vpc has been detached, delete the vgw
deleted_vgw = delete_vgw(client, module, vpn_gateway_id)
else:
# no vpc's are attached so attempt to delete the vgw
deleted_vgw = delete_vgw(client, module, vpn_gateway_id)
changed = True
else:
changed = False
deleted_vgw = None
result = deleted_vgw
return changed, result
def main():
argument_spec = ec2_argument_spec()
argument_spec.update(dict(
state=dict(default='present', choices=['present', 'absent']),
region=dict(required=True),
name=dict(),
vpn_gateway_id=dict(),
vpc_id=dict(),
wait_timeout=dict(type='int', default=320),
type=dict(default='ipsec.1', choices=['ipsec.1']),
tags=dict(default=None, required=False, type='dict', aliases=['resource_tags']),
)
)
module = AnsibleModule(argument_spec=argument_spec)
if not HAS_BOTO3:
module.fail_json(msg='json and boto3 is required.')
state = module.params.get('state').lower()
try:
region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module, boto3=True)
client = boto3_conn(module, conn_type='client', resource='ec2', region=region, endpoint=ec2_url, **aws_connect_kwargs)
except botocore.exceptions.NoCredentialsError:
e = get_exception()
module.fail_json(msg="Can't authorize connection - "+str(e))
if state == 'present':
(changed, results) = ensure_vgw_present(client, module)
else:
(changed, results) = ensure_vgw_absent(client, module)
module.exit_json(changed=changed, vgw=results)
# import module snippets
from ansible.module_utils.basic import *
from ansible.module_utils.ec2 import *
if __name__ == '__main__':
main()
| gpl-3.0 | -5,911,540,102,866,641,000 | -8,164,505,407,993,406,000 | 32.842809 | 149 | 0.594624 | false |
sgerhart/ansible | lib/ansible/modules/web_infrastructure/django_manage.py | 9 | 11389 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Scott Anderson <[email protected]>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
DOCUMENTATION = '''
---
module: django_manage
short_description: Manages a Django application.
description:
- Manages a Django application using the I(manage.py) application frontend to I(django-admin). With the I(virtualenv) parameter, all
management commands will be executed by the given I(virtualenv) installation.
version_added: "1.1"
options:
command:
choices: [ 'cleanup', 'collectstatic', 'flush', 'loaddata', 'migrate', 'runfcgi', 'syncdb', 'test', 'validate', ]
description:
- The name of the Django management command to run. Built in commands are cleanup, collectstatic, flush, loaddata, migrate, runfcgi, syncdb,
test, and validate.
- Other commands can be entered, but will fail if they're unknown to Django. Other commands that may prompt for user input should be run
with the I(--noinput) flag.
required: true
app_path:
description:
- The path to the root of the Django application where B(manage.py) lives.
required: true
settings:
description:
- The Python path to the application's settings module, such as 'myapp.settings'.
required: false
pythonpath:
description:
- A directory to add to the Python path. Typically used to include the settings module if it is located external to the application directory.
required: false
virtualenv:
description:
- An optional path to a I(virtualenv) installation to use while running the manage application.
aliases: [virtualenv]
apps:
description:
- A list of space-delimited apps to target. Used by the 'test' command.
required: false
cache_table:
description:
- The name of the table used for database-backed caching. Used by the 'createcachetable' command.
required: false
clear:
description:
- Clear the existing files before trying to copy or link the original file.
- Used only with the 'collectstatic' command. The C(--noinput) argument will be added automatically.
required: false
default: no
type: bool
database:
description:
- The database to target. Used by the 'createcachetable', 'flush', 'loaddata', and 'syncdb' commands.
required: false
failfast:
description:
- Fail the command immediately if a test fails. Used by the 'test' command.
required: false
default: "no"
type: bool
fixtures:
description:
- A space-delimited list of fixture file names to load in the database. B(Required) by the 'loaddata' command.
required: false
skip:
description:
- Will skip over out-of-order missing migrations, you can only use this parameter with I(migrate)
required: false
version_added: "1.3"
merge:
description:
- Will run out-of-order or missing migrations as they are not rollback migrations, you can only use this parameter with 'migrate' command
required: false
version_added: "1.3"
link:
description:
- Will create links to the files instead of copying them, you can only use this parameter with 'collectstatic' command
required: false
version_added: "1.3"
notes:
- I(virtualenv) (U(http://www.virtualenv.org)) must be installed on the remote host if the virtualenv parameter is specified.
- This module will create a virtualenv if the virtualenv parameter is specified and a virtualenv does not already exist at the given location.
- This module assumes English error messages for the 'createcachetable' command to detect table existence, unfortunately.
- To be able to use the migrate command with django versions < 1.7, you must have south installed and added as an app in your settings.
- To be able to use the collectstatic command, you must have enabled staticfiles in your settings.
- As of ansible 2.x, your I(manage.py) application must be executable (rwxr-xr-x), and must have a valid I(shebang), i.e. "#!/usr/bin/env python",
for invoking the appropriate Python interpreter.
requirements: [ "virtualenv", "django" ]
author: "Scott Anderson (@tastychutney)"
'''
EXAMPLES = """
# Run cleanup on the application installed in 'django_dir'.
- django_manage:
command: cleanup
app_path: "{{ django_dir }}"
# Load the initial_data fixture into the application
- django_manage:
command: loaddata
app_path: "{{ django_dir }}"
fixtures: "{{ initial_data }}"
# Run syncdb on the application
- django_manage:
command: syncdb
app_path: "{{ django_dir }}"
settings: "{{ settings_app_name }}"
pythonpath: "{{ settings_dir }}"
virtualenv: "{{ virtualenv_dir }}"
# Run the SmokeTest test case from the main app. Useful for testing deploys.
- django_manage:
command: test
app_path: "{{ django_dir }}"
apps: main.SmokeTest
# Create an initial superuser.
- django_manage:
command: "createsuperuser --noinput --username=admin [email protected]"
app_path: "{{ django_dir }}"
"""
import os
import sys
from ansible.module_utils.basic import AnsibleModule
def _fail(module, cmd, out, err, **kwargs):
msg = ''
if out:
msg += "stdout: %s" % (out, )
if err:
msg += "\n:stderr: %s" % (err, )
module.fail_json(cmd=cmd, msg=msg, **kwargs)
def _ensure_virtualenv(module):
venv_param = module.params['virtualenv']
if venv_param is None:
return
vbin = os.path.join(venv_param, 'bin')
activate = os.path.join(vbin, 'activate')
if not os.path.exists(activate):
virtualenv = module.get_bin_path('virtualenv', True)
vcmd = '%s %s' % (virtualenv, venv_param)
vcmd = [virtualenv, venv_param]
rc, out_venv, err_venv = module.run_command(vcmd)
if rc != 0:
_fail(module, vcmd, out_venv, err_venv)
os.environ["PATH"] = "%s:%s" % (vbin, os.environ["PATH"])
os.environ["VIRTUAL_ENV"] = venv_param
def createcachetable_filter_output(line):
return "Already exists" not in line
def flush_filter_output(line):
return "Installed" in line and "Installed 0 object" not in line
def loaddata_filter_output(line):
return "Installed" in line and "Installed 0 object" not in line
def syncdb_filter_output(line):
return ("Creating table " in line) or ("Installed" in line and "Installed 0 object" not in line)
def migrate_filter_output(line):
return ("Migrating forwards " in line) or ("Installed" in line and "Installed 0 object" not in line) or ("Applying" in line)
def collectstatic_filter_output(line):
return line and "0 static files" not in line
def main():
command_allowed_param_map = dict(
cleanup=(),
createcachetable=('cache_table', 'database', ),
flush=('database', ),
loaddata=('database', 'fixtures', ),
syncdb=('database', ),
test=('failfast', 'testrunner', 'liveserver', 'apps', ),
validate=(),
migrate=('apps', 'skip', 'merge', 'database',),
collectstatic=('clear', 'link', ),
)
command_required_param_map = dict(
loaddata=('fixtures', ),
)
# forces --noinput on every command that needs it
noinput_commands = (
'flush',
'syncdb',
'migrate',
'test',
'collectstatic',
)
# These params are allowed for certain commands only
specific_params = ('apps', 'clear', 'database', 'failfast', 'fixtures', 'liveserver', 'testrunner')
# These params are automatically added to the command if present
general_params = ('settings', 'pythonpath', 'database',)
specific_boolean_params = ('clear', 'failfast', 'skip', 'merge', 'link')
end_of_command_params = ('apps', 'cache_table', 'fixtures')
module = AnsibleModule(
argument_spec=dict(
command=dict(default=None, required=True),
app_path=dict(default=None, required=True, type='path'),
settings=dict(default=None, required=False),
pythonpath=dict(default=None, required=False, aliases=['python_path']),
virtualenv=dict(default=None, required=False, type='path', aliases=['virtual_env']),
apps=dict(default=None, required=False),
cache_table=dict(default=None, required=False),
clear=dict(default=None, required=False, type='bool'),
database=dict(default=None, required=False),
failfast=dict(default='no', required=False, type='bool', aliases=['fail_fast']),
fixtures=dict(default=None, required=False),
liveserver=dict(default=None, required=False, aliases=['live_server']),
testrunner=dict(default=None, required=False, aliases=['test_runner']),
skip=dict(default=None, required=False, type='bool'),
merge=dict(default=None, required=False, type='bool'),
link=dict(default=None, required=False, type='bool'),
),
)
command = module.params['command']
app_path = module.params['app_path']
virtualenv = module.params['virtualenv']
for param in specific_params:
value = module.params[param]
if param in specific_boolean_params:
value = module.boolean(value)
if value and param not in command_allowed_param_map[command]:
module.fail_json(msg='%s param is incompatible with command=%s' % (param, command))
for param in command_required_param_map.get(command, ()):
if not module.params[param]:
module.fail_json(msg='%s param is required for command=%s' % (param, command))
_ensure_virtualenv(module)
cmd = "./manage.py %s" % (command, )
if command in noinput_commands:
cmd = '%s --noinput' % cmd
for param in general_params:
if module.params[param]:
cmd = '%s --%s=%s' % (cmd, param, module.params[param])
for param in specific_boolean_params:
if module.boolean(module.params[param]):
cmd = '%s --%s' % (cmd, param)
# these params always get tacked on the end of the command
for param in end_of_command_params:
if module.params[param]:
cmd = '%s %s' % (cmd, module.params[param])
rc, out, err = module.run_command(cmd, cwd=app_path)
if rc != 0:
if command == 'createcachetable' and 'table' in err and 'already exists' in err:
out = 'Already exists.'
else:
if "Unknown command:" in err:
_fail(module, cmd, err, "Unknown django command: %s" % command)
_fail(module, cmd, out, err, path=os.environ["PATH"], syspath=sys.path)
changed = False
lines = out.split('\n')
filt = globals().get(command + "_filter_output", None)
if filt:
filtered_output = list(filter(filt, lines))
if len(filtered_output):
changed = True
module.exit_json(changed=changed, out=out, cmd=cmd, app_path=app_path, virtualenv=virtualenv,
settings=module.params['settings'], pythonpath=module.params['pythonpath'])
if __name__ == '__main__':
main()
| mit | 6,082,043,756,398,762,000 | 3,344,699,360,318,537,000 | 35.620579 | 148 | 0.649838 | false |
sserrot/champion_relationships | venv/Lib/site-packages/pythonwin/pywin/framework/editor/template.py | 7 | 1792 | import string
import win32ui
import win32api
from pywin.mfc import docview
import pywin.framework.window
import os
from . import frame
ParentEditorTemplate=docview.DocTemplate
class EditorTemplateBase(ParentEditorTemplate):
def __init__(self, res=win32ui.IDR_TEXTTYPE, makeDoc=None, makeFrame=None, makeView=None):
if makeFrame is None: makeFrame = frame.EditorFrame
ParentEditorTemplate.__init__(self, res, makeDoc, makeFrame, makeView)
def _CreateDocTemplate(self, resourceId):
assert 0, "You must override this"
def CreateWin32uiDocument(self):
assert 0, "You must override this"
def GetFileExtensions(self):
return ".txt", ".py"
def MatchDocType(self, fileName, fileType):
doc = self.FindOpenDocument(fileName)
if doc: return doc
ext = os.path.splitext(fileName)[1].lower()
if ext in self.GetFileExtensions():
return win32ui.CDocTemplate_Confidence_yesAttemptNative
return win32ui.CDocTemplate_Confidence_maybeAttemptForeign
def InitialUpdateFrame(self, frame, doc, makeVisible=1):
self._obj_.InitialUpdateFrame(frame, doc, makeVisible) # call default handler.
doc._UpdateUIForState()
def GetPythonPropertyPages(self):
"""Returns a list of property pages
"""
from . import configui
return [configui.EditorPropertyPage(), configui.EditorWhitespacePropertyPage()]
def OpenDocumentFile(self, filename, bMakeVisible = 1):
if filename is not None:
try:
path = os.path.split(filename)[0]
# print "The editor is translating", `filename`,"to",
filename = win32api.FindFiles(filename)[0][8]
filename = os.path.join(path, filename)
# print `filename`
except (win32api.error, IndexError) as details:
pass
# print "Couldnt get the full filename!", details
return self._obj_.OpenDocumentFile(filename, bMakeVisible)
| mit | -1,297,831,446,129,069,800 | -210,507,121,038,138,240 | 34.84 | 91 | 0.755022 | false |
msrb/samba | python/examples/samr.py | 66 | 3870 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Unix SMB/CIFS implementation.
# Copyright © Jelmer Vernooij <[email protected]> 2008
#
# Based on samr.js © Andrew Tridgell <[email protected]>
#
# 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,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import sys
sys.path.insert(0, "bin/python")
from samba.dcerpc import samr, security
def display_lsa_string(str):
return str.string
def FillUserInfo(samr, dom_handle, users, level):
"""fill a user array with user information from samrQueryUserInfo"""
for i in range(len(users)):
user_handle = samr.OpenUser(handle, security.SEC_FLAG_MAXIMUM_ALLOWED, users[i].idx)
info = samr.QueryUserInfo(user_handle, level)
info.name = users[i].name
info.idx = users[i].idx
users[i] = info
samr.Close(user_handle)
def toArray((handle, array, num_entries)):
ret = []
for x in range(num_entries):
ret.append((array.entries[x].idx, array.entries[x].name))
return ret
def test_Connect(samr):
"""test the samr_Connect interface"""
print "Testing samr_Connect"
return samr.Connect2(None, security.SEC_FLAG_MAXIMUM_ALLOWED)
def test_LookupDomain(samr, handle, domain):
"""test the samr_LookupDomain interface"""
print "Testing samr_LookupDomain"
return samr.LookupDomain(handle, domain)
def test_OpenDomain(samr, handle, sid):
"""test the samr_OpenDomain interface"""
print "Testing samr_OpenDomain"
return samr.OpenDomain(handle, security.SEC_FLAG_MAXIMUM_ALLOWED, sid)
def test_EnumDomainUsers(samr, dom_handle):
"""test the samr_EnumDomainUsers interface"""
print "Testing samr_EnumDomainUsers"
users = toArray(samr.EnumDomainUsers(dom_handle, 0, 0, -1))
print "Found %d users" % len(users)
for idx, user in users:
print "\t%s\t(%d)" % (user.string, idx)
def test_EnumDomainGroups(samr, dom_handle):
"""test the samr_EnumDomainGroups interface"""
print "Testing samr_EnumDomainGroups"
groups = toArray(samr.EnumDomainGroups(dom_handle, 0, 0))
print "Found %d groups" % len(groups)
for idx, group in groups:
print "\t%s\t(%d)" % (group.string, idx)
def test_domain_ops(samr, dom_handle):
"""test domain specific ops"""
test_EnumDomainUsers(samr, dom_handle)
test_EnumDomainGroups(samr, dom_handle)
def test_EnumDomains(samr, handle):
"""test the samr_EnumDomains interface"""
print "Testing samr_EnumDomains"
domains = toArray(samr.EnumDomains(handle, 0, -1))
print "Found %d domains" % len(domains)
for idx, domain in domains:
print "\t%s (%d)" % (display_lsa_string(domain), idx)
for idx, domain in domains:
print "Testing domain %s" % display_lsa_string(domain)
sid = samr.LookupDomain(handle, domain)
dom_handle = test_OpenDomain(samr, handle, sid)
test_domain_ops(samr, dom_handle)
samr.Close(dom_handle)
if len(sys.argv) != 2:
print "Usage: samr.js <BINDING>"
sys.exit(1)
binding = sys.argv[1]
print "Connecting to %s" % binding
try:
samr = samr.samr(binding)
except Exception, e:
print "Failed to connect to %s: %s" % (binding, e.message)
sys.exit(1)
handle = test_Connect(samr)
test_EnumDomains(samr, handle)
samr.Close(handle)
print "All OK"
| gpl-3.0 | -483,130,919,562,276,900 | -6,155,627,217,040,039,000 | 32.059829 | 92 | 0.685109 | false |
cloudbase/neutron-virtualbox | neutron/plugins/embrane/common/constants.py | 47 | 2749 | # Copyright 2013 Embrane, 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 by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from heleosapi import exceptions as h_exc
from neutron.plugins.common import constants
# Router specific constants
UTIF_LIMIT = 7
QUEUE_TIMEOUT = 300
class Status(object):
# Transient
CREATING = constants.PENDING_CREATE
UPDATING = constants.PENDING_UPDATE
DELETING = constants.PENDING_DELETE
# Final
ACTIVE = constants.ACTIVE
ERROR = constants.ERROR
READY = constants.INACTIVE
DELETED = "DELETED" # not visible
class Events(object):
CREATE_ROUTER = "create_router"
UPDATE_ROUTER = "update_router"
DELETE_ROUTER = "delete_router"
GROW_ROUTER_IF = "grow_router_if"
SHRINK_ROUTER_IF = "shrink_router_if"
SET_NAT_RULE = "set_nat_rule"
RESET_NAT_RULE = "reset_nat_rule"
_DVA_PENDING_ERROR_MSG = _("Dva is pending for the following reason: %s")
_DVA_NOT_FOUNT_ERROR_MSG = _("Dva can't be found to execute the operation, "
"probably was cancelled through the heleos UI")
_DVA_BROKEN_ERROR_MSG = _("Dva seems to be broken for reason %s")
_DVA_BROKEN_INTERFACE_ERROR_MSG = _("Dva interface seems to be broken "
"for reason %s")
_DVA_CREATION_FAILED_ERROR_MSG = _("Dva creation failed reason %s")
_DVA_CREATION_PENDING_ERROR_MSG = _("Dva creation is in pending state "
"for reason %s")
_CFG_FAILED_ERROR_MSG = _("Dva configuration failed for reason %s")
_DVA_DEL_FAILED_ERROR_MSG = _("Failed to delete the backend "
"router for reason %s. Please remove "
"it manually through the heleos UI")
error_map = {h_exc.PendingDva: _DVA_PENDING_ERROR_MSG,
h_exc.DvaNotFound: _DVA_NOT_FOUNT_ERROR_MSG,
h_exc.BrokenDva: _DVA_BROKEN_ERROR_MSG,
h_exc.BrokenInterface: _DVA_BROKEN_INTERFACE_ERROR_MSG,
h_exc.DvaCreationFailed: _DVA_CREATION_FAILED_ERROR_MSG,
h_exc.DvaCreationPending: _DVA_CREATION_PENDING_ERROR_MSG,
h_exc.ConfigurationFailed: _CFG_FAILED_ERROR_MSG,
h_exc.DvaDeleteFailed: _DVA_DEL_FAILED_ERROR_MSG}
| apache-2.0 | -3,559,715,216,942,515,000 | -3,563,533,403,012,734,500 | 39.426471 | 78 | 0.656602 | false |
ged-lab/khmer | tests/test_graph.py | 2 | 10940 | # This file is part of khmer, https://github.com/dib-lab/khmer/, and is
# Copyright (C) 2010-2015, Michigan State University.
# Copyright (C) 2015, The Regents of the University of California.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
#
# * Neither the name of the Michigan State University nor the names
# of its contributors may be used to endorse or promote products
# derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Contact: [email protected]
# pylint: disable=missing-docstring,no-member,invalid-name,no-self-use
# pylint: disable=protected-access
import khmer
import screed
from . import khmer_tst_utils as utils
def teardown():
utils.cleanup()
class Test_ExactGraphFu(object):
def setup(self):
self.ht = khmer.Nodegraph(12, 1e4, 2)
def test_counts(self):
ht = self.ht
ht.consume_seqfile(utils.get_test_data('test-graph.fa'))
kmer = "TTAGGACTGCAC"
x = ht.calc_connected_graph_size(kmer)
assert x == 69, x
kmer = "TGCGTTTCAATC"
x = ht.calc_connected_graph_size(kmer)
assert x == 68, x
kmer = "ATACTGTAAATA"
x = ht.calc_connected_graph_size(kmer)
assert x == 36, x
def test_graph_links_next_a(self):
ht = self.ht
word = "TGCGTTTCAATC"
ht.consume(word)
ht.consume(word[1:] + "A")
x = ht.calc_connected_graph_size(word)
assert x == 2
def test_graph_links_next_c(self):
ht = self.ht
word = "TGCGTTTCAATC"
ht.consume(word)
ht.consume(word[1:] + "C")
x = ht.calc_connected_graph_size(word)
assert x == 2
def test_graph_links_next_g(self):
ht = self.ht
word = "TGCGTTTCAATC"
ht.consume(word)
ht.consume(word[1:] + "G")
x = ht.calc_connected_graph_size(word)
assert x == 2
def test_graph_links_next_t(self):
ht = self.ht
word = "TGCGTTTCAATC"
ht.consume(word)
ht.consume(word[1:] + "T")
x = ht.calc_connected_graph_size(word)
assert x == 2
def test_graph_links_prev_a(self):
ht = self.ht
word = "TGCGTTTCAATC"
ht.consume(word)
ht.consume("A" + word[:-1])
x = ht.calc_connected_graph_size(word)
assert x == 2
def test_graph_links_prev_c(self):
ht = self.ht
word = "TGCGTTTCAATC"
ht.consume(word)
ht.consume("C" + word[:-1])
x = ht.calc_connected_graph_size(word)
assert x == 2
def test_graph_links_prev_g(self):
ht = self.ht
word = "TGCGTTTCAATC"
ht.consume(word)
ht.consume("G" + word[:-1])
x = ht.calc_connected_graph_size(word)
assert x == 2
def test_graph_links_prev_t(self):
ht = self.ht
word = "TGCGTTTCAATC"
ht.consume(word)
ht.consume("T" + word[:-1])
x = ht.calc_connected_graph_size(word)
assert x == 2
class Test_InexactGraphFu(object):
def setup(self):
self.ht = khmer.Nodegraph(12, 4 ** 3 + 1, 2)
def test_graph_links_next_a(self):
ht = self.ht
word = "TGCGTTTCAATC"
ht.consume(word)
ht.consume(word[1:] + "A")
x = ht.calc_connected_graph_size(word)
assert x == 2
def test_graph_links_next_c(self):
ht = self.ht
word = "TGCGTTTCAATC"
ht.consume(word)
ht.consume(word[1:] + "C")
x = ht.calc_connected_graph_size(word)
assert x == 2, x
def test_graph_links_next_g(self):
ht = self.ht
word = "TGCGTTTCAATC"
ht.consume(word)
ht.consume(word[1:] + "G")
x = ht.calc_connected_graph_size(word)
assert x == 2
def test_graph_links_next_t(self):
ht = self.ht
word = "TGCGTTTCAATC"
ht.consume(word)
ht.consume(word[1:] + "T")
x = ht.calc_connected_graph_size(word)
assert x == 2
def test_graph_links_prev_a(self):
ht = self.ht
word = "TGCGTTTCAATC"
ht.consume(word)
ht.consume("A" + word[:-1])
x = ht.calc_connected_graph_size(word)
assert x == 2
def test_graph_links_prev_c(self):
ht = self.ht
word = "TGCGTTTCAATC"
ht.consume(word)
ht.consume("C" + word[:-1])
x = ht.calc_connected_graph_size(word)
assert x == 2
def test_graph_links_prev_g(self):
ht = self.ht
word = "TGCGTTTCAATC"
ht.consume(word)
ht.consume("G" + word[:-1])
x = ht.calc_connected_graph_size(word)
assert x == 2
def test_graph_links_prev_t(self):
ht = self.ht
word = "TGCGTTTCAATC"
ht.consume(word)
ht.consume("T" + word[:-1])
x = ht.calc_connected_graph_size(word)
assert x == 2
#
class Test_Partitioning(object):
def test_output_unassigned(self):
filename = utils.get_test_data('random-20-a.fa')
ht = khmer.Nodegraph(21, 1, 1, primes=[5, 7, 11, 13])
ht.consume_seqfile_and_tag(filename)
output_file = utils.get_temp_filename('part0test')
ht.output_partitions(filename, output_file, True)
len1 = len(list(screed.open(filename)))
len2 = len(list(screed.open(output_file)))
assert len1 > 0
assert len1 == len2, (len1, len2)
def test_not_output_unassigned(self):
filename = utils.get_test_data('random-20-a.fa')
ht = khmer.Nodegraph(21, 1, 1, primes=[5, 7, 11, 13])
ht.consume_seqfile_and_tag(filename)
output_file = utils.get_temp_filename('parttest')
ht.output_partitions(filename, output_file, False)
len1 = len(list(screed.open(filename)))
len2 = len(list(screed.open(output_file)))
assert len1 > 0
assert len2 == 0, len2
def test_output_fq(self):
filename = utils.get_test_data('random-20-a.fq')
ht = khmer.Nodegraph(20, 1e4, 4)
ht.consume_seqfile_and_tag(filename)
subset = ht.do_subset_partition(0, 0)
ht.merge_subset(subset)
output_file = utils.get_temp_filename('parttest')
ht.output_partitions(filename, output_file, False)
print(open(output_file).read())
x = set([r.quality for r in screed.open(output_file)])
assert x, x
def test_disconnected_20_a(self):
filename = utils.get_test_data('random-20-a.fa')
ht = khmer.Nodegraph(21, 1e5, 4)
ht.consume_seqfile_and_tag(filename)
subset = ht.do_subset_partition(0, 0)
x = subset.count_partitions()
assert x == (99, 0), x # disconnected @ 21
def test_connected_20_a(self):
filename = utils.get_test_data('random-20-a.fa')
ht = khmer.Nodegraph(20, 1e4, 4)
ht.consume_seqfile_and_tag(filename)
subset = ht.do_subset_partition(0, 0)
x = subset.count_partitions()
assert x == (1, 0) # connected @ 20
def test_disconnected_20_b(self):
filename = utils.get_test_data('random-20-b.fa')
ht = khmer.Nodegraph(21, 1e4, 4)
ht.consume_seqfile_and_tag(filename)
subset = ht.do_subset_partition(0, 0)
x = subset.count_partitions()
assert x == (99, 0), x # disconnected @ 21
def test_connected_20_b(self):
filename = utils.get_test_data('random-20-b.fa')
ht = khmer.Nodegraph(20, 1e4, 4)
ht.consume_seqfile_and_tag(filename)
subset = ht.do_subset_partition(0, 0)
x = subset.count_partitions()
assert x == (1, 0) # connected @ 20
def test_disconnected_31_c(self):
filename = utils.get_test_data('random-31-c.fa')
ht = khmer.Nodegraph(32, 1e6, 4)
ht.consume_seqfile_and_tag(filename)
subset = ht.do_subset_partition(0, 0)
x = subset.count_partitions()
assert x == (999, 0), x # disconnected @ K = 32
def test_connected_31_c(self):
filename = utils.get_test_data('random-31-c.fa')
ht = khmer.Nodegraph(31, 1e5, 4)
ht.consume_seqfile_and_tag(filename)
subset = ht.do_subset_partition(0, 0)
x = subset.count_partitions()
assert x == (1, 0) # connected @ K = 31
#
class Test_PythonAPI(object):
def test_find_all_tags_kmersize(self):
ht = khmer.Nodegraph(20, 4 ** 4 + 1, 2)
a = "ATTGGGACTCTGGGAGCACTTATCATGGAGAT"
c = "GGAGCACTTATCATGGAGATATATCCCGTGCTTAAACATCGCACTTTAACCCTGCAGAGT"
print(ht.consume(a))
try:
ht.find_all_tags(c[:19])
assert False, "should raise a ValueError for wrong k-mer size"
except ValueError:
pass
try:
ht.find_all_tags(c[:21])
assert False, "should raise a ValueError for wrong k-mer size"
except ValueError:
pass
def test_ordered_connect(self):
ht = khmer.Nodegraph(20, 4 ** 4 + 1, 2)
a = "ATTGGGACTCTGGGAGCACTTATCATGGAGAT"
b = "GAGCACTTTAACCCTGCAGAGTGGCCAAGGCT"
c = "GGAGCACTTATCATGGAGATATATCCCGTGCTTAAACATCGCACTTTAACCCTGCAGAGT"
print(ht.consume(a))
ppi = ht.find_all_tags(a[:20])
pid = ht.assign_partition_id(ppi)
assert pid == 0, pid
print(ht.consume(b))
ppi = ht.find_all_tags(b[:20])
pid = ht.assign_partition_id(ppi)
assert pid == 0, pid
print(ht.consume(c))
ppi = ht.find_all_tags(c[:20])
pid = ht.assign_partition_id(ppi)
assert pid == 2, pid
#
| bsd-3-clause | 5,057,427,554,069,053,000 | 1,387,725,828,782,081,800 | 27.941799 | 74 | 0.59223 | false |
pcamp/google-appengine-wx-launcher | launcher/app_unittest.py | 28 | 2973 | #!/usr/bin/env python
#
# Copyright 2008 Google 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 required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
"""Unittests for app.py."""
import os
import unittest
import launcher
class NoShowApp(launcher.App):
def __init__(self):
super(NoShowApp, self).__init__()
self.displayed = False
def _DisplayMainFrame(self):
"""Override so we don't actually display UI.
Can't override by setting app._DisplayMainFrame to a new value
since this gets hit before we have a chance to override.
"""
self.displayed = True
def _InitializeLogging(self):
"""Override so logs don't throw up modal dialogs."""
pass
class NoShowNoVersionCheckApp(NoShowApp):
def _VersionCheck(self, url=None):
pass
class AppTest(unittest.TestCase):
def testOnInit(self):
app = NoShowNoVersionCheckApp()
self.assertTrue(app.Initialized())
def testVersionCheck(self):
app = NoShowApp()
warned = [False]
def fakeNewVersionNeeded(a, b, c):
warned[0] = True
app._NewVersionNeeded = fakeNewVersionNeeded
badurl = 'file://' + os.path.join(os.getcwd(),
launcher.__path__[0],
'app_unittest.py')
# silent unhappy on purpose
app._VersionCheck(badurl)
self.assertEqual(False, warned[0])
def DumpAndVersionCheck(data, app):
filename = os.tempnam()
f = open(filename, 'w')
f.write(data)
f.close()
app._VersionCheck('file:///' + filename)
return filename
# try hard to look like we're out of date
new_version_file = ('release: "9999.9999.9999"\n' +
'timestamp: 9999999999\n' +
'api_versions: [\'1\']\n')
self.assertEqual(False, warned[0])
filename = DumpAndVersionCheck(new_version_file, app)
os.unlink(filename)
self.assertEqual(True, warned[0])
warned[0] = False
# Make sure we are NOT out of date
old_version_file = ('release: "0.0.0"\n' +
'timestamp: 7\n' +
'api_versions: [\'1\']\n')
self.assertEqual(False, warned[0])
filename = DumpAndVersionCheck(old_version_file, app)
os.unlink(filename)
self.assertEqual(False, warned[0])
# VERSION file or well-defined failure string
# (depends on prefs setting...)
current = app._CurrentVersionData()
self.assertTrue('api_version' in current)
if __name__ == '__main__':
unittest.main()
| apache-2.0 | -7,974,781,287,122,688,000 | 5,346,167,062,121,725,000 | 27.586538 | 74 | 0.63774 | false |
teosz/servo | tests/wpt/css-tests/tools/manifest/item.py | 84 | 5794 | import os
import urlparse
from abc import ABCMeta, abstractmethod, abstractproperty
from utils import from_os_path, to_os_path
item_types = ["testharness", "reftest", "manual", "stub", "wdspec"]
def get_source_file(source_files, tests_root, manifest, path):
def make_new():
from sourcefile import SourceFile
return SourceFile(tests_root, path, manifest.url_base)
if source_files is None:
return make_new()
if path not in source_files:
source_files[path] = make_new()
return source_files[path]
class ManifestItem(object):
__metaclass__ = ABCMeta
item_type = None
def __init__(self, source_file, manifest=None):
self.manifest = manifest
self.source_file = source_file
@abstractproperty
def id(self):
"""The test's id (usually its url)"""
pass
@property
def path(self):
"""The test path relative to the test_root"""
return self.source_file.rel_path
@property
def https(self):
return "https" in self.source_file.meta_flags
def key(self):
"""A unique identifier for the test"""
return (self.item_type, self.id)
def meta_key(self):
"""Extra metadata that doesn't form part of the test identity, but for
which changes mean regenerating the manifest (e.g. the test timeout."""
return ()
def __eq__(self, other):
if not hasattr(other, "key"):
return False
return self.key() == other.key()
def __hash__(self):
return hash(self.key() + self.meta_key())
def to_json(self):
return {"path": from_os_path(self.path)}
@classmethod
def from_json(self, manifest, tests_root, obj, source_files=None):
raise NotImplementedError
class URLManifestItem(ManifestItem):
def __init__(self, source_file, url, url_base="/", manifest=None):
ManifestItem.__init__(self, source_file, manifest=manifest)
self._url = url
self.url_base = url_base
@property
def id(self):
return self.url
@property
def url(self):
return urlparse.urljoin(self.url_base, self._url)
def to_json(self):
rv = ManifestItem.to_json(self)
rv["url"] = self._url
return rv
@classmethod
def from_json(cls, manifest, tests_root, obj, source_files=None):
source_file = get_source_file(source_files, tests_root, manifest,
to_os_path(obj["path"]))
return cls(source_file,
obj["url"],
url_base=manifest.url_base,
manifest=manifest)
class TestharnessTest(URLManifestItem):
item_type = "testharness"
def __init__(self, source_file, url, url_base="/", timeout=None, manifest=None):
URLManifestItem.__init__(self, source_file, url, url_base=url_base, manifest=manifest)
self.timeout = timeout
def meta_key(self):
return (self.timeout,)
def to_json(self):
rv = URLManifestItem.to_json(self)
if self.timeout is not None:
rv["timeout"] = self.timeout
return rv
@classmethod
def from_json(cls, manifest, tests_root, obj, source_files=None):
source_file = get_source_file(source_files, tests_root, manifest,
to_os_path(obj["path"]))
return cls(source_file,
obj["url"],
url_base=manifest.url_base,
timeout=obj.get("timeout"),
manifest=manifest)
class RefTest(URLManifestItem):
item_type = "reftest"
def __init__(self, source_file, url, references, url_base="/", timeout=None,
viewport_size=None, dpi=None, manifest=None):
URLManifestItem.__init__(self, source_file, url, url_base=url_base, manifest=manifest)
for _, ref_type in references:
if ref_type not in ["==", "!="]:
raise ValueError, "Unrecognised ref_type %s" % ref_type
self.references = tuple(references)
self.timeout = timeout
self.viewport_size = viewport_size
self.dpi = dpi
@property
def is_reference(self):
return self.source_file.name_is_reference
def meta_key(self):
return (self.timeout, self.viewport_size, self.dpi)
def to_json(self):
rv = URLManifestItem.to_json(self)
rv["references"] = self.references
if self.timeout is not None:
rv["timeout"] = self.timeout
if self.viewport_size is not None:
rv["viewport_size"] = self.viewport_size
if self.dpi is not None:
rv["dpi"] = self.dpi
return rv
@classmethod
def from_json(cls, manifest, tests_root, obj, source_files=None):
source_file = get_source_file(source_files, tests_root, manifest,
to_os_path(obj["path"]))
return cls(source_file,
obj["url"],
obj["references"],
url_base=manifest.url_base,
timeout=obj.get("timeout"),
viewport_size=obj.get("viewport_size"),
dpi=obj.get("dpi"),
manifest=manifest)
class ManualTest(URLManifestItem):
item_type = "manual"
class Stub(URLManifestItem):
item_type = "stub"
class WebdriverSpecTest(ManifestItem):
item_type = "wdspec"
@property
def id(self):
return self.path
@classmethod
def from_json(cls, manifest, tests_root, obj, source_files=None):
source_file = get_source_file(source_files, tests_root, manifest,
to_os_path(obj["path"]))
return cls(source_file, manifest=manifest)
| mpl-2.0 | 1,065,095,975,513,915,900 | 5,797,224,798,759,842,000 | 29.177083 | 94 | 0.582672 | false |
v1k45/django-notify-x | notify/models.py | 1 | 14033 | from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.conf import settings
from django.db.models import QuerySet
from jsonfield.fields import JSONField
from six import python_2_unicode_compatible
from django.utils.html import escape
from django.utils.timesince import timesince
from django.utils.translation import ugettext_lazy as _
from django.utils.encoding import force_text
from django.utils.functional import cached_property
from .utils import prefetch_relations
class NotificationQueryset(QuerySet):
"""
Chain-able QuerySets using ```.as_manager()``.
"""
def prefetch(self):
"""
Marks the current queryset to prefetch all generic relations.
"""
qs = self.select_related()
qs._prefetch_relations = True
return qs
def _fetch_all(self):
if self._result_cache is None:
if hasattr(self, '_prefetch_relations'):
# removes the flag since prefetch_relations is recursive
del self._prefetch_relations
prefetch_relations(self)
self._prefetch_relations = True
return super(NotificationQueryset, self)._fetch_all()
def _clone(self, **kwargs):
clone = super(NotificationQueryset, self)._clone(**kwargs)
if hasattr(self, '_prefetch_relations'):
clone._prefetch_relations = True
return clone
def active(self):
"""
QuerySet filter() for retrieving both read and unread notifications
which are not soft-deleted.
:return: Non soft-deleted notifications.
"""
return self.filter(deleted=False)
def read(self):
"""
QuerySet filter() for retrieving read notifications.
:return: Read and active Notifications filter().
"""
return self.filter(deleted=False, read=True)
def unread(self):
"""
QuerySet filter() for retrieving unread notifications.
:return: Unread and active Notifications filter().
"""
return self.filter(deleted=False, read=False)
def unread_all(self, user=None):
"""
Marks all notifications as unread for a user (if supplied)
:param user: Notification recipient.
:return: Updates QuerySet as unread.
"""
qs = self.read()
if user:
qs = qs.filter(recipient=user)
qs.update(read=False)
def read_all(self, user=None):
"""
Marks all notifications as read for a user (if supplied)
:param user: Notification recipient.
:return: Updates QuerySet as read.
"""
qs = self.unread()
if user:
qs = qs.filter(recipient=user)
qs.update(read=True)
def delete_all(self, user=None):
"""
Method to soft-delete all notifications of a User (if supplied)
:param user: Notification recipient.
:return: Updates QuerySet as soft-deleted.
"""
qs = self.active()
if user:
qs = qs.filter(recipient=user)
soft_delete = getattr(settings, 'NOTIFY_SOFT_DELETE', True)
if soft_delete:
qs.update(deleted=True)
else:
qs.delete()
def active_all(self, user=None):
"""
Method to soft-delete all notifications of a User (if supplied)
:param user: Notification recipient.
:return: Updates QuerySet as soft-deleted.
"""
qs = self.deleted()
if user:
qs = qs.filter(recipient=user)
qs.update(deleted=False)
def deleted(self):
"""
QuerySet ``filter()`` for retrieving soft-deleted notifications.
:return: Soft deleted notification filter()
"""
return self.filter(deleted=True)
@python_2_unicode_compatible
class Notification(models.Model):
"""
**Notification Model for storing notifications. (Yeah, too obvious)**
This model is pretty-much a replica of ``django-notifications``'s
model. The newly added fields just adds a feature to allow anonymous
``actors``, ``targets`` and ``object``.
**Attributes**:
:recipient: The user who receives notification.
:verb: Action performed by actor (not necessarily).
:description: Option description for your notification.
:actor_text: Anonymous actor who is not in content-type.
:actor_url: Since the actor is not in content-type,
a custom URL for it.
*...Same for target and obj*.
:nf_type: | Each notification is different, they must be formatted
| differently during HTML rendering. For this, each
| notification gets to carry it own *notification type*.
|
| This notification type will be used to search
| the special template for the notification located at
| ``notifications/includes/NF_TYPE.html`` of your
| template directory.
|
| The main reason to add this field is to save you
| from the pain of writing ``if...elif...else`` blocks
| in your template file just for handling how
| notifications will get rendered.
|
| With this, you can just save template for an individual
| notification type and call the *template-tag* to render
| all notifications for you without writing a single
| ``if...elif...else block``.
|
| You'll just need to do a
| ``{% render_notifications using NOTIFICATION_OBJ %}``
| and you'll get your notifications rendered.
|
| By default, every ``nf_type`` is set to ``default``.
:extra: **JSONField**, holds other optional data you want the
notification to carry in JSON format.
:deleted: Useful when you want to *soft delete* your notifications.
"""
recipient = models.ForeignKey(settings.AUTH_USER_MODEL,
related_name='notifications',
on_delete=models.CASCADE,
verbose_name=_('Notification receiver'))
# actor attributes.
actor_content_type = models.ForeignKey(
ContentType, null=True, blank=True,
related_name='notify_actor', on_delete=models.CASCADE,
verbose_name=_('Content type of actor object'))
actor_object_id = models.PositiveIntegerField(
null=True, blank=True,
verbose_name=_('ID of the actor object'))
actor_content_object = GenericForeignKey('actor_content_type',
'actor_object_id')
actor_text = models.CharField(
max_length=50, blank=True, null=True,
verbose_name=_('Anonymous text for actor'))
actor_url_text = models.CharField(
blank=True, null=True, max_length=200,
verbose_name=_('Anonymous URL for actor'))
# basic details.
verb = models.CharField(max_length=100,
verbose_name=_('Verb of the action'))
description = models.CharField(
max_length=255, blank=True, null=True,
verbose_name=_('Description of the notification'))
nf_type = models.CharField(max_length=20, default='default',
verbose_name=_('Type of notification'))
# TODO: Add a field to store notification cover images.
# target attributes.
target_content_type = models.ForeignKey(
ContentType, null=True, blank=True,
related_name='notify_target', on_delete=models.CASCADE,
verbose_name=_('Content type of target object'))
target_object_id = models.PositiveIntegerField(
null=True, blank=True,
verbose_name=_('ID of the target object'))
target_content_object = GenericForeignKey('target_content_type',
'target_object_id')
target_text = models.CharField(
max_length=50, blank=True, null=True,
verbose_name=_('Anonymous text for target'))
target_url_text = models.CharField(
blank=True, null=True, max_length=200,
verbose_name=_('Anonymous URL for target'))
# obj attributes.
obj_content_type = models.ForeignKey(
ContentType, null=True, blank=True,
related_name='notify_object', on_delete=models.CASCADE,
verbose_name=_('Content type of action object'))
obj_object_id = models.PositiveIntegerField(
null=True, blank=True,
verbose_name=_('ID of the target object'))
obj_content_object = GenericForeignKey('obj_content_type', 'obj_object_id')
obj_text = models.CharField(
max_length=50, blank=True, null=True,
verbose_name=_('Anonymous text for action object'))
obj_url_text = models.CharField(
blank=True, null=True, max_length=200,
verbose_name=_('Anonymous URL for action object'))
extra = JSONField(null=True, blank=True,
verbose_name=_('JSONField to store addtional data'))
# Advanced details.
created = models.DateTimeField(auto_now=False, auto_now_add=True)
read = models.BooleanField(default=False,
verbose_name=_('Read status'))
deleted = models.BooleanField(default=False,
verbose_name=_('Soft delete status'))
objects = NotificationQueryset.as_manager()
class Meta(object):
ordering = ('-created', )
def __str__(self):
ctx = {
'actor': self.actor or self.actor_text,
'verb': self.verb,
'description': self.description,
'target': self.target or self.target_text,
'obj': self.obj or self.obj_text,
'at': timesince(self.created),
}
if ctx['actor']:
if not ctx['target']:
return _("{actor} {verb} {at} ago").format(**ctx)
elif not ctx['obj']:
return _("{actor} {verb} on {target} {at} ago").format(**ctx)
elif ctx['obj']:
return _(
"{actor} {verb} {obj} on {target} {at} ago").format(**ctx)
return _("{description} -- {at} ago").format(**ctx)
def mark_as_read(self):
"""
Marks notification as read
"""
self.read = True
self.save()
def mark_as_unread(self):
"""
Marks notification as unread.
"""
self.read = False
self.save()
@cached_property
def actor(self):
"""
Property to return actor object/text to keep things DRY.
:return: Actor object or Text or None.
"""
return self.actor_content_object or self.actor_text
@cached_property
def actor_url(self):
"""
Property to return permalink of the actor.
Uses ``get_absolute_url()``.
If ``get_absolute_url()`` method fails, it tries to grab URL
from ``actor_url_text``, if it fails again, returns a "#".
:return: URL for the actor.
"""
try:
url = self.actor_content_object.get_absolute_url()
except AttributeError:
url = self.actor_url_text or "#"
return url
@cached_property
def target(self):
"""
See ``actor`` property
:return: Target object or Text or None
"""
return self.target_content_object or self.target_text
@cached_property
def target_url(self):
"""
See ``actor_url`` property.
:return: URL for the target.
"""
try:
url = self.target_content_object.get_absolute_url()
except AttributeError:
url = self.target_url_text or "#"
return url
@cached_property
def obj(self):
"""
See ``actor`` property.
:return: Action Object or Text or None.
"""
return self.obj_content_object or self.obj_text
@cached_property
def obj_url(self):
"""
See ``actor_url`` property.
:return: URL for Action Object.
"""
try:
url = self.obj_content_object.get_absolute_url()
except AttributeError:
url = self.obj_url_text or "#"
return url
@staticmethod
def do_escape(obj):
"""
Method to HTML escape an object or set it to None conditionally.
performs ``force_text()`` on the argument so that a foreignkey gets
serialized? and spit out the ``__str__`` output instead of an Object.
:param obj: Object to escape.
:return: HTML escaped and JSON-friendly data.
"""
return escape(force_text(obj)) if obj else None
def as_json(self):
"""
Notification data in a Python dictionary to which later gets
supplied to JSONResponse so that it gets JSON serialized
the *django-way*
:return: Dictionary format of the QuerySet object.
"""
data = {
"id": self.id,
"actor": self.do_escape(self.actor),
"actor_url": self.do_escape(self.actor_url),
"verb": self.do_escape(self.verb),
"description": self.do_escape(self.description),
"read": self.read,
"nf_type": self.do_escape(self.nf_type),
"target": self.do_escape(self.target),
"target_url": self.do_escape(self.target_url),
"obj": self.do_escape(self.obj),
"obj_url": self.do_escape(self.obj_url),
"created": self.created,
"data": self.extra,
}
return data
| mit | -3,218,025,144,403,898,000 | 8,958,812,308,795,094,000 | 31.941315 | 79 | 0.575643 | false |
angstwad/ansible | hacking/module_formatter.py | 13 | 18768 | #!/usr/bin/env python
# (c) 2012, Jan-Piet Mens <jpmens () gmail.com>
# (c) 2012-2014, Michael DeHaan <[email protected]> and others
#
# 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 distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
#
from __future__ import print_function
import os
import glob
import sys
import yaml
import re
import optparse
import datetime
import cgi
import warnings
from collections import defaultdict
from jinja2 import Environment, FileSystemLoader
from six import iteritems
from ansible.utils import module_docs
from ansible.utils.vars import merge_hash
from ansible.utils.unicode import to_bytes
from ansible.errors import AnsibleError
#####################################################################################
# constants and paths
# if a module is added in a version of Ansible older than this, don't print the version added information
# in the module documentation because everyone is assumed to be running something newer than this already.
TO_OLD_TO_BE_NOTABLE = 1.3
# Get parent directory of the directory this script lives in
MODULEDIR=os.path.abspath(os.path.join(
os.path.dirname(os.path.realpath(__file__)), os.pardir, 'lib', 'ansible', 'modules'
))
# The name of the DOCUMENTATION template
EXAMPLE_YAML=os.path.abspath(os.path.join(
os.path.dirname(os.path.realpath(__file__)), os.pardir, 'examples', 'DOCUMENTATION.yml'
))
_ITALIC = re.compile(r"I\(([^)]+)\)")
_BOLD = re.compile(r"B\(([^)]+)\)")
_MODULE = re.compile(r"M\(([^)]+)\)")
_URL = re.compile(r"U\(([^)]+)\)")
_CONST = re.compile(r"C\(([^)]+)\)")
DEPRECATED = " (D)"
NOTCORE = " (E)"
#####################################################################################
def rst_ify(text):
''' convert symbols like I(this is in italics) to valid restructured text '''
try:
t = _ITALIC.sub(r'*' + r"\1" + r"*", text)
t = _BOLD.sub(r'**' + r"\1" + r"**", t)
t = _MODULE.sub(r':ref:`' + r"\1 <\1>" + r"`", t)
t = _URL.sub(r"\1", t)
t = _CONST.sub(r'``' + r"\1" + r"``", t)
except Exception as e:
raise AnsibleError("Could not process (%s) : %s" % (str(text), str(e)))
return t
#####################################################################################
def html_ify(text):
''' convert symbols like I(this is in italics) to valid HTML '''
t = cgi.escape(text)
t = _ITALIC.sub("<em>" + r"\1" + "</em>", t)
t = _BOLD.sub("<b>" + r"\1" + "</b>", t)
t = _MODULE.sub("<span class='module'>" + r"\1" + "</span>", t)
t = _URL.sub("<a href='" + r"\1" + "'>" + r"\1" + "</a>", t)
t = _CONST.sub("<code>" + r"\1" + "</code>", t)
return t
#####################################################################################
def rst_fmt(text, fmt):
''' helper for Jinja2 to do format strings '''
return fmt % (text)
#####################################################################################
def rst_xline(width, char="="):
''' return a restructured text line of a given length '''
return char * width
#####################################################################################
def write_data(text, options, outputname, module):
''' dumps module output to a file or the screen, as requested '''
if options.output_dir is not None:
fname = os.path.join(options.output_dir, outputname % module)
fname = fname.replace(".py","")
f = open(fname, 'w')
f.write(text.encode('utf-8'))
f.close()
else:
print(text)
#####################################################################################
def list_modules(module_dir, depth=0):
''' returns a hash of categories, each category being a hash of module names to file paths '''
categories = dict()
module_info = dict()
aliases = defaultdict(set)
# * windows powershell modules have documentation stubs in python docstring
# format (they are not executed) so skip the ps1 format files
# * One glob level for every module level that we're going to traverse
files = glob.glob("%s/*.py" % module_dir) + glob.glob("%s/*/*.py" % module_dir) + glob.glob("%s/*/*/*.py" % module_dir) + glob.glob("%s/*/*/*/*.py" % module_dir)
for module_path in files:
if module_path.endswith('__init__.py'):
continue
category = categories
mod_path_only = os.path.dirname(module_path[len(module_dir) + 1:])
# Start at the second directory because we don't want the "vendor"
# directories (core, extras)
for new_cat in mod_path_only.split('/')[1:]:
if new_cat not in category:
category[new_cat] = dict()
category = category[new_cat]
module = os.path.splitext(os.path.basename(module_path))[0]
if module in module_docs.BLACKLIST_MODULES:
# Do not list blacklisted modules
continue
if module.startswith("_") and os.path.islink(module_path):
source = os.path.splitext(os.path.basename(os.path.realpath(module_path)))[0]
module = module.replace("_","",1)
aliases[source].add(module)
continue
category[module] = module_path
module_info[module] = module_path
# keep module tests out of becoming module docs
if 'test' in categories:
del categories['test']
return module_info, categories, aliases
#####################################################################################
def generate_parser():
''' generate an optparse parser '''
p = optparse.OptionParser(
version='%prog 1.0',
usage='usage: %prog [options] arg1 arg2',
description='Generate module documentation from metadata',
)
p.add_option("-A", "--ansible-version", action="store", dest="ansible_version", default="unknown", help="Ansible version number")
p.add_option("-M", "--module-dir", action="store", dest="module_dir", default=MODULEDIR, help="Ansible library path")
p.add_option("-T", "--template-dir", action="store", dest="template_dir", default="hacking/templates", help="directory containing Jinja2 templates")
p.add_option("-t", "--type", action='store', dest='type', choices=['rst'], default='rst', help="Document type")
p.add_option("-v", "--verbose", action='store_true', default=False, help="Verbose")
p.add_option("-o", "--output-dir", action="store", dest="output_dir", default=None, help="Output directory for module files")
p.add_option("-I", "--includes-file", action="store", dest="includes_file", default=None, help="Create a file containing list of processed modules")
p.add_option('-V', action='version', help='Show version number and exit')
return p
#####################################################################################
def jinja2_environment(template_dir, typ):
env = Environment(loader=FileSystemLoader(template_dir),
variable_start_string="@{",
variable_end_string="}@",
trim_blocks=True,
)
env.globals['xline'] = rst_xline
if typ == 'rst':
env.filters['convert_symbols_to_format'] = rst_ify
env.filters['html_ify'] = html_ify
env.filters['fmt'] = rst_fmt
env.filters['xline'] = rst_xline
template = env.get_template('rst.j2')
outputname = "%s_module.rst"
else:
raise Exception("unknown module format type: %s" % typ)
return env, template, outputname
#####################################################################################
def too_old(added):
if not added:
return False
try:
added_tokens = str(added).split(".")
readded = added_tokens[0] + "." + added_tokens[1]
added_float = float(readded)
except ValueError as e:
warnings.warn("Could not parse %s: %s" % (added, str(e)))
return False
return (added_float < TO_OLD_TO_BE_NOTABLE)
def process_module(module, options, env, template, outputname, module_map, aliases):
fname = module_map[module]
if isinstance(fname, dict):
return "SKIPPED"
basename = os.path.basename(fname)
deprecated = False
# ignore files with extensions
if not basename.endswith(".py"):
return
elif module.startswith("_"):
if os.path.islink(fname):
return # ignore, its an alias
deprecated = True
module = module.replace("_","",1)
print("rendering: %s" % module)
# use ansible core library to parse out doc metadata YAML and plaintext examples
doc, examples, returndocs = module_docs.get_docstring(fname, verbose=options.verbose)
# crash if module is missing documentation and not explicitly hidden from docs index
if doc is None:
sys.stderr.write("*** ERROR: MODULE MISSING DOCUMENTATION: %s, %s ***\n" % (fname, module))
sys.exit(1)
if deprecated and 'deprecated' not in doc:
sys.stderr.write("*** ERROR: DEPRECATED MODULE MISSING 'deprecated' DOCUMENTATION: %s, %s ***\n" % (fname, module))
sys.exit(1)
if "/core/" in fname:
doc['core'] = True
else:
doc['core'] = False
if module in aliases:
doc['aliases'] = aliases[module]
all_keys = []
if not 'version_added' in doc:
sys.stderr.write("*** ERROR: missing version_added in: %s ***\n" % module)
sys.exit(1)
added = 0
if doc['version_added'] == 'historical':
del doc['version_added']
else:
added = doc['version_added']
# don't show version added information if it's too old to be called out
if too_old(added):
del doc['version_added']
if 'options' in doc and doc['options']:
for (k,v) in iteritems(doc['options']):
# don't show version added information if it's too old to be called out
if 'version_added' in doc['options'][k] and too_old(doc['options'][k]['version_added']):
del doc['options'][k]['version_added']
if not 'description' in doc['options'][k]:
raise AnsibleError("Missing required description for option %s in %s " % (k, module))
required_value = doc['options'][k].get('required', False)
if not isinstance(required_value, bool):
raise AnsibleError("Invalid required value '%s' for option '%s' in '%s' (must be truthy)" % (required_value, k, module))
if not isinstance(doc['options'][k]['description'],list):
doc['options'][k]['description'] = [doc['options'][k]['description']]
all_keys.append(k)
all_keys = sorted(all_keys)
doc['option_keys'] = all_keys
doc['filename'] = fname
doc['docuri'] = doc['module'].replace('_', '-')
doc['now_date'] = datetime.date.today().strftime('%Y-%m-%d')
doc['ansible_version'] = options.ansible_version
doc['plainexamples'] = examples #plain text
if returndocs:
try:
doc['returndocs'] = yaml.safe_load(returndocs)
except:
print("could not load yaml: %s" % returndocs)
raise
else:
doc['returndocs'] = None
# here is where we build the table of contents...
try:
text = template.render(doc)
except Exception as e:
raise AnsibleError("Failed to render doc for %s: %s" % (fname, str(e)))
write_data(text, options, outputname, module)
return doc['short_description']
#####################################################################################
def print_modules(module, category_file, deprecated, core, options, env, template, outputname, module_map, aliases):
modstring = module
if modstring.startswith('_'):
modstring = module[1:]
modname = modstring
if module in deprecated:
modstring = modstring + DEPRECATED
elif module not in core:
modstring = modstring + NOTCORE
category_file.write(" %s - %s <%s_module>\n" % (to_bytes(modstring), to_bytes(rst_ify(module_map[module][1])), to_bytes(modname)))
def process_category(category, categories, options, env, template, outputname):
### FIXME:
# We no longer conceptually deal with a mapping of category names to
# modules to file paths. Instead we want several different records:
# (1) Mapping of module names to file paths (what's presently used
# as categories['all']
# (2) Mapping of category names to lists of module names (what you'd
# presently get from categories[category_name][subcategory_name].keys()
# (3) aliases (what's presently in categories['_aliases']
#
# list_modules() now returns those. Need to refactor this function and
# main to work with them.
module_map = categories[category]
module_info = categories['all']
aliases = {}
if '_aliases' in categories:
aliases = categories['_aliases']
category_file_path = os.path.join(options.output_dir, "list_of_%s_modules.rst" % category)
category_file = open(category_file_path, "w")
print("*** recording category %s in %s ***" % (category, category_file_path))
# start a new category file
category = category.replace("_"," ")
category = category.title()
modules = []
deprecated = []
core = []
for module in module_map.keys():
if isinstance(module_map[module], dict):
for mod in (m for m in module_map[module].keys() if m in module_info):
if mod.startswith("_"):
deprecated.append(mod)
elif '/core/' in module_info[mod][0]:
core.append(mod)
else:
if module not in module_info:
continue
if module.startswith("_"):
deprecated.append(module)
elif '/core/' in module_info[module][0]:
core.append(module)
modules.append(module)
modules.sort(key=lambda k: k[1:] if k.startswith('_') else k)
category_header = "%s Modules" % (category.title())
underscores = "`" * len(category_header)
category_file.write("""\
%s
%s
.. toctree:: :maxdepth: 1
""" % (category_header, underscores))
sections = []
for module in modules:
if module in module_map and isinstance(module_map[module], dict):
sections.append(module)
continue
else:
print_modules(module, category_file, deprecated, core, options, env, template, outputname, module_info, aliases)
sections.sort()
for section in sections:
category_file.write("\n%s\n%s\n\n" % (section.replace("_"," ").title(),'-' * len(section)))
category_file.write(".. toctree:: :maxdepth: 1\n\n")
section_modules = module_map[section].keys()
section_modules.sort(key=lambda k: k[1:] if k.startswith('_') else k)
#for module in module_map[section]:
for module in (m for m in section_modules if m in module_info):
print_modules(module, category_file, deprecated, core, options, env, template, outputname, module_info, aliases)
category_file.write("""\n\n
.. note::
- %s: This marks a module as deprecated, which means a module is kept for backwards compatibility but usage is discouraged. The module documentation details page may explain more about this rationale.
- %s: This marks a module as 'extras', which means it ships with ansible but may be a newer module and possibly (but not necessarily) less actively maintained than 'core' modules.
- Tickets filed on modules are filed to different repos than those on the main open source project. Core module tickets should be filed at `ansible/ansible-modules-core on GitHub <http://github.com/ansible/ansible-modules-core>`_, extras tickets to `ansible/ansible-modules-extras on GitHub <http://github.com/ansible/ansible-modules-extras>`_
""" % (DEPRECATED, NOTCORE))
category_file.close()
# TODO: end a new category file
#####################################################################################
def validate_options(options):
''' validate option parser options '''
if not options.module_dir:
print("--module-dir is required", file=sys.stderr)
sys.exit(1)
if not os.path.exists(options.module_dir):
print("--module-dir does not exist: %s" % options.module_dir, file=sys.stderr)
sys.exit(1)
if not options.template_dir:
print("--template-dir must be specified")
sys.exit(1)
#####################################################################################
def main():
p = generate_parser()
(options, args) = p.parse_args()
validate_options(options)
env, template, outputname = jinja2_environment(options.template_dir, options.type)
mod_info, categories, aliases = list_modules(options.module_dir)
categories['all'] = mod_info
categories['_aliases'] = aliases
category_names = [c for c in categories.keys() if not c.startswith('_')]
category_names.sort()
# Write master category list
category_list_path = os.path.join(options.output_dir, "modules_by_category.rst")
with open(category_list_path, "w") as category_list_file:
category_list_file.write("Module Index\n")
category_list_file.write("============\n")
category_list_file.write("\n\n")
category_list_file.write(".. toctree::\n")
category_list_file.write(" :maxdepth: 1\n\n")
for category in category_names:
category_list_file.write(" list_of_%s_modules\n" % category)
#
# Import all the docs into memory
#
module_map = mod_info.copy()
skipped_modules = set()
for modname in module_map:
result = process_module(modname, options, env, template, outputname, module_map, aliases)
if result == 'SKIPPED':
del categories['all'][modname]
else:
categories['all'][modname] = (categories['all'][modname], result)
#
# Render all the docs to rst via category pages
#
for category in category_names:
process_category(category, categories, options, env, template, outputname)
if __name__ == '__main__':
main()
| gpl-3.0 | 9,207,373,748,318,529,000 | 8,083,369,432,629,306,000 | 36.83871 | 347 | 0.58669 | false |
jayceyxc/hue | desktop/libs/hadoop/src/hadoop/mini_cluster.py | 10 | 18183 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#######################################################
## WARNING!!! ##
## This file is stale. Hadoop 0.23 and CDH4 ##
## do not support minicluster. This is replaced ##
## by webhdfs.py, to set up a running cluster. ##
#######################################################
# A Python-side driver for MiniHadoopClusterManager
#
# See README.testing for hints on how to use this,
# and also look for other examples.
#
# If you have one of these running and want to figure out what ports
# are open, one way to do so is something like:
# for p in $(lsof -p 63564 | grep LISTEN | sed -e 's/.*:\([0-9][0-9]*\).*/\1/')
# do
# echo $p
# echo "GET /" | nc -w 1 localhost $p
# done
import atexit
import subprocess
import os
import pwd
import logging
import sys
import signal
import shutil
import socket
import time
import tempfile
import json
import lxml.etree
import urllib2
from desktop.lib import python_util
from desktop.lib.test_utils import clear_sys_caches, restore_sys_caches
from hadoop.fs.hadoopfs import HadoopFileSystem
from hadoop.job_tracker import LiveJobTracker
import hadoop.cluster
# Starts mini cluster suspended until a debugger attaches to it.
DEBUG_HADOOP=False
# Redirects mini cluster stderr to stderr. (Default is to put it in a file.)
USE_STDERR=os.environ.get("MINI_CLUSTER_USE_STDERR", False)
# Whether to clean up temp dir at exit
CLEANUP_TMP_DIR=os.environ.get("MINI_CLUSTER_CLEANUP", True)
# How long to wait for cluster to start up. (seconds)
MAX_CLUSTER_STARTUP_TIME = 120.0
# List of classes to be used as plugins for the JT of the cluster.
CLUSTER_JT_PLUGINS = 'org.apache.hadoop.thriftfs.ThriftJobTrackerPlugin'
# MR Task Scheduler. By default use the FIFO scheduler
CLUSTER_TASK_SCHEDULER='org.apache.hadoop.mapred.JobQueueTaskScheduler'
# MR queue names
CLUSTER_QUEUE_NAMES='default'
STARTUP_CONFIGS={}
# users and their groups which are used in Hue tests.
TEST_USER_GROUP_MAPPING = {
'test': ['test','users','supergroup'], 'chown_test': ['chown_test'],
'notsuperuser': ['notsuperuser'], 'gamma': ['gamma'],
'webui': ['webui'], 'hue': ['supergroup']
}
LOGGER=logging.getLogger(__name__)
class MiniHadoopCluster(object):
"""
Manages the invocation of a MiniHadoopClusterManager from Python.
"""
def __init__(self, num_datanodes=1, num_tasktrackers=1):
# These are cached
self._jt, self._fs = None, None
self.num_datanodes = num_datanodes
self.num_tasktrackers = num_tasktrackers
def start(self, extra_configs=None):
"""
Start a cluster as a subprocess.
"""
self.tmpdir = tempfile.mkdtemp()
if not extra_configs:
extra_configs = {}
def tmppath(filename):
"""Creates paths in tmpdir."""
return os.path.join(self.tmpdir, filename)
LOGGER.info("Using temporary directory: %s" % self.tmpdir)
in_conf_dir = tmppath("in-conf")
os.mkdir(in_conf_dir)
self.log_dir = tmppath("logs")
os.mkdir(self.log_dir)
f = file(os.path.join(in_conf_dir, "hadoop-metrics.properties"), "w")
try:
f.write("""
dfs.class=org.apache.hadoop.metrics.spi.NoEmitMetricsContext
mapred.class=org.apache.hadoop.metrics.spi.NoEmitMetricsContext
jvm.class=org.apache.hadoop.metrics.spi.NoEmitMetricsContext
rpc.class=org.apache.hadoop.metrics.spi.NoEmitMetricsContext
""")
finally:
f.close()
if self.superuser not in TEST_USER_GROUP_MAPPING:
TEST_USER_GROUP_MAPPING[self.superuser] = [self.superuser]
_write_static_group_mapping(TEST_USER_GROUP_MAPPING,
tmppath('ugm.properties'))
core_configs = {
'hadoop.proxyuser.%s.groups' % (self.superuser,): 'users,supergroup',
'hadoop.proxyuser.%s.hosts' % (self.superuser,): 'localhost',
'mapred.jobtracker.plugins': CLUSTER_JT_PLUGINS}
extra_configs.update(STARTUP_CONFIGS)
write_config(core_configs, tmppath('in-conf/core-site.xml'))
write_config({'mapred.jobtracker.taskScheduler': CLUSTER_TASK_SCHEDULER,
'mapred.queue.names': CLUSTER_QUEUE_NAMES},
tmppath('in-conf/mapred-site.xml'))
hadoop_policy_keys = ['client', 'client.datanode', 'datanode', 'inter.datanode', 'namenode', 'inter.tracker', 'job.submission', 'task.umbilical', 'refresh.policy', 'admin.operations']
hadoop_policy_config = {}
for policy in hadoop_policy_keys:
hadoop_policy_config['security.' + policy + '.protocol.acl'] = '*'
write_config(hadoop_policy_config, tmppath('in-conf/hadoop-policy.xml'))
details_file = file(tmppath("details.json"), "w+")
try:
args = [ os.path.join(hadoop.conf.HADOOP_MR1_HOME.get(), 'bin', 'hadoop'),
"jar",
hadoop.conf.HADOOP_TEST_JAR.get(),
"minicluster",
"-writeConfig", tmppath("config.xml"),
"-writeDetails", tmppath("details.json"),
"-datanodes", str(self.num_datanodes),
"-tasktrackers", str(self.num_tasktrackers),
"-useloopbackhosts",
"-D", "hadoop.tmp.dir=%s" % self.tmpdir,
"-D", "mapred.local.dir=%s/mapred/local" % self.tmpdir,
"-D", "mapred.system.dir=/mapred/system",
"-D", "mapred.temp.dir=/mapred/temp",
"-D", "jobclient.completion.poll.interval=100",
"-D", "jobclient.progress.monitor.poll.interval=100",
"-D", "fs.checkpoint.period=1",
# For a reason I don't fully understand, this must be 0.0.0.0 and not 'localhost'
"-D", "dfs.secondary.http.address=0.0.0.0:%d" % python_util.find_unused_port(),
# We bind the NN's thrift interface to a port we find here.
# This is suboptimal, since there's a race. Alas, if we don't
# do this here, the datanodes fail to discover the namenode's thrift
# address, and there's a race there
"-D", "dfs.thrift.address=localhost:%d" % python_util.find_unused_port(),
"-D", "jobtracker.thrift.address=localhost:%d" % python_util.find_unused_port(),
# Jobs realize they have finished faster with this timeout.
"-D", "jobclient.completion.poll.interval=50",
"-D", "hadoop.security.authorization=true",
"-D", "hadoop.policy.file=%s/hadoop-policy.xml" % in_conf_dir,
]
for key,value in extra_configs.iteritems():
args.append("-D")
args.append(key + "=" + value)
env = {}
env["HADOOP_CONF_DIR"] = in_conf_dir
env["HADOOP_OPTS"] = "-Dtest.build.data=%s" % (self.tmpdir, )
env["HADOOP_CLASSPATH"] = ':'.join([
# -- BEGIN JAVA TRIVIA --
# Add the -test- jar to the classpath to work around a subtle issue
# involving Java classloaders. In brief, hadoop's RunJar class creates
# a child classloader with the test jar on it, but the core classes
# are loaded by the system classloader. This is fine except that
# some classes in the test jar extend package-protected classes in the
# core jar. Even though the classes are in the same package name, they
# are thus loaded by different classloaders and therefore an IllegalAccessError
# prevents the MiniMRCluster from starting. Adding the test jar to the system
# classpath prevents this error since then both the MiniMRCluster and the
# core classes are loaded by the system classloader.
hadoop.conf.HADOOP_TEST_JAR.get(),
# -- END JAVA TRIVIA --
hadoop.conf.HADOOP_PLUGIN_CLASSPATH.get(),
# Due to CDH-4537, we need to add test dependencies to run minicluster
os.path.join(os.path.dirname(__file__), 'test_jars', '*'),
])
env["HADOOP_HEAPSIZE"] = "128"
env["HADOOP_HOME"] = hadoop.conf.HADOOP_MR1_HOME.get()
env["HADOOP_LOG_DIR"] = self.log_dir
env["USER"] = self.superuser
if "JAVA_HOME" in os.environ:
env["JAVA_HOME"] = os.environ["JAVA_HOME"]
# Wait for the debugger to attach
if DEBUG_HADOOP:
env["HADOOP_OPTS"] = env.get("HADOOP_OPTS", "") + " -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9999"
if USE_STDERR:
stderr=sys.stderr
else:
stderr=file(tmppath("stderr"), "w")
LOGGER.debug("Starting minicluster: %s env: %s" % (repr(args), repr(env)))
self.clusterproc = subprocess.Popen(
args=args,
stdout=file(tmppath("stdout"), "w"),
stderr=stderr,
env=env)
details = {}
start = time.time()
# We consider the cluster started when the details file parses correct JSON.
# MiniHadoopCluster currently writes the details file last, and this depends
# on that.
while not details:
try:
details_file.seek(0)
details = json.load(details_file)
except ValueError:
pass
if self.clusterproc.poll() is not None or (not DEBUG_HADOOP and (time.time() - start) > MAX_CLUSTER_STARTUP_TIME):
LOGGER.debug("stdout:" + file(tmppath("stdout")).read())
if not USE_STDERR:
LOGGER.debug("stderr:" + file(tmppath("stderr")).read())
self.stop()
raise Exception("Cluster process quit or is taking too long to start. Aborting.")
finally:
details_file.close()
LOGGER.debug("Successfully started minicluster")
# Place all the details as attributes on self.
for k, v in details.iteritems():
setattr(self, k, v)
# Parse the configuration using XPath and place into self.config.
config = lxml.etree.parse(tmppath("config.xml"))
self.config = dict( (property.find("./name").text, property.find("./value").text)
for property in config.xpath("/configuration/property"))
# Write out Hadoop-style configuration directory,
# which can, in turn, be used for /bin/hadoop.
self.config_dir = tmppath("conf")
os.mkdir(self.config_dir)
hadoop.conf.HADOOP_CONF_DIR.set_for_testing(self.config_dir)
write_config(self.config, tmppath("conf/core-site.xml"),
["fs.defaultFS", "jobclient.completion.poll.interval",
"dfs.namenode.checkpoint.period", "dfs.namenode.checkpoint.dir",
'hadoop.proxyuser.'+self.superuser+'.groups', 'hadoop.proxyuser.'+self.superuser+'.hosts'])
write_config(self.config, tmppath("conf/hdfs-site.xml"), ["fs.defaultFS", "dfs.namenode.http-address", "dfs.namenode.secondary.http-address"])
# mapred.job.tracker isn't written out into self.config, so we fill
# that one out more manually.
write_config({ 'mapred.job.tracker': 'localhost:%d' % self.jobtracker_port },
tmppath("conf/mapred-site.xml"))
write_config(hadoop_policy_config, tmppath('conf/hadoop-policy.xml'))
# Once the config is written out, we can start the 2NN.
args = [hadoop.conf.HADOOP_BIN.get(),
'--config', self.config_dir,
'secondarynamenode']
LOGGER.debug("Starting 2NN at: " +
self.config['dfs.secondary.http.address'])
LOGGER.debug("2NN command: %s env: %s" % (repr(args), repr(env)))
self.secondary_proc = subprocess.Popen(
args=args,
stdout=file(tmppath("stdout.2nn"), "w"),
stderr=file(tmppath("stderr.2nn"), "w"),
env=env)
while True:
try:
response = urllib2.urlopen(urllib2.Request('http://' +
self.config['dfs.secondary.http.address']))
except urllib2.URLError:
# If we should abort startup.
if self.secondary_proc.poll() is not None or (not DEBUG_HADOOP and (time.time() - start) > MAX_CLUSTER_STARTUP_TIME):
LOGGER.debug("stdout:" + file(tmppath("stdout")).read())
if not USE_STDERR:
LOGGER.debug("stderr:" + file(tmppath("stderr")).read())
self.stop()
raise Exception("2nn process quit or is taking too long to start. Aborting.")
break
else:
time.sleep(1)
continue
# We didn't get a URLError. 2NN started successfully.
response.close()
break
LOGGER.debug("Successfully started 2NN")
def stop(self):
"""
Kills the cluster ungracefully.
"""
if self.clusterproc and self.clusterproc.poll() is None:
os.kill(self.clusterproc.pid, signal.SIGKILL)
self.clusterproc.wait()
if self.secondary_proc and self.secondary_proc.poll() is None:
os.kill(self.secondary_proc.pid, signal.SIGKILL)
self.secondary_proc.wait()
if CLEANUP_TMP_DIR != 'false':
logging.info("Cleaning up self.tmpdir. Use $MINI_CLUSTER_CLEANUP to avoid.")
shutil.rmtree(self.tmpdir)
@property
def fs(self):
"""Creates a HadoopFileSystem object configured for this cluster."""
if self._fs is None:
self._fs = HadoopFileSystem("localhost",
thrift_port=self.namenode_thrift_port,
hdfs_port=self.namenode_port,
hadoop_bin_path=hadoop.conf.HADOOP_BIN.get())
return self._fs
@property
def jt(self):
"""Creates a LiveJobTracker object configured for this cluster."""
if self._jt is None:
self._jt = LiveJobTracker("localhost", self.jobtracker_thrift_port)
return self._jt
@property
def superuser(self):
"""
Returns the "superuser" of this cluster.
This is essentially the user that the cluster was started
with.
"""
return pwd.getpwuid(os.getuid()).pw_name
@property
def namenode_thrift_port(self):
"""
Return the namenode thrift port.
"""
_, port = self.config["dfs.thrift.address"].split(":")
return int(port)
@property
def jobtracker_thrift_port(self):
"""
Return the jobtracker thrift port.
"""
_, port = self.config["jobtracker.thrift.address"].split(":")
return int(port)
def dump_ini(self, fd=sys.stdout):
"""
Dumps an ini-style configuration suitable for configuring desktop
to talk to this cluster.
TODO(todd) eventually this should use config framework 'writeback'
support
@param fd: a file-like writable object
"""
print >>fd, "[hadoop]"
print >>fd, "[[hdfs_clusters]]"
print >>fd, "[[[default]]]"
print >>fd, "thrift_port=%d" % self.namenode_thrift_port
print >>fd, "[[mapred_clusters]]"
print >>fd, "[[[default]]]"
print >>fd, "thrift_port=%d" % self.jobtracker_thrift_port
# Shared global cluster returned by shared_cluster context manager.
_shared_cluster = None
def shared_cluster(conf=False):
"""
Use a shared cluster that is initialized on demand,
and that is torn down at process exit.
If conf is True, then configuration is updated to
reference the cluster, and relevant caches are cleared.
Returns a lambda which must be called when you are
done with the shared cluster.
"""
cluster = shared_cluster_internal()
closers = [ ]
if conf:
closers.extend([
hadoop.conf.HDFS_CLUSTERS["default"].NN_HOST.set_for_testing("localhost"),
hadoop.conf.HDFS_CLUSTERS["default"].NN_HDFS_PORT.set_for_testing(cluster.namenode_port),
hadoop.conf.MR_CLUSTERS["default"].HOST.set_for_testing("localhost"),
hadoop.conf.MR_CLUSTERS["default"].JT_THRIFT_PORT.set_for_testing(cluster.jt.thrift_port),
])
# Clear the caches
# This is djanky (that's django for "janky").
# Caches are tricky w.r.t. to to testing;
# perhaps there are better patterns?
old_caches = clear_sys_caches()
def finish():
if conf:
restore_sys_caches(old_caches)
for x in closers:
x()
# We don't run the cluster's real stop method,
# because a shared cluster should be shutdown at
# exit.
cluster.shutdown = finish
return cluster
def write_config(config, path, variables=None):
"""
Minimal utility to write Hadoop-style configuration
from a configuration map (config), into a new file
called path.
"""
f = file(path, "w")
try:
f.write("""<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
""")
keys = (variables and (variables,) or (config.keys(),))[0]
for name in keys:
value = config[name]
f.write(" <property>\n")
f.write(" <name>%s</name>\n" % name)
f.write(" <value>%s</value>\n" % value)
f.write(" </property>\n")
f.write("</configuration>\n")
finally:
f.close()
def _write_static_group_mapping(user_group_mapping, path):
"""
Create a Java-style .properties file to contain the static user -> group
mapping used by tests.
"""
f = file(path, 'w')
try:
for user, groups in user_group_mapping.iteritems():
f.write('%s = %s\n' % (user, ','.join(groups)))
finally:
f.close()
def shared_cluster_internal():
"""
Manages _shared_cluster.
"""
global _shared_cluster
if _shared_cluster is None:
_shared_cluster = MiniHadoopCluster()
_shared_cluster.start()
atexit.register(_shared_cluster.stop)
return _shared_cluster
if __name__ == '__main__':
"""
It's poor form to write tests for tests (the world-wide stack
overflow exception), so this merely tries the code.
"""
logging.basicConfig(level=logging.DEBUG)
import desktop
desktop.lib.conf.initialize([hadoop.conf])
if True:
cluster = MiniHadoopCluster(num_datanodes=5, num_tasktrackers=5)
cluster.start()
print cluster.namenode_port
print cluster.jobtracker_port
print cluster.config.get("dfs.thrift.address")
cluster.dump_ini(sys.stdout)
from IPython.Shell import IPShellEmbed
IPShellEmbed()()
cluster.stop()
| apache-2.0 | -903,634,032,054,105,300 | -5,830,876,984,496,096,000 | 35.221116 | 187 | 0.652478 | false |
Sarsate/compute-image-packages | google_compute_engine/clock_skew/tests/clock_skew_daemon_test.py | 1 | 4640 | #!/usr/bin/python
# Copyright 2016 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 by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Unittest for clock_skew_daemon.py module."""
import subprocess
from google_compute_engine.clock_skew import clock_skew_daemon
from google_compute_engine.test_compat import mock
from google_compute_engine.test_compat import unittest
class ClockSkewDaemonTest(unittest.TestCase):
@mock.patch('google_compute_engine.clock_skew.clock_skew_daemon.metadata_watcher')
@mock.patch('google_compute_engine.clock_skew.clock_skew_daemon.logger.Logger')
@mock.patch('google_compute_engine.clock_skew.clock_skew_daemon.file_utils.LockFile')
def testClockSkewDaemon(self, mock_lock, mock_logger, mock_watcher):
mocks = mock.Mock()
mocks.attach_mock(mock_lock, 'lock')
mocks.attach_mock(mock_logger, 'logger')
mocks.attach_mock(mock_watcher, 'watcher')
metadata_key = clock_skew_daemon.ClockSkewDaemon.drift_token
mock_logger.return_value = mock_logger
mock_watcher.MetadataWatcher.return_value = mock_watcher
with mock.patch.object(
clock_skew_daemon.ClockSkewDaemon, 'HandleClockSync') as mock_handle:
clock_skew_daemon.ClockSkewDaemon()
expected_calls = [
mock.call.logger(name=mock.ANY, debug=False, facility=mock.ANY),
mock.call.watcher.MetadataWatcher(logger=mock_logger),
mock.call.lock(clock_skew_daemon.LOCKFILE),
mock.call.lock().__enter__(),
mock.call.logger.info(mock.ANY),
mock.call.watcher.WatchMetadata(
mock_handle, metadata_key=metadata_key, recursive=False),
mock.call.lock().__exit__(None, None, None),
]
self.assertEqual(mocks.mock_calls, expected_calls)
@mock.patch('google_compute_engine.clock_skew.clock_skew_daemon.metadata_watcher')
@mock.patch('google_compute_engine.clock_skew.clock_skew_daemon.logger.Logger')
@mock.patch('google_compute_engine.clock_skew.clock_skew_daemon.file_utils.LockFile')
def testClockSkewDaemonError(self, mock_lock, mock_logger, mock_watcher):
mocks = mock.Mock()
mocks.attach_mock(mock_lock, 'lock')
mocks.attach_mock(mock_logger, 'logger')
mocks.attach_mock(mock_watcher, 'watcher')
mock_lock.side_effect = IOError('Test Error')
mock_logger.return_value = mock_logger
with mock.patch.object(
clock_skew_daemon.ClockSkewDaemon, 'HandleClockSync'):
clock_skew_daemon.ClockSkewDaemon(debug=True)
expected_calls = [
mock.call.logger(name=mock.ANY, debug=True, facility=mock.ANY),
mock.call.watcher.MetadataWatcher(logger=mock_logger),
mock.call.lock(clock_skew_daemon.LOCKFILE),
mock.call.logger.warning('Test Error'),
]
self.assertEqual(mocks.mock_calls, expected_calls)
@mock.patch('google_compute_engine.clock_skew.clock_skew_daemon.subprocess.check_call')
def testHandleClockSync(self, mock_call):
command = ['/sbin/hwclock', '--hctosys']
mock_sync = mock.create_autospec(clock_skew_daemon.ClockSkewDaemon)
mock_logger = mock.Mock()
mock_sync.logger = mock_logger
clock_skew_daemon.ClockSkewDaemon.HandleClockSync(mock_sync, 'Response')
mock_call.assert_called_once_with(command)
expected_calls = [
mock.call.info(mock.ANY, 'Response'),
mock.call.info(mock.ANY),
]
self.assertEqual(mock_logger.mock_calls, expected_calls)
@mock.patch('google_compute_engine.clock_skew.clock_skew_daemon.subprocess.check_call')
def testHandleClockSyncError(self, mock_call):
command = ['/sbin/hwclock', '--hctosys']
mock_sync = mock.create_autospec(clock_skew_daemon.ClockSkewDaemon)
mock_logger = mock.Mock()
mock_sync.logger = mock_logger
mock_call.side_effect = subprocess.CalledProcessError(1, 'Test')
clock_skew_daemon.ClockSkewDaemon.HandleClockSync(mock_sync, 'Response')
mock_call.assert_called_once_with(command)
expected_calls = [
mock.call.info(mock.ANY, 'Response'),
mock.call.warning(mock.ANY),
]
self.assertEqual(mock_logger.mock_calls, expected_calls)
if __name__ == '__main__':
unittest.main()
| apache-2.0 | -2,567,237,621,000,188,000 | 4,765,332,631,029,882,000 | 42.364486 | 89 | 0.714009 | false |
blindFS/powerline | tests/lib/vterm.py | 23 | 4580 | # vim:fileencoding=utf-8:noet
from __future__ import (unicode_literals, division, absolute_import, print_function)
import ctypes
from powerline.lib.unicode import unicode, unichr, tointiter
class CTypesFunction(object):
def __init__(self, library, name, rettype, args):
self.name = name
self.prototype = ctypes.CFUNCTYPE(rettype, *[
arg[1] for arg in args
])
self.args = args
self.func = self.prototype((name, library), tuple((
(1, arg[0]) for arg in args
)))
def __call__(self, *args, **kwargs):
return self.func(*args, **kwargs)
def __repr__(self):
return '{cls}(<library>, {name!r}, {rettype!r}, {args!r})'.format(
cls=self.__class__.__name__,
**self.__dict__
)
class CTypesLibraryFuncsCollection(object):
def __init__(self, lib, **kwargs):
self.lib = lib
library_loader = ctypes.LibraryLoader(ctypes.CDLL)
library = library_loader.LoadLibrary(lib)
self.library = library
for name, args in kwargs.items():
self.__dict__[name] = CTypesFunction(library, name, *args)
class VTermPos_s(ctypes.Structure):
_fields_ = (
('row', ctypes.c_int),
('col', ctypes.c_int),
)
class VTermColor_s(ctypes.Structure):
_fields_ = (
('red', ctypes.c_uint8),
('green', ctypes.c_uint8),
('blue', ctypes.c_uint8),
)
class VTermScreenCellAttrs_s(ctypes.Structure):
_fields_ = (
('bold', ctypes.c_uint, 1),
('underline', ctypes.c_uint, 2),
('italic', ctypes.c_uint, 1),
('blink', ctypes.c_uint, 1),
('reverse', ctypes.c_uint, 1),
('strike', ctypes.c_uint, 1),
('font', ctypes.c_uint, 4),
('dwl', ctypes.c_uint, 1),
('dhl', ctypes.c_uint, 2),
)
VTERM_MAX_CHARS_PER_CELL = 6
class VTermScreenCell_s(ctypes.Structure):
_fields_ = (
('chars', ctypes.ARRAY(ctypes.c_uint32, VTERM_MAX_CHARS_PER_CELL)),
('width', ctypes.c_char),
('attrs', VTermScreenCellAttrs_s),
('fg', VTermColor_s),
('bg', VTermColor_s),
)
VTerm_p = ctypes.c_void_p
VTermScreen_p = ctypes.c_void_p
def get_functions(lib):
return CTypesLibraryFuncsCollection(
lib,
vterm_new=(VTerm_p, (
('rows', ctypes.c_int),
('cols', ctypes.c_int)
)),
vterm_obtain_screen=(VTermScreen_p, (('vt', VTerm_p),)),
vterm_set_size=(None, (
('vt', VTerm_p),
('rows', ctypes.c_int),
('cols', ctypes.c_int)
)),
vterm_screen_reset=(None, (
('screen', VTermScreen_p),
('hard', ctypes.c_int)
)),
vterm_input_write=(ctypes.c_size_t, (
('vt', VTerm_p),
('bytes', ctypes.POINTER(ctypes.c_char)),
('size', ctypes.c_size_t),
)),
vterm_screen_get_cell=(ctypes.c_int, (
('screen', VTermScreen_p),
('pos', VTermPos_s),
('cell', ctypes.POINTER(VTermScreenCell_s))
)),
vterm_free=(None, (('vt', VTerm_p),)),
)
class VTermColor(object):
__slots__ = ('red', 'green', 'blue')
def __init__(self, color):
self.red = color.red
self.green = color.green
self.blue = color.blue
@property
def color_key(self):
return (self.red, self.green, self.blue)
class VTermScreenCell(object):
def __init__(self, vtsc):
for field in VTermScreenCellAttrs_s._fields_:
field_name = field[0]
setattr(self, field_name, getattr(vtsc.attrs, field_name))
self.text = ''.join((
unichr(vtsc.chars[i]) for i in range(VTERM_MAX_CHARS_PER_CELL)
)).rstrip('\x00')
self.width = next(tointiter(vtsc.width))
self.fg = VTermColor(vtsc.fg)
self.bg = VTermColor(vtsc.bg)
self.cell_properties_key = (
self.fg.color_key,
self.bg.color_key,
self.bold,
self.underline,
self.italic,
)
class VTermScreen(object):
def __init__(self, functions, screen):
self.functions = functions
self.screen = screen
def __getitem__(self, position):
pos = VTermPos_s(*position)
cell = VTermScreenCell_s()
ret = self.functions.vterm_screen_get_cell(self.screen, pos, cell)
if ret != 1:
raise ValueError('vterm_screen_get_cell returned {0}'.format(ret))
return VTermScreenCell(cell)
def reset(self, hard):
self.functions.vterm_screen_reset(self.screen, int(bool(hard)))
class VTerm(object):
def __init__(self, lib, rows, cols):
self.functions = get_functions(lib)
self.vt = self.functions.vterm_new(rows, cols)
self.vtscreen = VTermScreen(self.functions, self.functions.vterm_obtain_screen(self.vt))
self.vtscreen.reset(True)
def push(self, data):
if isinstance(data, unicode):
data = data.encode('utf-8')
return self.functions.vterm_input_write(self.vt, data, len(data))
def resize(self, rows, cols):
self.functions.vterm_set_size(self.vt, rows, cols)
def __del__(self):
try:
self.functions.vterm_free(self.vt)
except AttributeError:
pass
| mit | -3,497,552,486,917,548,000 | -1,940,323,100,644,993,800 | 23.623656 | 90 | 0.650437 | false |
teamfx/openjfx-10-dev-rt | modules/javafx.web/src/main/native/Tools/Scripts/webkitpy/tool/bot/irc_command.py | 2 | 12985 | # Copyright (c) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import itertools
import random
import re
from webkitpy.common.config import irc as config_irc
from webkitpy.common.config import urls
from webkitpy.common.config.committers import CommitterList
from webkitpy.common.net.web import Web
from webkitpy.common.system.executive import ScriptError
from webkitpy.tool.bot.queueengine import TerminateQueue
from webkitpy.tool.grammar import join_with_separators
from webkitpy.tool.grammar import pluralize
def _post_error_and_check_for_bug_url(tool, nicks_string, exception):
tool.irc().post("%s" % exception)
bug_id = urls.parse_bug_id(exception.output)
if bug_id:
bug_url = tool.bugs.bug_url_for_bug_id(bug_id)
tool.irc().post("%s: Ugg... Might have created %s" % (nicks_string, bug_url))
# FIXME: Merge with Command?
class IRCCommand(object):
usage_string = None
help_string = None
def execute(self, nick, args, tool, sheriff):
raise NotImplementedError("subclasses must implement")
@classmethod
def usage(cls, nick):
return "%s: Usage: %s" % (nick, cls.usage_string)
@classmethod
def help(cls, nick):
return "%s: %s" % (nick, cls.help_string)
class CreateBug(IRCCommand):
usage_string = "create-bug BUG_TITLE"
help_string = "Creates a Bugzilla bug with the given title."
def execute(self, nick, args, tool, sheriff):
if not args:
return self.usage(nick)
bug_title = " ".join(args)
bug_description = "%s\nRequested by %s on %s." % (bug_title, nick, config_irc.channel)
# There happens to be a committers list hung off of Bugzilla, so
# re-using that one makes things easiest for now.
requester = tool.bugs.committers.contributor_by_irc_nickname(nick)
requester_email = requester.bugzilla_email() if requester else None
try:
bug_id = tool.bugs.create_bug(bug_title, bug_description, cc=requester_email, assignee=requester_email)
bug_url = tool.bugs.bug_url_for_bug_id(bug_id)
return "%s: Created bug: %s" % (nick, bug_url)
except Exception, e:
return "%s: Failed to create bug:\n%s" % (nick, e)
class Help(IRCCommand):
usage_string = "help [COMMAND]"
help_string = "Provides help on my individual commands."
def execute(self, nick, args, tool, sheriff):
if args:
for command_name in args:
if command_name in commands:
self._post_command_help(nick, tool, commands[command_name])
else:
tool.irc().post("%s: Available commands: %s" % (nick, ", ".join(sorted(visible_commands.keys()))))
tool.irc().post('%s: Type "%s: help COMMAND" for help on my individual commands.' % (nick, sheriff.name()))
def _post_command_help(self, nick, tool, command):
tool.irc().post(command.usage(nick))
tool.irc().post(command.help(nick))
aliases = " ".join(sorted(filter(lambda alias: commands[alias] == command and alias not in visible_commands, commands)))
if aliases:
tool.irc().post("%s: Aliases: %s" % (nick, aliases))
class Hi(IRCCommand):
usage_string = "hi"
help_string = "Responds with hi."
def execute(self, nick, args, tool, sheriff):
if len(args) and re.match(sheriff.name() + r'_*\s*!\s*', ' '.join(args)):
return "%s: hi %s!" % (nick, nick)
if sheriff.name() == 'WKR': # For some unknown reason, WKR can't use tool.bugs.quips().
return "You're doing it wrong"
quips = tool.bugs.quips()
quips.append('"Only you can prevent forest fires." -- Smokey the Bear')
return random.choice(quips)
class PingPong(IRCCommand):
usage_string = "ping"
help_string = "Responds with pong."
def execute(self, nick, args, tool, sheriff):
return nick + ": pong"
class YouThere(IRCCommand):
usage_string = "yt?"
help_string = "Responds with yes."
def execute(self, nick, args, tool, sheriff):
return "%s: yes" % nick
class Restart(IRCCommand):
usage_string = "restart"
help_string = "Restarts sherrifbot. Will update its WebKit checkout, and re-join the channel momentarily."
def execute(self, nick, args, tool, sheriff):
tool.irc().post("Restarting...")
raise TerminateQueue()
class Rollout(IRCCommand):
usage_string = "rollout SVN_REVISION [SVN_REVISIONS] REASON"
help_string = "Opens a rollout bug, CCing author + reviewer, and attaching the reverse-diff of the given revisions marked as commit-queue=?."
def _extract_revisions(self, arg):
revision_list = []
possible_revisions = arg.split(",")
for revision in possible_revisions:
revision = revision.strip()
if not revision:
continue
revision = revision.lstrip("r")
# If one part of the arg isn't in the correct format,
# then none of the arg should be considered a revision.
if not revision.isdigit():
return None
revision_list.append(int(revision))
return revision_list
def _parse_args(self, args):
if not args:
return (None, None)
svn_revision_list = []
remaining_args = args[:]
# First process all revisions.
while remaining_args:
new_revisions = self._extract_revisions(remaining_args[0])
if not new_revisions:
break
svn_revision_list += new_revisions
remaining_args = remaining_args[1:]
# Was there a revision number?
if not len(svn_revision_list):
return (None, None)
# Everything left is the reason.
rollout_reason = " ".join(remaining_args)
return svn_revision_list, rollout_reason
def _responsible_nicknames_from_revisions(self, tool, sheriff, svn_revision_list):
commit_infos = map(tool.checkout().commit_info_for_revision, svn_revision_list)
nickname_lists = map(sheriff.responsible_nicknames_from_commit_info, commit_infos)
return sorted(set(itertools.chain(*nickname_lists)))
def _nicks_string(self, tool, sheriff, requester_nick, svn_revision_list):
# FIXME: _parse_args guarentees that our svn_revision_list is all numbers.
# However, it's possible our checkout will not include one of the revisions,
# so we may need to catch exceptions from commit_info_for_revision here.
target_nicks = [requester_nick] + self._responsible_nicknames_from_revisions(tool, sheriff, svn_revision_list)
return ", ".join(target_nicks)
def _update_working_copy(self, tool):
tool.scm().discard_local_changes()
tool.executive.run_and_throw_if_fail(tool.deprecated_port().update_webkit_command(), quiet=True, cwd=tool.scm().checkout_root)
def _check_diff_failure(self, error_log, tool):
if not error_log:
return None
revert_failure_message_start = error_log.find("Failed to apply reverse diff for revision")
if revert_failure_message_start == -1:
return None
lines = error_log[revert_failure_message_start:].split('\n')[1:]
files = list(itertools.takewhile(lambda line: tool.filesystem.exists(tool.scm().absolute_path(line)), lines))
if files:
return "Failed to apply reverse diff for %s: %s" % (pluralize(len(files), "file", showCount=False), ", ".join(files))
return None
def execute(self, nick, args, tool, sheriff):
svn_revision_list, rollout_reason = self._parse_args(args)
if (not svn_revision_list or not rollout_reason):
return self.usage(nick)
revision_urls_string = join_with_separators([urls.view_revision_url(revision) for revision in svn_revision_list])
tool.irc().post("%s: Preparing rollout for %s ..." % (nick, revision_urls_string))
self._update_working_copy(tool)
# FIXME: IRCCommand should bind to a tool and have a self._tool like Command objects do.
# Likewise we should probably have a self._sheriff.
nicks_string = self._nicks_string(tool, sheriff, nick, svn_revision_list)
try:
complete_reason = "%s (Requested by %s on %s)." % (
rollout_reason, nick, config_irc.channel)
bug_id = sheriff.post_rollout_patch(svn_revision_list, complete_reason)
bug_url = tool.bugs.bug_url_for_bug_id(bug_id)
tool.irc().post("%s: Created rollout: %s" % (nicks_string, bug_url))
except ScriptError, e:
tool.irc().post("%s: Failed to create rollout patch:" % nicks_string)
diff_failure = self._check_diff_failure(e.output, tool)
if diff_failure:
return "%s: %s" % (nicks_string, diff_failure)
_post_error_and_check_for_bug_url(tool, nicks_string, e)
class Whois(IRCCommand):
usage_string = "whois SEARCH_STRING"
help_string = "Searches known contributors and returns any matches with irc, email and full name. Wild card * permitted."
def _full_record_and_nick(self, contributor):
result = ''
if contributor.irc_nicknames:
result += ' (:%s)' % ', :'.join(contributor.irc_nicknames)
if contributor.can_review:
result += ' (r)'
elif contributor.can_commit:
result += ' (c)'
return unicode(contributor) + result
def execute(self, nick, args, tool, sheriff):
if not args:
return self.usage(nick)
search_string = unicode(" ".join(args))
# FIXME: We should get the ContributorList off the tool somewhere.
contributors = CommitterList().contributors_by_search_string(search_string)
if not contributors:
return unicode("%s: Sorry, I don't know any contributors matching '%s'.") % (nick, search_string)
if len(contributors) > 5:
return unicode("%s: More than 5 contributors match '%s', could you be more specific?") % (nick, search_string)
if len(contributors) == 1:
contributor = contributors[0]
if not contributor.irc_nicknames:
return unicode("%s: %s hasn't told me their nick. Boo hoo :-(") % (nick, contributor)
return unicode("%s: %s is %s. Why do you ask?") % (nick, search_string, self._full_record_and_nick(contributor))
contributor_nicks = map(self._full_record_and_nick, contributors)
contributors_string = join_with_separators(contributor_nicks, only_two_separator=" or ", last_separator=', or ')
return unicode("%s: I'm not sure who you mean? %s could be '%s'.") % (nick, contributors_string, search_string)
# FIXME: Lame. We should have an auto-registering CommandCenter.
visible_commands = {
"create-bug": CreateBug,
"help": Help,
"hi": Hi,
"ping": PingPong,
"restart": Restart,
"rollout": Rollout,
"whois": Whois,
"yt?": YouThere,
}
# Add revert as an "easter egg" command. Why?
# revert is the same as rollout and it would be confusing to list both when
# they do the same thing. However, this command is a very natural thing for
# people to use and it seems silly to have them hunt around for "rollout" instead.
commands = visible_commands.copy()
commands["revert"] = Rollout
# "hello" Alias for "hi" command for the purposes of testing aliases
commands["hello"] = Hi
| gpl-2.0 | -2,399,957,644,112,682,500 | 5,180,608,979,065,922,000 | 41.159091 | 145 | 0.651444 | false |
gameduell/duell | bin/win/python2.7.9/Lib/nturl2path.py | 228 | 2371 | """Convert a NT pathname to a file URL and vice versa."""
def url2pathname(url):
"""OS-specific conversion from a relative URL of the 'file' scheme
to a file system path; not recommended for general use."""
# e.g.
# ///C|/foo/bar/spam.foo
# becomes
# C:\foo\bar\spam.foo
import string, urllib
# Windows itself uses ":" even in URLs.
url = url.replace(':', '|')
if not '|' in url:
# No drive specifier, just convert slashes
if url[:4] == '////':
# path is something like ////host/path/on/remote/host
# convert this to \\host\path\on\remote\host
# (notice halving of slashes at the start of the path)
url = url[2:]
components = url.split('/')
# make sure not to convert quoted slashes :-)
return urllib.unquote('\\'.join(components))
comp = url.split('|')
if len(comp) != 2 or comp[0][-1] not in string.ascii_letters:
error = 'Bad URL: ' + url
raise IOError, error
drive = comp[0][-1].upper()
path = drive + ':'
components = comp[1].split('/')
for comp in components:
if comp:
path = path + '\\' + urllib.unquote(comp)
# Issue #11474: url like '/C|/' should convert into 'C:\\'
if path.endswith(':') and url.endswith('/'):
path += '\\'
return path
def pathname2url(p):
"""OS-specific conversion from a file system path to a relative URL
of the 'file' scheme; not recommended for general use."""
# e.g.
# C:\foo\bar\spam.foo
# becomes
# ///C|/foo/bar/spam.foo
import urllib
if not ':' in p:
# No drive specifier, just convert slashes and quote the name
if p[:2] == '\\\\':
# path is something like \\host\path\on\remote\host
# convert this to ////host/path/on/remote/host
# (notice doubling of slashes at the start of the path)
p = '\\\\' + p
components = p.split('\\')
return urllib.quote('/'.join(components))
comp = p.split(':')
if len(comp) != 2 or len(comp[0]) > 1:
error = 'Bad path: ' + p
raise IOError, error
drive = urllib.quote(comp[0].upper())
components = comp[1].split('\\')
path = '///' + drive + ':'
for comp in components:
if comp:
path = path + '/' + urllib.quote(comp)
return path
| bsd-2-clause | 1,023,562,865,793,714,700 | -3,270,098,347,859,082,000 | 34.924242 | 71 | 0.555462 | false |
astaninger/speakout | venv/lib/python3.6/site-packages/setuptools/wheel.py | 19 | 8102 | """Wheels support."""
from distutils.util import get_platform
import email
import itertools
import os
import posixpath
import re
import zipfile
from pkg_resources import Distribution, PathMetadata, parse_version
from setuptools.extern.packaging.utils import canonicalize_name
from setuptools.extern.six import PY3
from setuptools import Distribution as SetuptoolsDistribution
from setuptools import pep425tags
from setuptools.command.egg_info import write_requirements
__metaclass__ = type
WHEEL_NAME = re.compile(
r"""^(?P<project_name>.+?)-(?P<version>\d.*?)
((-(?P<build>\d.*?))?-(?P<py_version>.+?)-(?P<abi>.+?)-(?P<platform>.+?)
)\.whl$""",
re.VERBOSE).match
NAMESPACE_PACKAGE_INIT = '''\
try:
__import__('pkg_resources').declare_namespace(__name__)
except ImportError:
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
'''
def unpack(src_dir, dst_dir):
'''Move everything under `src_dir` to `dst_dir`, and delete the former.'''
for dirpath, dirnames, filenames in os.walk(src_dir):
subdir = os.path.relpath(dirpath, src_dir)
for f in filenames:
src = os.path.join(dirpath, f)
dst = os.path.join(dst_dir, subdir, f)
os.renames(src, dst)
for n, d in reversed(list(enumerate(dirnames))):
src = os.path.join(dirpath, d)
dst = os.path.join(dst_dir, subdir, d)
if not os.path.exists(dst):
# Directory does not exist in destination,
# rename it and prune it from os.walk list.
os.renames(src, dst)
del dirnames[n]
# Cleanup.
for dirpath, dirnames, filenames in os.walk(src_dir, topdown=True):
assert not filenames
os.rmdir(dirpath)
class Wheel:
def __init__(self, filename):
match = WHEEL_NAME(os.path.basename(filename))
if match is None:
raise ValueError('invalid wheel name: %r' % filename)
self.filename = filename
for k, v in match.groupdict().items():
setattr(self, k, v)
def tags(self):
'''List tags (py_version, abi, platform) supported by this wheel.'''
return itertools.product(
self.py_version.split('.'),
self.abi.split('.'),
self.platform.split('.'),
)
def is_compatible(self):
'''Is the wheel is compatible with the current platform?'''
supported_tags = pep425tags.get_supported()
return next((True for t in self.tags() if t in supported_tags), False)
def egg_name(self):
return Distribution(
project_name=self.project_name, version=self.version,
platform=(None if self.platform == 'any' else get_platform()),
).egg_name() + '.egg'
def get_dist_info(self, zf):
# find the correct name of the .dist-info dir in the wheel file
for member in zf.namelist():
dirname = posixpath.dirname(member)
if (dirname.endswith('.dist-info') and
canonicalize_name(dirname).startswith(
canonicalize_name(self.project_name))):
return dirname
raise ValueError("unsupported wheel format. .dist-info not found")
def install_as_egg(self, destination_eggdir):
'''Install wheel as an egg directory.'''
with zipfile.ZipFile(self.filename) as zf:
self._install_as_egg(destination_eggdir, zf)
def _install_as_egg(self, destination_eggdir, zf):
dist_basename = '%s-%s' % (self.project_name, self.version)
dist_info = self.get_dist_info(zf)
dist_data = '%s.data' % dist_basename
egg_info = os.path.join(destination_eggdir, 'EGG-INFO')
self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
self._move_data_entries(destination_eggdir, dist_data)
self._fix_namespace_packages(egg_info, destination_eggdir)
@staticmethod
def _convert_metadata(zf, destination_eggdir, dist_info, egg_info):
def get_metadata(name):
with zf.open(posixpath.join(dist_info, name)) as fp:
value = fp.read().decode('utf-8') if PY3 else fp.read()
return email.parser.Parser().parsestr(value)
wheel_metadata = get_metadata('WHEEL')
# Check wheel format version is supported.
wheel_version = parse_version(wheel_metadata.get('Wheel-Version'))
wheel_v1 = (
parse_version('1.0') <= wheel_version < parse_version('2.0dev0')
)
if not wheel_v1:
raise ValueError(
'unsupported wheel format version: %s' % wheel_version)
# Extract to target directory.
os.mkdir(destination_eggdir)
zf.extractall(destination_eggdir)
# Convert metadata.
dist_info = os.path.join(destination_eggdir, dist_info)
dist = Distribution.from_location(
destination_eggdir, dist_info,
metadata=PathMetadata(destination_eggdir, dist_info),
)
# Note: Evaluate and strip markers now,
# as it's difficult to convert back from the syntax:
# foobar; "linux" in sys_platform and extra == 'test'
def raw_req(req):
req.marker = None
return str(req)
install_requires = list(sorted(map(raw_req, dist.requires())))
extras_require = {
extra: sorted(
req
for req in map(raw_req, dist.requires((extra,)))
if req not in install_requires
)
for extra in dist.extras
}
os.rename(dist_info, egg_info)
os.rename(
os.path.join(egg_info, 'METADATA'),
os.path.join(egg_info, 'PKG-INFO'),
)
setup_dist = SetuptoolsDistribution(
attrs=dict(
install_requires=install_requires,
extras_require=extras_require,
),
)
write_requirements(
setup_dist.get_command_obj('egg_info'),
None,
os.path.join(egg_info, 'requires.txt'),
)
@staticmethod
def _move_data_entries(destination_eggdir, dist_data):
"""Move data entries to their correct location."""
dist_data = os.path.join(destination_eggdir, dist_data)
dist_data_scripts = os.path.join(dist_data, 'scripts')
if os.path.exists(dist_data_scripts):
egg_info_scripts = os.path.join(
destination_eggdir, 'EGG-INFO', 'scripts')
os.mkdir(egg_info_scripts)
for entry in os.listdir(dist_data_scripts):
# Remove bytecode, as it's not properly handled
# during easy_install scripts install phase.
if entry.endswith('.pyc'):
os.unlink(os.path.join(dist_data_scripts, entry))
else:
os.rename(
os.path.join(dist_data_scripts, entry),
os.path.join(egg_info_scripts, entry),
)
os.rmdir(dist_data_scripts)
for subdir in filter(os.path.exists, (
os.path.join(dist_data, d)
for d in ('data', 'headers', 'purelib', 'platlib')
)):
unpack(subdir, destination_eggdir)
if os.path.exists(dist_data):
os.rmdir(dist_data)
@staticmethod
def _fix_namespace_packages(egg_info, destination_eggdir):
namespace_packages = os.path.join(
egg_info, 'namespace_packages.txt')
if os.path.exists(namespace_packages):
with open(namespace_packages) as fp:
namespace_packages = fp.read().split()
for mod in namespace_packages:
mod_dir = os.path.join(destination_eggdir, *mod.split('.'))
mod_init = os.path.join(mod_dir, '__init__.py')
if os.path.exists(mod_dir) and not os.path.exists(mod_init):
with open(mod_init, 'w') as fp:
fp.write(NAMESPACE_PACKAGE_INIT)
| mit | 3,786,060,697,298,956,000 | -3,059,573,389,617,790,500 | 37.580952 | 78 | 0.581091 | false |
GoogleCloudDataproc/cloud-dataproc | codelabs/spark-nlp/topic_model.py | 1 | 8715 | # Copyright 2019 Google 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 required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This code accompanies this codelab: https://codelabs.developers.google.com/codelabs/spark-nlp.
# In this example, we will build a topic model using spark-nlp and Spark ML.
# In order for this code to work properly, a bucket name must be provided.
# Python imports
import sys
# spark-nlp components. Each one is incorporated into our pipeline.
from sparknlp.annotator import Lemmatizer, Stemmer, Tokenizer, Normalizer
from sparknlp.base import DocumentAssembler, Finisher
# A Spark Session is how we interact with Spark SQL to create Dataframes
from pyspark.sql import SparkSession
# These allow us to create a schema for our data
from pyspark.sql.types import StructField, StructType, StringType, LongType
# Spark Pipelines allow us to sequentially add components such as transformers
from pyspark.ml import Pipeline
# These are components we will incorporate into our pipeline.
from pyspark.ml.feature import StopWordsRemover, CountVectorizer, IDF
# LDA is our model of choice for topic modeling
from pyspark.ml.clustering import LDA
# Some transformers require the usage of other Spark ML functions. We import them here
from pyspark.sql.functions import col, lit, concat, regexp_replace
# This will help catch some PySpark errors
from pyspark.sql.utils import AnalysisException
# Assign bucket where the data lives
try:
bucket = sys.argv[1]
except IndexError:
print("Please provide a bucket name")
sys.exit(1)
# Create a SparkSession under the name "reddit". Viewable via the Spark UI
spark = SparkSession.builder.appName("reddit topic model").getOrCreate()
# Create a three column schema consisting of two strings and a long integer
fields = [StructField("title", StringType(), True),
StructField("body", StringType(), True),
StructField("created_at", LongType(), True)]
schema = StructType(fields)
# We'll attempt to process every year / month combination below.
years = ['2016', '2017', '2018', '2019']
months = ['01', '02', '03', '04', '05', '06',
'07', '08', '09', '10', '11', '12']
# This is the subreddit we're working with.
subreddit = "food"
# Create a base dataframe.
reddit_data = spark.createDataFrame([], schema)
# Keep a running list of all files that will be processed
files_read = []
for year in years:
for month in months:
# In the form of <project-id>.<dataset>.<table>
gs_uri = f"gs://{bucket}/reddit_posts/{year}/{month}/{subreddit}.csv.gz"
# If the table doesn't exist we will simply continue and not
# log it into our "tables_read" list
try:
reddit_data = (
spark.read.format('csv')
.options(codec="org.apache.hadoop.io.compress.GzipCodec")
.load(gs_uri, schema=schema)
.union(reddit_data)
)
files_read.append(gs_uri)
except AnalysisException:
continue
if len(files_read) == 0:
print('No files read')
sys.exit(1)
# Replacing null values with their respective typed-equivalent is usually
# easier to work with. In this case, we'll replace nulls with empty strings.
# Since some of our data doesn't have a body, we can combine all of the text
# for the titles and bodies so that every row has useful data.
df_train = (
reddit_data
# Replace null values with an empty string
.fillna("")
.select(
# Combine columns
concat(
# First column to concatenate. col() is used to specify that we're referencing a column
col("title"),
# Literal character that will be between the concatenated columns.
lit(" "),
# Second column to concatenate.
col("body")
# Change the name of the new column
).alias("text")
)
# The text has several tags including [REMOVED] or [DELETED] for redacted content.
# We'll replace these with empty strings.
.select(
regexp_replace(col("text"), "\[.*?\]", "")
.alias("text")
)
)
# Now, we begin assembling our pipeline. Each component here is used to some transformation to the data.
# The Document Assembler takes the raw text data and convert it into a format that can
# be tokenized. It becomes one of spark-nlp native object types, the "Document".
document_assembler = DocumentAssembler().setInputCol("text").setOutputCol("document")
# The Tokenizer takes data that is of the "Document" type and tokenizes it.
# While slightly more involved than this, this is effectively taking a string and splitting
# it along ths spaces, so each word is its own string. The data then becomes the
# spark-nlp native type "Token".
tokenizer = Tokenizer().setInputCols(["document"]).setOutputCol("token")
# The Normalizer will group words together based on similar semantic meaning.
normalizer = Normalizer().setInputCols(["token"]).setOutputCol("normalizer")
# The Stemmer takes objects of class "Token" and converts the words into their
# root meaning. For instance, the words "cars", "cars'" and "car's" would all be replaced
# with the word "car".
stemmer = Stemmer().setInputCols(["normalizer"]).setOutputCol("stem")
# The Finisher signals to spark-nlp allows us to access the data outside of spark-nlp
# components. For instance, we can now feed the data into components from Spark MLlib.
finisher = Finisher().setInputCols(["stem"]).setOutputCols(["to_spark"]).setValueSplitSymbol(" ")
# Stopwords are common words that generally don't add much detail to the meaning
# of a body of text. In English, these are mostly "articles" such as the words "the"
# and "of".
stopword_remover = StopWordsRemover(inputCol="to_spark", outputCol="filtered")
# Here we implement TF-IDF as an input to our LDA model. CountVectorizer (TF) keeps track
# of the vocabulary that's being created so we can map our topics back to their
# corresponding words.
# TF (term frequency) creates a matrix that counts how many times each word in the
# vocabulary appears in each body of text. This then gives each word a weight based
# on it's frequency.
tf = CountVectorizer(inputCol="filtered", outputCol="raw_features")
# Here we implement the IDF portion. IDF (Inverse document frequency) reduces
# the weights of commonly-appearing words.
idf = IDF(inputCol="raw_features", outputCol="features")
# LDA creates a statistical representation of how frequently words appear
# together in order to create "topics" or groups of commonly appearing words.
# In this case, we'll create 5 topics.
lda = LDA(k=5)
# We add all of the transformers into a Pipeline object. Each transformer
# will execute in the ordered provided to the "stages" parameter
pipeline = Pipeline(
stages = [
document_assembler,
tokenizer,
normalizer,
stemmer,
finisher,
stopword_remover,
tf,
idf,
lda
]
)
# We fit the data to the model.
model = pipeline.fit(df_train)
# Now that we have completed a pipeline, we want to output the topics as human-readable.
# To do this, we need to grab the vocabulary generated from our pipeline, grab the topic
# model and do the appropriate mapping. The output from each individual component lives
# in the model object. We can access them by referring to them by their position in
# the pipeline via model.stages[<ind>]
# Let's create a reference our vocabulary.
vocab = model.stages[-3].vocabulary
# Next, let's grab the topics generated by our LDA model via describeTopics(). Using collect(),
# we load the output into a Python array.
raw_topics = model.stages[-1].describeTopics(maxTermsPerTopic=5).collect()
# Lastly, let's get the indices of the vocabulary terms from our topics
topic_inds = [ind.termIndices for ind in raw_topics]
# The indices we just grab directly map to the term at position <ind> from our vocabulary.
# Using the below code, we can generate the mappings from our topic indicies to our vocabulary.
topics = []
for topic in topic_inds:
_topic = []
for ind in topic:
_topic.append(vocab[ind])
topics.append(_topic)
# Let's see our topics!
for i, topic in enumerate(topics, start=1):
print(f"topic {i}: {topic}")
| apache-2.0 | -8,401,170,581,900,692,000 | 5,853,381,237,081,007,000 | 38.256757 | 104 | 0.715089 | false |
bretlowery/snakr | lib/django/contrib/gis/gdal/feature.py | 439 | 4153 | from django.contrib.gis.gdal.base import GDALBase
from django.contrib.gis.gdal.error import GDALException, OGRIndexError
from django.contrib.gis.gdal.field import Field
from django.contrib.gis.gdal.geometries import OGRGeometry, OGRGeomType
from django.contrib.gis.gdal.prototypes import ds as capi, geom as geom_api
from django.utils import six
from django.utils.encoding import force_bytes, force_text
from django.utils.six.moves import range
# For more information, see the OGR C API source code:
# http://www.gdal.org/ogr/ogr__api_8h.html
#
# The OGR_F_* routines are relevant here.
class Feature(GDALBase):
"""
This class that wraps an OGR Feature, needs to be instantiated
from a Layer object.
"""
def __init__(self, feat, layer):
"""
Initializes Feature from a pointer and its Layer object.
"""
if not feat:
raise GDALException('Cannot create OGR Feature, invalid pointer given.')
self.ptr = feat
self._layer = layer
def __del__(self):
"Releases a reference to this object."
if self._ptr and capi:
capi.destroy_feature(self._ptr)
def __getitem__(self, index):
"""
Gets the Field object at the specified index, which may be either
an integer or the Field's string label. Note that the Field object
is not the field's _value_ -- use the `get` method instead to
retrieve the value (e.g. an integer) instead of a Field instance.
"""
if isinstance(index, six.string_types):
i = self.index(index)
else:
if index < 0 or index > self.num_fields:
raise OGRIndexError('index out of range')
i = index
return Field(self, i)
def __iter__(self):
"Iterates over each field in the Feature."
for i in range(self.num_fields):
yield self[i]
def __len__(self):
"Returns the count of fields in this feature."
return self.num_fields
def __str__(self):
"The string name of the feature."
return 'Feature FID %d in Layer<%s>' % (self.fid, self.layer_name)
def __eq__(self, other):
"Does equivalence testing on the features."
return bool(capi.feature_equal(self.ptr, other._ptr))
# #### Feature Properties ####
@property
def encoding(self):
return self._layer._ds.encoding
@property
def fid(self):
"Returns the feature identifier."
return capi.get_fid(self.ptr)
@property
def layer_name(self):
"Returns the name of the layer for the feature."
name = capi.get_feat_name(self._layer._ldefn)
return force_text(name, self.encoding, strings_only=True)
@property
def num_fields(self):
"Returns the number of fields in the Feature."
return capi.get_feat_field_count(self.ptr)
@property
def fields(self):
"Returns a list of fields in the Feature."
return [capi.get_field_name(capi.get_field_defn(self._layer._ldefn, i))
for i in range(self.num_fields)]
@property
def geom(self):
"Returns the OGR Geometry for this Feature."
# Retrieving the geometry pointer for the feature.
geom_ptr = capi.get_feat_geom_ref(self.ptr)
return OGRGeometry(geom_api.clone_geom(geom_ptr))
@property
def geom_type(self):
"Returns the OGR Geometry Type for this Feture."
return OGRGeomType(capi.get_fd_geom_type(self._layer._ldefn))
# #### Feature Methods ####
def get(self, field):
"""
Returns the value of the field, instead of an instance of the Field
object. May take a string of the field name or a Field object as
parameters.
"""
field_name = getattr(field, 'name', field)
return self[field_name].value
def index(self, field_name):
"Returns the index of the given field name."
i = capi.get_field_index(self.ptr, force_bytes(field_name))
if i < 0:
raise OGRIndexError('invalid OFT field name given: "%s"' % field_name)
return i
| bsd-3-clause | -166,348,620,059,025,200 | 425,140,833,523,064,640 | 33.322314 | 84 | 0.62509 | false |
Spiderlover/Toontown | toontown/suit/SuitBase.py | 1 | 3300 | import SuitDNA
from SuitLegList import *
import SuitTimings
from direct.directnotify import DirectNotifyGlobal
from direct.distributed.ClockDelta import *
from pandac.PandaModules import *
from pandac.PandaModules import Point3
from toontown.battle import SuitBattleGlobals
from toontown.toonbase import TTLocalizer
TIME_BUFFER_PER_WPT = 0.25
TIME_DIVISOR = 100
DISTRIBUTE_TASK_CREATION = 0
class SuitBase:
notify = DirectNotifyGlobal.directNotify.newCategory('SuitBase')
def __init__(self):
self.dna = None
self.level = 0
self.maxHP = 10
self.currHP = 10
self.isSkelecog = 0
self.isWaiter = 0
self.isVirtual = 0
self.isRental = 0
return
def delete(self):
if hasattr(self, 'legList'):
del self.legList
def getCurrHp(self):
if hasattr(self, 'currHP') and self.currHP:
return self.currHP
else:
self.notify.error('currHP is None')
return 'unknown'
def getMaxHp(self):
if hasattr(self, 'maxHP') and self.maxHP:
return self.maxHP
else:
self.notify.error('maxHP is None')
return 'unknown'
def getStyleName(self):
if hasattr(self, 'dna') and self.dna:
return self.dna.name
else:
self.notify.error('called getStyleName() before dna was set!')
return 'unknown'
def getStyleDept(self):
if hasattr(self, 'dna') and self.dna:
return SuitDNA.getDeptFullname(self.dna.dept)
else:
self.notify.error('called getStyleDept() before dna was set!')
return 'unknown'
def getLevel(self):
return self.level
def setLevel(self, level):
self.level = level
nameWLevel = TTLocalizer.SuitBaseNameWithLevel % {'name': self.name,
'dept': self.getStyleDept(),
'level': self.getActualLevel()}
self.setDisplayName(nameWLevel)
attributes = SuitBattleGlobals.SuitAttributes[self.dna.name]
self.maxHP = attributes['hp'][self.level]
self.currHP = self.maxHP
def getSkelecog(self):
return self.isSkelecog
def setSkelecog(self, flag):
self.isSkelecog = flag
def setWaiter(self, flag):
self.isWaiter = flag
def setVirtual(self, flag):
self.isVirtual = flag
def setRental(self, flag):
self.isRental = flag
def getActualLevel(self):
if hasattr(self, 'dna'):
return SuitBattleGlobals.getActualFromRelativeLevel(self.getStyleName(), self.level) + 1
else:
self.notify.warning('called getActualLevel with no DNA, returning 1 for level')
return 1
def setPath(self, path):
self.path = path
self.pathLength = self.path.getNumPoints()
def getPath(self):
return self.path
def printPath(self):
print '%d points in path' % self.pathLength
for currPathPt in xrange(self.pathLength):
indexVal = self.path.getPointIndex(currPathPt)
print '\t', self.sp.dnaStore.getSuitPointWithIndex(indexVal)
def makeLegList(self):
self.legList = SuitLegList(self.path, self.sp.dnaStore)
| mit | -4,855,433,485,090,643,000 | 5,099,772,751,261,567,000 | 28.72973 | 100 | 0.617576 | false |
pombredanne/invenio-old | modules/websubmit/lib/functions/Move_Files_Archive.py | 4 | 2180 | ## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN.
##
## CDS 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 version 2 of the
## License, or (at your option) any later version.
##
## CDS Invenio is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with CDS Invenio; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
__revision__ = "$Id$"
import os
from invenio.bibdocfile import BibRecDocs, decompose_file, normalize_format
def Move_Files_Archive(parameters, curdir, form, user_info=None):
"""DEPRECATED: Use FFT instead."""
MainDir = "%s/files/MainFiles" % curdir
IncludeDir = "%s/files/AdditionalFiles" % curdir
watcheddirs = {'Main' : MainDir, 'Additional' : IncludeDir}
for type, dir in watcheddirs.iteritems():
if os.path.exists(dir):
formats = {}
files = os.listdir(dir)
files.sort()
for file in files:
dummy, filename, extension = decompose_file(file)
if not formats.has_key(filename):
formats[filename] = []
formats[filename].append(normalize_format(extension))
# first delete all missing files
bibarchive = BibRecDocs(sysno)
existingBibdocs = bibarchive.list_bibdocs(type)
for existingBibdoc in existingBibdocs:
if not formats.has_key(existingBibdoc.get_docname()):
existingBibdoc.delete()
# then create/update the new ones
for key in formats.keys():
# instanciate bibdoc object
bibarchive.add_new_file('%s/%s%s' % (dir, key, formats[key]), doctype=type, never_fail=True)
return ""
| gpl-2.0 | -8,842,490,685,510,125,000 | -6,183,924,444,980,209,000 | 44.416667 | 108 | 0.647706 | false |
vlinhd11/vlinhd11-android-scripting | python/src/Lib/plat-mac/Carbon/Icons.py | 81 | 16284 | # Generated from 'Icons.h'
def FOUR_CHAR_CODE(x): return x
from Carbon.Files import *
kGenericDocumentIconResource = -4000
kGenericStationeryIconResource = -3985
kGenericEditionFileIconResource = -3989
kGenericApplicationIconResource = -3996
kGenericDeskAccessoryIconResource = -3991
kGenericFolderIconResource = -3999
kPrivateFolderIconResource = -3994
kFloppyIconResource = -3998
kTrashIconResource = -3993
kGenericRAMDiskIconResource = -3988
kGenericCDROMIconResource = -3987
kDesktopIconResource = -3992
kOpenFolderIconResource = -3997
kGenericHardDiskIconResource = -3995
kGenericFileServerIconResource = -3972
kGenericSuitcaseIconResource = -3970
kGenericMoverObjectIconResource = -3969
kGenericPreferencesIconResource = -3971
kGenericQueryDocumentIconResource = -16506
kGenericExtensionIconResource = -16415
kSystemFolderIconResource = -3983
kHelpIconResource = -20271
kAppleMenuFolderIconResource = -3982
genericDocumentIconResource = kGenericDocumentIconResource
genericStationeryIconResource = kGenericStationeryIconResource
genericEditionFileIconResource = kGenericEditionFileIconResource
genericApplicationIconResource = kGenericApplicationIconResource
genericDeskAccessoryIconResource = kGenericDeskAccessoryIconResource
genericFolderIconResource = kGenericFolderIconResource
privateFolderIconResource = kPrivateFolderIconResource
floppyIconResource = kFloppyIconResource
trashIconResource = kTrashIconResource
genericRAMDiskIconResource = kGenericRAMDiskIconResource
genericCDROMIconResource = kGenericCDROMIconResource
desktopIconResource = kDesktopIconResource
openFolderIconResource = kOpenFolderIconResource
genericHardDiskIconResource = kGenericHardDiskIconResource
genericFileServerIconResource = kGenericFileServerIconResource
genericSuitcaseIconResource = kGenericSuitcaseIconResource
genericMoverObjectIconResource = kGenericMoverObjectIconResource
genericPreferencesIconResource = kGenericPreferencesIconResource
genericQueryDocumentIconResource = kGenericQueryDocumentIconResource
genericExtensionIconResource = kGenericExtensionIconResource
systemFolderIconResource = kSystemFolderIconResource
appleMenuFolderIconResource = kAppleMenuFolderIconResource
kStartupFolderIconResource = -3981
kOwnedFolderIconResource = -3980
kDropFolderIconResource = -3979
kSharedFolderIconResource = -3978
kMountedFolderIconResource = -3977
kControlPanelFolderIconResource = -3976
kPrintMonitorFolderIconResource = -3975
kPreferencesFolderIconResource = -3974
kExtensionsFolderIconResource = -3973
kFontsFolderIconResource = -3968
kFullTrashIconResource = -3984
startupFolderIconResource = kStartupFolderIconResource
ownedFolderIconResource = kOwnedFolderIconResource
dropFolderIconResource = kDropFolderIconResource
sharedFolderIconResource = kSharedFolderIconResource
mountedFolderIconResource = kMountedFolderIconResource
controlPanelFolderIconResource = kControlPanelFolderIconResource
printMonitorFolderIconResource = kPrintMonitorFolderIconResource
preferencesFolderIconResource = kPreferencesFolderIconResource
extensionsFolderIconResource = kExtensionsFolderIconResource
fontsFolderIconResource = kFontsFolderIconResource
fullTrashIconResource = kFullTrashIconResource
kThumbnail32BitData = FOUR_CHAR_CODE('it32')
kThumbnail8BitMask = FOUR_CHAR_CODE('t8mk')
kHuge1BitMask = FOUR_CHAR_CODE('ich#')
kHuge4BitData = FOUR_CHAR_CODE('ich4')
kHuge8BitData = FOUR_CHAR_CODE('ich8')
kHuge32BitData = FOUR_CHAR_CODE('ih32')
kHuge8BitMask = FOUR_CHAR_CODE('h8mk')
kLarge1BitMask = FOUR_CHAR_CODE('ICN#')
kLarge4BitData = FOUR_CHAR_CODE('icl4')
kLarge8BitData = FOUR_CHAR_CODE('icl8')
kLarge32BitData = FOUR_CHAR_CODE('il32')
kLarge8BitMask = FOUR_CHAR_CODE('l8mk')
kSmall1BitMask = FOUR_CHAR_CODE('ics#')
kSmall4BitData = FOUR_CHAR_CODE('ics4')
kSmall8BitData = FOUR_CHAR_CODE('ics8')
kSmall32BitData = FOUR_CHAR_CODE('is32')
kSmall8BitMask = FOUR_CHAR_CODE('s8mk')
kMini1BitMask = FOUR_CHAR_CODE('icm#')
kMini4BitData = FOUR_CHAR_CODE('icm4')
kMini8BitData = FOUR_CHAR_CODE('icm8')
kTileIconVariant = FOUR_CHAR_CODE('tile')
kRolloverIconVariant = FOUR_CHAR_CODE('over')
kDropIconVariant = FOUR_CHAR_CODE('drop')
kOpenIconVariant = FOUR_CHAR_CODE('open')
kOpenDropIconVariant = FOUR_CHAR_CODE('odrp')
large1BitMask = kLarge1BitMask
large4BitData = kLarge4BitData
large8BitData = kLarge8BitData
small1BitMask = kSmall1BitMask
small4BitData = kSmall4BitData
small8BitData = kSmall8BitData
mini1BitMask = kMini1BitMask
mini4BitData = kMini4BitData
mini8BitData = kMini8BitData
kAlignNone = 0x00
kAlignVerticalCenter = 0x01
kAlignTop = 0x02
kAlignBottom = 0x03
kAlignHorizontalCenter = 0x04
kAlignAbsoluteCenter = kAlignVerticalCenter | kAlignHorizontalCenter
kAlignCenterTop = kAlignTop | kAlignHorizontalCenter
kAlignCenterBottom = kAlignBottom | kAlignHorizontalCenter
kAlignLeft = 0x08
kAlignCenterLeft = kAlignVerticalCenter | kAlignLeft
kAlignTopLeft = kAlignTop | kAlignLeft
kAlignBottomLeft = kAlignBottom | kAlignLeft
kAlignRight = 0x0C
kAlignCenterRight = kAlignVerticalCenter | kAlignRight
kAlignTopRight = kAlignTop | kAlignRight
kAlignBottomRight = kAlignBottom | kAlignRight
atNone = kAlignNone
atVerticalCenter = kAlignVerticalCenter
atTop = kAlignTop
atBottom = kAlignBottom
atHorizontalCenter = kAlignHorizontalCenter
atAbsoluteCenter = kAlignAbsoluteCenter
atCenterTop = kAlignCenterTop
atCenterBottom = kAlignCenterBottom
atLeft = kAlignLeft
atCenterLeft = kAlignCenterLeft
atTopLeft = kAlignTopLeft
atBottomLeft = kAlignBottomLeft
atRight = kAlignRight
atCenterRight = kAlignCenterRight
atTopRight = kAlignTopRight
atBottomRight = kAlignBottomRight
kTransformNone = 0x00
kTransformDisabled = 0x01
kTransformOffline = 0x02
kTransformOpen = 0x03
kTransformLabel1 = 0x0100
kTransformLabel2 = 0x0200
kTransformLabel3 = 0x0300
kTransformLabel4 = 0x0400
kTransformLabel5 = 0x0500
kTransformLabel6 = 0x0600
kTransformLabel7 = 0x0700
kTransformSelected = 0x4000
kTransformSelectedDisabled = kTransformSelected | kTransformDisabled
kTransformSelectedOffline = kTransformSelected | kTransformOffline
kTransformSelectedOpen = kTransformSelected | kTransformOpen
ttNone = kTransformNone
ttDisabled = kTransformDisabled
ttOffline = kTransformOffline
ttOpen = kTransformOpen
ttLabel1 = kTransformLabel1
ttLabel2 = kTransformLabel2
ttLabel3 = kTransformLabel3
ttLabel4 = kTransformLabel4
ttLabel5 = kTransformLabel5
ttLabel6 = kTransformLabel6
ttLabel7 = kTransformLabel7
ttSelected = kTransformSelected
ttSelectedDisabled = kTransformSelectedDisabled
ttSelectedOffline = kTransformSelectedOffline
ttSelectedOpen = kTransformSelectedOpen
kSelectorLarge1Bit = 0x00000001
kSelectorLarge4Bit = 0x00000002
kSelectorLarge8Bit = 0x00000004
kSelectorLarge32Bit = 0x00000008
kSelectorLarge8BitMask = 0x00000010
kSelectorSmall1Bit = 0x00000100
kSelectorSmall4Bit = 0x00000200
kSelectorSmall8Bit = 0x00000400
kSelectorSmall32Bit = 0x00000800
kSelectorSmall8BitMask = 0x00001000
kSelectorMini1Bit = 0x00010000
kSelectorMini4Bit = 0x00020000
kSelectorMini8Bit = 0x00040000
kSelectorHuge1Bit = 0x01000000
kSelectorHuge4Bit = 0x02000000
kSelectorHuge8Bit = 0x04000000
kSelectorHuge32Bit = 0x08000000
kSelectorHuge8BitMask = 0x10000000
kSelectorAllLargeData = 0x000000FF
kSelectorAllSmallData = 0x0000FF00
kSelectorAllMiniData = 0x00FF0000
# kSelectorAllHugeData = (long)0xFF000000
kSelectorAll1BitData = kSelectorLarge1Bit | kSelectorSmall1Bit | kSelectorMini1Bit | kSelectorHuge1Bit
kSelectorAll4BitData = kSelectorLarge4Bit | kSelectorSmall4Bit | kSelectorMini4Bit | kSelectorHuge4Bit
kSelectorAll8BitData = kSelectorLarge8Bit | kSelectorSmall8Bit | kSelectorMini8Bit | kSelectorHuge8Bit
kSelectorAll32BitData = kSelectorLarge32Bit | kSelectorSmall32Bit | kSelectorHuge32Bit
# kSelectorAllAvailableData = (long)0xFFFFFFFF
svLarge1Bit = kSelectorLarge1Bit
svLarge4Bit = kSelectorLarge4Bit
svLarge8Bit = kSelectorLarge8Bit
svSmall1Bit = kSelectorSmall1Bit
svSmall4Bit = kSelectorSmall4Bit
svSmall8Bit = kSelectorSmall8Bit
svMini1Bit = kSelectorMini1Bit
svMini4Bit = kSelectorMini4Bit
svMini8Bit = kSelectorMini8Bit
svAllLargeData = kSelectorAllLargeData
svAllSmallData = kSelectorAllSmallData
svAllMiniData = kSelectorAllMiniData
svAll1BitData = kSelectorAll1BitData
svAll4BitData = kSelectorAll4BitData
svAll8BitData = kSelectorAll8BitData
# svAllAvailableData = kSelectorAllAvailableData
kSystemIconsCreator = FOUR_CHAR_CODE('macs')
# err = GetIconRef(kOnSystemDisk
kClipboardIcon = FOUR_CHAR_CODE('CLIP')
kClippingUnknownTypeIcon = FOUR_CHAR_CODE('clpu')
kClippingPictureTypeIcon = FOUR_CHAR_CODE('clpp')
kClippingTextTypeIcon = FOUR_CHAR_CODE('clpt')
kClippingSoundTypeIcon = FOUR_CHAR_CODE('clps')
kDesktopIcon = FOUR_CHAR_CODE('desk')
kFinderIcon = FOUR_CHAR_CODE('FNDR')
kFontSuitcaseIcon = FOUR_CHAR_CODE('FFIL')
kFullTrashIcon = FOUR_CHAR_CODE('ftrh')
kGenericApplicationIcon = FOUR_CHAR_CODE('APPL')
kGenericCDROMIcon = FOUR_CHAR_CODE('cddr')
kGenericControlPanelIcon = FOUR_CHAR_CODE('APPC')
kGenericControlStripModuleIcon = FOUR_CHAR_CODE('sdev')
kGenericComponentIcon = FOUR_CHAR_CODE('thng')
kGenericDeskAccessoryIcon = FOUR_CHAR_CODE('APPD')
kGenericDocumentIcon = FOUR_CHAR_CODE('docu')
kGenericEditionFileIcon = FOUR_CHAR_CODE('edtf')
kGenericExtensionIcon = FOUR_CHAR_CODE('INIT')
kGenericFileServerIcon = FOUR_CHAR_CODE('srvr')
kGenericFontIcon = FOUR_CHAR_CODE('ffil')
kGenericFontScalerIcon = FOUR_CHAR_CODE('sclr')
kGenericFloppyIcon = FOUR_CHAR_CODE('flpy')
kGenericHardDiskIcon = FOUR_CHAR_CODE('hdsk')
kGenericIDiskIcon = FOUR_CHAR_CODE('idsk')
kGenericRemovableMediaIcon = FOUR_CHAR_CODE('rmov')
kGenericMoverObjectIcon = FOUR_CHAR_CODE('movr')
kGenericPCCardIcon = FOUR_CHAR_CODE('pcmc')
kGenericPreferencesIcon = FOUR_CHAR_CODE('pref')
kGenericQueryDocumentIcon = FOUR_CHAR_CODE('qery')
kGenericRAMDiskIcon = FOUR_CHAR_CODE('ramd')
kGenericSharedLibaryIcon = FOUR_CHAR_CODE('shlb')
kGenericStationeryIcon = FOUR_CHAR_CODE('sdoc')
kGenericSuitcaseIcon = FOUR_CHAR_CODE('suit')
kGenericURLIcon = FOUR_CHAR_CODE('gurl')
kGenericWORMIcon = FOUR_CHAR_CODE('worm')
kInternationalResourcesIcon = FOUR_CHAR_CODE('ifil')
kKeyboardLayoutIcon = FOUR_CHAR_CODE('kfil')
kSoundFileIcon = FOUR_CHAR_CODE('sfil')
kSystemSuitcaseIcon = FOUR_CHAR_CODE('zsys')
kTrashIcon = FOUR_CHAR_CODE('trsh')
kTrueTypeFontIcon = FOUR_CHAR_CODE('tfil')
kTrueTypeFlatFontIcon = FOUR_CHAR_CODE('sfnt')
kTrueTypeMultiFlatFontIcon = FOUR_CHAR_CODE('ttcf')
kUserIDiskIcon = FOUR_CHAR_CODE('udsk')
kInternationResourcesIcon = kInternationalResourcesIcon
kInternetLocationHTTPIcon = FOUR_CHAR_CODE('ilht')
kInternetLocationFTPIcon = FOUR_CHAR_CODE('ilft')
kInternetLocationAppleShareIcon = FOUR_CHAR_CODE('ilaf')
kInternetLocationAppleTalkZoneIcon = FOUR_CHAR_CODE('ilat')
kInternetLocationFileIcon = FOUR_CHAR_CODE('ilfi')
kInternetLocationMailIcon = FOUR_CHAR_CODE('ilma')
kInternetLocationNewsIcon = FOUR_CHAR_CODE('ilnw')
kInternetLocationNSLNeighborhoodIcon = FOUR_CHAR_CODE('ilns')
kInternetLocationGenericIcon = FOUR_CHAR_CODE('ilge')
kGenericFolderIcon = FOUR_CHAR_CODE('fldr')
kDropFolderIcon = FOUR_CHAR_CODE('dbox')
kMountedFolderIcon = FOUR_CHAR_CODE('mntd')
kOpenFolderIcon = FOUR_CHAR_CODE('ofld')
kOwnedFolderIcon = FOUR_CHAR_CODE('ownd')
kPrivateFolderIcon = FOUR_CHAR_CODE('prvf')
kSharedFolderIcon = FOUR_CHAR_CODE('shfl')
kSharingPrivsNotApplicableIcon = FOUR_CHAR_CODE('shna')
kSharingPrivsReadOnlyIcon = FOUR_CHAR_CODE('shro')
kSharingPrivsReadWriteIcon = FOUR_CHAR_CODE('shrw')
kSharingPrivsUnknownIcon = FOUR_CHAR_CODE('shuk')
kSharingPrivsWritableIcon = FOUR_CHAR_CODE('writ')
kUserFolderIcon = FOUR_CHAR_CODE('ufld')
kWorkgroupFolderIcon = FOUR_CHAR_CODE('wfld')
kGuestUserIcon = FOUR_CHAR_CODE('gusr')
kUserIcon = FOUR_CHAR_CODE('user')
kOwnerIcon = FOUR_CHAR_CODE('susr')
kGroupIcon = FOUR_CHAR_CODE('grup')
kAppearanceFolderIcon = FOUR_CHAR_CODE('appr')
kAppleExtrasFolderIcon = FOUR_CHAR_CODE('aex\xc4')
kAppleMenuFolderIcon = FOUR_CHAR_CODE('amnu')
kApplicationsFolderIcon = FOUR_CHAR_CODE('apps')
kApplicationSupportFolderIcon = FOUR_CHAR_CODE('asup')
kAssistantsFolderIcon = FOUR_CHAR_CODE('ast\xc4')
kColorSyncFolderIcon = FOUR_CHAR_CODE('prof')
kContextualMenuItemsFolderIcon = FOUR_CHAR_CODE('cmnu')
kControlPanelDisabledFolderIcon = FOUR_CHAR_CODE('ctrD')
kControlPanelFolderIcon = FOUR_CHAR_CODE('ctrl')
kControlStripModulesFolderIcon = FOUR_CHAR_CODE('sdv\xc4')
kDocumentsFolderIcon = FOUR_CHAR_CODE('docs')
kExtensionsDisabledFolderIcon = FOUR_CHAR_CODE('extD')
kExtensionsFolderIcon = FOUR_CHAR_CODE('extn')
kFavoritesFolderIcon = FOUR_CHAR_CODE('favs')
kFontsFolderIcon = FOUR_CHAR_CODE('font')
kHelpFolderIcon = FOUR_CHAR_CODE('\xc4hlp')
kInternetFolderIcon = FOUR_CHAR_CODE('int\xc4')
kInternetPlugInFolderIcon = FOUR_CHAR_CODE('\xc4net')
kInternetSearchSitesFolderIcon = FOUR_CHAR_CODE('issf')
kLocalesFolderIcon = FOUR_CHAR_CODE('\xc4loc')
kMacOSReadMeFolderIcon = FOUR_CHAR_CODE('mor\xc4')
kPublicFolderIcon = FOUR_CHAR_CODE('pubf')
kPreferencesFolderIcon = FOUR_CHAR_CODE('prf\xc4')
kPrinterDescriptionFolderIcon = FOUR_CHAR_CODE('ppdf')
kPrinterDriverFolderIcon = FOUR_CHAR_CODE('\xc4prd')
kPrintMonitorFolderIcon = FOUR_CHAR_CODE('prnt')
kRecentApplicationsFolderIcon = FOUR_CHAR_CODE('rapp')
kRecentDocumentsFolderIcon = FOUR_CHAR_CODE('rdoc')
kRecentServersFolderIcon = FOUR_CHAR_CODE('rsrv')
kScriptingAdditionsFolderIcon = FOUR_CHAR_CODE('\xc4scr')
kSharedLibrariesFolderIcon = FOUR_CHAR_CODE('\xc4lib')
kScriptsFolderIcon = FOUR_CHAR_CODE('scr\xc4')
kShutdownItemsDisabledFolderIcon = FOUR_CHAR_CODE('shdD')
kShutdownItemsFolderIcon = FOUR_CHAR_CODE('shdf')
kSpeakableItemsFolder = FOUR_CHAR_CODE('spki')
kStartupItemsDisabledFolderIcon = FOUR_CHAR_CODE('strD')
kStartupItemsFolderIcon = FOUR_CHAR_CODE('strt')
kSystemExtensionDisabledFolderIcon = FOUR_CHAR_CODE('macD')
kSystemFolderIcon = FOUR_CHAR_CODE('macs')
kTextEncodingsFolderIcon = FOUR_CHAR_CODE('\xc4tex')
kUsersFolderIcon = FOUR_CHAR_CODE('usr\xc4')
kUtilitiesFolderIcon = FOUR_CHAR_CODE('uti\xc4')
kVoicesFolderIcon = FOUR_CHAR_CODE('fvoc')
kSystemFolderXIcon = FOUR_CHAR_CODE('macx')
kAppleScriptBadgeIcon = FOUR_CHAR_CODE('scrp')
kLockedBadgeIcon = FOUR_CHAR_CODE('lbdg')
kMountedBadgeIcon = FOUR_CHAR_CODE('mbdg')
kSharedBadgeIcon = FOUR_CHAR_CODE('sbdg')
kAliasBadgeIcon = FOUR_CHAR_CODE('abdg')
kAlertCautionBadgeIcon = FOUR_CHAR_CODE('cbdg')
kAlertNoteIcon = FOUR_CHAR_CODE('note')
kAlertCautionIcon = FOUR_CHAR_CODE('caut')
kAlertStopIcon = FOUR_CHAR_CODE('stop')
kAppleTalkIcon = FOUR_CHAR_CODE('atlk')
kAppleTalkZoneIcon = FOUR_CHAR_CODE('atzn')
kAFPServerIcon = FOUR_CHAR_CODE('afps')
kFTPServerIcon = FOUR_CHAR_CODE('ftps')
kHTTPServerIcon = FOUR_CHAR_CODE('htps')
kGenericNetworkIcon = FOUR_CHAR_CODE('gnet')
kIPFileServerIcon = FOUR_CHAR_CODE('isrv')
kToolbarCustomizeIcon = FOUR_CHAR_CODE('tcus')
kToolbarDeleteIcon = FOUR_CHAR_CODE('tdel')
kToolbarFavoritesIcon = FOUR_CHAR_CODE('tfav')
kToolbarHomeIcon = FOUR_CHAR_CODE('thom')
kAppleLogoIcon = FOUR_CHAR_CODE('capl')
kAppleMenuIcon = FOUR_CHAR_CODE('sapl')
kBackwardArrowIcon = FOUR_CHAR_CODE('baro')
kFavoriteItemsIcon = FOUR_CHAR_CODE('favr')
kForwardArrowIcon = FOUR_CHAR_CODE('faro')
kGridIcon = FOUR_CHAR_CODE('grid')
kHelpIcon = FOUR_CHAR_CODE('help')
kKeepArrangedIcon = FOUR_CHAR_CODE('arng')
kLockedIcon = FOUR_CHAR_CODE('lock')
kNoFilesIcon = FOUR_CHAR_CODE('nfil')
kNoFolderIcon = FOUR_CHAR_CODE('nfld')
kNoWriteIcon = FOUR_CHAR_CODE('nwrt')
kProtectedApplicationFolderIcon = FOUR_CHAR_CODE('papp')
kProtectedSystemFolderIcon = FOUR_CHAR_CODE('psys')
kRecentItemsIcon = FOUR_CHAR_CODE('rcnt')
kShortcutIcon = FOUR_CHAR_CODE('shrt')
kSortAscendingIcon = FOUR_CHAR_CODE('asnd')
kSortDescendingIcon = FOUR_CHAR_CODE('dsnd')
kUnlockedIcon = FOUR_CHAR_CODE('ulck')
kConnectToIcon = FOUR_CHAR_CODE('cnct')
kGenericWindowIcon = FOUR_CHAR_CODE('gwin')
kQuestionMarkIcon = FOUR_CHAR_CODE('ques')
kDeleteAliasIcon = FOUR_CHAR_CODE('dali')
kEjectMediaIcon = FOUR_CHAR_CODE('ejec')
kBurningIcon = FOUR_CHAR_CODE('burn')
kRightContainerArrowIcon = FOUR_CHAR_CODE('rcar')
kIconServicesNormalUsageFlag = 0
kIconServicesCatalogInfoMask = (kFSCatInfoNodeID | kFSCatInfoParentDirID | kFSCatInfoVolume | kFSCatInfoNodeFlags | kFSCatInfoFinderInfo | kFSCatInfoFinderXInfo | kFSCatInfoUserAccess)
kPlotIconRefNormalFlags = 0L
kPlotIconRefNoImage = (1 << 1)
kPlotIconRefNoMask = (1 << 2)
kIconFamilyType = FOUR_CHAR_CODE('icns')
| apache-2.0 | 5,760,628,713,774,261,000 | 6,957,437,392,608,447,000 | 41.740157 | 184 | 0.825964 | false |
ray-project/ray | rllib/utils/annotations.py | 2 | 1536 | def override(cls):
"""Annotation for documenting method overrides.
Args:
cls (type): The superclass that provides the overridden method. If this
cls does not actually have the method, an error is raised.
"""
def check_override(method):
if method.__name__ not in dir(cls):
raise NameError("{} does not override any method of {}".format(
method, cls))
return method
return check_override
def PublicAPI(obj):
"""Annotation for documenting public APIs.
Public APIs are classes and methods exposed to end users of RLlib. You
can expect these APIs to remain stable across RLlib releases.
Subclasses that inherit from a ``@PublicAPI`` base class can be
assumed part of the RLlib public API as well (e.g., all trainer classes
are in public API because Trainer is ``@PublicAPI``).
In addition, you can assume all trainer configurations are part of their
public API as well.
"""
return obj
def DeveloperAPI(obj):
"""Annotation for documenting developer APIs.
Developer APIs are classes and methods explicitly exposed to developers
for the purposes of building custom algorithms or advanced training
strategies on top of RLlib internals. You can generally expect these APIs
to be stable sans minor changes (but less stable than public APIs).
Subclasses that inherit from a ``@DeveloperAPI`` base class can be
assumed part of the RLlib developer API as well.
"""
return obj
| apache-2.0 | 58,400,832,183,734,940 | -5,983,286,223,728,949,000 | 31.680851 | 79 | 0.692708 | false |
akash1808/glance | glance/tests/unit/common/test_signature_utils.py | 2 | 15922 | # Copyright (c) The Johns Hopkins University/Applied Physics Laboratory
# 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 applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
import base64
import mock
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.asymmetric import padding
from cryptography.hazmat.primitives.asymmetric import rsa
from glance.common import exception
from glance.common import signature_utils
from glance.tests import utils as test_utils
TEST_PRIVATE_KEY = rsa.generate_private_key(public_exponent=3,
key_size=1024,
backend=default_backend())
# Required image property names
(SIGNATURE, HASH_METHOD, KEY_TYPE, CERT_UUID) = (
signature_utils.SIGNATURE,
signature_utils.HASH_METHOD,
signature_utils.KEY_TYPE,
signature_utils.CERT_UUID
)
# Optional image property names for RSA-PSS
(MASK_GEN_ALG, PSS_SALT_LENGTH) = (
signature_utils.MASK_GEN_ALG,
signature_utils.PSS_SALT_LENGTH
)
class FakeKeyManager(object):
def __init__(self):
self.certs = {'invalid_format_cert':
FakeCastellanCertificate('A' * 256, 'BLAH'),
'valid_format_cert':
FakeCastellanCertificate('A' * 256, 'X.509')}
def get(self, context, cert_uuid):
cert = self.certs.get(cert_uuid)
if cert is None:
raise Exception("No matching certificate found.")
return cert
class FakeCastellanCertificate(object):
def __init__(self, data, cert_format):
self.data = data
self.cert_format = cert_format
@property
def format(self):
return self.cert_format
def get_encoded(self):
return self.data
class FakeCryptoCertificate(object):
def __init__(self, pub_key):
self.pub_key = pub_key
def public_key(self):
return self.pub_key
class BadPublicKey(object):
def verifier(self, signature, padding, hash_method):
return None
class TestSignatureUtils(test_utils.BaseTestCase):
"""Test methods of signature_utils"""
def test_should_verify_signature(self):
image_props = {CERT_UUID: 'CERT_UUID',
HASH_METHOD: 'HASH_METHOD',
SIGNATURE: 'SIGNATURE',
KEY_TYPE: 'SIG_KEY_TYPE'}
self.assertTrue(signature_utils.should_verify_signature(image_props))
def test_should_verify_signature_fail(self):
bad_image_properties = [{CERT_UUID: 'CERT_UUID',
HASH_METHOD: 'HASH_METHOD',
SIGNATURE: 'SIGNATURE'},
{CERT_UUID: 'CERT_UUID',
HASH_METHOD: 'HASH_METHOD',
KEY_TYPE: 'SIG_KEY_TYPE'},
{CERT_UUID: 'CERT_UUID',
SIGNATURE: 'SIGNATURE',
KEY_TYPE: 'SIG_KEY_TYPE'},
{HASH_METHOD: 'HASH_METHOD',
SIGNATURE: 'SIGNATURE',
KEY_TYPE: 'SIG_KEY_TYPE'}]
for bad_props in bad_image_properties:
result = signature_utils.should_verify_signature(bad_props)
self.assertFalse(result)
@mock.patch('glance.common.signature_utils.get_public_key')
def test_verify_signature_PSS(self, mock_get_pub_key):
checksum_hash = '224626ae19824466f2a7f39ab7b80f7f'
mock_get_pub_key.return_value = TEST_PRIVATE_KEY.public_key()
for hash_name, hash_alg in signature_utils.HASH_METHODS.iteritems():
signer = TEST_PRIVATE_KEY.signer(
padding.PSS(
mgf=padding.MGF1(hash_alg),
salt_length=padding.PSS.MAX_LENGTH
),
hash_alg
)
signer.update(checksum_hash)
signature = base64.b64encode(signer.finalize())
image_props = {CERT_UUID:
'fea14bc2-d75f-4ba5-bccc-b5c924ad0693',
HASH_METHOD: hash_name,
KEY_TYPE: 'RSA-PSS',
MASK_GEN_ALG: 'MGF1',
SIGNATURE: signature}
self.assertTrue(signature_utils.verify_signature(None,
checksum_hash,
image_props))
@mock.patch('glance.common.signature_utils.get_public_key')
def test_verify_signature_custom_PSS_salt(self, mock_get_pub_key):
checksum_hash = '224626ae19824466f2a7f39ab7b80f7f'
mock_get_pub_key.return_value = TEST_PRIVATE_KEY.public_key()
custom_salt_length = 32
for hash_name, hash_alg in signature_utils.HASH_METHODS.iteritems():
signer = TEST_PRIVATE_KEY.signer(
padding.PSS(
mgf=padding.MGF1(hash_alg),
salt_length=custom_salt_length
),
hash_alg
)
signer.update(checksum_hash)
signature = base64.b64encode(signer.finalize())
image_props = {CERT_UUID:
'fea14bc2-d75f-4ba5-bccc-b5c924ad0693',
HASH_METHOD: hash_name,
KEY_TYPE: 'RSA-PSS',
MASK_GEN_ALG: 'MGF1',
PSS_SALT_LENGTH: custom_salt_length,
SIGNATURE: signature}
self.assertTrue(signature_utils.verify_signature(None,
checksum_hash,
image_props))
@mock.patch('glance.common.signature_utils.get_public_key')
def test_verify_signature_bad_signature(self, mock_get_pub_key):
checksum_hash = '224626ae19824466f2a7f39ab7b80f7f'
mock_get_pub_key.return_value = TEST_PRIVATE_KEY.public_key()
image_properties = {CERT_UUID:
'fea14bc2-d75f-4ba5-bccc-b5c924ad0693',
HASH_METHOD: 'SHA-256',
KEY_TYPE: 'RSA-PSS',
MASK_GEN_ALG: 'MGF1',
SIGNATURE: 'BLAH'}
self.assertRaisesRegexp(exception.SignatureVerificationError,
'Signature verification failed.',
signature_utils.verify_signature,
None, checksum_hash, image_properties)
@mock.patch('glance.common.signature_utils.should_verify_signature')
def test_verify_signature_invalid_image_props(self, mock_should):
mock_should.return_value = False
self.assertRaisesRegexp(exception.SignatureVerificationError,
'Required image properties for signature'
' verification do not exist. Cannot verify'
' signature.',
signature_utils.verify_signature,
None, None, None)
@mock.patch('glance.common.signature_utils.get_public_key')
def test_verify_signature_bad_sig_key_type(self, mock_get_pub_key):
checksum_hash = '224626ae19824466f2a7f39ab7b80f7f'
mock_get_pub_key.return_value = TEST_PRIVATE_KEY.public_key()
image_properties = {CERT_UUID:
'fea14bc2-d75f-4ba5-bccc-b5c924ad0693',
HASH_METHOD: 'SHA-256',
KEY_TYPE: 'BLAH',
MASK_GEN_ALG: 'MGF1',
SIGNATURE: 'BLAH'}
self.assertRaisesRegexp(exception.SignatureVerificationError,
'Invalid signature key type: .*',
signature_utils.verify_signature,
None, checksum_hash, image_properties)
@mock.patch('glance.common.signature_utils.get_public_key')
def test_verify_signature_RSA_no_mask_gen(self, mock_get_pub_key):
checksum_hash = '224626ae19824466f2a7f39ab7b80f7f'
mock_get_pub_key.return_value = TEST_PRIVATE_KEY.public_key()
image_properties = {CERT_UUID:
'fea14bc2-d75f-4ba5-bccc-b5c924ad0693',
HASH_METHOD: 'SHA-256',
KEY_TYPE: 'RSA-PSS',
SIGNATURE: 'BLAH'}
self.assertRaisesRegexp(exception.SignatureVerificationError,
'Signature verification failed.',
signature_utils.verify_signature,
None, checksum_hash, image_properties)
@mock.patch('glance.common.signature_utils.get_public_key')
def test_verify_signature_RSA_bad_mask_gen(self, mock_get_pub_key):
checksum_hash = '224626ae19824466f2a7f39ab7b80f7f'
mock_get_pub_key.return_value = TEST_PRIVATE_KEY.public_key()
image_properties = {CERT_UUID:
'fea14bc2-d75f-4ba5-bccc-b5c924ad0693',
HASH_METHOD: 'SHA-256',
KEY_TYPE: 'RSA-PSS',
MASK_GEN_ALG: 'BLAH',
SIGNATURE: 'BLAH'}
self.assertRaisesRegexp(exception.SignatureVerificationError,
'Invalid mask_gen_algorithm: .*',
signature_utils.verify_signature,
None, checksum_hash, image_properties)
@mock.patch('glance.common.signature_utils.get_public_key')
def test_verify_signature_bad_pss_salt(self, mock_get_pub_key):
checksum_hash = '224626ae19824466f2a7f39ab7b80f7f'
mock_get_pub_key.return_value = TEST_PRIVATE_KEY.public_key()
image_properties = {CERT_UUID:
'fea14bc2-d75f-4ba5-bccc-b5c924ad0693',
HASH_METHOD: 'SHA-256',
KEY_TYPE: 'RSA-PSS',
MASK_GEN_ALG: 'MGF1',
PSS_SALT_LENGTH: 'BLAH',
SIGNATURE: 'BLAH'}
self.assertRaisesRegexp(exception.SignatureVerificationError,
'Invalid pss_salt_length: .*',
signature_utils.verify_signature,
None, checksum_hash, image_properties)
@mock.patch('glance.common.signature_utils.get_public_key')
def test_verify_signature_verifier_none(self, mock_get_pub_key):
checksum_hash = '224626ae19824466f2a7f39ab7b80f7f'
mock_get_pub_key.return_value = BadPublicKey()
image_properties = {CERT_UUID:
'fea14bc2-d75f-4ba5-bccc-b5c924ad0693',
HASH_METHOD: 'SHA-256',
KEY_TYPE: 'RSA-PSS',
MASK_GEN_ALG: 'MGF1',
SIGNATURE: 'BLAH'}
self.assertRaisesRegexp(exception.SignatureVerificationError,
'Error occurred while verifying'
' the signature',
signature_utils.verify_signature,
None, checksum_hash, image_properties)
def test_get_signature(self):
signature = 'A' * 256
data = base64.b64encode(signature)
self.assertEqual(signature,
signature_utils.get_signature(data))
def test_get_signature_fail(self):
self.assertRaisesRegexp(exception.SignatureVerificationError,
'The signature data was not properly'
' encoded using base64',
signature_utils.get_signature, '///')
def test_get_hash_method(self):
hash_dict = signature_utils.HASH_METHODS
for hash_name in hash_dict.keys():
hash_class = signature_utils.get_hash_method(hash_name).__class__
self.assertIsInstance(hash_dict[hash_name], hash_class)
def test_get_hash_method_fail(self):
self.assertRaisesRegexp(exception.SignatureVerificationError,
'Invalid signature hash method: .*',
signature_utils.get_hash_method, 'SHA-2')
def test_get_signature_key_type(self):
for sig_format in signature_utils.SIGNATURE_KEY_TYPES:
result = signature_utils.get_signature_key_type(sig_format)
self.assertEqual(sig_format, result)
def test_get_signature_key_type_fail(self):
self.assertRaisesRegexp(exception.SignatureVerificationError,
'Invalid signature key type: .*',
signature_utils.get_signature_key_type,
'RSB-PSS')
@mock.patch('glance.common.signature_utils.get_certificate')
def test_get_public_key(self, mock_get_cert):
fake_cert = FakeCryptoCertificate(TEST_PRIVATE_KEY.public_key())
mock_get_cert.return_value = fake_cert
result_pub_key = signature_utils.get_public_key(None, None, 'RSA-PSS')
self.assertEqual(fake_cert.public_key(), result_pub_key)
@mock.patch('glance.common.signature_utils.get_certificate')
def test_get_public_key_invalid_key(self, mock_get_certificate):
bad_pub_key = 'A' * 256
mock_get_certificate.return_value = FakeCryptoCertificate(bad_pub_key)
self.assertRaisesRegexp(exception.SignatureVerificationError,
'Invalid public key type for '
'signature key type: .*',
signature_utils.get_public_key, None,
None, 'RSA-PSS')
@mock.patch('cryptography.x509.load_der_x509_certificate')
@mock.patch('castellan.key_manager.API', return_value=FakeKeyManager())
def test_get_certificate(self, mock_key_manager_API, mock_load_cert):
cert_uuid = 'valid_format_cert'
x509_cert = FakeCryptoCertificate(TEST_PRIVATE_KEY.public_key())
mock_load_cert.return_value = x509_cert
self.assertEqual(x509_cert,
signature_utils.get_certificate(None, cert_uuid))
@mock.patch('castellan.key_manager.API', return_value=FakeKeyManager())
def test_get_certificate_key_manager_fail(self, mock_key_manager_API):
bad_cert_uuid = 'fea14bc2-d75f-4ba5-bccc-b5c924ad0695'
self.assertRaisesRegexp(exception.SignatureVerificationError,
'Unable to retrieve certificate with ID: .*',
signature_utils.get_certificate, None,
bad_cert_uuid)
@mock.patch('castellan.key_manager.API', return_value=FakeKeyManager())
def test_get_certificate_invalid_format(self, mock_API):
cert_uuid = 'invalid_format_cert'
self.assertRaisesRegexp(exception.SignatureVerificationError,
'Invalid certificate format: .*',
signature_utils.get_certificate, None,
cert_uuid)
| apache-2.0 | 7,130,972,551,969,181,000 | -7,103,613,135,906,656,000 | 45.150725 | 78 | 0.553008 | false |
DreamerKing/LightweightHtmlWidgets | publish-rc/v1.1/files/Ipy.Lib/bdb.py | 108 | 21084 | """Debugger basics"""
import fnmatch
import sys
import os
import types
__all__ = ["BdbQuit","Bdb","Breakpoint"]
class BdbQuit(Exception):
"""Exception to give up completely"""
class Bdb:
"""Generic Python debugger base class.
This class takes care of details of the trace facility;
a derived class should implement user interaction.
The standard debugger class (pdb.Pdb) is an example.
"""
def __init__(self, skip=None):
self.skip = set(skip) if skip else None
self.breaks = {}
self.fncache = {}
def canonic(self, filename):
if filename == "<" + filename[1:-1] + ">":
return filename
canonic = self.fncache.get(filename)
if not canonic:
canonic = os.path.abspath(filename)
canonic = os.path.normcase(canonic)
self.fncache[filename] = canonic
return canonic
def reset(self):
import linecache
linecache.checkcache()
self.botframe = None
self._set_stopinfo(None, None)
def trace_dispatch(self, frame, event, arg):
if self.quitting:
return # None
if event == 'line':
return self.dispatch_line(frame)
if event == 'call':
return self.dispatch_call(frame, arg)
if event == 'return':
return self.dispatch_return(frame, arg)
if event == 'exception':
return self.dispatch_exception(frame, arg)
if event == 'c_call':
return self.trace_dispatch
if event == 'c_exception':
return self.trace_dispatch
if event == 'c_return':
return self.trace_dispatch
print 'bdb.Bdb.dispatch: unknown debugging event:', repr(event)
return self.trace_dispatch
def dispatch_line(self, frame):
if self.stop_here(frame) or self.break_here(frame):
self.user_line(frame)
if self.quitting: raise BdbQuit
return self.trace_dispatch
def dispatch_call(self, frame, arg):
# XXX 'arg' is no longer used
if self.botframe is None:
# First call of dispatch since reset()
self.botframe = frame.f_back # (CT) Note that this may also be None!
return self.trace_dispatch
if not (self.stop_here(frame) or self.break_anywhere(frame)):
# No need to trace this function
return # None
self.user_call(frame, arg)
if self.quitting: raise BdbQuit
return self.trace_dispatch
def dispatch_return(self, frame, arg):
if self.stop_here(frame) or frame == self.returnframe:
self.user_return(frame, arg)
if self.quitting: raise BdbQuit
return self.trace_dispatch
def dispatch_exception(self, frame, arg):
if self.stop_here(frame):
self.user_exception(frame, arg)
if self.quitting: raise BdbQuit
return self.trace_dispatch
# Normally derived classes don't override the following
# methods, but they may if they want to redefine the
# definition of stopping and breakpoints.
def is_skipped_module(self, module_name):
for pattern in self.skip:
if fnmatch.fnmatch(module_name, pattern):
return True
return False
def stop_here(self, frame):
# (CT) stopframe may now also be None, see dispatch_call.
# (CT) the former test for None is therefore removed from here.
if self.skip and \
self.is_skipped_module(frame.f_globals.get('__name__')):
return False
if frame is self.stopframe:
if self.stoplineno == -1:
return False
return frame.f_lineno >= self.stoplineno
while frame is not None and frame is not self.stopframe:
if frame is self.botframe:
return True
frame = frame.f_back
return False
def break_here(self, frame):
filename = self.canonic(frame.f_code.co_filename)
if not filename in self.breaks:
return False
lineno = frame.f_lineno
if not lineno in self.breaks[filename]:
# The line itself has no breakpoint, but maybe the line is the
# first line of a function with breakpoint set by function name.
lineno = frame.f_code.co_firstlineno
if not lineno in self.breaks[filename]:
return False
# flag says ok to delete temp. bp
(bp, flag) = effective(filename, lineno, frame)
if bp:
self.currentbp = bp.number
if (flag and bp.temporary):
self.do_clear(str(bp.number))
return True
else:
return False
def do_clear(self, arg):
raise NotImplementedError, "subclass of bdb must implement do_clear()"
def break_anywhere(self, frame):
return self.canonic(frame.f_code.co_filename) in self.breaks
# Derived classes should override the user_* methods
# to gain control.
def user_call(self, frame, argument_list):
"""This method is called when there is the remote possibility
that we ever need to stop in this function."""
pass
def user_line(self, frame):
"""This method is called when we stop or break at this line."""
pass
def user_return(self, frame, return_value):
"""This method is called when a return trap is set here."""
pass
def user_exception(self, frame, exc_info):
exc_type, exc_value, exc_traceback = exc_info
"""This method is called if an exception occurs,
but only if we are to stop at or just below this level."""
pass
def _set_stopinfo(self, stopframe, returnframe, stoplineno=0):
self.stopframe = stopframe
self.returnframe = returnframe
self.quitting = 0
# stoplineno >= 0 means: stop at line >= the stoplineno
# stoplineno -1 means: don't stop at all
self.stoplineno = stoplineno
# Derived classes and clients can call the following methods
# to affect the stepping state.
def set_until(self, frame): #the name "until" is borrowed from gdb
"""Stop when the line with the line no greater than the current one is
reached or when returning from current frame"""
self._set_stopinfo(frame, frame, frame.f_lineno+1)
def set_step(self):
"""Stop after one line of code."""
self._set_stopinfo(None, None)
def set_next(self, frame):
"""Stop on the next line in or below the given frame."""
self._set_stopinfo(frame, None)
def set_return(self, frame):
"""Stop when returning from the given frame."""
self._set_stopinfo(frame.f_back, frame)
def set_trace(self, frame=None):
"""Start debugging from `frame`.
If frame is not specified, debugging starts from caller's frame.
"""
if frame is None:
frame = sys._getframe().f_back
self.reset()
while frame:
frame.f_trace = self.trace_dispatch
self.botframe = frame
frame = frame.f_back
self.set_step()
sys.settrace(self.trace_dispatch)
def set_continue(self):
# Don't stop except at breakpoints or when finished
self._set_stopinfo(self.botframe, None, -1)
if not self.breaks:
# no breakpoints; run without debugger overhead
sys.settrace(None)
frame = sys._getframe().f_back
while frame and frame is not self.botframe:
del frame.f_trace
frame = frame.f_back
def set_quit(self):
self.stopframe = self.botframe
self.returnframe = None
self.quitting = 1
sys.settrace(None)
# Derived classes and clients can call the following methods
# to manipulate breakpoints. These methods return an
# error message is something went wrong, None if all is well.
# Set_break prints out the breakpoint line and file:lineno.
# Call self.get_*break*() to see the breakpoints or better
# for bp in Breakpoint.bpbynumber: if bp: bp.bpprint().
def set_break(self, filename, lineno, temporary=0, cond = None,
funcname=None):
filename = self.canonic(filename)
import linecache # Import as late as possible
line = linecache.getline(filename, lineno)
if not line:
return 'Line %s:%d does not exist' % (filename,
lineno)
if not filename in self.breaks:
self.breaks[filename] = []
list = self.breaks[filename]
if not lineno in list:
list.append(lineno)
bp = Breakpoint(filename, lineno, temporary, cond, funcname)
def _prune_breaks(self, filename, lineno):
if (filename, lineno) not in Breakpoint.bplist:
self.breaks[filename].remove(lineno)
if not self.breaks[filename]:
del self.breaks[filename]
def clear_break(self, filename, lineno):
filename = self.canonic(filename)
if not filename in self.breaks:
return 'There are no breakpoints in %s' % filename
if lineno not in self.breaks[filename]:
return 'There is no breakpoint at %s:%d' % (filename,
lineno)
# If there's only one bp in the list for that file,line
# pair, then remove the breaks entry
for bp in Breakpoint.bplist[filename, lineno][:]:
bp.deleteMe()
self._prune_breaks(filename, lineno)
def clear_bpbynumber(self, arg):
try:
number = int(arg)
except:
return 'Non-numeric breakpoint number (%s)' % arg
try:
bp = Breakpoint.bpbynumber[number]
except IndexError:
return 'Breakpoint number (%d) out of range' % number
if not bp:
return 'Breakpoint (%d) already deleted' % number
bp.deleteMe()
self._prune_breaks(bp.file, bp.line)
def clear_all_file_breaks(self, filename):
filename = self.canonic(filename)
if not filename in self.breaks:
return 'There are no breakpoints in %s' % filename
for line in self.breaks[filename]:
blist = Breakpoint.bplist[filename, line]
for bp in blist:
bp.deleteMe()
del self.breaks[filename]
def clear_all_breaks(self):
if not self.breaks:
return 'There are no breakpoints'
for bp in Breakpoint.bpbynumber:
if bp:
bp.deleteMe()
self.breaks = {}
def get_break(self, filename, lineno):
filename = self.canonic(filename)
return filename in self.breaks and \
lineno in self.breaks[filename]
def get_breaks(self, filename, lineno):
filename = self.canonic(filename)
return filename in self.breaks and \
lineno in self.breaks[filename] and \
Breakpoint.bplist[filename, lineno] or []
def get_file_breaks(self, filename):
filename = self.canonic(filename)
if filename in self.breaks:
return self.breaks[filename]
else:
return []
def get_all_breaks(self):
return self.breaks
# Derived classes and clients can call the following method
# to get a data structure representing a stack trace.
def get_stack(self, f, t):
stack = []
if t and t.tb_frame is f:
t = t.tb_next
while f is not None:
stack.append((f, f.f_lineno))
if f is self.botframe:
break
f = f.f_back
stack.reverse()
i = max(0, len(stack) - 1)
while t is not None:
stack.append((t.tb_frame, t.tb_lineno))
t = t.tb_next
if f is None:
i = max(0, len(stack) - 1)
return stack, i
#
def format_stack_entry(self, frame_lineno, lprefix=': '):
import linecache, repr
frame, lineno = frame_lineno
filename = self.canonic(frame.f_code.co_filename)
s = '%s(%r)' % (filename, lineno)
if frame.f_code.co_name:
s = s + frame.f_code.co_name
else:
s = s + "<lambda>"
if '__args__' in frame.f_locals:
args = frame.f_locals['__args__']
else:
args = None
if args:
s = s + repr.repr(args)
else:
s = s + '()'
if '__return__' in frame.f_locals:
rv = frame.f_locals['__return__']
s = s + '->'
s = s + repr.repr(rv)
line = linecache.getline(filename, lineno, frame.f_globals)
if line: s = s + lprefix + line.strip()
return s
# The following two methods can be called by clients to use
# a debugger to debug a statement, given as a string.
def run(self, cmd, globals=None, locals=None):
if globals is None:
import __main__
globals = __main__.__dict__
if locals is None:
locals = globals
self.reset()
sys.settrace(self.trace_dispatch)
if not isinstance(cmd, types.CodeType):
cmd = cmd+'\n'
try:
exec cmd in globals, locals
except BdbQuit:
pass
finally:
self.quitting = 1
sys.settrace(None)
def runeval(self, expr, globals=None, locals=None):
if globals is None:
import __main__
globals = __main__.__dict__
if locals is None:
locals = globals
self.reset()
sys.settrace(self.trace_dispatch)
if not isinstance(expr, types.CodeType):
expr = expr+'\n'
try:
return eval(expr, globals, locals)
except BdbQuit:
pass
finally:
self.quitting = 1
sys.settrace(None)
def runctx(self, cmd, globals, locals):
# B/W compatibility
self.run(cmd, globals, locals)
# This method is more useful to debug a single function call.
def runcall(self, func, *args, **kwds):
self.reset()
sys.settrace(self.trace_dispatch)
res = None
try:
res = func(*args, **kwds)
except BdbQuit:
pass
finally:
self.quitting = 1
sys.settrace(None)
return res
def set_trace():
Bdb().set_trace()
class Breakpoint:
"""Breakpoint class
Implements temporary breakpoints, ignore counts, disabling and
(re)-enabling, and conditionals.
Breakpoints are indexed by number through bpbynumber and by
the file,line tuple using bplist. The former points to a
single instance of class Breakpoint. The latter points to a
list of such instances since there may be more than one
breakpoint per line.
"""
# XXX Keeping state in the class is a mistake -- this means
# you cannot have more than one active Bdb instance.
next = 1 # Next bp to be assigned
bplist = {} # indexed by (file, lineno) tuple
bpbynumber = [None] # Each entry is None or an instance of Bpt
# index 0 is unused, except for marking an
# effective break .... see effective()
def __init__(self, file, line, temporary=0, cond=None, funcname=None):
self.funcname = funcname
# Needed if funcname is not None.
self.func_first_executable_line = None
self.file = file # This better be in canonical form!
self.line = line
self.temporary = temporary
self.cond = cond
self.enabled = 1
self.ignore = 0
self.hits = 0
self.number = Breakpoint.next
Breakpoint.next = Breakpoint.next + 1
# Build the two lists
self.bpbynumber.append(self)
if (file, line) in self.bplist:
self.bplist[file, line].append(self)
else:
self.bplist[file, line] = [self]
def deleteMe(self):
index = (self.file, self.line)
self.bpbynumber[self.number] = None # No longer in list
self.bplist[index].remove(self)
if not self.bplist[index]:
# No more bp for this f:l combo
del self.bplist[index]
def enable(self):
self.enabled = 1
def disable(self):
self.enabled = 0
def bpprint(self, out=None):
if out is None:
out = sys.stdout
if self.temporary:
disp = 'del '
else:
disp = 'keep '
if self.enabled:
disp = disp + 'yes '
else:
disp = disp + 'no '
print >>out, '%-4dbreakpoint %s at %s:%d' % (self.number, disp,
self.file, self.line)
if self.cond:
print >>out, '\tstop only if %s' % (self.cond,)
if self.ignore:
print >>out, '\tignore next %d hits' % (self.ignore)
if (self.hits):
if (self.hits > 1): ss = 's'
else: ss = ''
print >>out, ('\tbreakpoint already hit %d time%s' %
(self.hits, ss))
# -----------end of Breakpoint class----------
def checkfuncname(b, frame):
"""Check whether we should break here because of `b.funcname`."""
if not b.funcname:
# Breakpoint was set via line number.
if b.line != frame.f_lineno:
# Breakpoint was set at a line with a def statement and the function
# defined is called: don't break.
return False
return True
# Breakpoint set via function name.
if frame.f_code.co_name != b.funcname:
# It's not a function call, but rather execution of def statement.
return False
# We are in the right frame.
if not b.func_first_executable_line:
# The function is entered for the 1st time.
b.func_first_executable_line = frame.f_lineno
if b.func_first_executable_line != frame.f_lineno:
# But we are not at the first line number: don't break.
return False
return True
# Determines if there is an effective (active) breakpoint at this
# line of code. Returns breakpoint number or 0 if none
def effective(file, line, frame):
"""Determine which breakpoint for this file:line is to be acted upon.
Called only if we know there is a bpt at this
location. Returns breakpoint that was triggered and a flag
that indicates if it is ok to delete a temporary bp.
"""
possibles = Breakpoint.bplist[file,line]
for i in range(0, len(possibles)):
b = possibles[i]
if b.enabled == 0:
continue
if not checkfuncname(b, frame):
continue
# Count every hit when bp is enabled
b.hits = b.hits + 1
if not b.cond:
# If unconditional, and ignoring,
# go on to next, else break
if b.ignore > 0:
b.ignore = b.ignore -1
continue
else:
# breakpoint and marker that's ok
# to delete if temporary
return (b,1)
else:
# Conditional bp.
# Ignore count applies only to those bpt hits where the
# condition evaluates to true.
try:
val = eval(b.cond, frame.f_globals,
frame.f_locals)
if val:
if b.ignore > 0:
b.ignore = b.ignore -1
# continue
else:
return (b,1)
# else:
# continue
except:
# if eval fails, most conservative
# thing is to stop on breakpoint
# regardless of ignore count.
# Don't delete temporary,
# as another hint to user.
return (b,0)
return (None, None)
# -------------------- testing --------------------
class Tdb(Bdb):
def user_call(self, frame, args):
name = frame.f_code.co_name
if not name: name = '???'
print '+++ call', name, args
def user_line(self, frame):
import linecache
name = frame.f_code.co_name
if not name: name = '???'
fn = self.canonic(frame.f_code.co_filename)
line = linecache.getline(fn, frame.f_lineno, frame.f_globals)
print '+++', fn, frame.f_lineno, name, ':', line.strip()
def user_return(self, frame, retval):
print '+++ return', retval
def user_exception(self, frame, exc_stuff):
print '+++ exception', exc_stuff
self.set_continue()
def foo(n):
print 'foo(', n, ')'
x = bar(n*10)
print 'bar returned', x
def bar(a):
print 'bar(', a, ')'
return a/2
def test():
t = Tdb()
t.run('import bdb; bdb.foo(10)')
# end
| gpl-3.0 | -1,522,592,051,261,455,400 | 4,483,959,040,978,771,500 | 32.360759 | 80 | 0.564836 | false |
CouchPotato/CouchPotatoServer | couchpotato/core/downloaders/blackhole.py | 16 | 7939 | from __future__ import with_statement
import os
import traceback
from couchpotato.core._base.downloader.main import DownloaderBase
from couchpotato.core.helpers.encoding import sp
from couchpotato.core.helpers.variable import getDownloadDir
from couchpotato.core.logger import CPLog
from couchpotato.environment import Env
log = CPLog(__name__)
autoload = 'Blackhole'
class Blackhole(DownloaderBase):
protocol = ['nzb', 'torrent', 'torrent_magnet']
status_support = False
def download(self, data = None, media = None, filedata = None):
""" Send a torrent/nzb file to the downloader
:param data: dict returned from provider
Contains the release information
:param media: media dict with information
Used for creating the filename when possible
:param filedata: downloaded torrent/nzb filedata
The file gets downloaded in the searcher and send to this function
This is done to have failed checking before using the downloader, so the downloader
doesn't need to worry about that
:return: boolean
One faile returns false, but the downloaded should log his own errors
"""
if not media: media = {}
if not data: data = {}
directory = self.conf('directory')
# The folder needs to exist
if not directory or not os.path.isdir(directory):
log.error('No directory set for blackhole %s download.', data.get('protocol'))
else:
try:
# Filedata can be empty, which probably means it a magnet link
if not filedata or len(filedata) < 50:
try:
if data.get('protocol') == 'torrent_magnet':
filedata = self.magnetToTorrent(data.get('url'))
data['protocol'] = 'torrent'
except:
log.error('Failed download torrent via magnet url: %s', traceback.format_exc())
# If it's still empty, either write the magnet link to a .magnet file, or error out.
if not filedata or len(filedata) < 50:
if self.conf('magnet_file'):
filedata = data.get('url') + '\n'
data['protocol'] = 'magnet'
else:
log.error('No nzb/torrent available: %s', data.get('url'))
return False
# Create filename with imdb id and other nice stuff
file_name = self.createFileName(data, filedata, media)
full_path = os.path.join(directory, file_name)
# People want thinks nice and tidy, create a subdir
if self.conf('create_subdir'):
try:
new_path = os.path.splitext(full_path)[0]
if not os.path.exists(new_path):
os.makedirs(new_path)
full_path = os.path.join(new_path, file_name)
except:
log.error('Couldnt create sub dir, reverting to old one: %s', full_path)
try:
# Make sure the file doesn't exist yet, no need in overwriting it
if not os.path.isfile(full_path):
log.info('Downloading %s to %s.', (data.get('protocol'), full_path))
with open(full_path, 'wb') as f:
f.write(filedata)
os.chmod(full_path, Env.getPermission('file'))
return self.downloadReturnId('')
else:
log.info('File %s already exists.', full_path)
return self.downloadReturnId('')
except:
log.error('Failed to download to blackhole %s', traceback.format_exc())
pass
except:
log.info('Failed to download file %s: %s', (data.get('name'), traceback.format_exc()))
return False
return False
def test(self):
""" Test and see if the directory is writable
:return: boolean
"""
directory = self.conf('directory')
if directory and os.path.isdir(directory):
test_file = sp(os.path.join(directory, 'couchpotato_test.txt'))
# Check if folder is writable
self.createFile(test_file, 'This is a test file')
if os.path.isfile(test_file):
os.remove(test_file)
return True
return False
def getEnabledProtocol(self):
""" What protocols is this downloaded used for
:return: list with protocols
"""
if self.conf('use_for') == 'both':
return super(Blackhole, self).getEnabledProtocol()
elif self.conf('use_for') == 'torrent':
return ['torrent', 'torrent_magnet']
else:
return ['nzb']
def isEnabled(self, manual = False, data = None):
""" Check if protocol is used (and enabled)
:param manual: The user has clicked to download a link through the webUI
:param data: dict returned from provider
Contains the release information
:return: boolean
"""
if not data: data = {}
for_protocol = ['both']
if data and 'torrent' in data.get('protocol'):
for_protocol.append('torrent')
elif data:
for_protocol.append(data.get('protocol'))
return super(Blackhole, self).isEnabled(manual, data) and \
((self.conf('use_for') in for_protocol))
config = [{
'name': 'blackhole',
'order': 30,
'groups': [
{
'tab': 'downloaders',
'list': 'download_providers',
'name': 'blackhole',
'label': 'Black hole',
'description': 'Download the NZB/Torrent to a specific folder. <em>Note: Seeding and copying/linking features do <strong>not</strong> work with Black hole</em>.',
'wizard': True,
'options': [
{
'name': 'enabled',
'default': True,
'type': 'enabler',
'radio_group': 'nzb,torrent',
},
{
'name': 'directory',
'type': 'directory',
'description': 'Directory where the .nzb (or .torrent) file is saved to.',
'default': getDownloadDir()
},
{
'name': 'use_for',
'label': 'Use for',
'default': 'both',
'type': 'dropdown',
'values': [('usenet & torrents', 'both'), ('usenet', 'nzb'), ('torrent', 'torrent')],
},
{
'name': 'create_subdir',
'default': 0,
'type': 'bool',
'advanced': True,
'description': 'Create a sub directory when saving the .nzb (or .torrent).',
},
{
'name': 'manual',
'default': 0,
'type': 'bool',
'advanced': True,
'description': 'Disable this downloader for automated searches, but use it when I manually send a release.',
},
{
'name': 'magnet_file',
'default': 0,
'type': 'bool',
'advanced': True,
'description': 'If magnet file conversion fails, write down the magnet link in a .magnet file instead.',
},
],
}
],
}]
| gpl-3.0 | 7,443,131,134,431,184,000 | 2,276,663,764,224,812,800 | 37.726829 | 174 | 0.498803 | false |
raumfeld/linux-am33xx | tools/testing/selftests/tc-testing/plugin-lib/valgrindPlugin.py | 91 | 5020 | '''
run the command under test, under valgrind and collect memory leak info
as a separate test.
'''
import os
import re
import signal
from string import Template
import subprocess
import time
from TdcPlugin import TdcPlugin
from tdc_config import *
def vp_extract_num_from_string(num_as_string_maybe_with_commas):
return int(num_as_string_maybe_with_commas.replace(',',''))
class SubPlugin(TdcPlugin):
def __init__(self):
self.sub_class = 'valgrind/SubPlugin'
self.tap = ''
super().__init__()
def pre_suite(self, testcount, testidlist):
'''run commands before test_runner goes into a test loop'''
super().pre_suite(testcount, testidlist)
if self.args.verbose > 1:
print('{}.pre_suite'.format(self.sub_class))
if self.args.valgrind:
self._add_to_tap('1..{}\n'.format(self.testcount))
def post_suite(self, index):
'''run commands after test_runner goes into a test loop'''
super().post_suite(index)
self._add_to_tap('\n|---\n')
if self.args.verbose > 1:
print('{}.post_suite'.format(self.sub_class))
print('{}'.format(self.tap))
if self.args.verbose < 4:
subprocess.check_output('rm -f vgnd-*.log', shell=True)
def add_args(self, parser):
super().add_args(parser)
self.argparser_group = self.argparser.add_argument_group(
'valgrind',
'options for valgrindPlugin (run command under test under Valgrind)')
self.argparser_group.add_argument(
'-V', '--valgrind', action='store_true',
help='Run commands under valgrind')
return self.argparser
def adjust_command(self, stage, command):
super().adjust_command(stage, command)
cmdform = 'list'
cmdlist = list()
if not self.args.valgrind:
return command
if self.args.verbose > 1:
print('{}.adjust_command'.format(self.sub_class))
if not isinstance(command, list):
cmdform = 'str'
cmdlist = command.split()
else:
cmdlist = command
if stage == 'execute':
if self.args.verbose > 1:
print('adjust_command: stage is {}; inserting valgrind stuff in command [{}] list [{}]'.
format(stage, command, cmdlist))
cmdlist.insert(0, '--track-origins=yes')
cmdlist.insert(0, '--show-leak-kinds=definite,indirect')
cmdlist.insert(0, '--leak-check=full')
cmdlist.insert(0, '--log-file=vgnd-{}.log'.format(self.args.testid))
cmdlist.insert(0, '-v') # ask for summary of non-leak errors
cmdlist.insert(0, ENVIR['VALGRIND_BIN'])
else:
pass
if cmdform == 'str':
command = ' '.join(cmdlist)
else:
command = cmdlist
if self.args.verbose > 1:
print('adjust_command: return command [{}]'.format(command))
return command
def post_execute(self):
if not self.args.valgrind:
return
self.definitely_lost_re = re.compile(
r'definitely lost:\s+([,0-9]+)\s+bytes in\s+([,0-9]+)\sblocks', re.MULTILINE | re.DOTALL)
self.indirectly_lost_re = re.compile(
r'indirectly lost:\s+([,0-9]+)\s+bytes in\s+([,0-9]+)\s+blocks', re.MULTILINE | re.DOTALL)
self.possibly_lost_re = re.compile(
r'possibly lost:\s+([,0-9]+)bytes in\s+([,0-9]+)\s+blocks', re.MULTILINE | re.DOTALL)
self.non_leak_error_re = re.compile(
r'ERROR SUMMARY:\s+([,0-9]+) errors from\s+([,0-9]+)\s+contexts', re.MULTILINE | re.DOTALL)
def_num = 0
ind_num = 0
pos_num = 0
nle_num = 0
# what about concurrent test runs? Maybe force them to be in different directories?
with open('vgnd-{}.log'.format(self.args.testid)) as vfd:
content = vfd.read()
def_mo = self.definitely_lost_re.search(content)
ind_mo = self.indirectly_lost_re.search(content)
pos_mo = self.possibly_lost_re.search(content)
nle_mo = self.non_leak_error_re.search(content)
if def_mo:
def_num = int(def_mo.group(2))
if ind_mo:
ind_num = int(ind_mo.group(2))
if pos_mo:
pos_num = int(pos_mo.group(2))
if nle_mo:
nle_num = int(nle_mo.group(1))
mem_results = ''
if (def_num > 0) or (ind_num > 0) or (pos_num > 0) or (nle_num > 0):
mem_results += 'not '
mem_results += 'ok {} - {}-mem # {}\n'.format(
self.args.test_ordinal, self.args.testid, 'memory leak check')
self._add_to_tap(mem_results)
if mem_results.startswith('not '):
print('{}'.format(content))
self._add_to_tap(content)
def _add_to_tap(self, more_tap_output):
self.tap += more_tap_output
| gpl-2.0 | -3,867,278,885,284,223,500 | 450,372,944,048,186,300 | 34.352113 | 105 | 0.559363 | false |
anrl/gini3 | backend/src/gloader/xml/dom/html/HTMLUListElement.py | 10 | 1612 | ########################################################################
#
# File Name: HTMLUListElement
#
#
### This file is automatically generated by GenerateHtml.py.
### DO NOT EDIT!
"""
WWW: http://4suite.com/4DOM e-mail: [email protected]
Copyright (c) 2000 Fourthought Inc, USA. All Rights Reserved.
See http://4suite.com/COPYRIGHT for license and copyright information
"""
import string
from xml.dom import Node
from xml.dom.html.HTMLElement import HTMLElement
class HTMLUListElement(HTMLElement):
def __init__(self, ownerDocument, nodeName="UL"):
HTMLElement.__init__(self, ownerDocument, nodeName)
### Attribute Methods ###
def _get_compact(self):
return self.hasAttribute("COMPACT")
def _set_compact(self, value):
if value:
self.setAttribute("COMPACT", "COMPACT")
else:
self.removeAttribute("COMPACT")
def _get_type(self):
return string.capitalize(self.getAttribute("TYPE"))
def _set_type(self, value):
self.setAttribute("TYPE", value)
### Attribute Access Mappings ###
_readComputedAttrs = HTMLElement._readComputedAttrs.copy()
_readComputedAttrs.update({
"compact" : _get_compact,
"type" : _get_type
})
_writeComputedAttrs = HTMLElement._writeComputedAttrs.copy()
_writeComputedAttrs.update({
"compact" : _set_compact,
"type" : _set_type
})
_readOnlyAttrs = filter(lambda k,m=_writeComputedAttrs: not m.has_key(k),
HTMLElement._readOnlyAttrs + _readComputedAttrs.keys())
| mit | 6,393,575,641,915,644,000 | 8,138,789,823,678,723,000 | 26.793103 | 77 | 0.611663 | false |
MalloyPower/parsing-python | front-end/testsuite-python-lib/Python-2.7/Lib/distutils/tests/test_build_py.py | 2 | 4009 | """Tests for distutils.command.build_py."""
import os
import sys
import StringIO
import unittest
from distutils.command.build_py import build_py
from distutils.core import Distribution
from distutils.errors import DistutilsFileError
from distutils.tests import support
class BuildPyTestCase(support.TempdirManager,
support.LoggingSilencer,
unittest.TestCase):
def _setup_package_data(self):
sources = self.mkdtemp()
f = open(os.path.join(sources, "__init__.py"), "w")
f.write("# Pretend this is a package.")
f.close()
f = open(os.path.join(sources, "README.txt"), "w")
f.write("Info about this package")
f.close()
destination = self.mkdtemp()
dist = Distribution({"packages": ["pkg"],
"package_dir": {"pkg": sources}})
# script_name need not exist, it just need to be initialized
dist.script_name = os.path.join(sources, "setup.py")
dist.command_obj["build"] = support.DummyCommand(
force=0,
build_lib=destination)
dist.packages = ["pkg"]
dist.package_data = {"pkg": ["README.txt"]}
dist.package_dir = {"pkg": sources}
cmd = build_py(dist)
cmd.compile = 1
cmd.ensure_finalized()
self.assertEqual(cmd.package_data, dist.package_data)
cmd.run()
# This makes sure the list of outputs includes byte-compiled
# files for Python modules but not for package data files
# (there shouldn't *be* byte-code files for those!).
#
self.assertEqual(len(cmd.get_outputs()), 3)
pkgdest = os.path.join(destination, "pkg")
files = os.listdir(pkgdest)
return files
def test_package_data(self):
files = self._setup_package_data()
self.assertTrue("__init__.py" in files)
self.assertTrue("README.txt" in files)
@unittest.skipIf(sys.flags.optimize >= 2,
"pyc files are not written with -O2 and above")
def test_package_data_pyc(self):
files = self._setup_package_data()
self.assertTrue("__init__.pyc" in files)
def test_empty_package_dir (self):
# See SF 1668596/1720897.
cwd = os.getcwd()
# create the distribution files.
sources = self.mkdtemp()
open(os.path.join(sources, "__init__.py"), "w").close()
testdir = os.path.join(sources, "doc")
os.mkdir(testdir)
open(os.path.join(testdir, "testfile"), "w").close()
os.chdir(sources)
old_stdout = sys.stdout
sys.stdout = StringIO.StringIO()
try:
dist = Distribution({"packages": ["pkg"],
"package_dir": {"pkg": ""},
"package_data": {"pkg": ["doc/*"]}})
# script_name need not exist, it just need to be initialized
dist.script_name = os.path.join(sources, "setup.py")
dist.script_args = ["build"]
dist.parse_command_line()
try:
dist.run_commands()
except DistutilsFileError:
self.fail("failed package_data test when package_dir is ''")
finally:
# Restore state.
os.chdir(cwd)
sys.stdout = old_stdout
def test_dont_write_bytecode(self):
# makes sure byte_compile is not used
pkg_dir, dist = self.create_dist()
cmd = build_py(dist)
cmd.compile = 1
cmd.optimize = 1
old_dont_write_bytecode = sys.dont_write_bytecode
sys.dont_write_bytecode = True
try:
cmd.byte_compile([])
finally:
sys.dont_write_bytecode = old_dont_write_bytecode
self.assertTrue('byte-compiling is disabled' in self.logs[0][1])
def test_suite():
return unittest.makeSuite(BuildPyTestCase)
if __name__ == "__main__":
unittest.main(defaultTest="test_suite")
| mit | -9,096,466,654,134,595,000 | 7,598,304,190,159,830,000 | 31.860656 | 76 | 0.571714 | false |
pattywgm/funny-spider | douban/douban/spiders/movie_awards.py | 1 | 2888 | #!/usr/bin/env python
# encoding: utf-8
"""
@version: 1.0
@file: movie_awards.py
@time: 17/10/19 下午10:35
@desc: 电影获奖数据抓取
28items/每分钟 被ban
"""
import re
from copy import deepcopy
from os.path import exists
import scrapy
from douban.items import AwardsItem
from douban.utils.my_utils import load_obj, replace_dot
_META_VERSION = 'v1.0'
_AWARDS = 'https://movie.douban.com/subject/{}/awards/'
class MovieAwards(scrapy.Spider):
name = 'movie_awards'
meta_version = _META_VERSION
def __init__(self):
"""
:param urls:
:param done: 已经抓取完成的,用于断点续爬
:return:
"""
self.urls = load_obj('./records/urls.pkl')
self.done = list()
if exists('./records/{}_done.pkl'.format(self.name)):
self.done = load_obj('./records/{}_done.pkl'.format(self.name))
self.new_done = deepcopy(self.done)
def start_requests(self):
req = list()
for url in self.urls:
movie_code = re.findall('\d+', url)[0]
award_url = _AWARDS.format(movie_code)
if award_url not in self.done:
req.append(scrapy.Request(award_url, callback=self.parse, meta={'movie_code': movie_code}))
return req
def parse(self, response):
url = response.url
self.logger.info('Crawl {}'.format(url))
item = AwardsItem()
item['url'] = url
item['movie_code'] = response.meta['movie_code']
award_divs = response.xpath('//div[@class="awards"]')
item['awards'] = [self.parse_award_detail(div) for div in award_divs]
yield item
def parse_award_detail(self, award_div):
"""
解析获奖详细信息
:param award_div:
:return:
"""
award_detail = dict()
# 颁奖方及年份
url = award_div.xpath('.//h2/a/@href').extract_first()
name = award_div.xpath('.//h2/a/text()').extract_first()
year = award_div.xpath('.//h2/span/text()').extract_first().replace('(', '').replace(')', '').strip()
award_detail.update({'award_provider': {name: url}, 'year': year})
# 具体奖项名及获奖者
awards = list()
for ul in award_div.xpath('.//ul[@class="award"]'):
award_name = ul.xpath('./li[1]/text()').extract_first()
award_persons = list()
for person in ul.xpath('./li[position()>1]'):
if person.xpath('./a').extract_first() is None:
break
p_name = replace_dot(person.xpath('./a/text()').extract())
p_url = person.xpath('./a/@href').extract()
award_persons.append(dict(zip(p_name, p_url)))
awards.append({award_name: award_persons})
award_detail.update({'awards': awards})
return award_detail
| gpl-3.0 | -2,227,688,473,456,753,000 | 6,294,987,170,341,327,000 | 31.8 | 109 | 0.558465 | false |
flyfei/python-for-android | python3-alpha/python3-src/Tools/scripts/ftpmirror.py | 49 | 13088 | #! /usr/bin/env python3
"""Mirror a remote ftp subtree into a local directory tree.
usage: ftpmirror [-v] [-q] [-i] [-m] [-n] [-r] [-s pat]
[-l username [-p passwd [-a account]]]
hostname[:port] [remotedir [localdir]]
-v: verbose
-q: quiet
-i: interactive mode
-m: macintosh server (NCSA telnet 2.4) (implies -n -s '*.o')
-n: don't log in
-r: remove local files/directories no longer pertinent
-l username [-p passwd [-a account]]: login info (default .netrc or anonymous)
-s pat: skip files matching pattern
hostname: remote host w/ optional port separated by ':'
remotedir: remote directory (default initial)
localdir: local directory (default current)
"""
import os
import sys
import time
import getopt
import ftplib
import netrc
from fnmatch import fnmatch
# Print usage message and exit
def usage(*args):
sys.stdout = sys.stderr
for msg in args: print(msg)
print(__doc__)
sys.exit(2)
verbose = 1 # 0 for -q, 2 for -v
interactive = 0
mac = 0
rmok = 0
nologin = 0
skippats = ['.', '..', '.mirrorinfo']
# Main program: parse command line and start processing
def main():
global verbose, interactive, mac, rmok, nologin
try:
opts, args = getopt.getopt(sys.argv[1:], 'a:bil:mnp:qrs:v')
except getopt.error as msg:
usage(msg)
login = ''
passwd = ''
account = ''
if not args: usage('hostname missing')
host = args[0]
port = 0
if ':' in host:
host, port = host.split(':', 1)
port = int(port)
try:
auth = netrc.netrc().authenticators(host)
if auth is not None:
login, account, passwd = auth
except (netrc.NetrcParseError, IOError):
pass
for o, a in opts:
if o == '-l': login = a
if o == '-p': passwd = a
if o == '-a': account = a
if o == '-v': verbose = verbose + 1
if o == '-q': verbose = 0
if o == '-i': interactive = 1
if o == '-m': mac = 1; nologin = 1; skippats.append('*.o')
if o == '-n': nologin = 1
if o == '-r': rmok = 1
if o == '-s': skippats.append(a)
remotedir = ''
localdir = ''
if args[1:]:
remotedir = args[1]
if args[2:]:
localdir = args[2]
if args[3:]: usage('too many arguments')
#
f = ftplib.FTP()
if verbose: print("Connecting to '%s%s'..." % (host,
(port and ":%d"%port or "")))
f.connect(host,port)
if not nologin:
if verbose:
print('Logging in as %r...' % (login or 'anonymous'))
f.login(login, passwd, account)
if verbose: print('OK.')
pwd = f.pwd()
if verbose > 1: print('PWD =', repr(pwd))
if remotedir:
if verbose > 1: print('cwd(%s)' % repr(remotedir))
f.cwd(remotedir)
if verbose > 1: print('OK.')
pwd = f.pwd()
if verbose > 1: print('PWD =', repr(pwd))
#
mirrorsubdir(f, localdir)
# Core logic: mirror one subdirectory (recursively)
def mirrorsubdir(f, localdir):
pwd = f.pwd()
if localdir and not os.path.isdir(localdir):
if verbose: print('Creating local directory', repr(localdir))
try:
makedir(localdir)
except os.error as msg:
print("Failed to establish local directory", repr(localdir))
return
infofilename = os.path.join(localdir, '.mirrorinfo')
try:
text = open(infofilename, 'r').read()
except IOError as msg:
text = '{}'
try:
info = eval(text)
except (SyntaxError, NameError):
print('Bad mirror info in', repr(infofilename))
info = {}
subdirs = []
listing = []
if verbose: print('Listing remote directory %r...' % (pwd,))
f.retrlines('LIST', listing.append)
filesfound = []
for line in listing:
if verbose > 1: print('-->', repr(line))
if mac:
# Mac listing has just filenames;
# trailing / means subdirectory
filename = line.strip()
mode = '-'
if filename[-1:] == '/':
filename = filename[:-1]
mode = 'd'
infostuff = ''
else:
# Parse, assuming a UNIX listing
words = line.split(None, 8)
if len(words) < 6:
if verbose > 1: print('Skipping short line')
continue
filename = words[-1].lstrip()
i = filename.find(" -> ")
if i >= 0:
# words[0] had better start with 'l'...
if verbose > 1:
print('Found symbolic link %r' % (filename,))
linkto = filename[i+4:]
filename = filename[:i]
infostuff = words[-5:-1]
mode = words[0]
skip = 0
for pat in skippats:
if fnmatch(filename, pat):
if verbose > 1:
print('Skip pattern', repr(pat), end=' ')
print('matches', repr(filename))
skip = 1
break
if skip:
continue
if mode[0] == 'd':
if verbose > 1:
print('Remembering subdirectory', repr(filename))
subdirs.append(filename)
continue
filesfound.append(filename)
if filename in info and info[filename] == infostuff:
if verbose > 1:
print('Already have this version of',repr(filename))
continue
fullname = os.path.join(localdir, filename)
tempname = os.path.join(localdir, '@'+filename)
if interactive:
doit = askabout('file', filename, pwd)
if not doit:
if filename not in info:
info[filename] = 'Not retrieved'
continue
try:
os.unlink(tempname)
except os.error:
pass
if mode[0] == 'l':
if verbose:
print("Creating symlink %r -> %r" % (filename, linkto))
try:
os.symlink(linkto, tempname)
except IOError as msg:
print("Can't create %r: %s" % (tempname, msg))
continue
else:
try:
fp = open(tempname, 'wb')
except IOError as msg:
print("Can't create %r: %s" % (tempname, msg))
continue
if verbose:
print('Retrieving %r from %r as %r...' % (filename, pwd, fullname))
if verbose:
fp1 = LoggingFile(fp, 1024, sys.stdout)
else:
fp1 = fp
t0 = time.time()
try:
f.retrbinary('RETR ' + filename,
fp1.write, 8*1024)
except ftplib.error_perm as msg:
print(msg)
t1 = time.time()
bytes = fp.tell()
fp.close()
if fp1 != fp:
fp1.close()
try:
os.unlink(fullname)
except os.error:
pass # Ignore the error
try:
os.rename(tempname, fullname)
except os.error as msg:
print("Can't rename %r to %r: %s" % (tempname, fullname, msg))
continue
info[filename] = infostuff
writedict(info, infofilename)
if verbose and mode[0] != 'l':
dt = t1 - t0
kbytes = bytes / 1024.0
print(int(round(kbytes)), end=' ')
print('Kbytes in', end=' ')
print(int(round(dt)), end=' ')
print('seconds', end=' ')
if t1 > t0:
print('(~%d Kbytes/sec)' % \
int(round(kbytes/dt),))
print()
#
# Remove files from info that are no longer remote
deletions = 0
for filename in list(info.keys()):
if filename not in filesfound:
if verbose:
print("Removing obsolete info entry for", end=' ')
print(repr(filename), "in", repr(localdir or "."))
del info[filename]
deletions = deletions + 1
if deletions:
writedict(info, infofilename)
#
# Remove local files that are no longer in the remote directory
try:
if not localdir: names = os.listdir(os.curdir)
else: names = os.listdir(localdir)
except os.error:
names = []
for name in names:
if name[0] == '.' or name in info or name in subdirs:
continue
skip = 0
for pat in skippats:
if fnmatch(name, pat):
if verbose > 1:
print('Skip pattern', repr(pat), end=' ')
print('matches', repr(name))
skip = 1
break
if skip:
continue
fullname = os.path.join(localdir, name)
if not rmok:
if verbose:
print('Local file', repr(fullname), end=' ')
print('is no longer pertinent')
continue
if verbose: print('Removing local file/dir', repr(fullname))
remove(fullname)
#
# Recursively mirror subdirectories
for subdir in subdirs:
if interactive:
doit = askabout('subdirectory', subdir, pwd)
if not doit: continue
if verbose: print('Processing subdirectory', repr(subdir))
localsubdir = os.path.join(localdir, subdir)
pwd = f.pwd()
if verbose > 1:
print('Remote directory now:', repr(pwd))
print('Remote cwd', repr(subdir))
try:
f.cwd(subdir)
except ftplib.error_perm as msg:
print("Can't chdir to", repr(subdir), ":", repr(msg))
else:
if verbose: print('Mirroring as', repr(localsubdir))
mirrorsubdir(f, localsubdir)
if verbose > 1: print('Remote cwd ..')
f.cwd('..')
newpwd = f.pwd()
if newpwd != pwd:
print('Ended up in wrong directory after cd + cd ..')
print('Giving up now.')
break
else:
if verbose > 1: print('OK.')
# Helper to remove a file or directory tree
def remove(fullname):
if os.path.isdir(fullname) and not os.path.islink(fullname):
try:
names = os.listdir(fullname)
except os.error:
names = []
ok = 1
for name in names:
if not remove(os.path.join(fullname, name)):
ok = 0
if not ok:
return 0
try:
os.rmdir(fullname)
except os.error as msg:
print("Can't remove local directory %r: %s" % (fullname, msg))
return 0
else:
try:
os.unlink(fullname)
except os.error as msg:
print("Can't remove local file %r: %s" % (fullname, msg))
return 0
return 1
# Wrapper around a file for writing to write a hash sign every block.
class LoggingFile:
def __init__(self, fp, blocksize, outfp):
self.fp = fp
self.bytes = 0
self.hashes = 0
self.blocksize = blocksize
self.outfp = outfp
def write(self, data):
self.bytes = self.bytes + len(data)
hashes = int(self.bytes) / self.blocksize
while hashes > self.hashes:
self.outfp.write('#')
self.outfp.flush()
self.hashes = self.hashes + 1
self.fp.write(data)
def close(self):
self.outfp.write('\n')
def raw_input(prompt):
sys.stdout.write(prompt)
sys.stdout.flush()
return sys.stdin.readline()
# Ask permission to download a file.
def askabout(filetype, filename, pwd):
prompt = 'Retrieve %s %s from %s ? [ny] ' % (filetype, filename, pwd)
while 1:
reply = raw_input(prompt).strip().lower()
if reply in ['y', 'ye', 'yes']:
return 1
if reply in ['', 'n', 'no', 'nop', 'nope']:
return 0
print('Please answer yes or no.')
# Create a directory if it doesn't exist. Recursively create the
# parent directory as well if needed.
def makedir(pathname):
if os.path.isdir(pathname):
return
dirname = os.path.dirname(pathname)
if dirname: makedir(dirname)
os.mkdir(pathname, 0o777)
# Write a dictionary to a file in a way that can be read back using
# rval() but is still somewhat readable (i.e. not a single long line).
# Also creates a backup file.
def writedict(dict, filename):
dir, fname = os.path.split(filename)
tempname = os.path.join(dir, '@' + fname)
backup = os.path.join(dir, fname + '~')
try:
os.unlink(backup)
except os.error:
pass
fp = open(tempname, 'w')
fp.write('{\n')
for key, value in dict.items():
fp.write('%r: %r,\n' % (key, value))
fp.write('}\n')
fp.close()
try:
os.rename(filename, backup)
except os.error:
pass
os.rename(tempname, filename)
if __name__ == '__main__':
main()
| apache-2.0 | -2,547,684,502,536,393,700 | -5,162,680,158,401,872,000 | 31.316049 | 83 | 0.516733 | false |
SlimRoms/android_external_chromium_org | build/mac/tweak_info_plist.py | 42 | 10163 | #!/usr/bin/env python
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Xcode supports build variable substitutions and CPP; sadly, that doesn't work
# because:
#
# 1. Xcode wants to do the Info.plist work before it runs any build phases,
# this means if we were to generate a .h file for INFOPLIST_PREFIX_HEADER
# we'd have to put it in another target so it runs in time.
# 2. Xcode also doesn't check to see if the header being used as a prefix for
# the Info.plist has changed. So even if we updated it, it's only looking
# at the modtime of the info.plist to see if that's changed.
#
# So, we work around all of this by making a script build phase that will run
# during the app build, and simply update the info.plist in place. This way
# by the time the app target is done, the info.plist is correct.
#
import optparse
import os
from os import environ as env
import plistlib
import re
import subprocess
import sys
import tempfile
TOP = os.path.join(env['SRCROOT'], '..')
def _GetOutput(args):
"""Runs a subprocess and waits for termination. Returns (stdout, returncode)
of the process. stderr is attached to the parent."""
proc = subprocess.Popen(args, stdout=subprocess.PIPE)
(stdout, stderr) = proc.communicate()
return (stdout, proc.returncode)
def _GetOutputNoError(args):
"""Similar to _GetOutput() but ignores stderr. If there's an error launching
the child (like file not found), the exception will be caught and (None, 1)
will be returned to mimic quiet failure."""
try:
proc = subprocess.Popen(args, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
except OSError:
return (None, 1)
(stdout, stderr) = proc.communicate()
return (stdout, proc.returncode)
def _RemoveKeys(plist, *keys):
"""Removes a varargs of keys from the plist."""
for key in keys:
try:
del plist[key]
except KeyError:
pass
def _AddVersionKeys(plist, version=None):
"""Adds the product version number into the plist. Returns True on success and
False on error. The error will be printed to stderr."""
if version:
match = re.match('\d+\.\d+\.(\d+\.\d+)$', version)
if not match:
print >>sys.stderr, 'Invalid version string specified: "%s"' % version
return False
full_version = match.group(0)
bundle_version = match.group(1)
else:
# Pull in the Chrome version number.
VERSION_TOOL = os.path.join(TOP, 'build/util/version.py')
VERSION_FILE = os.path.join(TOP, 'chrome/VERSION')
(stdout, retval1) = _GetOutput([VERSION_TOOL, '-f', VERSION_FILE, '-t',
'@MAJOR@.@MINOR@.@BUILD@.@PATCH@'])
full_version = stdout.rstrip()
(stdout, retval2) = _GetOutput([VERSION_TOOL, '-f', VERSION_FILE, '-t',
'@BUILD@.@PATCH@'])
bundle_version = stdout.rstrip()
# If either of the two version commands finished with non-zero returncode,
# report the error up.
if retval1 or retval2:
return False
# Add public version info so "Get Info" works.
plist['CFBundleShortVersionString'] = full_version
# Honor the 429496.72.95 limit. The maximum comes from splitting 2^32 - 1
# into 6, 2, 2 digits. The limitation was present in Tiger, but it could
# have been fixed in later OS release, but hasn't been tested (it's easy
# enough to find out with "lsregister -dump).
# http://lists.apple.com/archives/carbon-dev/2006/Jun/msg00139.html
# BUILD will always be an increasing value, so BUILD_PATH gives us something
# unique that meetings what LS wants.
plist['CFBundleVersion'] = bundle_version
# Return with no error.
return True
def _DoSCMKeys(plist, add_keys):
"""Adds the SCM information, visible in about:version, to property list. If
|add_keys| is True, it will insert the keys, otherwise it will remove them."""
scm_revision = None
if add_keys:
# Pull in the Chrome revision number.
VERSION_TOOL = os.path.join(TOP, 'build/util/version.py')
LASTCHANGE_FILE = os.path.join(TOP, 'build/util/LASTCHANGE')
(stdout, retval) = _GetOutput([VERSION_TOOL, '-f', LASTCHANGE_FILE, '-t',
'@LASTCHANGE@'])
if retval:
return False
scm_revision = stdout.rstrip()
# See if the operation failed.
_RemoveKeys(plist, 'SCMRevision')
if scm_revision != None:
plist['SCMRevision'] = scm_revision
elif add_keys:
print >>sys.stderr, 'Could not determine SCM revision. This may be OK.'
return True
def _AddBreakpadKeys(plist, branding):
"""Adds the Breakpad keys. This must be called AFTER _AddVersionKeys() and
also requires the |branding| argument."""
plist['BreakpadReportInterval'] = '3600' # Deliberately a string.
plist['BreakpadProduct'] = '%s_Mac' % branding
plist['BreakpadProductDisplay'] = branding
plist['BreakpadVersion'] = plist['CFBundleShortVersionString']
# These are both deliberately strings and not boolean.
plist['BreakpadSendAndExit'] = 'YES'
plist['BreakpadSkipConfirm'] = 'YES'
def _RemoveBreakpadKeys(plist):
"""Removes any set Breakpad keys."""
_RemoveKeys(plist,
'BreakpadURL',
'BreakpadReportInterval',
'BreakpadProduct',
'BreakpadProductDisplay',
'BreakpadVersion',
'BreakpadSendAndExit',
'BreakpadSkipConfirm')
def _TagSuffixes():
# Keep this list sorted in the order that tag suffix components are to
# appear in a tag value. That is to say, it should be sorted per ASCII.
components = ('32bit', 'full')
assert tuple(sorted(components)) == components
components_len = len(components)
combinations = 1 << components_len
tag_suffixes = []
for combination in xrange(0, combinations):
tag_suffix = ''
for component_index in xrange(0, components_len):
if combination & (1 << component_index):
tag_suffix += '-' + components[component_index]
tag_suffixes.append(tag_suffix)
return tag_suffixes
def _AddKeystoneKeys(plist, bundle_identifier):
"""Adds the Keystone keys. This must be called AFTER _AddVersionKeys() and
also requires the |bundle_identifier| argument (com.example.product)."""
plist['KSVersion'] = plist['CFBundleShortVersionString']
plist['KSProductID'] = bundle_identifier
plist['KSUpdateURL'] = 'https://tools.google.com/service/update2'
_RemoveKeys(plist, 'KSChannelID')
for tag_suffix in _TagSuffixes():
if tag_suffix:
plist['KSChannelID' + tag_suffix] = tag_suffix
def _RemoveKeystoneKeys(plist):
"""Removes any set Keystone keys."""
_RemoveKeys(plist,
'KSVersion',
'KSProductID',
'KSUpdateURL')
tag_keys = []
for tag_suffix in _TagSuffixes():
tag_keys.append('KSChannelID' + tag_suffix)
_RemoveKeys(plist, *tag_keys)
def Main(argv):
parser = optparse.OptionParser('%prog [options]')
parser.add_option('--breakpad', dest='use_breakpad', action='store',
type='int', default=False, help='Enable Breakpad [1 or 0]')
parser.add_option('--breakpad_uploads', dest='breakpad_uploads',
action='store', type='int', default=False,
help='Enable Breakpad\'s uploading of crash dumps [1 or 0]')
parser.add_option('--keystone', dest='use_keystone', action='store',
type='int', default=False, help='Enable Keystone [1 or 0]')
parser.add_option('--scm', dest='add_scm_info', action='store', type='int',
default=True, help='Add SCM metadata [1 or 0]')
parser.add_option('--branding', dest='branding', action='store',
type='string', default=None, help='The branding of the binary')
parser.add_option('--bundle_id', dest='bundle_identifier',
action='store', type='string', default=None,
help='The bundle id of the binary')
parser.add_option('--version', dest='version', action='store', type='string',
default=None, help='The version string [major.minor.build.patch]')
(options, args) = parser.parse_args(argv)
if len(args) > 0:
print >>sys.stderr, parser.get_usage()
return 1
# Read the plist into its parsed format.
DEST_INFO_PLIST = os.path.join(env['TARGET_BUILD_DIR'], env['INFOPLIST_PATH'])
plist = plistlib.readPlist(DEST_INFO_PLIST)
# Insert the product version.
if not _AddVersionKeys(plist, version=options.version):
return 2
# Add Breakpad if configured to do so.
if options.use_breakpad:
if options.branding is None:
print >>sys.stderr, 'Use of Breakpad requires branding.'
return 1
_AddBreakpadKeys(plist, options.branding)
if options.breakpad_uploads:
plist['BreakpadURL'] = 'https://clients2.google.com/cr/report'
else:
# This allows crash dumping to a file without uploading the
# dump, for testing purposes. Breakpad does not recognise
# "none" as a special value, but this does stop crash dump
# uploading from happening. We need to specify something
# because if "BreakpadURL" is not present, Breakpad will not
# register its crash handler and no crash dumping will occur.
plist['BreakpadURL'] = 'none'
else:
_RemoveBreakpadKeys(plist)
# Only add Keystone in Release builds.
if options.use_keystone and env['CONFIGURATION'] == 'Release':
if options.bundle_identifier is None:
print >>sys.stderr, 'Use of Keystone requires the bundle id.'
return 1
_AddKeystoneKeys(plist, options.bundle_identifier)
else:
_RemoveKeystoneKeys(plist)
# Adds or removes any SCM keys.
if not _DoSCMKeys(plist, options.add_scm_info):
return 3
# Now that all keys have been mutated, rewrite the file.
temp_info_plist = tempfile.NamedTemporaryFile()
plistlib.writePlist(plist, temp_info_plist.name)
# Info.plist will work perfectly well in any plist format, but traditionally
# applications use xml1 for this, so convert it to ensure that it's valid.
proc = subprocess.Popen(['plutil', '-convert', 'xml1', '-o', DEST_INFO_PLIST,
temp_info_plist.name])
proc.wait()
return proc.returncode
if __name__ == '__main__':
sys.exit(Main(sys.argv[1:]))
| bsd-3-clause | 2,460,243,211,393,696,300 | -5,970,124,687,744,617,000 | 35.296429 | 80 | 0.681 | false |
bclau/nova | nova/virt/powervm/lpar.py | 11 | 5106 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""PowerVM Logical Partition (LPAR)
PowerVM LPAR configuration attributes.
"""
import shlex
from nova.openstack.common.gettextutils import _
from nova.openstack.common import log as logging
from nova.virt.powervm import exception
LOG = logging.getLogger(__name__)
def load_from_conf_data(conf_data):
"""LPAR configuration data parser.
The configuration data is a string representation of
the attributes of a Logical Partition. The attributes
consists of name/value pairs, which are in command separated
value format.
Example format: name=lpar_name,lpar_id=1,lpar_env=aixlinux
:param conf_data: string containing the LPAR configuration data.
:returns: LPAR -- LPAR object.
"""
# config_data can contain comma separated values within
# double quotes, example: virtual_serial_adapters
# and virtual_scsi_adapters attributes. So can't simply
# split them by ','.
cf_splitter = shlex.shlex(conf_data, posix=True)
cf_splitter.whitespace = ','
cf_splitter.whitespace_split = True
attribs = dict(item.split("=") for item in list(cf_splitter))
lpar = LPAR()
for (key, value) in attribs.items():
try:
lpar[key] = value
except exception.PowerVMLPARAttributeNotFound:
LOG.info(_('Encountered unknown LPAR attribute: %s\n'
'Continuing without storing') % key)
return lpar
class LPAR(object):
"""
Simple class representing a logical partition and the attributes
for the partition and/or its selected profile.
"""
# Attributes for all logical partitions
LPAR_ATTRS = (
'name',
'lpar_id',
'lpar_env',
'state',
'resource_config',
'os_version',
'logical_serial_num',
'default_profile',
'profile_name',
'curr_profile',
'work_group_id',
'allow_perf_collection',
'power_ctrl_lpar_ids',
'boot_mode',
'lpar_keylock',
'auto_start',
'uptime',
'lpar_avail_priority',
'desired_lpar_proc_compat_mode',
'curr_lpar_proc_compat_mode',
'virtual_eth_mac_base_value',
'rmc_ipaddr'
)
# Logical partitions may contain one or more profiles, which
# may have the following attributes
LPAR_PROFILE_ATTRS = (
'name',
'lpar_name',
'lpar_id',
'os_type',
'all_resources',
'mem_mode',
'min_mem',
'desired_mem',
'max_mem',
'proc_mode',
'min_proc_units',
'desired_proc_units',
'max_proc_units',
'min_procs',
'desired_procs',
'max_procs',
'sharing_mode',
'uncap_weight',
'io_slots',
'lpar_io_pool_ids',
'max_virtual_slots',
'virtual_serial_adapters',
'virtual_scsi_adapters',
'virtual_eth_adapters',
'boot_mode',
'conn_monitoring',
'auto_start',
'power_ctrl_lpar_ids',
'lhea_logical_ports',
'lhea_capabilities',
'lpar_proc_compat_mode',
'virtual_fc_adapters'
)
def __init__(self, **kwargs):
self.attributes = dict([k, None] for k in self.LPAR_ATTRS)
self.profile_attributes = dict([k, None] for k
in self.LPAR_PROFILE_ATTRS)
self.attributes.update(kwargs)
self.profile_attributes.update(kwargs)
self.all_attrs = dict(self.attributes.items()
+ self.profile_attributes.items())
def __getitem__(self, key):
if key not in self.all_attrs.keys():
raise exception.PowerVMLPARAttributeNotFound(key)
return self.all_attrs.get(key)
def __setitem__(self, key, value):
if key not in self.all_attrs.keys():
raise exception.PowerVMLPARAttributeNotFound(key)
self.all_attrs[key] = value
def __delitem__(self, key):
if key not in self.all_attrs.keys():
raise exception.PowerVMLPARAttributeNotFound(key)
# We set to None instead of removing the key...
self.all_attrs[key] = None
def to_string(self, exclude_attribs=[]):
conf_data = []
for (key, value) in self.all_attrs.items():
if key in exclude_attribs or value is None:
continue
conf_data.append('%s=%s' % (key, value))
return ','.join(conf_data)
| apache-2.0 | 6,919,304,282,412,529,000 | -7,323,828,873,101,605,000 | 30.325153 | 78 | 0.603995 | false |
CyanogenMod/android_external_chromium_org | third_party/protobuf/python/google/protobuf/internal/text_format_test.py | 162 | 23727 | #! /usr/bin/python
#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""Test for google.protobuf.text_format."""
__author__ = '[email protected] (Kenton Varda)'
import difflib
import re
import unittest
from google.protobuf import text_format
from google.protobuf.internal import test_util
from google.protobuf import unittest_pb2
from google.protobuf import unittest_mset_pb2
class TextFormatTest(unittest.TestCase):
def ReadGolden(self, golden_filename):
f = test_util.GoldenFile(golden_filename)
golden_lines = f.readlines()
f.close()
return golden_lines
def CompareToGoldenFile(self, text, golden_filename):
golden_lines = self.ReadGolden(golden_filename)
self.CompareToGoldenLines(text, golden_lines)
def CompareToGoldenText(self, text, golden_text):
self.CompareToGoldenLines(text, golden_text.splitlines(1))
def CompareToGoldenLines(self, text, golden_lines):
actual_lines = text.splitlines(1)
self.assertEqual(golden_lines, actual_lines,
"Text doesn't match golden. Diff:\n" +
''.join(difflib.ndiff(golden_lines, actual_lines)))
def testPrintAllFields(self):
message = unittest_pb2.TestAllTypes()
test_util.SetAllFields(message)
self.CompareToGoldenFile(
self.RemoveRedundantZeros(text_format.MessageToString(message)),
'text_format_unittest_data.txt')
def testPrintAllExtensions(self):
message = unittest_pb2.TestAllExtensions()
test_util.SetAllExtensions(message)
self.CompareToGoldenFile(
self.RemoveRedundantZeros(text_format.MessageToString(message)),
'text_format_unittest_extensions_data.txt')
def testPrintMessageSet(self):
message = unittest_mset_pb2.TestMessageSetContainer()
ext1 = unittest_mset_pb2.TestMessageSetExtension1.message_set_extension
ext2 = unittest_mset_pb2.TestMessageSetExtension2.message_set_extension
message.message_set.Extensions[ext1].i = 23
message.message_set.Extensions[ext2].str = 'foo'
self.CompareToGoldenText(text_format.MessageToString(message),
'message_set {\n'
' [protobuf_unittest.TestMessageSetExtension1] {\n'
' i: 23\n'
' }\n'
' [protobuf_unittest.TestMessageSetExtension2] {\n'
' str: \"foo\"\n'
' }\n'
'}\n')
def testPrintBadEnumValue(self):
message = unittest_pb2.TestAllTypes()
message.optional_nested_enum = 100
message.optional_foreign_enum = 101
message.optional_import_enum = 102
self.CompareToGoldenText(
text_format.MessageToString(message),
'optional_nested_enum: 100\n'
'optional_foreign_enum: 101\n'
'optional_import_enum: 102\n')
def testPrintBadEnumValueExtensions(self):
message = unittest_pb2.TestAllExtensions()
message.Extensions[unittest_pb2.optional_nested_enum_extension] = 100
message.Extensions[unittest_pb2.optional_foreign_enum_extension] = 101
message.Extensions[unittest_pb2.optional_import_enum_extension] = 102
self.CompareToGoldenText(
text_format.MessageToString(message),
'[protobuf_unittest.optional_nested_enum_extension]: 100\n'
'[protobuf_unittest.optional_foreign_enum_extension]: 101\n'
'[protobuf_unittest.optional_import_enum_extension]: 102\n')
def testPrintExotic(self):
message = unittest_pb2.TestAllTypes()
message.repeated_int64.append(-9223372036854775808)
message.repeated_uint64.append(18446744073709551615)
message.repeated_double.append(123.456)
message.repeated_double.append(1.23e22)
message.repeated_double.append(1.23e-18)
message.repeated_string.append('\000\001\a\b\f\n\r\t\v\\\'"')
message.repeated_string.append(u'\u00fc\ua71f')
self.CompareToGoldenText(
self.RemoveRedundantZeros(text_format.MessageToString(message)),
'repeated_int64: -9223372036854775808\n'
'repeated_uint64: 18446744073709551615\n'
'repeated_double: 123.456\n'
'repeated_double: 1.23e+22\n'
'repeated_double: 1.23e-18\n'
'repeated_string: '
'"\\000\\001\\007\\010\\014\\n\\r\\t\\013\\\\\\\'\\""\n'
'repeated_string: "\\303\\274\\352\\234\\237"\n')
def testPrintNestedMessageAsOneLine(self):
message = unittest_pb2.TestAllTypes()
msg = message.repeated_nested_message.add()
msg.bb = 42;
self.CompareToGoldenText(
text_format.MessageToString(message, as_one_line=True),
'repeated_nested_message { bb: 42 }')
def testPrintRepeatedFieldsAsOneLine(self):
message = unittest_pb2.TestAllTypes()
message.repeated_int32.append(1)
message.repeated_int32.append(1)
message.repeated_int32.append(3)
message.repeated_string.append("Google")
message.repeated_string.append("Zurich")
self.CompareToGoldenText(
text_format.MessageToString(message, as_one_line=True),
'repeated_int32: 1 repeated_int32: 1 repeated_int32: 3 '
'repeated_string: "Google" repeated_string: "Zurich"')
def testPrintNestedNewLineInStringAsOneLine(self):
message = unittest_pb2.TestAllTypes()
message.optional_string = "a\nnew\nline"
self.CompareToGoldenText(
text_format.MessageToString(message, as_one_line=True),
'optional_string: "a\\nnew\\nline"')
def testPrintMessageSetAsOneLine(self):
message = unittest_mset_pb2.TestMessageSetContainer()
ext1 = unittest_mset_pb2.TestMessageSetExtension1.message_set_extension
ext2 = unittest_mset_pb2.TestMessageSetExtension2.message_set_extension
message.message_set.Extensions[ext1].i = 23
message.message_set.Extensions[ext2].str = 'foo'
self.CompareToGoldenText(
text_format.MessageToString(message, as_one_line=True),
'message_set {'
' [protobuf_unittest.TestMessageSetExtension1] {'
' i: 23'
' }'
' [protobuf_unittest.TestMessageSetExtension2] {'
' str: \"foo\"'
' }'
' }')
def testPrintExoticAsOneLine(self):
message = unittest_pb2.TestAllTypes()
message.repeated_int64.append(-9223372036854775808)
message.repeated_uint64.append(18446744073709551615)
message.repeated_double.append(123.456)
message.repeated_double.append(1.23e22)
message.repeated_double.append(1.23e-18)
message.repeated_string.append('\000\001\a\b\f\n\r\t\v\\\'"')
message.repeated_string.append(u'\u00fc\ua71f')
self.CompareToGoldenText(
self.RemoveRedundantZeros(
text_format.MessageToString(message, as_one_line=True)),
'repeated_int64: -9223372036854775808'
' repeated_uint64: 18446744073709551615'
' repeated_double: 123.456'
' repeated_double: 1.23e+22'
' repeated_double: 1.23e-18'
' repeated_string: '
'"\\000\\001\\007\\010\\014\\n\\r\\t\\013\\\\\\\'\\""'
' repeated_string: "\\303\\274\\352\\234\\237"')
def testRoundTripExoticAsOneLine(self):
message = unittest_pb2.TestAllTypes()
message.repeated_int64.append(-9223372036854775808)
message.repeated_uint64.append(18446744073709551615)
message.repeated_double.append(123.456)
message.repeated_double.append(1.23e22)
message.repeated_double.append(1.23e-18)
message.repeated_string.append('\000\001\a\b\f\n\r\t\v\\\'"')
message.repeated_string.append(u'\u00fc\ua71f')
# Test as_utf8 = False.
wire_text = text_format.MessageToString(
message, as_one_line=True, as_utf8=False)
parsed_message = unittest_pb2.TestAllTypes()
text_format.Merge(wire_text, parsed_message)
self.assertEquals(message, parsed_message)
# Test as_utf8 = True.
wire_text = text_format.MessageToString(
message, as_one_line=True, as_utf8=True)
parsed_message = unittest_pb2.TestAllTypes()
text_format.Merge(wire_text, parsed_message)
self.assertEquals(message, parsed_message)
def testPrintRawUtf8String(self):
message = unittest_pb2.TestAllTypes()
message.repeated_string.append(u'\u00fc\ua71f')
text = text_format.MessageToString(message, as_utf8 = True)
self.CompareToGoldenText(text, 'repeated_string: "\303\274\352\234\237"\n')
parsed_message = unittest_pb2.TestAllTypes()
text_format.Merge(text, parsed_message)
self.assertEquals(message, parsed_message)
def testMessageToString(self):
message = unittest_pb2.ForeignMessage()
message.c = 123
self.assertEqual('c: 123\n', str(message))
def RemoveRedundantZeros(self, text):
# Some platforms print 1e+5 as 1e+005. This is fine, but we need to remove
# these zeros in order to match the golden file.
text = text.replace('e+0','e+').replace('e+0','e+') \
.replace('e-0','e-').replace('e-0','e-')
# Floating point fields are printed with .0 suffix even if they are
# actualy integer numbers.
text = re.compile('\.0$', re.MULTILINE).sub('', text)
return text
def testMergeGolden(self):
golden_text = '\n'.join(self.ReadGolden('text_format_unittest_data.txt'))
parsed_message = unittest_pb2.TestAllTypes()
text_format.Merge(golden_text, parsed_message)
message = unittest_pb2.TestAllTypes()
test_util.SetAllFields(message)
self.assertEquals(message, parsed_message)
def testMergeGoldenExtensions(self):
golden_text = '\n'.join(self.ReadGolden(
'text_format_unittest_extensions_data.txt'))
parsed_message = unittest_pb2.TestAllExtensions()
text_format.Merge(golden_text, parsed_message)
message = unittest_pb2.TestAllExtensions()
test_util.SetAllExtensions(message)
self.assertEquals(message, parsed_message)
def testMergeAllFields(self):
message = unittest_pb2.TestAllTypes()
test_util.SetAllFields(message)
ascii_text = text_format.MessageToString(message)
parsed_message = unittest_pb2.TestAllTypes()
text_format.Merge(ascii_text, parsed_message)
self.assertEqual(message, parsed_message)
test_util.ExpectAllFieldsSet(self, message)
def testMergeAllExtensions(self):
message = unittest_pb2.TestAllExtensions()
test_util.SetAllExtensions(message)
ascii_text = text_format.MessageToString(message)
parsed_message = unittest_pb2.TestAllExtensions()
text_format.Merge(ascii_text, parsed_message)
self.assertEqual(message, parsed_message)
def testMergeMessageSet(self):
message = unittest_pb2.TestAllTypes()
text = ('repeated_uint64: 1\n'
'repeated_uint64: 2\n')
text_format.Merge(text, message)
self.assertEqual(1, message.repeated_uint64[0])
self.assertEqual(2, message.repeated_uint64[1])
message = unittest_mset_pb2.TestMessageSetContainer()
text = ('message_set {\n'
' [protobuf_unittest.TestMessageSetExtension1] {\n'
' i: 23\n'
' }\n'
' [protobuf_unittest.TestMessageSetExtension2] {\n'
' str: \"foo\"\n'
' }\n'
'}\n')
text_format.Merge(text, message)
ext1 = unittest_mset_pb2.TestMessageSetExtension1.message_set_extension
ext2 = unittest_mset_pb2.TestMessageSetExtension2.message_set_extension
self.assertEquals(23, message.message_set.Extensions[ext1].i)
self.assertEquals('foo', message.message_set.Extensions[ext2].str)
def testMergeExotic(self):
message = unittest_pb2.TestAllTypes()
text = ('repeated_int64: -9223372036854775808\n'
'repeated_uint64: 18446744073709551615\n'
'repeated_double: 123.456\n'
'repeated_double: 1.23e+22\n'
'repeated_double: 1.23e-18\n'
'repeated_string: \n'
'"\\000\\001\\007\\010\\014\\n\\r\\t\\013\\\\\\\'\\""\n'
'repeated_string: "foo" \'corge\' "grault"\n'
'repeated_string: "\\303\\274\\352\\234\\237"\n'
'repeated_string: "\\xc3\\xbc"\n'
'repeated_string: "\xc3\xbc"\n')
text_format.Merge(text, message)
self.assertEqual(-9223372036854775808, message.repeated_int64[0])
self.assertEqual(18446744073709551615, message.repeated_uint64[0])
self.assertEqual(123.456, message.repeated_double[0])
self.assertEqual(1.23e22, message.repeated_double[1])
self.assertEqual(1.23e-18, message.repeated_double[2])
self.assertEqual(
'\000\001\a\b\f\n\r\t\v\\\'"', message.repeated_string[0])
self.assertEqual('foocorgegrault', message.repeated_string[1])
self.assertEqual(u'\u00fc\ua71f', message.repeated_string[2])
self.assertEqual(u'\u00fc', message.repeated_string[3])
def testMergeEmptyText(self):
message = unittest_pb2.TestAllTypes()
text = ''
text_format.Merge(text, message)
self.assertEquals(unittest_pb2.TestAllTypes(), message)
def testMergeInvalidUtf8(self):
message = unittest_pb2.TestAllTypes()
text = 'repeated_string: "\\xc3\\xc3"'
self.assertRaises(text_format.ParseError, text_format.Merge, text, message)
def testMergeSingleWord(self):
message = unittest_pb2.TestAllTypes()
text = 'foo'
self.assertRaisesWithMessage(
text_format.ParseError,
('1:1 : Message type "protobuf_unittest.TestAllTypes" has no field named '
'"foo".'),
text_format.Merge, text, message)
def testMergeUnknownField(self):
message = unittest_pb2.TestAllTypes()
text = 'unknown_field: 8\n'
self.assertRaisesWithMessage(
text_format.ParseError,
('1:1 : Message type "protobuf_unittest.TestAllTypes" has no field named '
'"unknown_field".'),
text_format.Merge, text, message)
def testMergeBadExtension(self):
message = unittest_pb2.TestAllExtensions()
text = '[unknown_extension]: 8\n'
self.assertRaisesWithMessage(
text_format.ParseError,
'1:2 : Extension "unknown_extension" not registered.',
text_format.Merge, text, message)
message = unittest_pb2.TestAllTypes()
self.assertRaisesWithMessage(
text_format.ParseError,
('1:2 : Message type "protobuf_unittest.TestAllTypes" does not have '
'extensions.'),
text_format.Merge, text, message)
def testMergeGroupNotClosed(self):
message = unittest_pb2.TestAllTypes()
text = 'RepeatedGroup: <'
self.assertRaisesWithMessage(
text_format.ParseError, '1:16 : Expected ">".',
text_format.Merge, text, message)
text = 'RepeatedGroup: {'
self.assertRaisesWithMessage(
text_format.ParseError, '1:16 : Expected "}".',
text_format.Merge, text, message)
def testMergeEmptyGroup(self):
message = unittest_pb2.TestAllTypes()
text = 'OptionalGroup: {}'
text_format.Merge(text, message)
self.assertTrue(message.HasField('optionalgroup'))
message.Clear()
message = unittest_pb2.TestAllTypes()
text = 'OptionalGroup: <>'
text_format.Merge(text, message)
self.assertTrue(message.HasField('optionalgroup'))
def testMergeBadEnumValue(self):
message = unittest_pb2.TestAllTypes()
text = 'optional_nested_enum: BARR'
self.assertRaisesWithMessage(
text_format.ParseError,
('1:23 : Enum type "protobuf_unittest.TestAllTypes.NestedEnum" '
'has no value named BARR.'),
text_format.Merge, text, message)
message = unittest_pb2.TestAllTypes()
text = 'optional_nested_enum: 100'
self.assertRaisesWithMessage(
text_format.ParseError,
('1:23 : Enum type "protobuf_unittest.TestAllTypes.NestedEnum" '
'has no value with number 100.'),
text_format.Merge, text, message)
def testMergeBadIntValue(self):
message = unittest_pb2.TestAllTypes()
text = 'optional_int32: bork'
self.assertRaisesWithMessage(
text_format.ParseError,
('1:17 : Couldn\'t parse integer: bork'),
text_format.Merge, text, message)
def assertRaisesWithMessage(self, e_class, e, func, *args, **kwargs):
"""Same as assertRaises, but also compares the exception message."""
if hasattr(e_class, '__name__'):
exc_name = e_class.__name__
else:
exc_name = str(e_class)
try:
func(*args, **kwargs)
except e_class as expr:
if str(expr) != e:
msg = '%s raised, but with wrong message: "%s" instead of "%s"'
raise self.failureException(msg % (exc_name,
str(expr).encode('string_escape'),
e.encode('string_escape')))
return
else:
raise self.failureException('%s not raised' % exc_name)
class TokenizerTest(unittest.TestCase):
def testSimpleTokenCases(self):
text = ('identifier1:"string1"\n \n\n'
'identifier2 : \n \n123 \n identifier3 :\'string\'\n'
'identifiER_4 : 1.1e+2 ID5:-0.23 ID6:\'aaaa\\\'bbbb\'\n'
'ID7 : "aa\\"bb"\n\n\n\n ID8: {A:inf B:-inf C:true D:false}\n'
'ID9: 22 ID10: -111111111111111111 ID11: -22\n'
'ID12: 2222222222222222222 ID13: 1.23456f ID14: 1.2e+2f '
'false_bool: 0 true_BOOL:t \n true_bool1: 1 false_BOOL1:f ' )
tokenizer = text_format._Tokenizer(text)
methods = [(tokenizer.ConsumeIdentifier, 'identifier1'),
':',
(tokenizer.ConsumeString, 'string1'),
(tokenizer.ConsumeIdentifier, 'identifier2'),
':',
(tokenizer.ConsumeInt32, 123),
(tokenizer.ConsumeIdentifier, 'identifier3'),
':',
(tokenizer.ConsumeString, 'string'),
(tokenizer.ConsumeIdentifier, 'identifiER_4'),
':',
(tokenizer.ConsumeFloat, 1.1e+2),
(tokenizer.ConsumeIdentifier, 'ID5'),
':',
(tokenizer.ConsumeFloat, -0.23),
(tokenizer.ConsumeIdentifier, 'ID6'),
':',
(tokenizer.ConsumeString, 'aaaa\'bbbb'),
(tokenizer.ConsumeIdentifier, 'ID7'),
':',
(tokenizer.ConsumeString, 'aa\"bb'),
(tokenizer.ConsumeIdentifier, 'ID8'),
':',
'{',
(tokenizer.ConsumeIdentifier, 'A'),
':',
(tokenizer.ConsumeFloat, float('inf')),
(tokenizer.ConsumeIdentifier, 'B'),
':',
(tokenizer.ConsumeFloat, -float('inf')),
(tokenizer.ConsumeIdentifier, 'C'),
':',
(tokenizer.ConsumeBool, True),
(tokenizer.ConsumeIdentifier, 'D'),
':',
(tokenizer.ConsumeBool, False),
'}',
(tokenizer.ConsumeIdentifier, 'ID9'),
':',
(tokenizer.ConsumeUint32, 22),
(tokenizer.ConsumeIdentifier, 'ID10'),
':',
(tokenizer.ConsumeInt64, -111111111111111111),
(tokenizer.ConsumeIdentifier, 'ID11'),
':',
(tokenizer.ConsumeInt32, -22),
(tokenizer.ConsumeIdentifier, 'ID12'),
':',
(tokenizer.ConsumeUint64, 2222222222222222222),
(tokenizer.ConsumeIdentifier, 'ID13'),
':',
(tokenizer.ConsumeFloat, 1.23456),
(tokenizer.ConsumeIdentifier, 'ID14'),
':',
(tokenizer.ConsumeFloat, 1.2e+2),
(tokenizer.ConsumeIdentifier, 'false_bool'),
':',
(tokenizer.ConsumeBool, False),
(tokenizer.ConsumeIdentifier, 'true_BOOL'),
':',
(tokenizer.ConsumeBool, True),
(tokenizer.ConsumeIdentifier, 'true_bool1'),
':',
(tokenizer.ConsumeBool, True),
(tokenizer.ConsumeIdentifier, 'false_BOOL1'),
':',
(tokenizer.ConsumeBool, False)]
i = 0
while not tokenizer.AtEnd():
m = methods[i]
if type(m) == str:
token = tokenizer.token
self.assertEqual(token, m)
tokenizer.NextToken()
else:
self.assertEqual(m[1], m[0]())
i += 1
def testConsumeIntegers(self):
# This test only tests the failures in the integer parsing methods as well
# as the '0' special cases.
int64_max = (1 << 63) - 1
uint32_max = (1 << 32) - 1
text = '-1 %d %d' % (uint32_max + 1, int64_max + 1)
tokenizer = text_format._Tokenizer(text)
self.assertRaises(text_format.ParseError, tokenizer.ConsumeUint32)
self.assertRaises(text_format.ParseError, tokenizer.ConsumeUint64)
self.assertEqual(-1, tokenizer.ConsumeInt32())
self.assertRaises(text_format.ParseError, tokenizer.ConsumeUint32)
self.assertRaises(text_format.ParseError, tokenizer.ConsumeInt32)
self.assertEqual(uint32_max + 1, tokenizer.ConsumeInt64())
self.assertRaises(text_format.ParseError, tokenizer.ConsumeInt64)
self.assertEqual(int64_max + 1, tokenizer.ConsumeUint64())
self.assertTrue(tokenizer.AtEnd())
text = '-0 -0 0 0'
tokenizer = text_format._Tokenizer(text)
self.assertEqual(0, tokenizer.ConsumeUint32())
self.assertEqual(0, tokenizer.ConsumeUint64())
self.assertEqual(0, tokenizer.ConsumeUint32())
self.assertEqual(0, tokenizer.ConsumeUint64())
self.assertTrue(tokenizer.AtEnd())
def testConsumeByteString(self):
text = '"string1\''
tokenizer = text_format._Tokenizer(text)
self.assertRaises(text_format.ParseError, tokenizer.ConsumeByteString)
text = 'string1"'
tokenizer = text_format._Tokenizer(text)
self.assertRaises(text_format.ParseError, tokenizer.ConsumeByteString)
text = '\n"\\xt"'
tokenizer = text_format._Tokenizer(text)
self.assertRaises(text_format.ParseError, tokenizer.ConsumeByteString)
text = '\n"\\"'
tokenizer = text_format._Tokenizer(text)
self.assertRaises(text_format.ParseError, tokenizer.ConsumeByteString)
text = '\n"\\x"'
tokenizer = text_format._Tokenizer(text)
self.assertRaises(text_format.ParseError, tokenizer.ConsumeByteString)
def testConsumeBool(self):
text = 'not-a-bool'
tokenizer = text_format._Tokenizer(text)
self.assertRaises(text_format.ParseError, tokenizer.ConsumeBool)
if __name__ == '__main__':
unittest.main()
| bsd-3-clause | 5,423,247,809,461,054,000 | -4,952,982,390,858,180,000 | 38.743719 | 82 | 0.659123 | false |
mancoast/CPythonPyc_test | cpython/273_test_memoryio.py | 31 | 25664 | """Unit tests for memory-based file-like objects.
StringIO -- for unicode strings
BytesIO -- for bytes
"""
from __future__ import unicode_literals
from __future__ import print_function
import unittest
from test import test_support as support
import io
import _pyio as pyio
import pickle
class MemorySeekTestMixin:
def testInit(self):
buf = self.buftype("1234567890")
bytesIo = self.ioclass(buf)
def testRead(self):
buf = self.buftype("1234567890")
bytesIo = self.ioclass(buf)
self.assertEqual(buf[:1], bytesIo.read(1))
self.assertEqual(buf[1:5], bytesIo.read(4))
self.assertEqual(buf[5:], bytesIo.read(900))
self.assertEqual(self.EOF, bytesIo.read())
def testReadNoArgs(self):
buf = self.buftype("1234567890")
bytesIo = self.ioclass(buf)
self.assertEqual(buf, bytesIo.read())
self.assertEqual(self.EOF, bytesIo.read())
def testSeek(self):
buf = self.buftype("1234567890")
bytesIo = self.ioclass(buf)
bytesIo.read(5)
bytesIo.seek(0)
self.assertEqual(buf, bytesIo.read())
bytesIo.seek(3)
self.assertEqual(buf[3:], bytesIo.read())
self.assertRaises(TypeError, bytesIo.seek, 0.0)
def testTell(self):
buf = self.buftype("1234567890")
bytesIo = self.ioclass(buf)
self.assertEqual(0, bytesIo.tell())
bytesIo.seek(5)
self.assertEqual(5, bytesIo.tell())
bytesIo.seek(10000)
self.assertEqual(10000, bytesIo.tell())
class MemoryTestMixin:
def test_detach(self):
buf = self.ioclass()
self.assertRaises(self.UnsupportedOperation, buf.detach)
def write_ops(self, f, t):
self.assertEqual(f.write(t("blah.")), 5)
self.assertEqual(f.seek(0), 0)
self.assertEqual(f.write(t("Hello.")), 6)
self.assertEqual(f.tell(), 6)
self.assertEqual(f.seek(5), 5)
self.assertEqual(f.tell(), 5)
self.assertEqual(f.write(t(" world\n\n\n")), 9)
self.assertEqual(f.seek(0), 0)
self.assertEqual(f.write(t("h")), 1)
self.assertEqual(f.truncate(12), 12)
self.assertEqual(f.tell(), 1)
def test_write(self):
buf = self.buftype("hello world\n")
memio = self.ioclass(buf)
self.write_ops(memio, self.buftype)
self.assertEqual(memio.getvalue(), buf)
memio = self.ioclass()
self.write_ops(memio, self.buftype)
self.assertEqual(memio.getvalue(), buf)
self.assertRaises(TypeError, memio.write, None)
memio.close()
self.assertRaises(ValueError, memio.write, self.buftype(""))
def test_writelines(self):
buf = self.buftype("1234567890")
memio = self.ioclass()
self.assertEqual(memio.writelines([buf] * 100), None)
self.assertEqual(memio.getvalue(), buf * 100)
memio.writelines([])
self.assertEqual(memio.getvalue(), buf * 100)
memio = self.ioclass()
self.assertRaises(TypeError, memio.writelines, [buf] + [1])
self.assertEqual(memio.getvalue(), buf)
self.assertRaises(TypeError, memio.writelines, None)
memio.close()
self.assertRaises(ValueError, memio.writelines, [])
def test_writelines_error(self):
memio = self.ioclass()
def error_gen():
yield self.buftype('spam')
raise KeyboardInterrupt
self.assertRaises(KeyboardInterrupt, memio.writelines, error_gen())
def test_truncate(self):
buf = self.buftype("1234567890")
memio = self.ioclass(buf)
self.assertRaises(ValueError, memio.truncate, -1)
memio.seek(6)
self.assertEqual(memio.truncate(), 6)
self.assertEqual(memio.getvalue(), buf[:6])
self.assertEqual(memio.truncate(4), 4)
self.assertEqual(memio.getvalue(), buf[:4])
# truncate() accepts long objects
self.assertEqual(memio.truncate(4L), 4)
self.assertEqual(memio.getvalue(), buf[:4])
self.assertEqual(memio.tell(), 6)
memio.seek(0, 2)
memio.write(buf)
self.assertEqual(memio.getvalue(), buf[:4] + buf)
pos = memio.tell()
self.assertEqual(memio.truncate(None), pos)
self.assertEqual(memio.tell(), pos)
self.assertRaises(TypeError, memio.truncate, '0')
memio.close()
self.assertRaises(ValueError, memio.truncate, 0)
def test_init(self):
buf = self.buftype("1234567890")
memio = self.ioclass(buf)
self.assertEqual(memio.getvalue(), buf)
memio = self.ioclass(None)
self.assertEqual(memio.getvalue(), self.EOF)
memio.__init__(buf * 2)
self.assertEqual(memio.getvalue(), buf * 2)
memio.__init__(buf)
self.assertEqual(memio.getvalue(), buf)
def test_read(self):
buf = self.buftype("1234567890")
memio = self.ioclass(buf)
self.assertEqual(memio.read(0), self.EOF)
self.assertEqual(memio.read(1), buf[:1])
# read() accepts long objects
self.assertEqual(memio.read(4L), buf[1:5])
self.assertEqual(memio.read(900), buf[5:])
self.assertEqual(memio.read(), self.EOF)
memio.seek(0)
self.assertEqual(memio.read(), buf)
self.assertEqual(memio.read(), self.EOF)
self.assertEqual(memio.tell(), 10)
memio.seek(0)
self.assertEqual(memio.read(-1), buf)
memio.seek(0)
self.assertEqual(type(memio.read()), type(buf))
memio.seek(100)
self.assertEqual(type(memio.read()), type(buf))
memio.seek(0)
self.assertEqual(memio.read(None), buf)
self.assertRaises(TypeError, memio.read, '')
memio.close()
self.assertRaises(ValueError, memio.read)
def test_readline(self):
buf = self.buftype("1234567890\n")
memio = self.ioclass(buf * 2)
self.assertEqual(memio.readline(0), self.EOF)
self.assertEqual(memio.readline(), buf)
self.assertEqual(memio.readline(), buf)
self.assertEqual(memio.readline(), self.EOF)
memio.seek(0)
self.assertEqual(memio.readline(5), buf[:5])
# readline() accepts long objects
self.assertEqual(memio.readline(5L), buf[5:10])
self.assertEqual(memio.readline(5), buf[10:15])
memio.seek(0)
self.assertEqual(memio.readline(-1), buf)
memio.seek(0)
self.assertEqual(memio.readline(0), self.EOF)
buf = self.buftype("1234567890\n")
memio = self.ioclass((buf * 3)[:-1])
self.assertEqual(memio.readline(), buf)
self.assertEqual(memio.readline(), buf)
self.assertEqual(memio.readline(), buf[:-1])
self.assertEqual(memio.readline(), self.EOF)
memio.seek(0)
self.assertEqual(type(memio.readline()), type(buf))
self.assertEqual(memio.readline(), buf)
self.assertRaises(TypeError, memio.readline, '')
memio.close()
self.assertRaises(ValueError, memio.readline)
def test_readlines(self):
buf = self.buftype("1234567890\n")
memio = self.ioclass(buf * 10)
self.assertEqual(memio.readlines(), [buf] * 10)
memio.seek(5)
self.assertEqual(memio.readlines(), [buf[5:]] + [buf] * 9)
memio.seek(0)
# readlines() accepts long objects
self.assertEqual(memio.readlines(15L), [buf] * 2)
memio.seek(0)
self.assertEqual(memio.readlines(-1), [buf] * 10)
memio.seek(0)
self.assertEqual(memio.readlines(0), [buf] * 10)
memio.seek(0)
self.assertEqual(type(memio.readlines()[0]), type(buf))
memio.seek(0)
self.assertEqual(memio.readlines(None), [buf] * 10)
self.assertRaises(TypeError, memio.readlines, '')
memio.close()
self.assertRaises(ValueError, memio.readlines)
def test_iterator(self):
buf = self.buftype("1234567890\n")
memio = self.ioclass(buf * 10)
self.assertEqual(iter(memio), memio)
self.assertTrue(hasattr(memio, '__iter__'))
self.assertTrue(hasattr(memio, 'next'))
i = 0
for line in memio:
self.assertEqual(line, buf)
i += 1
self.assertEqual(i, 10)
memio.seek(0)
i = 0
for line in memio:
self.assertEqual(line, buf)
i += 1
self.assertEqual(i, 10)
memio = self.ioclass(buf * 2)
memio.close()
self.assertRaises(ValueError, next, memio)
def test_getvalue(self):
buf = self.buftype("1234567890")
memio = self.ioclass(buf)
self.assertEqual(memio.getvalue(), buf)
memio.read()
self.assertEqual(memio.getvalue(), buf)
self.assertEqual(type(memio.getvalue()), type(buf))
memio = self.ioclass(buf * 1000)
self.assertEqual(memio.getvalue()[-3:], self.buftype("890"))
memio = self.ioclass(buf)
memio.close()
self.assertRaises(ValueError, memio.getvalue)
def test_seek(self):
buf = self.buftype("1234567890")
memio = self.ioclass(buf)
memio.read(5)
self.assertRaises(ValueError, memio.seek, -1)
self.assertRaises(ValueError, memio.seek, 1, -1)
self.assertRaises(ValueError, memio.seek, 1, 3)
self.assertEqual(memio.seek(0), 0)
self.assertEqual(memio.seek(0, 0), 0)
self.assertEqual(memio.read(), buf)
self.assertEqual(memio.seek(3), 3)
# seek() accepts long objects
self.assertEqual(memio.seek(3L), 3)
self.assertEqual(memio.seek(0, 1), 3)
self.assertEqual(memio.read(), buf[3:])
self.assertEqual(memio.seek(len(buf)), len(buf))
self.assertEqual(memio.read(), self.EOF)
memio.seek(len(buf) + 1)
self.assertEqual(memio.read(), self.EOF)
self.assertEqual(memio.seek(0, 2), len(buf))
self.assertEqual(memio.read(), self.EOF)
memio.close()
self.assertRaises(ValueError, memio.seek, 0)
def test_overseek(self):
buf = self.buftype("1234567890")
memio = self.ioclass(buf)
self.assertEqual(memio.seek(len(buf) + 1), 11)
self.assertEqual(memio.read(), self.EOF)
self.assertEqual(memio.tell(), 11)
self.assertEqual(memio.getvalue(), buf)
memio.write(self.EOF)
self.assertEqual(memio.getvalue(), buf)
memio.write(buf)
self.assertEqual(memio.getvalue(), buf + self.buftype('\0') + buf)
def test_tell(self):
buf = self.buftype("1234567890")
memio = self.ioclass(buf)
self.assertEqual(memio.tell(), 0)
memio.seek(5)
self.assertEqual(memio.tell(), 5)
memio.seek(10000)
self.assertEqual(memio.tell(), 10000)
memio.close()
self.assertRaises(ValueError, memio.tell)
def test_flush(self):
buf = self.buftype("1234567890")
memio = self.ioclass(buf)
self.assertEqual(memio.flush(), None)
def test_flags(self):
memio = self.ioclass()
self.assertEqual(memio.writable(), True)
self.assertEqual(memio.readable(), True)
self.assertEqual(memio.seekable(), True)
self.assertEqual(memio.isatty(), False)
self.assertEqual(memio.closed, False)
memio.close()
self.assertEqual(memio.writable(), True)
self.assertEqual(memio.readable(), True)
self.assertEqual(memio.seekable(), True)
self.assertRaises(ValueError, memio.isatty)
self.assertEqual(memio.closed, True)
def test_subclassing(self):
buf = self.buftype("1234567890")
def test1():
class MemIO(self.ioclass):
pass
m = MemIO(buf)
return m.getvalue()
def test2():
class MemIO(self.ioclass):
def __init__(me, a, b):
self.ioclass.__init__(me, a)
m = MemIO(buf, None)
return m.getvalue()
self.assertEqual(test1(), buf)
self.assertEqual(test2(), buf)
def test_instance_dict_leak(self):
# Test case for issue #6242.
# This will be caught by regrtest.py -R if this leak.
for _ in range(100):
memio = self.ioclass()
memio.foo = 1
def test_pickling(self):
buf = self.buftype("1234567890")
memio = self.ioclass(buf)
memio.foo = 42
memio.seek(2)
class PickleTestMemIO(self.ioclass):
def __init__(me, initvalue, foo):
self.ioclass.__init__(me, initvalue)
me.foo = foo
# __getnewargs__ is undefined on purpose. This checks that PEP 307
# is used to provide pickling support.
# Pickle expects the class to be on the module level. Here we use a
# little hack to allow the PickleTestMemIO class to derive from
# self.ioclass without having to define all combinations explicitly on
# the module-level.
import __main__
PickleTestMemIO.__module__ = '__main__'
__main__.PickleTestMemIO = PickleTestMemIO
submemio = PickleTestMemIO(buf, 80)
submemio.seek(2)
# We only support pickle protocol 2 and onward since we use extended
# __reduce__ API of PEP 307 to provide pickling support.
for proto in range(2, pickle.HIGHEST_PROTOCOL):
for obj in (memio, submemio):
obj2 = pickle.loads(pickle.dumps(obj, protocol=proto))
self.assertEqual(obj.getvalue(), obj2.getvalue())
self.assertEqual(obj.__class__, obj2.__class__)
self.assertEqual(obj.foo, obj2.foo)
self.assertEqual(obj.tell(), obj2.tell())
obj.close()
self.assertRaises(ValueError, pickle.dumps, obj, proto)
del __main__.PickleTestMemIO
class PyBytesIOTest(MemoryTestMixin, MemorySeekTestMixin, unittest.TestCase):
UnsupportedOperation = pyio.UnsupportedOperation
@staticmethod
def buftype(s):
return s.encode("ascii")
ioclass = pyio.BytesIO
EOF = b""
def test_read1(self):
buf = self.buftype("1234567890")
memio = self.ioclass(buf)
self.assertRaises(TypeError, memio.read1)
self.assertEqual(memio.read(), buf)
def test_readinto(self):
buf = self.buftype("1234567890")
memio = self.ioclass(buf)
b = bytearray(b"hello")
self.assertEqual(memio.readinto(b), 5)
self.assertEqual(b, b"12345")
self.assertEqual(memio.readinto(b), 5)
self.assertEqual(b, b"67890")
self.assertEqual(memio.readinto(b), 0)
self.assertEqual(b, b"67890")
b = bytearray(b"hello world")
memio.seek(0)
self.assertEqual(memio.readinto(b), 10)
self.assertEqual(b, b"1234567890d")
b = bytearray(b"")
memio.seek(0)
self.assertEqual(memio.readinto(b), 0)
self.assertEqual(b, b"")
self.assertRaises(TypeError, memio.readinto, '')
import array
a = array.array(b'b', b"hello world")
memio = self.ioclass(buf)
memio.readinto(a)
self.assertEqual(a.tostring(), b"1234567890d")
memio.close()
self.assertRaises(ValueError, memio.readinto, b)
memio = self.ioclass(b"123")
b = bytearray()
memio.seek(42)
memio.readinto(b)
self.assertEqual(b, b"")
def test_relative_seek(self):
buf = self.buftype("1234567890")
memio = self.ioclass(buf)
self.assertEqual(memio.seek(-1, 1), 0)
self.assertEqual(memio.seek(3, 1), 3)
self.assertEqual(memio.seek(-4, 1), 0)
self.assertEqual(memio.seek(-1, 2), 9)
self.assertEqual(memio.seek(1, 1), 10)
self.assertEqual(memio.seek(1, 2), 11)
memio.seek(-3, 2)
self.assertEqual(memio.read(), buf[-3:])
memio.seek(0)
memio.seek(1, 1)
self.assertEqual(memio.read(), buf[1:])
def test_unicode(self):
memio = self.ioclass()
self.assertRaises(TypeError, self.ioclass, "1234567890")
self.assertRaises(TypeError, memio.write, "1234567890")
self.assertRaises(TypeError, memio.writelines, ["1234567890"])
def test_bytes_array(self):
buf = b"1234567890"
import array
a = array.array(b'b', buf)
memio = self.ioclass(a)
self.assertEqual(memio.getvalue(), buf)
self.assertEqual(memio.write(a), 10)
self.assertEqual(memio.getvalue(), buf)
def test_issue5449(self):
buf = self.buftype("1234567890")
self.ioclass(initial_bytes=buf)
self.assertRaises(TypeError, self.ioclass, buf, foo=None)
class TextIOTestMixin:
def test_newlines_property(self):
memio = self.ioclass(newline=None)
# The C StringIO decodes newlines in write() calls, but the Python
# implementation only does when reading. This function forces them to
# be decoded for testing.
def force_decode():
memio.seek(0)
memio.read()
self.assertEqual(memio.newlines, None)
memio.write("a\n")
force_decode()
self.assertEqual(memio.newlines, "\n")
memio.write("b\r\n")
force_decode()
self.assertEqual(memio.newlines, ("\n", "\r\n"))
memio.write("c\rd")
force_decode()
self.assertEqual(memio.newlines, ("\r", "\n", "\r\n"))
def test_relative_seek(self):
memio = self.ioclass()
self.assertRaises(IOError, memio.seek, -1, 1)
self.assertRaises(IOError, memio.seek, 3, 1)
self.assertRaises(IOError, memio.seek, -3, 1)
self.assertRaises(IOError, memio.seek, -1, 2)
self.assertRaises(IOError, memio.seek, 1, 1)
self.assertRaises(IOError, memio.seek, 1, 2)
def test_textio_properties(self):
memio = self.ioclass()
# These are just dummy values but we nevertheless check them for fear
# of unexpected breakage.
self.assertIsNone(memio.encoding)
self.assertIsNone(memio.errors)
self.assertFalse(memio.line_buffering)
def test_newline_none(self):
# newline=None
memio = self.ioclass("a\nb\r\nc\rd", newline=None)
self.assertEqual(list(memio), ["a\n", "b\n", "c\n", "d"])
memio.seek(0)
self.assertEqual(memio.read(1), "a")
self.assertEqual(memio.read(2), "\nb")
self.assertEqual(memio.read(2), "\nc")
self.assertEqual(memio.read(1), "\n")
memio = self.ioclass(newline=None)
self.assertEqual(2, memio.write("a\n"))
self.assertEqual(3, memio.write("b\r\n"))
self.assertEqual(3, memio.write("c\rd"))
memio.seek(0)
self.assertEqual(memio.read(), "a\nb\nc\nd")
memio = self.ioclass("a\r\nb", newline=None)
self.assertEqual(memio.read(3), "a\nb")
def test_newline_empty(self):
# newline=""
memio = self.ioclass("a\nb\r\nc\rd", newline="")
self.assertEqual(list(memio), ["a\n", "b\r\n", "c\r", "d"])
memio.seek(0)
self.assertEqual(memio.read(4), "a\nb\r")
self.assertEqual(memio.read(2), "\nc")
self.assertEqual(memio.read(1), "\r")
memio = self.ioclass(newline="")
self.assertEqual(2, memio.write("a\n"))
self.assertEqual(2, memio.write("b\r"))
self.assertEqual(2, memio.write("\nc"))
self.assertEqual(2, memio.write("\rd"))
memio.seek(0)
self.assertEqual(list(memio), ["a\n", "b\r\n", "c\r", "d"])
def test_newline_lf(self):
# newline="\n"
memio = self.ioclass("a\nb\r\nc\rd")
self.assertEqual(list(memio), ["a\n", "b\r\n", "c\rd"])
def test_newline_cr(self):
# newline="\r"
memio = self.ioclass("a\nb\r\nc\rd", newline="\r")
self.assertEqual(memio.read(), "a\rb\r\rc\rd")
memio.seek(0)
self.assertEqual(list(memio), ["a\r", "b\r", "\r", "c\r", "d"])
def test_newline_crlf(self):
# newline="\r\n"
memio = self.ioclass("a\nb\r\nc\rd", newline="\r\n")
self.assertEqual(memio.read(), "a\r\nb\r\r\nc\rd")
memio.seek(0)
self.assertEqual(list(memio), ["a\r\n", "b\r\r\n", "c\rd"])
def test_issue5265(self):
# StringIO can duplicate newlines in universal newlines mode
memio = self.ioclass("a\r\nb\r\n", newline=None)
self.assertEqual(memio.read(5), "a\nb\n")
class PyStringIOTest(MemoryTestMixin, MemorySeekTestMixin,
TextIOTestMixin, unittest.TestCase):
buftype = unicode
ioclass = pyio.StringIO
UnsupportedOperation = pyio.UnsupportedOperation
EOF = ""
class PyStringIOPickleTest(TextIOTestMixin, unittest.TestCase):
"""Test if pickle restores properly the internal state of StringIO.
"""
buftype = unicode
UnsupportedOperation = pyio.UnsupportedOperation
EOF = ""
class ioclass(pyio.StringIO):
def __new__(cls, *args, **kwargs):
return pickle.loads(pickle.dumps(pyio.StringIO(*args, **kwargs)))
def __init__(self, *args, **kwargs):
pass
class CBytesIOTest(PyBytesIOTest):
ioclass = io.BytesIO
UnsupportedOperation = io.UnsupportedOperation
test_bytes_array = unittest.skip(
"array.array() does not have the new buffer API"
)(PyBytesIOTest.test_bytes_array)
def test_getstate(self):
memio = self.ioclass()
state = memio.__getstate__()
self.assertEqual(len(state), 3)
bytearray(state[0]) # Check if state[0] supports the buffer interface.
self.assertIsInstance(state[1], int)
self.assertTrue(isinstance(state[2], dict) or state[2] is None)
memio.close()
self.assertRaises(ValueError, memio.__getstate__)
def test_setstate(self):
# This checks whether __setstate__ does proper input validation.
memio = self.ioclass()
memio.__setstate__((b"no error", 0, None))
memio.__setstate__((bytearray(b"no error"), 0, None))
memio.__setstate__((b"no error", 0, {'spam': 3}))
self.assertRaises(ValueError, memio.__setstate__, (b"", -1, None))
self.assertRaises(TypeError, memio.__setstate__, ("unicode", 0, None))
self.assertRaises(TypeError, memio.__setstate__, (b"", 0.0, None))
self.assertRaises(TypeError, memio.__setstate__, (b"", 0, 0))
self.assertRaises(TypeError, memio.__setstate__, (b"len-test", 0))
self.assertRaises(TypeError, memio.__setstate__)
self.assertRaises(TypeError, memio.__setstate__, 0)
memio.close()
self.assertRaises(ValueError, memio.__setstate__, (b"closed", 0, None))
class CStringIOTest(PyStringIOTest):
ioclass = io.StringIO
UnsupportedOperation = io.UnsupportedOperation
# XXX: For the Python version of io.StringIO, this is highly
# dependent on the encoding used for the underlying buffer.
def test_widechar(self):
buf = self.buftype("\U0002030a\U00020347")
memio = self.ioclass(buf)
self.assertEqual(memio.getvalue(), buf)
self.assertEqual(memio.write(buf), len(buf))
self.assertEqual(memio.tell(), len(buf))
self.assertEqual(memio.getvalue(), buf)
self.assertEqual(memio.write(buf), len(buf))
self.assertEqual(memio.tell(), len(buf) * 2)
self.assertEqual(memio.getvalue(), buf + buf)
def test_getstate(self):
memio = self.ioclass()
state = memio.__getstate__()
self.assertEqual(len(state), 4)
self.assertIsInstance(state[0], unicode)
self.assertIsInstance(state[1], str)
self.assertIsInstance(state[2], int)
self.assertTrue(isinstance(state[3], dict) or state[3] is None)
memio.close()
self.assertRaises(ValueError, memio.__getstate__)
def test_setstate(self):
# This checks whether __setstate__ does proper input validation.
memio = self.ioclass()
memio.__setstate__(("no error", "\n", 0, None))
memio.__setstate__(("no error", "", 0, {'spam': 3}))
self.assertRaises(ValueError, memio.__setstate__, ("", "f", 0, None))
self.assertRaises(ValueError, memio.__setstate__, ("", "", -1, None))
self.assertRaises(TypeError, memio.__setstate__, (b"", "", 0, None))
# trunk is more tolerant than py3k on the type of the newline param
#self.assertRaises(TypeError, memio.__setstate__, ("", b"", 0, None))
self.assertRaises(TypeError, memio.__setstate__, ("", "", 0.0, None))
self.assertRaises(TypeError, memio.__setstate__, ("", "", 0, 0))
self.assertRaises(TypeError, memio.__setstate__, ("len-test", 0))
self.assertRaises(TypeError, memio.__setstate__)
self.assertRaises(TypeError, memio.__setstate__, 0)
memio.close()
self.assertRaises(ValueError, memio.__setstate__, ("closed", "", 0, None))
class CStringIOPickleTest(PyStringIOPickleTest):
UnsupportedOperation = io.UnsupportedOperation
class ioclass(io.StringIO):
def __new__(cls, *args, **kwargs):
return pickle.loads(pickle.dumps(io.StringIO(*args, **kwargs),
protocol=2))
def __init__(self, *args, **kwargs):
pass
def test_main():
tests = [PyBytesIOTest, PyStringIOTest, CBytesIOTest, CStringIOTest,
PyStringIOPickleTest, CStringIOPickleTest]
support.run_unittest(*tests)
if __name__ == '__main__':
test_main()
| gpl-3.0 | -2,155,229,998,592,972,500 | -3,781,181,900,301,830,700 | 35.299859 | 82 | 0.599556 | false |
rsignell-usgs/yaml2ncml | setup.py | 1 | 1966 | import os
import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = ['--verbose']
self.test_suite = True
def run_tests(self):
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
def extract_version():
version = None
fdir = os.path.dirname(__file__)
fnme = os.path.join(fdir, 'yaml2ncml', '__init__.py')
with open(fnme) as fd:
for line in fd:
if (line.startswith('__version__')):
_, version = line.split('=')
version = version.strip()[1:-1]
break
return version
rootpath = os.path.abspath(os.path.dirname(__file__))
def read(*parts):
return open(os.path.join(rootpath, *parts), 'r').read()
long_description = '{}\n{}'.format(read('README.rst'), read('CHANGES.txt'))
LICENSE = read('LICENSE.txt')
with open('requirements.txt') as f:
require = f.readlines()
install_requires = [r.strip() for r in require]
setup(name='yaml2ncml',
version=extract_version(),
packages=['yaml2ncml'],
license=LICENSE,
description='ncML aggregation from YAML specifications',
long_description=long_description,
author='Rich Signell',
author_email='[email protected]',
install_requires=install_requires,
entry_points=dict(console_scripts=[
'yaml2ncml = yaml2ncml.yaml2ncml:main']
),
url='https://github.com/rsignell-usgs/yaml2ncml',
keywords=['YAML', 'ncml'],
classifiers=['Development Status :: 4 - Beta',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'License :: OSI Approved :: MIT License'],
tests_require=['pytest'],
cmdclass=dict(test=PyTest),
zip_safe=False)
| mit | -2,253,404,292,777,648,000 | -543,378,437,452,848,200 | 29.71875 | 75 | 0.60529 | false |
harmy/kbengine | kbe/src/lib/python/Tools/scripts/texi2html.py | 48 | 70149 | #! /usr/bin/env python3
# Convert GNU texinfo files into HTML, one file per node.
# Based on Texinfo 2.14.
# Usage: texi2html [-d] [-d] [-c] inputfile outputdirectory
# The input file must be a complete texinfo file, e.g. emacs.texi.
# This creates many files (one per info node) in the output directory,
# overwriting existing files of the same name. All files created have
# ".html" as their extension.
# XXX To do:
# - handle @comment*** correctly
# - handle @xref {some words} correctly
# - handle @ftable correctly (items aren't indexed?)
# - handle @itemx properly
# - handle @exdent properly
# - add links directly to the proper line from indices
# - check against the definitive list of @-cmds; we still miss (among others):
# - @defindex (hard)
# - @c(omment) in the middle of a line (rarely used)
# - @this* (not really needed, only used in headers anyway)
# - @today{} (ever used outside title page?)
# More consistent handling of chapters/sections/etc.
# Lots of documentation
# Many more options:
# -top designate top node
# -links customize which types of links are included
# -split split at chapters or sections instead of nodes
# -name Allow different types of filename handling. Non unix systems
# will have problems with long node names
# ...
# Support the most recent texinfo version and take a good look at HTML 3.0
# More debugging output (customizable) and more flexible error handling
# How about icons ?
# rpyron 2002-05-07
# Robert Pyron <[email protected]>
# 1. BUGFIX: In function makefile(), strip blanks from the nodename.
# This is necessary to match the behavior of parser.makeref() and
# parser.do_node().
# 2. BUGFIX fixed KeyError in end_ifset (well, I may have just made
# it go away, rather than fix it)
# 3. BUGFIX allow @menu and menu items inside @ifset or @ifclear
# 4. Support added for:
# @uref URL reference
# @image image file reference (see note below)
# @multitable output an HTML table
# @vtable
# 5. Partial support for accents, to match MAKEINFO output
# 6. I added a new command-line option, '-H basename', to specify
# HTML Help output. This will cause three files to be created
# in the current directory:
# `basename`.hhp HTML Help Workshop project file
# `basename`.hhc Contents file for the project
# `basename`.hhk Index file for the project
# When fed into HTML Help Workshop, the resulting file will be
# named `basename`.chm.
# 7. A new class, HTMLHelp, to accomplish item 6.
# 8. Various calls to HTMLHelp functions.
# A NOTE ON IMAGES: Just as 'outputdirectory' must exist before
# running this program, all referenced images must already exist
# in outputdirectory.
import os
import sys
import string
import re
MAGIC = '\\input texinfo'
cmprog = re.compile('^@([a-z]+)([ \t]|$)') # Command (line-oriented)
blprog = re.compile('^[ \t]*$') # Blank line
kwprog = re.compile('@[a-z]+') # Keyword (embedded, usually
# with {} args)
spprog = re.compile('[\n@{}&<>]') # Special characters in
# running text
#
# menu item (Yuck!)
miprog = re.compile('^\* ([^:]*):(:|[ \t]*([^\t,\n.]+)([^ \t\n]*))[ \t\n]*')
# 0 1 1 2 3 34 42 0
# ----- ---------- ---------
# -|-----------------------------
# -----------------------------------------------------
class HTMLNode:
"""Some of the parser's functionality is separated into this class.
A Node accumulates its contents, takes care of links to other Nodes
and saves itself when it is finished and all links are resolved.
"""
DOCTYPE = '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">'
type = 0
cont = ''
epilogue = '</BODY></HTML>\n'
def __init__(self, dir, name, topname, title, next, prev, up):
self.dirname = dir
self.name = name
if topname:
self.topname = topname
else:
self.topname = name
self.title = title
self.next = next
self.prev = prev
self.up = up
self.lines = []
def write(self, *lines):
for line in lines:
self.lines.append(line)
def flush(self):
fp = open(self.dirname + '/' + makefile(self.name), 'w')
fp.write(self.prologue)
fp.write(self.text)
fp.write(self.epilogue)
fp.close()
def link(self, label, nodename, rel=None, rev=None):
if nodename:
if nodename.lower() == '(dir)':
addr = '../dir.html'
title = ''
else:
addr = makefile(nodename)
title = ' TITLE="%s"' % nodename
self.write(label, ': <A HREF="', addr, '"', \
rel and (' REL=' + rel) or "", \
rev and (' REV=' + rev) or "", \
title, '>', nodename, '</A> \n')
def finalize(self):
length = len(self.lines)
self.text = ''.join(self.lines)
self.lines = []
self.open_links()
self.output_links()
self.close_links()
links = ''.join(self.lines)
self.lines = []
self.prologue = (
self.DOCTYPE +
'\n<HTML><HEAD>\n'
' <!-- Converted with texi2html and Python -->\n'
' <TITLE>' + self.title + '</TITLE>\n'
' <LINK REL=Next HREF="'
+ makefile(self.next) + '" TITLE="' + self.next + '">\n'
' <LINK REL=Previous HREF="'
+ makefile(self.prev) + '" TITLE="' + self.prev + '">\n'
' <LINK REL=Up HREF="'
+ makefile(self.up) + '" TITLE="' + self.up + '">\n'
'</HEAD><BODY>\n' +
links)
if length > 20:
self.epilogue = '<P>\n%s</BODY></HTML>\n' % links
def open_links(self):
self.write('<HR>\n')
def close_links(self):
self.write('<HR>\n')
def output_links(self):
if self.cont != self.next:
self.link(' Cont', self.cont)
self.link(' Next', self.next, rel='Next')
self.link(' Prev', self.prev, rel='Previous')
self.link(' Up', self.up, rel='Up')
if self.name != self.topname:
self.link(' Top', self.topname)
class HTML3Node(HTMLNode):
DOCTYPE = '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML Level 3//EN//3.0">'
def open_links(self):
self.write('<DIV CLASS=Navigation>\n <HR>\n')
def close_links(self):
self.write(' <HR>\n</DIV>\n')
class TexinfoParser:
COPYRIGHT_SYMBOL = "©"
FN_ID_PATTERN = "(%(id)s)"
FN_SOURCE_PATTERN = '<A NAME=footnoteref%(id)s' \
' HREF="#footnotetext%(id)s">' \
+ FN_ID_PATTERN + '</A>'
FN_TARGET_PATTERN = '<A NAME=footnotetext%(id)s' \
' HREF="#footnoteref%(id)s">' \
+ FN_ID_PATTERN + '</A>\n%(text)s<P>\n'
FN_HEADER = '\n<P>\n<HR NOSHADE SIZE=1 WIDTH=200>\n' \
'<STRONG><EM>Footnotes</EM></STRONG>\n<P>'
Node = HTMLNode
# Initialize an instance
def __init__(self):
self.unknown = {} # statistics about unknown @-commands
self.filenames = {} # Check for identical filenames
self.debugging = 0 # larger values produce more output
self.print_headers = 0 # always print headers?
self.nodefp = None # open file we're writing to
self.nodelineno = 0 # Linenumber relative to node
self.links = None # Links from current node
self.savetext = None # If not None, save text head instead
self.savestack = [] # If not None, save text head instead
self.htmlhelp = None # html help data
self.dirname = 'tmp' # directory where files are created
self.includedir = '.' # directory to search @include files
self.nodename = '' # name of current node
self.topname = '' # name of top node (first node seen)
self.title = '' # title of this whole Texinfo tree
self.resetindex() # Reset all indices
self.contents = [] # Reset table of contents
self.numbering = [] # Reset section numbering counters
self.nofill = 0 # Normal operation: fill paragraphs
self.values={'html': 1} # Names that should be parsed in ifset
self.stackinfo={} # Keep track of state in the stack
# XXX The following should be reset per node?!
self.footnotes = [] # Reset list of footnotes
self.itemarg = None # Reset command used by @item
self.itemnumber = None # Reset number for @item in @enumerate
self.itemindex = None # Reset item index name
self.node = None
self.nodestack = []
self.cont = 0
self.includedepth = 0
# Set htmlhelp helper class
def sethtmlhelp(self, htmlhelp):
self.htmlhelp = htmlhelp
# Set (output) directory name
def setdirname(self, dirname):
self.dirname = dirname
# Set include directory name
def setincludedir(self, includedir):
self.includedir = includedir
# Parse the contents of an entire file
def parse(self, fp):
line = fp.readline()
lineno = 1
while line and (line[0] == '%' or blprog.match(line)):
line = fp.readline()
lineno = lineno + 1
if line[:len(MAGIC)] != MAGIC:
raise SyntaxError('file does not begin with %r' % (MAGIC,))
self.parserest(fp, lineno)
# Parse the contents of a file, not expecting a MAGIC header
def parserest(self, fp, initial_lineno):
lineno = initial_lineno
self.done = 0
self.skip = 0
self.stack = []
accu = []
while not self.done:
line = fp.readline()
self.nodelineno = self.nodelineno + 1
if not line:
if accu:
if not self.skip: self.process(accu)
accu = []
if initial_lineno > 0:
print('*** EOF before @bye')
break
lineno = lineno + 1
mo = cmprog.match(line)
if mo:
a, b = mo.span(1)
cmd = line[a:b]
if cmd in ('noindent', 'refill'):
accu.append(line)
else:
if accu:
if not self.skip:
self.process(accu)
accu = []
self.command(line, mo)
elif blprog.match(line) and \
'format' not in self.stack and \
'example' not in self.stack:
if accu:
if not self.skip:
self.process(accu)
if self.nofill:
self.write('\n')
else:
self.write('<P>\n')
accu = []
else:
# Append the line including trailing \n!
accu.append(line)
#
if self.skip:
print('*** Still skipping at the end')
if self.stack:
print('*** Stack not empty at the end')
print('***', self.stack)
if self.includedepth == 0:
while self.nodestack:
self.nodestack[-1].finalize()
self.nodestack[-1].flush()
del self.nodestack[-1]
# Start saving text in a buffer instead of writing it to a file
def startsaving(self):
if self.savetext != None:
self.savestack.append(self.savetext)
# print '*** Recursively saving text, expect trouble'
self.savetext = ''
# Return the text saved so far and start writing to file again
def collectsavings(self):
savetext = self.savetext
if len(self.savestack) > 0:
self.savetext = self.savestack[-1]
del self.savestack[-1]
else:
self.savetext = None
return savetext or ''
# Write text to file, or save it in a buffer, or ignore it
def write(self, *args):
try:
text = ''.join(args)
except:
print(args)
raise TypeError
if self.savetext != None:
self.savetext = self.savetext + text
elif self.nodefp:
self.nodefp.write(text)
elif self.node:
self.node.write(text)
# Complete the current node -- write footnotes and close file
def endnode(self):
if self.savetext != None:
print('*** Still saving text at end of node')
dummy = self.collectsavings()
if self.footnotes:
self.writefootnotes()
if self.nodefp:
if self.nodelineno > 20:
self.write('<HR>\n')
[name, next, prev, up] = self.nodelinks[:4]
self.link('Next', next)
self.link('Prev', prev)
self.link('Up', up)
if self.nodename != self.topname:
self.link('Top', self.topname)
self.write('<HR>\n')
self.write('</BODY>\n')
self.nodefp.close()
self.nodefp = None
elif self.node:
if not self.cont and \
(not self.node.type or \
(self.node.next and self.node.prev and self.node.up)):
self.node.finalize()
self.node.flush()
else:
self.nodestack.append(self.node)
self.node = None
self.nodename = ''
# Process a list of lines, expanding embedded @-commands
# This mostly distinguishes between menus and normal text
def process(self, accu):
if self.debugging > 1:
print('!'*self.debugging, 'process:', self.skip, self.stack, end=' ')
if accu: print(accu[0][:30], end=' ')
if accu[0][30:] or accu[1:]: print('...', end=' ')
print()
if self.inmenu():
# XXX should be done differently
for line in accu:
mo = miprog.match(line)
if not mo:
line = line.strip() + '\n'
self.expand(line)
continue
bgn, end = mo.span(0)
a, b = mo.span(1)
c, d = mo.span(2)
e, f = mo.span(3)
g, h = mo.span(4)
label = line[a:b]
nodename = line[c:d]
if nodename[0] == ':': nodename = label
else: nodename = line[e:f]
punct = line[g:h]
self.write(' <LI><A HREF="',
makefile(nodename),
'">', nodename,
'</A>', punct, '\n')
self.htmlhelp.menuitem(nodename)
self.expand(line[end:])
else:
text = ''.join(accu)
self.expand(text)
# find 'menu' (we might be inside 'ifset' or 'ifclear')
def inmenu(self):
#if 'menu' in self.stack:
# print 'inmenu :', self.skip, self.stack, self.stackinfo
stack = self.stack
while stack and stack[-1] in ('ifset','ifclear'):
try:
if self.stackinfo[len(stack)]:
return 0
except KeyError:
pass
stack = stack[:-1]
return (stack and stack[-1] == 'menu')
# Write a string, expanding embedded @-commands
def expand(self, text):
stack = []
i = 0
n = len(text)
while i < n:
start = i
mo = spprog.search(text, i)
if mo:
i = mo.start()
else:
self.write(text[start:])
break
self.write(text[start:i])
c = text[i]
i = i+1
if c == '\n':
self.write('\n')
continue
if c == '<':
self.write('<')
continue
if c == '>':
self.write('>')
continue
if c == '&':
self.write('&')
continue
if c == '{':
stack.append('')
continue
if c == '}':
if not stack:
print('*** Unmatched }')
self.write('}')
continue
cmd = stack[-1]
del stack[-1]
try:
method = getattr(self, 'close_' + cmd)
except AttributeError:
self.unknown_close(cmd)
continue
method()
continue
if c != '@':
# Cannot happen unless spprog is changed
raise RuntimeError('unexpected funny %r' % c)
start = i
while i < n and text[i] in string.ascii_letters: i = i+1
if i == start:
# @ plus non-letter: literal next character
i = i+1
c = text[start:i]
if c == ':':
# `@:' means no extra space after
# preceding `.', `?', `!' or `:'
pass
else:
# `@.' means a sentence-ending period;
# `@@', `@{', `@}' quote `@', `{', `}'
self.write(c)
continue
cmd = text[start:i]
if i < n and text[i] == '{':
i = i+1
stack.append(cmd)
try:
method = getattr(self, 'open_' + cmd)
except AttributeError:
self.unknown_open(cmd)
continue
method()
continue
try:
method = getattr(self, 'handle_' + cmd)
except AttributeError:
self.unknown_handle(cmd)
continue
method()
if stack:
print('*** Stack not empty at para:', stack)
# --- Handle unknown embedded @-commands ---
def unknown_open(self, cmd):
print('*** No open func for @' + cmd + '{...}')
cmd = cmd + '{'
self.write('@', cmd)
if cmd not in self.unknown:
self.unknown[cmd] = 1
else:
self.unknown[cmd] = self.unknown[cmd] + 1
def unknown_close(self, cmd):
print('*** No close func for @' + cmd + '{...}')
cmd = '}' + cmd
self.write('}')
if cmd not in self.unknown:
self.unknown[cmd] = 1
else:
self.unknown[cmd] = self.unknown[cmd] + 1
def unknown_handle(self, cmd):
print('*** No handler for @' + cmd)
self.write('@', cmd)
if cmd not in self.unknown:
self.unknown[cmd] = 1
else:
self.unknown[cmd] = self.unknown[cmd] + 1
# XXX The following sections should be ordered as the texinfo docs
# --- Embedded @-commands without {} argument list --
def handle_noindent(self): pass
def handle_refill(self): pass
# --- Include file handling ---
def do_include(self, args):
file = args
file = os.path.join(self.includedir, file)
try:
fp = open(file, 'r')
except IOError as msg:
print('*** Can\'t open include file', repr(file))
return
print('!'*self.debugging, '--> file', repr(file))
save_done = self.done
save_skip = self.skip
save_stack = self.stack
self.includedepth = self.includedepth + 1
self.parserest(fp, 0)
self.includedepth = self.includedepth - 1
fp.close()
self.done = save_done
self.skip = save_skip
self.stack = save_stack
print('!'*self.debugging, '<-- file', repr(file))
# --- Special Insertions ---
def open_dmn(self): pass
def close_dmn(self): pass
def open_dots(self): self.write('...')
def close_dots(self): pass
def open_bullet(self): pass
def close_bullet(self): pass
def open_TeX(self): self.write('TeX')
def close_TeX(self): pass
def handle_copyright(self): self.write(self.COPYRIGHT_SYMBOL)
def open_copyright(self): self.write(self.COPYRIGHT_SYMBOL)
def close_copyright(self): pass
def open_minus(self): self.write('-')
def close_minus(self): pass
# --- Accents ---
# rpyron 2002-05-07
# I would like to do at least as well as makeinfo when
# it is producing HTML output:
#
# input output
# @"o @"o umlaut accent
# @'o 'o acute accent
# @,{c} @,{c} cedilla accent
# @=o @=o macron/overbar accent
# @^o @^o circumflex accent
# @`o `o grave accent
# @~o @~o tilde accent
# @dotaccent{o} @dotaccent{o} overdot accent
# @H{o} @H{o} long Hungarian umlaut
# @ringaccent{o} @ringaccent{o} ring accent
# @tieaccent{oo} @tieaccent{oo} tie-after accent
# @u{o} @u{o} breve accent
# @ubaraccent{o} @ubaraccent{o} underbar accent
# @udotaccent{o} @udotaccent{o} underdot accent
# @v{o} @v{o} hacek or check accent
# @exclamdown{} ¡ upside-down !
# @questiondown{} ¿ upside-down ?
# @aa{},@AA{} å,Å a,A with circle
# @ae{},@AE{} æ,Æ ae,AE ligatures
# @dotless{i} @dotless{i} dotless i
# @dotless{j} @dotless{j} dotless j
# @l{},@L{} l/,L/ suppressed-L,l
# @o{},@O{} ø,Ø O,o with slash
# @oe{},@OE{} oe,OE oe,OE ligatures
# @ss{} ß es-zet or sharp S
#
# The following character codes and approximations have been
# copied from makeinfo's HTML output.
def open_exclamdown(self): self.write('¡') # upside-down !
def close_exclamdown(self): pass
def open_questiondown(self): self.write('¿') # upside-down ?
def close_questiondown(self): pass
def open_aa(self): self.write('å') # a with circle
def close_aa(self): pass
def open_AA(self): self.write('Å') # A with circle
def close_AA(self): pass
def open_ae(self): self.write('æ') # ae ligatures
def close_ae(self): pass
def open_AE(self): self.write('Æ') # AE ligatures
def close_AE(self): pass
def open_o(self): self.write('ø') # o with slash
def close_o(self): pass
def open_O(self): self.write('Ø') # O with slash
def close_O(self): pass
def open_ss(self): self.write('ß') # es-zet or sharp S
def close_ss(self): pass
def open_oe(self): self.write('oe') # oe ligatures
def close_oe(self): pass
def open_OE(self): self.write('OE') # OE ligatures
def close_OE(self): pass
def open_l(self): self.write('l/') # suppressed-l
def close_l(self): pass
def open_L(self): self.write('L/') # suppressed-L
def close_L(self): pass
# --- Special Glyphs for Examples ---
def open_result(self): self.write('=>')
def close_result(self): pass
def open_expansion(self): self.write('==>')
def close_expansion(self): pass
def open_print(self): self.write('-|')
def close_print(self): pass
def open_error(self): self.write('error-->')
def close_error(self): pass
def open_equiv(self): self.write('==')
def close_equiv(self): pass
def open_point(self): self.write('-!-')
def close_point(self): pass
# --- Cross References ---
def open_pxref(self):
self.write('see ')
self.startsaving()
def close_pxref(self):
self.makeref()
def open_xref(self):
self.write('See ')
self.startsaving()
def close_xref(self):
self.makeref()
def open_ref(self):
self.startsaving()
def close_ref(self):
self.makeref()
def open_inforef(self):
self.write('See info file ')
self.startsaving()
def close_inforef(self):
text = self.collectsavings()
args = [s.strip() for s in text.split(',')]
while len(args) < 3: args.append('')
node = args[0]
file = args[2]
self.write('`', file, '\', node `', node, '\'')
def makeref(self):
text = self.collectsavings()
args = [s.strip() for s in text.split(',')]
while len(args) < 5: args.append('')
nodename = label = args[0]
if args[2]: label = args[2]
file = args[3]
title = args[4]
href = makefile(nodename)
if file:
href = '../' + file + '/' + href
self.write('<A HREF="', href, '">', label, '</A>')
# rpyron 2002-05-07 uref support
def open_uref(self):
self.startsaving()
def close_uref(self):
text = self.collectsavings()
args = [s.strip() for s in text.split(',')]
while len(args) < 2: args.append('')
href = args[0]
label = args[1]
if not label: label = href
self.write('<A HREF="', href, '">', label, '</A>')
# rpyron 2002-05-07 image support
# GNU makeinfo producing HTML output tries `filename.png'; if
# that does not exist, it tries `filename.jpg'. If that does
# not exist either, it complains. GNU makeinfo does not handle
# GIF files; however, I include GIF support here because
# MySQL documentation uses GIF files.
def open_image(self):
self.startsaving()
def close_image(self):
self.makeimage()
def makeimage(self):
text = self.collectsavings()
args = [s.strip() for s in text.split(',')]
while len(args) < 5: args.append('')
filename = args[0]
width = args[1]
height = args[2]
alt = args[3]
ext = args[4]
# The HTML output will have a reference to the image
# that is relative to the HTML output directory,
# which is what 'filename' gives us. However, we need
# to find it relative to our own current directory,
# so we construct 'imagename'.
imagelocation = self.dirname + '/' + filename
if os.path.exists(imagelocation+'.png'):
filename += '.png'
elif os.path.exists(imagelocation+'.jpg'):
filename += '.jpg'
elif os.path.exists(imagelocation+'.gif'): # MySQL uses GIF files
filename += '.gif'
else:
print("*** Cannot find image " + imagelocation)
#TODO: what is 'ext'?
self.write('<IMG SRC="', filename, '"', \
width and (' WIDTH="' + width + '"') or "", \
height and (' HEIGHT="' + height + '"') or "", \
alt and (' ALT="' + alt + '"') or "", \
'/>' )
self.htmlhelp.addimage(imagelocation)
# --- Marking Words and Phrases ---
# --- Other @xxx{...} commands ---
def open_(self): pass # Used by {text enclosed in braces}
def close_(self): pass
open_asis = open_
close_asis = close_
def open_cite(self): self.write('<CITE>')
def close_cite(self): self.write('</CITE>')
def open_code(self): self.write('<CODE>')
def close_code(self): self.write('</CODE>')
def open_t(self): self.write('<TT>')
def close_t(self): self.write('</TT>')
def open_dfn(self): self.write('<DFN>')
def close_dfn(self): self.write('</DFN>')
def open_emph(self): self.write('<EM>')
def close_emph(self): self.write('</EM>')
def open_i(self): self.write('<I>')
def close_i(self): self.write('</I>')
def open_footnote(self):
# if self.savetext <> None:
# print '*** Recursive footnote -- expect weirdness'
id = len(self.footnotes) + 1
self.write(self.FN_SOURCE_PATTERN % {'id': repr(id)})
self.startsaving()
def close_footnote(self):
id = len(self.footnotes) + 1
self.footnotes.append((id, self.collectsavings()))
def writefootnotes(self):
self.write(self.FN_HEADER)
for id, text in self.footnotes:
self.write(self.FN_TARGET_PATTERN
% {'id': repr(id), 'text': text})
self.footnotes = []
def open_file(self): self.write('<CODE>')
def close_file(self): self.write('</CODE>')
def open_kbd(self): self.write('<KBD>')
def close_kbd(self): self.write('</KBD>')
def open_key(self): self.write('<KEY>')
def close_key(self): self.write('</KEY>')
def open_r(self): self.write('<R>')
def close_r(self): self.write('</R>')
def open_samp(self): self.write('`<SAMP>')
def close_samp(self): self.write('</SAMP>\'')
def open_sc(self): self.write('<SMALLCAPS>')
def close_sc(self): self.write('</SMALLCAPS>')
def open_strong(self): self.write('<STRONG>')
def close_strong(self): self.write('</STRONG>')
def open_b(self): self.write('<B>')
def close_b(self): self.write('</B>')
def open_var(self): self.write('<VAR>')
def close_var(self): self.write('</VAR>')
def open_w(self): self.write('<NOBREAK>')
def close_w(self): self.write('</NOBREAK>')
def open_url(self): self.startsaving()
def close_url(self):
text = self.collectsavings()
self.write('<A HREF="', text, '">', text, '</A>')
def open_email(self): self.startsaving()
def close_email(self):
text = self.collectsavings()
self.write('<A HREF="mailto:', text, '">', text, '</A>')
open_titlefont = open_
close_titlefont = close_
def open_small(self): pass
def close_small(self): pass
def command(self, line, mo):
a, b = mo.span(1)
cmd = line[a:b]
args = line[b:].strip()
if self.debugging > 1:
print('!'*self.debugging, 'command:', self.skip, self.stack, \
'@' + cmd, args)
try:
func = getattr(self, 'do_' + cmd)
except AttributeError:
try:
func = getattr(self, 'bgn_' + cmd)
except AttributeError:
# don't complain if we are skipping anyway
if not self.skip:
self.unknown_cmd(cmd, args)
return
self.stack.append(cmd)
func(args)
return
if not self.skip or cmd == 'end':
func(args)
def unknown_cmd(self, cmd, args):
print('*** unknown', '@' + cmd, args)
if cmd not in self.unknown:
self.unknown[cmd] = 1
else:
self.unknown[cmd] = self.unknown[cmd] + 1
def do_end(self, args):
words = args.split()
if not words:
print('*** @end w/o args')
else:
cmd = words[0]
if not self.stack or self.stack[-1] != cmd:
print('*** @end', cmd, 'unexpected')
else:
del self.stack[-1]
try:
func = getattr(self, 'end_' + cmd)
except AttributeError:
self.unknown_end(cmd)
return
func()
def unknown_end(self, cmd):
cmd = 'end ' + cmd
print('*** unknown', '@' + cmd)
if cmd not in self.unknown:
self.unknown[cmd] = 1
else:
self.unknown[cmd] = self.unknown[cmd] + 1
# --- Comments ---
def do_comment(self, args): pass
do_c = do_comment
# --- Conditional processing ---
def bgn_ifinfo(self, args): pass
def end_ifinfo(self): pass
def bgn_iftex(self, args): self.skip = self.skip + 1
def end_iftex(self): self.skip = self.skip - 1
def bgn_ignore(self, args): self.skip = self.skip + 1
def end_ignore(self): self.skip = self.skip - 1
def bgn_tex(self, args): self.skip = self.skip + 1
def end_tex(self): self.skip = self.skip - 1
def do_set(self, args):
fields = args.split(' ')
key = fields[0]
if len(fields) == 1:
value = 1
else:
value = ' '.join(fields[1:])
self.values[key] = value
def do_clear(self, args):
self.values[args] = None
def bgn_ifset(self, args):
if args not in self.values or self.values[args] is None:
self.skip = self.skip + 1
self.stackinfo[len(self.stack)] = 1
else:
self.stackinfo[len(self.stack)] = 0
def end_ifset(self):
try:
if self.stackinfo[len(self.stack) + 1]:
self.skip = self.skip - 1
del self.stackinfo[len(self.stack) + 1]
except KeyError:
print('*** end_ifset: KeyError :', len(self.stack) + 1)
def bgn_ifclear(self, args):
if args in self.values and self.values[args] is not None:
self.skip = self.skip + 1
self.stackinfo[len(self.stack)] = 1
else:
self.stackinfo[len(self.stack)] = 0
def end_ifclear(self):
try:
if self.stackinfo[len(self.stack) + 1]:
self.skip = self.skip - 1
del self.stackinfo[len(self.stack) + 1]
except KeyError:
print('*** end_ifclear: KeyError :', len(self.stack) + 1)
def open_value(self):
self.startsaving()
def close_value(self):
key = self.collectsavings()
if key in self.values:
self.write(self.values[key])
else:
print('*** Undefined value: ', key)
# --- Beginning a file ---
do_finalout = do_comment
do_setchapternewpage = do_comment
do_setfilename = do_comment
def do_settitle(self, args):
self.startsaving()
self.expand(args)
self.title = self.collectsavings()
def do_parskip(self, args): pass
# --- Ending a file ---
def do_bye(self, args):
self.endnode()
self.done = 1
# --- Title page ---
def bgn_titlepage(self, args): self.skip = self.skip + 1
def end_titlepage(self): self.skip = self.skip - 1
def do_shorttitlepage(self, args): pass
def do_center(self, args):
# Actually not used outside title page...
self.write('<H1>')
self.expand(args)
self.write('</H1>\n')
do_title = do_center
do_subtitle = do_center
do_author = do_center
do_vskip = do_comment
do_vfill = do_comment
do_smallbook = do_comment
do_paragraphindent = do_comment
do_setchapternewpage = do_comment
do_headings = do_comment
do_footnotestyle = do_comment
do_evenheading = do_comment
do_evenfooting = do_comment
do_oddheading = do_comment
do_oddfooting = do_comment
do_everyheading = do_comment
do_everyfooting = do_comment
# --- Nodes ---
def do_node(self, args):
self.endnode()
self.nodelineno = 0
parts = [s.strip() for s in args.split(',')]
while len(parts) < 4: parts.append('')
self.nodelinks = parts
[name, next, prev, up] = parts[:4]
file = self.dirname + '/' + makefile(name)
if file in self.filenames:
print('*** Filename already in use: ', file)
else:
if self.debugging: print('!'*self.debugging, '--- writing', file)
self.filenames[file] = 1
# self.nodefp = open(file, 'w')
self.nodename = name
if self.cont and self.nodestack:
self.nodestack[-1].cont = self.nodename
if not self.topname: self.topname = name
title = name
if self.title: title = title + ' -- ' + self.title
self.node = self.Node(self.dirname, self.nodename, self.topname,
title, next, prev, up)
self.htmlhelp.addnode(self.nodename,next,prev,up,file)
def link(self, label, nodename):
if nodename:
if nodename.lower() == '(dir)':
addr = '../dir.html'
else:
addr = makefile(nodename)
self.write(label, ': <A HREF="', addr, '" TYPE="',
label, '">', nodename, '</A> \n')
# --- Sectioning commands ---
def popstack(self, type):
if (self.node):
self.node.type = type
while self.nodestack:
if self.nodestack[-1].type > type:
self.nodestack[-1].finalize()
self.nodestack[-1].flush()
del self.nodestack[-1]
elif self.nodestack[-1].type == type:
if not self.nodestack[-1].next:
self.nodestack[-1].next = self.node.name
if not self.node.prev:
self.node.prev = self.nodestack[-1].name
self.nodestack[-1].finalize()
self.nodestack[-1].flush()
del self.nodestack[-1]
else:
if type > 1 and not self.node.up:
self.node.up = self.nodestack[-1].name
break
def do_chapter(self, args):
self.heading('H1', args, 0)
self.popstack(1)
def do_unnumbered(self, args):
self.heading('H1', args, -1)
self.popstack(1)
def do_appendix(self, args):
self.heading('H1', args, -1)
self.popstack(1)
def do_top(self, args):
self.heading('H1', args, -1)
def do_chapheading(self, args):
self.heading('H1', args, -1)
def do_majorheading(self, args):
self.heading('H1', args, -1)
def do_section(self, args):
self.heading('H1', args, 1)
self.popstack(2)
def do_unnumberedsec(self, args):
self.heading('H1', args, -1)
self.popstack(2)
def do_appendixsec(self, args):
self.heading('H1', args, -1)
self.popstack(2)
do_appendixsection = do_appendixsec
def do_heading(self, args):
self.heading('H1', args, -1)
def do_subsection(self, args):
self.heading('H2', args, 2)
self.popstack(3)
def do_unnumberedsubsec(self, args):
self.heading('H2', args, -1)
self.popstack(3)
def do_appendixsubsec(self, args):
self.heading('H2', args, -1)
self.popstack(3)
def do_subheading(self, args):
self.heading('H2', args, -1)
def do_subsubsection(self, args):
self.heading('H3', args, 3)
self.popstack(4)
def do_unnumberedsubsubsec(self, args):
self.heading('H3', args, -1)
self.popstack(4)
def do_appendixsubsubsec(self, args):
self.heading('H3', args, -1)
self.popstack(4)
def do_subsubheading(self, args):
self.heading('H3', args, -1)
def heading(self, type, args, level):
if level >= 0:
while len(self.numbering) <= level:
self.numbering.append(0)
del self.numbering[level+1:]
self.numbering[level] = self.numbering[level] + 1
x = ''
for i in self.numbering:
x = x + repr(i) + '.'
args = x + ' ' + args
self.contents.append((level, args, self.nodename))
self.write('<', type, '>')
self.expand(args)
self.write('</', type, '>\n')
if self.debugging or self.print_headers:
print('---', args)
def do_contents(self, args):
# pass
self.listcontents('Table of Contents', 999)
def do_shortcontents(self, args):
pass
# self.listcontents('Short Contents', 0)
do_summarycontents = do_shortcontents
def listcontents(self, title, maxlevel):
self.write('<H1>', title, '</H1>\n<UL COMPACT PLAIN>\n')
prevlevels = [0]
for level, title, node in self.contents:
if level > maxlevel:
continue
if level > prevlevels[-1]:
# can only advance one level at a time
self.write(' '*prevlevels[-1], '<UL PLAIN>\n')
prevlevels.append(level)
elif level < prevlevels[-1]:
# might drop back multiple levels
while level < prevlevels[-1]:
del prevlevels[-1]
self.write(' '*prevlevels[-1],
'</UL>\n')
self.write(' '*level, '<LI> <A HREF="',
makefile(node), '">')
self.expand(title)
self.write('</A>\n')
self.write('</UL>\n' * len(prevlevels))
# --- Page lay-out ---
# These commands are only meaningful in printed text
def do_page(self, args): pass
def do_need(self, args): pass
def bgn_group(self, args): pass
def end_group(self): pass
# --- Line lay-out ---
def do_sp(self, args):
if self.nofill:
self.write('\n')
else:
self.write('<P>\n')
def do_hline(self, args):
self.write('<HR>')
# --- Function and variable definitions ---
def bgn_deffn(self, args):
self.write('<DL>')
self.do_deffnx(args)
def end_deffn(self):
self.write('</DL>\n')
def do_deffnx(self, args):
self.write('<DT>')
words = splitwords(args, 2)
[category, name], rest = words[:2], words[2:]
self.expand('@b{%s}' % name)
for word in rest: self.expand(' ' + makevar(word))
#self.expand(' -- ' + category)
self.write('\n<DD>')
self.index('fn', name)
def bgn_defun(self, args): self.bgn_deffn('Function ' + args)
end_defun = end_deffn
def do_defunx(self, args): self.do_deffnx('Function ' + args)
def bgn_defmac(self, args): self.bgn_deffn('Macro ' + args)
end_defmac = end_deffn
def do_defmacx(self, args): self.do_deffnx('Macro ' + args)
def bgn_defspec(self, args): self.bgn_deffn('{Special Form} ' + args)
end_defspec = end_deffn
def do_defspecx(self, args): self.do_deffnx('{Special Form} ' + args)
def bgn_defvr(self, args):
self.write('<DL>')
self.do_defvrx(args)
end_defvr = end_deffn
def do_defvrx(self, args):
self.write('<DT>')
words = splitwords(args, 2)
[category, name], rest = words[:2], words[2:]
self.expand('@code{%s}' % name)
# If there are too many arguments, show them
for word in rest: self.expand(' ' + word)
#self.expand(' -- ' + category)
self.write('\n<DD>')
self.index('vr', name)
def bgn_defvar(self, args): self.bgn_defvr('Variable ' + args)
end_defvar = end_defvr
def do_defvarx(self, args): self.do_defvrx('Variable ' + args)
def bgn_defopt(self, args): self.bgn_defvr('{User Option} ' + args)
end_defopt = end_defvr
def do_defoptx(self, args): self.do_defvrx('{User Option} ' + args)
# --- Ditto for typed languages ---
def bgn_deftypefn(self, args):
self.write('<DL>')
self.do_deftypefnx(args)
end_deftypefn = end_deffn
def do_deftypefnx(self, args):
self.write('<DT>')
words = splitwords(args, 3)
[category, datatype, name], rest = words[:3], words[3:]
self.expand('@code{%s} @b{%s}' % (datatype, name))
for word in rest: self.expand(' ' + makevar(word))
#self.expand(' -- ' + category)
self.write('\n<DD>')
self.index('fn', name)
def bgn_deftypefun(self, args): self.bgn_deftypefn('Function ' + args)
end_deftypefun = end_deftypefn
def do_deftypefunx(self, args): self.do_deftypefnx('Function ' + args)
def bgn_deftypevr(self, args):
self.write('<DL>')
self.do_deftypevrx(args)
end_deftypevr = end_deftypefn
def do_deftypevrx(self, args):
self.write('<DT>')
words = splitwords(args, 3)
[category, datatype, name], rest = words[:3], words[3:]
self.expand('@code{%s} @b{%s}' % (datatype, name))
# If there are too many arguments, show them
for word in rest: self.expand(' ' + word)
#self.expand(' -- ' + category)
self.write('\n<DD>')
self.index('fn', name)
def bgn_deftypevar(self, args):
self.bgn_deftypevr('Variable ' + args)
end_deftypevar = end_deftypevr
def do_deftypevarx(self, args):
self.do_deftypevrx('Variable ' + args)
# --- Ditto for object-oriented languages ---
def bgn_defcv(self, args):
self.write('<DL>')
self.do_defcvx(args)
end_defcv = end_deftypevr
def do_defcvx(self, args):
self.write('<DT>')
words = splitwords(args, 3)
[category, classname, name], rest = words[:3], words[3:]
self.expand('@b{%s}' % name)
# If there are too many arguments, show them
for word in rest: self.expand(' ' + word)
#self.expand(' -- %s of @code{%s}' % (category, classname))
self.write('\n<DD>')
self.index('vr', '%s @r{on %s}' % (name, classname))
def bgn_defivar(self, args):
self.bgn_defcv('{Instance Variable} ' + args)
end_defivar = end_defcv
def do_defivarx(self, args):
self.do_defcvx('{Instance Variable} ' + args)
def bgn_defop(self, args):
self.write('<DL>')
self.do_defopx(args)
end_defop = end_defcv
def do_defopx(self, args):
self.write('<DT>')
words = splitwords(args, 3)
[category, classname, name], rest = words[:3], words[3:]
self.expand('@b{%s}' % name)
for word in rest: self.expand(' ' + makevar(word))
#self.expand(' -- %s of @code{%s}' % (category, classname))
self.write('\n<DD>')
self.index('fn', '%s @r{on %s}' % (name, classname))
def bgn_defmethod(self, args):
self.bgn_defop('Method ' + args)
end_defmethod = end_defop
def do_defmethodx(self, args):
self.do_defopx('Method ' + args)
# --- Ditto for data types ---
def bgn_deftp(self, args):
self.write('<DL>')
self.do_deftpx(args)
end_deftp = end_defcv
def do_deftpx(self, args):
self.write('<DT>')
words = splitwords(args, 2)
[category, name], rest = words[:2], words[2:]
self.expand('@b{%s}' % name)
for word in rest: self.expand(' ' + word)
#self.expand(' -- ' + category)
self.write('\n<DD>')
self.index('tp', name)
# --- Making Lists and Tables
def bgn_enumerate(self, args):
if not args:
self.write('<OL>\n')
self.stackinfo[len(self.stack)] = '</OL>\n'
else:
self.itemnumber = args
self.write('<UL>\n')
self.stackinfo[len(self.stack)] = '</UL>\n'
def end_enumerate(self):
self.itemnumber = None
self.write(self.stackinfo[len(self.stack) + 1])
del self.stackinfo[len(self.stack) + 1]
def bgn_itemize(self, args):
self.itemarg = args
self.write('<UL>\n')
def end_itemize(self):
self.itemarg = None
self.write('</UL>\n')
def bgn_table(self, args):
self.itemarg = args
self.write('<DL>\n')
def end_table(self):
self.itemarg = None
self.write('</DL>\n')
def bgn_ftable(self, args):
self.itemindex = 'fn'
self.bgn_table(args)
def end_ftable(self):
self.itemindex = None
self.end_table()
def bgn_vtable(self, args):
self.itemindex = 'vr'
self.bgn_table(args)
def end_vtable(self):
self.itemindex = None
self.end_table()
def do_item(self, args):
if self.itemindex: self.index(self.itemindex, args)
if self.itemarg:
if self.itemarg[0] == '@' and self.itemarg[1] and \
self.itemarg[1] in string.ascii_letters:
args = self.itemarg + '{' + args + '}'
else:
# some other character, e.g. '-'
args = self.itemarg + ' ' + args
if self.itemnumber != None:
args = self.itemnumber + '. ' + args
self.itemnumber = increment(self.itemnumber)
if self.stack and self.stack[-1] == 'table':
self.write('<DT>')
self.expand(args)
self.write('\n<DD>')
elif self.stack and self.stack[-1] == 'multitable':
self.write('<TR><TD>')
self.expand(args)
self.write('</TD>\n</TR>\n')
else:
self.write('<LI>')
self.expand(args)
self.write(' ')
do_itemx = do_item # XXX Should suppress leading blank line
# rpyron 2002-05-07 multitable support
def bgn_multitable(self, args):
self.itemarg = None # should be handled by columnfractions
self.write('<TABLE BORDER="">\n')
def end_multitable(self):
self.itemarg = None
self.write('</TABLE>\n<BR>\n')
def handle_columnfractions(self):
# It would be better to handle this, but for now it's in the way...
self.itemarg = None
def handle_tab(self):
self.write('</TD>\n <TD>')
# --- Enumerations, displays, quotations ---
# XXX Most of these should increase the indentation somehow
def bgn_quotation(self, args): self.write('<BLOCKQUOTE>')
def end_quotation(self): self.write('</BLOCKQUOTE>\n')
def bgn_example(self, args):
self.nofill = self.nofill + 1
self.write('<PRE>')
def end_example(self):
self.write('</PRE>\n')
self.nofill = self.nofill - 1
bgn_lisp = bgn_example # Synonym when contents are executable lisp code
end_lisp = end_example
bgn_smallexample = bgn_example # XXX Should use smaller font
end_smallexample = end_example
bgn_smalllisp = bgn_lisp # Ditto
end_smalllisp = end_lisp
bgn_display = bgn_example
end_display = end_example
bgn_format = bgn_display
end_format = end_display
def do_exdent(self, args): self.expand(args + '\n')
# XXX Should really mess with indentation
def bgn_flushleft(self, args):
self.nofill = self.nofill + 1
self.write('<PRE>\n')
def end_flushleft(self):
self.write('</PRE>\n')
self.nofill = self.nofill - 1
def bgn_flushright(self, args):
self.nofill = self.nofill + 1
self.write('<ADDRESS COMPACT>\n')
def end_flushright(self):
self.write('</ADDRESS>\n')
self.nofill = self.nofill - 1
def bgn_menu(self, args):
self.write('<DIR>\n')
self.write(' <STRONG><EM>Menu</EM></STRONG><P>\n')
self.htmlhelp.beginmenu()
def end_menu(self):
self.write('</DIR>\n')
self.htmlhelp.endmenu()
def bgn_cartouche(self, args): pass
def end_cartouche(self): pass
# --- Indices ---
def resetindex(self):
self.noncodeindices = ['cp']
self.indextitle = {}
self.indextitle['cp'] = 'Concept'
self.indextitle['fn'] = 'Function'
self.indextitle['ky'] = 'Keyword'
self.indextitle['pg'] = 'Program'
self.indextitle['tp'] = 'Type'
self.indextitle['vr'] = 'Variable'
#
self.whichindex = {}
for name in self.indextitle:
self.whichindex[name] = []
def user_index(self, name, args):
if name in self.whichindex:
self.index(name, args)
else:
print('*** No index named', repr(name))
def do_cindex(self, args): self.index('cp', args)
def do_findex(self, args): self.index('fn', args)
def do_kindex(self, args): self.index('ky', args)
def do_pindex(self, args): self.index('pg', args)
def do_tindex(self, args): self.index('tp', args)
def do_vindex(self, args): self.index('vr', args)
def index(self, name, args):
self.whichindex[name].append((args, self.nodename))
self.htmlhelp.index(args, self.nodename)
def do_synindex(self, args):
words = args.split()
if len(words) != 2:
print('*** bad @synindex', args)
return
[old, new] = words
if old not in self.whichindex or \
new not in self.whichindex:
print('*** bad key(s) in @synindex', args)
return
if old != new and \
self.whichindex[old] is not self.whichindex[new]:
inew = self.whichindex[new]
inew[len(inew):] = self.whichindex[old]
self.whichindex[old] = inew
do_syncodeindex = do_synindex # XXX Should use code font
def do_printindex(self, args):
words = args.split()
for name in words:
if name in self.whichindex:
self.prindex(name)
else:
print('*** No index named', repr(name))
def prindex(self, name):
iscodeindex = (name not in self.noncodeindices)
index = self.whichindex[name]
if not index: return
if self.debugging:
print('!'*self.debugging, '--- Generating', \
self.indextitle[name], 'index')
# The node already provides a title
index1 = []
junkprog = re.compile('^(@[a-z]+)?{')
for key, node in index:
sortkey = key.lower()
# Remove leading `@cmd{' from sort key
# -- don't bother about the matching `}'
oldsortkey = sortkey
while 1:
mo = junkprog.match(sortkey)
if not mo:
break
i = mo.end()
sortkey = sortkey[i:]
index1.append((sortkey, key, node))
del index[:]
index1.sort()
self.write('<DL COMPACT>\n')
prevkey = prevnode = None
for sortkey, key, node in index1:
if (key, node) == (prevkey, prevnode):
continue
if self.debugging > 1: print('!'*self.debugging, key, ':', node)
self.write('<DT>')
if iscodeindex: key = '@code{' + key + '}'
if key != prevkey:
self.expand(key)
self.write('\n<DD><A HREF="%s">%s</A>\n' % (makefile(node), node))
prevkey, prevnode = key, node
self.write('</DL>\n')
# --- Final error reports ---
def report(self):
if self.unknown:
print('--- Unrecognized commands ---')
cmds = sorted(self.unknown.keys())
for cmd in cmds:
print(cmd.ljust(20), self.unknown[cmd])
class TexinfoParserHTML3(TexinfoParser):
COPYRIGHT_SYMBOL = "©"
FN_ID_PATTERN = "[%(id)s]"
FN_SOURCE_PATTERN = '<A ID=footnoteref%(id)s ' \
'HREF="#footnotetext%(id)s">' + FN_ID_PATTERN + '</A>'
FN_TARGET_PATTERN = '<FN ID=footnotetext%(id)s>\n' \
'<P><A HREF="#footnoteref%(id)s">' + FN_ID_PATTERN \
+ '</A>\n%(text)s</P></FN>\n'
FN_HEADER = '<DIV CLASS=footnotes>\n <HR NOSHADE WIDTH=200>\n' \
' <STRONG><EM>Footnotes</EM></STRONG>\n <P>\n'
Node = HTML3Node
def bgn_quotation(self, args): self.write('<BQ>')
def end_quotation(self): self.write('</BQ>\n')
def bgn_example(self, args):
# this use of <CODE> would not be legal in HTML 2.0,
# but is in more recent DTDs.
self.nofill = self.nofill + 1
self.write('<PRE CLASS=example><CODE>')
def end_example(self):
self.write("</CODE></PRE>\n")
self.nofill = self.nofill - 1
def bgn_flushleft(self, args):
self.nofill = self.nofill + 1
self.write('<PRE CLASS=flushleft>\n')
def bgn_flushright(self, args):
self.nofill = self.nofill + 1
self.write('<DIV ALIGN=right CLASS=flushright><ADDRESS COMPACT>\n')
def end_flushright(self):
self.write('</ADDRESS></DIV>\n')
self.nofill = self.nofill - 1
def bgn_menu(self, args):
self.write('<UL PLAIN CLASS=menu>\n')
self.write(' <LH>Menu</LH>\n')
def end_menu(self):
self.write('</UL>\n')
# rpyron 2002-05-07
class HTMLHelp:
"""
This class encapsulates support for HTML Help. Node names,
file names, menu items, index items, and image file names are
accumulated until a call to finalize(). At that time, three
output files are created in the current directory:
`helpbase`.hhp is a HTML Help Workshop project file.
It contains various information, some of
which I do not understand; I just copied
the default project info from a fresh
installation.
`helpbase`.hhc is the Contents file for the project.
`helpbase`.hhk is the Index file for the project.
When these files are used as input to HTML Help Workshop,
the resulting file will be named:
`helpbase`.chm
If none of the defaults in `helpbase`.hhp are changed,
the .CHM file will have Contents, Index, Search, and
Favorites tabs.
"""
codeprog = re.compile('@code{(.*?)}')
def __init__(self,helpbase,dirname):
self.helpbase = helpbase
self.dirname = dirname
self.projectfile = None
self.contentfile = None
self.indexfile = None
self.nodelist = []
self.nodenames = {} # nodename : index
self.nodeindex = {}
self.filenames = {} # filename : filename
self.indexlist = [] # (args,nodename) == (key,location)
self.current = ''
self.menudict = {}
self.dumped = {}
def addnode(self,name,next,prev,up,filename):
node = (name,next,prev,up,filename)
# add this file to dict
# retrieve list with self.filenames.values()
self.filenames[filename] = filename
# add this node to nodelist
self.nodeindex[name] = len(self.nodelist)
self.nodelist.append(node)
# set 'current' for menu items
self.current = name
self.menudict[self.current] = []
def menuitem(self,nodename):
menu = self.menudict[self.current]
menu.append(nodename)
def addimage(self,imagename):
self.filenames[imagename] = imagename
def index(self, args, nodename):
self.indexlist.append((args,nodename))
def beginmenu(self):
pass
def endmenu(self):
pass
def finalize(self):
if not self.helpbase:
return
# generate interesting filenames
resultfile = self.helpbase + '.chm'
projectfile = self.helpbase + '.hhp'
contentfile = self.helpbase + '.hhc'
indexfile = self.helpbase + '.hhk'
# generate a reasonable title
title = self.helpbase
# get the default topic file
(topname,topnext,topprev,topup,topfile) = self.nodelist[0]
defaulttopic = topfile
# PROJECT FILE
try:
fp = open(projectfile,'w')
print('[OPTIONS]', file=fp)
print('Auto Index=Yes', file=fp)
print('Binary TOC=No', file=fp)
print('Binary Index=Yes', file=fp)
print('Compatibility=1.1', file=fp)
print('Compiled file=' + resultfile + '', file=fp)
print('Contents file=' + contentfile + '', file=fp)
print('Default topic=' + defaulttopic + '', file=fp)
print('Error log file=ErrorLog.log', file=fp)
print('Index file=' + indexfile + '', file=fp)
print('Title=' + title + '', file=fp)
print('Display compile progress=Yes', file=fp)
print('Full-text search=Yes', file=fp)
print('Default window=main', file=fp)
print('', file=fp)
print('[WINDOWS]', file=fp)
print('main=,"' + contentfile + '","' + indexfile
+ '","","",,,,,0x23520,222,0x1046,[10,10,780,560],'
'0xB0000,,,,,,0', file=fp)
print('', file=fp)
print('[FILES]', file=fp)
print('', file=fp)
self.dumpfiles(fp)
fp.close()
except IOError as msg:
print(projectfile, ':', msg)
sys.exit(1)
# CONTENT FILE
try:
fp = open(contentfile,'w')
print('<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">', file=fp)
print('<!-- This file defines the table of contents -->', file=fp)
print('<HTML>', file=fp)
print('<HEAD>', file=fp)
print('<meta name="GENERATOR"'
'content="Microsoft® HTML Help Workshop 4.1">', file=fp)
print('<!-- Sitemap 1.0 -->', file=fp)
print('</HEAD>', file=fp)
print('<BODY>', file=fp)
print(' <OBJECT type="text/site properties">', file=fp)
print(' <param name="Window Styles" value="0x800025">', file=fp)
print(' <param name="comment" value="title:">', file=fp)
print(' <param name="comment" value="base:">', file=fp)
print(' </OBJECT>', file=fp)
self.dumpnodes(fp)
print('</BODY>', file=fp)
print('</HTML>', file=fp)
fp.close()
except IOError as msg:
print(contentfile, ':', msg)
sys.exit(1)
# INDEX FILE
try:
fp = open(indexfile ,'w')
print('<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">', file=fp)
print('<!-- This file defines the index -->', file=fp)
print('<HTML>', file=fp)
print('<HEAD>', file=fp)
print('<meta name="GENERATOR"'
'content="Microsoft® HTML Help Workshop 4.1">', file=fp)
print('<!-- Sitemap 1.0 -->', file=fp)
print('</HEAD>', file=fp)
print('<BODY>', file=fp)
print('<OBJECT type="text/site properties">', file=fp)
print('</OBJECT>', file=fp)
self.dumpindex(fp)
print('</BODY>', file=fp)
print('</HTML>', file=fp)
fp.close()
except IOError as msg:
print(indexfile , ':', msg)
sys.exit(1)
def dumpfiles(self, outfile=sys.stdout):
filelist = sorted(self.filenames.values())
for filename in filelist:
print(filename, file=outfile)
def dumpnodes(self, outfile=sys.stdout):
self.dumped = {}
if self.nodelist:
nodename, dummy, dummy, dummy, dummy = self.nodelist[0]
self.topnode = nodename
print('<UL>', file=outfile)
for node in self.nodelist:
self.dumpnode(node,0,outfile)
print('</UL>', file=outfile)
def dumpnode(self, node, indent=0, outfile=sys.stdout):
if node:
# Retrieve info for this node
(nodename,next,prev,up,filename) = node
self.current = nodename
# Have we been dumped already?
if nodename in self.dumped:
return
self.dumped[nodename] = 1
# Print info for this node
print(' '*indent, end=' ', file=outfile)
print('<LI><OBJECT type="text/sitemap">', end=' ', file=outfile)
print('<param name="Name" value="' + nodename +'">', end=' ', file=outfile)
print('<param name="Local" value="'+ filename +'">', end=' ', file=outfile)
print('</OBJECT>', file=outfile)
# Does this node have menu items?
try:
menu = self.menudict[nodename]
self.dumpmenu(menu,indent+2,outfile)
except KeyError:
pass
def dumpmenu(self, menu, indent=0, outfile=sys.stdout):
if menu:
currentnode = self.current
if currentnode != self.topnode: # XXX this is a hack
print(' '*indent + '<UL>', file=outfile)
indent += 2
for item in menu:
menunode = self.getnode(item)
self.dumpnode(menunode,indent,outfile)
if currentnode != self.topnode: # XXX this is a hack
print(' '*indent + '</UL>', file=outfile)
indent -= 2
def getnode(self, nodename):
try:
index = self.nodeindex[nodename]
return self.nodelist[index]
except KeyError:
return None
except IndexError:
return None
# (args,nodename) == (key,location)
def dumpindex(self, outfile=sys.stdout):
print('<UL>', file=outfile)
for (key,location) in self.indexlist:
key = self.codeexpand(key)
location = makefile(location)
location = self.dirname + '/' + location
print('<LI><OBJECT type="text/sitemap">', end=' ', file=outfile)
print('<param name="Name" value="' + key + '">', end=' ', file=outfile)
print('<param name="Local" value="' + location + '">', end=' ', file=outfile)
print('</OBJECT>', file=outfile)
print('</UL>', file=outfile)
def codeexpand(self, line):
co = self.codeprog.match(line)
if not co:
return line
bgn, end = co.span(0)
a, b = co.span(1)
line = line[:bgn] + line[a:b] + line[end:]
return line
# Put @var{} around alphabetic substrings
def makevar(str):
return '@var{'+str+'}'
# Split a string in "words" according to findwordend
def splitwords(str, minlength):
words = []
i = 0
n = len(str)
while i < n:
while i < n and str[i] in ' \t\n': i = i+1
if i >= n: break
start = i
i = findwordend(str, i, n)
words.append(str[start:i])
while len(words) < minlength: words.append('')
return words
# Find the end of a "word", matching braces and interpreting @@ @{ @}
fwprog = re.compile('[@{} ]')
def findwordend(str, i, n):
level = 0
while i < n:
mo = fwprog.search(str, i)
if not mo:
break
i = mo.start()
c = str[i]; i = i+1
if c == '@': i = i+1 # Next character is not special
elif c == '{': level = level+1
elif c == '}': level = level-1
elif c == ' ' and level <= 0: return i-1
return n
# Convert a node name into a file name
def makefile(nodename):
nodename = nodename.strip()
return fixfunnychars(nodename) + '.html'
# Characters that are perfectly safe in filenames and hyperlinks
goodchars = string.ascii_letters + string.digits + '!@-=+.'
# Replace characters that aren't perfectly safe by dashes
# Underscores are bad since Cern HTTPD treats them as delimiters for
# encoding times, so you get mismatches if you compress your files:
# a.html.gz will map to a_b.html.gz
def fixfunnychars(addr):
i = 0
while i < len(addr):
c = addr[i]
if c not in goodchars:
c = '-'
addr = addr[:i] + c + addr[i+1:]
i = i + len(c)
return addr
# Increment a string used as an enumeration
def increment(s):
if not s:
return '1'
for sequence in string.digits, string.ascii_lowercase, string.ascii_uppercase:
lastc = s[-1]
if lastc in sequence:
i = sequence.index(lastc) + 1
if i >= len(sequence):
if len(s) == 1:
s = sequence[0]*2
if s == '00':
s = '10'
else:
s = increment(s[:-1]) + sequence[0]
else:
s = s[:-1] + sequence[i]
return s
return s # Don't increment
def test():
import sys
debugging = 0
print_headers = 0
cont = 0
html3 = 0
htmlhelp = ''
while sys.argv[1] == ['-d']:
debugging = debugging + 1
del sys.argv[1]
if sys.argv[1] == '-p':
print_headers = 1
del sys.argv[1]
if sys.argv[1] == '-c':
cont = 1
del sys.argv[1]
if sys.argv[1] == '-3':
html3 = 1
del sys.argv[1]
if sys.argv[1] == '-H':
helpbase = sys.argv[2]
del sys.argv[1:3]
if len(sys.argv) != 3:
print('usage: texi2hh [-d [-d]] [-p] [-c] [-3] [-H htmlhelp]', \
'inputfile outputdirectory')
sys.exit(2)
if html3:
parser = TexinfoParserHTML3()
else:
parser = TexinfoParser()
parser.cont = cont
parser.debugging = debugging
parser.print_headers = print_headers
file = sys.argv[1]
dirname = sys.argv[2]
parser.setdirname(dirname)
parser.setincludedir(os.path.dirname(file))
htmlhelp = HTMLHelp(helpbase, dirname)
parser.sethtmlhelp(htmlhelp)
try:
fp = open(file, 'r')
except IOError as msg:
print(file, ':', msg)
sys.exit(1)
parser.parse(fp)
fp.close()
parser.report()
htmlhelp.finalize()
if __name__ == "__main__":
test()
| lgpl-3.0 | 7,816,763,446,486,682,000 | -1,317,072,826,165,950,500 | 32.806747 | 89 | 0.518953 | false |
zstars/weblabdeusto | server/src/weblab/core/coordinator/scheduler_transactions_synchronizer.py | 3 | 4486 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2005 onwards University of Deusto
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
#
# This software consists of contributions made by many individuals,
# listed below:
#
# Author: Pablo Orduña <[email protected]>
#
import time
import random
import Queue
import threading
import voodoo.log as log
import voodoo.resources_manager as ResourceManager
import voodoo.counter as counter
from voodoo.resources_manager import is_testing
_resource_manager = ResourceManager.CancelAndJoinResourceManager("UserProcessingServer")
############################################################
#
# Certain operations, such as updating the queues, we
# only want them to be executed by one thread at a time.
# We can execute them more often, but it simply does not
# make sense. This class provides one public method, called
# request_and_wait. The method makes sure that the update
# method of the scheduler is called once since the method
# is invoked, without mattering if somebody else requested
# it.
#
class SchedulerTransactionsSynchronizer(threading.Thread):
def __init__(self, scheduler, min_time_between_updates = 0.0, max_time_between_updates = 0.0):
super(SchedulerTransactionsSynchronizer, self).__init__()
self.setName(counter.next_name("SchedulerTransactionsSynchronizer"))
self.setDaemon(True)
self.scheduler = scheduler
self.queue = Queue.Queue()
self.stopped = False
self.pending_elements = []
self.pending_elements_condition = threading.Condition()
self._latest_update = 0 # epoch
self.period_lock = threading.Lock()
self.min_time_between_updates = int(min_time_between_updates * 1000)
self.max_time_between_updates = int(max_time_between_updates * 1000)
self.next_period_between_updates = 0
def _update_period_between_updates(self):
self.next_period_between_updates = random.randint(self.min_time_between_updates, self.max_time_between_updates) / 1000.0
def start(self):
super(SchedulerTransactionsSynchronizer, self).start()
_resource_manager.add_resource(self)
def stop(self):
self.stopped = True
self.join()
_resource_manager.remove_resource(self)
def cancel(self):
self.stop()
def run(self):
timeout = 0.2
if is_testing():
timeout = 0.01
while not self.stopped:
try:
element = self.queue.get(timeout=timeout)
except Queue.Empty:
continue
if element is not None:
self._iterate(element)
def _iterate(self, element):
elements = [element]
while True:
try:
new_element = self.queue.get_nowait()
elements.append(new_element)
except Queue.Empty:
break
if not self.stopped:
execute = True
with self.period_lock:
if time.time() - self._latest_update <= self.next_period_between_updates:
execute = False
else:
self._latest_update = time.time()
self._update_period_between_updates()
if execute:
try:
self.scheduler.update()
except:
log.log(SchedulerTransactionsSynchronizer, log.level.Critical, "Exception updating scheduler")
log.log_exc(SchedulerTransactionsSynchronizer, log.level.Critical)
self._notify_elements(elements)
def _notify_elements(self, elements):
with self.pending_elements_condition:
for element in elements:
if element in self.pending_elements:
self.pending_elements.remove(element)
self.pending_elements_condition.notify_all()
def request_and_wait(self):
request_id = "%s::%s" % (threading.current_thread().getName(), random.random())
with self.pending_elements_condition:
self.pending_elements.append(request_id)
self.queue.put_nowait(request_id)
with self.pending_elements_condition:
while request_id in self.pending_elements and self.isAlive():
self.pending_elements_condition.wait(timeout=5)
| bsd-2-clause | 1,244,421,157,204,048,100 | 3,694,506,010,004,840,400 | 31.266187 | 128 | 0.628317 | false |
opencord/voltha | ofagent/main.py | 1 | 9975 | #!/usr/bin/env python
#
# Copyright 2017 the original author or 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 writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import argparse
import os
import yaml
from twisted.internet import reactor
from twisted.internet.defer import inlineCallbacks
from common.structlog_setup import setup_logging
from common.utils.dockerhelpers import get_my_containers_name
from common.utils.nethelpers import get_my_primary_local_ipv4
from connection_mgr import ConnectionManager
defs = dict(
config=os.environ.get('CONFIG', './ofagent.yml'),
logconfig=os.environ.get('LOGCONFIG', './logconfig.yml'),
consul=os.environ.get('CONSUL', 'localhost:8500'),
controller=os.environ.get('CONTROLLER', 'localhost:6653'),
external_host_address=os.environ.get('EXTERNAL_HOST_ADDRESS',
get_my_primary_local_ipv4()),
grpc_endpoint=os.environ.get('GRPC_ENDPOINT', 'localhost:50055'),
instance_id=os.environ.get('INSTANCE_ID', os.environ.get('HOSTNAME', '1')),
internal_host_address=os.environ.get('INTERNAL_HOST_ADDRESS',
get_my_primary_local_ipv4()),
work_dir=os.environ.get('WORK_DIR', '/tmp/ofagent'),
key_file=os.environ.get('KEY_FILE', '/ofagent/pki/voltha.key'),
cert_file=os.environ.get('CERT_FILE', '/ofagent/pki/voltha.crt')
)
def parse_args():
parser = argparse.ArgumentParser()
_help = ('Path to ofagent.yml config file (default: %s). '
'If relative, it is relative to main.py of ofagent.'
% defs['config'])
parser.add_argument('-c', '--config',
dest='config',
action='store',
default=defs['config'],
help=_help)
_help = ('Path to logconfig.yml config file (default: %s). '
'If relative, it is relative to main.py of voltha.'
% defs['logconfig'])
parser.add_argument('-l', '--logconfig',
dest='logconfig',
action='store',
default=defs['logconfig'],
help=_help)
_help = '<hostname>:<port> to consul agent (default: %s)' % defs['consul']
parser.add_argument(
'-C', '--consul', dest='consul', action='store',
default=defs['consul'],
help=_help)
_help = '<hostname1>:<port1> <hostname2>:<port2> <hostname3>:<port3> ... <hostnamen>:<portn> to openflow controller (default: %s)' % \
defs['controller']
parser.add_argument(
'-O', '--controller',nargs = '*', dest='controller', action='store',
default=defs['controller'],
help=_help)
_help = ('<hostname> or <ip> at which ofagent is reachable from outside '
'the cluster (default: %s)' % defs['external_host_address'])
parser.add_argument('-E', '--external-host-address',
dest='external_host_address',
action='store',
default=defs['external_host_address'],
help=_help)
_help = ('gRPC end-point to connect to. It can either be a direct'
'definition in the form of <hostname>:<port>, or it can be an'
'indirect definition in the form of @<service-name> where'
'<service-name> is the name of the grpc service as registered'
'in consul (example: @voltha-grpc). (default: %s'
% defs['grpc_endpoint'])
parser.add_argument('-G', '--grpc-endpoint',
dest='grpc_endpoint',
action='store',
default=defs['grpc_endpoint'],
help=_help)
_help = ('<hostname> or <ip> at which ofagent is reachable from inside'
'the cluster (default: %s)' % defs['internal_host_address'])
parser.add_argument('-H', '--internal-host-address',
dest='internal_host_address',
action='store',
default=defs['internal_host_address'],
help=_help)
_help = ('unique string id of this ofagent instance (default: %s)'
% defs['instance_id'])
parser.add_argument('-i', '--instance-id',
dest='instance_id',
action='store',
default=defs['instance_id'],
help=_help)
_help = 'omit startup banner log lines'
parser.add_argument('-n', '--no-banner',
dest='no_banner',
action='store_true',
default=False,
help=_help)
_help = "suppress debug and info logs"
parser.add_argument('-q', '--quiet',
dest='quiet',
action='count',
help=_help)
_help = 'enable verbose logging'
parser.add_argument('-v', '--verbose',
dest='verbose',
action='count',
help=_help)
_help = ('work dir to compile and assemble generated files (default=%s)'
% defs['work_dir'])
parser.add_argument('-w', '--work-dir',
dest='work_dir',
action='store',
default=defs['work_dir'],
help=_help)
_help = ('use docker container name as ofagent instance id'
' (overrides -i/--instance-id option)')
parser.add_argument('--instance-id-is-container-name',
dest='instance_id_is_container_name',
action='store_true',
default=False,
help=_help)
_help = ('Specify this option to enable TLS security between ofagent \
and onos.')
parser.add_argument('-t', '--enable-tls',
dest='enable_tls',
action='store_true',
help=_help)
_help = ('key file to be used for tls security (default=%s)'
% defs['key_file'])
parser.add_argument('-k', '--key-file',
dest='key_file',
action='store',
default=defs['key_file'],
help=_help)
_help = ('certificate file to be used for tls security (default=%s)'
% defs['cert_file'])
parser.add_argument('-r', '--cert-file',
dest='cert_file',
action='store',
default=defs['cert_file'],
help=_help)
args = parser.parse_args()
# post-processing
if args.instance_id_is_container_name:
args.instance_id = get_my_containers_name()
return args
def load_config(args, configname='config'):
argdict = vars(args)
path = argdict[configname]
if path.startswith('.'):
dir = os.path.dirname(os.path.abspath(__file__))
path = os.path.join(dir, path)
path = os.path.abspath(path)
with open(path) as fd:
config = yaml.load(fd)
return config
banner = r'''
___ _____ _ _
/ _ \| ___/ \ __ _ ___ _ __ | |_
| | | | |_ / _ \ / _` |/ _ \ '_ \| __|
| |_| | _/ ___ \ (_| | __/ | | | |_
\___/|_|/_/ \_\__, |\___|_| |_|\__|
|___/
'''
def print_banner(log):
for line in banner.strip('\n').splitlines():
log.info(line)
log.info('(to stop: press Ctrl-C)')
class Main(object):
def __init__(self):
self.args = args = parse_args()
self.config = load_config(args)
self.logconfig = load_config(args, 'logconfig')
# May want to specify the gRPC timeout as an arg (in future)
# Right now, set a default value
self.grpc_timeout = 120
verbosity_adjust = (args.verbose or 0) - (args.quiet or 0)
self.log = setup_logging(self.logconfig,
args.instance_id,
verbosity_adjust=verbosity_adjust)
# components
self.connection_manager = None
self.exiting = False
if not args.no_banner:
print_banner(self.log)
self.startup_components()
def start(self):
self.start_reactor() # will not return except Keyboard interrupt
@inlineCallbacks
def startup_components(self):
self.log.info('starting-internal-components')
args = self.args
self.connection_manager = yield ConnectionManager(
args.consul, args.grpc_endpoint, self.grpc_timeout,
args.controller, args.instance_id,
args.enable_tls, args.key_file, args.cert_file).start()
self.log.info('started-internal-services')
@inlineCallbacks
def shutdown_components(self):
"""Execute before the reactor is shut down"""
self.log.info('exiting-on-keyboard-interrupt')
self.exiting = True
if self.connection_manager is not None:
yield self.connection_manager.stop()
def start_reactor(self):
reactor.callWhenRunning(
lambda: self.log.info('twisted-reactor-started'))
reactor.addSystemEventTrigger('before', 'shutdown',
self.shutdown_components)
reactor.suggestThreadPoolSize(30)
reactor.run()
if __name__ == '__main__':
Main().start()
| apache-2.0 | 5,876,864,882,520,681,000 | -3,303,726,967,514,895,000 | 35.944444 | 140 | 0.536441 | false |
giannisfs/Vault | vault/qrc_resources.py | 1 | 335309 | # -*- coding: utf-8 -*-
# Resource object code
#
# Created: ??? ??? 21 00:36:17 2012
# by: The Resource Compiler for PyQt (Qt v4.7.4)
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore
qt_resource_data = "\
\x00\x01\x2b\xe6\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x01\xa6\x00\x00\x01\xa9\x08\x06\x00\x00\x00\xc6\x27\x92\xd6\
\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13\
\x01\x00\x9a\x9c\x18\x00\x00\x00\x20\x63\x48\x52\x4d\x00\x00\x7a\
\x25\x00\x00\x80\x83\x00\x00\xf9\xff\x00\x00\x80\xe9\x00\x00\x75\
\x30\x00\x00\xea\x60\x00\x00\x3a\x98\x00\x00\x17\x6f\x92\x5f\xc5\
\x46\x00\x01\x2b\x6c\x49\x44\x41\x54\x78\xda\xec\xfd\x77\xbc\x24\
\xd9\x59\x1e\x8e\x3f\xef\xa9\xd8\xe9\x86\xc9\xbb\xab\x99\xd9\xbc\
\xd2\x4a\x42\x01\x81\x10\x8a\x48\x42\x01\x21\x94\x11\x92\x48\x42\
\x80\x8c\x6d\x10\x59\x80\x45\x32\x98\xf0\xc5\x36\x18\x6c\x30\x60\
\x7e\xfe\xda\x06\xbe\x5f\x0c\xc6\x3f\x0c\xd8\x04\x63\x05\x82\xd2\
\xe6\x9c\x77\x27\x87\x3b\x33\x37\xf5\xed\x54\x55\xe7\xfd\xfe\x71\
\x4e\xc5\xae\xea\xae\xea\xdb\x77\x66\x76\xa6\xce\x7e\x7a\x6f\x4f\
\x87\xea\xea\xea\xaa\xf3\x9c\xe7\x79\x9f\xf7\x7d\x89\x99\x51\x8f\
\x7a\xd4\xa3\x1e\xf5\xa8\xc7\xe5\x32\x44\x7d\x08\xea\x51\x8f\x7a\
\xd4\xa3\x1e\x35\x30\xd5\xa3\x1e\xf5\xa8\x47\x3d\xea\x51\x03\x53\
\x3d\xea\x51\x8f\x7a\xd4\xa3\x06\xa6\x7a\xd4\xa3\x1e\xf5\xa8\x47\
\x3d\x6a\x60\xaa\x47\x3d\xea\x51\x8f\x7a\xd4\xc0\x54\x8f\x7a\xd4\
\xa3\x1e\xf5\xa8\x47\x0d\x4c\xf5\xa8\x47\x3d\xea\x51\x8f\x1a\x98\
\xea\x51\x8f\x7a\xd4\xa3\x1e\xf5\xa8\x81\xa9\x1e\xf5\xa8\x47\x3d\
\xea\x51\x03\x53\x3d\xea\x51\x8f\x7a\xd4\xa3\x1e\x35\x30\xd5\xa3\
\x1e\xf5\xa8\x47\x3d\xea\x51\x03\x53\x3d\xea\x51\x8f\x7a\xd4\xa3\
\x06\xa6\x7a\xd4\xa3\x1e\xf5\xa8\x47\x3d\x6a\x60\xaa\x47\x3d\xea\
\x51\x8f\x7a\xd4\xc0\x54\x8f\x7a\xd4\xa3\x1e\xf5\xa8\x47\x0d\x4c\
\xf5\xa8\x47\x3d\xea\x51\x8f\x1a\x98\xea\x51\x8f\x7a\xd4\xa3\x1e\
\xf5\xa8\x81\xa9\x1e\xf5\xa8\x47\x3d\xea\x51\x03\x53\x3d\xea\x51\
\x8f\x7a\xd4\xa3\x1e\x35\x30\xd5\xa3\x1e\xf5\xa8\x47\x3d\x6a\x60\
\xaa\x47\x3d\xea\x51\x8f\x7a\xd4\xa3\x06\xa6\x7a\xd4\xa3\x1e\xf5\
\xa8\x47\x3d\x6a\x60\xaa\x47\x3d\xea\x51\x8f\x7a\xd4\xc0\x54\x8f\
\x7a\xd4\xa3\x1e\xf5\xa8\x47\x0d\x4c\xf5\xa8\x47\x3d\xea\x51\x8f\
\x1a\x98\xea\x51\x8f\x7a\xd4\xa3\x1e\xf5\xa8\x81\xa9\x1e\xf5\xa8\
\x47\x3d\xea\x51\x03\x53\x3d\xea\x51\x8f\x7a\xd4\xa3\x1e\x35\x30\
\xd5\xa3\x1e\xf5\xa8\x47\x3d\x6a\x60\xaa\x47\x3d\xea\x51\x8f\x7a\
\xd4\xa3\x06\xa6\x7a\xd4\xa3\x1e\xf5\xa8\x47\x0d\x4c\xf5\xa8\x47\
\x3d\xea\x51\x8f\x7a\xd4\xc0\x54\x8f\x7a\xd4\xa3\x1e\xf5\xa8\x47\
\x0d\x4c\xf5\xa8\x47\x3d\xea\x51\x8f\x1a\x98\xea\x51\x8f\x7a\xd4\
\xa3\x1e\xf5\xa8\x81\xa9\x1e\xf5\xa8\x47\x3d\xea\x51\x03\x53\x3d\
\xea\x51\x8f\x7a\xd4\xa3\x1e\x35\x30\xd5\xa3\x1e\xf5\xa8\x47\x3d\
\x6a\x60\xaa\x47\x3d\xea\x51\x8f\x7a\xd4\xa3\x06\xa6\x7a\xd4\xa3\
\x1e\xf5\xa8\xc7\x15\x3d\xcc\x2b\xe1\x4b\x10\x51\xfd\x4b\x96\x38\
\x4c\x53\xfe\x8d\x8a\xcf\x6f\x77\xf0\x65\xb0\x2d\xae\x4f\x8b\x7a\
\x5c\xce\x83\xf9\xea\x3c\x45\xcd\xfa\xa7\xbf\xe2\x41\x88\x66\x7c\
\x6e\xa7\x01\x8a\x77\xf8\xf5\x3b\x09\x3e\x35\xa8\xd6\xa3\x1e\x35\
\x30\xd5\xa3\x02\x18\xd1\x14\x10\x9a\xf6\x77\x1a\x78\x4d\x7a\x7c\
\xa7\xc0\x86\xe7\xb8\xad\x79\x4c\xea\x7c\x19\xbf\xa7\x06\xd5\x7a\
\xd4\xc0\x54\x8f\xcb\x02\x90\xa6\x01\xd0\xa4\xfb\x93\x5e\x5f\x16\
\xa4\x76\x1a\x54\x78\x87\xde\x7b\x31\x80\x95\x2f\xd1\xe7\x5e\x89\
\x4c\x75\xa7\xbe\x7b\x0d\x94\x35\x30\xd5\x63\x07\x00\xa9\x08\x5c\
\x68\xc2\x63\x93\x6e\xd3\x18\xd5\x34\x90\xda\x09\xa0\x99\xd7\xe3\
\x17\x9b\xad\xf1\x0e\x6e\xfb\x52\x33\xd0\x8b\xcd\x02\xe7\x71\x2c\
\xaa\x3c\xce\x35\x78\xd5\xc0\x54\x8f\xed\x01\x52\x99\x9b\x28\xb8\
\x5f\x15\xa4\x8a\xc0\x89\x2f\xe2\x44\x71\xa9\x00\xeb\x62\x80\xea\
\xbc\x80\x75\xa7\x98\xe8\xa5\x66\x81\x55\xf7\x8d\x4b\x02\x4e\xf6\
\x3e\x15\xdc\xaf\xc1\xaa\x06\xa6\x7a\xcc\x00\x48\x59\x00\x12\x05\
\xf7\xf3\xfe\x96\x01\xa8\xaa\xc0\xc4\x73\x9a\x44\xb6\xf3\x9a\x9d\
\x9a\x8c\x79\xce\x8f\xed\x24\x60\x5d\x0c\x36\x3a\x4f\xd0\x9a\xe5\
\xbb\x16\x9d\x1b\x3c\xe1\xb1\xbc\xbf\x9c\x01\x25\x4e\x9c\xf3\x79\
\xf7\x6b\x90\xaa\x81\xa9\x06\xa4\x09\x60\x94\x05\xa1\xb2\xb7\x49\
\x20\x55\xc4\x9a\x68\xc6\xc9\x62\x56\xc0\xd9\xee\xbf\x2f\x05\x7b\
\xe3\x39\x6e\x6b\xde\x60\x31\xeb\xfe\x5e\x2a\x16\x58\xe6\x33\xcb\
\x02\x50\xf6\x7e\xde\xbf\x8b\x5e\x93\xc7\xaa\x6a\x70\xaa\x81\xe9\
\xaa\x01\xa4\x2a\xec\x28\x0f\x6c\x8c\x9c\xfb\x46\xce\x73\x45\x00\
\x55\xc4\x9c\x8a\x40\xe9\x62\x81\xce\x3c\x00\x6a\xbb\x60\x70\x31\
\x40\x74\xa7\x00\x6b\x1e\xdf\xa7\xea\xfe\xed\x34\x9b\x9b\x06\x48\
\x45\xc0\x53\x74\x93\x05\x8f\x23\x07\xa4\x6a\x80\xaa\x81\xa9\x06\
\xa4\x09\x80\x94\x07\x3e\xd9\x9b\x28\xf8\x77\x59\x70\x9a\x06\x4a\
\x3b\x01\x3e\xf3\x78\xdd\x4e\xb3\x1c\x9e\xc3\x73\xdb\x65\x2c\xf3\
\xf8\x7e\x3b\x09\x50\xdb\x8d\x0d\x95\x79\xac\x2c\x13\xca\x82\x4f\
\xf6\xbe\x9c\x02\x50\xd3\x58\x54\x0d\x4e\x35\x30\x5d\x51\xa0\x54\
\x64\xed\xce\x8b\x1b\x89\x0c\xd0\x64\x41\xc7\x2c\x71\x7f\x12\x83\
\xca\x7e\x2e\x4a\x82\xd3\xbc\x01\x88\xb7\xf1\xde\x79\x00\xcd\x3c\
\x3f\x6f\xd6\x6d\xec\x14\xd0\xce\xeb\xb9\xcb\x09\x54\xab\x30\x22\
\x99\x73\x3f\x7b\xcb\xbe\x2e\xfc\x37\x0a\x58\x53\x0d\x4a\x35\x30\
\x5d\x91\x80\x04\x94\x93\xeb\x92\xc0\x92\x05\x1e\x33\x73\x3f\xef\
\xb1\x22\x46\x35\x8d\x39\xa1\x00\x9c\xe6\x21\xc7\x55\x01\xa1\xed\
\x02\xd6\xbc\xff\xbd\x13\xf7\xe7\x05\xac\xbc\x43\xdf\x61\xa7\x59\
\x55\xd9\x7f\xf3\x04\x70\x92\x13\x00\x29\x7b\x0b\x32\x7f\xc3\xfb\
\xe1\xb5\x20\x13\xa0\x94\xf7\x19\xb5\xa4\x57\x03\xd3\x15\x0f\x48\
\x79\xa0\x94\x65\x46\x79\x60\x63\x65\xc0\xa8\xe8\xdf\x46\x01\x40\
\x95\x65\x4d\x98\x72\x21\xce\x63\x72\x9e\x05\x90\x76\x42\x56\xdb\
\xce\x77\xbb\x98\x20\x75\xb1\x81\x73\x27\x62\x69\xb3\x7c\xa7\x32\
\x92\x5d\x19\x30\xca\xde\xa4\x3e\xff\xc3\xfb\xc9\x6b\x33\x09\x52\
\x22\xf1\x39\xa8\xd9\x53\x0d\x4c\xcf\x56\x40\x9a\x04\x46\x93\x62\
\x48\x46\x0e\x33\xca\x03\x1d\x2b\x73\x33\x73\xee\x9b\x05\x00\x95\
\x27\xe9\x95\x89\x35\xcd\x7b\xf2\x2e\xe3\xb0\x9a\x17\x00\x6c\x17\
\x88\x76\x02\x60\x2f\x26\x90\x5e\x09\xec\xb4\x2c\x28\x05\x13\x00\
\xc9\xcf\xf9\x2b\x12\xe0\x14\xe4\x28\x07\x9c\x00\x30\x59\x03\x52\
\x0d\x4c\x57\x22\x20\x4d\x72\xd8\xe5\x31\xa4\x22\x20\xb2\x0b\xee\
\xe7\x01\x56\x16\x9c\xb2\x31\xa7\x2a\x26\x88\x8b\x01\x46\x3c\x87\
\x6d\xee\x34\xc3\xab\xfa\xdc\x3c\xf7\x77\x27\x8e\xfd\x4e\xee\xdf\
\xbc\x16\x35\x65\x41\x29\x09\x48\x7e\x06\x94\xb2\x37\x23\x71\x3f\
\xbc\x16\x82\xcc\x35\x10\x82\x91\xc4\x7c\x6a\x48\xd6\xc0\x54\x1f\
\x82\x4b\x0a\x48\x40\x7e\x35\x86\x22\x67\x5d\x56\xaa\x2b\x02\x23\
\xbb\xe0\x56\x04\x52\xd9\x18\x54\x16\x9c\xa6\xc9\x79\x65\xc0\x69\
\x96\x5c\x93\x59\x5f\xbb\x93\x72\xda\x4e\x82\xe9\xc5\x94\xdd\x66\
\xd9\xf7\x4b\xc1\xf6\x66\x39\x6f\x8a\xa4\xbb\x3c\x40\xca\x03\x23\
\x2f\x71\x4b\x2e\x0e\xfd\xc4\x35\x10\xe4\xec\x3f\xd5\x12\x5e\x0d\
\x4c\xcf\x26\x50\x9a\x54\x44\x75\x9a\xed\xdb\x28\x90\xeb\xac\x29\
\x20\xe4\x64\xfe\x26\xef\xe7\x01\x54\x91\x21\x62\x52\xd2\x2d\x50\
\x1c\x63\x9a\xd7\x04\x3e\xeb\xdf\x8b\x01\x54\x3b\xf1\xbd\x76\x12\
\xa8\xe6\x0d\xf2\x3b\x25\x9d\xce\x7a\xdc\xb3\x6c\x29\x8f\x29\x15\
\xb1\x23\x2f\x73\x1b\x25\xae\x07\x0f\x93\x4d\x40\xd9\x7d\x91\xa8\
\x56\xae\xab\x1e\x35\x30\x5d\x32\x40\x02\xaa\x39\xed\xf2\x40\xa9\
\x88\x19\x25\x41\xa8\xe8\x66\x67\xee\x67\x01\xca\x2c\x00\xa7\x69\
\x72\xde\x24\xc6\xb4\x13\xe0\x74\x31\x26\xfc\x9d\x06\xa4\x8b\xc1\
\x52\x2e\xd6\xc2\xe0\x52\x30\xbe\x69\xc7\xb6\x88\x29\xe5\xb1\xa4\
\x2c\x18\x8d\x12\xa0\x34\x42\x71\xac\x75\xd2\xb9\x5f\x33\xa7\x1a\
\x98\x2e\xed\xc8\x76\x98\x24\xd5\x4e\x77\x9e\x4e\xbb\xa4\x6c\x97\
\x07\x48\xd9\x9b\x3b\xe5\x6f\x96\x49\x59\x42\x08\x97\x48\x84\xa0\
\x67\x00\x1c\x01\x93\x94\x92\x98\x79\x9a\x6d\x1c\x15\x27\x92\x79\
\x80\xd0\xc5\x64\x52\xf3\x9e\xd0\x77\x82\x9d\x5c\x6a\x86\x7a\x31\
\x19\x5f\x15\x19\x2f\xcf\xd8\xe0\x65\x40\x29\x09\x48\xc3\xc4\xdf\
\x3c\xe5\xa0\xe8\xdc\xcf\x32\x36\x42\x6d\x1f\xaf\x81\xe9\x92\xd3\
\xa3\xb8\xbf\x7b\x55\x63\xc3\x34\x86\x64\x96\x00\x24\xb7\xe4\x2d\
\x05\x50\x8e\xeb\xb6\xbe\xf5\xbb\x3e\x76\xdd\xed\x2f\x78\xa1\xd5\
\x5e\x58\x30\xc6\x2e\x23\x10\x36\xd6\x56\xe1\xfb\x3e\x06\x83\x01\
\x0c\xc3\x00\x00\x8c\x86\x43\xf8\xbe\x0f\x90\xfe\x42\xc2\x50\xff\
\x06\xb0\x72\xf6\x2c\xbc\xd1\x10\x86\x61\xe0\xc2\xf9\x15\x04\x81\
\x04\x01\x18\x8d\x46\x08\x64\x10\x1d\x98\x20\x08\xb0\xb9\xb1\x9e\
\xfa\x40\x21\x04\x77\x37\x37\x30\x1a\x0e\x19\x00\x36\x37\xd6\x39\
\x41\x3f\x79\xe4\x8d\x30\x1a\x0e\x99\x88\x78\xd0\xef\xb3\xe7\x8d\
\x98\xa5\xcc\x9d\xec\xa5\x94\x52\x2f\x1a\x76\x02\xa0\xe6\x05\x42\
\xf3\x02\xa8\x79\xee\xff\xe5\x04\x50\x65\xb7\x5d\x04\x4c\x79\xf2\
\x5d\x12\x94\x46\xfa\x6f\x12\x8c\x86\x00\x06\x18\x8f\xb7\x4e\x93\
\xf1\xb8\x00\x9c\x6a\x40\x9a\x65\x3e\xbd\x12\x7a\xca\xc7\x98\x70\
\xc9\x24\xbb\x59\x00\x49\x94\x90\xec\xac\x0a\x80\xd4\xc8\xf9\xdb\
\xc8\x79\xde\x21\xa2\xc6\x9b\xde\xfe\xee\xbd\x6f\x7b\xd7\x7b\x1a\
\xad\x56\x9b\x24\xcb\xb1\xaf\x44\x39\xc7\x98\xc1\xe9\x67\x28\xfd\
\x8e\xe8\x79\xca\xd9\x0a\x65\xaf\xe6\xe2\xed\x4c\x3c\xca\xa9\x82\
\x2f\x3c\x8e\xa5\xfa\xc5\xdd\xcd\x4d\x04\x81\x8f\xe1\x70\xa0\xb6\
\x4a\xc0\x68\xe4\x21\x08\xfc\xd4\xeb\x02\x0d\xa8\xe7\xcf\xad\x60\
\x38\x1c\xc2\x34\x4c\x9c\x5b\x39\x03\x96\x0c\x10\x30\x1a\x0d\x11\
\x04\x32\xb5\x0b\x9e\x37\xc2\xc6\xc6\x7a\xea\x73\x0d\xc3\xe0\x8d\
\xf5\x75\x78\x9e\xc7\x00\xb0\xb1\xb6\xca\xea\xb8\x09\x8c\x46\x03\
\x1e\x0e\x06\x00\xc0\x83\x7e\x5f\x02\x80\xef\x79\x2c\x65\x00\x10\
\x8d\x4d\xbe\x52\x4a\x66\x29\xe7\x0d\x5a\xb3\x82\xd2\x3c\x01\x6a\
\x3b\x72\x69\x15\x19\x8f\x31\x6e\x74\x28\x92\xee\x42\x50\x1a\x24\
\x40\xa9\x9f\xf8\xdb\x4f\xfc\x7b\x90\x00\xaf\xf0\xbd\xc9\xed\xf9\
\x48\xbb\xfc\x02\x4c\xae\x16\x51\x59\x91\xa9\x81\xa9\x06\xa6\xb2\
\xa0\x54\xb5\x84\x90\x31\x81\x25\xcd\x0a\x48\xd3\x6e\x11\x30\xbd\
\xea\xf5\x6f\xda\xfd\xce\xaf\xff\x80\xb3\x6b\xf7\x1e\x92\x52\x96\
\x83\xdc\xb1\x7f\x52\xf5\xa3\x54\xf8\x4e\xaa\xbc\x1d\x2a\xb3\xb3\
\x11\x18\x66\xe0\x90\xf2\xde\xc7\xa9\x73\x28\x04\x57\xe6\xa2\xd7\
\xe7\x3d\x9e\x78\x0e\xd3\x85\x4e\x2e\x5c\x44\x13\x06\xbd\x1e\x3c\
\xcf\xc3\x70\x14\xb3\xd4\xe1\x40\xb1\x54\xa1\xff\x4d\x40\xc4\x52\
\xcf\x9e\x39\x8d\xad\xad\x2d\x8c\x86\xc3\x68\xdf\xba\x1b\x9b\xf0\
\xbc\x51\x6a\xcb\x41\x10\x60\x7d\x6d\x15\x42\x88\xd4\xe3\xdd\xcd\
\x4d\x1e\x8d\x86\x20\x80\xd7\xd7\xd7\x10\xf8\x3e\x0f\x06\x7d\x16\
\x44\xf0\x7d\x1f\xa3\xd1\x88\x35\xeb\x95\xbe\xe7\x31\x63\x9c\x89\
\x12\x88\x03\x19\xe4\x01\xea\x3c\x98\x5d\x59\xf6\x99\x07\x4c\x79\
\xf2\xdd\x28\xc3\x90\x86\x09\xe0\xe9\x03\xe8\x25\xfe\xf6\x4a\x00\
\x54\x78\x0b\xb7\x1f\x82\xa1\xcc\x01\xa7\x4a\x13\x6e\x0d\x4c\x35\
\x30\x6d\x07\x90\x80\xea\xc6\x86\x32\x4e\xbb\x64\x3c\xc8\x2d\x01\
\x48\xcd\xcc\xdf\xe8\xfe\xf3\x5e\xf8\xe2\xc5\xb7\xbe\xe3\xdd\xce\
\x0d\x37\xdd\x4c\xcd\x56\x3b\x35\x31\xd2\x25\x06\x1b\x2a\x8b\x8c\
\x33\x6d\xa3\xfc\xb6\xa8\xd2\xae\x4f\xf8\xd6\x34\xdb\x81\xa4\x31\
\x00\xa6\x98\x11\xe6\xe2\xae\x66\xa9\x44\xb9\x0c\x35\x77\xeb\x05\
\xdb\x29\x7d\x98\x72\xe7\x0b\xf5\xa6\x91\x37\x42\xe0\xfb\x9a\x85\
\x2a\xc0\xef\x0f\xfa\x08\x82\x20\x25\x6c\x05\xbe\x0f\x06\x70\x7e\
\xe5\x2c\x06\x83\x21\x64\x10\xa0\xd7\xdb\xd2\x72\xae\x81\x0d\x05\
\x8e\xd1\x17\xf7\x7d\x0f\xeb\xab\xab\xd1\xf3\x89\xf5\x04\x2e\x9c\
\x5f\x61\xcf\xf3\x00\x30\x6f\x6d\x6e\x72\x20\x25\x0f\xfb\x7d\xf6\
\x3c\x2f\xf0\xbc\x51\x40\x44\x72\x34\x1c\xf8\x00\x3c\xdf\xf7\x3d\
\x29\xe5\x88\x99\x47\x32\x08\xfa\x31\x20\xd1\x10\xe0\x3e\x11\xf5\
\xa5\x94\x5b\x00\xb6\x34\x20\x65\xff\xf6\x32\x00\x35\xcc\x00\x54\
\x11\x73\x9a\x99\x35\xd5\xc0\x54\x03\xd3\x3c\x00\x29\xdb\x8c\x2f\
\x9b\x0f\x64\x4e\x91\xed\xec\x02\x96\xe4\x16\xc8\x74\x49\x20\x6a\
\xe6\xfc\xbb\x71\xdd\xe1\xeb\x17\x3e\xf0\xad\xdf\xe1\xdc\x78\xd3\
\x2d\xe4\x36\x1a\xd3\x4f\xf4\xc2\x39\x6a\x5e\xcc\xe6\xe2\x02\x4e\
\x79\xb0\x99\xc2\xc3\xb6\x0b\x36\x33\x6e\x87\xb6\x71\xf8\x4a\x31\
\x5d\xaa\xba\x8d\xc9\xab\x12\xca\xfc\x78\x93\x80\x91\x12\xd4\x93\
\xa6\x5c\xcf\x45\xd7\x38\xd1\x0c\x07\x24\x31\xe1\xa7\x14\x62\x22\
\x7c\xe1\x73\x9f\x5d\xfd\xc5\x9f\xfc\xd1\x3f\xd5\x60\xd4\xcd\xfc\
\xcd\x02\x54\x1e\x7b\xca\x03\x27\x39\x2b\x6b\xba\x5a\x81\xa9\x36\
\x3f\xcc\x17\x90\x26\x39\xed\xb6\x03\x48\x6e\x01\x3b\x2a\xbc\x2d\
\x2c\x2e\xb5\xbf\xe5\xbb\xbe\xbb\xf1\xc2\x2f\x79\x09\x2c\xdb\x82\
\x64\xd6\xab\xeb\xab\x09\x6c\x4a\xf0\xb9\x19\xb6\xb3\x3d\xb0\x99\
\x0f\xe0\xd0\x74\x64\xd8\x0e\x0c\x4f\xdd\x0e\x95\x3c\x49\x62\xa2\
\xc4\x63\xe2\x1c\x47\x0c\x8c\xc0\x89\xf3\xa2\x68\x32\xa6\x62\x0d\
\x75\xc2\x62\x62\xf2\x19\xcb\x09\x84\x63\x66\x7c\xe5\xab\x5e\xbd\
\x7c\xeb\xed\x2f\x78\xe1\x63\x0f\x3d\xf0\x70\xe2\x5a\x46\x8e\x64\
\x38\xa9\xf6\x5e\x78\x13\x18\x37\x42\x00\xb5\x19\xa2\x06\xa6\x39\
\x00\xd2\x24\x30\x9a\xe4\xb4\x13\x98\x6c\xfd\x9e\x04\x48\x4e\x01\
\x43\x2a\x02\xa4\x56\x78\xdf\x76\x9c\xf6\xeb\xdf\xf2\xb5\xcd\xaf\
\x7b\xcf\xfb\xd1\x68\x35\xc1\x92\x55\xac\xa4\x30\x06\xb3\x3d\xf9\
\xeb\x72\x01\x9b\xd9\xd8\xcd\xe5\x05\x36\x3b\x03\x38\xd5\xb6\x33\
\x75\xe1\x41\x15\x7f\x55\xaa\xb0\xfb\x44\x53\x5f\x47\x69\xaa\x54\
\xfe\x7b\x50\x29\x38\x06\x4b\x89\x0f\x7c\xcb\x47\x6e\xfb\xe9\x8f\
\x7f\xdf\xc9\xc4\xf5\x9d\x07\x48\xd9\xd2\x46\x41\xce\x63\x61\xed\
\x3c\x42\x71\x4b\xf6\x7a\xd4\xc0\xb4\x23\x80\x34\xad\x84\x50\x51\
\x82\x6c\x16\x94\xdc\x09\xb2\x5d\x9e\x64\xd7\xca\xfe\x7d\xf3\xd7\
\xbd\xa7\xf5\xce\xf7\xbd\x9f\x9a\xad\x36\xa4\x0c\x00\x9e\x91\x21\
\x5d\x6e\x31\x9b\x6d\x6c\x67\x56\x82\xb8\xe3\xcc\xe6\x22\xb2\x9b\
\x2a\x0c\xa7\xda\xae\x55\x03\x1e\xa2\x2a\xe7\x4c\x49\x6e\x4e\xa5\
\x21\x79\xea\x09\x41\x00\xa4\x94\xf8\xd2\x97\x7d\x59\xf3\xba\x43\
\x87\x6f\x38\x71\xf4\xc8\xd3\x19\xa6\x54\x54\x81\x3c\x0f\x98\x0c\
\xa4\x0b\xbb\x52\x0d\x48\x35\x30\xcd\x53\xb6\x2b\xeb\xb4\xcb\x63\
\x48\x79\x09\xb2\x79\x2c\x69\x92\xb1\x21\x09\x4a\xad\xbc\xbf\xcf\
\xfb\x92\x97\xb4\xdf\xf1\xbe\xf7\x8b\x1b\x6f\xba\x15\x96\x6d\x43\
\xb9\xed\xa6\xb9\xd1\x9e\x2d\xac\xe6\x22\x80\xcd\x4c\xac\x66\x76\
\xa0\x99\x07\xb3\x99\x85\xdd\x94\xfc\x85\xab\x62\x5e\x69\xb6\x53\
\x56\x8e\xa3\x6d\x83\xce\x0c\xfe\xd1\xd4\x0b\x19\xdf\xf6\x5d\xdf\
\x73\xe3\xcf\xfc\xe8\x0f\x9c\xc7\xe4\x9c\xa8\xbc\x5b\xf8\xbc\x91\
\x60\x4d\x02\xe3\x15\x21\x6a\x49\xaf\x06\xa6\x99\x00\x09\x98\xcd\
\x69\x67\x60\xb2\xf5\xbb\x8c\xb1\xa1\x59\x20\xdb\x25\x01\xa9\x75\
\xf0\xfa\x1b\xdb\x1f\xfa\xc8\x77\x1a\x37\xdf\x72\x1b\x2c\xdb\x01\
\xb3\x7c\x56\x82\xcd\xe5\x13\xb3\x99\x27\xab\x99\x27\xd0\x4c\x06\
\x9b\x2a\x92\xda\x4e\xb1\xa1\x18\x6f\x76\x80\x15\x4d\x38\xc9\xa8\
\xba\x9e\x37\xf5\x7d\x81\x94\x78\xd9\x97\x7d\xb9\xbb\xb0\xb4\x7c\
\x60\x63\x6d\x55\x16\x00\x92\x37\x01\x98\xfc\xc4\xdc\x20\x73\x94\
\x96\x1a\x90\x6a\x60\xda\x36\x20\x95\x2d\x21\xb4\x93\xc6\x86\x14\
\x20\xed\xbb\xe6\xda\xce\x47\xfe\xf1\xc7\xcc\x5b\x6e\x7b\x1e\x0c\
\xd3\x04\x33\xeb\x80\x31\xcd\x00\x38\xcf\x22\x66\x33\x2f\x19\xed\
\x0a\x04\x9b\xf2\x3f\x77\xc5\xe4\x00\x9a\x90\xf4\x3c\x03\xe0\x4c\
\x3e\xbf\xe6\x23\xc7\x6d\x63\x8d\x15\x4f\x8c\xa6\x81\xaf\x7a\xd3\
\x5b\xaf\xf9\x93\xff\xfa\xfb\x9b\x48\x57\x8d\xc8\x26\xd4\x7a\x39\
\x20\x65\x26\x80\x2c\xc9\x98\xea\x26\x82\x65\x7f\x9e\xab\xd8\x2e\
\xbe\x13\xcd\xfa\x26\x55\xfd\xce\xc6\x91\xa6\x59\xbf\xc7\x64\x3b\
\xc7\x6d\xb4\xbf\xf3\x7b\x7f\xd0\x79\xd1\x8b\x5f\x0a\xdb\x71\x4a\
\x58\x49\xe7\x6f\x12\xa8\x01\x67\x7b\x60\xb3\x23\x72\x1a\x55\x94\
\xae\x68\xc2\xef\x30\x0f\x36\x54\xf2\x24\xa3\x8a\x0f\x10\x30\xe3\
\x0f\x53\x3d\x53\x8f\x04\xa1\xbb\xd9\xe5\x0f\xbd\xf3\xad\x4f\x00\
\x58\x4d\xdc\xd6\xf4\x6d\x1d\xc0\x06\x80\x4d\x28\x3b\x79\x17\xb1\
\x95\x3c\x69\x23\x1f\x25\x80\x2b\x04\xab\x6c\xbb\xf7\xc2\x51\xdb\
\xc5\xaf\x2e\x86\x34\x0d\x90\x66\x69\xd6\x37\x09\x90\xca\x30\xa4\
\x46\x02\x84\x52\x80\x44\x44\xad\xb7\xbe\xf3\x7d\xcd\x77\xbf\xff\
\x03\x70\x1c\x57\x59\xbf\x99\x31\x9f\x24\xcf\xcb\x11\x74\x76\x48\
\x52\x9b\x47\xdc\x66\x66\x86\x33\x2b\xcb\xa9\xee\x6c\xab\x02\x50\
\x54\x7e\x2f\x2a\x9d\x1c\x34\xc3\x49\x55\xed\xdc\x99\x81\x29\x51\
\x85\x33\x97\x81\xe5\xe5\x65\x7a\xf9\xab\x5e\x7b\xcd\xe7\xff\xee\
\xd3\xd9\x42\xaf\x79\x37\x5b\x03\x90\x85\xb8\xc1\x60\x78\xcb\x3a\
\xf4\xea\x3a\x7a\x35\x30\x4d\x94\xed\xf2\x8c\x0d\xb3\x36\xeb\x0b\
\x0b\xad\x3a\xa8\x66\x6c\xc8\x93\xed\x22\x50\x7a\xdd\x9b\xbe\xa6\
\xfd\xf5\xdf\xf8\x2d\x58\x58\x5c\x84\x0c\x24\x98\xb9\x74\x3e\xc7\
\x14\x7e\x71\xd1\x93\x3d\x2f\x75\x1c\xe7\xf2\x02\x9d\x19\xe2\x3e\
\x44\x15\x25\xb8\x59\x40\x67\x56\x19\x6e\xbb\xec\xa8\x04\xc3\x9f\
\xf1\xc9\x59\x41\x4b\xca\x00\x1f\xfa\xd6\x6f\x6f\x7d\xfe\xef\x3e\
\xdd\xce\x01\xa2\x61\xce\x63\x49\x99\xcf\xcc\x00\x54\x36\xaf\xa9\
\xb6\x8e\xd7\xc0\xb4\xa3\x25\x84\x92\x95\xbf\x8b\x6a\xda\x55\xb6\
\x7e\xbf\xe0\xc5\x5f\xda\x7e\xfb\x7b\xdf\x2f\x6e\xbd\xed\xb9\x30\
\x4c\x4b\x39\xed\xaa\x48\x1d\xcf\x7a\xb6\x73\x39\xc9\x6b\x17\x81\
\xed\x54\x91\xd7\xa8\x9a\x10\x47\xdb\x06\x9d\x59\x72\x86\xb6\x09\
\x3a\x34\xf3\x99\x52\xf1\x47\x2a\x3e\x92\x52\x32\x6e\xb9\xed\x56\
\xba\xed\xf9\x2f\xdc\xf3\xe8\x83\xf7\xe7\xd5\xd5\xcb\x96\x24\x1a\
\x25\xe6\x85\x10\x9c\x92\x71\xa6\xa2\x0a\xe5\x35\x30\x65\x7f\x95\
\xab\x20\xc6\x44\xa8\x16\x47\x9a\xc5\xd8\x50\xb6\xa6\xdd\xd4\x38\
\xd2\xc1\xeb\x6f\xec\x7c\xcb\x77\xfe\x13\xe3\xa6\x5b\x6f\x85\x65\
\xaa\x8a\x0d\x97\x0f\xdb\xa9\x0e\x18\x97\x03\xdb\xb9\x9c\x64\xb6\
\x9d\x95\xd8\x66\xcd\x2d\xab\x9a\x33\xb4\x0d\xa6\x74\x99\x80\x4e\
\xd9\xed\x18\xc2\xc0\xd3\x4f\x3f\x85\x7f\xfa\xe1\x0f\x9d\x02\x70\
\x5e\xdf\x2e\x20\x1d\x73\x5a\xd7\xb7\x30\xde\xb4\x85\xf1\x9a\x7a\
\xd9\x58\x53\xa9\x32\x45\x75\x8c\xe9\xca\x64\x49\x93\x80\xa9\x6c\
\xb3\x3e\x0b\xf3\xa9\x69\x57\x14\x47\x6a\x01\x68\x2e\xed\xda\xdd\
\xf9\x8e\xef\xf9\x01\xeb\x85\x2f\x7a\x31\x84\x10\xca\x69\x37\x56\
\x42\xe8\x59\x2a\xb3\xed\x70\x6c\x67\x56\xe0\x29\x37\xb7\x51\xa5\
\xd7\xee\x9c\xb5\xfa\x52\x01\xcf\x0c\x45\xa8\xe6\x11\x17\xa2\x99\
\xcf\xd8\x19\x17\x3c\x54\xc0\x9a\x24\x6e\xbe\xf9\x16\x1c\xb8\xf6\
\xba\xc5\xd3\x27\x4f\x0c\x12\x6c\x29\xac\x44\xee\xea\xfb\x4e\x8e\
\xac\x97\xed\x06\x1d\x60\xbc\x4c\x51\xcd\x96\xae\x42\x29\x2f\x0f\
\x94\x8a\x9c\x76\xb3\x16\x59\x2d\x72\xda\x15\xe5\x22\xa5\x00\xc9\
\x71\x1b\xed\x77\x7c\xfd\x07\xdd\xaf\x7d\xe7\x7b\x60\x18\x06\x24\
\xcb\x9c\x55\xd2\xb3\x5b\x66\xbb\x7c\x19\xcf\x0e\xb2\x9e\x2a\xe0\
\xb3\x2d\xe0\x99\xd5\x84\x70\xe5\xb3\x1d\x9a\xcf\x09\x0a\x66\xc6\
\x37\x7c\xcb\xb7\x37\x7e\xe5\xe7\x7f\xba\x85\x74\x0b\x8c\x86\x06\
\x25\x37\xc1\x8c\xc2\xf9\x21\x1b\x6b\x4a\xe6\x35\xc9\x5a\xd2\xbb\
\x3a\xa5\x3c\xc2\x74\x73\xc3\x76\x8b\xac\x56\x05\xa4\x56\x16\x94\
\xde\xfd\xc1\x6f\x6e\xbd\xf3\x7d\xdf\x00\xd3\x34\x21\x03\x59\x03\
\xcf\xdc\x19\xcf\x6c\x06\x83\xf2\xaf\xad\x90\xe3\x43\xa5\xf7\xb8\
\x8a\x86\x56\x03\xcf\x36\x4e\xd0\x2a\x7d\xbd\x0c\x21\xf0\xa1\x77\
\xbd\xbd\x7f\xe1\xfc\xca\x99\x84\xa4\x17\xca\x7a\x6b\x18\xb7\x90\
\x6f\x65\x24\xbd\xac\x9c\xe7\x23\x5d\xf0\x35\x57\xce\xab\xa5\xbc\
\x2b\x93\x25\x01\xe5\xcc\x0d\xf3\x8c\x21\x4d\x05\xa4\x2f\xf9\xd2\
\x2f\x6f\xbf\xe3\x7d\xdf\x40\xb7\xdc\xf6\x5c\x08\x21\x0a\x8c\x0d\
\xb5\xd4\x56\x05\x48\x2a\xe1\x78\x05\xf0\x99\x67\x35\x83\x59\x80\
\x67\xba\x92\x57\x03\xcf\xb6\x81\xa7\xc4\x7a\xcc\x30\x0c\xbc\xed\
\xdd\xef\x6d\xfc\x97\xdf\xfe\x8d\x90\x35\xf5\x12\xd7\xfd\x20\xb1\
\x60\x0d\xe7\x8c\xd0\x08\x91\x75\xe8\x05\x89\xb9\xa8\x4e\xb8\xbd\
\x8a\x18\x53\x95\x9c\xa4\xa2\x12\x42\x45\xf1\x23\x07\x33\x24\xc6\
\x86\xb7\xeb\x0e\x5d\xdf\xfa\x47\xdf\xf7\x43\xc6\xf5\x37\xdc\x08\
\x43\x88\xc8\xd8\xb0\xe3\xc0\x53\x62\x3b\x3b\x6e\xa5\x9e\x85\x88\
\xd1\x2c\xb9\x2a\x54\xb9\x58\x45\x69\xa3\xc1\x0e\x49\x6e\xb3\xb2\
\x9e\x1a\x78\xe6\x07\x3c\x53\xf7\x90\x08\x83\x41\x1f\xef\x7e\xf3\
\x57\x6d\x01\x38\x97\xb8\x5d\x40\x6c\x86\x98\xc4\x9a\xc2\xb8\x54\
\xa5\x84\xdb\x9a\x31\x5d\x59\x6c\x69\x5a\xd2\x6c\x9e\xdb\x2e\x2f\
\x0f\x69\x5a\xa5\x86\x49\xcc\x28\xba\x2d\xed\xda\xdd\xfa\xf8\x4f\
\xfd\x9c\x75\xf0\xd0\x21\x08\x61\xe8\x12\x42\x71\x0b\xef\xcb\x1d\
\x78\xaa\x4a\x66\xb3\x00\xcf\x4e\xb0\x9d\x2a\xa0\x33\x0e\x26\x17\
\x53\x72\xdb\x99\xa4\xd3\x8a\x2f\x2d\xcb\xd1\x67\x38\xef\x66\xa7\
\xe4\x34\xdb\x07\x56\xe5\xa2\x25\x2e\x09\x46\xa7\xd3\xc1\xcb\x5f\
\xf5\xda\xd6\xe7\xff\xee\xd3\xbd\xc4\x1c\xd0\x4b\xcc\x13\x49\xc6\
\x94\x65\x4d\x75\xc2\xed\x55\xcc\x98\xca\xf4\x49\x32\x4a\xb0\xa4\
\x22\xb9\x6e\x92\x91\x61\xec\xd6\xea\x74\x3a\xdf\xfa\xd1\xef\xb6\
\x5f\xfe\xca\x57\xc1\xd4\x35\xed\x66\x5e\xcf\x5e\xd2\xaa\x05\x17\
\x49\x66\xab\x5a\x2a\xa7\x6a\x3e\x4f\x49\xb9\xed\x62\x4a\x6e\x57\
\x0d\xeb\xa9\x74\xde\xed\x0c\xeb\x29\x41\xe2\x27\x0e\x21\x04\xb6\
\x7a\x3d\xbc\xe7\xcd\x5f\xd5\xcd\xb0\xa6\xf3\x39\xac\x69\x13\xb1\
\x7d\x3c\xd9\xf1\xb6\xa8\x4c\x51\xae\x75\xbc\x66\x4c\x57\x3e\x73\
\x2a\x62\x4b\x49\x50\x2a\x13\x3b\xca\x63\x46\xed\xe4\x5f\xc3\x34\
\x3b\x5f\xff\x4d\xdf\xd6\xf8\x9a\x77\xbc\x4b\x19\x1b\xa4\x1c\x6b\
\xe5\xfc\x6c\x60\x3d\xf3\xaf\xd1\xb6\x73\x05\x44\xc7\x95\xbf\x8b\
\x6d\xad\xae\x59\xcf\xe5\xcf\x7a\x66\xd3\x0b\x93\x9d\x75\x17\x17\
\x16\xf0\xe2\x97\xbd\xbc\x75\xcf\x1d\x9f\xdf\xca\xcc\x11\x6e\x86\
\x39\x0d\x13\x8b\xde\x70\xae\x09\x17\xc5\x75\xc2\xed\x55\xc6\x98\
\x26\xf5\x4b\x9a\x04\x48\x59\x96\x54\xd4\x03\x29\x17\x88\xf4\xdf\
\x36\x80\xf6\x9b\xbe\xf6\x5d\x9d\x6f\xfc\xc8\x77\x90\x6d\xdb\xe3\
\x4e\xbb\x4b\x6e\x32\xd8\x61\xf0\xd9\x69\xc6\x53\xb1\x10\x60\x55\
\x6b\xf5\x5c\x59\x4f\x85\x27\x6a\xd6\x73\xf1\x58\x4f\x2e\x4c\x56\
\xd8\x80\x10\x02\x27\x4e\x9c\xc0\xb7\xbd\xff\x5d\x1b\xa8\x16\x6b\
\x9a\xc6\x9a\x72\x13\x6e\x6b\xc6\x74\x65\xb0\xa4\x3c\xc6\x54\x64\
\x7a\x48\x4a\x78\x49\x83\x43\x91\x44\x37\x06\x42\x00\x3a\xe1\xfd\
\x97\x7c\xf9\x2b\x16\xdf\xf9\xf5\x1f\x30\x6f\xbd\xed\x79\x60\xf0\
\x44\xa7\xdd\xce\x81\xcf\xf6\x4d\x06\x97\xb4\x74\xce\x74\x64\x98\
\x9f\xdc\x36\x0f\xd6\x53\x83\xcf\x15\x09\x3e\x85\x7c\x91\x14\x50\
\x1c\x3a\x74\x08\xd7\x5c\x77\xb0\x75\xea\xc4\xb1\xad\x0c\x63\xca\
\x8b\x33\x85\xb1\xa6\x6c\xb2\x6d\x72\x4e\xaa\x3b\xdc\x5e\x05\x52\
\x5e\x51\x95\x87\x2c\x6b\xca\x63\x4c\x8d\x0c\x28\xe5\x81\x50\xf2\
\x6f\xe7\xd0\x0d\x37\x2d\x7f\xd7\xf7\xfd\xb0\x7b\xc3\x4d\x37\x01\
\xcc\xc5\x25\x84\x2a\x5e\x69\x97\x96\xf9\x5c\xda\x5c\x9e\x62\xe0\
\xa9\x38\xbd\xd5\xf6\xea\xcb\x5f\x72\x9b\x17\xf8\xd0\x0c\xe5\x21\
\x0b\xc0\x67\xda\x60\x66\x7c\xdb\x77\x7d\xb7\xf1\x2f\x3e\xf1\xc3\
\x0d\x8c\xc7\xa3\xb3\xe0\x54\x24\xe7\xd5\xd6\xf1\xab\x08\x98\x68\
\x0a\x63\x0a\x4f\x88\xa4\xe9\xc1\x29\x00\xa6\x08\x7c\xf2\x6e\x9d\
\x85\xc5\x5d\x1f\xff\xe9\x9f\x5f\xbc\xe5\xd6\x5b\x89\x99\xc1\x52\
\x66\x4f\xf1\xb9\xf6\xe4\xa9\x0a\x56\xf3\xaf\xdd\x36\x7f\xf0\xb9\
\xd8\x05\x43\x6b\xf0\xa9\xc1\x87\xaa\xef\xc4\xd8\x2f\x28\xa5\xc4\
\xeb\x5e\xff\x7a\xfc\xea\xe2\x52\x6b\x73\x7d\xad\x8b\xfc\x18\x93\
\x83\xf1\x2e\xd6\x21\x38\xf9\x25\x18\xd3\x55\xcd\x9e\xae\x44\x29\
\x6f\x12\x28\xe5\xc5\x98\x92\xa0\x94\x04\xa6\x10\x84\x16\xf4\xad\
\x03\x60\xa1\xd9\x6a\xef\x7e\xcf\x87\xbe\x65\xcf\xdb\xbe\xee\x5d\
\x16\x48\x55\x20\x56\x9f\x56\xf5\x92\xbf\x08\xe0\xb3\x43\x66\x03\
\xaa\x78\x85\x6f\xab\x8c\xce\xbc\xc0\xa7\x96\xdd\xae\x3a\xd9\x6d\
\x0e\x5b\x29\xdc\x8e\x21\x04\xbe\xfe\x1b\xbf\xd5\xfa\x9d\x7f\xf7\
\x2b\x45\xac\xc9\xce\xb0\xa6\x3c\xc6\x54\x64\x82\xa8\xcd\x0f\x57\
\x90\xf9\x41\xe4\xc8\x76\x06\x26\x1b\x1d\x92\x45\x55\x93\x0c\x69\
\x31\x01\x48\xe1\xfd\xc5\x0f\x7c\xf8\x3b\x6f\x78\xe7\x7b\xbf\xbe\
\x41\x44\x08\xa4\x2c\x3f\x45\x5e\x04\xb7\xdb\x65\xd1\x2e\x81\xb6\
\x31\xbd\xcd\x50\x0c\xf0\x6a\x76\xbb\xd5\xe0\x83\x59\x76\xa4\x78\
\x09\x51\x71\x3b\x82\x08\xfd\xc1\x00\x5f\xf7\x86\x57\x6f\x01\x58\
\xc1\xb8\x75\x3c\x2c\x55\x34\x8b\x75\x3c\x4a\xb8\xad\xcd\x0f\x57\
\x26\x73\x9a\xe4\xca\x4b\x96\x1a\x4a\x32\xa6\x64\x7c\x69\x01\xc0\
\xc2\x57\xbc\xe6\xab\x6e\xf9\xba\xf7\xbe\x7f\xf9\xa6\x9b\x6e\x36\
\x58\x77\x8f\xa5\x29\x1a\xc3\xdc\xf3\x7c\x2e\x83\xb8\xcf\xfc\xcd\
\x06\x97\xb3\xf4\x56\x5b\xad\xab\xcd\xd7\x34\x8d\xe0\xcf\x04\x64\
\x17\x83\xfd\x54\x84\x54\x65\x82\x00\xd0\x69\xb7\xf1\xda\xaf\x7e\
\x73\xf3\xd3\x7f\xfd\x97\x45\x52\x5e\x1e\x63\x32\x31\x6e\x7e\xc8\
\x63\x4c\x57\x35\x73\xba\xd2\x18\x53\x9e\x6c\x97\xe7\xbc\xcb\x9a\
\x1c\x92\x4c\x69\x11\xc0\x12\x80\xa5\x9b\x9f\x7b\xfb\x6d\xff\xe4\
\xfb\x7f\xf8\x86\x43\x87\xaf\x37\x83\x20\x50\x4e\xbb\x59\x81\xa8\
\x6c\x79\x9d\x4b\x5c\xbd\x3a\x1f\x80\x2e\x81\xe9\xa0\x96\xde\x6a\
\xe9\xed\x12\x83\x4f\x19\xd6\xb4\xd5\xeb\xe1\x1d\x6f\x7c\xcd\xba\
\x66\x4d\x2b\x9a\x31\x85\xf6\xf1\xd0\x3a\xbe\xa1\x6f\xdd\x1c\xd6\
\x94\x6c\x93\x11\x64\x59\x53\xcd\x98\xae\x2c\xc6\x44\x53\x18\x53\
\xd6\x2a\x9e\x8a\x31\x1d\xbe\xf1\xe6\x5b\x7e\xf0\x13\x3f\xfd\x92\
\x6b\xae\xbb\xce\x0e\x7c\x1f\x23\xcf\x8b\x36\xac\x4e\x13\x06\x71\
\xfa\xb4\xe6\x89\x2b\x4d\x4a\x15\x1d\xa1\xaa\x40\xb4\x93\x0c\xe8\
\x52\xb6\x50\x98\x97\xf4\x56\xb3\x9f\x9a\xfd\xec\x20\x00\x15\xbd\
\x3f\x4c\xb8\x7d\xd9\x2b\x5e\xd9\xbe\xe3\xb3\x7f\xbf\x89\x62\xcb\
\xb8\x89\xe9\x71\x26\xa1\x01\x09\x35\x6b\xba\xf2\x18\x53\xb2\xaf\
\x52\x1e\x5b\x4a\x1a\x1c\x92\x36\xf0\x30\x96\xb4\xf4\xd1\x7f\xfa\
\x3d\x5f\xf7\xcd\xdf\xfa\xe1\xeb\xfc\x20\x88\xab\x35\x24\x96\x84\
\x81\x94\x08\x74\xe2\xec\xc8\xf3\x0b\x4e\x5f\x86\xe7\x07\xb9\xfb\
\x49\x00\x02\x66\x48\xc9\xd1\x76\x4a\x4f\x1e\x15\x8b\x9a\x4e\xea\
\xec\x4b\x13\x96\xba\x17\xd7\x7c\x70\x91\xa5\xb7\x79\xb1\x9f\xe2\
\xf9\xfb\x59\xcd\x7e\x2e\x0f\x00\x9a\x3d\xf6\x93\x7f\xfe\x6e\xfb\
\xa8\x14\x7e\x31\x21\x04\xce\x9c\x39\x83\x0f\xbe\xe3\xad\x21\x63\
\x3a\x97\x60\x4e\xab\x19\xd6\x94\xec\x70\x1b\xb2\xa6\xb0\x35\xbb\
\x97\x61\x4d\x61\x8c\xe9\xaa\x04\xa6\x2b\x85\x31\x4d\xea\x52\x9b\
\xc7\x9a\x2c\x14\x98\x22\x86\xc3\x01\x1c\xdb\x82\x19\x88\xca\xac\
\x25\x29\xad\xa5\xcf\x27\x4a\x5d\x1b\x32\x02\xa6\xa0\x1a\xe0\x84\
\xc0\x26\x25\xfc\x40\x16\x00\x63\xbc\xcc\xf2\x3c\x7f\x4c\x8e\x0b\
\x01\x49\x4a\x09\xc9\x09\x70\x4c\xae\x04\xa7\x3e\x30\xfe\x60\xf2\
\x9a\x2d\xca\xe4\x22\xae\x30\x99\x5e\x34\x09\xee\x2a\xb4\x5d\x5f\
\xc5\xf2\xdb\xac\x00\x54\x78\x9d\x49\x89\x6b\xaf\xb9\x06\xd7\x1d\
\x3a\xdc\x3e\x71\xf4\xc8\x06\xd2\xb1\xeb\x3c\xab\xb8\x81\x72\xce\
\xbc\xda\x2e\x7e\xa5\xb2\xc1\x09\xe0\x54\x98\xcb\xd4\xef\xf5\xa1\
\x9a\x9a\x67\x4e\x5e\x46\xfc\x68\x01\x48\x29\x2c\x62\xc5\x8c\xf2\
\xc0\x46\xff\xcf\x20\x82\x21\x00\xdb\x34\x26\x5e\x04\x54\x8d\xc2\
\x8c\x3d\xcb\xa9\xa2\xc5\xe9\x21\x99\xc1\x92\xe1\xcb\x20\x21\x33\
\x52\xc9\x1e\x45\x84\x20\x90\xf0\x83\x00\x23\xdf\x1f\x4f\x0d\x0c\
\xff\xc1\x8c\x91\x1f\x8c\x6d\x53\x1d\x1f\x20\x90\xaa\x42\x86\x9f\
\xd7\x24\x91\xa7\x7d\x63\x1e\xbf\x6a\x73\x8e\x13\x71\xf1\x01\x62\
\x94\x53\x32\x77\x16\x84\x26\xbf\xa1\x96\xdf\xe6\x2b\xbf\xcd\x0a\
\x40\x93\x06\x33\xe3\x1f\x7d\xec\x07\xdc\x1f\xff\x81\xef\x29\x4a\
\xae\xb5\x90\x6e\xb1\x93\x95\xf0\x04\xc6\xeb\xe5\x5d\xd5\xe3\x4a\
\x8f\x31\x65\x2b\x3f\xe4\x19\x23\x52\xf1\xa6\xcd\xcd\x8d\xe9\xd3\
\x33\x03\x5c\xf1\xa2\xe7\x90\x31\x50\x66\xee\x0d\xc1\x2c\xe7\x62\
\xe1\x9c\x49\x3a\xf5\x4c\x01\x72\x71\x09\x49\xc4\x20\x01\x08\xc0\
\x82\x51\x3c\xa9\xcf\xb4\xa0\xa7\x2c\x36\xe5\x7e\x37\xca\x65\x8e\
\x15\xe4\x3d\x82\x06\x47\xc5\x1c\x39\x87\xa7\x31\x6b\xb9\x95\xc6\
\xf7\x31\x09\x8c\x41\x20\xe3\xdf\x67\x1a\x37\x24\x4c\x5f\xc8\x72\
\xfa\x58\x70\x19\x25\x8f\x2e\x15\x08\x25\xf6\xf4\x72\x92\xdf\xe6\
\x0a\x40\xdb\x07\x9f\x49\xe7\xa7\x94\x12\xaf\x7a\xd5\xab\x69\x61\
\x69\xa9\xb5\xb1\xb6\xb6\x8e\xfc\x1c\x26\x0b\x93\xf3\x98\xb2\xac\
\x09\x57\x33\x6b\xba\x52\x2b\x3f\x60\x02\x38\x4d\xca\x71\xb2\x8f\
\x3c\xfd\xf4\x28\x9a\xd5\xe8\xd9\xb2\x80\xe1\x02\x4e\x91\x66\x7c\
\xe9\x97\xa8\x07\x92\xe0\x97\x85\x37\x2e\xa0\x13\x93\x59\x08\xc7\
\x93\x94\x3e\x84\x94\x9b\xc1\x9f\x60\x8e\x96\x31\xc3\x84\x5b\xee\
\xb7\x99\x24\xd1\x2b\x60\xcc\x32\x36\x9e\xf8\x39\x94\x03\x8e\x41\
\x20\x31\xf2\x7d\x70\x0e\xcb\x63\x28\x70\xa4\x3c\xe0\xd7\x09\xda\
\xe1\x3e\x70\xe9\x99\x93\xc7\x4a\x51\x13\x17\xcd\x60\x54\x6e\x6e\
\xae\x0c\x02\x97\x86\x05\x5d\x4a\x00\x9a\xf4\xa8\x10\x02\x1f\xfd\
\xee\x1f\x58\xf8\xa5\x9f\xf9\xf1\x73\x39\xf2\x5d\x96\x2d\xd5\xa0\
\x74\x95\x4a\x79\x79\xa0\x54\x54\x33\x2f\x65\x94\x18\x0e\x87\xa9\
\x79\xb7\x58\x0c\x63\xcc\x4f\xd4\x2e\x7f\xd5\x54\xfd\xd4\xc9\xe0\
\x54\x65\xdb\x65\xdf\x4c\x95\xf7\x8c\x33\xe8\x98\x12\x92\x0a\x27\
\x5c\x2e\x35\x37\x16\x5b\xea\x19\x06\x09\x18\x42\xc0\x32\x27\x68\
\x88\x25\x7e\x9c\xc8\x42\x45\x45\xe0\x38\xbe\x4f\xe1\xba\x47\x4a\
\x2e\x8c\xf5\x4d\x96\xf6\xd4\x3d\x15\x6f\x0c\x40\x20\x8c\x3c\xaf\
\x30\x1c\x38\xf2\xfd\x9c\x63\x13\xc6\x2c\x27\x48\xaa\x39\x98\xc1\
\xc9\xe3\xc4\xe5\x4f\x7c\xa2\xa2\xb7\x30\x88\x2b\xa6\x60\xcc\x49\
\x86\xab\xc4\xd2\x27\x6c\x23\x08\x02\xbc\xe9\xad\x6f\x35\xfe\xd5\
\xcf\xfd\x94\x23\x83\x20\xcb\x92\xf2\xda\x5e\x4c\x8b\x2f\xd5\x52\
\xde\x15\xce\x9a\x92\xa0\x34\xb5\x61\xe0\xa0\xdf\x17\xf1\x4c\xc2\
\x73\x3e\x47\x68\xdb\xaf\xa1\x8b\xba\x2f\xf3\x02\x47\x1e\x63\x4d\
\x93\xb6\x91\x80\xac\x52\x60\xc8\x53\xbf\x11\x97\x7a\x9c\x27\xbd\
\x9c\xb8\x30\xd6\xc4\x39\x00\x94\x04\xa9\x3c\x77\x24\xe9\x79\xd8\
\x30\x48\x05\x3c\x4d\xb3\xf8\x97\xa1\xa9\xbc\x65\xea\xcf\xac\x98\
\x23\x15\xb2\x4a\x29\x65\xaa\x9a\x49\xd9\xf3\x86\x22\x49\x35\xd0\
\x92\x6a\xd1\x32\x40\x33\xc7\x1c\x70\x44\x86\x39\x46\x98\x47\x53\
\x4e\xc2\xca\x84\x22\x07\xfc\xc6\x24\x03\xaa\x98\x56\x10\x9f\x03\
\x8e\x6d\xe1\x1b\xbe\xf9\x23\xfb\x7e\xff\x3f\xfe\xd6\xf9\x09\xa0\
\x94\x67\x13\xaf\x63\x4c\x57\x21\x63\x02\x26\x77\xb3\x4d\x31\xa7\
\x73\x2b\x67\x7d\x46\x09\x19\x6f\x86\x38\xd3\xce\x83\xcd\x9c\x57\
\x86\x05\xf2\xdf\xfc\x94\xc7\x9c\xed\x25\xc0\x86\xca\x6e\x0b\x65\
\x01\x6a\xfa\x21\xe2\x22\x11\x65\x5b\xbf\x77\xfe\x9e\xa5\xe2\x5a\
\x09\x9e\xce\x63\xa8\x92\x37\x1f\x72\x01\x86\x66\x38\x15\x17\x83\
\x63\x24\x43\x85\xcc\xb1\xb4\xa7\xa3\xba\xf9\x83\xa7\x90\x51\x29\
\x55\x45\x95\x28\xde\x57\xe1\x22\x21\x50\xc4\x1c\x8b\x9c\xaa\xe1\
\xc8\x7b\x3e\x64\xd5\x81\x94\xc5\xcc\x31\xe7\xe7\xcc\x44\x82\x11\
\x04\x12\x1f\xf8\xa6\x6f\x76\x7f\xff\x3f\xfe\x96\x39\x23\x28\xd5\
\x8c\xe9\x0a\x07\xa6\x69\xb2\x5e\x11\x73\x32\x99\xd9\x20\x50\x32\
\xfa\x72\x89\xf9\xc9\x1c\x3e\x97\x26\x4c\x2b\x34\x85\x5c\x14\x20\
\x04\xef\xe4\x77\x1a\xd3\x1f\x4b\x1c\xc1\x1c\x80\xda\xf9\xe3\x3e\
\x89\x85\x94\x0b\x51\x4e\xc2\xe8\xa9\x87\x85\xe6\xb2\xab\xb1\xbf\
\x91\x27\xf0\x85\xd4\x71\xe5\xc9\xfc\x8d\x0b\xde\x47\xc5\xcb\x22\
\x43\xa8\x27\x2d\xd3\x28\x87\x74\x98\xcd\x2c\xc2\x28\x6e\x4b\x23\
\xb3\xf9\x85\x13\x3e\x24\x2f\x57\x2a\x08\x02\x5c\xb3\x77\x17\xde\
\xf1\x9e\xf7\x1d\xfc\x93\xff\xf6\x87\xab\x25\x00\x69\x52\x17\xdb\
\xab\x1a\x9c\xae\x74\x60\x22\x4c\x6e\xb3\x3e\xc6\x9e\x3c\xcf\x53\
\x49\xc7\xa5\x42\x8f\x17\x5f\xea\xab\xf2\x89\x13\x41\x89\x4a\xec\
\x02\x6f\x4b\x68\x9b\xbc\xc3\x11\x03\x29\x46\x3e\xa6\xec\xca\xb4\
\xe4\x4c\x8f\x1d\x02\xa9\x39\xb2\xe4\x6d\xa3\x49\x89\xf7\xcc\x42\
\x78\x0b\x5f\x32\x6f\xb2\x9c\xb7\x51\x4e\x83\x58\xf2\x89\xb1\xef\
\x91\xb7\x74\x2c\x04\x2c\x4e\xb1\xab\x22\x65\x2f\x34\xe3\x84\xb2\
\x6a\xd5\x42\xb1\x04\x0b\x86\x69\x62\xef\xbe\xbd\x56\x0e\x28\xe5\
\x81\x13\x15\xa8\x3b\x57\xfd\x10\x57\x38\x28\x4d\x02\xa8\x5c\x70\
\x92\x52\x0a\x29\xa5\x3a\x81\xe7\x49\xb0\x69\x5b\x9d\x01\xa7\x4f\
\xc2\x33\x83\xd2\x84\x2f\x59\x98\xe6\xc7\x95\x77\x8a\x8b\x2d\x0c\
\xc5\xdb\x1b\x8b\xaf\x33\x2a\xc5\x15\x38\xfd\x16\x9e\xb2\x05\x9e\
\x37\xc5\xe5\xb2\xc7\xa6\xc4\x61\xcd\x7b\x09\x4f\x7f\x55\xa5\x9f\
\x6e\xe2\x2f\x35\xe3\x09\x39\xf5\x21\xae\x7c\x6e\x6f\xe3\xb2\x18\
\x5f\x68\x70\xf1\x89\x13\xfd\xc7\xe1\x0d\xd1\xad\xe8\x7b\x31\x33\
\xee\xfa\xe2\x17\x06\x53\x58\x52\x91\x1b\xaf\x06\xa7\xab\x00\x98\
\x66\x05\x28\x31\x1a\x8d\xb4\x26\x4f\xe3\xff\x11\x55\x06\x29\xba\
\x28\x78\xc4\x39\xa0\xb4\x5d\xa2\x39\xdb\x4e\x72\x21\xc0\xf0\x04\
\xe0\xe1\x89\xe0\xc2\x93\xa7\xdb\x6d\x81\x14\x57\x99\xc0\xb9\xe4\
\xc4\x8a\x79\x79\x7d\x2f\x23\xc7\x30\xcf\x6f\x2f\x77\xe4\xf5\x33\
\xbe\x88\xe7\x78\x28\x98\x19\xa7\x4e\x9e\x0a\x50\x2e\x8e\x44\x93\
\x57\x86\x57\x2f\x40\x5d\xa9\xc0\x44\x05\x33\x6d\x99\x9b\xf0\xb4\
\xb5\xb6\x58\xed\x8a\xff\xbb\xa4\x5f\x8e\x2e\xf6\x61\x2c\xcb\x75\
\xb8\xf2\x15\xce\x25\x67\x3e\x4e\xbd\x76\xc6\x49\x7b\xda\x5b\xe7\
\x89\x05\x35\x6b\x2a\x29\x89\x57\xfd\x1d\xf8\xb2\x83\x73\x22\x82\
\xef\xfb\x38\xb7\x72\xd6\xab\xd9\x51\x0d\x4c\xb3\x9c\x97\x34\x09\
\xb0\x98\x79\x3b\xd3\x5e\xe9\xf9\x7d\x16\x80\xa1\x31\x42\x73\x29\
\x8d\x3c\x5c\xf8\xcf\xd2\xac\xa9\x2a\x38\xf1\xd4\x69\x77\x36\x16\
\x35\x4d\xe7\xbb\xcc\x58\x13\x57\x7c\x1f\xcf\xeb\x12\xda\x31\xd6\
\xc4\x17\xe7\xca\x2f\xf5\x7b\x56\x3f\xdf\xc3\x7f\x4b\x29\xe1\x79\
\x1e\x23\x3f\x8f\x92\x6a\x70\xba\xba\x80\x69\xae\x0b\xa4\x23\xcf\
\x3c\x13\x85\x8f\xab\xce\x59\x65\x91\x69\xdb\x3d\x8f\xa6\xbd\x87\
\xcb\xae\xca\x19\x3b\xb3\xbe\xe4\x99\xc1\x69\xea\xb2\x60\x4c\xde\
\xe3\x1d\xfc\x1e\x97\x0b\x6b\xe2\xf9\x9e\xfd\xbc\x8d\x97\xcc\xc2\
\x80\x78\xfb\xc7\xae\x34\x3c\x4f\xcd\xfd\xdd\x99\xe5\x02\x11\xa1\
\xbb\xb5\x85\x09\xe0\x53\x83\xd3\x55\xce\x98\x0a\xd6\x33\xe5\xce\
\xcc\x6e\xb7\x9b\x98\x00\xd3\x93\xde\x3c\xa6\xc0\xca\x45\x41\x2b\
\x5e\x60\x5c\xe6\x5f\xbc\x0d\xfa\x30\x69\xe1\x38\x4d\x67\x9a\x06\
\x4e\x63\x00\x35\x9d\xf1\xcc\xff\x17\xba\x74\xac\x69\xe6\xd7\x5e\
\x26\x92\x5e\x55\xf5\xad\x2a\x6b\x9a\x4f\x84\x68\x07\x59\x53\xfa\
\xa2\xae\x0a\x3e\x35\x38\x5d\x05\xc0\x94\x47\x09\xf2\xee\x8f\xdd\
\x5c\xb7\x51\x30\x67\xc7\x36\x1e\xca\xac\x94\x72\xfc\xac\x25\x11\
\x8a\xaa\x5f\xf4\x5c\xf2\xb3\xb8\x04\x38\x6d\x7b\x25\xcb\x53\x56\
\xb9\x15\xc1\x69\x0c\xa0\xb8\x34\x40\x8d\xc3\xd2\xe5\xc3\xa2\xb8\
\x2a\x2a\x94\x64\x4d\x97\xaf\xa4\xc7\xdb\xfd\x84\xb9\x30\xc2\x4a\
\xcb\x05\xc6\xb6\x8e\x0e\x11\xb0\xbe\xbe\x51\x74\x51\xcf\xd9\x77\
\x5b\x03\xd3\xb3\x15\x84\xf2\x58\xd2\x54\x50\x02\xc0\x8f\x3d\xf6\
\x68\x79\xf6\x43\x61\x6a\x21\xe5\xb7\xbb\x28\xaa\xff\x45\x93\x76\
\xbb\xc4\x17\xe4\xc9\xe0\x90\x7a\x5d\xce\x67\x70\xde\x53\x65\xc8\
\x46\xd9\x79\xaa\x02\x38\x71\x29\xc0\xa9\x00\x50\x63\x20\xb5\x43\
\x2c\x8a\x2b\xae\xf8\xaf\x34\x49\x0f\x3b\xf1\x79\x73\x64\x4d\x33\
\x80\xd3\xb6\x58\x13\x11\xd6\x37\x36\x6a\xf6\x53\x03\x53\xe1\xd9\
\x52\xc4\x92\x8a\xa6\x61\xa9\x6f\x0c\x40\x3e\xf6\xc8\x23\x12\xa0\
\xb1\xdc\x05\x0e\x27\xa2\xc4\xf2\x37\xbf\x7a\x75\x85\x9c\x25\xe6\
\x1c\xb4\x99\x3e\x91\x8e\x03\x54\xf1\x24\xc7\x3c\x1d\xa0\x18\x05\
\xa1\xa7\x49\xbb\xc3\x53\xd6\xc8\x19\x70\xe2\x09\x5f\x82\x4b\x9b\
\x1e\xb8\x9c\xc0\x54\x00\x52\x97\x92\x45\x5d\x71\x92\xde\x65\xc5\
\x9a\x2e\x9d\xa4\x97\xbc\xfc\x9e\x7e\xfa\xa9\xa2\x1d\xe2\x39\xff\
\xec\x35\x30\x5d\x01\x0c\x2a\x0f\x80\x0a\xff\x4d\x84\xc4\x3a\x3b\
\xfd\x1f\x22\xb0\xe2\x08\x94\x92\xf7\x4b\xe1\x51\x18\x1b\xc9\xc4\
\x47\xb2\x20\x98\x43\x8d\x8a\xbf\x60\x4e\x3c\xac\x10\xa0\x18\x85\
\x68\x53\xd9\xec\x51\x01\x9c\xa6\x4d\x70\xbc\x13\x00\x85\x1d\x06\
\xa8\x1d\x62\x4d\xa8\xc8\x9a\x2e\x99\xa4\x37\xcb\xfb\xe6\x60\x1f\
\xe7\x8a\x1f\x5f\x55\xd2\x9b\x35\xb6\x76\xf7\x9d\x77\x4e\x53\x6d\
\xea\x51\x62\x5c\x89\x25\x89\xf2\xe6\xd6\x89\x0c\x29\x7b\xdb\xd8\
\xd8\x90\xcc\x2c\xf2\xd2\xc2\xc3\x22\x9f\x51\xd5\xa2\xb0\xe7\x10\
\x8d\x17\xd7\x61\x5d\xc3\x86\x08\x30\x84\x00\x88\x22\x10\x2b\x2a\
\xaa\x90\x04\xb8\x10\x3f\x54\x28\xaa\x64\x0d\xed\x29\xaf\xcf\xed\
\xbf\x44\xc5\x3d\x88\x4a\xf1\xc1\x54\xc1\xb7\xb8\x80\x4c\x7e\xb9\
\xbb\xb8\x5a\x59\x6e\x58\x8e\x90\xea\x1f\x4c\xd3\x26\x28\x2a\x28\
\x37\x33\xf5\x7d\xe1\x7b\x2e\x5e\x65\xbd\xe8\x50\x95\xac\x15\x34\
\xb9\x8e\x1e\xe7\xfe\xb6\xd3\xeb\xee\xcd\x5e\xfc\xb0\xe4\x6e\x94\
\xdb\x64\x71\xfd\xde\xd2\xfb\x39\xe1\x08\xe4\xbe\xa7\x52\x0b\x9b\
\x19\xeb\x6d\x3d\xf3\xf4\xd3\x93\xe6\x9f\x49\xb2\x48\x0d\x5a\x57\
\x30\x30\xf1\x14\xb6\x54\x04\x50\x12\x40\x10\xde\x4e\x1e\x3f\x1e\
\x30\xc3\x2c\x94\xe9\x52\x6d\x59\x75\xc3\xbd\xc4\x6b\xa3\xb8\x13\
\x11\x18\x8c\x5e\xaf\x87\xd5\xd5\x55\x30\x33\x5c\xd7\x85\xe3\x38\
\x30\x2d\x4b\x25\x38\x08\x03\x24\x48\xdf\x17\x30\x4d\x13\x42\x21\
\x5d\xaa\x97\xd0\x78\x5f\x21\x4e\xaf\xee\x92\xf5\xfd\x92\x5d\x70\
\x23\x9a\x44\x93\x97\x93\x85\xe6\x8d\xe2\xca\x63\xd3\x7a\x37\x15\
\x6e\x36\x02\xa8\x9c\xd6\x0d\xa9\x8f\x2e\x00\xb1\xa9\x80\x56\x1e\
\xa4\x38\x55\xe0\x62\x46\x90\x1a\xab\xa1\xb7\xad\xce\x56\x33\xbf\
\x76\xdb\x40\x33\xf5\x3d\x79\x0d\x4c\xca\x80\x53\x79\x30\xdc\x7e\
\x6d\xda\x59\x8f\x58\xce\x96\x4a\x15\xe2\x4d\xd4\x26\x94\x8c\xc7\
\x1f\x7b\x54\x62\x72\x0c\x3b\x8f\xae\xd7\xac\xea\x2a\x60\x4c\x65\
\x00\x6a\xe2\xad\xdf\xeb\x49\x66\xd5\xc0\x6d\x9a\x36\x10\x4d\xad\
\xe1\x2a\x4e\x32\x3c\xdf\x87\xe7\x07\xe8\x6e\xf5\xe0\x07\x12\x1b\
\x1b\x1b\x78\xf8\xe1\x87\x71\xec\xc8\xd3\xd8\x5c\x5b\xc5\xc6\xfa\
\x2a\x86\x83\x01\x2e\x9c\x5b\x41\x10\x04\x60\x66\x18\x86\x01\xb7\
\xd1\x40\xbb\xd3\x81\x6d\xdb\xb0\x6d\x07\xa6\x65\xa2\xd1\x68\x42\
\x08\x81\x85\xc5\x45\xd8\xb6\x83\x46\xa3\x81\x46\xb3\x89\xbd\x7b\
\xf7\xa2\xd1\x68\xc0\x76\xd4\x63\xbb\x76\xed\x42\x10\x04\xb0\x2c\
\x0b\x82\x08\x7e\x10\x40\x4a\xa9\x80\xd0\xb6\x61\x9a\x26\x98\x19\
\xc2\x10\xba\x41\x1c\xc1\x34\x4d\x18\x42\x80\x44\x0c\x84\x61\x5d\
\x75\x4a\xb9\x34\x38\x47\xea\x28\x60\x59\x1c\x4a\x6c\x94\xf3\x4e\
\xae\x32\x6d\xa5\x28\x40\x69\x80\xca\x80\xd4\xd4\xae\x45\x85\x55\
\xc9\x2b\x36\xd1\xa8\x3a\xcb\x6f\xfb\xf5\x25\xa6\xe5\x12\x15\x59\
\xab\x4f\xe3\xb3\xbe\xa3\xfc\xfb\xa6\xee\xdd\x78\xed\xd7\xe9\xe0\
\x54\xaa\x9d\xca\xec\xe0\x44\xa4\xda\x66\x6c\xac\xad\x4f\x03\xa6\
\x32\xb1\xf0\xab\x1e\x9c\xae\x54\x29\xaf\x88\x32\xcb\x12\xe0\x14\
\x9c\x3d\x7b\xc6\x0b\x64\xd0\x28\x8a\x1b\x25\x27\x5c\xcf\x0f\x20\
\x99\xb1\xb9\x35\x80\xef\x07\x90\x2c\x31\x18\x79\x60\x19\xc7\x40\
\x2c\xa7\x81\x17\xbf\xf4\x4b\xf1\xe2\x97\xbe\x0c\x52\x4a\x0c\x06\
\x03\x6c\x6e\x6c\x60\x65\xe5\x2c\x8e\x3e\xf3\x14\xee\xbb\xf3\x8b\
\x58\xbb\x70\x0e\xab\x17\x4e\xa2\xd7\xdb\x82\x94\x32\x36\x58\xe4\
\x39\xfd\x32\x8f\x13\x11\x84\x10\x90\x52\x42\x08\x02\x91\x92\x0d\
\x05\x11\x1c\xd7\x85\x6d\x3b\xb0\x1d\x1b\x41\x10\xc0\x34\x0c\x90\
\x10\x10\x42\xc0\x71\x5d\xb4\xdb\x0a\x08\x1d\xd7\x85\x69\x9a\x68\
\xb5\x5a\xb0\x2c\x1b\xcb\xbb\x77\x69\x20\x74\xb1\xb4\xb4\x0c\xdb\
\xb6\xd1\x68\x36\xd5\xdf\x14\x10\x9a\x10\x24\xe0\x07\x3e\xa4\x64\
\x34\x5c\x17\xb6\x6d\xc5\x40\x28\x0c\x10\x11\x0c\x43\xc0\x34\x4c\
\x85\xe1\x1a\x18\xc3\x16\xeb\x31\xae\x53\xe1\x3a\xbd\x38\xec\xc0\
\x69\x26\xb6\xdd\x50\x08\xcd\x3e\x75\x57\x66\x42\x3b\x2d\xe9\xcd\
\x32\xfd\xef\x80\xa4\xb7\xbd\x83\x76\x19\x80\x13\xca\x24\x20\x11\
\x46\xfe\x08\x1b\x1b\xeb\x41\xce\x9c\x52\x86\x41\x4d\x5a\x6a\xd5\
\xc0\x74\x05\x81\x13\x4f\x01\xa7\x3c\x80\x0a\x00\x48\xd2\x1a\x12\
\x6b\x77\x02\x03\x7a\xc2\x27\x0c\x86\x1e\xfa\x43\x4f\xcf\x81\x8c\
\xfe\x60\x84\x40\xf7\x71\x09\x15\x34\xd3\x34\xf3\x83\xfe\x0c\x18\
\x86\x01\xdb\xb6\xb1\xb0\xb0\x80\xe7\x1c\x3c\x88\x97\x7e\xe9\xcb\
\xf0\x8e\x77\xbf\x0f\xc3\xd1\x10\x9b\x1b\x1b\x38\x75\xf2\x24\x2e\
\x9c\x3f\x87\x07\xef\xbd\x0b\xeb\xab\xab\x38\x79\xec\x08\x36\x37\
\xd6\x75\x6c\x4a\xc6\xbc\x21\x01\x56\xaa\xc1\x5a\x00\x00\x08\x82\
\xf0\x6b\xa9\x31\x1a\x0d\x31\xd1\x97\xc1\xd3\x2d\x04\x49\x60\x0c\
\x2d\xf1\xc2\x30\xc0\x52\xaa\x7f\x0b\x11\x3d\xae\xa4\x4a\x17\xb6\
\x63\x43\x06\x01\x0c\xd3\x84\x10\x02\x86\x61\x60\x71\x71\x09\xa6\
\x65\x45\x40\x68\x59\x16\x96\x96\x96\xd1\xee\x74\x60\xe9\xc7\xdd\
\x46\x03\x4b\xcb\xcb\xb0\x2d\x1b\x8d\x66\x43\x01\xa1\xdb\xc0\xf2\
\xae\x65\x05\x84\x7a\x7b\xbe\x1f\x80\x59\x31\x42\xcb\x8a\x81\xd0\
\xd0\x8c\x50\x08\x43\x81\x70\x06\xc0\xf3\x65\xd1\xf1\xf9\x80\x27\
\xb8\xdb\x78\xf6\x92\x08\xdb\x3a\xa1\x77\x32\xde\x54\x0d\x9c\x2e\
\xb6\xa4\x37\x6b\x5c\x6c\x4e\xe0\x54\xa6\xdd\x09\x01\xc3\xc1\x10\
\x28\x36\x55\x95\x95\xf7\x6a\x29\xef\x0a\x03\xa6\x32\xa6\x87\x22\
\xf3\x43\x72\x95\x13\x90\xa0\x20\x9c\xae\x85\x21\xc0\xcc\xb8\xfb\
\xfe\x87\x20\x19\x68\x77\x16\xd0\x6a\xb6\x60\xdb\x16\x98\x01\x61\
\x9a\x10\xa9\xb2\xf8\x9c\xe8\x0b\x43\x53\x27\x30\x86\xea\x20\xda\
\x6c\x34\xd0\x6c\x36\x71\xcd\x35\xd7\x00\x44\x78\xe3\x9b\xde\x02\
\x66\xc6\xca\xca\x0a\xce\x9c\x3e\x8d\x73\x2b\x67\x70\xf7\x17\x3f\
\x87\xee\xc6\x06\x4e\x1e\x3f\x82\xee\xc6\x06\xa4\x0c\x12\x80\x48\
\x05\x5d\x4a\x69\xb2\x14\x41\x15\x4b\xd1\x6a\x99\x2c\xf0\x7d\x10\
\x11\x24\x4b\x40\x83\x22\x11\x61\x34\x1c\x02\x58\xdf\xf6\x8f\x99\
\x04\x93\x34\x23\x8c\x41\x90\x84\x50\x40\xa8\xe3\x76\x81\x9f\x01\
\xc2\xa5\xa5\x08\xf0\x22\x20\x5c\x4e\x02\xa1\x83\x86\xeb\x62\x69\
\x79\x19\x96\x6d\xc3\xb6\x6d\x34\x1b\x0d\xb8\xae\x8b\xe5\xe5\xe5\
\x58\x1a\x15\x02\xbe\xef\x47\xd2\xa8\x6d\x59\x30\x0c\x03\x22\x04\
\x3e\x20\xfa\xcc\x68\xdf\x92\xe7\xc0\x1c\x80\x90\xb0\x0d\x62\xb8\
\xbd\xb6\x4e\xdb\x62\x32\x17\x13\x9c\x26\xf4\x09\xbe\x28\xe0\xa4\
\x5b\xd3\x4f\x75\xfd\xa2\x42\x22\x46\x0d\x4c\x57\x3e\x6b\x92\x98\
\xec\xc6\x0b\xcd\x0f\x32\x08\x82\x00\x0c\x9c\x5d\x39\x8f\x23\xc7\
\x8e\xe1\xa9\xa7\x9f\xc6\x13\x4f\x3e\x8d\x40\x4a\xd8\xb6\x8d\xdd\
\x7b\xf6\xc2\xd1\xb1\x9d\xeb\xaf\xbf\x01\x8b\x0b\x1d\x2c\x74\x16\
\x60\x59\x56\x34\x21\xa9\x56\xd1\x72\x6c\xc2\x29\x5e\xad\x73\x5a\
\xd8\x06\x41\x08\xc2\x81\x03\xfb\x71\xcd\x35\x07\x00\x10\xde\xf8\
\xe6\xb7\x00\xcc\x58\x59\x39\x87\xf3\xe7\xce\xe1\xc4\xf1\x63\x78\
\xfc\x91\x87\xf0\xcc\x93\x8f\x61\x7d\xf5\x02\x7a\xdd\x4d\xf4\xfb\
\xfd\xc8\x88\x41\x19\x03\xc5\xf6\xd1\x22\x01\xb6\x63\x13\xef\x38\
\xbb\xca\x68\x8f\xb3\x17\x5e\x4a\x31\xc2\x20\xf5\xdc\x68\x38\x04\
\xaf\xad\x55\x38\x29\xd2\xd2\x5f\xba\x71\x9c\xfa\x97\x92\x1e\x0d\
\xc8\x0c\x23\x14\x44\x70\x1b\x8a\xc5\x99\x96\x05\xd3\x54\xa0\x05\
\x28\x26\xbc\xb4\xbc\x04\xcb\xb2\x61\xd9\x36\x5c\xd7\x45\xa3\xd1\
\xc0\xf2\xae\x5d\x70\xdd\x46\xc4\x14\x1b\x8d\x06\x96\x96\x96\x74\
\x1c\xd1\x46\xa3\xd1\x44\xa3\x11\x03\xa1\x6d\xdb\x30\x0c\x23\x02\
\x42\xdb\xb6\x61\x99\x26\x0c\xc3\x88\x80\x0f\x08\x8d\x32\x46\xe2\
\xf7\x48\x03\x62\xd1\x11\x67\xc4\x29\x0e\x2a\x9e\x98\x76\x40\x46\
\xc7\x27\x3f\xb4\x88\x39\x9e\x4d\x3b\xc6\x9c\x76\x4c\xd6\x2b\xd7\
\x28\x52\x4e\x98\x6b\x18\xe5\xe3\x4f\x57\x35\x40\x51\x99\xfc\x9b\
\xcb\xfe\x4b\xc4\xb3\x6f\x58\x66\xde\x04\x60\x01\x70\xf4\xcd\x05\
\xd0\x04\xd0\x02\xd0\x06\xd0\x01\xb0\x00\x60\x49\xdf\x76\x01\xd8\
\x0d\x60\x0f\x80\xbd\x00\xf6\xdd\xfe\x25\x2f\xb9\x66\x69\xdf\x01\
\x71\x6e\xe5\x2c\x82\x20\xc0\x81\xeb\x0e\xa2\xdd\xe9\x24\x9a\x86\
\x71\x3c\x41\x58\x16\xf6\xec\xd9\xab\x8c\x08\x6e\x03\xd7\x5f\x7f\
\x3d\xf6\xed\xdd\x8b\x85\x4e\x7b\x6c\x82\x95\x92\x73\x26\xfb\x6a\
\xe8\x90\x5e\x95\x13\xa4\x0c\x30\x1c\x0e\x71\xf6\xec\x0a\x9e\x7a\
\xe2\x71\x9c\x38\x76\x04\x8f\x3e\x78\x3f\x56\x4e\x9f\xc4\xd6\x56\
\x17\xc3\xc1\x20\x9a\xd0\xb3\xb2\xd6\x2c\x2c\xa6\x2a\x98\x61\xa7\
\x1a\x84\x4c\x00\x5d\xda\xe6\xfc\x18\x45\xbd\x99\x27\xbf\xa6\x2c\
\x08\x22\x1f\x0c\x93\xd2\xa8\x94\x32\x76\x64\xea\xe7\x6c\xc7\x51\
\xe0\x64\x29\xd6\x17\x01\xa1\x69\x60\x69\x49\x31\x3d\xc7\x71\xe0\
\x38\x0e\x16\x16\x16\xd1\x59\x58\x80\xeb\xba\x30\x2d\x13\xb6\x65\
\x63\x69\x79\x19\x9d\x4e\x47\xc5\x14\x1d\x07\x9d\x4e\x07\xae\xeb\
\xa2\xd3\xe9\x68\xe0\xb3\x60\x08\x43\xc7\x08\x25\x6c\xcb\x86\x69\
\x99\x30\x44\x1a\x08\x0d\x43\x33\xc2\x64\x4c\x30\x11\x2b\x9c\xba\
\xdc\xe2\x7c\xb4\xe3\x89\xd3\x6f\xc5\xe4\xf5\xa9\x2d\xc4\x68\xc2\
\x82\x6b\xea\x89\x36\xf1\xf5\x86\x61\xe0\x91\x47\x1f\xc3\x57\xbf\
\xee\x35\xab\x00\xce\xea\xdb\x0a\x80\xf3\x00\x2e\x00\x58\x05\xb0\
\xa6\xe5\x84\x0d\x00\x5d\x00\x5b\xfa\xd6\x07\x30\x00\x30\xd2\x37\
\x5f\xdf\x24\x5f\x09\x13\x74\xcd\x98\x72\x57\x1c\x65\x1d\x79\x41\
\xf2\xf6\xe8\x43\xf7\xfb\x37\x82\xec\x50\x46\x12\x86\x18\x9b\x4c\
\xc2\xe1\x7b\x1e\x4e\x9d\x3c\x11\x81\xd5\x23\x0f\x3f\x88\x76\x67\
\x01\x7b\xf6\xec\x05\xc0\x11\xb3\xda\xb7\x77\x0f\x3a\xed\x76\xea\
\x62\xce\x82\x55\xb9\xb9\x3f\x96\x0e\xc3\xfd\x71\x5d\x17\x87\x0f\
\x1f\xc2\xf5\xd7\x1f\x56\x12\x9b\x36\x59\x9c\x3d\xbb\x82\x8d\xf5\
\x35\x3c\x70\xdf\x3d\x78\xe0\x9e\x3b\xb1\x72\xfa\x14\x7c\xcf\xc3\
\xe6\xc6\x7a\x8a\x7d\x50\xa1\x14\xb8\x8d\x99\x7e\xa7\x40\x29\x07\
\x90\xe6\xde\xe0\x9e\x68\xe2\x0f\x42\xe5\x7f\xac\xa9\x53\x2d\xb3\
\x92\x46\xa1\x4f\xbe\xe4\xf0\x3c\x0f\xdd\x6d\x80\x63\x56\xae\x25\
\x0d\x7c\x86\x96\x46\x49\x88\x08\x04\x41\x04\x27\x03\x84\x86\x11\
\x32\x42\x53\x49\x9e\x96\x05\xc7\x75\x15\xb8\x2d\x2c\xa0\xd1\x68\
\xc2\x71\x6c\x2c\xef\xda\x8d\x46\xa3\x81\x4e\xa7\x83\x66\xab\x09\
\x96\x1c\x81\xa0\x8a\xa9\x76\x10\x04\x8a\x01\x1a\x42\x44\xae\x51\
\xdb\xb6\x74\xdc\x30\x8e\x09\x86\x0b\x3e\xc3\x34\x22\x2e\xa7\xfa\
\x76\x52\x64\x92\x29\x3a\xf4\x3c\xa5\xb1\x55\xf2\xba\x29\xcf\x84\
\xca\x31\xa7\x53\xa7\x4e\xa1\x84\x32\x33\xcd\xa5\x57\x4b\x79\xb8\
\xf2\x62\x4c\x54\x00\x48\xd3\x62\x4d\x41\x01\x50\x69\xe0\x90\xf0\
\x86\x23\xa0\xd9\x2a\x9c\xb1\x95\xe4\x13\x3f\xb2\xd5\xdd\xc4\xe6\
\xc6\x86\x5e\x74\x33\x1e\x7e\xe8\x41\x74\x3a\x0b\xd8\xb3\x77\x2f\
\x98\x19\x07\x0f\x1e\xc2\xc2\xc2\x02\xf6\xee\xde\x8d\x8e\x66\x56\
\xe1\x64\xc7\x52\x46\x56\x75\xaa\x40\xa9\xb2\x15\x28\x42\xb0\x22\
\x3a\x8c\x17\xbd\xf8\xc5\x90\xdf\xf8\xcd\x18\x0c\x06\xe8\x76\xbb\
\x38\x7d\xea\x14\xee\xbf\xe7\x6e\x3c\xfe\xc8\x43\x38\x7b\xfa\x04\
\xba\x1b\xeb\xe8\x6d\x6d\xc1\xf7\xfd\x88\x2d\xa4\x8c\x03\x55\x0d\
\xd4\x3b\x01\x4a\x3b\x0c\x48\x17\x85\xdd\xe7\xcd\x3c\x93\x00\x8e\
\xb9\x70\xc1\x30\x2b\x38\x22\x21\x8d\xb2\x52\xad\x63\x20\x1c\x8d\
\x8a\x81\x94\x8b\x2b\x4e\x50\x21\xc3\x56\x20\x22\x84\x01\xc9\xe3\
\x8c\xd0\x71\x5c\x58\xb6\x15\xc9\x9f\x42\x18\x11\x03\x59\xde\xb5\
\x4b\xb1\x41\xd7\x85\xeb\xb8\x68\x34\x9b\x68\xb5\x5b\x70\x5d\x17\
\xbb\x76\xed\x86\xdb\x68\x60\x61\x61\x01\xad\x56\x0b\x42\x08\xb4\
\x5b\x2d\x34\x5b\x4d\x65\x9c\x69\x34\x40\x42\xc0\x34\x0c\x08\x41\
\xf0\xfd\x40\x2d\xe0\x1c\x07\xcd\x66\x33\x77\xf6\x60\x9a\x74\x4e\
\xe5\x80\x53\x72\xfd\x02\xe0\xc9\x27\x9e\xc0\x84\xf9\xa4\xc8\x7c\
\x05\xd4\x56\xf1\x2b\x9e\x31\x65\x57\x1d\x95\xad\xe2\xe1\x4d\x4a\
\x19\x3c\xf5\xd0\x7d\xb8\xfe\xb9\x2f\x80\x94\x12\x52\x06\x95\x65\
\x2f\xc3\x48\x9f\xe2\xdd\xee\x26\x36\x37\x55\x91\xc7\x67\x9e\x7e\
\x0a\x00\xa1\xd3\xe9\x60\xcf\xde\x7d\x60\x96\x38\x78\xe8\x10\x16\
\x17\x16\xb1\x67\xf7\x2e\x2c\x74\x3a\xa9\x79\x4b\xc5\xac\xb8\xb2\
\xaa\x35\x0e\x56\x0e\x5c\xd7\xc5\xbe\xbd\x7b\xf1\xa2\x17\xbd\x08\
\x00\x30\x1c\x0e\xb1\xd5\xeb\xe1\xd4\xc9\x93\x78\xec\x91\x87\x71\
\xdf\x5d\x5f\xc4\xfa\xda\x2a\x56\x4e\x9f\x44\xbf\xd7\x8b\xe2\x1d\
\xc9\x15\xf7\x74\x76\x35\x47\x50\xba\x02\x00\xa9\x14\x40\x15\xb0\
\x1d\x94\x65\x46\xdb\xdc\x97\x3c\x90\xa4\xb2\x00\x3a\x81\x19\xaa\
\x18\x61\x3e\x23\x1c\x79\x5e\xb1\x5c\x5a\xf1\x3b\x87\xea\x46\x18\
\x17\x8c\x40\x3d\x7c\x5c\x08\xbc\xfb\x7d\xef\xc7\x4f\xfc\xf8\x8f\
\x47\x0e\xd7\xbc\xe0\x54\x95\x0a\x11\x91\xe2\x0b\xe0\xce\x3b\xbe\
\x88\x29\x80\x54\xc6\xa9\x37\x8d\x60\xd7\xc0\x74\x95\x81\x53\x90\
\x04\x27\x96\x32\x80\x3e\xb9\xc1\x0c\xcf\xf3\xb6\x3f\x01\xe4\x4c\
\xe8\x49\xb0\x3a\xf2\xcc\xd3\x00\x80\x76\xa7\x83\xbd\x7b\xf7\x45\
\xcc\x6a\x71\x71\x01\x7b\x76\xef\x4e\xc4\xac\xd4\xa4\x2f\x13\x16\
\xf2\xd2\xd3\xb5\x16\xf5\xa3\xe4\x61\x82\xb6\x6d\x2f\x61\x79\x79\
\x19\xcf\x7f\xc1\x0b\xf0\xee\xf7\xbe\x0f\x9e\xef\x63\x63\x63\x03\
\xe7\x56\x56\x70\xec\xe8\x11\x7c\xfe\xef\x3f\x83\x73\x67\x94\x3b\
\xb0\xd7\xed\xaa\xc4\x60\x29\xc7\x98\xd5\x4e\x83\xd2\x95\x56\xb2\
\xb9\x32\x40\x4d\x60\x2f\x97\xed\xf7\x22\x2a\x3c\x0f\x27\xb1\xbe\
\x59\x62\x9a\x91\x54\x27\xfd\x94\x8c\x19\x10\x41\x4a\xc6\xbe\xfd\
\x07\x32\xa1\xc3\x1c\xe7\x04\x26\x49\x7b\xe3\x1c\x91\xf5\xe7\xde\
\x7f\xdf\x7d\xd3\x16\xbe\x93\x40\x09\xa8\x2d\xe3\x57\x3c\x30\xcd\
\x05\x9c\xa2\x42\xab\x73\x02\xa6\xd2\x60\xb5\xd9\xc5\xe6\x46\x92\
\x59\x29\x9b\xfa\x5e\x2d\x03\x1e\x0a\x99\xd5\x9e\xdd\x58\x68\xb7\
\x93\x45\x17\x00\xb0\x4e\xee\xcd\xae\x76\x8b\xf9\x86\x4a\xf6\xd4\
\x71\x2b\xfd\x98\x10\x84\xe5\xa5\x25\xec\xda\xb5\x8c\xdb\x6e\xbb\
\x0d\x6f\x7c\xd3\x9b\x20\xa5\xc4\xe6\x66\x17\xa7\x4f\x9f\xc6\xf1\
\xa3\x47\x70\xff\x3d\x77\xe1\xd8\xd3\x4f\x61\xe5\xec\x29\x6c\x75\
\xbb\x08\x7c\x1f\x2c\x39\xf5\xbd\x66\x32\x4c\xe4\x80\xd2\x95\xde\
\x43\xa0\x34\x40\xe5\x01\xd5\x65\x0c\x52\x85\xd6\xf6\xed\x24\x43\
\x4f\xb9\x9e\xb2\xe7\x78\xc4\x9a\x0c\x81\x3d\x7b\xf7\x96\x02\x9b\
\xaa\x71\x27\x66\x46\x77\x63\xa3\x48\xc6\x2b\xeb\xce\xab\xd9\xd2\
\x15\x0a\x4c\x55\xf2\x98\xa6\x82\x53\xa2\xa6\x38\x46\x83\x41\x69\
\x69\x61\xe6\xfa\x66\x89\x39\x87\xc8\x48\x5d\x2b\x2a\x66\xb5\x0e\
\x80\x22\xb0\xea\x2c\x28\x83\x45\xb3\xd9\xc2\x8d\x37\xde\x80\xc5\
\x05\x65\x59\x5f\x0c\x65\x40\x8a\x93\x84\x65\x4e\x83\xc3\xc9\x9a\
\x8e\xae\xe0\x2d\xd3\xc5\x80\x16\x3a\x1d\x2c\x2e\x2c\xe0\xb9\x21\
\x58\x05\x12\x9b\x5d\x05\x56\xc7\x8e\x3c\x83\x27\x1f\x7b\x14\x47\
\x9f\x79\x0a\xa7\x8e\x1f\x45\x77\x73\x43\xd9\xb9\x35\xe8\x09\x11\
\xc6\x1c\xca\xb4\x05\xb9\x3a\x00\x69\x2e\xf3\xf5\x45\x90\xfb\x2e\
\xa3\x6f\x3b\xf3\x10\x42\x60\xf7\xee\xdd\x13\xae\xd1\xfc\x38\x12\
\xa6\xb0\x27\x82\x80\xe7\x79\x58\x5d\xbd\xe0\x4f\x01\xa5\x3a\xc1\
\xb6\x66\x4c\x53\x01\xaa\x4c\xcc\x29\x92\xf2\x2e\xb9\x6b\x53\x5b\
\x8a\x29\xc5\xac\x36\x23\x66\xf5\xd0\x83\xf7\x6b\x27\x95\x83\x3d\
\x7b\xf6\xa2\xd5\x6a\xe1\xc6\x1b\x6e\xc4\xe2\x42\x07\x96\x6d\x63\
\xa1\xd3\x8e\xc0\x25\xfc\x2e\x32\x25\x03\x02\x65\x44\xb8\x54\xcc\
\x4a\x5f\xb0\x9d\x4e\x1b\x8b\x0b\xb7\xe0\xb9\xb7\xdd\x8a\xaf\x7e\
\xd3\x9b\x23\x47\xe0\x89\x13\x27\xb0\xb2\x72\x16\x47\x9e\x7e\x0a\
\xf7\xdf\x75\x07\x4e\x9d\x38\x86\x41\xbf\x87\xe1\x60\xa0\x4c\x16\
\x61\x4d\xbd\x1c\x29\xf0\x6a\x04\xa5\x99\xd9\xd3\xb3\x54\xee\xbb\
\xd8\x47\x54\x08\x81\x46\xc3\x8d\xda\xbf\xe4\x9b\x1d\x66\x63\x4f\
\x52\x32\xa4\x0a\xc4\x56\x01\x25\xd4\x6c\xe9\xea\x02\xa6\x69\x2d\
\x2f\xa6\x81\x53\x82\x35\xc1\x60\x46\xf9\xde\x3f\x3b\xf1\x4d\xa8\
\x9c\x0c\xe8\xfb\x1e\xbc\xcd\x51\x04\x56\x0f\x3e\xf8\x80\xb2\xf7\
\x3a\x2e\xf6\xee\x55\xcc\xea\xa6\x1b\x6f\xc0\xc2\xc2\x02\x6c\xcb\
\xc2\x42\xa7\x93\x58\x6c\x73\xbe\x95\x36\x33\x5b\x16\xd5\x04\x95\
\xe9\x6e\x84\x70\x5d\x17\x37\xdf\x7c\x33\x6e\xb9\xe5\x16\xbc\xf2\
\x95\xaf\x84\xfc\xe0\x37\xa2\xdf\xef\x63\x6d\x6d\x0d\x6b\xab\xab\
\xb8\xf7\xee\x3b\xf1\xf8\x23\x0f\xe1\xf4\xc9\x13\xd8\x5c\x5f\xc3\
\xd6\x56\x17\x81\xef\x81\x65\x22\x09\x79\xbb\x52\xe0\xd5\xc8\x9e\
\x26\x02\xd5\x55\x38\xe7\x51\x5c\x72\xdf\x71\x1c\x1c\xd8\xbf\x1f\
\xd9\xaa\xfa\xdb\x65\x4f\x44\x84\xad\xde\x16\x50\xa2\x40\x34\xca\
\x95\x27\xaa\x19\xd3\x15\x0c\x48\xd3\xa4\xbc\x69\x8c\x49\x81\x13\
\xb3\x31\xb9\x73\xd8\xc4\x06\x31\x97\xe0\x3a\xa4\xc8\xa6\x0b\xa8\
\x1c\x2b\x4f\xe7\x2d\x81\x28\x9f\x59\xdd\x78\x23\x16\x3b\x0b\x58\
\x58\xe8\xc0\xb6\xac\xd4\x8a\x3b\x0b\x38\x15\xbc\xeb\x4a\x0a\x4c\
\xbc\xb5\xd1\x70\xd1\x68\x5c\x83\x6b\xaf\xbd\x16\xcf\x7f\xc1\x0b\
\x00\x30\x46\xa3\x11\xb6\xb6\x7a\x38\x7d\xea\x14\x1e\x7b\xf4\x11\
\xdc\x73\xc7\xe7\x71\xe6\xe4\x09\x6c\x6c\xac\xa1\xd7\xed\xc2\xf7\
\xfd\xb8\x92\x85\x2e\x50\x7b\x35\x41\xd5\xcc\xec\xa9\x70\x63\x74\
\xd1\x41\x6a\x72\x9c\x69\x8e\x72\xde\x84\x45\x0c\x91\x80\xd0\xd5\
\x33\xf2\x3a\xfe\x56\x62\x4f\x79\x1f\xa5\x5e\x1a\x94\x04\x22\x89\
\xe9\xb9\x4c\x35\x30\x5d\xe1\xac\x69\x9a\x9c\x37\x0d\xa0\xa6\x9d\
\xf3\x3b\x38\x1d\xcd\x83\x6a\xe9\x76\x16\x86\x11\x3d\xe3\x79\x1e\
\x3c\x6f\x84\x8d\x8d\x0d\x10\x80\x07\x1f\xb8\x1f\x96\x6d\x63\xef\
\xde\x7d\x70\x1c\x47\x33\xab\x1b\x75\xa9\xa5\x0e\x6c\xdb\x4a\xa9\
\x43\xc5\xa5\x96\x26\x7f\x9f\xc8\x9c\x91\x88\x77\x99\xa6\x89\xa5\
\xa5\x45\x2c\x2f\x2f\xe1\xf6\xe7\xdf\x8e\x77\xbe\xfb\xdd\x18\x0e\
\x47\xe8\xf5\xb6\x70\xea\xd4\x29\x1c\x79\xfa\x69\xdc\x73\xc7\x17\
\x70\xf6\xcc\x29\x9c\x3b\x73\x1a\xdd\xee\x26\x02\x6d\x5f\x57\xb1\
\x38\x71\x55\xb0\xaa\xb9\x47\x63\x42\x90\xba\x2a\x58\x94\x2a\xbd\
\xb4\xb4\xbc\x0b\xcb\x4b\x8b\x89\x56\xce\x65\xdd\x78\x39\x4e\x3c\
\x8e\xd9\x13\x81\xb0\xa6\x54\x8a\xac\xf9\xa1\x4c\x82\xed\xa4\x45\
\x75\x0d\x4c\x57\x20\x28\xa1\x04\x73\x9a\x26\xe9\x71\xea\x4a\x9e\
\x50\xa2\xe6\x59\xa7\x6e\x80\x60\x24\x26\x74\xcf\xf3\x70\xe2\xf8\
\xf1\xe8\x2b\x3f\xf8\xe0\xfd\xb0\x2d\x0b\x7b\xf7\xed\xd7\x60\xd5\
\xc4\x4d\x37\xde\x88\x85\x85\x05\x2c\x76\xd2\xcc\x8a\x23\x27\x60\
\x71\xba\xe5\x04\x53\xe0\x58\xae\x95\x65\x99\x58\x5c\x5c\xc4\xf2\
\xd2\x32\x6e\xbf\xfd\x76\xbc\xf5\x6d\x6f\x03\x4b\x8e\x4c\x16\xc7\
\x8f\x1d\xc5\xe7\xff\xee\x33\x58\x39\x7b\x1a\x2b\x67\x4e\xa1\xbb\
\x99\x04\x2b\xda\x56\xd9\xa5\x67\x03\x7b\x9a\xeb\xac\x75\x05\x01\
\x14\x4d\xf8\x7a\x04\x52\xd5\xee\x85\x91\x53\x1d\xa2\xac\xe1\x61\
\xbc\x37\x4a\xf8\xda\xf3\xe7\xce\x61\x1b\x6c\x69\x5a\xcc\xa9\x06\
\xa6\x2b\x98\x35\x95\x29\xea\x9a\x7e\x3c\x91\x24\x24\x65\x00\xe9\
\xfb\x10\x86\x79\x71\xcf\x9b\x6d\x76\xf8\x9c\xc4\xa5\xb2\x1f\x43\
\x22\x2c\x37\x18\x83\xd5\xf1\xe3\xc7\xa2\x2c\xc2\x2c\xb3\x4a\x1a\
\x2c\xc6\x65\x40\x6d\xae\x28\xbd\xc3\xe9\xd5\xa8\xca\xd3\x92\xa9\
\xa7\x3a\x9d\x36\x16\x16\x6e\xc1\x6d\xb7\xdd\x8a\x37\xbc\xf1\x8d\
\x90\x52\xaa\x2a\x16\xa7\xcf\xe0\xd8\xd1\x23\x78\xf4\xa1\x07\xf1\
\xe4\x63\x8f\xe0\xfc\xca\x19\x74\x37\x37\x30\x1c\x0c\xe2\x56\x21\
\xba\x47\xd5\x95\x02\x55\x73\x95\xf8\x76\x42\x56\xdb\x69\xc6\x57\
\xf1\xe2\x61\x30\x9a\xed\xb6\x6a\x49\x53\x82\x11\x4d\xae\x04\x31\
\x7e\x52\x1f\x3d\x7a\x14\xd8\x7e\x6c\xa9\x96\xf1\xae\x12\x29\xaf\
\x2c\x50\xc9\x69\x52\x9e\x0c\x02\x04\x41\x00\x31\xd6\x6b\xe9\x0a\
\xd6\x8e\xa0\x2a\x6a\x27\x87\x62\x56\xc7\xa2\x4b\xf3\x81\xfb\xef\
\x87\x65\x5b\xd8\x97\x61\x56\x8b\x0b\x0b\x4a\x06\x0c\xc1\x8a\x54\
\x77\x5f\x99\x93\x71\x4f\x93\x96\xbc\x13\x98\x15\x81\xd0\x6e\xb7\
\x71\xeb\x2d\x1d\xdc\x76\xeb\x2d\x78\xe3\x1b\xbf\x1a\x52\x06\x18\
\x0c\x87\x58\x59\x59\xc1\xd3\x4f\x3d\x85\x63\x47\x9e\xc1\xc3\xf7\
\xdf\x8b\x93\xc7\x8f\xa2\xbb\xb1\x81\x91\x37\x8a\xea\xd2\x8d\x31\
\x2b\xca\x9f\xa3\x2e\xe7\xdf\x7b\xae\xbb\x79\x29\xd8\xd3\x4e\x22\
\x56\x94\xec\x4d\x60\x06\xae\xbd\xf6\x3a\x18\x86\x48\x19\x99\x26\
\x56\x21\xaf\x20\xef\x7d\xfe\x73\x9f\x05\x8a\x63\x4c\x65\xdd\x79\
\x78\x76\x9c\x75\x35\x30\x6d\x17\x90\xb8\xe2\x6d\x8c\x35\xb1\x9e\
\xb8\x82\x20\xc0\x68\x34\x82\xed\x38\xe0\x52\x1c\xe4\x0a\xc5\x2a\
\x40\x95\x7b\x49\x0c\x7f\x02\xb3\x0a\xdb\x3f\xdc\x78\xc3\x0d\x63\
\x15\xd7\xe3\xea\x15\x5c\xe1\xf3\xc7\x8f\xb3\xd4\x96\xfe\x70\xb8\
\xae\x8b\x43\x87\x0e\xe1\xf0\xe1\xc3\xd1\x67\xf4\xfb\x7d\xac\xac\
\xac\x60\x73\x73\x13\xf7\xdf\x7b\x0f\xee\xbf\xeb\x0e\x9c\x38\x76\
\x04\x81\xef\x63\x73\x73\x03\xbe\xe7\x21\x65\x5f\x4f\xb4\x93\xc8\
\xed\x88\xc7\x97\xef\xef\xb3\xed\x99\x6d\x87\xd9\xd3\x45\x45\xa7\
\xd8\x07\x04\xc7\x75\x41\x44\x51\x6e\x5e\x84\xc1\xc8\xd6\x71\xc8\
\x97\xf7\xa8\xc0\x92\xca\x0c\x3c\x78\xff\xfd\x45\xb5\x37\x67\x69\
\x16\x58\x33\xa6\xab\x84\x2d\x6d\x07\x9c\xa2\xd5\x7a\x3d\x8a\xaf\
\x7e\x95\x3c\x9b\xcf\xac\x00\xe0\x81\x07\xee\xc7\xc2\xc2\x02\xf6\
\xed\xdb\x0f\x66\x46\xa3\xd1\xc4\x4d\x37\xaa\x8a\xeb\x0b\xed\x76\
\x0c\x02\x48\x33\x2b\x9a\xde\xcb\x20\x97\x59\xa5\x3a\xf3\x12\xa1\
\xe1\xba\x38\x7c\xe8\x10\x40\x84\x17\xbe\xf0\x85\xe0\x0f\x7e\x08\
\xfd\xc1\x00\xc3\xe1\x10\xa7\x4e\x9d\xc2\x3d\x77\xde\x89\xc7\x1e\
\x7e\x10\xa7\x4f\x1e\xc3\xc6\xda\x1a\xba\xdd\x4d\x05\x56\x39\x05\
\x6d\x63\xb0\xe2\x2b\x97\x4d\xed\x00\x38\x5d\x1a\x39\x2f\xfe\x74\
\x37\xcc\x61\xca\xc1\xa0\xfc\x1e\x4e\x19\xc8\x4a\x18\x1e\xd2\xe7\
\x9b\xc4\xb9\x95\xb3\xdb\xa9\xf6\x50\x1b\x1f\xae\x42\x29\xaf\x6c\
\x37\xdb\xfc\x78\xd3\xa4\xdc\x9e\x67\xc5\x21\xa0\x8a\x84\x6e\x96\
\xf7\x14\x2c\x54\x53\xcc\x8a\xb0\xb9\xb9\x89\x8d\xf5\xb8\xbb\xed\
\x83\x0f\xdc\x87\xce\xc2\x22\xf6\xed\x53\x75\x01\x0f\x1f\x3a\x8c\
\xc5\xc5\x9c\x8a\xeb\x1a\x6c\x64\xc1\x0f\x51\x58\x7b\x3b\xa3\xca\
\x70\x82\x59\x91\x66\x56\x0d\xd7\xc5\xf2\xd2\x12\x9e\x7f\xfb\xed\
\x00\x80\xe1\x68\x84\x5e\xaf\x87\x53\xa7\x4e\xe3\xf1\x47\x1f\xc1\
\x5d\x5f\xf8\x2c\x56\xce\x9c\xc6\x85\x73\x2b\xba\xfa\xba\x07\x96\
\x01\x72\x13\x83\xaf\x34\x90\xba\xe8\xcc\x69\xbe\xdf\x98\x32\x5f\
\xe5\xa6\x9b\x6e\x56\x8c\x89\x65\xa1\x64\x57\x46\xde\x4b\x4a\x7b\
\x44\x04\xcf\xf7\x71\x6e\x65\x25\x98\x02\x4a\x93\xe2\x4d\x35\x18\
\x5d\x85\x52\x5e\x55\x06\x95\xe3\xca\x7b\xb6\x9e\x33\x54\x89\x69\
\xec\xf8\xde\x10\xa5\x6c\xeb\x00\xd0\xdd\xdc\xc0\xc6\x86\x02\xab\
\xa7\x9e\x7a\x12\x00\x52\xcc\xea\xf0\xa1\x43\x58\x5c\xd4\x15\xd7\
\x13\xcc\x2a\x92\x01\xa5\xcc\x05\xa2\x52\x00\xa6\x59\x55\x5c\xc9\
\x82\x60\x99\xca\x11\xb8\xb4\xb4\x84\xdb\x6f\x7f\x2e\xde\xf1\xae\
\x77\xc1\xf7\x7d\x6c\x6d\x6d\xe1\xec\x99\xb3\x38\x76\xec\x28\x3e\
\xfb\xb7\x9f\xc6\xca\xe9\x53\x38\x7b\xe6\x24\xba\x1b\x1b\xaa\xfa\
\x7a\x20\xe7\x53\x1f\xf0\x72\x13\xce\x9e\x35\xb8\x44\x13\x4e\x7d\
\xe5\xa8\x5d\x5a\x5a\xca\x99\x12\xca\xc4\x94\x8a\xdd\x78\x60\x40\
\x4a\x09\xdf\xf7\x8b\x5a\xe8\x94\x91\xf1\x6a\x29\xef\x2a\x62\x4c\
\x28\xc1\x98\xa6\x95\xa5\x97\x17\x85\xa4\xcc\x7e\xf9\x5d\xb2\x6d\
\xcc\x63\x6b\x61\x65\x69\x23\x59\x78\x93\x90\x60\x56\x84\xa7\x9e\
\x7c\x02\x00\xd2\xcc\xea\xf0\x61\x2c\x2d\x2c\xc4\x45\x6c\x13\x1b\
\x54\x32\x60\xd9\xba\x80\x05\x21\xed\x8c\x14\x28\x88\xa2\x1a\x81\
\xb7\xde\x7a\x0b\xde\xf0\x86\x37\x68\x47\xe0\x16\x4e\x9f\x39\x8d\
\xe3\x47\x8f\xe2\x1f\xfe\xf6\xd3\x58\x39\x73\x0a\x67\x4f\x27\xc0\
\x2a\x91\x6b\x75\xb9\x39\x02\xab\xb9\xfa\x9e\x05\xe8\x44\x13\x98\
\x93\x6e\x32\xb8\x6b\x79\x39\x87\x03\x55\x29\x41\x34\xce\x9e\x48\
\x10\xba\xdd\x2d\x20\x6e\x99\x53\xd5\x8d\x57\x57\x7d\xb8\x8a\x80\
\xa9\x88\x26\x4f\x8b\x2b\xa5\x00\x8a\x99\xe5\xd1\xc7\x1f\xc6\xc1\
\x9b\x9f\x0b\x66\xc6\x70\x38\x40\x3b\xd1\x27\x69\xe2\x49\x3b\xe7\
\x8b\x8d\xe6\xf4\x46\x2a\xfb\x5e\xba\x74\x33\xcb\x76\x98\x95\x92\
\x01\x5b\xa9\xba\x80\x8a\x15\x49\x6c\xa7\x0d\x3b\xeb\x4a\x16\xe0\
\x58\x28\x6a\x77\x5a\xb8\x75\xe1\x66\x05\x56\x6f\x7c\x03\xa4\xce\
\xb5\x3a\x73\xe6\x0c\x8e\x1e\x39\x82\xc7\x1f\x7d\x18\x47\x9e\x7a\
\x12\xc7\x8f\x3c\x8d\xee\xc6\x06\x06\xc3\x01\x58\x4a\x5d\xd0\x56\
\x44\xdf\xf5\xb2\x67\x4f\x3b\x2d\xe9\xcd\x61\xd3\x34\xed\x74\xd6\
\x3d\x99\x92\xc0\x83\x49\x00\x55\x98\xcf\x54\x68\xdb\x9c\x9e\x7e\
\x92\x2f\xe1\x15\xa9\x3d\x35\x30\x5d\x05\x8c\xa9\x4c\xc5\xf1\x31\
\xb0\x62\xe6\x40\x10\x49\xe8\xe4\x9e\x58\x36\xaa\x44\x9e\xae\x6a\
\xf9\xae\xd2\xce\x50\x19\x66\x15\xbf\x28\x19\xb3\x7a\x52\x33\xab\
\x85\x85\x45\xec\xdd\xab\x4a\x2d\xdd\xac\x13\x82\x55\x5d\xc0\x76\
\x6a\x12\xe4\x69\x6e\x40\xca\x7f\x80\x32\x3f\x70\xb6\x64\x53\xa7\
\xdd\xc6\x42\xa7\x83\x5b\x6f\xb9\x05\x6f\xfc\xea\x37\x82\x25\xab\
\x16\xf7\x2b\x2b\x38\x75\xf2\x24\x9e\x7a\xf2\x09\xdc\x7b\xe7\x17\
\x70\xe2\xe8\x11\xf4\x7b\x5b\x18\xf4\xfb\x2a\x6e\xc5\xb8\x64\x52\
\xe0\xe5\xe1\xbf\xdb\x89\xbd\xa0\x08\x60\x1a\x6e\x03\x07\x0f\x3e\
\x27\xfe\xcd\x0b\x95\x8d\x72\x6d\xd4\x63\x07\x27\xb0\xbe\xbe\x01\
\xcc\x96\xbb\x54\x97\x25\xba\x8a\x81\x29\x0b\x50\xd3\x98\x53\xde\
\xca\x47\x00\xd0\x96\xe2\x8b\xaf\xe3\x51\xd5\x57\xd2\x7c\xdf\x7f\
\x69\xa5\xc2\x62\x26\x48\x18\x67\x56\x9b\x9b\x1b\x0a\xac\x08\xb8\
\xff\xfe\xfb\x60\xdb\x36\x1c\xc7\xc5\xbe\x7d\xfb\xd0\x6a\xc5\xa5\
\x96\x6c\xcb\x42\x67\x62\xc5\xf5\xd9\x2a\x9c\xe7\x31\x2b\xc7\x71\
\x70\xe8\xe0\x41\x1c\x3e\x74\x08\xaf\x78\xc5\x2b\xf0\x81\x0f\x7e\
\x08\x83\xc1\x00\x6b\x6b\xeb\x58\x5d\x5b\xc5\x3d\x77\xde\x81\x47\
\x1e\x7a\x00\xa7\x8e\x1f\xc3\xc6\xda\x2a\xba\x9b\x9b\x1a\xac\xc2\
\x0e\xac\xd8\xf1\x1a\x81\x53\x61\xe1\xa2\x18\x21\xe6\xb1\xfd\x9c\
\xaa\x23\x82\x40\x82\x60\x9a\x66\xc9\x3a\x79\xf9\xec\x89\x72\xd2\
\x06\x08\x84\x33\x67\xcf\x4e\x02\xa6\x2a\xb9\x4c\x35\x28\x5d\x25\
\xc0\x34\xad\x1e\xd5\x34\x06\x95\x32\x40\x78\xa3\x51\x65\xba\x74\
\x71\x58\x53\x31\xa0\xd0\x36\x2e\xe8\x9d\x04\x9b\xb2\x8d\xd2\xab\
\xf6\xae\x55\x32\x60\xba\xd4\x92\x37\xf2\x22\x19\xf0\xfe\xfb\xee\
\x83\x65\x5b\x70\x1d\x17\x7b\x35\x58\xe5\x31\x2b\xa2\x84\x13\x90\
\x4b\x63\x65\xe1\xbe\x8e\xb7\xb8\x77\x71\xcd\x35\x2e\xae\xbd\xe6\
\x00\x5e\x70\xfb\xed\xaa\xe7\x57\xe8\x08\x3c\x7d\x1a\x8f\x3d\xf2\
\x30\xee\xf8\xfc\x67\x13\x60\xb5\x91\x2e\x68\xab\xdb\x87\x5f\x31\
\xd9\x73\xf3\xc2\xbc\x9c\x24\x69\x66\xe8\x3a\x79\x4b\xfa\xf8\x95\
\x4d\xa4\xcd\x36\x03\xcc\x91\xf6\x08\x38\x71\xec\x18\x30\x3d\xb9\
\xb6\x36\x3e\xd4\xc0\x34\xb6\xf2\x98\x45\xca\x4b\x82\x13\x00\xc2\
\x70\x58\xa6\x59\xe0\xc5\x16\xf0\xe6\x01\x4a\x17\x81\xee\xd0\xa5\
\xda\x96\x92\x5b\x0c\x32\xc6\xc0\x6a\x7d\x63\x1d\x14\x81\x95\x0d\
\xd7\x75\xb1\x77\xef\x3e\xb4\xdb\x99\x22\xb6\x96\x15\xfd\xae\x51\
\x7b\x10\xf0\x4c\xc0\x99\x04\x2a\x75\xb6\xc4\xc0\x67\x9a\x26\x16\
\x17\x17\x94\x23\xf0\x79\xcf\xc5\x3b\xdf\xf5\x2e\x55\x7d\xbd\xd7\
\xc7\xa9\x53\xa7\xf0\xcc\x53\x4f\xe1\xce\x2f\x7c\x16\x67\x4e\x9d\
\xc4\xd9\x53\x27\xb1\xb9\xb9\x11\xd5\x08\x9c\x07\x58\x5d\x72\x8b\
\xc3\xbc\x58\x19\x8d\x57\x13\x09\x82\x00\x86\x61\x24\x36\x5d\xd6\
\xf4\x90\xc3\x9e\x32\xaf\xb9\xeb\xae\x3b\x43\xc6\x14\x14\x80\xd1\
\x24\xb6\x54\xb3\xa4\xab\x5c\xca\x43\x05\x70\xca\x9e\x5c\x89\x25\
\x53\xc5\x4f\xa3\x4b\x13\x6b\xa2\x1d\x7c\xf5\xc5\xda\x61\x9a\x4c\
\x4b\xa6\xc1\xd1\xe4\xe7\xf2\xc0\xca\x1b\x61\x63\x7d\x0d\x00\xe1\
\xbe\xfb\xee\x85\x6d\xd9\xd8\xb7\x7f\x3f\x1c\xc7\x45\xab\xd5\xc4\
\xcd\x51\xa9\xa5\x76\xba\xd4\xd2\xb4\x5e\x56\xc0\x04\x37\x7b\x66\
\x1a\x64\x24\x4b\x34\xaa\xea\xeb\x0b\x0b\x58\x5e\x5c\xc4\xf3\x9f\
\xf7\x3c\xbc\xed\x6d\x6f\x83\x64\x89\xcd\xee\x16\xce\x9c\x3e\x8d\
\xa3\x47\x8f\xe2\x1f\x3e\xfd\x49\x9c\x39\x1d\x83\x95\xef\x79\xa9\
\x82\xb6\xcf\x2a\x66\x45\x09\x6d\x6d\x6e\xf3\x35\xa3\xd9\x6a\xc1\
\x34\x8d\x70\x29\x30\x59\xb6\x9b\x96\xcf\x94\x90\xf6\x98\x19\x47\
\x9f\x79\x66\x9a\x94\x57\x15\x94\xea\x18\xd3\x55\x02\x46\x55\x1c\
\x7a\x05\x52\xde\x0c\x88\xf4\x6c\x94\x53\x2e\xe7\x0f\x9d\x03\x28\
\x4d\x06\x0d\x1a\x6b\x0f\x72\xec\xd8\xd1\xe8\x0c\xb8\xef\xbe\x7b\
\x61\xdb\x36\xf6\xed\xdb\x0f\xd7\x75\xd1\x6c\x36\x71\xf3\x4d\x37\
\x25\x98\x95\x19\x6d\x30\x96\xee\x78\xa6\x2f\x42\xa9\x55\xbc\xde\
\x56\x5c\xca\x02\x9d\x76\x0b\x0b\xb7\x28\x47\xe0\x1b\xb5\x23\x30\
\x2c\x68\x7b\xea\xd4\x49\x3c\xf6\xc8\xc3\x78\xe0\xde\xbb\x70\xf2\
\xe8\x91\x08\xac\x42\x67\x62\x64\xb0\xb8\x5c\x8b\xda\x46\xb8\x54\
\x16\xa0\x68\xe2\x71\x65\x06\xae\xb9\xe6\x5a\x98\x46\x5c\x59\x3c\
\x3f\xae\x44\xd5\xa4\x3d\xcd\x7c\x9f\x7c\xe2\x89\x59\xe3\x4a\xb5\
\x6d\xfc\x2a\x05\x26\x2e\x01\x52\x55\x9a\x78\xd5\x63\x0e\x48\xb6\
\x53\x6c\x6e\x16\x40\x9a\xf6\xbc\xa0\x74\x5d\xc0\x14\x58\x51\x0c\
\x56\xfb\xf7\x1f\x88\x2a\xae\xdf\x3c\x26\x03\xaa\xd7\x4a\x39\xd9\
\x09\x58\xae\x98\x2d\x25\x98\x55\x7c\x7a\x12\x10\x15\xb4\xbd\xf5\
\xd6\x9b\xf1\xba\xd7\xbe\x56\x25\x06\xf7\x7a\x38\x7d\xe6\x0c\xce\
\x9c\x3e\x8d\x33\xa7\x4f\xe1\xce\xcf\x7f\x16\xcf\x3c\xf9\x04\x36\
\x37\xd6\x30\x1a\x0e\x11\x04\x41\x24\x03\x46\x40\x55\xe8\x0a\xe4\
\xb9\x9d\x35\x5c\xe9\x85\x53\xde\x51\x80\x4b\x49\xfb\x8a\xed\x38\
\xe9\xb6\x35\xb9\xe0\x53\xc6\x91\xc7\xa9\xb3\x2d\x08\x24\x36\x36\
\xd6\xf3\x12\x6b\xcb\x82\x52\x3d\xae\x22\x60\x2a\x13\x08\xaa\xc2\
\x9c\xf4\xb9\x48\x15\x77\x61\x9b\x3a\xde\x45\x23\x5e\x93\xf7\x95\
\xb6\x3d\x0d\xcd\xe1\x5d\x53\xab\x3a\xd0\x4e\xef\x52\x34\x84\xc8\
\x01\xab\xa3\x47\xa2\x13\xe5\xbe\x7b\xef\x85\x65\xdb\xd8\xbf\x7f\
\x7f\x54\xc4\xf6\xe6\x1b\x6f\x8c\xeb\x02\x26\xe7\x3e\x56\xbd\xac\
\xca\x80\xd1\xd4\x67\x98\x21\x93\x8e\x40\x41\xba\x55\x48\x07\xb7\
\xdd\x72\x0b\x40\xc0\xbb\xdf\xf3\x5e\x0c\x75\xf5\xf5\xcd\x6e\x17\
\x8f\x3f\xfa\x28\x3e\xff\xf7\x9f\xc1\x33\x4f\x3e\x8e\xde\xd6\x16\
\xfa\xfd\x5e\xe4\x3e\x0d\x25\xc0\x9d\xb0\xaf\xcf\x13\x9c\x26\x8a\
\xb6\x1a\x8b\x1a\x8d\x46\x49\xf0\x29\xef\xc8\x03\x04\x3c\x6f\x84\
\xad\x6e\xd7\xc7\xb4\xd2\x66\xf9\xe1\x81\x1a\xa4\xae\x62\x29\xaf\
\xe8\x04\x28\xdb\xdd\x36\xd1\xc5\x96\xb6\xb5\x03\x34\xe3\xab\x77\
\x1e\x9f\xaa\x18\x28\x76\xc0\xbd\x47\xdb\xdb\x1a\x55\xae\x45\x34\
\x9f\x63\x96\xaa\xc5\x26\x8c\x0c\x58\x8d\x70\xec\xe8\xd1\xc8\xdc\
\x70\xdf\xbd\xf7\x62\x61\x71\x11\xfb\xf7\xef\x07\x00\x34\x1b\x0d\
\xdc\x74\xd3\x8d\xd8\xbf\x77\x2f\x3a\xed\x56\x6a\x8b\x93\x2a\xae\
\x57\x05\xec\x58\x52\x8c\xf9\x83\xeb\x3a\x38\x74\xe8\x20\x08\x84\
\x17\x3e\xff\x76\xbc\xe3\x1d\xef\xc0\x60\x38\xc4\xda\xfa\x3a\xd6\
\xd7\xd6\xf0\xc8\xc3\x0f\xe1\xee\x2f\x7e\x01\x4f\x3f\xf1\x18\xb6\
\xba\x9b\x29\x47\xe0\x25\xc9\xb5\x9a\xc9\x0f\x91\xa6\x3a\x07\x0f\
\x1d\x4a\x6c\xa6\x4c\x5c\x69\xba\x23\x8f\x08\x18\x0c\x07\xc0\xec\
\x7d\x98\xb2\x8b\xe8\x1a\x9c\xae\x02\x60\x9a\x16\x5c\x9c\x24\xeb\
\x45\x27\x53\x78\xce\x12\xe2\x9e\x4c\x46\x26\x77\x66\x67\xc8\x53\
\xd9\x37\xe5\xbf\xae\xdc\x67\x4d\xae\x2f\x57\x68\xe9\xa6\xb2\xf3\
\x3f\xcd\x6f\x62\xaa\x0a\x4a\x3b\x36\x6f\x96\xcb\x6f\x22\x90\x6e\
\xbc\x18\x8f\xcd\x8d\x0d\xac\xaf\xaf\x45\xff\xbe\xf7\xbe\x7b\xb1\
\xb0\xb0\x88\x03\x07\xf6\x83\x19\x2a\x66\x95\x64\x56\xc9\xb9\x33\
\x64\x56\xa5\xbf\xdf\x04\x43\x3e\x27\xf2\xad\xf4\xc9\xdd\x70\x5d\
\x34\x1a\xca\xbe\x7e\xfb\xf3\x9e\x87\x77\xbd\xeb\x5d\x18\x79\x3e\
\x86\xc3\x21\xce\x9c\x3d\x8b\x27\x1f\x7f\x1c\xff\xf0\x99\x4f\xe1\
\xe4\xf1\xa3\x38\xb7\x72\x06\xfd\xad\x2d\x8c\x46\xa3\x08\x40\x85\
\xd8\xe1\xb2\x4b\xdb\x70\xec\x11\x11\xf6\xec\xd9\x3d\x79\xc9\x57\
\x28\xed\x4d\x66\x4f\x5a\x0a\xad\x02\x48\x12\xb5\x55\xbc\x66\x4c\
\x15\xc0\xa8\xb8\x02\x84\x5e\x1e\x05\x41\x80\xc0\xf7\x2b\x00\xd3\
\xfc\xb8\xce\xe4\x2d\xcd\x02\x4e\x34\x9b\x6c\x47\x25\xa6\x3f\xaa\
\x32\xdb\xcc\x3a\xf5\x5f\x4c\x50\xa2\xb9\x6c\x9a\x04\xc1\xc0\x78\
\x42\xf0\xfa\xfa\x5a\xb4\x9a\xbf\xf7\xde\x7b\xb0\xb8\xb8\x88\xfd\
\xfb\x0f\x80\x59\xe2\xfa\xc3\xd7\x63\x69\x71\x11\x7b\xf7\xec\x4e\
\x30\x2b\xf5\x7f\xc5\xac\x64\x39\x30\x9a\xf2\x05\x42\x66\x17\xe5\
\x49\x81\x60\x59\x26\x2c\xcb\x44\xa7\x73\x23\x6e\xb9\xf9\x26\xbc\
\xf9\x2d\x6f\x46\x10\x04\xe8\xf5\xfa\xb8\xb0\xba\x8a\xa3\x47\x8e\
\xe0\xee\x3b\xbe\x80\xc7\x1f\x7d\x18\x27\x8f\x1d\x45\x77\x73\x03\
\x5e\x02\xac\xa6\x39\x02\x77\xd4\x9e\x4e\x49\x39\x8f\xb0\x6b\x79\
\x57\xd4\xff\x70\xb6\xb8\x52\xa6\xc3\x72\x88\x55\x6a\x76\x98\x54\
\x59\xbc\x2c\x73\xaa\x59\xd3\x55\x04\x4c\x55\x58\x53\xe1\xea\x86\
\x12\xab\x23\xd5\x2c\xd0\xad\x70\xfe\xa4\x41\x63\x3b\xac\xa9\xd4\
\x7b\xb7\x81\x85\x53\xed\xcc\x34\x61\x0a\x9c\x42\xa8\x38\x3b\xbd\
\xd3\xb6\x76\x2a\x1f\x94\x68\xae\x33\xda\x7c\x36\x3d\x4d\x65\x24\
\x1a\x5b\xe8\x6c\x6c\x6c\x60\x7d\x4d\x31\xab\xc7\x1f\x7f\x1c\x00\
\x12\x60\xc5\xb8\xfe\xfa\xc3\x0a\xac\x76\xef\x9e\xce\xac\x2a\x7e\
\x01\xca\x4b\x3c\x4d\xb0\x2b\x21\x44\x54\x76\xe9\x86\xc3\x87\xf0\
\xda\xd7\xbc\x1a\x7e\x08\x56\x17\x2e\xe0\x48\x08\x56\x8f\x3c\x8c\
\x93\xc7\x8f\x62\x73\x7d\x2d\x51\xd0\x56\x01\x95\xa0\x8b\x22\x4c\
\x47\xf7\x84\x10\x70\x1c\x27\x35\x1b\xa4\xa5\xbb\x32\x71\xa5\xf4\
\x6b\xc2\x12\x52\xc7\x4f\x9c\x08\x19\x53\x80\xd9\x0b\xb7\xd6\xf9\
\x4c\x57\x09\x30\x15\xb5\xbe\x28\x2d\xe1\x21\x2f\x8f\xa9\xf0\x34\
\xbd\x1c\xc0\x89\x31\x4b\x3d\x85\x79\x82\x12\x4d\x9b\xf0\x68\x12\
\xff\xe0\x0a\x13\xcf\xbc\x41\xe9\xe2\x82\x51\x19\xe9\x89\x26\x82\
\xd5\x63\x63\x60\x75\xc3\xf5\x9a\x59\xed\xde\xa5\x4b\x2d\xc5\x3b\
\x22\x59\x4e\x70\x03\x52\x65\xdf\x05\x23\x6d\x5f\x17\x24\xd0\x6e\
\xb7\xd0\xe9\xb4\x71\xfd\xe1\xc3\x78\xed\x6b\x5f\x83\xc0\x0f\xd0\
\xeb\xf7\x71\xfe\xc2\x05\x1c\x3d\x7a\x14\x47\x9e\x7e\x1a\xf7\xdf\
\x7d\x07\x1e\x7d\xf0\x3e\x6c\x6c\x6c\xa4\x8c\x74\xbc\xbd\x83\x35\
\xf1\xda\x61\x00\x8e\xe3\xe2\xe0\x73\x9e\x93\x3e\x06\x25\x5c\x79\
\xf9\x8d\x01\xd3\xaf\x39\x76\xfc\xf8\x24\x29\x6f\x1a\x50\xd5\xa0\
\x74\x95\x4b\x79\x65\xda\xad\x4b\x14\x57\x1a\xcf\x5c\xa3\x3c\x03\
\x33\xd9\x0e\x38\xcd\x5d\x19\xac\xb6\x69\x9a\x2e\x07\x4e\x9c\xda\
\x29\x07\x8c\x8a\xa2\xf8\x3c\xc3\x04\x5f\xb1\x12\xc4\x5c\xf1\xe4\
\x22\x79\x00\x2a\x81\xd5\xbe\xfd\x68\xb5\xdb\xb8\xe9\xc6\x1b\x40\
\x20\x1d\xb3\x6a\x45\x3f\x44\x08\x2a\x85\x60\x55\xb9\xe6\xae\xa2\
\x20\xa9\x8a\x18\x82\xd0\x6a\x36\xd1\x6c\x36\x71\xdb\xcd\x37\x62\
\xa1\xf5\x56\xec\x5e\xec\xe0\xfe\xfb\xee\xc1\x1b\xbf\xfa\xcd\x30\
\x32\xce\xc6\x9d\x3c\x6e\x48\xd5\xfe\x9d\x56\xc9\x61\x7a\xa5\x87\
\xe4\x49\x7a\xec\xc8\x91\x69\xc0\xc4\x13\x16\xbb\xb5\x23\xef\x2a\
\x07\x26\xa0\x5a\x9d\xbc\xe8\x04\xa2\x64\xa2\x48\xce\xbb\x99\x66\
\x64\x3f\x28\xca\x30\x9f\xce\xcf\xca\xe2\x53\x59\xdf\x44\x59\x30\
\xcd\x03\xa5\xa9\xd3\x3c\x25\x9b\xb5\x4d\x9f\xff\xa6\xe5\x54\x52\
\xe9\x0a\xb5\x3b\x54\xfb\xef\x32\xca\x48\x9d\x06\x56\xf7\xdc\x7d\
\x17\x00\x60\x61\x71\x09\xfb\xf7\xef\x47\xbb\xd5\xc2\x2d\x37\xdf\
\x84\xc5\x85\x05\x58\xba\x2e\x20\x25\xd8\x41\xc4\x84\x2a\xc8\x64\
\x79\x2f\x90\x52\xc9\x89\x8b\xed\x06\x76\x2f\x76\xb0\xd8\x6e\xc2\
\x34\x4d\x18\x86\x01\x6f\x34\x2c\x51\xd6\x6b\x7e\x3f\x0c\x33\xb0\
\xb4\xb4\x8c\x5d\xba\x4e\x1e\xe7\x5d\x45\xb9\x2d\x2e\x78\x0a\x38\
\xa9\x71\xdf\x3d\x77\x03\x93\xfb\x30\x95\x2d\xde\x5a\x5d\x3a\xa8\
\x81\xe9\x59\x0d\x44\x65\xd8\x52\xa1\x5d\x9c\x99\xe5\xd1\x27\x1e\
\xe1\x83\x37\xdf\x96\xc9\x3d\xe4\xca\x40\x31\x06\x32\xdb\xe8\x7c\
\x5e\x16\x48\xf2\x5f\x3e\xee\x46\xca\xdf\x8f\xc9\x96\xbd\xa9\xaf\
\xa5\xb8\x65\xc5\x34\x46\x15\x3d\x12\x81\x36\xcf\x00\x4a\x73\x74\
\x85\x3d\x4b\xab\xa3\xe6\x83\xd5\x3a\xd6\xd7\x56\x01\x22\xdc\x73\
\xcf\xdd\xba\x2e\x60\x43\x81\x55\xbb\x85\x5b\x6e\xba\x39\xaa\xb8\
\xae\x8a\xd8\x52\x2c\x84\xa5\x4a\x24\x15\x83\x11\x33\x43\xea\xd8\
\xd6\x62\xbb\x81\x83\xfb\xf7\xa0\xe1\x3a\x51\x3c\x29\x34\x1e\x6c\
\xf5\x7a\x17\xe7\x38\x24\x68\x92\x1f\x39\x69\x39\x03\x32\x15\xd8\
\x53\x4e\xdc\x89\x99\xf1\xe8\x23\x8f\x70\x09\x86\x24\x51\xbe\x02\
\x4d\x3d\x70\xf5\xe5\x31\x55\x06\x28\x66\x0e\x88\x88\x01\x10\x33\
\x63\x38\x18\xa0\xd5\xee\x8c\x51\xa6\xea\x2a\xdb\xac\xec\xa9\xda\
\x76\x8b\xf7\x2d\xdf\xc2\xc7\x13\x54\xb6\xe2\xd5\xf2\x04\x36\x14\
\x81\x52\x19\x6b\x7a\xf8\x1a\x4e\x4c\x06\xe5\xe4\x26\x2a\x5b\x4f\
\x8f\xaf\x2c\x20\xaa\x02\x56\x21\xe9\x57\x45\x6c\x47\x31\x58\xdd\
\xad\xc0\xaa\xe1\x36\xb0\x6f\xff\x7e\x55\x41\xe2\xe6\x9b\xe2\x8a\
\xeb\x3a\x29\x98\x90\xa8\x0b\x18\x1e\x4e\xa9\x00\xc9\xb1\x4d\x3c\
\x67\xdf\x6e\xb4\x9b\x0d\x58\xa6\x09\x43\x08\x70\xe6\xd7\x63\x30\
\x8e\x1e\x3d\x3a\xfb\x69\x0d\x2e\xfe\xd9\x0a\x8b\x55\x30\x9a\xcd\
\x16\x4c\xd3\x9c\xa0\x74\x4c\x63\x47\x89\x45\x68\xc2\x91\x27\xa5\
\xc4\xfa\xda\xea\xb4\xaa\xe2\x75\xe5\x87\x1a\x98\x2a\x01\xd4\x24\
\xdb\x78\x5e\x9b\x75\x11\x9e\x8c\xb9\x7a\x1e\xaa\xca\x7a\x39\x74\
\xa5\x2c\x40\x4d\x95\x10\x79\x4c\x1b\x2b\x6e\x76\x96\xd6\xd1\xc6\
\x9d\x48\x25\x73\xa9\x38\x47\xda\xcb\x80\x12\x15\x8a\x93\xe3\xbd\
\x04\xa8\x82\xb8\x41\x55\x6c\xea\x74\x75\x5f\xf0\xc9\x05\x83\x61\
\x64\x2b\xae\x8f\xb0\xb6\x1e\xcb\x80\x76\xc8\xac\x0e\xec\x47\xbb\
\xd5\xc6\x2d\x37\xdf\xac\x4b\x2d\xb5\x61\x9a\x26\xa4\x94\x58\x68\
\x35\x70\xdd\xbe\x5d\x70\x6c\x0b\x96\x9e\xfc\x19\xc5\x0b\x8a\x13\
\x27\x4e\xcc\x16\x5b\x1d\xfb\x16\x3c\x59\x66\x54\x15\x96\x20\x19\
\x38\x70\xcd\x35\x30\x12\x75\xf2\x66\x61\x47\x59\x70\x12\x82\xe0\
\x79\x1e\xd6\xd7\xd7\x27\x01\x53\xdd\x56\xbd\x06\xa6\xb9\xb1\xa7\
\x7c\x67\x9e\x7e\x47\x7e\xb3\xc0\xc4\x0a\x7f\x26\xe6\x33\x0e\x50\
\xf9\x1b\xc8\xd1\xc5\xa7\x92\x91\x18\xf1\xca\x00\xe7\xd4\x8e\x9e\
\x93\x2e\x6c\x4e\xf7\x1b\x98\xea\xd2\xcb\xca\x78\xa9\x07\x58\x6d\
\x8e\x29\x96\xf5\x38\xfb\xfa\x32\x2c\x89\x2a\xd0\xa6\xed\x20\xd9\
\xe5\x3d\xb7\x50\x99\xe7\xa3\x2e\xc1\x6a\x8c\x3c\x0f\x23\x0d\x56\
\x04\xe0\xee\xbb\xef\x82\xed\x38\xd8\xbb\x77\x2f\x3a\x9d\x05\x7c\
\xf7\x87\x3f\x88\xdd\xcb\x4b\xba\x9e\x20\x97\x3a\x02\xdd\xee\x16\
\xca\xc1\xcc\xa4\xe3\x5b\xe1\x58\x33\xc3\x71\x1c\x10\xd1\xb8\x24\
\x59\x02\x80\x8a\x2c\xe3\xcc\x2a\x96\x26\xd5\x4a\x75\x12\x20\x15\
\x01\xd4\xb3\xeb\x04\xaa\x81\x69\x47\x40\x68\xd6\xf6\xea\x63\xce\
\x3c\xcf\x1b\x4d\x05\x80\xe8\x5f\xdb\x60\x50\x93\x6d\xe1\xc8\xbd\
\xc0\xf2\x65\xb7\x24\x70\xa8\x9e\x9b\xc5\x12\x5d\xfc\x9a\xb1\x0b\
\x32\x05\x6c\x09\xb0\x43\x3a\xee\xc6\x71\x4f\xd8\xd4\xfd\x31\x60\
\x9c\x50\x70\x53\xcf\x92\x20\x5d\x59\x9b\x52\xf1\x38\x2e\xc9\x90\
\x26\x37\xbe\xe0\xc2\xf9\xa0\x74\x94\x2d\xf7\x7d\x7c\x19\xce\x35\
\xdb\xe9\xcf\x94\x6e\x69\xaf\x9a\x65\x1e\x3d\x7a\x14\x9d\x76\x0b\
\xed\x66\x03\x42\x88\xd2\x66\x06\x29\x25\x1e\x7b\xec\xf1\x8a\x35\
\x27\xb7\xf9\x85\x89\xe0\xba\xee\xc4\xe5\x57\x3e\x00\x15\x81\x93\
\x7a\x9e\x88\xd0\xdd\xda\x02\x94\xf1\x21\xbc\xe5\x25\xd8\x72\x09\
\x49\xaf\x1e\x35\x63\x9a\xb9\x61\x20\x00\x60\x38\x98\xd6\x2c\x70\
\x5c\x12\xa8\x0e\x50\x28\xf9\x5e\x2e\xc6\xc7\xa4\xb0\x51\xa4\x8b\
\xa5\x0a\x2d\x53\x1a\x60\x12\x48\x47\x94\x04\xad\xcc\x63\x08\x0b\
\x36\xeb\xc7\x98\x63\x60\x63\x06\x53\x01\x38\x71\xc1\x77\xa3\xf4\
\x7d\x8a\xa4\x48\x1e\x83\x9b\xed\x58\x1d\x62\x5e\x36\xdf\x42\x4a\
\x45\xb0\xc6\x97\x00\xa8\x68\x87\xb6\x48\x44\x30\x0d\xb3\x12\xf6\
\x12\x08\x0c\xc6\x60\x30\xd8\x46\x59\x5f\xae\xfe\x1e\x96\x78\xce\
\xc1\x83\x4a\xd6\x93\x59\xf3\x12\xa6\xb0\xa3\x49\xe0\x14\x6d\x63\
\x1e\x12\x5e\x0d\x4e\x57\x31\x30\x95\x4d\xba\x9d\xbc\xaa\xe1\x19\
\x3e\x4e\x33\x0b\x54\xb6\x87\x27\xde\x9b\x0b\x32\xe5\xb6\xc1\x3c\
\x3e\x55\xe5\xad\x02\x99\x33\x7c\x83\xd2\x8f\xe7\x3d\x96\x04\x29\
\xe6\xf0\x35\x1c\x65\xc6\x23\x0c\x94\x93\x9a\x9a\x14\x3e\x85\xf7\
\x69\x8a\x1c\x98\x38\x66\x5c\xa1\xfc\x10\x97\x7f\x1d\xcd\x32\x3f\
\xce\x30\x95\xd0\x18\x50\xed\xec\x5c\x44\x3b\xbc\x35\xcb\x32\xc7\
\xaa\xac\x4f\x3e\x1b\xd5\xf7\x0d\x64\x50\xfd\xb0\x8e\x55\x18\x27\
\x94\xb6\x1b\x11\x61\xd7\xae\x5d\x33\xb2\xa3\xe2\xe7\x88\x08\xeb\
\xeb\x1b\x93\x80\xa9\x08\xa4\x26\xe9\x92\x35\x40\x5d\x65\xc0\x54\
\x64\x78\x98\x24\xfd\x65\x4f\xae\xed\x7f\x3c\x27\x64\x24\xaa\x52\
\x35\x02\x19\x90\xa1\x52\x73\x09\x95\x02\xab\x1c\x01\x8c\xd2\x2d\
\xbf\xa3\xf6\x01\xa9\xc7\xc2\xc7\x93\xc0\x55\x54\x67\x33\x5c\x2f\
\x27\xef\xab\xf7\x46\xf2\x22\x25\x44\xb6\xbc\x40\x5d\x95\x22\x7e\
\x54\x7a\x19\x3f\x79\x3a\xa0\x19\x66\xfe\x0a\x0c\xa2\xea\x9b\xb9\
\xc2\x57\xda\xc9\x21\xa5\xc4\xee\x5d\xcb\xb1\x05\xbb\xcc\x7e\x11\
\x61\x34\x1a\xe1\xc4\xf1\x93\xb3\x49\x79\x59\x0d\x78\x6a\xc0\x34\
\x66\x77\xbb\x76\x2d\x8f\x5d\x43\xdb\x05\x27\x02\xe1\xc4\x89\xdc\
\xaa\x0f\x65\x64\x3c\xa0\x2e\xe2\x7a\xd5\x02\x53\x99\xd6\xc5\x33\
\x74\x95\xe4\xf9\xec\x56\x92\x09\xcd\x1c\x8b\x2a\x21\x05\x56\x9c\
\x22\x99\xc6\xdf\x48\x13\x48\x08\xe7\xed\x1a\x65\xef\xa7\xdb\x2e\
\xf0\xf8\xa2\x36\x71\x58\x28\x16\xd8\x4a\xda\x1c\x29\xc7\xbe\x3e\
\x2e\x9d\x51\x8e\x2b\x90\xf3\x01\x6a\x1e\x5a\x1e\x6f\xe7\xcd\xf9\
\x1b\xb8\x9c\x0c\x85\x23\xcf\x57\x86\x82\x4a\x80\x16\x60\x6d\x7d\
\x7d\x2a\xde\x73\xd5\x43\x35\xe1\xd8\x08\x21\xd0\x68\x34\xf4\xe2\
\x69\x36\x76\x94\xfb\x1c\x01\xc7\x8f\x1d\x03\x8a\x1b\x04\x32\xaa\
\xb7\xbd\xa8\xc7\x55\x2a\xe5\xcd\x6a\x80\x88\x57\xf4\xc9\x8b\x91\
\xb7\x13\xc7\xe5\x0c\x88\x4c\x90\xd9\x76\x34\xf7\x26\x23\x2a\x71\
\x95\x89\x22\x1d\x08\xe3\x24\xe3\x09\x8d\x0a\xa1\x3b\x42\x5f\xd1\
\xb1\x79\x21\x3f\x0b\x38\xee\xaa\xad\x01\x8a\xa9\xfc\xf7\xcd\xbe\
\x34\x01\xfe\x54\x20\xad\xe5\x02\xd4\x4e\x6a\x69\x5c\x75\x03\x97\
\xe7\xbc\xc5\x2c\x2b\xf7\x64\x32\x0c\xb3\xb4\xa3\x9f\xa7\xef\xc0\
\xd4\x8b\x8f\x99\xe1\x3a\x0e\x0e\x1d\x3c\x98\x88\x0b\xcf\x07\x9c\
\x00\xe0\xee\xbb\xee\x9a\x26\xe5\x55\xb5\x89\xd7\x20\x75\x95\x00\
\x53\xd1\xaa\xa4\x0a\x40\xa5\xa5\x3c\x1d\xcc\x0f\x4f\x74\xce\x4c\
\x9c\xb4\xed\x5d\x2d\x96\xd9\x66\x9f\xe4\xb6\x77\x00\xa7\xcd\xb1\
\x94\x00\x28\x85\x49\x9c\x62\x40\x94\x8a\x33\x29\xfb\xb7\xb2\xef\
\xb2\x96\xff\x48\x01\x50\xce\x2a\x38\xa5\xea\x71\x91\xc5\xbc\x60\
\x27\x93\x46\x8b\x82\xd7\x10\x17\x31\xac\x1d\x1a\x54\xf5\x37\xa4\
\xcb\x6e\xde\x92\x52\xe2\x9a\xfd\xfb\x2a\x03\xd3\x60\xd0\xc7\x70\
\x38\x2c\xb5\x9a\x9b\x08\x4e\xcc\x25\xd6\x11\x0c\x22\x81\x4c\xa1\
\xbc\x39\x82\x13\xe3\x89\xc7\x1f\x0b\xe7\x87\x32\x6d\xd5\x25\x26\
\x57\xa3\xa9\xc7\x55\xca\x98\x80\xf2\x65\x41\xf2\x4e\x2c\x55\x07\
\x4c\xf7\x64\x12\x86\x99\xab\xf2\x65\xed\xd8\x74\xb9\x7c\x6b\x94\
\x0c\xb8\xe7\x4c\xe2\x11\xf3\x29\x98\x55\xa3\x83\x43\xea\x75\x9c\
\xf8\xf2\x94\xa8\x12\x40\x44\x1a\x84\x10\xb9\xf5\x22\xe0\x4a\x3e\
\x4e\x34\xc6\xa2\x38\xdc\x7e\x06\xa0\xb2\xc0\x39\x6e\x32\xc0\xe4\
\x98\x13\xe5\x31\xac\x69\x95\x64\xe7\x38\x8f\x54\x02\xaa\x4b\xc1\
\xa2\x28\x97\x89\xec\x5a\x5a\xac\xbc\xa5\xc1\x60\x80\x40\xca\x39\
\xed\x53\xf1\x6f\x14\x96\x23\x62\x66\x2c\x2e\x2f\x63\xd7\xae\xe5\
\x4c\x9d\xbc\xed\x83\x93\x94\x12\xa7\x4e\x9e\x2c\x53\xf1\xa1\x6c\
\x2f\xa6\x1a\x9c\xae\x32\x60\x9a\xc6\x9a\x4a\xcb\x79\xa4\x4f\xc8\
\x20\x08\x20\x4c\x73\x4a\x43\x8c\x39\x02\x15\x8f\xc3\xc0\xec\x47\
\x82\xc7\x2e\x69\x9e\x04\xe1\x91\xb4\x96\x82\xa0\x9c\xd8\x12\x83\
\x28\xe9\x97\x20\x64\xc3\x55\xe1\x0a\x3b\xf7\xaf\x66\x53\x44\x1c\
\x83\x13\x4a\x00\x54\x24\x19\x66\xe4\xc4\x14\x44\x51\x0e\x28\xd3\
\xf8\x34\x9f\xd8\x6e\xd9\x52\xa6\x3b\x06\x54\x97\x1d\x40\xc5\x1f\
\xcd\xcc\x70\x5d\x27\x65\x69\x29\x33\xfa\xbd\x1e\x58\xca\x52\x6e\
\x3e\xde\xf6\x01\x54\x23\x6e\xec\x99\xd7\x11\xa0\x1c\x38\x8d\x25\
\x76\x13\xe0\xfb\x3e\x2e\x9c\x3f\x1f\x60\x7a\x93\xc0\x32\xb9\x94\
\xf5\xb8\x8a\x80\x69\x92\x25\xb3\x0c\x6b\xca\x32\x28\x80\x80\x20\
\xf0\x75\xb3\x40\xa7\xe4\x19\x35\x01\xa8\x76\xe2\xf2\x2c\x03\x62\
\x09\x80\xe2\x50\x96\xd4\xb7\x14\x61\x8a\x00\x02\x63\xb1\xa4\xa4\
\xa4\xc2\x89\x3a\x66\x11\xd8\x20\x8c\x13\x65\xa6\x8c\x04\x18\xe5\
\x01\x54\x78\x0b\xc1\x89\x42\x79\x30\x91\xe4\x49\xa0\xb1\x92\x46\
\x4c\x9c\xc8\x79\x1a\x4f\x51\xce\x4e\xa2\xf9\x86\x3f\x8a\x18\x16\
\x95\x3c\xfc\x93\x45\xa5\x6d\xcc\x39\xa5\xb0\xef\x52\x01\x14\xe9\
\x82\xad\xd5\x2a\x68\x0c\x86\x03\xcc\xa7\xb0\x38\x4f\x23\x75\xd1\
\xab\x9a\xad\x56\x54\x2a\x69\x56\x76\xc4\x21\xe9\xce\xb4\x54\x0f\
\x54\x5f\xf5\x59\xe3\x4b\x3b\xb4\xb2\xa9\x81\xe9\xd9\x0e\x56\x65\
\xc0\x28\xf1\x97\xf2\xa9\xc4\xb6\x77\xa1\xfa\xdb\x2a\x31\xa7\xb0\
\x10\x2a\x87\x2d\x0d\x38\x06\x12\xfd\x9c\xe5\xb6\x60\x58\x36\x48\
\x90\xb6\x8b\x13\x02\x6f\x84\x60\x34\x84\x37\xcc\x4f\x28\x8e\xda\
\x66\x67\xc0\x27\xf7\xb5\x89\xff\x51\x84\x6f\x14\x01\x5f\x12\x04\
\xb3\x80\x35\x06\x54\x44\xe3\x13\x88\x22\x51\x89\xe4\x5d\x8a\x18\
\x1e\x65\x04\x3e\x9e\x02\x02\xa9\x98\x13\xf1\xac\x73\xe2\x24\x6e\
\xb9\x03\x40\x75\x91\x00\x2a\xd1\x23\x63\xd7\xd2\x62\x6c\x6a\x29\
\xf9\xd6\x33\xa7\x4f\xe3\x62\xc6\xf1\x98\x19\x7b\xf7\xed\x87\x69\
\xa6\xeb\xe4\x55\x61\x47\x79\xe0\x44\x44\x61\x69\xa5\x32\x12\x5e\
\x5d\xc4\xb5\x06\xa6\xd2\x92\x5e\x95\x72\x44\x11\x63\x4a\x4e\x33\
\xcc\x17\x6f\x8f\xa7\x02\x51\x8e\x67\x3b\x05\x42\x96\x0b\x21\x04\
\x6c\xb7\x09\x77\x71\x17\x1a\x9d\x45\xd8\xb6\x0d\xcb\xb6\xe0\x38\
\x0e\x5a\x8b\x4b\x70\x1b\x0d\x58\x96\xea\x99\x63\x1a\x06\xa4\x54\
\xb1\xb4\xd1\x60\x90\x02\x9c\xb3\x27\x8e\xa1\x7b\xe1\x3c\x36\x56\
\xcf\x61\xf3\xc2\x79\x8c\xfa\x3d\x55\x83\x8c\x19\xc2\x30\x40\xc2\
\x88\xc1\x26\x25\x1c\xd2\x18\x40\x45\x20\x44\xf1\xbf\x93\x60\x95\
\xfa\x37\x09\x05\x9c\x49\x99\x2f\xb7\xc8\x6c\x1c\xeb\x0a\xcd\x18\
\x79\xc7\x2e\x55\xda\x28\x67\x52\x2b\x34\x45\x94\xf4\x22\xe4\x57\
\x96\xd8\x69\xc9\x6f\x9e\x9f\x35\x99\xd9\x2f\x2f\x2e\x54\x3e\x95\
\xfb\x83\xc1\xf6\xf6\xaa\x42\x22\x17\x11\x00\xc9\x68\xb5\x5a\xb9\
\x75\xf2\xaa\xb0\xa3\xb1\xe7\xe2\xb1\x1d\x47\x5e\xcd\x96\xae\x72\
\x60\x9a\x26\xe9\x95\x65\x4e\xf9\x5b\xa6\xf9\xef\x6d\x21\x10\x71\
\x7a\x62\x1d\xbb\x26\xb5\x14\x37\x82\x01\x61\x37\x60\x3a\x0d\xb4\
\x16\x16\xe1\x76\x16\xd1\xea\x2c\xa0\xbd\xd0\x41\xa3\xd9\x80\x63\
\xdb\xba\x72\xb4\x03\xdb\x32\x61\x9a\x26\x4c\x53\x01\x92\x61\x08\
\x18\x86\x01\x43\x08\x18\x42\x40\x44\x7f\x55\x30\x59\x7e\xc9\xf3\
\x01\xa8\x6a\xd4\xe7\xcf\x5d\xc0\x68\x34\xc4\xfa\xea\x2a\x4e\x3c\
\xf5\x24\x4e\x3c\xf9\x18\xd6\xcf\x9d\x45\xe0\x79\x10\x86\x80\x30\
\x0c\x08\x61\x44\x55\x1f\xb2\x73\xa8\x8a\x29\x65\x24\xbd\xcc\xe3\
\x31\x33\x53\x52\x5d\x92\xa9\x25\x1d\x7e\x31\x40\xa5\x83\x52\x34\
\x21\x9b\x39\x27\xcd\x2a\x3d\xc1\x71\xd6\x56\x5e\x1d\xa4\xd2\x2f\
\xd9\x01\x66\x53\xb8\x49\x9a\x6d\x46\x2f\xf9\xb4\x69\x1a\x95\x4f\
\xec\x99\x5b\x5e\xcc\x7c\x6c\x62\x86\xbd\x5d\xe9\x2e\x1d\xbd\x24\
\x6c\x6c\x6e\x00\x93\xdd\x78\x45\x8e\x3c\x14\x48\x2f\x35\x40\x5d\
\x45\xc0\x54\x26\xcb\x7a\x92\x45\x3c\xa4\x1d\xf2\xd8\xe3\xaa\x59\
\x60\x52\x14\xe2\x12\xa7\x13\x95\xe8\x0d\x54\x8e\x11\x15\x84\x99\
\x35\x33\xf2\xc9\x46\x60\xda\xb0\x6c\x1b\xb6\xdb\x46\x6b\x69\x19\
\x0b\x4b\x8b\x68\x34\x5b\xe8\x74\x5a\x70\x5d\x17\x8e\x63\xc3\xb2\
\x2c\x58\x96\x02\x22\x43\x68\x30\x32\x35\x10\x19\x02\xa6\x61\xe8\
\xe7\x62\x50\x32\x53\x60\x45\x11\x50\x5d\xbb\x77\x97\x0e\x4d\x31\
\xfc\x57\xbe\x02\xeb\x9b\x9b\x38\x7f\xfe\x02\x4e\x9d\x38\x89\xc7\
\xef\xbf\x07\xa7\x9e\x7e\x12\x1b\xe7\x57\x60\x98\x26\x84\xa1\x4a\
\xd8\x50\x32\x9b\x36\x02\xa0\x02\x16\xa5\x6f\x82\x39\x0d\x52\xc9\
\x7f\xeb\xd7\x32\xc5\x32\x24\x28\x5b\x3f\x06\x69\x57\x21\xa5\xe1\
\x9d\x8a\x5a\x7b\x24\x26\xfd\xe2\xda\x7a\x3c\x03\x48\xd1\xfc\x8b\
\xbd\x4e\x54\x0d\x69\xae\x57\x14\x09\x42\xa7\xdd\xae\xfc\xd6\xd5\
\xd5\xd5\xd2\x9d\x97\x67\xfb\x9e\xe3\xe3\xf0\xe1\xc3\x05\x75\xf2\
\x4a\x80\x53\xd1\x52\x86\x80\x13\x27\x4e\x86\x8c\x69\x5a\x82\x6d\
\xcd\x9a\x6a\x60\x9a\x8b\x9c\x37\x96\xb9\xcd\xcc\x92\x04\x49\x00\
\x06\x33\x30\x1a\x0e\xd0\x6a\xb7\x4b\x9d\x4f\x3c\xab\xd4\x52\x64\
\xf1\xe6\xc4\xee\x33\x23\x30\x6c\x48\x61\x03\x96\x0b\xab\xd1\x46\
\x7b\x71\x11\xad\x4e\x07\x8b\x4b\x8b\x68\x34\x5c\x38\x8e\x03\xdb\
\xb6\x60\x9a\x16\x6c\xdd\x33\xc7\x34\x0d\x08\x0d\x42\x86\x21\xe2\
\x2e\xa3\xba\xbe\x9d\x20\x8a\x40\xc9\x30\x04\x4c\xd3\x80\x65\xc6\
\x2c\xca\x10\xfa\x35\xa4\x00\x2a\x1c\x4b\xed\x06\x0e\x5f\xb3\x0f\
\xfe\xf3\x6e\xc5\x6b\x5f\xf3\x95\x38\x7d\xf6\x1c\x1e\xbc\xef\x7e\
\x3c\x7c\xf7\x9d\x58\x39\x7e\x04\x5b\xeb\x6b\x30\x4c\x0b\x86\x69\
\xc4\x96\xf0\x49\x4c\x29\x5a\xf1\x4a\x25\xe5\x69\x6b\xb9\xa0\x0c\
\x73\x4a\x02\x19\x53\xb4\xbd\x31\x80\x0a\x17\x0a\x99\xdc\xb3\x48\
\xd6\x9b\x9c\x8d\x9b\x90\xf8\xa6\xb0\xa0\x12\xc4\x28\x6b\x0b\xe1\
\x79\xcc\x51\x3b\x15\x6a\xca\x4c\xdc\x86\x30\xd0\x6c\x34\x2a\x6f\
\xe6\xec\xd9\x95\x39\xed\x47\x1a\x9d\x68\xc2\xcb\x77\xef\xd9\x3d\
\xe1\x02\x9b\x12\x57\x2a\xaa\x2c\x0e\xe0\xa9\x27\x1e\x9f\x26\xe5\
\x95\x69\xa9\x5e\xc7\x99\x6a\x60\xaa\x04\x4e\x13\xe5\x3c\x39\x73\
\x2e\x46\xd9\x52\x42\x5c\x08\x52\x04\x86\xc7\x06\xa4\x61\xab\xe6\
\x67\x96\x0b\x72\x9a\x68\xb5\x5b\x68\x75\x3a\x68\xb4\x5a\x68\x36\
\x1b\x68\x34\x1a\x11\x3b\x8a\xff\xaa\xce\xa2\xa4\x81\x45\x7d\x17\
\x06\x48\xaa\xf8\x0d\x13\x24\x4b\x48\x16\x10\xaa\x22\x2b\x44\xc8\
\x90\x88\x60\x50\x92\x31\x09\x0d\x4e\x04\xa1\x19\x8f\xd0\x81\x61\
\xb6\x18\x4d\xc7\xc2\x72\xbb\x85\xe7\xde\x70\x08\xbd\xb7\x7c\x35\
\x4e\x9d\x3d\x87\x7f\xf8\xcc\xdf\xe2\xc1\x2f\x7c\x16\x2b\x27\x8e\
\x82\x84\x50\x4c\x8a\x44\x0a\x34\x28\x19\x53\x4a\x81\x8d\x62\x49\
\x42\x4a\xb0\x18\x07\x29\x64\xdf\x17\x1a\x39\x78\x02\x40\x01\x69\
\xcb\xf9\xe4\x7e\xf4\xb9\x2b\xf6\x34\x93\xe2\x99\x81\x82\xe6\x29\
\xf7\xcd\x13\xa0\x0a\x8e\x83\x51\xa1\x80\x2b\x00\xb0\x94\x38\x76\
\xec\xd8\x7c\x5a\x5e\x94\x62\x4d\xea\x77\x2d\x53\xc0\x75\x92\x74\
\x57\x74\x2e\x3c\xf0\xc0\x03\xc0\xf4\xf8\xd2\x34\x50\x9a\x33\x6d\
\xae\x81\xe9\xd9\x08\x46\xd3\x2c\xe2\x65\x98\x14\x80\xa2\x66\x81\
\xdb\xdf\xc3\x31\x49\x2f\x03\x52\xc4\x12\x81\xb0\xe1\xdb\x2d\xc0\
\x72\x61\x58\x16\x4c\xd3\x84\xe3\x3a\x68\xb6\xda\x68\x34\x9b\x70\
\x1d\x1b\x96\x65\x2a\xf0\x11\x8a\xf9\x84\x7f\xc1\x0c\xc9\x12\x24\
\xf5\x15\xa3\xe9\x9c\x10\x02\x06\x14\xd0\x04\x01\x81\x28\x88\x5e\
\x0f\x45\x19\x55\x53\x34\xc1\x10\x09\x87\x9b\x20\x8a\xd9\x93\x08\
\xf3\x90\xe2\xb9\x23\x8c\x1d\x35\x6c\x13\xcb\xed\x83\xb8\xed\xfa\
\x0f\xe0\xfc\x3b\xdf\x8e\x07\x1f\x7e\x14\x7f\xf1\x47\xff\x15\x27\
\x9e\x78\x0c\x81\xef\xc1\xb2\x6d\x08\x61\x80\x44\xb8\x6d\x02\x89\
\x98\x25\x09\x26\x10\x49\xed\xce\x13\x20\xcd\xa0\x44\x98\x98\x9b\
\x60\x4e\x0a\xc0\x44\x9a\x7d\x85\x76\xbd\xbc\x1e\x1b\x29\x9b\x79\
\xa2\xb5\xc6\xa4\xba\x79\x85\x18\x34\x7b\x2c\xaa\x58\xee\xbb\x44\
\x00\x45\xc5\x0a\x80\xe3\xd8\x70\x1c\xa7\xc2\xa6\x08\x12\x8c\xb5\
\xb5\xf5\x39\x8a\x8a\xd3\x2b\xee\x09\x1a\xaf\x93\x57\x55\xba\x63\
\xdd\x17\x2c\x9d\x70\x0e\x1c\x3f\x76\x8c\x31\xde\x83\xa9\x6c\x8d\
\xbc\x9a\x31\xd5\xc0\x54\xb8\x32\x29\x63\x1d\xcf\x2d\x23\xe2\x7b\
\xde\xfc\x5c\x79\x5c\x10\x3d\x4a\xe6\x14\xb1\x84\x2f\x2c\x48\xb3\
\x09\x58\x2e\x4c\xbb\xa1\x4c\x0a\xa6\x62\x43\x8d\x56\x13\x8d\x56\
\x03\x8e\x63\xc3\xd0\xd6\x58\x29\xa5\xce\x76\x57\x0e\xbd\x20\x08\
\x20\x75\x72\x63\x40\x52\x01\x89\x9e\xb8\x0d\x21\xc0\x6c\xc4\x97\
\x29\x11\x02\x11\x20\x10\x04\x11\x48\x15\x57\x30\x01\x21\x05\x24\
\x31\x24\x31\x44\x12\x30\x23\xe6\x44\x9a\xc1\xe4\x74\x97\xd5\xdf\
\xf3\xda\xdd\x8b\xb8\xe6\x95\x5f\x8e\x2f\x7f\xc9\x0b\xf1\xf8\x33\
\xc7\xf1\x37\x7f\xfe\xe7\x78\xf0\x8b\x9f\x45\x6f\x7d\x0d\xa6\xed\
\xc0\x30\x54\x19\x19\x92\x88\x9c\x78\x2c\x13\x2c\x88\x24\x48\x0a\
\x08\xa1\xbe\x97\x10\x94\x8e\x39\x25\x8d\x12\x49\xc0\xd2\xff\xe5\
\x75\x4c\xe2\xa4\xc4\x97\xc7\x9e\xa6\xe9\x45\x89\xd7\x4d\x75\xe3\
\x55\x06\xa9\x8b\x0c\x50\x34\x4d\x9a\x66\xb4\x5a\x4d\x34\x5c\xb7\
\x42\xc6\x82\x7a\xa1\x1f\xf8\x3b\x24\x2f\x8e\x7f\x51\x66\x82\xd3\
\x70\x70\xe8\xd0\xa1\xb1\x3a\x79\x85\xe0\x54\x50\x7e\x2f\xcb\xa8\
\xa4\x94\x38\xf2\xcc\x33\x55\x5a\x5d\x4c\x03\xa4\x1a\x9c\x6a\x29\
\xaf\xb4\x9c\x97\xe7\xb0\x01\x00\x0c\x87\x03\x4c\x4e\x5e\x2d\xf3\
\xe1\x3c\x15\xa8\x88\x19\x3e\x19\x08\x0c\x17\xb0\x5c\xc0\x6e\x68\
\xa3\x02\x29\x5b\xb7\x65\xc2\x76\x1d\x38\x8e\xa3\x64\x3d\x66\x04\
\x7e\x00\x66\x25\xc1\x49\x19\x28\x10\x95\x52\xbf\xcf\x48\xc4\x84\
\x14\x8b\x32\x4d\x03\x52\x08\x04\x52\x22\x90\x12\xa6\x29\xa3\x0b\
\x39\x4c\x53\x31\x0c\x11\xe5\x6f\x84\x53\xae\x20\x82\x24\x09\xc1\
\x22\xb6\x10\x68\xef\x81\x48\xe6\x27\x85\xd7\xb3\x08\xff\xa7\x2c\
\xec\xbb\x3b\x2d\xec\x7a\xc1\x6d\x78\xf1\x73\x6f\xc2\xe3\x47\xdf\
\x8b\x3f\xfd\xa3\x3f\xc2\x03\x9f\xff\x07\x6c\x6d\xac\xc1\xb2\x1d\
\x5d\x1d\x40\x82\x24\x69\xe9\x4e\x80\x64\x0c\x4e\xcc\x02\x82\x0d\
\xb0\x96\xf9\x14\xd0\x26\x8c\x11\x49\xc0\xd2\xb2\x23\x92\xb7\x4c\
\xd1\x5c\xe6\x04\x7b\x22\xa4\x9a\x74\x6c\x07\xa0\x0a\x65\xbe\x0a\
\x80\x51\x5c\xbd\x62\x8e\x00\x55\x92\xca\xa8\x64\xec\x8a\x1f\xbb\
\xdd\x96\x17\x39\x8b\xb6\x38\x7f\xae\xa8\x4f\x17\xe5\x93\xe4\x29\
\xe0\x34\x31\x8f\x29\x21\xe5\x77\xbb\x9b\x65\x40\xa9\x6c\x5b\xf5\
\x7a\x5c\xc5\xc0\xb4\x9d\xea\xe2\x29\x29\x0f\x89\x8b\x73\xae\xee\
\x2a\x0e\x57\xeb\xea\x33\x7c\x32\x31\xb2\x34\x4b\x32\x75\x7c\x48\
\x03\x84\x30\x0c\x98\xa6\x09\xdb\xb2\x34\x28\x49\xf8\xbe\x07\x12\
\x02\x16\x18\x32\x10\xf0\x7d\x1f\x32\x08\xd4\x63\x96\x05\xc3\x10\
\xba\xb0\xa5\x9a\x60\x0c\xc3\x40\x10\x98\xca\xda\x2d\x84\xfe\xb7\
\x91\x88\xa1\x31\x02\x93\x61\x4a\xd5\x3e\x5b\xdd\x4c\x1d\xeb\x09\
\xc1\x87\x21\x88\xc1\xa4\x56\xa9\x8c\x74\xb7\x8a\x71\x06\x45\x08\
\xc3\x4a\xcc\x0c\x53\x58\x78\xf1\xcd\x87\xf1\xbc\x1f\xfc\x5e\x3c\
\xf2\xcc\x7b\xf0\x07\xff\xe9\x3f\xe3\x81\xcf\xfd\x1d\x7c\x29\x61\
\x5a\x16\x48\xb7\xee\x56\x52\x9e\xd0\xb2\x5e\xbc\x3f\x8a\x3d\x49\
\xc5\xaa\x44\xd2\x24\x41\x10\xc4\x11\x40\x21\x62\x4f\x42\xe3\x12\
\x8f\x03\x14\x32\x0d\x3a\x28\x27\xdf\x89\x73\xe7\xb9\x0a\x32\xdf\
\x76\x00\x8a\xe6\xd3\x60\x70\x1b\xd8\x40\x82\x66\xda\x83\x32\x2d\
\x2f\x4a\x5d\x41\xcc\x53\x8f\x51\x78\x6e\x2d\x2e\xc5\x75\xf2\x0a\
\x3f\x8c\xa6\x4b\x77\x49\xd0\x22\xa1\x40\xb6\xb7\xb5\x15\x60\xb2\
\xe1\x61\x16\x77\x5e\x3d\xae\x32\x60\xda\x4e\x75\xf1\xdc\x13\x68\
\xae\x1d\x48\x93\x2c\x49\x9b\x1b\x02\x61\x02\x96\x0b\xb2\x5c\x98\
\x86\x48\xb4\x37\x57\x31\x14\x43\x10\x4c\x53\xc5\x65\x98\x25\x64\
\xa0\x98\x88\x30\x0c\x08\x22\xf8\x81\x0f\xd2\xa1\x30\x21\x04\x98\
\xa5\x0a\x58\x47\x95\x13\x14\xeb\xf2\x03\x5f\xbb\xef\x4c\x18\x86\
\x80\x6f\x68\x60\xd2\x72\xa0\x15\x48\x04\xa6\x81\x20\x90\x91\x3c\
\x98\x65\x7e\xa9\xf9\x5d\x08\x10\xab\x2b\x51\x50\x7a\xa5\x29\x34\
\x9b\x4a\xae\x6a\x4d\xa1\x41\x52\x10\x5e\x72\xcb\x0d\x78\xee\x4f\
\xfe\x18\xee\x7d\xf4\x49\xfc\xce\xaf\xfc\x32\x8e\x3d\xfe\x08\x4c\
\xd3\x82\x61\x9a\xda\xe0\xa0\x98\x52\x28\xd5\xb1\x64\x90\x90\x90\
\x1a\x9c\x48\x83\x93\x20\xa1\x9e\x27\x86\xd0\xaf\x57\xb2\x9f\x7e\
\xaf\x10\x91\xb0\x97\x9d\xa0\x42\xf6\x44\x14\x37\x2c\x64\xca\x24\
\x09\x4f\x9b\xe0\x26\x10\x24\x9e\x14\xb9\x2f\xe5\xe6\x23\xec\x7c\
\xff\xdb\x09\x00\x13\x48\xec\xdb\xb3\x1b\x96\x65\x55\xda\x8b\xb2\
\x2d\x2f\xe6\x09\xb2\x7e\x61\x9d\xbc\xc9\xa6\x87\x22\x70\x0a\x97\
\x28\xbe\x1f\x60\x0e\x32\x5e\x0d\x48\x57\x31\x30\x71\xc9\xe7\xcb\
\xb4\xbd\xe0\x9d\xd8\xbb\x74\xfd\x36\x86\x0f\x03\x43\x2d\xdd\x59\
\x96\x09\x23\x6a\x43\xae\x2e\x0c\xa1\x2b\x2b\x80\xa0\x65\x2d\x80\
\x65\x80\x40\x52\x14\x4f\x22\xbd\xdb\x1c\x04\x4a\x5a\x33\x0c\xcd\
\x9c\x62\x5b\xb8\x61\x18\xea\xa2\x25\xd2\x96\x70\xcd\xa8\x84\x80\
\x0c\x02\xc5\xc0\x02\x13\xbe\x8e\x63\x19\x86\x92\xfb\x22\x23\x44\
\xc4\xa0\x8c\x10\x2f\x13\x67\x93\x50\x4e\x3d\xa5\x00\x42\x42\xb3\
\x17\x0a\x25\x35\x64\xab\xbb\xc2\x80\x32\x59\x18\xc2\xc6\x2b\x5e\
\xf8\x5c\x3c\xef\x57\x7f\x05\x7f\xfd\xe9\xbf\xc7\xef\xfe\xda\x2f\
\x63\xb0\xd5\x85\xe5\x38\x10\x24\x20\x43\xf6\xc4\x02\x4c\x31\x18\
\x85\x80\x25\x38\xae\x9b\x27\x28\x1d\x87\x8a\xc0\x49\xff\x1d\x97\
\xf6\x28\x4f\x11\x4a\xd6\x3a\xca\x0a\x7c\x13\x56\xdf\xc5\xf3\xe8\
\x54\xe7\xdd\x54\x80\xba\x74\xf0\xc4\x50\xf1\xca\xc9\x2d\x2f\xc6\
\xc1\x77\x38\x18\xa8\x96\x17\x17\xa5\xde\xbe\xd2\xa0\x9b\xcd\xb8\
\x4e\xde\x38\x08\x55\x37\x3d\xa8\x5f\x4e\x60\xab\xb7\x05\x28\xe3\
\x43\xb6\x88\x2b\x97\x00\xa9\x39\x4a\x2c\x35\x30\x5d\x89\x72\x5e\
\x95\x22\xae\xf3\x5f\xe1\x8c\x39\xee\x54\x3c\x69\x68\x34\x41\x96\
\x03\xd3\x10\x10\xa4\xf3\x7b\xa5\x7a\xa5\x61\x18\x3a\x96\x12\x17\
\x5d\x05\xb3\x06\x12\xcd\x5f\x84\x04\x07\x4a\xc2\x93\x86\x0f\x90\
\x7e\x9f\x61\x64\x56\xb0\x71\x55\x06\xc3\x10\x30\x2d\x1f\x86\x4e\
\x82\x65\xcd\x8c\x0c\xc3\x87\x6f\x99\xf0\x83\x40\x95\x29\xd2\xac\
\x29\x66\x4f\x12\x92\x2d\x55\x11\x82\x19\x0c\x03\x6c\x00\x92\xa1\
\x18\x1d\x04\x48\xe8\xf0\x12\xa5\x25\xb3\x78\x62\x8b\x8f\x82\x41\
\x04\x13\x04\xc9\xc0\x9e\x4e\x0b\xef\x7d\xeb\x1b\xf1\xf2\x2f\x7b\
\x29\xfe\xef\xdf\xf9\xbf\xf1\xb7\x7f\xfa\xdf\x61\xda\x36\xcc\x90\
\x3d\xe9\x38\x83\x08\x41\x8a\x19\x42\x30\xc0\x02\x24\x38\xc1\x98\
\x94\xc4\x28\x88\x95\xa4\xc7\x8a\x31\x85\xb1\x0f\x65\xb0\x28\x30\
\xdf\xa5\x62\x4f\xb1\xbc\x57\x08\x50\x15\x3a\xba\x97\xaa\xa5\x37\
\xf5\x69\xba\x44\xe0\x84\x02\x60\xa2\x8c\xab\x30\xde\xb7\x91\x37\
\x52\x4c\x9c\xb6\xf9\xc1\x25\xd9\x93\xaa\x93\xb7\x0f\xa6\x69\x46\
\xea\xdf\x38\x08\x4d\xb6\x84\x17\x7e\x8c\xfa\xee\xdb\x69\x0e\x58\
\x9b\x1f\x6a\x60\x9a\xda\x62\x7d\x92\xac\x97\xdf\xdc\xab\x6a\x00\
\x77\x4a\x01\xd6\x10\x94\x46\x66\x13\x64\x3a\x30\x0c\x3d\xe5\x48\
\x8e\x2b\x7f\x13\x01\x86\x48\xac\xb7\x19\x2c\x03\x48\x19\x44\x05\
\x5a\x15\x38\x29\x53\x83\x0c\x7c\x04\x9a\x15\x18\x3a\x86\x14\x5d\
\xbd\x61\x45\x05\x6d\x2a\x10\x9a\x31\x99\xa6\x09\xc3\x34\x55\x9d\
\xbc\x20\xd0\x31\x27\x1b\x41\x20\x61\x1a\x06\x82\x20\x80\x1f\x04\
\xf0\x7d\x5f\xd7\x1e\x53\xec\x29\x08\x0c\x04\x96\xa9\xf7\x01\xb0\
\x0c\x06\x43\x44\x6b\x4c\x43\x08\x40\xaa\xa9\x8a\x04\x60\x90\x88\
\x72\x9f\x22\x80\x48\x1c\x9f\x18\x4c\x08\x37\xee\xdf\x83\x8f\xff\
\xc0\xc7\xf0\xaa\xaf\xfa\x2a\xfc\xea\x4f\xff\x38\x7a\x1b\x1b\xb0\
\x5d\x37\xca\x5d\x0a\xc2\xca\x10\x61\x75\x74\xc1\x51\x1c\x8a\x42\
\xe7\x1e\x0b\xf5\x78\x28\x85\x26\x00\x8a\x88\x21\x10\xb2\x27\x11\
\x27\xe6\x8e\xc5\x9e\xd2\xf2\x5e\x12\xa0\x68\x86\xd9\x76\x9e\xe0\
\x74\x31\xb9\x93\x94\x12\xd7\x1e\xd8\x17\x97\x84\xca\x26\xba\x16\
\xb8\x0e\xfb\xfd\x3e\xa4\xe4\x54\x42\xf6\x5c\x41\x29\x67\xb4\x5a\
\xcd\xf1\x3a\x79\x55\xa5\xbb\x1c\x99\xf6\xdc\xb9\x73\xd3\xa4\xbc\
\x69\xf1\xa5\x9a\x35\xd5\xc0\x34\x95\x15\x95\x61\x4b\xa9\x2e\xb6\
\x54\xe2\x94\x2a\x9d\xc9\x9f\x00\x25\x98\xb6\xc6\x9e\x84\xd5\x5b\
\xb7\x17\x30\xc2\xd2\xfd\x1c\xba\xe2\x54\x7b\xeb\x40\xe7\x54\x85\
\x96\xf0\x90\x0d\x05\x3e\x45\x18\x2a\x84\x88\xe3\x2a\x22\xdd\x1e\
\x3a\x69\xa4\x30\x2d\x0b\x96\x65\xc3\xf7\x1d\x78\xa6\x07\xc3\x34\
\x75\x79\x7f\x1f\x86\x30\xe0\x79\x26\x6c\xdb\x47\x10\xd8\xd1\x67\
\xfa\x41\x00\xdb\xb2\x20\xa5\xda\x57\xa9\x0d\x12\x26\x33\xd8\x60\
\x30\x0b\x45\xec\xb4\x3d\xdd\x88\xa6\x71\xc5\x3e\x54\xe2\x2e\x45\
\xf9\x51\x0c\x86\x64\x82\x64\x95\x33\xc5\xcc\x30\x1b\x36\xde\xf4\
\x8a\x2f\xc5\x0b\x7e\xff\xff\xc1\x6f\xfd\xd6\xef\xe0\x93\xff\xfd\
\x0f\x61\x3b\x4e\x14\x7b\x0a\xc1\x49\x81\x10\xab\x5c\xa7\x10\xa0\
\x44\x08\x46\x22\x06\x2e\xfd\xb3\x52\xc8\x9e\x38\x96\x45\xa3\xc4\
\xdc\xec\xf4\xaf\xcd\x1d\xf9\xcd\x0a\xb9\x1c\x38\xe5\x24\xe7\xce\
\x03\x9c\x2e\x2a\x77\x62\xc0\xb6\xac\xb1\x4f\x26\x14\x74\x20\xd6\
\xf7\xd7\xd7\x56\x35\x40\x18\x73\xb8\x8c\xcb\xb1\x26\x22\x91\x13\
\x19\xa6\xea\x71\xa5\x54\x0c\x92\xf0\xc8\xc3\x0f\xa3\x04\x53\x2a\
\x93\x5c\x5b\x83\x52\x2d\xe5\x95\x92\xf7\x80\xc9\x2d\x91\xa3\x55\
\x63\xc8\x28\x92\xf9\x46\xd5\x57\xcd\x09\x50\xb2\x6c\x18\x14\x82\
\x92\x06\x26\x56\x26\x04\x61\x88\xc8\xa9\x17\x3e\xce\xcc\x60\x6d\
\xf1\x4e\x02\x13\x4b\x86\x0c\xcd\x12\x51\xcb\x0b\xe8\x84\x5b\x01\
\x41\x6a\x5a\x0e\x7c\x3f\xca\x6b\x12\x86\x01\xc3\x30\x61\xda\x36\
\x6c\xc7\x81\xe5\x8d\x60\x59\x36\x0c\xd3\x84\xef\x79\xf0\x1c\x5b\
\xd5\xcc\x33\x2d\xf8\x81\xad\xcd\x11\x12\x32\x08\xe0\xdb\x16\x7c\
\x3f\x50\xf2\x9e\xde\x2f\xc9\x0c\x4b\x1a\x08\xa4\x81\xc0\x60\x58\
\x06\x22\x06\x14\x08\x8a\xab\x4a\x80\xa2\x1b\x51\xec\x5e\x33\x48\
\x31\x14\x66\x46\xc0\xea\xaf\x20\xc6\xa1\x3d\x4b\xf8\xd1\x1f\xf8\
\x1e\xbc\xec\x2b\xbe\x02\xbf\xf1\x73\xff\x1c\xfd\xad\x2e\x2c\xdb\
\x01\x11\x41\x52\x32\x8e\xa4\x6d\xdf\x3a\x9e\xa4\x58\x14\x6b\x8b\
\x79\xd8\x02\x04\x10\xa1\x84\x47\x2a\x76\x90\xc7\x9e\x52\xcd\x0f\
\x91\x6d\x56\x48\x09\x35\x68\x76\x70\x02\xa6\x98\x22\x4a\x9e\x4d\
\x17\x03\x9c\x98\x19\xed\x76\x2b\x5d\x52\x2a\xd1\xa7\x6b\xad\x37\
\xc0\x30\x08\x00\x06\x0c\x02\x5a\xb6\x05\xd7\xb6\x70\xfa\xcc\x59\
\xb5\x70\x8a\x98\x2a\x55\x6e\xcd\x3e\x19\x87\xc6\xb7\x75\xe8\xf0\
\xe1\x1c\x50\x9f\xee\xbc\x9b\xf6\xf8\x53\x4f\x3d\x09\xe4\xd7\xc8\
\x2b\x5b\x8e\xa8\x36\x3f\x5c\xe5\xc0\xc4\x25\x59\x53\x99\xe4\x5a\
\x19\xae\x98\xbc\xd1\x10\x83\x7e\x0f\xad\x76\x67\x7b\xa0\x04\x03\
\x23\xb3\x01\x98\x16\x8c\x48\xba\x93\x3a\xc6\x23\xe3\x55\x9f\x9e\
\xa4\x95\xac\x27\x21\x03\x40\x0a\x35\x19\x87\x5f\x49\x49\x6a\x2a\
\xb6\x84\x51\x2c\x35\x41\xb2\xd6\xf6\xb5\x74\x27\x08\x90\xac\xac\
\xe4\x32\x50\x52\x9e\x10\x10\x86\x09\xcb\xb6\xe1\xb9\x2e\x2c\xc7\
\x85\x65\x3b\x30\x2c\x13\x43\xd3\x82\xe3\xd8\x30\x2d\x0b\xa6\x61\
\xc2\xf7\x1d\x04\xbe\x8f\xc0\xf7\xe1\x79\x3e\x6c\xcf\x82\x63\xdb\
\x0a\x14\x59\x82\x25\xc3\x97\x12\xbe\x69\xc0\x32\x4d\x58\x52\xe5\
\x57\xb1\x8e\x8f\x89\x20\x9c\xbe\x55\x6c\x07\x89\xb2\xb8\xa4\xc1\
\x2a\xfa\xc1\x88\x60\x30\x2b\xf3\x84\x64\x04\xcc\x68\x3b\x36\xde\
\xfe\xba\xaf\xc4\x73\x6f\xfd\x4f\xf8\xe7\x3f\xf2\xa3\x38\xf2\xe8\
\x43\x70\x1a\x8d\x54\x2d\x3d\xd6\xa5\x8a\x92\x66\x07\x08\x65\x0a\
\xe1\x10\xe8\x18\xb1\xac\x27\x84\xb6\xbd\x0b\x48\x40\xb3\x4b\x09\
\x42\x7e\x62\x6e\x68\x88\xe0\xbc\x4e\xba\x05\x93\x64\x2a\xc8\x51\
\x60\x29\x9f\xea\xd8\x2b\x49\x18\x78\x87\x2f\xa8\x86\xeb\x00\x48\
\xb7\x34\x01\x03\xe7\xb7\x7a\x38\xba\xd1\x4b\xe4\xcb\x11\xa8\xef\
\xa1\x6d\x9b\x68\x5d\x7f\x1b\x3e\xf1\xeb\xbf\x83\x3b\xff\xee\x33\
\xb8\xff\x73\x7f\x8f\xb5\x95\xb3\xe8\x75\xbb\x60\xd6\x69\x01\x44\
\x15\xf6\xbf\x1c\xa0\x45\x75\xf2\x4a\xc6\x90\x8a\x5e\x96\xad\xa5\
\xf8\xc8\x43\x0f\x63\x46\x50\x9a\x14\x52\xa8\xc7\x55\xcc\x98\xa6\
\x75\xb2\x9d\xd2\x2c\xb0\xda\x85\x31\x0d\x94\x86\x86\x0b\x18\x21\
\x28\x69\x33\x81\x94\x91\xf9\x40\x01\x49\xc8\x94\xa4\x9a\x0c\x75\
\xa0\x5f\x06\x01\x7c\xbd\x2d\x45\x02\x24\xa4\xaf\x12\x6a\x83\xc0\
\x4f\xc5\x9d\xa2\x9c\x1f\x9d\x53\x24\x03\x09\x19\xf8\x0a\xe8\xa2\
\x78\x93\x01\xc3\xb2\x60\x3b\x2e\xec\x46\x13\x96\xe3\xc2\x30\x2d\
\x08\xc3\x80\xed\xe8\x24\x5e\xd3\xc0\x70\x68\x63\x34\x74\x31\xd2\
\x89\xbd\xae\xeb\x24\x12\x72\x49\x5b\xcc\x2d\xd8\xa6\x89\xc0\x92\
\x08\x4c\x53\x39\xf9\xc2\xd6\xeb\xac\xdc\x77\x6c\x00\x82\x8c\xb0\
\x7c\xbb\xf6\x3b\x51\xa2\x86\x5d\xdc\xf1\xd6\x00\x60\x1a\x84\x80\
\x19\x1e\x29\x3b\xf8\x73\x9f\x73\x00\xbf\xf2\xeb\xbf\x86\x5f\xfb\
\xb7\xbf\x89\xbf\xf9\xe3\x3f\x80\xe5\x38\xca\x92\x4c\x89\xbc\xa5\
\x84\x13\x2f\x94\xf9\x42\xe3\x44\xe8\x28\x8c\x65\x3d\x11\xb9\x08\
\x23\xb3\x86\xd2\x41\x53\x80\xc4\x1c\xf7\xc3\x50\x21\xa7\xd0\x35\
\x99\xec\xee\x3b\x81\x3d\x6d\x4f\xb1\x9b\x6f\xe9\xed\x19\x2f\xa1\
\xc5\x4e\x67\xec\xb1\xa1\xe7\xe3\xe9\x0b\x1b\x60\xbd\x90\x42\x18\
\x47\x24\xc2\x96\x2f\xb1\xb8\xb4\x84\xf7\xbe\xe3\xed\x78\xcf\xd7\
\x7d\x2d\xb6\x06\x43\x6c\x76\xbb\xd8\xd3\x69\xe2\x73\x5f\xfc\x02\
\x3e\xfe\x91\x0f\xc3\x1b\x79\x98\x6a\xf4\x43\x85\xc6\x84\x44\xa9\
\x3a\x79\xb9\x50\x53\x5a\xd2\x8b\x87\x94\x12\x8f\x3d\xfa\x48\x08\
\x40\xc1\x8c\x4c\xa9\x66\x4e\x35\x30\x15\x4a\x77\x45\x72\xde\xc4\
\x66\x81\xdb\xbd\xf6\x15\x28\x09\x0c\x84\x03\x18\x66\x0a\x94\x58\
\x4a\x48\xa9\xe4\xb8\x74\x17\xd7\x84\x8c\x27\xa5\x8a\xc3\x68\xf3\
\x03\xab\xfa\x43\x0a\xac\x74\xa5\x07\x6f\x38\xd2\xcf\x29\xb9\x8d\
\xf5\x05\x25\xa5\x5e\x93\x73\x0c\x4c\x61\xab\x08\x21\x94\x73\xcf\
\xb4\x1d\x38\xcd\x3e\x2c\xa7\x01\x91\x04\x26\xb7\xa1\xe3\x50\x26\
\x46\x8d\x06\x82\x76\x4b\x35\x12\x1c\x8d\x30\x18\x0c\xd1\x68\xb8\
\xf0\x5a\x4d\xb8\x8e\x03\xdb\xb6\x95\xc4\x17\x58\xb0\xac\x40\xd9\
\xcc\xa5\x02\x28\xdb\x90\x90\x96\x01\x02\x60\x19\xda\xfe\x1d\x16\
\x80\xcd\x4c\x44\x94\x99\x6e\x09\x04\x61\x08\x04\x02\xf0\xa5\xc4\
\x81\xc5\x0e\x7e\xec\x87\x3e\x86\x2f\xfd\x8a\x97\xe3\xd7\x7e\xfa\
\x27\x30\x1a\x0c\x60\xd9\x36\x40\x2a\x46\x15\xb6\xc8\x50\xf2\x11\
\x8d\x81\x54\xf4\xd3\x33\xa2\xa4\xdf\x50\x32\x25\x5d\xa8\x36\xea\
\x97\x90\x29\x5a\x1a\xb6\x8e\x27\x6d\xe3\xa7\x54\x0b\xdd\x12\xec\
\x69\x07\xc1\x65\xa7\xe1\x69\x71\xa1\x93\x90\xf6\x94\xbc\xf7\xe4\
\xd9\x0b\x38\xbf\xb9\x85\x46\x58\xcd\x5e\xea\xde\x5e\x42\x19\x76\
\x54\x3f\x2f\x75\x5c\x76\x2f\xb4\xf1\xd2\x43\x07\x60\x12\xe1\x45\
\x87\xde\x05\x30\xf0\xb1\x0f\x7d\x03\x4c\x1d\x47\x9d\xdc\xc1\x83\
\x4a\x31\x27\x22\x11\x55\x40\xaf\x56\xa4\x35\xff\xf1\x24\x6b\x1a\
\xf4\xfb\xdb\xa9\x26\x5e\x8f\x1a\x98\x72\x99\x51\x15\x39\x2f\x06\
\x27\x66\x3e\xf6\xc4\x23\xfc\x9c\x9b\x6f\xa3\x4a\x9f\x9c\xba\x58\
\x18\x1e\x0b\x0c\xc8\x01\x44\x06\x94\x82\x40\xc5\x68\xa4\x54\x13\
\xaa\x88\x3b\xb6\x46\x57\x2a\x33\x64\xe0\xab\x09\x30\x0c\xe6\x4b\
\x99\x00\xb6\x00\x81\xe7\x21\x18\x0d\xe1\xfb\xaa\x14\x91\x92\xf7\
\xa4\x76\xda\xc9\xc8\xe5\xc7\x52\xc6\xd3\xbd\x2e\xe1\x23\x84\x01\
\x32\x0c\x0c\xfb\x5b\x09\x60\x32\x61\x39\x2e\x9c\x86\x0b\xd3\xb2\
\x60\xdb\x0e\x86\xfd\x1e\x36\xd7\xd7\xd0\x68\x36\xd1\x6c\xb5\xd0\
\x6c\x35\xf5\x7e\x49\xf8\xbe\x0f\x6b\x34\xc2\x48\x37\x23\x74\x6c\
\x1b\x81\x13\x80\x59\xcb\x3f\x32\x76\xb2\x59\xa6\xa1\xf3\x9d\x04\
\xcc\x6c\xfb\x6a\x8c\xe7\xac\x86\x15\x24\x04\xa0\xdb\x75\x30\x84\
\x63\xe1\x1d\x5f\xf5\x4a\xdc\x78\xfd\x7f\xc2\xcf\xfc\xc8\x8f\xe0\
\xe4\xd3\x4f\xc0\x76\x5c\x75\xec\x82\xd0\xdc\xa0\x18\x91\x10\x88\
\x00\x2b\x39\xb3\x2a\xa5\x4f\x1d\x17\xc1\x0c\x29\x04\x84\x9e\x61\
\x42\xf7\xa2\x02\x28\xa1\x63\x4e\x49\xe1\x2d\x36\x46\x64\x5d\x7b\
\x53\xd9\x53\x21\xa8\x6c\x07\x5a\x76\x9e\x35\x99\xba\xfc\x55\x08\
\x34\xbd\xe1\x10\x4f\x9c\x3a\x83\x91\x04\x86\x43\x2f\xaa\x64\x6f\
\xea\xa4\x6d\x4b\x57\x2d\x09\xeb\x33\xde\xb4\x67\x19\x46\x22\xf9\
\xfa\xbd\x5f\xf3\x16\x7c\x9f\x10\x53\x15\xb7\xb2\xdf\x8c\x99\xe1\
\xba\x6e\xa2\x4e\xde\xc4\xee\x4a\xa5\x1f\x27\x22\x8c\xbc\x11\xd6\
\xd6\xd6\xfc\x1c\xb6\x34\x29\x36\x5d\x33\xa5\x1a\x98\x4a\xb3\xa5\
\x4a\xe0\xc4\xcc\x01\x91\xd0\xda\x17\x27\x67\x9e\x82\x53\x2c\x6d\
\x0c\x27\x00\x23\x49\xe8\xc3\x04\x99\x06\x4c\x8a\x01\x42\xb1\x24\
\x19\xc9\x6d\x42\x5b\xbc\xc3\x36\xe5\x71\xff\xa5\x90\x55\xa9\x59\
\x9a\x01\x0d\x4c\x41\xb4\x1d\x7f\x34\x82\xef\x0d\xe1\x0d\x87\x91\
\xc1\x41\x06\x3e\x7c\x4f\xdd\xe7\x4c\x79\xd1\xb0\xfb\xab\x52\xae\
\x14\x20\x7a\x83\x01\x0c\xb3\x0b\x32\x2d\x08\xd3\x82\x69\xd9\xb0\
\x1c\x47\x19\x0d\x84\x80\xe3\x38\x70\x1a\x0d\x78\xc3\x21\x46\xc3\
\x21\x86\x83\x01\xbc\x91\x87\xe1\x70\x88\x56\xab\x85\x46\xa3\xa1\
\x0c\x11\x52\xa6\x64\x3e\x66\x86\x67\xe8\x12\x43\x9a\x31\x09\x98\
\x3a\x1e\xa4\xf1\x36\x31\x33\x14\x15\xf6\x0e\x01\x8a\x84\x96\xff\
\x40\x78\xf1\x4d\x87\xf0\x2f\xff\xed\xaf\xe1\xe3\x1f\xfb\x5e\x1c\
\x7d\xfc\x61\xd8\x4e\x43\x81\x93\x54\x74\x28\x4c\x52\xa6\x04\xe8\
\x84\x1f\x25\x32\x3f\x62\x54\xa9\x02\x0a\x34\x43\x93\x88\x86\x2a\
\x10\x44\x0c\x4b\x89\x4a\x11\x63\xae\xbd\x04\x7b\x02\xca\xdb\xca\
\x27\x82\x13\x5d\xda\x29\x4d\x08\x91\x68\x12\xa8\x58\xfc\x56\x7f\
\x80\xa3\x27\x4f\xc3\xb2\x1d\x38\xae\xab\x3b\x24\x5b\xb0\x74\xf5\
\x7b\x43\xc4\x8d\x26\x0f\xef\xdb\x85\x96\x95\x76\xe6\xb5\x1d\x1b\
\xa6\x65\x23\xf0\xbd\x54\xcc\x71\xaa\xaf\x9a\x8a\x65\xbc\xec\x73\
\x55\xab\x3c\x14\xb1\x26\x5d\xfd\x64\x12\x53\x9a\xc4\x9e\xea\xd8\
\x52\x0d\x4c\x33\xc5\x9a\xf2\x2c\xe2\xd9\x13\x4d\x40\x37\x0b\x6c\
\xb6\xda\x48\xb6\xb1\xe5\x29\x93\x8d\x0f\x01\x29\x4c\xd8\xda\xea\
\xcd\xcc\x60\x6d\x1a\x08\x2f\xfa\xa8\xe8\xa8\x50\xf9\x45\xe1\x84\
\xce\x52\x6a\x29\x41\x19\x0c\x02\x96\x91\x63\x2c\xd0\x85\x5a\x59\
\x4a\x04\xbe\x87\xc0\xf3\xe0\x7b\x1e\xfc\xd1\x50\xc5\xa2\xbc\x11\
\x02\xdf\x8f\xad\xc9\x09\x07\x5c\x7c\x21\xa7\x9b\xf3\xf9\x42\x01\
\xa3\x30\x4c\x8c\x4c\x4b\x95\x2c\xb2\x14\x83\x1a\xd8\x36\x6c\xd7\
\xc5\xa0\xb7\x85\x66\xbb\x8d\x61\xbf\x15\x35\x4f\x1c\x0e\x06\xb0\
\x1d\x07\xae\xeb\xaa\x2a\xd4\x8d\x06\x5c\xd7\xc5\xc8\x73\xd1\x6e\
\x34\x60\xdb\x56\xb4\xd2\x0e\x7b\x3b\x19\x42\xc0\x17\x9c\x60\x4b\
\x94\xa9\x5b\x37\x9e\x1e\x13\x5a\xe6\x4d\xa1\x1a\x16\xfa\x92\x71\
\xd3\x81\xdd\xf8\x8d\xff\xf0\x9b\xf8\x99\x9f\xfd\x05\x7c\xf6\x2f\
\xff\x1c\xb6\xeb\xaa\x9c\x2e\x0a\x63\x48\x61\x55\x8c\x44\x2e\x13\
\x27\x93\x95\xd5\xd6\x93\xc0\x15\x15\xac\x05\x22\x50\x83\x36\x46\
\x44\x62\x1d\x25\x7a\xfd\xe4\xc4\x9d\x92\x13\x5b\x15\x80\xba\x1c\
\xe5\x3c\x22\x82\xeb\x38\x71\xec\x52\x32\xce\xaf\xad\xe1\xc8\x33\
\xcf\xa0\xdd\x59\x80\xd3\x68\xaa\x6e\xc9\xae\x03\xc7\x76\x52\x00\
\x25\x99\xf1\xd2\x1b\xae\xcb\xd9\x37\x2a\x9f\x1a\x58\x50\x01\x3c\
\x9b\x5c\xbb\xb0\xb8\x84\xdd\xbb\x77\xa5\x2a\x8b\x4f\x04\xa1\xfc\
\x28\xd4\xd8\x77\xef\x76\xb7\x80\xd9\xca\x11\xd5\x8c\xa9\x06\xa6\
\x52\xb1\xa5\x59\x63\x4d\x6a\x6a\xd2\x52\x18\x97\xf4\x10\x79\x20\
\x48\x61\xc1\x34\x28\x32\x33\x84\x4c\x89\x88\x54\x45\x83\xd0\xc9\
\x44\x71\x1f\x25\xf5\x61\xa1\x45\x5c\x17\x51\xd1\xec\x88\x10\xe6\
\xdd\x30\x3c\x6f\xa4\x64\x3c\xdf\x43\x30\x1a\xc1\xeb\x6f\x61\xd0\
\xef\xa9\xd8\x93\xaf\x1d\x73\xc9\x2b\x38\xb1\x32\x45\xa2\xd9\x9e\
\x08\x5b\x47\x68\x70\x94\x41\x00\x92\x01\xa4\x30\xe0\x8f\x86\x00\
\x01\x23\xc3\xc4\xc0\xb2\x30\xd8\x6a\x60\xb0\xb5\x85\x46\xbb\x8d\
\x5e\xb7\x8b\x5e\xa7\x83\x85\xc5\x45\xb8\x8d\x86\x8a\x43\x05\x01\
\x7c\x3f\x80\xef\xf9\x9a\xd1\x49\xb8\x9e\x03\xdf\xd5\xf9\x56\x42\
\xc0\x36\x8d\x44\xb3\x41\x03\x06\x11\x0c\x4a\xe7\xc5\x4c\x68\x28\
\xab\x63\x53\x04\x32\x00\x92\x02\xfb\x3a\x2d\xfc\x8b\x9f\xfe\x04\
\x7e\x61\x71\x11\x7f\xf5\x87\xbf\x0f\x5b\xb3\x3c\x22\xc5\x8d\x74\
\x31\x0d\x1d\x53\xe2\xb1\x0e\x4a\xac\xcd\x24\x61\x5b\x0f\x01\x28\
\x69\x4f\xdb\xf2\x65\x78\x7c\x50\xd0\x40\x23\x8c\x3b\x15\x80\x53\
\x59\x80\xda\x1e\xb0\xec\x1c\xad\x22\x9d\xc0\x1d\x9a\x58\x24\x4b\
\x1c\x3f\x79\x0a\xc7\x9e\x7a\x12\x9d\xa5\x65\x38\x6e\x13\x6e\xab\
\x05\xb7\xa1\x9a\x55\x3a\xae\xea\xa2\x6c\x59\x16\x1a\x8d\x06\x16\
\x1c\x6b\x6c\x9b\x5e\xa0\x12\xba\xa7\xa2\x13\x17\x01\x09\x8d\x1d\
\xcf\xc0\xf7\x61\x1a\xc6\x98\x55\xbc\x50\xd2\xab\xa6\xeb\x49\x94\
\x4f\xb0\x9d\x06\x48\x35\x40\x5d\xc5\xc0\xc4\xf3\x90\xf3\xe2\x85\
\x34\x57\x5a\xf3\x7a\x92\x30\x20\x0b\x2c\x04\x0c\x9d\x38\x1b\x56\
\x6c\x08\xab\x7a\x1b\x96\x15\xb5\x66\x48\x76\x72\x85\xd6\xc8\x43\
\x40\xe2\xb0\x30\x9d\x76\xf0\x09\x26\x15\xff\x90\x3e\x20\x03\x04\
\xde\x08\xbd\xcd\x75\x0c\xb6\xb6\xe0\x7b\xa3\xa8\x49\x5a\xd4\x2c\
\x2d\xcc\xd1\x49\xb1\xa7\x98\x31\x05\xa1\x26\x1f\xf6\x30\x32\x04\
\x84\x61\x41\x98\xa6\x6e\x8b\x6e\x82\x35\x0b\xf3\x86\x03\x0c\x7b\
\x5b\x18\x6c\x6d\xc2\x6e\x34\xd1\xdf\xea\x62\x34\xe8\xa3\xdd\xe9\
\xc0\x6d\x34\x23\x99\x6f\xd8\x6c\xc2\xf7\x7d\x78\xbe\x0f\xbf\xa1\
\x24\x3e\x02\x69\xc6\x44\x3a\x29\xd7\x02\x5b\x4a\xde\x63\x0d\xc8\
\xc6\x94\x95\x74\xe4\xbc\x0e\xbf\x83\xfe\x5a\x8b\xae\x83\x1f\xff\
\xa1\xef\xc5\x75\x87\x0e\xe1\x3f\xfe\xcb\x9f\x87\xe5\x68\xe6\x24\
\xa5\x06\x28\x7d\x3c\x39\x06\xaa\x14\x7b\xca\xca\x57\x50\xf6\x7c\
\x21\x95\xb4\x07\x29\xc7\xcd\x10\xa1\xa4\x07\x8e\x4d\x11\x49\x70\
\xca\x41\xd8\xe9\x00\x75\x99\xc9\x79\xcc\x4a\x9a\x33\x8c\x28\xf9\
\x9b\x25\xe3\xe4\xa9\x53\x38\xfe\xd4\x13\x68\x2f\x2c\xc2\x6e\xb4\
\xe0\x36\x5b\x68\xb4\xd4\x5f\xb7\xa9\x18\x94\x69\xd9\x78\xde\x73\
\x6f\x81\x99\xd3\xf9\xf6\xc8\xd9\x15\x04\x9e\x0f\xc3\x34\x2a\x5c\
\xc6\x93\x63\x4c\xcd\x56\x13\xa6\x39\x5e\x68\xb6\x8a\x11\x22\x65\
\x13\xd7\xd7\xe4\xa9\xd3\xa7\x80\x62\x37\xde\x24\x47\x6f\x9d\x60\
\x5b\x03\x53\x25\xb0\xaa\x0a\x4e\x00\x54\xe5\xe2\x72\xb2\x83\xb2\
\x86\x07\x64\xc0\x8c\x24\x3c\x09\xe9\xfb\xca\x05\xa7\xdb\x56\x18\
\xa6\xa9\xa5\xbc\x64\x65\x09\x65\xb3\x0e\x99\x8c\xd4\x8f\x29\x29\
\x09\x08\x7c\x0f\x5e\xe0\xeb\xc9\x55\x62\xb0\xd5\xc5\xea\xca\x19\
\x8c\x06\x83\x48\x2a\x4c\x6c\x0a\x48\x94\x39\xe2\x64\x62\x70\x8a\
\x3d\xe9\x16\x18\xa6\x09\xb7\xdd\x49\x48\x89\x01\xbc\x41\x00\x5f\
\x10\x84\xa1\x4b\x17\x05\x02\xd2\xf7\xe1\x8f\x06\x18\xf6\x7a\x18\
\xf6\x7b\x18\xf4\xb6\xd0\xeb\x2c\xa0\xd1\x6e\xa3\xdd\x5b\xc0\xb0\
\xd3\xc1\xb0\xdd\xc6\x68\x34\xc2\x68\x34\x82\xa7\x63\x5d\xaa\x6f\
\x13\xb4\x9b\x50\x03\x27\x01\x92\x0d\xb0\x69\x44\xd6\x6d\x22\x9a\
\x16\x52\x88\x00\x8a\x74\x27\x5d\x9f\x18\x4d\x32\xf1\xed\xdf\xf0\
\x6e\x34\x1a\x0d\xfc\xc6\xcf\xfe\x14\x0c\x3d\xa1\x86\x31\xa3\x38\
\xb1\x96\xd3\x00\x54\xb0\x4a\x17\x10\x90\x14\xc7\x9d\xf2\xdc\x7a\
\x91\xa4\x87\x1c\xc7\x5e\x26\xee\x94\x0f\x50\x79\xa2\xe5\xac\xa4\
\x88\xe6\xd1\x62\x30\x4d\x13\x98\xb1\xd0\x69\xa3\xd5\x6c\xc6\x95\
\x49\xc0\x68\xb9\x2e\x56\x4e\x9c\xc0\xe6\xea\x05\x18\xa6\x0d\xd3\
\x71\xe0\x36\x9a\x0a\x98\x5a\x0a\xa4\x2c\xc7\xc5\xe1\x83\xd7\x8e\
\x7d\x7d\x06\xf0\x9f\x7f\xf7\x77\xe7\x5a\xdb\x95\x99\xb1\x67\xcf\
\x5e\x98\xb9\x40\x37\x05\x84\x26\x50\x26\x22\xc2\x33\x4f\x3f\x13\
\x32\xa6\x00\xb3\x57\x17\xaf\x41\xa9\x06\xa6\xa9\xec\xa9\x8c\x84\
\x97\x38\xe1\xd4\x5b\xb6\x36\x37\xb1\x67\xff\x81\x09\x0b\x3a\xf5\
\x0f\x8f\x05\x02\x61\xc4\xa5\x86\xb4\x19\x81\x88\x60\xd9\xb6\x6e\
\x2b\x2e\x60\x98\x86\x02\xa6\x0c\x23\x93\x41\x00\x19\x30\x24\xab\
\x96\xe2\x52\x02\x32\x50\x8c\x29\x8c\x95\x0c\xfb\x3d\xac\xae\x9c\
\x45\xbf\xbb\x19\xb5\x7d\x0f\x73\x9b\x42\x09\x2d\x4c\x7e\x0d\x41\
\x49\x15\x43\x15\x71\xa9\xa3\x50\xd2\xd3\x5f\xb9\xd1\x59\xc2\xd2\
\xfe\x6b\x10\x76\x58\xf7\x3d\x0f\x83\xad\x2d\xf4\x36\xd6\x00\x1a\
\x69\xf6\x64\xa9\x5e\x4e\x81\x11\xc5\xb2\x46\xfd\x1e\x06\x5b\x5d\
\xb8\xcd\x16\xfa\x0b\x5d\x0c\xfa\x4b\x68\x0f\x06\x18\x0e\x06\x18\
\x8d\x46\x71\x22\x6e\xb8\x6f\x9a\xa1\x45\x60\xe9\xd8\xba\x0e\x9b\
\x76\x25\x32\x20\x68\x5c\xc6\xa3\x82\xe9\x43\x10\x60\x85\xef\xb7\
\x4c\x7c\xd3\x3b\xbf\x06\xcd\x66\x03\xbf\xf2\x13\xff\x0c\x81\xef\
\xab\xef\xab\xc1\x4e\x12\x25\xc0\x88\xd3\xe0\x44\xe3\x25\xbe\x23\
\xb2\x14\xfe\x23\x46\xfc\x54\x1c\x22\x94\x5c\x43\xc6\xa4\xcc\x11\
\x08\x03\x50\x85\x28\xcb\x73\x9f\xaf\xb6\xef\xf1\xcb\x32\x26\x95\
\x9d\x10\x44\x31\x39\x29\x19\xcf\xd9\xbf\x0f\xc3\xad\x0d\x04\xde\
\x10\xc2\x30\x41\xc2\x40\x57\x97\xb8\x12\xa6\xa5\x72\xcc\x4c\x0b\
\x2f\x78\xc1\xed\x39\x6a\x82\xc4\x7f\xfd\x0f\xbf\x9d\x76\x4a\x96\
\x44\xe3\x49\x58\xd6\x6a\xb7\xd5\x6f\x21\xc7\x3b\x37\x4e\x74\xff\
\x71\xc1\x6b\xf5\x66\xce\x9d\x5b\x01\x8a\xfb\x2f\x95\x4d\xae\xad\
\x41\xa9\x06\xa6\x89\x2c\xa9\x2a\x73\x92\xd3\x15\x86\x98\x89\x08\
\x28\xc3\x43\x00\x01\x81\x38\xae\x04\x40\x19\x04\x1a\x2e\x84\xae\
\xe8\xad\xec\xcf\x94\x98\xec\xf4\x84\x22\x08\x92\x80\x00\xaa\xa5\
\x39\x05\x0c\x92\x4a\x0e\x33\x84\xc0\x56\x77\x13\xa7\x8f\x3e\x03\
\x6f\x34\x4a\x25\xd5\x86\xf9\x50\x6a\xf2\x97\x30\x0c\x03\x0b\x8b\
\x8b\x30\x0c\x13\xcc\x12\xb6\xe3\xaa\x0a\xe3\x24\x72\xbf\x10\x35\
\x9a\x9a\x71\x29\x13\x86\x65\x98\xaa\xf5\xb9\x65\x62\x6b\x6d\x15\
\xc3\xde\x96\x62\x21\x96\xad\xb6\x63\x9a\x30\x8c\x40\x01\xd4\x68\
\x84\x61\xbf\x8f\x41\x4f\x31\x28\xc5\xa4\x16\x31\x1c\x0c\x54\xd5\
\x08\x1d\x53\x08\x02\x19\x83\x81\x64\x78\xc9\x2a\xe9\x6c\x00\xa6\
\x72\x0a\x9a\xa0\x5c\x70\xca\x9b\xb2\xc2\xe7\x4c\xa1\x8d\xe5\x26\
\xf0\xbe\x37\xbf\x1e\xb6\xfd\x4b\xf8\xbf\x7e\xe4\x87\xa2\x52\x52\
\x2c\x65\xc4\x42\xd3\x4c\x89\x27\x4e\x5a\xc2\xc8\x80\xd3\x34\x59\
\x2f\x55\x67\x2f\xd1\x68\x81\x4b\xcc\xae\x73\x09\x25\xcd\x0f\x9c\
\x42\xf6\xca\xe1\xc2\x47\x6f\xd7\x75\x6c\xc8\xe1\x00\x0c\x09\xdb\
\xb1\x30\xf2\x09\xdd\x2d\xf5\xfb\x9a\x96\x5a\x7c\x91\x20\xdc\xfd\
\x85\x2f\x80\xbf\xed\x43\xa9\xaf\xfc\xf9\x87\x1e\xc1\xe9\xe3\xc7\
\x74\xdf\xa4\xf9\x8d\xa5\xe5\x65\x10\x08\x32\xf7\xf7\x9c\x9d\x35\
\x3d\x70\xff\xfd\x98\xc2\x90\xf2\x2c\xe3\xa8\x63\x4c\x35\x30\x4d\
\x02\xa3\xbc\xe7\xaa\x9a\x20\x0a\x4e\xab\x71\x7b\xb8\x07\x42\x00\
\x11\x27\xc8\xea\x1a\x73\xa1\xfd\xda\xb4\xe2\x36\x0e\xa6\x36\x01\
\x84\x31\xa4\xf0\xb5\xe0\xf0\xe2\x92\x08\x58\x2a\x49\x09\x26\x58\
\xfa\x38\xfa\xd4\x13\xe8\xae\xad\x2a\x50\xd2\x71\xa4\xb0\x97\x92\
\x0c\x54\x8b\x81\x46\xa3\x89\x46\xa3\x09\xdb\x75\x61\x25\x8a\x6f\
\x72\x71\x2f\x80\x94\xd3\x30\x92\x85\x74\x6c\xca\x6d\x75\x60\x98\
\x26\x7a\x1b\xeb\xe8\xad\xaf\x21\xf0\x3c\x18\x96\x62\x4f\xd2\x34\
\xa3\x58\x94\xd4\xf1\x2e\x6f\x34\xc4\xb0\xdf\x43\x6f\x71\x0b\xbd\
\xad\x2e\x86\xc3\xa1\x72\x0c\x86\xdd\x75\xf5\x44\xee\x05\x3e\x3c\
\xdf\x8e\x99\xa2\x63\xc7\x6d\xda\x55\x29\x06\x5d\x91\xa1\x18\xa0\
\xb2\xff\x36\x04\xc1\xd2\x81\xa7\x77\x7c\xd5\xab\x10\xfc\x8b\x5f\
\xc0\x2f\xfe\xf0\x0f\xa8\xcf\x34\x0c\x05\x4a\x52\xa6\xc1\x49\x55\
\x2f\x82\x9c\x30\x5f\xe4\x81\x13\x09\x91\x6d\x31\x15\x39\xf5\x92\
\x39\x4e\x4c\x48\xc8\x87\x73\x02\xa8\x8b\xc4\x9c\x02\x29\xb1\x7f\
\xef\x1e\xb8\x8e\x83\x64\x0f\xf9\xa5\xc5\x45\x2c\xb4\x5c\x40\xfa\
\x58\x70\xd5\x39\xd0\x59\xda\x85\xb7\xbf\xf3\xdd\xf8\xeb\x4f\xfe\
\x2d\x1e\x79\xf4\x31\x74\x37\x37\xf1\xe4\x43\x0f\x20\x90\x1c\x15\
\x12\xde\x1a\x79\x78\xff\x5b\xde\x9c\xa8\x7c\x3f\xaf\xef\x0a\x2c\
\x2f\x2f\x27\xa8\x4e\x45\x10\x1a\x73\x53\xea\x23\xc8\x8c\x27\x1e\
\x7b\x8c\x4b\xc8\x78\x72\x0a\x6b\xaa\x9d\x79\x35\x30\x4d\x04\xa3\
\x69\x6c\x49\x96\x05\xa5\x6c\xa1\xcf\x91\x04\x06\x30\x00\x43\xe8\
\x02\xa2\x01\x64\xe0\x43\x08\x03\xb6\x63\xc3\xb2\x2d\x98\x96\x09\
\xd3\x34\x21\x48\x31\x26\x43\x17\x6b\x8d\x12\x6e\x83\x40\xc9\x7f\
\x64\xc2\x20\x46\x00\x46\xe0\x33\xbc\xc0\xc7\xd1\xc7\x1f\xc5\xea\
\xd9\xb3\x1a\x64\x94\x4c\x17\xe7\x43\x01\x8b\x4b\xcb\xb0\x1c\x07\
\x8d\x46\x33\xde\x47\x9e\xd0\xd6\x3b\xe7\xa1\x90\xb7\x85\xb9\x4e\
\x61\x00\xd8\x30\x6d\x34\x5a\x6d\x10\x80\xc1\x56\x17\x90\x01\xbc\
\xa1\x8f\xc0\x37\x61\x5a\x36\x58\x4a\x18\xa6\xa5\x65\xcb\x00\xfe\
\x48\xe5\x3b\xf5\x36\x37\x31\xe8\xf5\xe1\xfb\x1e\x3c\xcf\x53\x49\
\xc0\x9a\x1d\x8e\x5c\x17\x7e\x43\x26\x64\x48\x56\x55\xc7\x49\x95\
\x61\x32\x85\x80\x29\x00\xc1\x71\x95\x08\x9e\xc0\x9e\xc2\xbf\xa6\
\xa0\xa8\x9d\xfc\xbb\xde\xf8\x5a\xf4\x7e\xea\x67\xf0\x6f\x7e\xfc\
\x47\xe1\x34\x1a\x2a\xde\x04\x91\x06\x27\xfd\x66\x41\xb1\x67\x2f\
\x8f\x2a\x87\x44\x33\x99\xeb\x44\x63\xcc\x89\x74\x6e\x5a\x12\x9c\
\x54\xfc\x49\xed\x5f\x06\xa0\x68\x66\xcc\xd9\xa9\x97\x8f\x4b\x6f\
\xbe\x9f\xea\x42\x4c\x44\x58\x5c\xe8\xe0\xf0\xa1\x6b\x71\xe1\xfc\
\x79\xb4\xdb\x2d\x98\x86\xc0\x8f\xfe\xd0\xf7\xe3\xd5\xaf\x7b\x13\
\xfe\xd1\x47\x3e\x82\xfb\xee\xbb\x17\xaf\x7f\xe3\x9b\xf1\xe4\xea\
\x79\xfc\xfa\x1f\xfc\x11\xfe\xc9\xfb\xdf\x8b\xee\x68\x84\xf7\xbd\
\xff\x1b\xb0\x7a\x6e\x25\x97\x2d\x6d\xb7\x5e\xde\xf2\xf2\x72\x09\
\x10\x9a\x22\xdd\x65\x73\x9e\x98\xb1\xba\x7a\xa1\x0c\x28\xd5\x16\
\xf1\x1a\x98\xe6\xc2\x9a\xca\x48\x79\x12\xe0\x20\xef\x6d\x9c\x73\
\xc9\xf8\x9a\x2d\x99\x1a\x38\x42\x09\xcf\xb2\x6d\x55\x8f\x4e\x5b\
\x68\xc3\x96\xe6\x61\x66\xbc\x50\x8e\x00\xc8\xc0\x87\xf4\x09\x2c\
\x03\xb5\xd2\x16\x0c\x29\x08\x43\x96\x78\xf4\xc1\x07\x34\x28\x71\
\x04\x48\x52\x83\x80\x65\xd9\x58\xde\xbd\x07\x8d\x66\x2b\x66\x5f\
\x9c\x7f\x31\xd3\xc4\x6b\x3e\x31\x85\xe9\x88\x7e\x14\x37\x11\x04\
\x32\x0c\x58\x8e\xa3\xaa\x3d\x0c\x07\x18\x0d\x06\xf0\x46\x43\xf8\
\x83\x3e\x4c\xb7\x01\xc3\xb4\x54\x63\x3f\xdb\x89\x6b\xfb\x8d\x46\
\xf0\x46\x23\x65\xda\x18\x2a\x33\x84\xaa\x54\xce\x18\xb6\x9a\xf0\
\x43\xb6\xa7\xc1\xca\xd0\x13\xbd\x6d\x1a\x70\x4c\xb5\x4f\xa6\x80\
\x6e\x02\x38\xbd\x4a\x40\x04\x1c\x44\xb0\x0d\x95\x8a\xfb\xc1\xb7\
\xbf\x05\x9e\xe7\xe1\xdf\xff\xec\x4f\xa9\xfd\x17\x48\x83\x93\x56\
\xe7\xb2\x1b\x13\x19\x80\x4a\xfe\x7b\xa2\x21\x22\x14\xf4\x22\x06\
\x15\x53\xa9\x78\xee\x4b\x98\x23\xaa\xb2\xa7\x19\xa6\xba\x99\xc1\
\x89\x11\x37\x6a\x0c\x4b\xdb\x12\xd0\x6e\xb7\xf0\x9a\x57\xbf\x1a\
\xff\xf3\xcf\xff\x1c\x42\x10\x5e\xff\xfa\xd7\xe3\xe5\x5f\xf9\x5a\
\xb5\xb8\x10\x06\x16\x3a\x1d\xf8\x9e\x07\x21\x04\x7e\xf4\xdb\xbe\
\x19\xff\xee\x67\x7e\x0a\xe7\xce\x9c\x46\x7f\x6b\xab\x22\x28\x55\
\xac\x93\xc7\xd3\x40\x68\xba\x74\x97\xa4\xc0\x9e\xe7\xe1\xdc\xca\
\x4a\x30\x23\x28\xa1\x06\xa8\x1a\x98\xaa\xb0\xa6\x92\xa0\x94\x3e\
\xa1\xc2\x8a\x0c\x79\xa0\x34\x0c\x18\x01\x0c\x18\xa6\x6a\x2c\xae\
\x18\x90\x84\x69\x5b\x70\x1a\x6e\x94\xdb\x11\x56\xec\x0e\x01\x49\
\x50\x08\x4c\x52\xc5\x96\x04\x01\x6c\x42\xfa\x1e\x58\x10\x3c\x29\
\xf1\xc8\xdd\x77\xe2\xfc\x99\x53\xba\x9d\xb9\x9a\xf0\xc3\x9c\xaa\
\xa5\x5d\x7b\xd0\x6a\x77\x60\x5a\x66\x1c\xf4\x4d\xc8\x4a\xa9\x39\
\x8f\x26\x1f\x9d\xa2\x3a\x6f\x61\x5a\xa9\x08\x73\xad\x0c\x53\xbb\
\xf4\x0c\x04\xde\x08\x41\x30\x82\x0c\x02\x98\x8e\xab\xe4\x3c\xdf\
\x57\x06\x0f\x53\xc5\xb6\xc2\x0a\xe8\x9e\x06\xa9\xb0\x68\x6d\x67\
\xd0\x89\x1c\x7b\x52\x07\xd6\x05\x09\x04\xcc\x68\x58\x26\x98\x2d\
\x40\x4f\x8a\x44\xe9\x22\xdd\xd3\xe6\xf1\xa8\x28\xab\x01\x30\x0c\
\x7c\xcb\xbb\xdf\x8e\x33\x27\x4f\xe2\xbf\xfd\x87\x7f\x0f\xa7\xd1\
\x04\x48\x1d\x6f\x48\xc4\xe0\x14\xd7\x93\x1f\xdb\x16\x93\xea\xb2\
\x1b\xc9\x7e\x59\x43\x44\x32\xee\x44\x1a\x48\xc1\x09\x06\x95\x06\
\xa7\xe4\xb1\x2d\x2d\xef\xf1\xf6\xe0\x68\x16\x70\x92\x2c\xb1\x67\
\xd7\x72\x46\x7a\x53\x09\xce\xdf\xf1\x9d\xdf\x85\x0b\xe7\x57\x70\
\xcd\x35\xd7\xe0\x3b\x3e\xfa\x4f\x61\x59\x76\xf4\x8a\xd5\xd5\xd5\
\xa8\x8f\x18\x09\x81\xe3\xcf\x3c\xad\xd2\x05\x66\x62\x4a\x53\x28\
\xb2\xfe\x0c\xa5\x14\xf0\xb6\xa4\xbb\xec\xc9\xa5\x63\xa3\xdb\x49\
\xae\xad\x63\x4b\x35\x30\x95\x66\x4d\x55\x01\x2a\x9e\xed\x0b\x2e\
\x6f\x0f\x04\x1f\xa4\x0e\xae\x54\xd5\x1d\x48\x50\x82\x2d\xd9\xb0\
\x6d\x27\x92\xf2\x0c\xc3\xd0\x2d\x1f\x10\x95\xce\x61\x21\x20\x05\
\x81\x58\x02\xa6\x81\xe1\xa0\x8f\x7b\x3f\xff\x59\xac\x9c\x38\x1e\
\xc9\x77\x32\xd1\xe2\x7c\x79\xf7\x5e\x2c\x2c\x2d\xeb\x0a\x10\x9c\
\xb3\x8a\x9c\x7c\x65\x53\x11\x95\xa2\x9c\xd7\x46\xf9\x56\xaa\x97\
\x93\x30\x4d\x88\xc0\x82\x61\x29\x56\x18\xf8\x23\x0c\x46\x03\x08\
\xc3\x84\xd3\x5e\x00\x4b\x09\xd3\xb6\x23\x30\xe5\x20\x2c\x93\xe4\
\x29\x66\x18\xf8\x18\xf4\x07\xf0\x3c\x2f\x06\x5a\x8d\xa4\x7e\x10\
\xc0\x6b\x38\x9a\x45\x01\x82\x4c\xe5\x04\x4c\x31\x8e\xe9\xd3\x71\
\x08\x4e\x96\x50\x86\x88\xef\xff\xc7\xdf\x81\xf3\x67\xcf\xe0\x53\
\x7f\xfa\xff\x87\xe3\x36\x94\xc9\x51\x84\x65\x9f\xe2\x93\x41\x4e\
\x00\xbb\x88\x31\x69\x20\x8b\xf2\x9c\x00\xed\x9a\x4c\x80\x13\x62\
\x50\x8a\xab\x44\xa4\xcb\x18\xc4\xb5\xf5\x32\xf1\xa7\x1d\x8c\x3c\
\x55\x99\x25\x99\x19\x4b\x8b\x9d\xd4\x77\x08\x13\xb4\x97\x96\x77\
\xe1\xe7\x7e\xe1\x97\xe3\xfa\x8e\x71\xf2\x0f\xba\xdd\x6e\xfa\xd8\
\x15\x9c\x8c\x5c\x05\x80\xf3\x56\x58\xda\x90\xe1\x38\x0e\x0e\x1f\
\x3e\x94\x2f\x5d\x57\x90\xee\xd2\xad\x4e\xa2\xef\x31\x2d\xae\x54\
\xd6\x36\x5e\x8f\xab\x1c\x98\x78\xc2\xfd\x2a\x7d\x99\x12\xae\x62\
\x82\xd4\x9d\x5d\x45\xb8\xea\x4b\xc4\x9b\x0c\x61\xa8\xbe\x42\x2c\
\xa3\x16\xe4\x96\xed\xc0\x6d\x34\x60\xdb\x36\x2c\x4b\xc5\x98\x2c\
\x5d\xad\xdb\xd4\x39\x4c\xda\xbd\xa0\x7b\x2e\xa9\x56\xea\x42\x03\
\xd6\x17\x3f\xf3\x49\x9c\x3e\x7a\x44\xb1\x1f\x29\xa3\xc2\xac\xcc\
\x8c\x5d\x7b\xf6\xa2\xb3\xb8\xac\x0b\xb3\xa2\xb4\x5b\x8b\x26\xad\
\xca\x23\x87\x60\x7a\x45\x1a\xe5\xe8\x44\xb7\xb8\xd0\xa9\x61\x18\
\xe0\x40\xa8\x3e\x51\x52\xc2\x1b\x6d\xc1\xd4\x25\x87\x06\xbe\x07\
\xdb\x09\x94\xb4\x67\xca\xa8\xf2\x79\x10\xa8\x36\x1d\xa3\xe1\x00\
\x9e\x37\x8a\x6a\xec\x85\xfb\x2f\x99\x75\x75\x72\x35\xa9\x1b\x42\
\xc0\x14\x04\x23\x55\x8b\xae\xbc\xac\x67\xaa\xaa\xb1\x68\xd9\x16\
\x7e\xfa\xc7\x7f\x0c\x1f\x3b\x7f\x1e\xf7\xfe\xc3\xdf\xc2\x71\x1b\
\x0a\x4c\xa4\x80\xd4\x8d\x05\xa5\x54\xdd\x6e\x19\x32\xb9\x22\x49\
\x1d\x1f\x11\xc9\x79\x4a\x6e\x0d\x01\x89\x72\x4a\x55\xa5\x63\x4e\
\x09\x59\x0f\xe3\x2b\x76\xcc\x5c\x9d\x7c\xe7\x40\x8a\x19\x70\x1d\
\x27\x0d\x3c\x89\xff\xa7\xdb\xa6\xc7\xf7\xcf\x9e\x3d\x3b\xf5\x74\
\x9c\x0c\x4a\x45\xc5\xa9\x8a\xcf\xdd\x89\x7d\x95\x4a\x48\x77\x1c\
\x2d\x12\xc7\x34\xe3\x00\xe5\x12\x6c\x27\x49\x78\x35\x38\xd5\xc0\
\x54\xfa\x3a\x28\x2f\xe5\x11\xe0\x8d\x46\x18\x0c\xfa\x68\xb5\x3a\
\xa9\x7a\x5c\x1e\x13\xbc\x50\x3e\x93\x4a\x6a\x33\x4c\x43\xc9\x77\
\xba\x86\x98\xed\xd8\xb0\x2c\x4b\x55\x60\x36\xf5\x2d\x63\x7c\x60\
\x19\x00\x32\x80\x10\x84\x53\xc7\x8e\xe1\xc4\x53\x4f\xaa\xe7\x25\
\x47\x4c\x09\x0c\xec\xda\xb3\x0f\x0b\x4b\xcb\x5a\xce\xcb\xfb\x62\
\x54\xb0\x02\x9c\x00\x54\x3c\xbd\xee\x1f\x65\x6a\xeb\x85\x15\xca\
\xa3\xee\xa4\x22\x6c\xff\x1a\xc0\xb5\x4c\x04\xba\x8e\xdf\x28\x08\
\x60\x39\x6e\xa2\x4f\x94\x02\x28\x6f\x38\x84\x37\x1c\x21\xf0\x55\
\x95\xf5\x24\x68\x86\x71\x27\x21\x08\x96\x61\xc0\x12\xaa\x1d\x7b\
\x6e\xbb\x8c\x29\xfb\x9d\x04\xa7\xc5\x86\x83\x5f\xf8\xbf\x7e\x1e\
\x1f\xfe\xe0\x87\x70\xf6\xf8\x71\xd5\x32\x43\x28\x3d\x8f\x35\xea\
\xa8\xd2\x3b\xfa\x61\x42\xba\x88\x5e\x04\x78\xa4\xc0\x8b\x00\x21\
\x05\x20\x24\xa4\x14\x10\x22\x84\xac\x3c\x70\x4a\xc8\x7a\x05\xf9\
\x4d\x3b\x01\x50\x65\x54\xc2\x49\xeb\x9a\xf0\x3c\xcb\x07\x27\x60\
\x6c\xb5\xc3\x8c\x27\x9f\x7a\x6a\x1b\x7b\x9f\x99\xcb\xa7\x6d\x88\
\x19\x0b\x8b\x8b\x71\x9d\xbc\x3c\x26\x54\x52\xba\x4b\x49\xdb\x44\
\x38\x77\xfe\x7c\x92\x31\x55\x49\xb0\x2d\xb3\x50\xae\xc7\x55\x0e\
\x4c\x93\x64\x3b\x60\x7a\xa2\x6d\x86\x50\xa4\xf0\x0a\x3e\x08\x3e\
\x93\x6a\x69\xa1\xd9\x92\x69\x59\x3a\xae\xa4\xc0\xc9\xd5\xd6\x6d\
\xd3\x34\x55\xeb\x07\x21\x60\xe8\x18\x13\x41\xb5\x46\x97\x3e\x40\
\x30\xe0\x8d\x86\xf8\xc2\x27\xff\x37\xbc\xe1\x10\x88\xaa\x1b\xab\
\xed\xee\xda\xb3\x17\x9d\xa5\x04\x53\x2a\xb1\x26\xce\x02\x12\xe5\
\x94\xf1\xa6\xb0\x72\x39\x23\x53\xed\x39\x9e\xb2\x42\x39\x2f\x55\
\x08\x36\xa3\x01\xaa\x6e\xbf\x1e\x5c\xdb\x02\x11\x30\xf2\x7c\x6c\
\x0d\x3d\x0c\x82\x00\xb6\xdb\x88\x9b\x23\x06\x2a\x16\x35\x1a\x0e\
\x55\x02\x2e\xe2\x3e\x51\x80\xb2\x29\x4b\x66\x5d\x5b\xcf\xd4\x85\
\x5b\x55\xb9\x24\xe8\x24\xd9\xb2\x53\x77\x08\x4e\x86\x20\x30\x04\
\xf6\x2f\x74\xf0\xaf\x7f\xf3\x37\xf1\xd1\x0f\x7c\x00\xbd\xee\x26\
\x4c\xcb\x02\x20\x63\x30\x0a\x59\x91\xc2\x1b\x24\x0a\x1a\x45\x7f\
\x23\x43\x84\xee\x46\xa2\x5e\xcc\xb1\x3c\x98\x99\xec\x0b\xc1\x09\
\x28\xa8\xad\x87\xc4\x39\x46\x33\x9f\xf6\x45\x33\x22\x95\x06\x27\
\x46\xab\xd9\x4c\x9e\x05\x19\x2c\xca\xad\x1e\x88\xd5\x0b\xab\xd5\
\xd9\xd2\x36\x2e\xee\xc0\xf7\x55\xbe\xde\x24\x6e\x54\xa2\x98\x6b\
\xc4\x9a\xf4\x51\x3f\x7d\xea\x14\x50\xce\x1e\x5e\x96\x41\xd5\xe3\
\x2a\x07\xa6\x49\x19\xd8\x25\x2b\x3e\x4c\x0c\x39\x00\x50\x16\x71\
\x4f\x35\x4f\x8d\xfa\x23\x85\x8d\xf6\x6c\x47\x57\x5c\x0e\x59\x93\
\x6d\xc3\x32\x8c\x28\xb1\x36\x0a\xe8\xb3\x54\x93\x9b\x50\xf2\xd8\
\xa7\xfe\xfc\x4f\x71\x4e\x5d\x10\x51\x95\x71\x60\x9c\x29\x4d\x5d\
\xed\xa6\xe6\xbb\x3c\x90\x4a\x76\x8f\xd5\x93\xa6\x0e\xd8\x0b\xd3\
\x44\xa0\x5d\x55\xc9\xc9\x35\x79\x0b\xb7\x97\xac\xf3\x97\x9c\x44\
\x99\x19\x96\x69\xa2\xc1\x0c\x3f\x90\x90\xfe\x08\x9e\x76\x2a\xaa\
\x0a\x02\x52\x55\x40\xcf\xc4\x05\x58\x4b\x79\xcc\xaa\xe8\xab\xa9\
\x8f\x97\xba\x59\xb0\x35\x22\x54\x01\x27\x00\x30\x00\x9d\x4f\x23\
\x70\xdb\x75\x07\xf0\x4b\xbf\xf5\xdb\xf8\xd8\xb7\x7c\x13\x64\x20\
\x21\x0c\x15\x34\x0a\xa5\x39\xd6\xf5\x08\x55\x36\x99\x2c\x90\xf3\
\xe2\x03\xac\x7b\xe3\xa9\x3a\xe5\x89\x58\xd3\x24\x70\x8a\xe5\x27\
\xc6\x24\xcb\x21\x8f\xd7\xe5\x2e\xf5\xba\xb2\xc0\x40\x13\xce\x25\
\x66\x60\xdf\x9e\x5d\x91\x9b\xa6\x90\x25\x21\x5d\x56\x6b\x6d\x7d\
\x7d\x1b\x8c\xaf\x5c\xb5\x87\x68\x81\xc5\x40\xa3\xd9\x82\x65\x99\
\x13\x30\xa7\x08\x84\x8a\x58\x93\xfa\x7d\x9e\x7c\xe2\x49\x4c\x91\
\xf1\xca\x58\xc5\x6b\x40\xaa\x81\xa9\x8c\x36\x50\x3a\xce\x24\x99\
\x59\x1e\x7f\xf2\x51\x79\xdd\x4d\xb7\xa6\x5a\xf8\x84\xe7\xb2\xc7\
\xb1\xe9\x21\x59\xfa\xc7\x71\x95\xe1\xc1\x71\x5d\xb8\xba\x4d\xb9\
\x63\xdb\x30\x4d\x43\x15\x32\xd5\x93\x12\x85\xb6\x62\x5d\x95\xe0\
\xe8\xd3\x4f\xe1\xa9\x87\x1f\x0c\xb3\xfb\x22\x63\x43\x6b\x61\x01\
\x8b\xcb\xbb\x54\x45\x66\x14\x94\xb2\xc9\x75\x1e\x4f\x01\xa4\x44\
\x4b\x8c\x64\x8e\xed\xee\xfd\x07\x60\x08\x81\xd3\xc7\x8e\x46\xef\
\x0f\xf3\x9b\x92\x60\x14\x79\xe5\x28\xd1\xe0\x30\x59\x69\x15\x0c\
\xc7\x32\xe1\x5a\xc0\x28\x90\xe8\x7b\x23\x0c\xa5\x84\xed\x36\x60\
\xb0\xc4\x50\x4a\xac\x23\xec\xb6\x2b\xa3\xea\x02\x61\xff\xa6\xd0\
\xb9\xa8\x62\x4d\xea\x06\xd3\x84\x43\x71\x55\x82\xb2\xac\x29\x04\
\x14\x93\x08\x2c\x04\x5e\x76\xdb\xcd\xf8\x9e\x9f\xfc\xe7\xf8\xc5\
\x1f\xfe\x01\xb8\xcd\x66\xc4\x4e\x55\x42\xb3\xd4\x15\xb5\x25\xc0\
\x42\x4b\x8b\xe9\x65\x8a\x20\x52\xf9\xd0\x1a\xa4\x04\x18\x52\x48\
\x2d\xed\x71\xbe\xb0\x9a\x71\xe9\x71\x49\x70\xca\x07\x20\x9a\xcb\
\xbc\x97\xdd\x5a\x16\x9c\xc2\xae\xb0\x54\xc6\xde\x49\x04\x29\x25\
\x9e\x79\xe6\x48\xf9\xb6\x16\x25\xc5\x45\x2a\x54\xf2\x18\x7b\xf6\
\xec\x81\x69\x9a\x71\x2f\xb0\xd2\x20\x34\x39\x5a\x79\xc7\x17\xbf\
\x00\x4c\xaf\x28\x5e\xa5\x83\x6d\x0d\x52\x35\x30\x4d\x04\xa7\x2c\
\xb3\x92\x28\xd1\xfa\x22\x3b\x94\x51\x81\xa2\xd8\x89\x30\x84\x06\
\x25\x17\xb6\xad\x58\x92\xe3\x3a\x68\xb8\x2e\x6c\xdb\x52\xb9\x4b\
\x44\x30\x04\x22\x19\x8f\x99\x21\x08\x18\x0d\x87\xf8\xe4\x9f\xfd\
\x0f\x2d\xe1\xc5\xad\xd1\x85\x61\x60\x79\xf7\x9e\x04\x53\xe2\xfc\
\xd5\xe3\x44\xd6\x44\x63\x0c\x2a\xdd\xb1\x3a\x1d\x23\x30\x4d\x13\
\xd7\x1e\x3a\x84\x33\xc7\x8f\xe9\x8b\x7d\xac\xb7\x6c\xba\x9f\x53\
\x62\x15\x1d\xfe\xc7\x89\xee\xae\x12\x0c\xcb\x10\x00\x9b\xe8\x8d\
\x3c\x0c\xfb\x0c\xdb\x75\x61\x30\x63\xd8\xdb\xd2\x25\x95\x74\xed\
\x05\xdd\xf3\x27\x64\x19\x22\xd1\x9e\x43\x08\x01\x72\x09\x06\x19\
\xaa\x69\x60\xc5\x3c\x55\x02\x60\xe8\x0e\xba\x0c\xe0\x5d\x6f\x7a\
\x3d\xbe\xf8\xf7\xef\xc6\xa7\xfe\xec\x4f\x54\x17\x5c\x5d\x74\x57\
\xf7\x68\x4c\x55\x88\x10\x88\x65\x3d\x99\x39\x66\x61\xe3\x43\xb0\
\xd0\xb9\x64\xfa\x1d\x94\x94\xbf\x38\x36\x40\x14\x95\xdf\xe0\x0a\
\x01\xb4\x39\xcf\x71\x9c\x8f\x33\xca\xfc\x80\xc9\xf5\xf5\xe7\x96\
\x86\x35\x53\xc2\x15\xc7\x75\xf2\x12\xb1\xdf\xf1\x63\x39\x21\xa0\
\x94\x67\xac\x61\x60\x65\xe5\x2c\x63\xfb\xc9\xb5\xb5\x8c\x57\x03\
\x53\x69\x79\xaf\x8a\xa4\x27\x09\x30\x38\x71\xe1\x10\x00\x4f\x2a\
\xe3\x03\x51\xdc\x78\xce\xb2\x54\xa7\x57\x65\x78\x50\xa6\x07\xc7\
\xb6\xd5\x5f\xcb\x82\x69\x1a\x51\x5e\x90\xa9\x2b\x8b\xb3\x0c\x60\
\x08\x03\xcf\x3c\xf9\x24\xce\x1c\x3f\x06\xd2\xab\xce\xd0\xcd\xb5\
\xbc\x7b\x0f\x2c\xcb\x1e\x93\xf0\xa6\xcd\xc0\xe3\x20\x34\x0e\x4e\
\x79\x72\x1f\x43\xe5\x6f\x74\x3a\x1d\x2c\x2c\xef\xc2\xda\xf9\x95\
\x78\x7e\x8d\x30\x49\xc3\x4f\x4c\x9f\xf4\xbf\x13\xaf\xd1\xdd\x5d\
\x55\xae\xae\x3a\x70\xb6\x65\x00\x60\x74\x07\x23\x0c\x65\x00\xdb\
\x55\x55\x2a\x46\xfd\x1e\x36\x43\x6b\xb9\xd4\x52\x9e\x96\x15\xa3\
\xbe\x51\x50\x0e\x3d\xc7\x34\x60\xeb\x36\xeb\x0a\x00\xab\x4d\x8e\
\xc9\x86\x83\x0d\xcb\xc4\x27\x7e\xec\xe3\x78\xf2\xe1\x87\x70\xe2\
\xa9\x27\x61\x39\x3a\x17\x47\x72\xe4\xd4\x63\xed\x86\x50\x5e\x3d\
\x75\x7a\xa8\xd4\x33\x1d\x77\x22\x52\xcc\x36\x84\x1f\x21\x75\xe0\
\x89\x23\xa7\x1e\x27\x7f\x87\xa8\x02\x39\x32\xac\xa9\xd4\x22\xfe\
\xa2\x0e\x22\x81\x56\xb3\x91\x4e\x8c\x9b\x02\x4a\x52\x4a\x6d\x1a\
\xd8\xa1\x2f\x91\xb3\xd9\x64\xd5\x87\x49\x17\x3f\x15\x81\x50\x01\
\x13\x3b\xb7\xb2\x52\x64\x7c\xc8\xeb\x60\x2b\xa7\x00\x52\x0d\x4e\
\x35\x30\xe5\x82\x51\x19\x80\x2a\x2a\xd0\x08\x66\x28\x36\xd3\x54\
\x6d\xa6\x3d\xd6\xa6\x07\x52\x6c\x89\x84\xd0\x60\xa4\x99\x92\x63\
\x6b\xab\x78\x6c\x13\xb7\x4c\x03\x86\x6e\xfb\x2d\xa2\x38\x89\x89\
\x8d\xf5\x75\x7c\xf2\xcf\xfe\x34\xea\x6c\x1b\x56\xe2\xb6\x1d\x07\
\x0b\x4b\xbb\xa2\xc7\xa7\x9e\xde\x99\x4e\xb5\xf9\x8c\x29\xa7\xa3\
\xad\x46\xdb\xb0\x72\x84\x94\x12\x96\xed\xe0\xd0\xcd\x37\x63\xed\
\xdc\xd9\x84\xcc\x47\xb1\x49\x21\xd3\x05\x37\x89\x4a\x49\xc6\x44\
\xd1\x76\x15\xab\xb0\x2d\x13\x2d\x66\x78\x92\x01\xdf\x83\x17\x4e\
\x78\xc3\x3e\xba\xeb\x88\xd8\x13\x98\x21\x28\x6e\x9e\x28\x74\x7d\
\xc1\x76\xc3\x81\x63\x18\x71\x4d\x3d\x22\x54\x2d\x07\x9a\x94\xf4\
\x76\xb5\x9a\xf8\xb9\x5f\xfe\x65\x7c\xe7\x07\xde\x0f\x7f\xe4\xe9\
\x74\x00\x56\xb1\xbf\x4c\x02\xae\xd0\x6b\x10\x99\x4c\xc4\xa5\x58\
\x04\x13\x24\xc1\x1c\xbf\x38\x6c\x3d\x92\x12\xdd\x34\x10\x15\x4a\
\x7a\xdb\x29\x57\x34\x77\x60\xa2\x89\xc5\x56\xf3\x76\xd1\xf7\x3d\
\x9c\x3f\x7f\x61\x9b\x52\x5e\xb5\x11\x16\x70\x9d\x04\x42\x53\xa7\
\x89\xd4\x6b\x09\x41\xe0\x63\x6d\x75\x6d\x1a\x53\x2a\xdb\xf2\xa2\
\x1e\x35\x30\x15\x4e\xe1\xb3\x36\x0c\x94\xc9\xd5\x60\xf8\x76\x41\
\x22\x9a\x60\x58\x4a\x58\x8e\x03\xdb\x75\x23\x70\x8a\x0c\x0f\x96\
\x6a\x35\x6d\x9b\x16\x4c\x53\xc0\x34\x0c\x55\x39\x5b\x33\x22\xcb\
\x30\xf1\xd0\x03\x0f\xe0\xe4\x33\x4f\xa9\xea\xc8\x7a\x52\x26\x22\
\x2c\xef\xde\x87\xb8\xe9\xdf\x04\xe9\x83\x32\x92\x5e\x19\x40\x4a\
\x31\x0d\x4a\x1d\xb1\xb0\xb2\xc4\xcd\xb7\xde\x8a\xfb\xbf\xf0\xb9\
\xb4\x0b\x90\x44\x2a\x9f\x29\x4a\xbe\x45\xa4\xf0\xc5\xd5\x0f\x74\
\xad\xb8\x30\x50\x1d\x76\x8b\x75\x6c\x0b\x2e\x08\xa3\x20\xc0\xc0\
\xf7\xe0\x25\x24\xc2\xad\xc4\x8a\x95\xc2\x76\xf3\xba\x8b\xaa\x69\
\x18\x58\x75\x94\x89\x04\x04\x90\x69\x46\xfb\x51\x15\x9c\x08\x80\
\xa5\xcd\x10\xb7\x1f\xbe\x0e\x3f\xf4\xb3\x3f\x8f\x9f\xfe\xd8\x3f\
\x85\xd3\x68\x26\x08\x02\x47\xdd\x87\x15\xb0\x86\x32\xa3\xe6\x4f\
\x19\xe6\x14\x1e\xa6\xc8\x0c\x91\x8c\x37\x91\x6e\x58\x87\x12\xf1\
\x26\x60\xb6\x72\x45\x73\x1e\x42\x90\xea\x0a\x5b\x41\xba\x23\x10\
\x46\x5a\x8e\xae\x2c\x3e\xce\x58\x06\x42\x31\x26\x2e\x35\x21\x94\
\x61\x4d\x44\xc0\x70\xe4\x61\x30\xe8\xfb\x98\xad\x0f\x53\x2d\xe5\
\xd5\xc0\x54\x19\xa4\x66\x28\x4b\xa4\x10\x20\xf0\x7d\x00\x8c\x51\
\x00\x8c\x24\x47\x3d\x77\x48\x10\x2c\x6d\x76\x70\xb4\xd9\xc1\xb6\
\xb5\x8c\x67\xdb\xb0\x2d\x0b\x96\x6d\x2a\x57\x9e\xae\x91\x47\x21\
\x30\x99\x26\xee\xfb\xc2\xe7\xa3\x9e\x4d\x21\x5b\x6a\x2d\x2c\xa2\
\xd5\x6e\x47\x20\x31\x8e\x4e\x09\x5d\x71\x06\x50\xca\xde\x4f\xcb\
\x49\x4a\xc2\x72\x1c\x1b\x8e\xdb\xc0\xa0\xd7\x55\xdf\x33\x72\x74\
\x27\x58\x53\x82\x45\x51\xa2\xe5\x35\x53\xdc\x39\x94\x91\x06\x28\
\x68\x59\xcc\x32\x0c\x10\x49\xf4\x3d\x0f\x5e\x62\x0f\xb6\x34\x6b\
\x10\x42\x28\xf9\x53\xc7\x97\x2c\xd3\x80\x65\x1a\x51\x0e\x98\x68\
\x10\x88\x0c\x08\x41\xd5\xc2\x33\x48\xb7\xcb\x90\x2c\xf0\x96\xd7\
\xbc\x02\x7f\xf9\x86\x37\xe1\x0b\x9f\xfc\xdf\xb0\x5d\x37\xb1\x92\
\x96\x0a\x60\x42\x21\x4f\x14\x33\x27\x2d\xe0\x29\x40\x4e\xb8\xfc\
\x54\x82\x14\x12\x56\xfc\x38\xde\x94\x0f\x4e\x19\xf6\x34\x6b\x40\
\x67\x3b\x17\x8c\x64\xb4\xdb\x6d\xb4\xdb\xed\x4a\x1f\xcb\xe0\xc8\
\xa4\xb3\x6d\xcc\x29\x01\x89\x44\x50\x75\xf2\x32\x28\xb3\x5d\xd6\
\x14\xf8\x01\x30\x3d\xae\x54\xb5\x2c\x51\x3d\x6a\x60\x2a\x04\xa2\
\x32\xe0\x94\xd5\x8f\x01\x00\xbd\xad\xae\x96\xf1\x18\x1e\x6b\x39\
\x48\x4a\x98\x96\x19\xd9\xc2\x1d\x27\x99\x50\x6b\xc1\xb6\x55\x62\
\xad\x65\x5a\xa9\x49\x15\xcc\x30\x0d\x03\x67\xce\x9c\xc6\x13\x0f\
\xde\xaf\x2e\x23\x1d\xab\x22\x21\xd0\xee\x2c\xa6\xb0\x88\x0b\x56\
\xa7\x93\x65\x3c\x4a\x03\x57\xd1\xfd\xec\x61\xd1\x76\xee\xdd\xbb\
\x77\xe1\xe0\x4d\x37\xe1\xd1\x7b\xee\x1e\x03\x24\x4a\x26\xe8\x26\
\x5c\x79\x31\x83\xe2\x28\x0f\x8a\x38\x66\x4c\x21\x1b\x08\xf7\xdc\
\x32\x94\xa0\xd9\xf7\x47\xf0\x46\xe1\x72\x15\xd8\x02\xb0\x72\xea\
\x24\x4c\xcb\x8c\x2a\x40\x44\x09\xca\x11\xc0\x6b\x33\x89\xfe\x7c\
\x81\xea\xe0\x24\x00\x58\x42\x55\x86\xf8\xc9\x9f\xfa\x71\x7c\xeb\
\xa3\x0f\xe3\xc2\xd9\xb3\xba\xa1\xa2\x8a\x13\xc5\xc5\x71\xe3\xbf\
\x51\x95\x08\xd2\x6e\xc2\x0c\x73\x0a\x0b\x7b\x64\xe3\x4d\xa1\xb8\
\x97\x2c\x51\x14\xb7\xf4\x2e\x00\xa7\xbc\xb3\x99\x76\xfa\xa2\x51\
\x76\x7f\xa3\x42\x8b\x0a\x22\xc2\x70\x30\x80\xe7\xf9\x39\xa5\x97\
\x76\x4a\x6e\x14\x68\x36\x1a\x15\x3f\x63\x0a\x6b\x22\xc2\x56\x6f\
\x0b\x98\xec\xc8\x9b\xd4\x4a\x7d\xfe\x98\x7c\x85\x0f\x71\x95\x7c\
\xcf\xed\xf4\x64\x9a\x98\xc9\xcd\xcc\x10\xaa\x5f\x6a\x64\x6d\x56\
\xb9\x4b\x9a\x2d\x69\x70\x52\xac\x49\x19\x1e\x54\x62\xad\xa9\xee\
\x1b\x26\x2c\xcb\x84\x6d\x5b\xb0\x2d\x13\x9f\xfa\xeb\xbf\xc2\xe6\
\xea\x85\xa8\x72\x04\x33\xa3\xd5\x5e\x40\xb3\xdd\x2e\xcc\x4d\x19\
\x63\x38\x59\x89\x2e\x01\x4a\x11\x84\x24\x5c\x73\xd9\xfb\x51\x43\
\x38\x0e\xbf\xb0\x8a\xf3\x18\x42\xe0\xba\x43\x87\xc6\xe1\x30\x1b\
\x63\xca\xac\x68\x23\xde\x94\x03\x8e\xb1\x69\x22\x26\x04\xb6\x69\
\xa0\x69\x19\x80\x3f\x82\x37\x1c\x20\xf0\x3c\x78\xc3\x01\xb6\x36\
\xd6\x70\xf6\xe4\x09\xac\x9c\x3e\x8d\x95\x95\x15\x9c\xbf\xb0\x8a\
\xf5\x8d\x4d\x6c\x74\xb7\xb0\xba\xd9\xc5\x7a\xaf\x8f\xfe\xc8\xc7\
\x48\x4a\x04\x3c\xdb\x0c\x10\x75\xc1\x15\x02\xd7\x2c\x2d\xe2\x13\
\xbf\xf0\x8b\x51\xe9\xa7\x54\xa7\x5d\xcd\x64\xa3\x5b\xa2\x2b\xaf\
\xfa\xdd\x54\x52\x70\x68\x5c\x89\x6e\x92\x53\x0d\x1d\x43\x70\x43\
\xd4\xea\x9e\xd3\x95\x37\x38\xfb\xab\x17\xcc\x77\x3b\xbc\x1e\x67\
\xe6\x99\xb0\xaf\xd7\xef\x23\x90\x41\xf5\xab\x75\xaa\x5d\x2f\x7f\
\x1f\x6d\xdb\xc6\xe1\xc3\x87\xa3\xdf\x6b\x7c\x12\x48\x9f\x18\x3c\
\x15\xb0\x62\x90\xad\x20\xdf\x95\xa9\x93\x57\x03\x54\xcd\x98\x26\
\x82\x51\xe5\x7c\xa6\xec\xaa\x10\xc4\x40\x18\x3f\x21\xc0\xb4\x2c\
\xe5\xbc\x73\x54\xb5\x07\xd7\x71\xe0\xd8\x8a\x2d\x39\x96\x02\x20\
\xcb\x32\x60\x0a\x25\x3b\x19\x3a\x90\x7f\xf2\xd4\x29\x7c\xf1\x53\
\xff\x07\x44\xca\x66\xcc\x3a\x76\xd5\x5e\x58\x40\x71\x60\xa9\xe8\
\x9a\x8d\x81\x68\x1a\x63\x1a\xcb\x65\x1a\x93\x71\xe2\xc9\xf5\xf0\
\xf5\x87\x61\x98\x26\x64\xe0\x47\xd2\x49\x58\xd0\x35\xee\xdb\x44\
\x09\xfe\x96\x60\x4c\x61\x17\xd7\xc8\x39\x1e\x33\xb2\x74\x32\x2e\
\x60\x19\x06\x9a\x00\x7a\x9e\x07\x5f\x03\x9e\x37\x00\xba\x6b\xab\
\x38\x67\x9a\x10\x86\x01\xd3\xb4\x94\x2c\xaa\x0b\xe1\x5a\xa6\x89\
\x86\x6d\xc1\x36\x0d\xc5\x9a\xb4\xd3\xb1\xea\x84\x1a\x15\x7c\x35\
\x04\xbe\xe2\x85\xcf\xc3\x9b\xdf\xfb\x7e\xfc\xaf\x3f\xf8\x7d\xd5\
\xc3\x29\x05\x1e\x49\xe6\x24\x15\x4b\x22\x86\x64\x55\xbf\x48\x40\
\x26\x5c\x7a\xba\x09\xa4\xe0\x28\x1f\x2a\x31\xeb\xa9\x3f\x19\x87\
\x1e\x12\x1d\x8d\x79\x2c\x4f\xab\x40\xd3\xdb\x21\x06\xc5\x0c\x74\
\x3a\x6d\x98\x66\xb5\x29\x63\x34\x1c\xa6\xbe\x4b\x65\x26\x53\x75\
\x59\x41\x39\x8c\x72\x06\xe9\x2e\xd9\x92\x84\x88\x70\xf2\xe4\x29\
\x60\x72\x7c\xa9\x4c\x9c\xa9\x06\xa5\x1a\x98\x66\x66\x4d\xa5\xeb\
\xe5\x49\x29\xb1\xd9\x1b\x80\x4d\x5b\x4b\x6f\x12\x86\x69\xc0\xb2\
\x1d\x58\x96\xce\x59\x6a\x38\x2a\x36\xa3\x63\x4b\xb6\xa5\xc0\x49\
\x4d\xa6\x71\x15\x03\xc7\xb6\x70\xcf\x9d\x77\x62\x63\xf5\x82\x6a\
\x6c\x17\x3a\xd1\x0c\x13\x8d\x56\x5b\xaf\xb4\xd3\xd3\x10\xa7\xee\
\xa0\x00\x74\xb2\xa0\x44\x51\x45\xe8\x6c\x29\x19\x1a\x93\x00\x39\
\x5a\x89\xb2\x94\xf0\x3c\x1f\xfb\xf6\xec\xc1\xee\x03\x07\x70\xf6\
\xf8\xb1\x54\xb9\xa2\xa4\x33\x2f\x7f\x62\xcc\x5a\xa2\xe3\xbc\x26\
\xa6\x7c\x6c\xb5\x75\x3c\xa9\xe7\x79\xf0\x34\xd8\x0d\xfb\x3d\xac\
\x9f\x3f\xaf\x80\xc9\xb2\xe0\xba\x61\x5f\x2b\x05\x4c\x6d\xd7\x85\
\x6b\x59\x51\xd9\x22\x31\x83\xa4\x17\xee\x83\x29\x08\xae\x69\xe2\
\x7b\xbf\xfb\x1f\xe3\xde\xcf\xfd\x03\x56\x4e\x9d\x84\x11\x26\x6e\
\xb2\x8a\x8c\x21\x6a\x7b\x21\xc0\x42\x46\x2d\x30\x58\xc7\xd5\x14\
\x58\xe9\x58\xa1\x3e\x7b\x92\x4e\xbd\xd8\x32\xae\x7f\x13\x7d\x7f\
\xac\x22\x84\xce\x1f\x2b\xf6\x40\xe4\x94\xcd\xc6\x3c\x41\x8a\xd3\
\xd5\x14\x92\x41\x1d\x2e\x0e\x7c\x6d\x6c\x6e\x68\x55\xa1\x2a\x16\
\x55\x9f\xbb\x99\x19\x0b\x0b\x8b\xd8\xbd\x7b\x77\x3a\x87\x69\x4a\
\x8e\x58\x99\x22\xc0\x47\x9e\x79\x3a\x64\x4c\x01\x26\x5b\xc3\xa7\
\x25\xd8\xd6\xa0\x54\x4b\x79\x73\x63\x4d\x99\x13\x4f\xf7\x96\x21\
\x81\xde\x60\xa0\xac\xce\xfa\x69\xd3\xb2\xe0\x36\x1a\xaa\xc5\x85\
\xed\x44\x06\x88\xd8\xfc\x10\xc6\x98\xd4\x44\x6a\x59\x26\x1c\xdb\
\xc2\xc6\xe6\x26\xfe\xe1\x7f\xff\x55\x42\x46\x53\xbb\xd4\x59\x5c\
\x2a\x12\xd3\xd3\xba\x5d\x0e\xe3\x49\xca\x77\x91\x8c\x97\x8a\x01\
\xc5\x4c\x27\x2a\xc2\x9a\x00\x97\x64\xf7\x75\x29\x25\x3c\xdf\xc7\
\x9e\x5d\xcb\x78\xce\xe1\x1b\xc0\x52\xa6\x18\x51\x0a\xf4\x32\x1a\
\x63\xe8\xda\x43\x12\x10\x13\xef\xa3\xcc\x2d\x29\xeb\x59\xa6\x81\
\xa6\x6d\x80\x7c\x0f\xbe\x37\x44\xe0\xfb\x18\xf6\x7b\x58\x3d\x7b\
\x16\x2b\xa7\x4e\x61\xe5\xcc\x59\x9c\x3f\x7f\x01\xab\x6b\xeb\x58\
\xef\x76\x71\x61\x73\x13\x1b\xfd\x01\x86\x7e\x80\x40\xf2\xf6\x24\
\x3d\x28\x49\x6f\xff\x62\x07\x3f\xf2\xb3\xff\x22\x51\x32\x29\x2d\
\xc7\x65\xa5\xb9\x58\xea\x4b\x48\x7e\x9c\x91\xf4\x72\xb6\x91\x94\
\xf3\xa2\x89\x35\x25\xe5\x71\xaa\xda\x48\x69\x0d\x6c\x0e\x53\x21\
\x33\xc3\xd6\x0b\x00\x24\x17\x22\xd9\x45\x09\xa5\xcf\xc7\x0b\x17\
\x2e\xcc\xe1\xe3\xcb\x57\x16\x0f\x02\x1f\xa6\x69\x14\x62\x5c\x59\
\xe9\x2e\x7b\xad\xdd\x7f\xdf\x7d\xd3\xa4\xbc\xda\x2a\x5e\x33\xa6\
\x4b\xcb\x9a\x38\x13\xcb\x89\xa4\x17\x28\x19\xcf\x0a\xc1\x29\x64\
\x48\x8e\x1d\xb3\x26\x3b\x94\x9f\x0c\x95\x97\x43\x80\x63\xdb\xb8\
\xeb\x9e\x7b\x70\xec\xc9\x27\x94\x8c\xa7\x2b\x87\x13\x11\x1a\xad\
\x56\x15\xfd\xae\xb0\xa0\x26\x52\xf1\xa3\x38\xc9\x36\x59\xe7\x2e\
\x95\xc7\x94\xac\x49\xa4\x83\xfb\x52\x97\x4a\x3a\x70\xed\xb5\x89\
\xe2\xa3\xd9\xcf\x4d\xb3\xae\x6c\x62\x6f\xcc\x02\x42\xd6\x41\x93\
\xbf\x11\x03\xb6\x61\x80\x40\xe8\x07\x3e\xfc\x51\x2c\xa1\x5e\x38\
\x73\x3a\x2a\xf7\x64\x5a\xa6\xea\x73\xa5\xad\xf8\x0d\xdb\xd2\x2e\
\x3f\xd5\x38\x2e\xec\x42\x5b\x75\x3a\x34\x48\x19\x32\x5e\xfe\x82\
\xe7\xe1\xb5\x6f\x7b\x3b\x3e\xf5\xe7\x7f\x0a\xc7\x71\x75\xbc\x4f\
\x1b\x14\x42\xb7\x5e\xb4\x6c\x41\x54\x0d\x82\x24\x81\x49\x42\xea\
\xd2\xe4\x82\x62\x53\x0b\x67\x8f\x33\xe2\x62\xb9\xe1\xb1\xca\x2f\
\x57\x84\xb1\x26\x83\xe9\xe3\x36\x7f\x93\x04\x33\x60\xdb\x76\xea\
\x37\x2f\x33\x36\x36\x36\xe6\x78\xd9\xe6\x7f\x87\x64\x5d\xbe\x66\
\xb3\x09\xcb\xb4\xca\x79\xd1\xa7\xb0\xa6\xe4\x63\x8f\x3f\xfe\x38\
\x30\xbd\x80\x6b\x95\xd8\x52\x0d\x54\x35\x30\x95\xb6\x87\x63\x32\
\x53\xca\xaa\x67\xe9\x22\xa5\x42\x08\xb8\x8d\x26\x1c\xb7\xa1\x2a\
\x88\xdb\x56\xe4\xc6\x4b\x82\x52\x08\x4c\xb6\xee\xc8\xca\x2c\xf1\
\xa9\xbf\xfc\x0b\xc5\x42\x22\x2d\x9e\x61\x1a\xa6\x6a\x62\xc7\xf9\
\x2b\xe1\xa9\x3d\x88\x92\x6c\x29\x05\x4a\x89\x8a\xe0\x19\x46\x15\
\xc3\x09\xa5\x18\x53\xb4\xb2\x07\xb0\x7b\xcf\xee\x9c\x9d\xa0\xcc\
\x67\x52\x5a\xf7\xe7\xb8\xac\x10\x27\x7a\x10\x4d\x8e\x3c\xc4\xcf\
\xda\x96\x81\xa1\x37\xc0\xc0\xf3\x21\x84\x80\x4f\x84\x61\xaf\x87\
\x73\xa7\x4e\x6a\x70\x72\xe0\xba\x2e\x5c\x2d\x99\xba\x8e\xa5\x40\
\xc0\xb5\x21\x2c\x2a\x6c\x4e\x57\x4a\xd2\x23\x55\x15\xe2\x07\x7e\
\xf0\xfb\x70\xef\xe7\x3f\x8b\xee\xfa\x7a\x94\x78\x1b\xc7\x9a\x94\
\x59\x45\xc5\x90\x38\xaa\x6d\xa8\x7a\x53\x85\xc9\xb6\x3a\xde\x44\
\x04\x92\x9c\xaa\x0a\x91\x92\x62\x79\x5a\x6e\x13\x72\xfb\x38\x65\
\x63\x23\xb9\x67\xc9\x8c\x00\xc5\x2c\xb1\xbc\xb8\x50\x19\xd7\x1e\
\x7b\xec\xf1\xf9\x5d\xc5\x84\x29\xe7\x09\x63\xf7\x9e\xbd\x30\x4d\
\x03\x09\x2b\x49\xa5\x0a\x0f\xb9\x05\x5e\xa5\xc4\x91\xa7\x9f\x9e\
\xd4\xea\xa2\xac\x84\x57\x83\x52\x2d\xe5\x55\x02\xaa\x69\x16\xf1\
\x8c\xf9\x41\x4d\xdc\x32\xf0\x01\x61\x44\x9b\x31\x2d\x53\x31\x26\
\xc7\x86\xad\xdd\x78\x21\x30\x85\x37\xd3\x30\x61\x5b\x26\x5c\xdb\
\xd1\x71\x27\x13\x6b\x1b\x9b\x78\xf4\x9e\xbb\xa2\xaa\x06\xe1\xc4\
\xe6\x34\x1a\x19\x71\x6c\x4a\xfc\x34\xc7\x81\x17\x03\x4e\x92\x29\
\x65\x41\x29\xed\xc8\xcb\xae\x8a\x59\x86\x56\x0c\xf5\xa9\x7b\xf6\
\xec\x8e\x5a\x63\xa4\x5c\x75\x19\x7f\x60\x4a\x80\xa1\x74\x37\x50\
\xca\xd3\xfc\x32\x37\x42\x12\x50\x95\x21\x82\xa4\x0f\x6f\x38\x84\
\xf4\x7d\xf8\xde\x10\xbd\xcd\x4d\xac\x9c\x3a\x85\x73\x67\xce\xe0\
\xfc\xb9\x73\x58\x5d\x5b\xc7\x46\xb7\x8b\x73\x6b\x9b\x58\xd9\xe8\
\xa2\x3b\xf4\xe0\x05\xaa\xe8\xaa\xdc\xc6\x7c\x68\x09\x81\x6b\x97\
\x97\xf0\xb1\x4f\xfc\x04\xbc\xd1\x28\x21\xc3\x25\x4c\x10\xc8\x91\
\xf4\x64\x42\xd6\x0b\x4d\x24\x19\xa7\x5e\x22\xf8\x94\x50\x93\xe2\
\x5c\xb5\x7c\x59\xaf\x58\x7a\xda\x09\x17\x1f\x4b\xc6\xae\xe5\x45\
\x54\x2a\xe1\xc0\x8c\xb5\xb5\xb5\x8b\x97\x13\xcc\x40\xab\xd5\xaa\
\xc0\xea\xb8\xd4\xc3\xcc\x8c\x7e\xbf\x3f\xcd\xf8\x50\xe7\x2e\xd5\
\x8c\x69\x6e\xe0\xc4\x25\xe5\xbc\xec\xca\x08\x51\x3f\x4c\xd3\x8a\
\x2a\x33\x58\x8e\x13\x35\x04\x74\x13\xb1\x25\xd3\x88\x73\x6d\x4c\
\x43\xe8\x40\xbd\x8e\x31\x99\x26\x7a\xbd\x3e\xba\x51\x6b\x80\xb8\
\x4e\x6c\xb3\xd5\x89\x94\x1e\x4e\x2e\x94\x27\x5c\x53\x49\x93\x43\
\xf2\x6f\x32\x19\x36\xae\xc4\x9d\x60\x2d\x39\x66\x88\x28\xc8\xaf\
\xe3\x23\x60\xc0\xf3\x7d\x5c\xb3\x6f\x2f\x96\xf6\xec\xc3\xda\xb9\
\xb3\x89\x4f\xa5\xd4\x47\xa6\xf1\x46\x05\xf5\xc3\x1c\x9d\xa8\x9c\
\x11\x65\x66\x02\x46\x7e\xcb\x6c\xfd\xbd\x1b\xae\x03\xc3\x10\xd8\
\x1c\x8c\xe0\x8d\x86\xca\xa9\x37\xec\x63\x73\xf5\x3c\xce\xea\x62\
\xb9\x61\xfe\x98\x5a\x04\x08\xb5\x08\x30\x0d\x55\x8b\x50\xd0\x4c\
\x2e\xbd\xa4\xa4\xf7\x86\xaf\x7c\x39\x7e\xef\x85\x5f\x82\xa7\x1e\
\x7e\x48\xf7\x6e\x4a\x80\x09\x73\x54\x88\x97\x92\xb1\x26\xa6\xf8\
\xaf\x66\x4c\xa1\x33\x8f\x52\x92\x1e\x90\x6c\x0c\xc8\xa4\xf3\x9d\
\xe2\x96\xb7\xe9\xda\x7a\x29\x70\x4a\xbb\x22\xf2\x1b\x3b\x6c\x8f\
\x41\x31\x57\xbf\xc0\x92\x52\xde\xc5\x98\xa1\x97\x96\x97\x0b\x0c\
\x19\xe9\x23\x92\x57\x61\x9c\x73\xa4\x50\x22\xc2\x68\x34\xc2\xfa\
\xfa\xda\x34\xb6\x54\x83\x54\xcd\x98\xb6\x05\x44\xb3\xb4\x57\x4f\
\xb1\xa8\x63\x4f\x3c\xc2\xd1\xca\x5f\x27\x1c\x0a\x21\x94\xe1\xc1\
\x71\xd0\x6c\xb5\x94\x7c\x17\xb5\xb8\x50\xee\x31\x3b\x4c\xb2\x4d\
\xdc\x1c\xcb\xc4\x1d\x5f\xfc\xa2\xaa\x22\x11\x36\x33\x65\x86\x69\
\x5a\x68\x34\x5b\x69\x07\x42\xe6\xf2\x9e\xd6\x65\x36\xfe\x5b\xc0\
\x98\x72\xc1\x49\xfd\xc3\x12\x80\x23\x12\x32\x9e\xae\x6c\xe1\xfb\
\x3e\x76\x2f\x2e\x60\xef\xb5\xd7\xaa\x2a\x14\x94\x0c\xb4\x51\xae\
\xea\x92\x94\xf6\x28\xcf\xd2\x8b\xb4\xcd\x7c\xac\x59\x87\x66\x71\
\xcc\x0c\xc7\xb6\xb0\xd0\x70\x21\x64\x00\xcf\xf3\x10\xf8\x01\x86\
\xfd\x3e\x56\xcf\x9e\xc1\xf9\xb3\x67\x70\x7e\xe5\x1c\x56\x2f\xac\
\x61\x63\xa3\x8b\xcd\x5e\x1f\x6b\xdd\x2d\x6c\x0c\x46\x18\x06\x01\
\x02\xe6\x89\xb3\xc3\x34\x69\xd4\x22\x81\xb6\x63\xe3\xe3\x3f\xf9\
\x13\xf1\x4c\x9d\x64\x4e\xb9\x26\x08\x8e\xf2\xd1\x22\x03\x84\x6e\
\x7c\x38\xfe\x5a\x64\x98\x54\x0c\x78\x9c\x59\x95\x8c\x83\x04\x23\
\x2f\x47\x87\xcb\x52\xa5\x29\xd3\x26\x03\x68\xb7\x9a\x95\x2e\x38\
\x29\x25\x1e\x7b\xfc\x09\x5c\xac\x42\x79\x0c\x55\xc0\x95\x32\x17\
\xc7\x64\xa3\xdf\x64\xd6\xc4\x50\x8d\x2a\x2b\x4a\x78\x12\x75\xf1\
\xd6\x1a\x98\xb6\xc9\x96\x2a\x59\xc5\x99\x39\x20\xa2\xf1\x24\x5b\
\xc3\x4c\x14\x6c\x75\x60\x9a\xca\xf4\x60\x9a\x86\xfa\xb7\x61\xc0\
\xb6\x2d\xb8\x51\x2e\x93\x05\xc7\xb6\xc0\x0c\x7c\xf6\x93\xff\x47\
\xc7\x11\xd2\xcb\x39\x61\xc4\xf9\x4c\x45\x4e\x2d\x9e\x25\xd7\x23\
\x9e\xf1\x0b\xa6\x64\x82\x2d\x08\xae\x11\x4f\x94\x32\x0c\xee\x83\
\xe0\x3a\x36\xf6\x1e\xb8\x26\xe1\x26\x4b\x4b\x76\x84\x6c\x79\xa2\
\x74\xc7\xdb\xac\xb4\x57\xb4\x9b\x63\xb2\x22\xc5\x85\x5f\xdb\xae\
\x0d\x83\x03\x04\xde\x08\x81\xe7\x61\xd8\xeb\xe1\xfc\xe9\xd3\x38\
\x7f\xf6\x2c\xce\x9f\x3f\x8f\xd5\xf5\x75\x6c\x74\xb7\xb0\xb9\xd5\
\xc7\x66\xbf\x8f\x9e\xe7\xc3\xe3\xe9\x2e\x3d\x9a\x00\x50\x61\xe2\
\xed\x0b\x6f\xba\x01\xaf\x7a\xd3\x5b\x30\x1a\x0d\x33\x8e\xb9\x8c\
\x2b\x6f\xcc\xa1\x97\x00\x9d\x30\x11\x57\xa6\x5d\x79\x71\x4a\x73\
\x22\x56\x95\xfb\x4b\x73\xf2\xd0\x4f\x94\xf7\xf2\x97\xeb\x5c\x5e\
\x47\xd0\xe7\xf8\xf2\xe2\x42\xe5\x0b\x4d\xa6\x7a\x86\xcd\x79\x64\
\x53\x22\x48\x33\xa6\xc2\x4f\x9c\x2e\xdd\x65\x97\x7d\x44\x84\x6e\
\x77\x0b\x98\x1e\x5f\x92\x98\x6e\x7a\xa8\x41\xa9\x06\xa6\xca\x22\
\x73\xd9\x72\x44\x91\x9c\x67\x38\x6e\x34\x71\x0a\x21\x60\x59\x36\
\x6c\x2d\xe1\x29\xd9\xc9\xd0\xb5\xf1\x54\x5c\xa9\xdd\x68\x60\xa1\
\xd5\x42\xbb\xd1\x40\xd3\xb1\xd1\xb0\x2c\xf8\x52\xe2\xec\xc9\xe3\
\x19\x5d\x9c\xe1\xba\x0d\x44\x9e\xe9\xdc\x4a\x00\xc9\x98\x04\x27\
\xe6\x24\x2e\x74\xbd\x66\x2f\xe8\xb4\x84\x97\xad\x8e\x9d\x5e\x69\
\x46\x95\xb1\x09\xb0\x4d\x13\x87\x6f\xb8\x41\x4d\xb8\xe9\x17\x24\
\xb6\x41\x59\x12\x95\x9b\x4b\x35\x66\x31\x4e\xb4\xd1\x48\x6e\x8f\
\x12\xfb\xc9\x00\x5c\xdb\x84\xc1\x81\xaa\x0c\x11\xf8\xf0\x47\x43\
\x74\x37\xd6\xb0\x72\xea\x24\xce\x9f\x3d\x8b\x0b\xe7\x2f\x60\x7d\
\x7d\x03\xdd\xad\x1e\xd6\xb7\xfa\xd8\x1c\x0c\x31\xf0\x03\xf8\xcc\
\x93\x9b\x6a\x4d\x60\x4f\x04\xd5\x92\xdd\x35\x4d\x7c\xf7\xf7\x7e\
\x0f\x5a\x9d\x85\xa8\xcd\x7d\x4a\x63\x4d\x26\xdd\xe6\xd9\xc7\x73\
\xc1\x2b\xcd\x9c\xe2\x9f\x34\xdc\x5e\x0c\x10\x59\x10\x2a\x04\xa7\
\x59\xe3\x4f\x05\x4f\x35\xa3\x04\xe3\xf2\x63\x30\x18\xcc\x2d\xc6\
\x44\x53\xaf\x64\xc2\xee\x5d\xbb\x26\xdb\xc4\x27\x80\x50\xd1\xc1\
\xa2\xb0\x8d\xd8\x64\x70\x2a\xeb\xca\xab\x59\x53\x0d\x4c\xa5\x2e\
\xb9\x59\x5a\xae\x33\x40\x30\xdd\x66\x1c\x17\x10\x02\x86\x69\xea\
\x0a\xe2\x66\xe4\xc4\x73\x2c\x4b\xb1\x25\xcb\x82\x6b\xdb\x68\xd8\
\x36\x5c\xdb\x82\x6d\x9a\xb0\x4d\x03\x9b\xbd\x1e\xd6\xcf\x9f\x53\
\x6d\xbe\x29\x9e\x78\x9a\xed\x4e\xfa\x63\xa3\xfc\x17\x60\x6c\xa9\
\xcc\xc8\x71\xee\xf1\x1c\x4e\xff\xb4\x19\x83\x11\xc7\x9d\x6e\xba\
\xe1\xfa\xa8\x3e\x5e\x72\x77\xd2\xed\xd6\x33\xa6\x71\x42\xa6\x89\
\x60\xda\xea\x90\xa8\xb8\x97\x06\xa5\xcc\x7d\x42\xcc\x9c\x04\x24\
\xfc\xd1\x10\x41\xe0\xc3\x1b\x0e\xb0\x76\x6e\x05\x67\x4f\x9f\xd2\
\x46\x88\x35\x6c\x74\xbb\x3a\xbf\x49\x4b\x7a\x3a\xbf\x49\x96\x58\
\x4f\x53\xc1\x05\x63\x09\x81\x1b\xf6\xef\xc5\xbb\xbe\xf9\x5b\x55\
\xeb\x13\x4e\x3b\x17\xd3\x39\x4a\x32\x3f\xc7\x29\x71\x3f\x02\xb0\
\x78\x43\x29\x39\x2f\xb3\x3a\xc8\x01\x27\x2e\x96\xec\x4a\xa5\x35\
\x71\xa9\xab\xc5\xb2\xcc\x4a\x20\xe3\x79\x1e\x4e\x9d\x3e\x3d\x77\
\x29\xaf\x90\xd1\x0a\x42\xa3\xd9\x98\xf2\xbd\xb8\xd2\x54\x21\x88\
\x70\xf4\xe8\x51\x60\x7a\x6c\xa9\x6c\x4b\xf5\x1a\x94\x6a\x60\x2a\
\xc5\x90\x66\x95\xf6\xa2\xf8\x52\x98\x73\x64\x5a\x16\x0c\x53\x15\
\x16\xb5\x75\xff\xa5\x50\xc2\x6b\x38\x8e\x2a\x45\x64\x1a\xb0\x0c\
\x55\xbc\xd5\x32\x0c\x3c\x7d\xf4\x38\x7c\xcf\x8b\xd9\x51\x18\x3f\
\xd0\xd2\x1e\x03\xe9\x15\x74\x91\xfb\x2b\x7c\x5f\x62\x82\xe3\x48\
\x00\x4a\x4b\x44\xa9\x24\xcd\xec\xa4\x56\x20\xe3\x84\x13\x02\xb3\
\xd2\xdc\xaf\xdd\xb7\x47\x07\xff\xd3\xed\x2e\x90\x2a\x4b\x14\xa3\
\x11\x25\xaa\x6e\x27\x8b\xbd\xa6\x26\x2d\x4a\x3f\x9e\x64\x49\x29\
\x66\xa7\x0f\x55\xc3\x75\xb1\xd4\x6e\xc1\x60\x09\x7f\x34\x52\xc9\
\xb7\x83\x3e\xce\x9f\x3e\x85\x95\xd3\xa7\x23\xd6\xb4\xd9\xdd\xc2\
\xda\x66\x17\x6b\x5b\x3d\xf4\x3c\x1f\x43\x29\xe1\x73\x39\x11\x34\
\x2f\x1a\x26\xb4\x11\xe2\x43\x5f\xff\x1e\x2c\xef\xdd\xa7\x4a\x10\
\xa5\x0f\x58\x14\x2f\x42\x0a\x88\xe4\x78\xbc\x29\x2f\x51\x17\x79\
\x92\x1e\x52\x71\x26\x66\x1e\xff\x4c\x94\x93\xf6\x8a\xc1\xa9\xf8\
\x88\x18\x42\x60\x69\x61\xa1\xf4\xac\xaa\x5a\xb6\x04\xd8\xdc\xe8\
\x5e\x94\x26\xbc\xaa\x4e\x9e\x13\xd5\xc9\xe3\xaa\xd8\xc4\x05\xfc\
\x89\x08\x47\x9e\x39\x92\x04\xa6\xa0\x00\x8c\x26\x15\x71\xad\x41\
\xa9\x06\xa6\x99\xc1\xaa\x44\xc5\x87\xb1\xae\x94\x29\x2d\x9a\x84\
\x72\xdc\x99\xba\xe4\x50\x58\x9c\xb5\xe9\xba\x68\xba\x8e\xae\xe3\
\xa6\x98\x92\x4a\xfe\x24\xfc\xed\xa7\x3f\x9d\xda\x0e\xb3\xb2\x9d\
\x3b\x4e\x23\xb1\x62\xce\xc4\x1c\xb2\x81\xf6\xbc\x4a\x04\x49\xa9\
\x2f\x1b\xc2\x48\x48\x44\xe3\x17\x26\xe7\x5e\xf4\x21\x34\x49\x56\
\x15\x20\x9a\xae\x03\xcb\x71\xa3\xef\x9e\xaa\x97\x97\x23\x0b\xa6\
\x24\xba\x04\xe8\xa4\x81\x27\xe6\x4c\x29\xa9\x0f\x69\xcb\x79\x68\
\x51\x67\x66\x38\x96\x85\x85\xa6\x0b\x53\x00\x81\xe7\x21\xf0\x46\
\xe8\x77\xbb\xb1\xa4\x77\x61\x15\xab\xeb\x1b\xd8\xe8\x6e\x61\xad\
\xbb\x85\xee\x50\xb1\x26\xbf\x80\x35\x95\xbd\x68\x4c\x12\xd8\xb7\
\xd0\xc1\xfb\xbf\xfd\x3b\x14\x6b\x4a\xfe\x86\x63\x92\x5e\x81\x29\
\xa2\x50\xca\xe3\xc2\xdf\x2b\xf9\x09\xc8\x01\xa7\x2a\xd2\x5e\xf9\
\xea\x11\x3c\xb5\x49\xe0\xf8\x56\x58\xd5\xd5\xa3\xed\xce\xc6\xb4\
\xcd\x97\x71\xc9\x7b\xc5\xe3\xdc\xb9\x73\xc0\xf4\x3a\x79\x65\x73\
\x98\xea\x51\x03\xd3\x54\x81\x62\x9a\x84\x07\x94\x2a\xe4\x0a\x98\
\x96\x2a\x24\x1a\xde\xc2\x0a\xe2\x8e\x6d\xa1\xe1\xd8\x68\x39\x0e\
\x1c\xcb\x84\x65\x08\x98\x42\xdd\x24\x33\x1e\x7f\xf0\x81\x84\xf1\
\x81\x23\xf6\x95\x34\x3e\x84\x4c\x28\x09\x38\x49\xd6\x54\x3c\xf1\
\x15\x3f\x9f\x94\x9f\x92\xae\xaf\x22\x17\x18\x98\x75\xb5\x6c\x86\
\x17\x04\x58\x6c\x36\xb0\xf7\x9a\x6b\x75\x25\x87\x0c\xc0\x50\x02\
\x44\xf2\x0a\x50\x64\x3a\xdd\x8e\x31\xae\x0c\x70\x8d\xbb\xfa\xf4\
\x3d\x6d\x3f\x77\x6c\x0b\x26\x18\xfe\x68\x04\x19\x04\xf0\x47\x43\
\x6c\x5e\x38\x8f\x95\xd3\xa7\x71\x7e\x65\x05\xab\x17\x56\xb1\xbe\
\xd9\xc5\x46\x77\x0b\x17\x36\xb7\xd0\x1d\x7a\x18\x05\xf9\xac\x89\
\x73\x26\xbb\xbc\x39\x4f\xd9\xc7\x0d\xbc\xe3\xad\x6f\xc1\x9e\x03\
\xd7\x44\xd5\x3a\xd2\xcc\x07\x13\xc1\xa8\xa8\xac\x51\x72\x25\x91\
\x2f\xe9\xa5\x19\x6f\x1e\x08\x15\xca\x75\x5c\x96\x27\x71\x0a\x68\
\x49\x37\x66\x2c\x0d\x27\x44\xe8\xf5\x7a\x18\x0e\x86\xe3\xf2\xec\
\x9c\xd9\x52\xb8\x78\x5a\x58\x5c\xc4\x9e\x54\x9d\xbc\x8a\x9f\xc7\
\xf9\x49\xec\x77\x7c\xf1\xf3\x28\x09\x48\xd3\x0c\x10\x75\x8c\xa9\
\x06\xa6\xd2\xa7\x64\x95\xf8\x52\x74\x33\x1c\x17\xc2\xb2\x15\x90\
\x08\xa1\x2a\x5d\xdb\x36\x0c\xc3\x54\x7d\x81\x0c\x03\xc2\x10\x10\
\x24\xa2\xfc\x25\xdb\x30\x34\x28\x11\x0c\x41\xda\xf8\x70\x22\x36\
\x3e\x68\xf3\x42\x54\xb0\x35\xa1\xe3\x25\xff\x59\x34\x79\xa5\xec\
\xc9\x72\x32\x58\xe5\xb3\xaf\x1c\x70\x4a\x7c\xa6\x94\x32\xaa\x9b\
\xd7\xb0\x2d\x5c\x73\xf0\x50\xba\xcd\x7b\x42\x8f\x4b\x46\x98\x26\
\xcc\x5e\x29\x90\x4a\x99\xc5\xb3\xc6\x08\x20\x93\x04\x1c\xa1\x9c\
\xea\x82\x6b\x99\x30\x89\x55\xbc\xc9\xf7\x31\x1a\x0d\xb1\xba\x72\
\x06\xe7\xce\x26\x6a\xe9\x6d\x86\xed\x31\x06\xe8\x7b\x3e\x7c\xc9\
\x15\xa4\xa9\xf1\x7f\x9b\x44\xd8\xbf\xd8\xc1\x07\x3f\xfa\x5d\x18\
\x0d\x07\x39\x35\x6d\x78\x1c\xac\xa6\xfd\x26\x48\x48\xb3\x59\x19\
\x96\xd3\x55\xcd\x67\x03\xa7\x2a\xec\x09\xd1\xe7\x36\x1a\x2e\x1a\
\x15\xcd\x0f\xfd\x7e\x4f\xb5\xbc\xa0\x79\x5e\xae\xc5\x23\xf0\x7d\
\x98\x86\x99\x3e\x36\x85\x32\x1d\x97\x8a\x44\x31\x33\x8e\x1f\x3b\
\x56\xa6\xff\x52\x59\xd6\x54\x83\x52\x0d\x4c\xa5\xcf\xf0\x32\x2c\
\x29\xc6\x06\x66\x16\xa6\x15\xb5\xa7\x10\x42\xc0\xd0\x86\x07\x2b\
\x64\x4e\x42\xc0\x10\x8a\x39\x09\x12\xd1\xc4\x2a\xc2\x26\x76\x44\
\x18\x78\x3e\x56\x4e\x1e\x03\x09\x91\x89\x71\xa7\x77\x67\xac\xd0\
\x67\x2a\xae\x34\x49\x1a\x92\xe9\x5b\xb2\x6f\x50\xe6\x3d\x28\x00\
\xae\xe4\xe4\x84\x04\x98\x19\x42\x60\x79\xf7\x6e\x4c\x0c\x50\x25\
\xfb\x3a\x65\xa4\xa9\x22\xa0\x1a\x8b\x3b\x21\x53\x5d\x22\x11\xbb\
\xa2\x44\xec\xaa\xe1\x3a\x58\x6c\x35\x54\x07\xda\xc0\x87\xf4\x3c\
\xf4\xbb\x5d\x9c\x3f\x73\x1a\x17\x42\xd6\xb4\xb1\x89\x8d\xad\x1e\
\xd6\xb7\xb6\xd0\x1b\x79\xf0\x24\x43\xf2\x04\xcb\xd4\x94\x29\x44\
\x90\xaa\x40\xfe\xd6\x37\xbc\x0e\x7b\x0e\x5c\xa3\xbb\x0b\xe7\xcb\
\x68\xa9\x63\x2c\xa7\xb1\xa6\xd8\x64\x92\x94\x62\x63\x49\x2f\x13\
\x6f\xaa\x04\x4e\xd5\xd9\x13\x33\xc3\x75\x6c\x58\x15\x5b\x5e\x0c\
\x87\xc3\xd9\xd9\x4b\x55\x29\x8f\x81\x46\xb3\x09\xd3\x32\xe7\x3a\
\x4b\x30\x33\xba\xdd\x6e\x51\x7c\x69\x92\x94\x87\x1a\x88\x6a\x60\
\xda\xae\x9c\x37\x29\x19\xae\x58\xca\xd3\x12\x1c\x09\x43\x99\x1e\
\xc2\xd2\x43\x66\x2c\xeb\xd9\x76\x58\xb0\x95\x40\x42\x4d\x66\x21\
\x2b\xd8\xec\x0f\xe0\x8d\x46\x71\xb7\x52\xfd\x91\x6e\xb3\x09\x5d\
\xe1\x2b\xd3\xb5\xb6\x20\x19\x53\xa6\xd9\x92\x4c\x82\x8f\x54\xf2\
\x5b\xf4\x1a\x19\x17\x64\x4d\x36\xb1\x93\xa9\x04\xd0\x64\x10\x3e\
\xe1\xba\xa3\x38\xe1\xd0\x10\x84\xdb\x6e\xbb\x0d\xcc\x72\xac\x0d\
\xfb\x98\x29\x39\x17\x4c\x91\x5b\x9b\x73\xcc\xa9\x47\x69\xe9\x2e\
\xd9\x74\x30\x59\x59\x5d\x32\xd4\xe4\x29\x00\x7f\x34\x84\x0c\x02\
\x78\xa3\x21\xd6\xcf\x9f\xc3\xf9\x95\xb3\x58\xbd\x70\x1e\x6b\x6b\
\xeb\xd8\xd8\xec\x62\xbd\xbb\x85\x8d\xbe\xaa\xbb\xe7\x95\x89\x35\
\x51\x31\x6b\x32\x74\xac\xe9\x43\x1f\xfd\xae\x4c\xac\x29\x6d\x61\
\xc0\x44\x59\xb5\xa0\x71\x60\x8e\x11\xa2\x28\xe9\x76\x5e\xe0\x94\
\x2b\x29\x84\xf5\xfa\x2a\x32\x9f\xc1\x60\x30\x7d\x5a\x9e\x98\xf4\
\x4a\x28\x9b\x0e\xcd\xcc\xd8\xbd\x67\x0f\x4c\xd3\xcc\xcf\x66\xcd\
\x63\x4d\x53\x98\x14\x88\x30\xf2\x3c\x9c\x3f\x77\x2e\x40\xb5\xdc\
\xa5\xba\xea\x43\x0d\x4c\x33\xad\x87\x78\xca\x73\xe5\x7a\x32\xe9\
\xbb\x24\x08\x86\x50\x40\x14\xb2\x26\x65\x11\x37\x61\x19\xa6\x66\
\x4f\x02\x22\x93\xbe\x79\xe6\xfc\x5a\x04\x0e\xd1\x65\xa8\xab\x3e\
\xc4\xd7\x24\xe7\x42\x66\x71\x75\x81\xa4\x9c\x27\x15\x48\xe9\x2e\
\xab\x11\x18\x65\x6e\xd1\x63\x59\x80\x4a\x50\x07\xb5\x7d\x2d\x99\
\x48\x55\x7b\xee\xf0\xc1\xeb\x90\x4a\x49\x4d\xa2\x0d\xa5\x2b\x36\
\x24\xe5\xa8\x2c\x48\x8d\x07\xed\xd3\x12\xde\x58\x23\xc3\x74\xe3\
\xa8\xa8\x9d\x87\x92\xf4\x2c\x98\x02\xf0\xfd\x11\x64\xe0\x63\xa4\
\x2d\xe4\xab\xe7\x2f\x60\x75\x55\xb1\xa6\xcd\xad\x1e\xd6\x36\xb7\
\xb0\x39\x1c\xa1\x9f\xa8\x08\x91\x3b\x5f\x4e\xe9\xb8\x60\x10\x60\
\x0a\x81\xb7\xbc\xe1\x75\xd8\xbd\xff\x80\x8a\x35\x45\x87\x22\x29\
\xb9\x71\x8a\x79\x16\x31\xd6\x54\xfc\x10\x49\xb9\x35\x71\x3e\x64\
\x8d\x2a\x25\xc1\xa9\xaa\xa5\x3c\x29\x1f\x77\xda\x6d\x25\x93\x55\
\x18\xa7\x4f\x9f\x9e\x9c\x00\x3e\xe7\xa9\xba\xd5\x6a\xa9\x62\xbd\
\x3c\xbf\x0d\x07\xbe\x0f\x29\x65\x80\x7c\xf3\xc3\xb4\x72\x44\x75\
\x6c\xa9\x06\xa6\x6d\xb3\xa6\xd2\xf1\xa5\xec\xa2\x4b\x10\xa9\x98\
\x92\x10\x10\xba\x16\x9e\x69\x1a\x68\x3a\x0e\x9a\x5a\x02\x31\x0d\
\x11\xc5\x46\xc2\x37\x9f\x3d\x77\x3e\x5a\x15\x4a\x29\x11\x04\x41\
\x64\x7b\x4d\x25\xdc\x32\xe2\x88\x43\x69\xa7\x97\x2e\x7b\xa3\x19\
\x94\x4c\x48\x7a\x52\xa6\x6f\x63\xa0\xa5\xe3\x49\x60\x19\xb9\xed\
\x38\x59\x79\x42\x4f\xb4\xfb\x76\x2d\x43\x18\x22\x51\x74\x8c\x53\
\xf2\x5b\x2c\xe7\xc5\xfb\x17\xb3\xb7\x98\xb1\xc9\xac\x1b\x2d\x35\
\x59\x8e\x83\x12\xe5\xf4\x9c\x0a\x19\x66\xc3\x71\xb0\xd8\x6a\xc2\
\x12\x04\x19\x04\x08\x3c\x0f\xbd\xee\x26\x56\xcf\xad\x60\xf5\xc2\
\x05\xac\xad\xad\x61\xb3\xbb\xa5\x25\xbd\x3e\xfa\xd3\x58\x53\xa6\
\xe1\x5e\x6e\xac\x49\x08\xec\x5d\xe8\xe0\xed\x1f\xf8\x20\xbc\xd1\
\x30\x4f\x0b\x8b\x17\x13\x28\x90\x65\x73\xcc\x29\x48\xc4\xfd\x62\
\x60\xcf\x91\xf4\x12\x3b\x3a\x09\x9c\x8a\x67\x46\x9e\xb2\xa6\x67\
\x58\x96\x55\x39\x1d\xa9\xdf\xef\x6f\x53\x4b\xab\x36\x8f\x47\x75\
\xf2\x80\x99\x6c\xe2\xd9\xc7\x88\x08\x9b\xdd\x2e\x30\x7b\xf1\xd6\
\x9a\x2d\xd5\xc0\xb4\x6d\xd6\x54\x05\xa0\x64\x32\xef\x28\x4c\xae\
\x0d\x2d\xcf\x82\x84\xaa\x04\x61\x9a\x70\x2c\x13\xae\x65\x6a\xe3\
\x83\x8a\x2d\x19\x1a\xa0\x8e\x1d\x3f\x0e\x61\x18\x30\x6c\x17\x20\
\x01\x32\x2c\x98\x4e\x13\x9b\xdd\x2e\xd6\x56\xd7\xa0\x16\x6a\x89\
\xd5\x7a\xb2\x24\x51\xde\xc4\x26\x33\x31\x0c\x99\x91\xe7\x42\x59\
\x8f\xd3\x60\x94\x05\xa7\xe8\xdf\xfa\xf4\xb0\x6c\x3b\x55\x7d\x20\
\x3c\x42\x2d\xd7\x86\xa1\x7b\xdf\xe4\xda\x1d\x88\x10\x04\x12\x2b\
\x2b\xe7\x71\xee\xdc\x05\x74\xbb\x5b\xf0\x3c\x4f\xb3\x38\xbd\x3f\
\x81\x54\x37\x19\xa4\x1b\xea\x8d\xfd\x4c\xe3\x4d\x78\xb2\x95\x24\
\x14\xe8\x33\x5c\xdb\x82\x25\x08\xbe\xe7\x41\x06\x01\x46\x7d\xcd\
\x9a\xce\x9d\xc3\xda\xea\x1a\x36\x36\x36\x55\x45\x88\x6e\x1c\x6b\
\x0a\xb8\x7c\x7a\x3e\x15\xb0\xa6\x77\x7f\xdd\xdb\xd1\x59\x5a\xce\
\x00\x78\xc2\xfd\x98\x5c\x64\x4c\x88\x31\x8d\x55\x2a\x4f\xca\x9f\
\x99\x5c\xb4\x58\xd2\xcb\xec\x77\x2e\x38\xf1\x64\x70\x9a\x34\xa1\
\xeb\xb6\x2e\xb9\xc7\x23\x99\x73\x86\x98\x29\x3e\xf9\xe4\x93\x93\
\xd9\xcb\x1c\xf2\x6e\x29\xb1\x8b\xcb\x51\x39\xa2\x22\x71\xae\x9c\
\xe1\x21\xfc\x0e\x89\xdd\x2b\x53\xbc\xb5\x6c\x82\x6d\x3d\x4a\x8c\
\xab\xb1\xb5\x3a\x26\xc4\x91\x80\xb2\x6d\x30\x32\x17\x95\x8a\x29\
\x99\xca\x89\xa7\xa5\xbb\xd0\xe4\x30\xd6\xe6\x9b\x80\x61\x20\x01\
\xc3\xc4\xe2\x81\x83\xf0\x86\x23\xb8\x8b\x7b\x22\xab\xb3\xef\x8d\
\xb0\x35\x1c\x61\xe4\x07\x2a\x4e\x65\x1a\x70\x6c\x2b\xaa\x0c\xc1\
\x48\x37\x99\x2b\x5a\xf4\xa9\x92\x7e\x1a\x40\x49\x57\xa5\x06\x01\
\xac\x2b\x57\x83\xc0\x4c\x63\xf6\xed\x64\x12\x6b\x36\xb1\x17\x0c\
\x48\x66\x04\x92\xe1\x5a\x16\xdc\x66\x0b\x5b\xeb\xab\x40\xb2\x72\
\x77\xa2\xdf\x53\x10\x78\xe8\x6d\x6d\x42\x18\x26\x06\xfd\x1e\x84\
\x2e\xd3\x64\x9a\x06\x2c\xd3\x42\xa3\xd1\x50\x7d\xa8\x44\x72\x3f\
\x44\xb4\x64\xd2\x2d\x05\xe3\xef\x52\x62\x9a\x62\x56\x65\x93\x46\
\xc1\x08\x41\xe0\x43\x04\x02\x83\xad\x2d\xac\x9e\x5b\x41\x67\x71\
\x11\x8b\x8b\x8b\xe8\x74\xda\x68\x35\x5d\x6c\xf4\x5a\xe8\xb8\x0e\
\x6c\x21\x60\x18\x25\xda\xb0\x53\x7e\x6c\xcc\x12\x02\x07\x96\x16\
\xf0\xca\xaf\x7e\x33\xfe\xea\xbf\xfd\x21\x2c\xc7\x49\xcb\x64\x09\
\x49\x93\x98\x52\x0b\x0a\x2a\x00\x27\x05\xbc\x9c\xea\x02\xc6\x89\
\xbe\x57\x71\xb3\x46\xfd\x78\x58\x81\x1c\xe1\x4f\xce\xe3\x7e\xfd\
\x44\x8b\x76\x2a\x04\xa7\xf1\x27\x55\x12\x71\x7e\xa1\xa6\x81\xe7\
\x63\x63\x30\x82\x20\xa0\x19\xa6\x44\x18\x06\x9e\x7a\xf2\x49\x48\
\x29\x61\xe4\xed\xc7\x9c\xb5\x3d\x02\xb0\xb4\xb4\x3c\xe3\xcc\x50\
\xb0\x7f\x44\x38\x73\xe6\x2c\xb0\x7d\xab\x78\x6d\x86\xa8\x81\x69\
\x66\xb0\x2a\xc3\x9a\xe2\x93\x8f\xe3\x69\x82\x19\x10\x86\xa1\x62\
\x4b\xa6\xa9\xcb\x0b\xe9\x1a\x7a\xd1\x64\xab\x8c\x0f\xcc\xc0\x6a\
\x7f\x84\xcf\x3d\xfa\x34\xae\x3d\x78\x10\xff\xf8\x13\x3f\x85\x47\
\x1e\x7a\x18\xf7\xdf\xf1\x45\x9c\x3b\x79\x1c\x76\xd0\x04\x4b\x89\
\xc0\xf7\x10\xf8\xaa\xf7\xd0\x30\x08\x20\x3d\x15\xcc\x37\x00\x05\
\x52\xc9\xa4\xdb\xdc\x05\xaf\x9e\x80\xc6\x00\x0a\xba\x9d\x82\x06\
\xa7\x44\x45\x6f\x35\xb9\x51\x3a\x36\x44\x49\xd7\x7a\xcc\x64\x24\
\x33\x5a\xb6\x85\xc5\xdd\x7b\xd0\x5d\x5f\x8d\x19\x53\x26\x17\x49\
\x95\xdc\x61\x90\x11\x37\x45\x1c\x0e\x87\x18\x8d\x08\x40\x1f\xc2\
\x10\x70\x6c\x07\xa3\xd1\x00\xa6\x69\x29\x30\x17\x0c\x82\x50\xf1\
\x02\x12\x09\x49\x2f\x0f\x9c\xc6\x9d\x09\xaa\x2a\x84\x8d\xa1\xef\
\xa3\x37\xf2\x60\x18\x06\x7c\x6f\x84\xcd\xd5\x0b\x58\xbf\x70\x1e\
\x1b\xbb\x96\xb1\xb9\xd8\x41\xbb\xd9\xc4\xda\xe6\x16\x16\x9b\x0d\
\x38\x86\x80\x29\x8c\xf4\xca\x3f\x7d\x28\x27\xe2\x93\xd0\x79\x4d\
\x1f\xfc\xc6\x0f\xe2\x6f\xfe\xe4\x8f\x91\xed\x90\x1a\x37\xf6\x8b\
\xc1\x28\x69\xd7\x27\xfd\x7b\xa6\xda\x66\x24\x41\x89\x78\x8c\x3c\
\x87\x79\x5c\xc4\x14\x2f\x3c\x32\xe0\x84\x4c\xa7\xe1\x98\x3d\x15\
\x81\x53\xfc\x7c\xf8\x81\x81\x94\xb8\x66\xff\xbe\xb1\x66\x8b\x04\
\x42\xcf\xf3\x70\x6c\xa3\x87\x20\x3c\x46\x03\x0f\xb6\x10\x58\x72\
\x4c\xdc\xf6\xca\xd7\xe3\x9a\xbf\xf8\x1b\x6c\x5c\x38\x87\x41\xaf\
\xa7\xbe\x97\x08\x7f\x57\xda\x06\x04\xe5\xd2\x36\xec\xda\xbd\x2b\
\xfd\x73\x65\x81\xba\xe8\xb1\x82\x9f\x9a\x00\x1c\x3f\x76\x0c\x98\
\xec\xc6\x2b\x53\xbc\xb5\x66\x4c\x35\x30\xcd\x24\xe9\xcd\xd0\xfe\
\x82\x53\x55\xc0\xa3\xdc\x25\xa1\xee\x27\x2b\xee\x84\x6c\xc9\x93\
\x8c\x27\x56\xd6\x70\xcf\xe3\x4f\xc3\x34\x95\x59\xe2\x39\xd7\x1e\
\xc0\xc1\x6b\x0f\xe0\xcb\xbe\xec\x4b\x71\xc7\x1d\x77\xe1\xfe\x2f\
\x7e\x11\x17\xce\x9e\x86\x29\x25\xa4\xef\xc3\xb4\x1d\xc8\xc0\x47\
\xe0\xf9\x08\x28\x40\x20\x03\xb0\x2f\xe1\x7b\x23\x98\x82\x60\x99\
\x46\xaa\x78\xeb\xf8\x55\x96\x06\xa8\x10\x7c\xb2\xe0\xa4\xaa\x36\
\x84\xf8\xa5\xfb\x00\x85\x72\x06\x73\xae\xed\xd7\x34\x04\x76\xed\
\xd9\x8b\x13\x4f\x3e\x96\x9b\x38\x1b\x25\xc1\x72\x46\xf6\x49\x24\
\xcc\x7a\x01\xe3\xa5\x5f\xf1\x95\x78\xfc\xde\xbb\xb0\xb5\xbe\xae\
\xac\xf3\xcc\x10\xcc\x60\xa1\x5a\xcf\x93\x20\xad\x3a\xeb\xda\x7c\
\x25\x0c\x62\xcc\x80\x63\x9a\xf0\x02\x15\xbb\x13\x81\x8f\xd1\x60\
\x80\xb5\xf3\xe7\xb1\xb6\x7b\x37\x16\x16\x17\xd1\x69\xb7\xb1\xde\
\x6d\xe0\x42\xab\x81\x86\x6d\xc1\x31\x14\x6b\xe2\x8c\x44\x44\x25\
\x59\x93\x29\x08\x37\x5f\x7b\x00\xcf\x7d\xf1\x4b\xf1\xf0\xdd\x77\
\xa9\xca\x07\x99\x08\x50\x0c\x22\x09\x20\xca\xf4\x70\xa2\x24\x78\
\x8d\xb1\xa6\xa8\xb3\x7a\x1a\x60\x52\xe4\x38\xcd\x00\x78\x0a\x38\
\xe5\x4f\xf7\xf1\x06\x99\x25\x96\x97\xc6\x9b\x04\x06\x52\xe2\xa9\
\x0b\x1b\xf0\x58\x81\xb2\xd0\xe7\x90\x0f\xe0\xdc\x30\xc0\x57\xbd\
\xe1\x0d\xf8\x8a\x57\xbe\x1a\xab\x9b\x9b\xb8\xf7\xbe\xfb\xf1\xbf\
\xfe\xf0\x0f\xf0\xd8\x3d\x77\xe0\xc2\x99\xd3\x90\xb9\xfb\x34\x3b\
\x50\x09\x22\x34\x1b\xcd\xb9\x1a\x1f\x40\x84\xa3\x47\x9f\x09\x19\
\x53\x80\x72\xc5\x5b\x65\xc1\x22\xb7\x1e\x75\x8c\x69\x22\x18\xf1\
\x36\xc1\x49\x02\x60\x32\xcc\x28\xb9\x34\xca\x57\xd2\xa0\x24\x88\
\x60\x18\x22\x5a\x61\x0a\x02\xfa\x7e\x80\xcf\x3c\xf2\x34\x3e\xf7\
\xc0\x23\x2a\xe0\x1f\x48\x04\x81\x84\xe7\x07\xf0\xfc\x00\x9d\x4e\
\x1b\x6f\x78\xfd\x6b\xf1\xed\xff\xf4\x1f\xe3\xfd\xdf\xfe\x1d\xd8\
\x7f\xf0\x30\x2c\xb7\x81\x46\x7b\x01\x8d\xf6\x02\xdc\x56\x1b\xed\
\xa5\x5d\x68\x2e\xee\x02\x2c\x17\x30\x1d\x04\x64\x62\x14\x00\xbd\
\xe1\x08\x9e\xe7\xa3\xb0\xf5\x82\x94\x19\x2b\xb8\x8c\x6d\xe5\x51\
\xec\x29\x63\x8a\x08\x64\xdc\x02\x1d\x48\x54\x32\x50\xc5\x32\x25\
\x33\x4c\x41\xd8\xb5\x6f\x9f\x5e\xf1\xa7\x6b\xe5\xa5\x8a\xb5\x86\
\x80\x25\x84\x02\x40\x11\x03\x79\xbf\xb7\x85\xcf\x7f\xfa\x53\xb8\
\xed\x4b\xbf\x02\x86\x65\xeb\xea\x0d\x3a\xee\x14\x04\x3a\xde\x95\
\x67\xa7\x46\xa6\x3c\x4f\x16\x98\x18\x0d\xd7\x81\x65\x08\x04\x3a\
\xd6\x14\xf8\x1e\xba\xeb\x6b\x58\xbf\x70\x01\xeb\xda\x3a\xbe\xa5\
\x7b\x36\x6d\x0e\x86\x18\xe9\xbc\xa6\x59\x54\x26\xd2\x93\xa3\x63\
\x9a\xf8\xd6\x8f\x7e\x54\x75\x37\xce\x8d\xef\x24\x12\x99\x73\x92\
\x6f\x93\x95\xdc\xb3\xf1\xa5\x6c\xd2\x2d\xf3\x78\xec\xb1\x28\xc6\
\x94\x9f\x4f\x54\xc2\x14\xa1\x3f\xdf\x75\x9c\xc4\x57\x51\x8f\x9d\
\x5a\xdb\xc0\xd9\x8d\x2e\x06\xc3\x11\x86\x9e\x0f\x3f\x90\x08\x02\
\x46\x10\xc4\x6c\xb0\xd9\x70\x70\x70\xff\x5e\x7c\xed\x57\xbf\x1e\
\xff\xfd\xff\xfd\x5d\x3c\xf1\xc4\xe3\xf8\xdb\x07\x1e\x9a\xa3\x7b\
\x4e\xed\x8b\xed\xd8\x38\x7c\xf8\x50\xf4\x3d\xf3\x2c\xe1\xa8\xf8\
\x18\x01\xb8\xf3\x8e\x3b\x31\x05\x90\xca\x54\x17\x9f\x8f\x5e\x59\
\x33\xa6\xab\x0a\xa0\x78\xc2\xf3\x45\xb4\x5d\x1e\x7d\xf0\x6e\xbe\
\xe9\xcb\x5e\xad\xa6\x5e\x41\x2a\x8f\x29\xc1\x98\x4c\xc3\x88\xba\
\xd6\x0e\xbc\x00\xff\xeb\x8b\xf7\xe1\xdc\x85\x55\xb8\xae\x0b\xc0\
\x83\x61\xa8\x38\x94\x61\xa8\x1c\x27\x66\x82\x24\xa0\xd9\x6c\xe0\
\x05\xb7\x3f\x17\x37\x5c\x7f\x18\xcf\x1c\x39\x86\x4f\xfe\xc5\x5f\
\xe0\xfc\xa9\x53\x30\x6c\x07\xac\x27\x57\xdb\x6d\x40\xca\x00\xfe\
\x68\x04\x6f\xd8\x07\x81\x10\x68\x90\xf1\x7d\x1f\x26\x01\x96\x69\
\x80\x29\xce\x8f\x52\xd2\x50\xcc\x60\x54\x19\xa4\x50\x5a\xd2\x8f\
\x6b\xc9\x31\x92\xf7\x98\xe3\x9a\xac\x22\xdb\x21\x55\x81\xd1\xc1\
\x43\x87\xd5\xfd\x4c\xe2\x6b\x76\xe5\x29\x84\x02\x24\xe4\x94\x23\
\x1a\xf6\x7a\xf8\xd4\x9f\xfd\x09\x4c\xd3\xc0\x9e\xbd\x7b\xb1\x79\
\xfe\x1c\x4c\xcb\x02\x25\xd6\x4d\x02\x00\x84\x88\xf2\x97\x38\xfc\
\x3f\x53\x52\xa5\x1c\x9b\x8c\x43\xd6\x24\x83\x00\x32\x50\xd2\xe8\
\xfa\xf9\xf3\x58\x5b\x5e\x56\xac\xa9\xd3\x46\xbb\xd5\x40\xb7\x3f\
\xc0\xa0\xe1\xc2\x16\x02\xc2\x20\x18\x93\x95\xbc\x7c\x39\x0f\x2a\
\xf1\xf8\xc5\xcf\xbb\x15\x07\x0e\x1e\xc2\xb9\x33\xa7\x21\x48\xe8\
\xe3\x9b\x95\xf3\x28\x15\x5b\x1a\xbf\x9f\x78\x0f\x11\xb2\x9d\x6a\
\xc3\xb8\x1b\x47\x71\x38\x8e\xf2\xe1\x62\x67\x5a\x79\xe6\x54\x74\
\x0c\xc3\x6f\x1a\x26\x0f\x87\xd0\xe8\x79\x3e\xee\x3b\x76\x0a\x12\
\xca\xe0\x62\xf9\x3e\x2c\x43\xd7\x87\x34\x0d\x48\xd6\x31\x56\xa9\
\xb6\x78\x70\xd7\x02\x5a\xda\xd9\xf7\xa2\xeb\x0f\xe3\x8d\xef\x7e\
\x0f\xfe\xf2\x0f\xff\x2b\x84\x61\x64\xbc\xf9\x33\xcc\xdb\x71\x55\
\xe0\xa9\x17\x3d\x55\x78\x8c\xc1\x38\x77\x6e\x85\x51\xce\x95\x37\
\x2d\xc9\xb6\x06\xa4\x9a\x31\xed\xa8\x9c\x17\x36\xe0\x91\xc9\x55\
\x68\x58\xdf\x4e\x50\xcc\x94\x4c\x43\x20\x90\x8c\xcf\x3e\xfa\x34\
\x1e\x7f\xf2\x29\x0c\x06\x03\xf4\x7a\x3d\xf4\xfa\x7d\x0c\x06\x43\
\x0c\x47\x1e\x46\x23\x0f\x9e\xef\xc3\x0f\x54\x3b\x86\x90\x45\x35\
\x5c\x17\x2f\xb8\xfd\x36\x7c\xf8\xa3\xdf\x89\xf7\x7d\xe4\x23\xd8\
\x77\xdd\x41\x18\xb6\x03\xbb\xd1\x82\xd5\x68\xc2\xb4\x1d\xb8\xed\
\x0e\x5a\xcb\x7b\xd0\xde\xbd\x0f\xee\xc2\x2e\x90\xd3\x04\x59\x0e\
\xa4\xb0\x30\x92\x84\xfe\xd0\xc3\xc8\xf3\x52\x2b\x72\x99\xb0\x83\
\x2b\xcb\x76\xc2\xba\xad\xd9\x89\x0c\x42\xeb\xba\x8c\x40\x4a\x84\
\x05\x5a\x13\xe6\x07\x00\xb8\xfe\xf0\xc1\xd4\x6a\x93\x12\xbd\xd5\
\x63\x39\x53\x80\x0c\x23\x66\x4a\x1a\xa4\xc2\xa2\xaf\x61\xcb\x73\
\xdf\xf7\xf1\x9e\x8f\xfc\x23\xbc\xf4\xd5\xaf\xc3\xa0\xdf\x4b\xe4\
\x59\x05\x09\xe7\x60\x51\xee\x53\x66\xa2\xd2\xf1\x97\xa6\xeb\xc0\
\x36\x8c\xc8\xa1\xe7\x7b\x23\x6c\x46\xac\x69\x0d\x9b\xdd\x2e\x7a\
\xfd\x01\x36\x7b\x7d\x74\x87\x23\x8c\x82\xa0\xb8\x99\x20\x4f\x0e\
\x75\x84\x65\x8a\x16\x5c\x17\x6f\xfc\xba\x77\xc4\x55\xe3\xc7\x80\
\x20\x99\x30\x9b\x65\x4b\x3c\x56\x6f\x2f\xd9\x57\x24\xc5\x9a\x52\
\xb9\x4d\xe9\xf8\x62\x11\x63\x28\x66\x4e\x13\x8e\x27\x33\x76\x2f\
\x2f\xc5\xc4\x4c\x4a\xf4\x06\x03\x9c\x59\x39\x87\xf3\xab\x6b\x58\
\xdb\xd8\xc4\xc6\xe6\x16\x36\x7b\x7d\x6c\x6c\xf5\xb0\xd6\x55\x56\
\xfc\xee\x60\x88\xad\xe1\x08\x6d\xd7\xc6\x42\x68\xde\xd1\xe7\xc4\
\x4b\x5f\xfe\x15\xe5\xaa\x42\x94\xb9\x88\x99\xb1\xb0\xb0\x50\x5c\
\x27\x6f\xc6\xc7\x98\x81\xb5\xd5\xd5\x69\x7d\x98\xa6\xb9\xf2\x6a\
\xb6\x54\x33\xa6\x8b\x0d\x4e\x48\xd9\xa8\x95\x4d\x9c\xa2\x09\x5c\
\x90\xc0\xb9\xcd\x2d\xfc\xcd\x27\x3f\x0d\xcb\x76\xc0\x0c\x0c\x87\
\x23\x98\x96\xea\xdb\x64\xdb\x2a\xc7\xc9\x32\x4d\x18\xa6\x91\x62\
\x50\x52\xe7\xf7\x34\x1a\x0e\x9e\xff\xbc\x5b\x71\xfd\xe1\x83\x38\
\x72\xf4\x04\x3e\xf5\x57\x7f\x8d\xf3\xa7\x4f\xc1\xb4\x5d\xb0\x54\
\x2e\x3e\xc3\x30\x61\x39\x0d\xd8\x8d\x96\x32\x4d\x8c\x86\xf0\x86\
\x03\x48\x1a\x42\x72\x80\x61\xc0\x08\xfc\x11\x2c\x21\x60\x59\x06\
\x98\xb5\xd9\x21\x65\x7e\x48\xf7\x74\x62\x32\xc0\x01\xc3\xd1\x2c\
\x07\x94\x9d\xc7\xd4\xeb\xae\xdd\xb7\x37\xdd\xc1\x36\x85\x50\xa1\
\x31\x84\x60\x18\x66\xc2\xe2\x4d\x63\x20\xa6\x3e\x5f\xe2\x3f\xff\
\xdb\x7f\x83\x7f\xf9\xef\x7f\x1b\x1b\xab\x17\xf0\xf8\xfd\xf7\xc0\
\x72\x5c\x08\x29\x21\xb5\x35\x5c\x44\x52\x97\x48\xf7\x6a\x4a\x2c\
\x10\x92\x50\xc1\x50\x75\xf4\x46\x41\x10\xb1\xa6\xd1\xa0\xaf\x4c\
\x10\xbb\x77\xa3\xbb\xb9\x0b\x5b\x8b\x7a\x42\x6d\x36\xd1\xb4\x2d\
\xd8\x86\x01\xa3\x24\x6b\x1a\x5b\xe9\x69\xeb\xf8\xd7\x7e\xcd\x5b\
\xf0\xff\xfe\xf6\x6f\x8e\xb3\x96\x70\xcf\x42\x39\x8f\x58\xef\x25\
\xc6\x62\x4e\x88\x4c\x10\x31\x63\x4a\x7e\x63\x45\x74\x72\xd8\x55\
\xca\x85\x59\x96\x39\x65\x62\x56\x69\xb1\x0c\x7b\x77\xef\x02\x10\
\xe6\x9c\x01\x67\x2f\xac\xe2\xa9\xa7\x9f\x41\xbb\xb3\x80\x66\xbb\
\x8d\x66\xa3\x01\xd7\x75\x61\xdb\xaa\x0f\x99\x65\x99\xb0\x2d\x0b\
\x00\xe1\xf6\x6b\xf6\x6a\x55\x20\x3e\x88\xbb\x76\xef\xce\x99\xaa\
\x67\x9f\xb7\xfd\x20\x80\x61\x1a\x33\x31\xa4\xa2\x11\x04\x01\x36\
\x36\x36\xa6\x81\xd2\x34\x8b\x78\xcd\x96\x6a\x60\xaa\x2c\xe5\x55\
\x2d\xe0\x1a\x9d\x88\x32\x08\xa4\xdf\xdf\x82\xb9\xb0\x14\x33\xa6\
\x90\x0d\xe8\x18\x93\x6d\x1a\x78\xf8\x99\xe3\x38\x71\xf4\x28\xda\
\x0b\x0b\xb0\x1d\x17\x8d\x56\x13\x8d\x46\x13\xbe\xeb\xab\x89\xd2\
\xb6\xe1\x79\xca\x39\x66\xea\xc4\x5c\xd3\x30\xa3\x9a\x5f\xcc\x04\
\x29\x95\xc6\x7f\xfb\x73\x6f\xc6\xe1\x43\xcf\xc1\x91\xe3\x27\xf0\
\x99\xbf\xfe\xdf\x38\x7f\xfa\xb4\x32\x47\xf8\x3e\x7c\x6f\x04\x61\
\x5a\x30\xa5\x0d\xe9\xb8\xb0\x9b\x2d\x04\x9e\x07\x3f\x02\x29\x81\
\x80\x25\x64\xc0\x10\x2c\x61\x99\xda\x36\xce\x9c\xf0\xbe\x33\x60\
\xda\x10\x76\x03\x86\xd3\x84\xd3\x6a\x01\x0c\xf8\x9e\x07\x5f\xb7\
\xc8\xce\x74\x3a\xc7\xee\xc5\xce\x98\xa1\x21\x79\x98\x4d\xdb\x86\
\x61\x39\x8a\x31\xa5\x64\x97\x71\x30\x33\x0c\x03\xeb\x17\xce\xe1\
\x37\x7e\xed\xd7\xf0\x33\xbf\xf4\xaf\xf0\xd1\x0f\x7e\x3d\xba\x1b\
\x1b\x20\xc3\x50\xcd\xf4\x24\xa2\xa9\x1b\x22\x34\x07\xa4\xa8\x5a\
\x2e\x40\x35\x1b\x0e\x46\x7e\x80\xad\x91\x07\xa1\xd9\x53\x77\x7d\
\x1d\x9b\x6b\x6b\xd8\xdc\xd8\x44\x77\x6b\x0b\x9d\x76\x0b\x9b\xbd\
\x3e\x7a\xad\x06\x5a\xb6\x05\x5b\x18\xa5\x4c\x16\x94\x43\xa4\x0c\
\x41\x78\xce\x9e\xdd\xb8\xed\x4b\x5e\x84\x47\xef\xbd\x57\xc9\x55\
\xa9\x55\x39\x69\xc7\x1d\x29\x5f\x43\xe8\xcc\xe3\xb4\x23\x8f\x32\
\x35\x0b\x63\x6b\x78\xe2\xb3\x99\xa2\xfc\xad\xb4\xa4\x87\xb4\x3c\
\xb7\x0d\x70\x22\x50\x54\xea\x27\x8c\xf7\x9d\xbb\xb0\x8a\xa7\x9f\
\x78\x1c\x4b\xbb\xf6\xa0\xd9\xee\xa0\xd5\xe9\xa0\xd9\x6c\xa2\xd1\
\x68\xa0\xd1\x50\x5d\x9c\x2d\xd3\xc4\x9e\xe5\x45\x34\xc3\xfa\x75\
\x14\x1f\xaf\x53\x27\x4e\xcc\x89\x4c\x28\xf9\xb2\xd9\x68\xc2\xb2\
\xac\x98\x61\x52\x79\xd1\x2e\xfd\x0c\x47\x71\xd1\xe1\x70\x88\xde\
\xd6\x56\x50\x11\x94\x50\xb3\xa5\x1a\x98\xb6\xc3\x90\xf2\x18\x13\
\x26\xac\x78\x52\xd4\x5d\x06\x01\x07\x83\x2d\x60\x71\x39\x2a\x43\
\x13\x82\x93\x21\x84\xb6\x91\x33\x4e\x9c\x3e\x83\xf3\x67\x4e\x63\
\x34\x1c\xc2\x6d\x36\xd1\xdb\xda\x82\xed\x38\x70\x5c\x57\xad\x30\
\x1d\x1b\x8d\x46\x13\xae\xeb\x46\xab\xcc\xc0\x94\xf0\x83\x20\x2a\
\x6d\x64\x18\x06\xa4\x64\x04\x52\xc2\x71\x6c\xdc\x7e\xeb\x4d\xb8\
\xfe\xe0\x75\xb8\xe3\xce\x7b\xf1\xc5\xbf\xfd\x0c\x86\xfd\x3e\x1c\
\xdb\xd6\x01\x7e\x5f\x49\x5f\xbe\xa7\x80\xca\x76\x60\x37\x9a\x08\
\x7c\x0f\xde\x70\x80\x51\xbf\x0f\xcf\x1f\x82\xa5\x80\x0c\x7c\x10\
\x18\x96\x21\x00\x61\xc2\x5e\xd8\x8d\xa5\x03\xcf\xc1\xee\x6b\xae\
\xc3\xde\x03\xfb\xb1\x6b\xcf\x1e\x18\x86\x80\xa9\x19\x5d\x18\x23\
\x0a\x13\x46\x09\xc0\x72\xbb\x09\x61\x18\x99\x9a\x79\xb1\x14\x65\
\x5a\x0e\x4c\xb7\x51\x22\xd0\xad\x9e\xb7\x6c\x07\x77\x7c\xf2\xaf\
\xf0\x85\x7b\xde\x83\x1f\xfa\x99\x5f\xc0\x8f\x7e\xf4\xc3\x70\x9b\
\x2d\x40\x4a\x05\x4a\x24\xb5\x12\x16\xda\xd9\xd3\x49\xbd\xe3\x13\
\xae\xae\x3e\x6e\x6b\xd6\x24\x03\x70\x10\xc0\x1b\x0e\xb1\xb1\xb6\
\x86\xcd\x8d\x75\x74\xbb\xcb\xe8\x2d\x74\xb0\xd5\xef\x63\x6b\x38\
\xc2\x42\xc3\x81\xab\xcd\x2b\x13\xad\xe3\x05\x21\x91\xd0\x04\xf1\
\xb6\x77\xbf\x1b\x0f\xde\x79\x07\x1c\x0d\x4c\x31\x87\xe1\x44\x7c\
\x8f\x73\x63\x4d\x88\xec\xe2\x1c\xb9\xec\x92\xa5\xab\xa2\x09\x95\
\x90\xda\x5e\x0a\x54\xc2\xf7\xa5\x23\x53\x25\xc1\x09\x9a\xa9\xa9\
\xf3\xba\xe1\xba\xd1\x6f\x2a\xa5\xc4\x89\x93\x27\x71\xe4\xd1\x47\
\xb0\xb6\x7b\x0f\x9a\x9d\x45\xb4\x16\x16\xd0\xea\x74\xd0\x6a\x77\
\xd0\x6a\xb7\xd1\x6c\x36\x61\x18\x06\x0e\xee\xdf\x0d\x43\x50\xea\
\x70\x49\x66\x7c\xe6\x2f\xff\x42\x7f\x07\x9e\x1c\x3a\x2a\xf1\x20\
\x33\x63\xf7\x5e\x55\x27\x6f\x4c\x8e\x43\xa2\x30\x49\x95\x00\x93\
\x66\x61\x53\xe2\x4b\x55\x12\x6c\xeb\x51\x03\xd3\xb6\x19\x54\x49\
\xf6\xa4\x63\x2e\x89\x52\x3e\xa1\x23\xcf\x34\x0d\x30\x80\x1b\x0e\
\x3d\x07\xe7\x4e\x9d\xc4\xa0\xd7\x83\xd3\x6c\xc1\x6d\xb5\x14\x10\
\x35\x1b\x70\xdc\x06\x1c\xd7\x41\xaf\xbb\x05\xcb\xb6\xe1\x38\x0e\
\x1c\xd7\x51\xab\x4e\xd7\x45\x10\x58\x30\x4d\x43\x9b\x29\x4c\x18\
\x86\x02\x06\xdf\x27\x58\xa6\x89\x57\x7d\xe5\x97\xe3\xd6\xdb\x6e\
\xc6\xa3\x8f\x3e\x81\x3b\xfe\xee\xef\x30\x1a\x0e\x60\x58\x96\x96\
\xac\xec\x48\xba\x0a\xbc\x11\x68\xa4\xe2\x3a\x96\xe3\x2a\x26\xe5\
\x0d\x21\x47\x23\x80\x08\xcd\x3d\xfb\xb0\x7c\xe0\x3a\xec\x7b\xce\
\x21\xec\x3d\x70\x00\xbb\xf7\xec\xc1\xee\xdd\xcb\x58\x5c\xe8\xa0\
\xd3\x6e\xa9\x26\x87\x8e\x03\x10\xc3\xb5\x6d\x38\xb6\x19\x4d\x78\
\xae\x69\x2a\x16\x32\x0a\x10\xb7\x13\x54\x87\x4f\x18\x26\x0c\xcb\
\x4e\x37\x0f\x04\x30\x56\xaa\x20\x33\x9c\x66\x13\x3f\xff\xf1\xef\
\xc3\x9f\xfe\xef\x4f\xe2\xd5\x6f\x7e\x1b\x3e\xfb\x7f\xfe\x0a\xa6\
\x65\xab\x24\x4f\xd5\x3b\x18\x82\x64\x64\x20\x48\xcd\x29\x89\x8a\
\xe6\xe1\xa4\xcd\x4c\x68\x3a\x9a\x35\x0d\x7d\x48\x43\xc7\x9a\xd6\
\x56\xb1\xbe\xba\x8a\x8d\xdd\xbb\xb1\xb4\xb4\x84\xde\x60\x80\xde\
\x60\x08\xcf\x6f\xc1\xb7\x18\x06\x53\x4a\xc5\xac\x66\x82\x20\x7c\
\xc5\xcb\xbe\x14\x6e\xa3\x09\x29\x83\x14\x8b\x49\x32\x93\xd0\x3a\
\x9e\x4d\xb2\xcd\x5a\xc7\xe3\x4a\x04\xa1\xc5\x3b\xc1\x73\x39\xae\
\x15\x18\x4a\x7a\x1c\x81\x6a\x82\x15\x24\xd2\x07\x52\xe0\x84\x02\
\x6a\x18\x02\xa1\x20\x98\x86\x11\x95\x8e\x92\x52\xc2\x24\x60\xe5\
\xc4\x31\x6c\x5c\x38\x0f\xbb\xd1\x84\xdb\xea\xa0\xb5\xb0\x88\xf6\
\xc2\x02\xda\x8b\x4b\x68\x2d\x74\x60\x18\x26\x5e\xf7\xe5\x2f\x1e\
\xdb\x74\xdf\xf3\xf0\xd0\xdd\x77\x25\x0c\x21\x05\x17\x65\x6a\xd1\
\x41\x13\x2e\x5e\x46\xb3\xd9\x8c\x24\xf0\x69\xa2\xdd\x74\x8c\x62\
\x10\x09\x6c\x6d\x6d\x61\x4a\x7c\x69\x5a\x82\x6d\xcd\x96\x6a\x60\
\xba\x28\x60\x94\x73\xe2\xc5\xe6\x01\xa9\x2d\xd9\x44\x14\x35\x55\
\xfb\x92\x1b\x0e\x62\xef\x35\xd7\xe2\xf8\x53\x4f\xc0\x6d\xb6\x61\
\xb9\x2e\x9c\x46\x03\x8d\x56\x0b\x8d\x66\x0b\x8e\xdb\x80\xed\x3a\
\x70\x1b\x0d\x38\x8e\x0b\xb7\xd1\x40\xbf\xd7\x53\xac\xca\xb6\xd1\
\x68\x2a\xed\xde\x32\xa5\xae\x2e\xa1\xe4\xc2\x40\x4a\x50\x10\x60\
\xcf\xae\x65\xec\x7f\xe5\xcb\x71\xfb\xed\xb7\xe1\xfe\x07\x1e\xc6\
\x9d\x7f\xf7\xb7\x30\x4c\x2b\x2e\xf1\x23\x25\x58\x36\x54\xec\x49\
\x4b\x7b\xfe\x68\x08\xcb\x6d\xa0\xb9\xb0\x84\xdd\x07\xae\xc5\x81\
\x83\x07\xb1\xef\xc0\x01\x2c\x2d\x2d\x62\x69\x69\x11\x8b\x9d\x36\
\x5a\xad\x06\x9a\xae\x0b\xd7\xb1\xe1\x58\x26\x1c\xcb\x8a\x1b\x1d\
\x1a\x2a\xbf\x68\x73\xe8\xc1\xf3\x03\x1c\xba\xe5\x79\x78\xf8\xce\
\xcf\xab\x92\x35\x64\x80\x4c\x1b\x06\x03\x86\x2d\x20\x0c\x4b\xd5\
\xdc\xcb\x5c\xa3\x3c\x36\x01\x52\x4a\x86\xf3\x86\x03\xfc\xc2\x2f\
\xfd\x4b\xfc\xb3\x1f\xf9\x11\xbc\xf7\x53\x7f\xa3\x26\x67\xdd\x0f\
\x8a\x89\xc0\x32\xc1\x9e\x12\xf1\xa6\x88\x55\x50\x9c\x84\xaa\x62\
\x23\x61\x35\x88\xd0\x0e\x1f\xe8\x58\xd3\x05\x6c\xac\x6b\xd6\xd4\
\x69\x63\x6b\x30\xc0\xc0\xf7\xe1\x05\x26\x2c\x41\x30\xa6\x89\x79\
\x05\x39\x4d\x06\x09\x1c\x58\x5a\xc4\xcb\x5e\xfd\x6a\x7c\xee\xff\
\xfc\x0d\x0c\x93\x52\xbc\x25\x09\x4e\x91\x74\x87\x38\x0f\x29\x9b\
\xd7\x84\x44\xac\x89\x38\x1d\x43\x23\xca\x56\xe3\x4e\xfc\x4d\xe6\
\xb2\x8d\xe3\x52\xcc\xe4\x26\xe8\x96\xa4\x17\x21\x49\xd3\xc6\xbe\
\x5d\xbb\xd0\xdf\x5c\xc7\x68\xd0\x87\xd8\xdc\x80\x69\xad\x62\xd5\
\x71\x60\xbb\x0d\x34\xda\x0a\xa4\x84\x69\xa2\xe9\x7c\x43\x16\xe7\
\x70\xd7\xa3\x8f\xa1\xbb\xb1\x31\xbd\x23\x2e\x4f\xa2\x4e\xc9\xe3\
\x4d\x58\xde\xb5\xab\x04\xfa\x14\x54\xc2\x18\x7b\x0c\x89\x98\xeb\
\xd4\x76\x17\xd3\x00\xa9\x06\xa8\x1a\x98\x4a\xcb\x78\xb3\x57\x7c\
\x48\x9f\x90\x2a\x3e\x20\xd3\xf9\x40\x81\x94\x51\x05\x81\x8e\x63\
\xe1\xbd\x1f\xfc\x10\x7e\xee\xe3\xdf\x0f\xdf\xf3\x60\xf6\x2c\xf4\
\x6d\x1b\xdd\x35\x1b\x6e\xb3\x05\xc7\x75\x61\xbb\x2e\x9c\x46\x13\
\x6e\xa3\x89\x46\xab\x89\x66\xb3\x05\x57\x03\x52\xbf\x3f\x50\x46\
\x09\xc7\x8e\x0c\x13\xa6\x6e\xab\x61\x99\x26\xd6\xd6\x37\xb1\xbe\
\xb1\x81\xb3\x67\xce\xe2\xdc\x99\x33\x30\x2d\x5b\x27\xa8\x8a\xa8\
\xc2\xb8\x6a\xd6\x46\x30\x6d\x1b\xad\x4e\x07\xb6\x6b\x43\x4a\x56\
\x9f\xeb\x3a\x90\xc1\x08\xae\x6b\xe3\xc6\xeb\x0f\x61\x71\xa1\x0d\
\xc7\xb2\x60\x5b\x26\x5c\x5b\xfd\xb5\x74\x2b\x78\x2b\xb4\xb8\x0b\
\x82\xa1\x13\x61\x5d\xcb\xc4\x6f\xfc\x9b\x5f\xc2\x8f\xfe\xcc\x2f\
\xe1\x33\x7f\xf6\xdf\x61\xd9\x0e\x08\x02\xa6\xb0\xa2\xaa\x0f\x20\
\x91\xae\x50\x91\x9c\x03\x23\xb9\x29\x9d\x50\x63\x39\x0e\x3e\xf5\
\xa7\x7f\x8c\xef\xff\xd8\xf7\xe0\xeb\x3f\xfc\x1d\xf8\xfd\xdf\xfe\
\x75\x58\xb6\xa3\x6c\xcb\x51\xf2\xae\xe6\x0d\x22\x1d\x87\xe1\xb1\
\xfb\x6a\xa2\x6e\xd8\x16\x46\x41\x80\xde\x28\x00\x1b\x12\xde\x70\
\xa8\xe2\x4c\xeb\xeb\xd8\xdc\xdc\x44\x6f\x71\x11\x5b\xbd\x3e\xba\
\xfd\x21\xda\x8e\x0d\xd7\x34\x72\x8c\x00\xf9\x93\xfb\xb8\x9c\x07\
\xd8\xa6\x81\xb7\xbd\xf3\x9d\xf8\xfb\xbf\xfa\x4b\x55\x53\xb0\x68\
\xbd\x1f\xc5\x9a\x62\xb3\x43\xe4\x65\xe0\xa4\xcb\x9c\xa3\x78\x5a\
\x94\xb0\x9b\x90\x2b\x89\x92\x46\x88\x44\x22\xf2\x18\x38\x8d\x4f\
\xc6\x1c\x82\x24\x8d\xcb\x64\x0d\xd7\x45\xab\xd9\x4c\x55\x9c\x6f\
\xb8\x0e\xfc\xfe\x16\x78\x34\x80\xdb\x68\xc0\xf7\x47\xe8\x6d\xae\
\x23\x60\x28\x25\xa0\xd9\x82\x64\xc6\x60\x34\x4a\x2d\x47\x3c\x29\
\xf1\x4f\xbe\xf9\x9b\x4b\x26\xd7\x26\x0e\x34\x61\x22\x63\x5a\x5c\
\x5c\xcc\xc8\x96\x93\x31\x6a\x6a\xe4\x8a\x08\x77\xde\x71\x07\xb6\
\xc1\x96\xea\xbe\x4c\x35\x30\xcd\x8d\x35\x95\xad\x97\x97\x62\x4c\
\x91\xf5\x5a\x57\xf4\x0e\x82\x18\x9c\x04\x11\xde\xf9\xba\xaf\xc0\
\xbf\x69\x77\xd0\xdb\xda\x82\x37\x1c\x28\xe7\x9d\x10\xe8\x6f\xae\
\xc3\xb2\x1d\x58\x8e\x03\xcb\xd1\xe0\xd4\x6c\xa2\xd9\x6a\x2b\xa7\
\x53\xbb\x8d\x46\xb3\x09\xb7\xd1\x80\xed\x38\x30\x4d\x0b\x52\x4a\
\x8c\x46\x1e\xce\x9f\x3b\x87\xfe\x56\x0f\xeb\xab\x17\xb0\xb5\xb9\
\x19\x5f\x50\x42\xaf\x92\xa5\x00\x84\x4e\x8e\x6c\xb8\x70\x6c\x1b\
\xa6\xad\x00\x2d\xf0\x3c\xf8\xbe\x8f\x20\x08\x30\xec\xf7\x70\x7e\
\x34\xc4\xfa\xea\x05\x9c\x39\x75\x12\xb7\xbf\xe0\x05\x78\xe9\x0b\
\x9f\x87\x5d\x0b\x6d\x18\x82\x54\xc7\x5d\xc3\x80\x69\x68\x40\x22\
\xc5\x96\x0c\x43\xc0\xd2\x20\xd5\xb0\x5c\xfc\xea\xcf\xfc\x18\x3e\
\xde\x6c\xe2\xaf\xfe\xf0\xf7\x61\x59\xb6\x06\x25\x11\xb5\x1c\x8f\
\x25\xa6\x48\xa7\x49\x4c\x38\x7a\xc5\x1e\x77\x80\x8a\xbe\xcf\xbf\
\xfe\x57\xff\x1a\xbf\xf8\x33\x3f\x85\x3f\xf8\xff\xfd\x66\xe4\x1a\
\x94\x52\x4d\xdc\x92\x42\x59\x4f\xff\x32\xd9\x46\x83\x09\x10\x54\
\xb1\x0d\xc0\x36\x0c\x78\x86\xae\xb8\xae\x59\x53\x68\x82\xd8\xec\
\x76\xd1\xed\x75\xb0\xbe\xb5\x85\xc5\x96\x8b\xa6\x65\xc2\x24\x02\
\xcd\x6a\x82\x20\x81\xe7\xde\x74\x23\xdc\x66\x0b\x41\x10\x24\x3a\
\x15\x27\xa8\x40\x24\x37\x72\x2e\x53\x0a\x65\xbe\xf8\xd8\x51\xa6\
\xc0\xe8\x78\x2d\xc1\x64\x4e\x53\x24\xe9\x65\x67\xe7\x02\x83\x40\
\xcc\x32\x63\x60\x52\x3d\xc5\xcc\xd4\x6f\xb3\x7b\xd7\x32\x76\x2d\
\x76\x20\xfd\x11\x0e\xec\x5d\x80\x69\x59\x78\xc9\x97\xbd\x1c\x2f\
\x7c\xc9\x97\xe1\xff\xf9\x6f\x7f\x82\x47\x1e\x7d\x1c\xfd\xfe\x00\
\xf7\x3d\xfa\x04\x5e\x7a\xf8\x39\xd1\x77\xfe\x1f\x9f\xfe\x5b\x3c\
\xfe\xe0\x03\xd3\xd9\x12\x4a\x1c\xf0\x24\x63\x5a\xde\x95\x2f\x45\
\x52\x79\xc3\x43\xea\x31\x22\x74\xa7\x57\x16\xaf\x8b\xb7\xd6\xc0\
\xb4\x63\xec\x69\x56\x19\x8f\xc3\xaa\x0a\x71\x45\xee\x38\x1e\xe0\
\xfb\x7e\x94\xeb\xb3\xb7\xe9\xe2\x1d\x1f\xfc\x26\xfc\xde\xaf\xff\
\x2a\xc8\x30\xe0\x79\x43\x70\x10\xc0\xb4\x1d\x78\x66\x1f\x86\x65\
\xeb\x46\x83\x36\x4c\xcb\x86\xdd\x70\xd1\xec\x2c\xa0\xd1\x6a\xc3\
\x69\x34\x30\xe8\xf5\x35\xf1\x20\xf4\xbb\x5b\x51\x41\x4d\x4a\x26\
\xae\x26\x2d\xdf\x89\x36\x09\x86\x21\xe0\xd8\x16\x1c\xd7\x56\xe5\
\x7e\xa4\x8c\x74\x78\x4a\xc4\x65\x88\x08\xa7\x4f\x1c\xc7\xe9\x13\
\xc7\x71\xdf\xdd\x77\xe3\x2d\x6f\x7d\x33\x5e\x7c\xeb\x8d\x68\x3a\
\x36\x84\xa0\xa8\x3a\xba\x21\x62\x53\x80\x91\x98\xb4\xdb\xb6\x85\
\x7f\xfd\xcf\xbe\x1f\x1f\x38\x7a\x14\x0f\x7c\xe1\xef\xe3\x72\x3c\
\x94\xb4\xa2\xc7\x13\x6b\xfe\xb4\x9e\x28\xbf\xc3\x80\x65\xd9\xf8\
\xf4\x5f\xfc\x29\x82\x9f\xfe\x09\xbc\xea\x0d\x6f\xc2\x67\xfe\xfa\
\x2f\xf5\x84\x16\x84\x9d\x1a\x63\x86\x22\xc2\xff\xc5\x93\x12\xd3\
\x78\xf9\x25\xc7\x34\xe0\x05\x12\xfd\x40\x2d\x26\x46\x83\x3e\x36\
\xd6\x56\x23\x13\xc4\x56\xaf\x8f\xcd\xad\x1e\x36\xfb\x6d\x74\x1c\
\x1b\xb6\x50\xd5\xe0\x51\x91\x35\x85\x95\x20\xf6\x2d\x2d\xe2\xf6\
\x97\xbe\x14\xf7\x7e\xee\x73\xaa\x02\x7d\xb6\xe0\x51\xa2\x16\xde\
\x58\xad\xbc\xa4\x43\x2f\xaa\x5f\x97\xb5\x9f\x87\x65\xa3\x12\x00\
\x95\xa2\x79\xe3\xb6\xf1\x22\xa7\x5e\x2a\xee\x94\xf8\xdd\xc2\x1c\
\x36\x2d\x24\x42\x10\x61\xa1\xd3\xc1\x4d\x37\x1c\xc2\xfa\xfa\x2a\
\x1a\xcd\x06\x16\x17\x3a\xf8\xa1\x1f\xf8\x41\xec\xda\xbd\x0f\xef\
\x7f\xd7\xbb\xf0\x5b\xbf\xf3\xdb\xf8\xf8\xc7\x3f\x81\x5f\xfc\x67\
\x3f\x86\xf7\xbd\xee\xd3\x70\x4c\x03\x77\x3d\xf1\x24\xbe\xed\x1d\
\x6f\xdf\x3e\x28\xe5\x1c\xec\x5d\xbb\x76\xa5\x64\x62\x2a\x41\xc2\
\x26\x3d\x46\x00\x1e\x7f\xec\xb1\x64\x8c\x69\x56\x77\x1e\x6a\x29\
\xaf\xfa\x10\x35\x20\x8d\x3d\x56\xb6\x61\xa0\x24\xc3\x04\x4b\x15\
\xfb\xd1\x0d\xc5\xa2\xa4\x48\x95\x30\x1b\x68\x59\x87\xf0\x5d\xdf\
\xf4\x7e\xd8\x8e\x03\xdb\x32\x41\xcc\x90\xde\x10\x5e\x6f\x13\xc3\
\xcd\x35\x0c\x36\x56\x31\xe8\x6e\xa2\xbf\xb9\x81\xad\xf5\x55\x6c\
\x9c\x5b\xc1\xb9\xe3\xc7\x70\xfc\xf1\x47\xf1\xd4\x03\xf7\xe3\xd4\
\x33\x4f\xe1\xec\xf1\xa3\x38\x77\xf2\x04\x06\xfd\x2d\x04\xbe\x0f\
\xd6\x31\x24\x29\x95\xc1\x41\xdd\x82\x54\x6c\x09\x2c\x61\x18\x6a\
\xee\x49\x76\xac\x4d\x88\x37\x80\xee\x91\x04\x40\x95\x55\x32\x0c\
\x9c\x3d\x7d\x0a\xbf\xf3\xef\x7f\x13\xff\xe5\x8f\xff\x0c\x81\x94\
\x68\xdb\x16\x5c\xd3\x80\x63\x1a\x70\x0c\x01\x5b\xdf\x4c\x41\x11\
\x58\x19\x44\x68\xd9\x26\xfe\xcb\xbf\xff\x65\x2c\xed\xd9\xa7\xb6\
\x49\x99\x96\xe8\x65\xe4\x9b\x4c\x5f\x73\x7f\x38\xc4\x1f\xfd\xd9\
\xff\xc2\x37\x7d\xf8\x23\xf0\xbc\x51\xd4\xd3\x49\x26\x12\x6f\x8b\
\xfa\x4b\x25\x1b\x25\x46\x0d\x13\x99\x11\x04\x7e\xf4\x7b\x05\x81\
\x8f\xad\x8d\x0d\x74\xd7\xd7\xb1\xd5\xed\xa2\xd7\xeb\x61\xab\x3f\
\x40\xb7\x3f\x40\xdf\xf3\xe1\x73\xf9\x0e\xb7\xb9\x72\x9e\x61\xe0\
\x8d\x5f\xf3\x35\x08\x52\x25\x8a\xb2\x27\x18\x8f\xf5\x00\x4c\xfd\
\x3b\x61\x29\x4f\xf6\xe4\x4a\xb5\x5f\x4f\x01\x1d\x32\xc5\x7d\x39\
\xbf\x6f\x53\x8a\xbd\x8d\x83\x53\x38\x1c\xd7\x89\x62\xa6\x44\x80\
\x10\x02\xed\x56\x0b\x6f\x78\xfd\x57\x81\x99\xd1\x6a\x36\xf1\x63\
\x9f\xf8\x29\x2c\x2f\xef\x51\xd7\x83\x69\xc2\x1b\x0c\x10\x78\x23\
\x1c\xb9\xff\x2e\xbc\xf4\x25\x2f\xc1\x2b\x5e\xfd\x1a\x7c\xd5\x8b\
\x5f\x84\xc0\xf7\x51\xa6\x4a\x43\xa9\xe0\x92\xfe\x66\x82\x04\x1a\
\xcd\xc6\xc4\xac\xe8\x59\x10\xe1\x89\xc7\x1f\xe7\x29\x4c\xa9\x2c\
\x63\xaa\x01\xa9\x66\x4c\x95\x63\x4d\x55\x73\x98\xa2\x93\x91\x88\
\xa2\x40\xba\x37\x1a\x21\xd0\xb5\xdd\x24\x2b\x29\xcf\xf3\x83\x88\
\x9d\x1c\x5a\x5e\xc0\x4d\xb7\xbf\x10\x4f\x3c\x78\x2f\x4c\xcb\x02\
\x58\x95\x14\x92\xbe\x07\x6f\xd0\x03\x89\x2d\x98\x6e\x23\x62\x4f\
\xbe\x69\x29\x47\x9b\x61\xc2\x30\x4d\x88\xc0\x87\x0c\x4c\x04\xbe\
\x0f\xc3\xf4\x20\x84\x01\x32\x04\x84\x30\xc6\x58\x13\xa0\x2c\xb9\
\x86\x20\x10\x8b\x68\xc2\x16\x88\x6d\xde\x71\x55\xeb\x58\x8e\x0c\
\x8b\xcf\x1a\x86\x09\xe1\x12\x3e\xfb\xe9\x4f\x41\x4a\x89\x1f\xfa\
\xb6\x0f\xa2\x6d\x1b\x51\xa7\xd8\x08\x67\x12\x7d\x90\xc2\xb1\xec\
\x58\xf8\x4f\xbf\xf7\xbb\x78\xfb\x1b\xdf\x00\xdb\x71\x74\x59\xa4\
\x8c\xd0\x95\xed\xce\x9b\xfd\x59\x12\xee\x34\xd3\xb6\xf1\x47\xbf\
\xfb\x9f\xf1\xc1\x77\xfe\x21\x16\x16\x97\xd0\xef\xf5\x40\x82\x20\
\xe5\xf8\x4f\x4a\xda\x4d\x15\xad\xee\xc3\x12\x4c\xba\x32\x39\x13\
\x81\x83\x00\x96\x10\xf0\x84\x8c\xfa\x53\xa9\x6a\x10\x1a\x98\xfa\
\x7d\x0c\x06\x03\x6c\xf6\x7a\xe8\x0e\x5b\x68\xdb\x96\x2a\x53\xb4\
\x8d\x9c\xa6\x97\xbf\xf4\x25\x70\x5c\x37\x55\x7b\x30\x5f\x76\xe2\
\xb4\xac\x47\x89\xaa\xe3\x51\xf2\x6c\x96\xe5\x70\x82\x01\x51\x94\
\x74\x8b\x9c\x9c\x26\xe4\xc5\x9b\xa6\x30\xa7\xb0\x4e\x9e\x61\x1a\
\x29\x89\x4f\x08\x81\x6f\xfe\xf0\xb7\xe3\x86\x1b\x6e\xc0\x0b\x5f\
\xf4\x62\x1c\x3c\x78\x43\x6a\x9f\x4e\x9f\x39\xa3\x2a\x7a\x08\x81\
\x63\x4f\x3e\xa1\x41\x4d\x20\xd5\x29\x73\xd6\x12\x44\x99\x53\xc6\
\xb2\x6d\x5c\x7f\xf8\x70\x41\xd5\x07\x14\x9a\x20\xd2\x26\xc9\xf4\
\x63\x52\x4a\x1c\x39\xf2\x4c\xd9\x12\x44\xb2\x04\x20\xd5\xe0\x54\
\x33\xa6\x4a\x6c\x69\x96\x58\x13\x03\x90\x52\xbb\xf1\xbc\xd1\x10\
\xc3\xe1\x50\xe5\x11\x05\x81\xea\xc1\xa4\xa9\xca\xe6\xd0\xc3\xd1\
\xf5\x2e\xfe\xd7\x9d\x0f\x62\xf5\xdc\x0a\x84\xd0\x14\x06\xaa\x24\
\x0f\x40\xe0\x40\xc2\x1f\xf4\xd0\x5f\x3b\x8f\xad\xf3\x67\xd1\xdf\
\x58\x53\xb7\xcd\x75\x0c\x7b\x5d\x0c\xfb\x3d\x75\xdb\xea\x62\xd8\
\xdb\x54\x7f\xfb\x5b\x18\xf5\x7b\x18\x0d\x7a\x18\x0d\xfa\xf0\x86\
\x03\xf8\x9e\x02\x47\xb5\x0f\x71\x5b\x84\x74\x51\xd6\xb8\x71\x5d\
\xc8\x20\xe2\xce\xe8\x7a\x92\x13\x04\x61\x1a\x68\xb4\x5a\xf8\xdc\
\x67\x3e\x8d\x1f\xfe\xc5\x7f\x83\xee\xc8\xd7\x7d\xa5\x74\xb5\x74\
\x1d\xdb\x89\x80\x2a\x71\x91\xbf\xe8\x39\x7b\xf1\xb1\x9f\xfc\x59\
\x0c\x07\xfd\x52\x0b\xdf\x74\xce\x6d\xa2\x7c\x12\x2b\xb0\x7c\xe6\
\xd1\x87\x70\x6e\x63\x13\x2f\x7d\xc5\xab\x10\x04\x7e\xdc\x36\x3e\
\x51\x70\x36\xd9\x70\x50\x6a\xb9\x32\x97\x41\x49\xa9\x19\x1f\x45\
\x8f\xf9\xa3\x11\xba\x1b\xeb\xe8\x6e\x6c\xa2\xb7\xb5\x85\xfe\x60\
\xa8\xcb\x14\x0d\x30\xf0\xf3\x5b\xaf\x8f\x9d\x4d\x05\x25\x8a\x0c\
\x22\xec\x59\x5c\xc0\x75\xd7\xdf\x10\xd5\x9b\x2b\x3c\x39\xc7\xa6\
\xb2\x74\xe3\xc0\x6c\x2b\xf5\x24\xb3\x4a\xb2\x26\xce\x13\x92\x92\
\xdf\x81\xcb\xab\x4c\x61\x0a\x44\x28\xcd\x52\x82\x05\xb7\x5b\x1d\
\xbc\xf5\x6b\xdf\x95\x06\x25\x8d\x35\xfd\x7e\x3f\x3e\x2f\xa2\x3a\
\x89\xa5\x89\x50\x25\x19\x2f\x8d\xa9\x3c\x17\x14\x60\x66\x0c\x07\
\x03\x99\x91\xf1\x18\xc5\xe5\x88\x64\x1d\x5f\xaa\x19\xd3\xbc\x59\
\x53\xd9\x58\x53\xea\x24\x64\x6f\x84\x60\xd0\x43\xe0\xd8\x18\x0e\
\xfa\x08\x82\x00\x9e\xe7\xe3\x99\xa3\xc7\xf1\xcc\xd1\xe3\x38\x76\
\xf4\x18\x1e\xbe\xf7\x1e\x1c\x7f\xe2\x31\xf8\x9e\x2a\xdc\x2a\x0c\
\x03\x2c\x83\xe8\x62\x0d\xab\x6e\x43\x12\xd8\x57\x39\x47\xfe\x70\
\x00\x21\x0c\x34\x97\x96\x11\x8c\x86\x20\xd3\x86\x69\x3b\x10\x42\
\x57\x97\x30\x4c\x08\xd3\x52\x26\x0a\x43\xc9\x6f\xc2\x30\x40\x42\
\xdd\x40\x84\x46\xb3\xa9\xf2\x9e\xa2\x95\xaf\x84\x94\x14\xb1\xa2\
\x6c\x1d\x36\x4a\x24\x53\x46\x7d\x77\x0c\xa0\xd1\x6c\xe2\x89\x07\
\xef\xc7\x8f\xfe\xd2\xbf\xc5\xaf\xfe\xb3\xef\x85\x6b\x88\xc2\xb9\
\x38\xf9\xef\xef\x79\xff\xdb\xf1\x7b\xbf\xf5\x1b\x58\x3b\x77\x26\
\x91\x10\xca\xf9\x13\xa3\x36\x2f\x64\x5b\xc4\x43\xaa\x09\xd9\xf7\
\x3c\xfc\x9f\xbf\xfb\x2c\xbe\xec\x55\xaf\xc1\x27\xff\xe7\xff\xd0\
\x9d\x54\x29\x6c\x3e\x12\x49\x6d\x04\xa8\x7e\x52\x02\x63\xac\x29\
\xf9\x1d\x41\x04\xdf\xf3\x11\x40\xc0\x30\x0d\x48\x19\x60\xb0\xd5\
\x43\x77\x73\x03\x5b\xdd\x2e\xfa\xfd\x3e\x86\xa3\x11\xfa\xc3\x21\
\xfa\x9e\x8f\x96\x6d\xc2\x24\xa3\x54\x4e\xd3\xd8\xbc\x49\x04\xd7\
\x34\xf1\xca\x37\xbc\x11\xcf\x3c\xf6\xd8\xd4\xf8\x4a\x2a\xce\x94\
\xc9\xfd\x62\xcd\x76\x22\x63\xc3\x18\xa8\x23\x6b\xc5\x4b\x46\x98\
\x32\xf1\x26\x64\x2a\x43\xe4\x07\xce\x18\x88\xca\x64\x4d\x75\xd2\
\xe9\x9d\x91\xcc\x38\x76\xec\x78\xc9\x9e\x4b\x34\x65\xbd\x38\xa5\
\x30\xab\x64\x2c\x2e\x2d\x63\x77\x58\x27\x2f\xf7\x2d\xc5\x86\x87\
\xbc\xd7\x11\x11\x46\x9e\x17\x96\x23\xaa\x1a\x5b\xaa\xa5\xbc\x1a\
\x98\xe6\x2e\xe9\x55\xa9\x93\xc7\xec\xfb\x90\xa3\x3e\x80\x65\xac\
\x9d\x3b\x87\xbb\x3f\xff\x39\xdc\x6f\x5a\xb8\x70\xf6\x0c\x7c\x6f\
\x04\x19\x04\x00\x18\xa6\x65\x43\x18\x06\xa4\xef\x47\xe5\x7b\x84\
\x20\xc8\x10\x9c\x0c\x03\xa4\x2d\xdd\x44\x42\xc5\x23\x98\xc1\xbe\
\x07\xc9\x23\x60\x34\x84\x3f\xe8\x81\x0c\x03\xa6\x96\xfa\x42\x70\
\x4a\x02\x93\x10\x06\x84\xa9\x92\x5a\x4d\xcb\x4c\xb5\xbc\x8e\x18\
\x92\x9e\x98\xa3\x86\x78\x14\x77\x53\x45\xe2\x31\x22\x02\x69\x67\
\xa1\xdb\x6c\xe1\xa1\x7b\xee\xc2\xaf\xfd\xd1\xff\xc4\x0f\x7e\xfd\
\xd7\x42\x10\xa6\x82\x93\x23\x08\xbf\xf6\x1b\xbf\x8e\xf7\xbd\xed\
\xad\x68\x34\x5b\x89\x9e\x42\xe3\xd3\x42\x6e\x8b\x8e\x90\xcd\x31\
\xc3\x30\x0c\xfc\xf9\x1f\xff\x21\xbe\xf3\x9f\x7c\x77\x9c\xab\xc4\
\x00\x84\x84\x94\xc9\x85\xb8\x8a\x37\x00\x0c\xa6\xb0\x27\x16\xc5\
\xf6\x6b\x0a\xdd\x7c\x04\x93\xa0\x98\x10\xc7\x72\x5e\x77\x63\x03\
\xdd\x6e\x17\x5b\xbd\x1e\x06\x83\x21\xfa\xc3\x21\x06\x23\x0f\x23\
\xd7\xd6\x72\x1e\xcd\x24\xe7\x09\x21\xf0\xda\xd7\xbc\x1a\xbf\xf7\
\x1b\xff\x6e\xfc\xf4\xe3\xa4\x16\xaa\x2b\x37\xa4\x4b\xde\xc5\xb9\
\x4c\x13\x7a\x28\xa5\x71\x25\x6b\x1b\x4f\x4a\x7a\xe3\xdd\xa6\x26\
\x55\x47\x90\x41\x80\xc3\x07\xaf\x4b\xb5\x55\x4f\x75\x29\xce\xfc\
\xf0\xe1\xef\xb3\xbe\xbe\x31\xad\x40\xc6\xdc\x86\x21\x04\x5c\xd7\
\x2d\xfe\x8c\x09\x86\x87\x6c\xce\x73\xf8\x0f\x75\xed\x16\x26\xd7\
\x4a\x54\xca\x75\xac\x47\x0d\x4c\xd5\x25\xbd\xa2\x84\xb8\xa9\x00\
\xc5\x00\x42\x03\xc4\x68\x30\xc0\xea\x70\xa8\x53\x6c\x14\x33\x22\
\xa2\x68\xa2\xa5\x54\x5f\x22\x05\x40\x42\x08\x05\x4e\x14\xf7\x29\
\x52\xad\x26\x84\x8a\x53\xf9\x3e\x0c\xc3\x04\x4b\xd5\xee\x02\x20\
\xb0\x37\x84\x47\x42\x95\x1b\xb2\x6c\x08\xcb\x8e\xc1\x49\x18\x20\
\xc3\x80\xdb\x44\x64\x2d\xa7\xc4\x4a\x97\xb5\x95\x5d\x88\x6c\x43\
\xbf\x70\x02\xa1\x88\xc5\x21\x29\xc1\x48\x89\x66\xbb\x8d\x3f\xfe\
\xbd\xdf\xc5\x6d\x37\xdd\x80\x77\xbe\xec\xf9\xf9\x8b\xe5\xcc\x78\
\xe5\x73\x6f\xc0\x0b\xbf\xfc\x15\x78\xf4\xde\xbb\x52\x13\x5b\x9a\
\x51\x40\xc9\x8c\x41\x10\xb3\xa5\x0c\x38\x91\x20\x3c\xf8\xc5\xcf\
\xe1\x13\xdf\xfd\xa0\x72\xb6\x85\x6c\x4f\x2a\x70\x82\x2e\x08\x41\
\xac\xc4\x69\xc5\x9a\x34\x3b\x88\xe2\x4c\x89\x44\x51\x22\x58\x06\
\x21\x90\x04\x4f\x4a\x08\x29\xe1\x7b\x9e\x32\x41\x6c\x6c\x62\xab\
\xbb\x85\x5e\xbf\x8f\xfe\x60\x80\xde\x70\x04\x5f\x36\x12\x55\x7b\
\xab\x2d\xea\x43\x39\xef\x9a\xbd\xbb\xd1\x59\x5c\x42\xbf\xb7\x35\
\xce\x3c\x52\x31\x9e\xc4\x29\x16\xc5\x9d\x28\x79\x37\xb7\x30\x6c\
\xdc\x28\x30\xcd\x90\xf2\xfa\x59\xe4\xb1\xa4\xe2\x9a\x7a\x40\xab\
\xd9\xc8\x65\x4b\x94\x73\x27\x34\x19\xfa\xbe\x3f\x37\xa9\x6e\xda\
\x18\x79\x5e\x54\x16\xac\x1a\x43\xca\xff\x41\x89\x04\xd6\x37\x36\
\x80\xd9\xca\x11\x95\x0d\x1f\xd4\xa3\x8e\x31\x4d\x64\x49\x79\x74\
\x7b\x2a\x28\x11\x11\x9f\x78\xea\x31\x56\x93\x86\x36\x2f\x8b\x70\
\x62\x47\x02\x88\x10\x97\x7c\x49\x36\xcc\xd3\x00\x20\x48\xc4\xef\
\x4b\xf4\x2b\x82\x4e\xdc\x8d\x7e\x28\x22\x08\x30\xd8\xf3\x10\x8c\
\x06\xf0\xfb\x5b\x18\x6e\x6d\x60\xb8\xb9\x86\xe1\xd6\x46\x1c\x6f\
\xd2\x7f\x91\x4c\xe5\x09\x27\x67\xc9\x90\x32\x80\x37\xf2\xb4\x3b\
\x4a\xcd\x3c\xa1\x59\x83\x42\x49\x30\x6c\x75\x21\x04\x0c\xd3\x84\
\xa1\x5b\x8e\xb7\x17\x17\xf1\x4b\x3f\xff\x0b\x58\xe9\x0d\x53\x71\
\x25\x9a\x70\x72\xfd\xf4\x4f\xfd\x24\x86\xfd\x5e\x6a\xa6\x91\x50\
\xe6\x85\x20\x90\xf0\x46\x3e\x46\x43\x0f\xfd\xfe\x00\xa3\xe1\x70\
\xcc\x61\x28\xa5\x02\x2c\x05\x1c\xeb\xa9\x18\x54\xba\xf1\x61\xd8\
\xc6\x23\x88\x63\x6a\x49\xa7\x1e\xc7\x7f\xc3\xc7\x05\x2b\x50\x0a\
\xcb\xec\x78\xa3\x21\xba\x9b\x1b\xe8\x6e\xa9\x06\x82\xbd\xc1\x10\
\xdd\x7e\x1f\x03\x2f\x80\xaf\x9b\x08\xce\x12\xcd\x16\x04\x2c\x36\
\x9b\xb8\xf9\xf9\xcf\x87\x0c\x64\xa9\xe5\x11\x8f\xa9\x9e\x71\x9b\
\x8c\x08\x31\x92\xb7\x74\x6a\x5d\x22\xd6\x14\x57\x2e\xcf\x95\x51\
\xa7\x06\xcf\x18\xa6\x69\xa6\x80\x89\xc6\x40\x29\x7e\x84\x08\xf0\
\x3c\x0f\x27\x4f\x9e\x9a\x2c\xe5\x51\x49\xf4\xe1\xe9\xb1\xa0\x6b\
\xaf\xbd\x0e\xb6\x6d\x67\x0e\x5a\xfe\x76\x18\x53\xe2\x51\xe3\x55\
\x1f\xaa\xca\x77\x75\x59\xa2\x1a\x98\x2e\xaa\x9c\x97\x3a\x49\x59\
\xa1\x91\x0c\xa5\xa0\x64\xcf\x9c\xbc\x2b\x30\x72\xb4\x51\xa6\xa3\
\xab\xd0\x3d\x9c\x52\xfd\x89\x14\x40\x05\x81\x9f\x9e\x01\xc2\xe6\
\x7a\x20\x40\x4a\x48\x6f\x04\x7f\xd0\x83\xd7\xeb\x62\xb8\xb1\x8a\
\xfe\xfa\x2a\x46\xbd\x4d\x58\xb6\xf3\xff\xb1\xf7\xe7\xe1\x96\x5c\
\x77\x79\x28\xfc\xae\xb5\x6a\xdc\xc3\x19\x7b\x52\x6b\xb6\x06\x5b\
\xd6\x60\x07\x6b\x32\x21\x04\x12\x48\x00\x33\xe6\x42\xe0\x83\xf0\
\x7c\xc1\x7c\x09\x17\xb8\x90\xcb\x93\xdc\x87\x29\xe4\x92\xdc\xe4\
\x7e\xb9\x1f\x5c\x48\x20\x24\x38\x10\x27\x71\x20\x04\x42\x18\x92\
\x6b\xb0\x49\xf0\x88\x8d\xa5\x6e\x49\x96\xd4\xb2\x64\xcd\x2d\xf5\
\x74\x4e\xf7\xe9\x33\xed\xb1\xaa\xd6\x5a\xdf\x1f\x6b\x55\xd5\xaa\
\xda\xab\x6a\xd7\x3e\xdd\x92\x65\x54\x4b\x4f\xe9\xf4\xd9\x67\x9f\
\x7d\xf6\xb8\xde\x7a\x7f\xbf\xf7\xf7\xbe\xda\x1e\x08\x59\xf9\x2e\
\xdd\xb8\x79\xc2\x11\xeb\x32\xe3\x74\x3c\xc2\x74\x32\x85\x1f\x74\
\x71\xf8\xe8\x71\x38\xae\x0b\x21\x64\x5e\x0a\xa4\x14\x8c\x39\x70\
\xdc\xbc\x64\xc8\x18\xc3\xdf\xfb\x3f\x7f\x6e\xbe\x84\x5a\xaf\xfb\
\x6e\xbb\x11\xc7\x6e\xb8\x09\x52\x08\xc5\x12\x1d\x17\xcc\xf5\xb5\
\xe3\xb8\x0b\x10\x06\x50\x07\xa0\x0e\x24\x28\xb8\x00\x92\x44\x31\
\x44\xc1\xb5\xf4\x5d\xcf\x1c\x99\xee\xd6\xb3\xe0\x24\xf3\x3c\x29\
\x8b\x74\x3c\x97\x98\xe7\x5f\x99\x14\x60\x10\x59\x29\x31\x9a\x4e\
\x31\xdc\xdb\xc3\x70\x5f\xc9\xc6\x27\x93\x29\x46\x93\x09\x86\x93\
\xa9\x32\x80\xad\xf2\x75\xab\x29\xda\xa4\x79\xbe\x2e\x63\x78\xf7\
\x5f\xfc\x8b\x10\x7a\x84\xc0\xd6\xda\x94\x85\x54\xde\x9c\x35\x99\
\xa0\x52\xde\x4a\x67\x76\xbe\xda\x2c\xa9\xf2\xed\x54\x6c\xd0\x25\
\xf0\xe2\xa9\xb3\x7c\x19\x90\x88\xbd\x98\xcb\x39\xc7\xee\xee\x6e\
\x21\xa2\x83\x34\x02\x27\xe3\x20\x04\xb6\xc9\x66\xcb\x48\x30\x3a\
\xdd\x0e\x28\xa5\xd6\xc7\xd4\xb8\x6e\x52\xea\x0b\x9e\x78\xf8\xe1\
\x79\xa5\xbc\xa6\xb3\x4c\x2d\x28\xb5\xa5\xbc\xd7\x0c\x9c\x44\x05\
\x48\x49\x91\x44\x10\xd1\x04\xd2\x75\x8b\x1f\x1f\x02\x95\xc0\x4a\
\xb4\x0c\x55\xf7\x8f\xcc\xb2\x5d\xe1\x20\x66\x78\x9e\x2c\x58\xeb\
\x14\x06\x4f\xcd\x3f\x91\x36\x1b\xb8\x1e\xe6\x25\xea\xdf\x61\xaf\
\x97\x97\x0a\xb9\xb2\x05\x8a\x13\x35\xaf\xc3\x93\x44\x97\xc7\x1c\
\x1c\x3e\x7e\x3d\xde\xf2\xd6\xb7\xe2\xb6\xdb\x6f\xc5\xf5\xc7\x8f\
\x81\x10\x89\xf3\x9b\x9b\x38\xf9\xf0\x49\x0c\xf6\xf7\x15\x50\x25\
\x5c\xab\x94\x25\x38\x07\xc2\x6e\x17\x4f\x3f\xfe\x18\x4e\xbc\x70\
\x06\x0f\xdc\x72\xdd\xdc\x27\xd6\xa5\x04\xef\xfd\xc1\x1f\xc6\x3f\
\xfd\xb1\xbf\x8b\xce\xf2\x3a\x98\x17\x64\xb7\x97\xb1\x22\xce\x21\
\x12\x35\x5b\xc4\xe3\x08\x84\x32\x08\x1e\xeb\x12\x5f\xac\x22\x2f\
\x20\x21\x25\xcb\x95\x83\x19\x0b\xd0\xe7\x56\x42\x40\x52\xaa\xf9\
\x58\x9a\x05\x65\x94\xf2\x0a\x62\x08\x6d\x7c\x0a\x40\x20\xf5\x13\
\xa4\x8a\x95\xed\xef\x63\xb0\xbf\x9f\x01\xd3\x78\x1a\x61\x7f\x3c\
\xc1\x4a\x37\x44\xe8\x30\x08\x14\x73\x9a\x6a\x1b\x4c\x46\xb9\x92\
\x12\xe0\x9d\xf7\xdc\x6d\xef\xb1\x99\x85\xb0\x54\xf2\x2d\xcb\x61\
\xb4\x79\x9f\x49\xa6\x57\x40\xa9\xe7\x65\xd6\xe8\x0a\xe9\xc4\x73\
\x4a\x5b\xd6\x92\x1e\x32\xf7\xf3\xc3\x6b\xab\x55\xb5\x3b\xfb\xa6\
\xe2\x38\x79\xea\x6e\x23\x49\x26\x2a\x7d\xf1\x9a\x14\xdf\x66\x7c\
\xf2\x2a\xab\x98\xcd\xa6\x6b\x09\x21\xd8\x57\x6e\x2a\x07\x75\x7c\
\x68\x85\x0f\x2d\x30\x5d\x11\x18\xcd\x93\x88\xd7\x32\x29\x42\x88\
\x90\x49\x0c\x1e\x4f\x01\xf4\x90\xab\x7a\x8a\xbb\x92\x34\xa3\xc4\
\x8d\xb2\x5d\xf9\xa0\x84\x40\x52\xe5\x56\x40\x08\x01\x4f\x74\xed\
\x9c\x90\x02\x2e\xa5\x13\xf8\xe6\x25\x54\x2b\x12\x24\x4f\x20\x39\
\xc7\xfe\xce\x76\xc6\x18\x00\x20\x9a\x4e\x10\x47\x91\xb6\x3d\xea\
\x62\x65\xfd\x10\x6e\xbf\xf3\x4e\xfc\x85\x2f\x7b\x10\xd7\x1f\x3d\
\x84\xd0\xf3\xd0\xf5\x3d\xfc\xf9\x3b\x6f\xc7\x5f\x7d\xf7\x7d\x78\
\xdf\x6f\xfc\x0e\x4e\xbf\xf8\x02\x1c\xcf\x53\x59\x4f\x4c\xcd\x67\
\x11\x42\xd0\xed\x2f\xe1\xa7\xfe\xf1\x3f\xc5\x1f\xbe\xff\x5f\x80\
\x35\xd8\x39\xbe\xf3\x3d\x5f\x8d\x9f\xfd\xdf\x43\xb8\x61\x07\xae\
\x1f\xaa\xe7\xc4\x28\xc1\x15\x4a\x77\x3c\x05\x28\x65\x38\xcb\xa3\
\x31\x84\x96\xc1\x4b\x99\xbb\x46\x48\xdb\x2c\x54\xea\xa3\x47\xa8\
\xda\x97\xd3\xb0\x3c\xad\x54\x23\x99\x13\x84\x4a\x2e\x42\x3a\x78\
\x2c\x05\x98\x66\x95\x71\x34\xc5\x70\x7f\x1f\xa3\xe1\x08\xe3\xc9\
\x04\xd3\x28\xc2\x68\x3a\xc5\x34\x49\xc0\xa5\x5b\xf6\x9b\x9d\x6d\
\x9e\x57\xec\xbd\x94\x10\x1c\x5a\x5d\x81\xe7\x07\xaa\xf7\x07\x62\
\xe9\x09\xe5\xa0\x92\xcd\x30\x99\xb1\x17\x30\x1c\xc2\x25\x29\x43\
\x5a\xc1\xcc\xb5\x5a\x9c\x96\xef\xd8\x99\x28\xc2\x86\x53\x46\x49\
\xf1\xd0\xfa\x9a\xf1\x9e\x9b\xbf\xc6\xe3\x31\xa2\xe9\x74\x36\x23\
\xab\x6e\x97\x3e\x80\x84\x3c\xfd\x95\xe5\xa5\xe5\xa6\xed\xa3\x4a\
\xc1\x43\xf9\x44\xc1\x00\x26\x5e\x01\x46\x75\x6c\xa9\x65\x49\x6d\
\x29\xef\x8a\x18\x92\x8d\x31\x61\x81\x5e\x93\xcc\x3e\xe4\x33\x33\
\x2a\x46\xe9\xcd\x04\x26\xcd\x8c\x54\xa8\xa0\x16\x2c\x50\x56\x60\
\x4e\xd0\xd7\x11\x42\x22\x9a\x8c\x51\xa9\x05\xab\xc8\x60\x18\xec\
\xee\xa8\x92\xd4\xde\x2e\x46\xfb\xea\x6b\x12\x45\x58\x3b\x72\x14\
\x47\xae\xbd\x0e\xcb\x6b\xab\x80\xe4\xf8\xfc\x93\x9f\xc5\xc7\x3f\
\xfe\x49\x4c\xa6\x11\x8e\x2d\xf7\x70\xa4\xdf\xc1\x6a\xe8\xe1\xe6\
\xb5\x25\xfc\xef\xdf\xf7\xdd\xb8\xfd\x8e\x3b\x20\xa5\x04\x73\x5c\
\x30\x87\x65\xc3\xbc\x5e\x10\x60\xeb\xe2\x06\x1e\x7e\xee\x74\xa3\
\x27\x7b\xad\x1b\xe0\x6d\x5f\xf2\x00\x1c\xbf\x03\x37\x08\xe1\xfa\
\x01\xbc\xb0\x03\x2f\xec\xc2\xeb\x74\xe1\x77\xfb\xf0\x7b\x7d\x04\
\xdd\x3e\x82\xde\x12\xc2\xde\x32\xc2\xfe\x32\x3a\xcb\xab\xe8\xac\
\x1c\x42\xb0\xbc\x0e\xbf\xbb\x0c\xe2\x06\x88\x24\xc1\x24\x51\xc3\
\xcb\xa6\x6f\x42\x59\x6a\x9e\xab\xfc\xa4\x76\x7d\x90\x33\xf3\x4c\
\x42\x08\x10\x9e\x80\xf0\x24\x53\x00\xc6\xd3\x48\x01\xd3\x68\xa8\
\x64\xe3\xd3\x08\xd3\x28\xc2\x24\x4e\x54\x9f\xa9\xc1\x8e\x43\xac\
\x7d\x26\x82\xd5\x5e\x0f\xd7\xde\x74\x93\x2e\xe7\x99\xce\x0d\x66\
\xaf\xc8\xa8\xb5\x95\xdb\x42\x32\x35\x5b\x2d\x97\xf3\x64\xb1\x1c\
\x57\xa8\xe9\x95\x7b\x4d\x35\x1f\x04\x69\x2f\x11\x7a\xae\xdb\x18\
\x38\x08\x80\xc9\x64\xac\x7a\x96\x57\x88\x3f\x64\xce\x4f\x52\x30\
\x59\x4d\x19\x5d\x45\x0f\x69\xa1\xa6\x95\xbe\xcd\x93\x27\x1e\x6e\
\xc2\x98\x16\x01\xa5\x16\xa8\x5a\x60\x7a\xfd\x7a\x4d\x4a\x24\x65\
\xd8\xfd\xc8\xd9\x7a\xb5\xfd\xa0\x05\x90\x2a\x96\xf5\x72\xe1\x04\
\x6c\x59\x39\x75\x9f\x6e\x29\x11\x6b\xf1\x83\xd9\xb0\x5e\x3e\x74\
\x18\xfd\x95\xd5\x4c\xae\x9e\x9a\x75\x3e\xfd\xf8\x67\xf1\x33\x3f\
\xfb\xf3\x38\x73\x79\x17\x1d\x87\xc1\xa3\xca\x6a\x68\xc9\x73\xf0\
\x13\xdf\xf3\x1d\xe8\x2f\x2f\x65\x51\x1b\x69\x1f\xcc\x71\x1c\x74\
\x7b\x7d\xfc\xff\x7e\xe1\x97\x1a\x7d\xda\x28\x80\x6f\xfc\xf6\x6f\
\x87\xdf\xed\x82\x30\x07\x8e\xef\x83\x79\x2e\x5c\x1d\x93\xe0\x85\
\x21\xbc\xa0\x53\x02\xab\x1e\x82\x6e\x1f\x61\x7f\x19\xdd\xe5\x55\
\xf4\xd6\xd6\x11\x2c\xad\x82\x84\x7d\x48\x27\x00\x27\x0e\x62\x41\
\x31\x8e\x12\xc4\x71\x82\xd4\xf9\x01\x56\x61\x44\x3a\xc7\x25\x0b\
\x22\x08\x21\x24\xa8\x48\x40\xb5\xc0\x42\x02\xe0\x3c\xc1\x78\x38\
\xc0\x70\x7f\x80\x61\xc6\x9a\x62\x8c\xa7\x11\x62\x2e\x0e\xbc\xbf\
\x10\xa8\xf0\xc0\xbb\xef\xbd\x57\xf5\xce\x64\xc5\x19\x90\xb4\x98\
\x07\x99\x03\xb6\x1a\x9c\xa4\x34\xac\x8c\x2a\x7a\x49\x4d\x7a\x4d\
\x98\xb9\x8d\xd9\x7c\xab\x6e\x27\x5c\x00\x52\x08\x46\xc3\x11\xa4\
\x78\x9d\xf6\x61\x42\x94\x4f\x5e\x53\xc1\x83\x9c\x0f\x60\x52\x4a\
\x9c\x3f\x7b\xee\xa0\x7d\xa5\x56\x36\xde\x02\xd3\xeb\x52\xce\xab\
\xef\x35\x65\xfd\x12\x91\xb9\x5f\x17\x2d\x57\x90\x33\xa7\x99\xf2\
\x5d\x2e\x82\x28\x33\x27\x64\xcc\xa9\x38\xd8\x98\x2a\xe6\xea\x56\
\x32\x9d\xe6\xd9\x39\x52\xc2\x71\x5d\xf4\x57\x56\xb4\xe9\x2b\x01\
\x65\x54\xfb\xe7\x29\xcb\x9f\xd1\xfe\x3e\x7e\xfc\xef\xff\x34\xb6\
\x27\x91\x72\x76\xd0\x7f\x61\xc9\x65\xf8\xfe\xef\xfe\x4e\x4c\xc6\
\x63\xc5\x96\x58\x7e\x7f\x82\x30\xc4\x2b\x2f\xbf\x84\x57\xb7\x76\
\x1b\x3d\xc1\x37\xdd\x78\x1d\xde\xf3\x6d\xdf\x86\x5b\xef\xbc\x0b\
\x52\x02\xcc\x71\x75\xec\x7a\x9a\xb2\x1b\x28\x36\x15\x04\x0a\xa8\
\xc2\x8e\x02\xa7\x5e\x1f\xc1\xd2\x0a\xc2\xe5\x35\x74\x56\xd7\xd1\
\x5b\x59\x47\x6f\x75\x1d\x5e\x6f\x19\xd2\x0b\x21\x98\x87\x18\x0c\
\x53\x2e\x31\x98\xc4\x98\xc6\x71\x61\x33\x2f\x82\x93\xe1\x2a\x91\
\x82\x54\x29\xa0\x2f\x53\x00\xee\x6b\x17\x88\xf1\x04\x93\xe9\x14\
\xc3\xc9\x14\xd3\x84\x83\x8b\xf9\x9e\x09\x36\x8b\x5a\x42\x94\x3d\
\xd1\xbd\xf7\xdd\xa7\x37\xed\xfc\xf5\x91\x05\xb6\x04\x83\xe1\xc8\
\x22\x80\xd9\x14\x75\x32\x17\xde\xc8\x2c\x2f\x69\x0e\x6b\x9a\x77\
\x9b\xc6\xf7\x94\x12\xf8\x9e\xb7\x10\xcd\x99\x4c\x27\x06\x9f\xb1\
\xcb\xcc\xc9\x55\xc3\x25\x82\x30\xec\x5c\x19\x29\x29\x81\x95\x94\
\x12\x83\xe1\xe0\x20\xc6\xad\x2d\x08\xb5\xc0\xf4\x9a\x94\xf3\xe4\
\xe2\xbd\x26\xa2\x7a\x20\xd1\x44\x2b\xdf\x0a\x27\x73\x85\x52\x5e\
\x91\x2d\x91\xa2\xe0\x21\x63\x4e\x2c\xbb\x1e\x25\x04\x49\x92\x20\
\x8e\x22\xcb\xcc\x91\x85\x4d\x69\x86\x15\x0d\xf7\xf2\xec\x1c\x29\
\x11\x76\x7b\xca\xa0\xd5\xf0\xd4\x4b\x65\xed\x90\x12\xae\xe7\x61\
\x3c\x1c\xe0\x07\x7e\xf2\x1f\x21\xd5\x50\xa4\x37\x7b\xef\xcd\xc7\
\x71\xcd\xf1\xe3\xca\x2c\x33\xf3\xe3\x23\x60\x8e\x83\x4e\xa7\x8b\
\x9f\x7b\xff\xaf\xcf\x45\x7b\x2e\x25\xce\x6d\x5c\xc4\xb5\xc7\x8f\
\xe1\x2b\xbf\xea\x2b\xf1\x57\xbe\xf9\x9b\xb0\x7a\xe8\x10\x40\xa0\
\x5c\xd5\x3d\x4f\x03\x95\x8a\xff\x70\x7c\x05\x52\x5e\xd8\x81\xd7\
\xe9\xc1\xef\xf4\x54\xfa\x6f\xa7\x07\xbf\xdb\x43\xd8\x5b\x42\x67\
\x69\x05\xdd\xa5\x15\xf4\x56\xd6\xe0\x77\x97\x20\x9c\x00\x9c\x30\
\xc4\x82\x60\x12\x73\x0c\x46\x13\x4c\xa7\x51\xb6\xf9\x0b\x59\x64\
\x4d\x05\x23\xd4\x24\x06\x92\x28\x53\xfd\xc5\x51\xa4\x40\x69\x34\
\xc2\x78\x3c\xc6\x64\x3a\xd5\x2e\x10\x31\x62\x21\x20\xe4\xe2\x75\
\x9a\x54\x9d\x77\xfd\xb5\xd7\x66\xcd\x16\x39\x03\x0a\xd2\x38\xa1\
\x40\x51\xba\x5c\x52\xe7\xcd\x9e\xf3\x57\x83\x8b\xed\x4e\xca\x46\
\xbf\xaf\x43\x2f\x9d\xc5\x5a\xd1\xdb\xdb\xdb\x25\x46\x48\x6a\x9e\
\x93\x6a\x90\x9a\xf7\x9c\xaa\x48\x0e\x1f\x37\xde\x78\x43\xa1\x5a\
\x71\xb0\x72\x5e\x9e\xe1\x15\xc5\x31\xb6\x2f\x5f\x4e\x1a\x30\xa6\
\x72\xef\x09\x2d\x48\xb5\xc0\x74\xb5\x00\xa9\x6a\x5f\x6d\xd6\x63\
\x22\x4a\x70\x20\xb4\xf3\x75\xfe\x06\xd7\x05\x9c\x42\x9f\x89\x02\
\x94\xaa\x01\xd7\x19\x35\x1e\x29\x7e\xd5\x47\xaa\x54\x43\xd9\x75\
\x80\xd4\x7d\xee\x49\x61\xbb\x61\x8e\x93\x35\xed\x69\x36\x40\x9b\
\x03\x24\x08\x81\xeb\xf9\x78\xe1\x73\x4f\xe1\xa3\x4f\x3e\x3b\xf3\
\x06\xf9\xa1\xef\xfe\x0e\x4c\x27\xe3\x3c\x66\x43\x3f\x96\xb0\xdb\
\xc5\x33\xcf\x3c\x8d\xa4\xca\xa1\x3a\x65\x70\x42\xe2\xd2\xe5\x6d\
\x0c\x06\x43\xc4\x71\x8c\x9b\x6e\xb8\x1e\x5f\xff\x2d\xdf\x84\xaf\
\x7a\xcf\x7b\xb0\xbc\xb6\xa6\xa4\xe4\x94\x82\xb9\x8e\x02\x28\xcd\
\xa2\x1c\x3f\xcd\xaa\xf2\x75\x5f\x2a\x44\xd0\xe9\x22\xe8\xf5\x10\
\xf6\xfa\x08\xfb\x4b\xaa\x27\xb5\xb4\x82\xee\xf2\x2a\xfa\xab\x87\
\xe0\xf5\x96\x21\xa8\x07\x0e\x8a\x88\x0b\x8c\xa7\x71\x56\xea\x4b\
\x37\xfe\x32\x8b\x42\x12\x01\x49\x9c\xbd\x7e\x49\x1c\x63\x34\x50\
\xca\xbc\xf1\x78\x82\xc9\x24\x42\x14\x45\x88\x32\xb7\x71\xb9\x70\
\x13\x21\x65\x4d\x6b\xcb\x4b\xe8\xf4\x7a\x2a\xba\x44\x9f\x3c\x14\
\xfa\x63\x06\x63\x32\xe7\x96\x52\xfb\xa8\x22\x2b\x97\x33\x10\x23\
\xcd\xf2\x5c\xa9\x27\x25\x01\x4b\xe3\xaa\xba\xe4\x25\x25\xe0\xba\
\x0e\x3c\xcf\x5d\xe8\x03\xb6\x6f\xe4\x83\x35\xed\x2e\x91\x8a\x63\
\x5e\x79\x74\xee\x6d\x37\x2d\xe7\x19\xdf\x70\x9e\x40\x28\x63\xc3\
\x3a\x40\x6a\x9a\xc1\xd4\x82\xd3\x01\x56\x2b\x17\x6f\x26\xf3\xac\
\xeb\x35\x21\x3d\x05\x36\x63\x2f\x48\xe9\xe3\x23\x33\x2f\x3a\x1d\
\x3f\x4e\x95\x41\xa9\xd4\x47\xea\x00\x91\xbb\x41\xe4\xee\x10\x29\
\x60\xc9\x99\x8f\xa5\x9c\xa9\x1a\x02\x80\xd4\xea\x36\x42\xd9\xcc\
\x4e\x43\x29\x03\x71\x08\x90\x40\x6d\xb0\x32\x2f\x89\x74\x7a\x7d\
\xfc\xd4\x3f\xf8\x69\xfc\xa5\xdf\xfd\x8f\x05\xb5\xdd\xed\xc7\x8f\
\x80\x51\x96\xf9\xb7\xa5\xfd\x2f\xc7\x75\xb1\x7d\xe9\x22\x5e\xbe\
\xb4\x8b\x5b\x0f\xaf\x54\x3e\x71\xa3\x38\xc1\xe5\xad\x2d\x2c\x2d\
\x2d\xc1\x4f\x12\x44\x51\x04\xcf\x75\x71\xfd\x75\xc7\x71\xf4\xc8\
\x7b\xb0\xb1\x79\x11\x8f\x3e\x7c\x12\xbb\xdb\x97\xf5\x3c\x0a\x2b\
\x0c\xd5\x48\x29\x95\x03\x86\x14\x10\x0e\x87\x23\x3c\x15\x5b\x91\
\x24\x48\x12\x35\x2c\x2c\xb8\x9a\x7d\xe2\x51\x84\x24\x08\x90\x44\
\x11\x92\x38\x42\x12\x4d\x95\xa1\x6b\xac\x22\x2e\x5c\x46\xe1\xb9\
\x4e\xa6\x7c\x4b\xff\x4e\xc1\x1e\x49\x08\x4c\x27\x13\x8c\x32\xdf\
\xbc\x29\xa6\x51\x8c\x49\x14\x21\xe6\x1c\xdc\x61\x70\x2a\xdc\xc6\
\xe7\xed\x42\xfd\x30\xc0\x91\xe3\xd7\xe2\xf4\xf3\xcf\x81\xb0\xdc\
\xb7\x2e\x75\xa4\x40\x1a\x10\x98\xa6\xda\x6a\xdd\x78\x39\xd9\x36\
\x57\xe6\x65\x7e\x0b\x05\xd6\x6c\x74\x89\x66\xef\xa0\x4d\x3e\x9e\
\xca\xc3\x4d\xdf\x08\x21\xd0\xeb\xf7\xd0\x09\x3b\x95\xf1\x18\xb6\
\x27\x60\x63\x63\xa3\x06\x7e\xae\xde\x5e\x2d\xa5\xc4\xca\xca\x0a\
\x0e\x1d\x5a\x2f\xc4\xb9\x1c\x3c\xc3\x56\xbb\x3e\xec\xd6\xba\x3e\
\x34\x0c\x10\x6d\x19\x53\xcb\x98\x0e\xce\x9a\xe4\x9c\x9f\xcd\xed\
\x35\xa5\x67\xc2\x69\xb6\x8f\x94\x96\xf7\xe3\xcc\x60\x2d\x51\x00\
\x61\xcc\x33\x51\xcb\x4c\x53\xca\xb4\x78\x92\x20\x8e\x72\xf9\x6d\
\xd1\x1e\x66\x76\xf0\x23\x89\x22\x24\x9a\xe1\xa4\x67\x80\xe9\xd9\
\xb4\xd0\x96\x47\xcc\x51\x2e\x0f\x66\xad\xde\x75\x5d\x0c\x07\xfb\
\x78\xec\xc5\x57\x0b\x37\xc9\x28\xc1\x2d\xb7\xdd\x06\x1e\xc7\x06\
\x38\x29\xb0\x74\x3d\x1f\x9f\x7e\xe2\xe9\xda\xba\xe7\xf6\x70\x82\
\xad\x8b\x1b\xd8\xdd\xdd\xc5\xde\xee\x2e\x86\xc3\x21\x86\xa3\x11\
\x76\x76\x77\xc1\x39\xc7\xf1\xe3\xc7\xf0\x57\xdf\xf3\x35\xb8\xe7\
\xde\x7b\x95\xc9\x2d\x17\x85\x21\x64\xca\x52\x0f\x40\x37\x67\x4f\
\x81\x92\x9f\x7b\x41\x67\x56\x38\xd1\xe9\x29\x26\xd5\x5f\x46\x67\
\x69\x15\x6e\xa7\x07\xe1\x78\xe0\xc4\x41\x24\x80\x49\xcc\x31\x1c\
\x4f\x10\x45\xb1\xe1\x23\xc8\x01\x29\xb2\xf9\x28\xc1\x39\x46\xc3\
\x11\xa6\x13\x75\xbd\x28\x56\x02\x88\x49\xac\x66\xc6\xe4\x81\x3e\
\x6c\x6a\xd0\xf6\xd8\x75\xd7\xe9\xa1\xe1\xd2\x5c\xb6\xd1\xe7\x2a\
\xa8\xf6\x52\xbe\x33\xc3\x98\x6a\x40\xb1\x20\xf0\x93\x76\xa1\xc3\
\x1c\x97\xf1\x82\x91\x2c\x21\x0d\x3f\x58\x12\x67\xcf\x9e\x9d\x43\
\x64\x9a\x72\xa2\x7a\xc4\x97\x90\xa0\x8c\x22\xf0\xfd\x52\xfe\xd4\
\xe2\x82\x07\xf3\x22\x6d\xa7\xc4\xe7\x94\xef\x9a\x30\xa7\x96\x35\
\xb5\xc0\x74\x55\x59\xd3\x02\x87\x06\x0b\x29\x41\x74\x1e\x53\xd6\
\xdf\x31\xfa\x4c\xb0\xf5\x98\x58\xa9\x9c\xa7\x7b\x4c\xb4\x54\xd2\
\x4b\xe7\x7a\x08\x21\xf5\x25\x3c\x0d\x3a\x9d\x6e\x47\x99\xc2\xea\
\xab\x4c\x86\x43\xd5\x70\x27\xb9\xea\x2b\xed\x61\x51\xb3\x6f\x45\
\x09\xc2\x6e\x17\xff\xfc\x57\xfe\xdd\x0c\x72\x1f\x5a\x5f\x47\x1c\
\xab\x61\x57\x35\x8b\x95\x8a\x20\x02\x7c\xe2\x53\x9f\x06\xb7\xb4\
\x28\xd2\x8d\x77\x30\x99\x60\x7b\x73\x13\x5b\x9b\x9b\xd8\xde\xda\
\xc2\xa5\xcd\x4d\x6c\x5d\xbc\x88\xdd\x9d\x5d\xec\xee\xee\x62\x77\
\x67\x17\x49\x12\xe3\xed\x77\xbc\x15\x5f\xfd\x9e\xaf\xc5\x6d\x77\
\xdd\x89\x24\x8e\xb4\xc7\x60\xea\xe1\x47\xb4\x00\x43\x01\x14\xf3\
\x3c\x38\x9e\x97\x95\xfc\x1c\x3f\x80\x9b\xf5\xa6\xba\xf0\x35\x40\
\xf9\x5d\x55\xf2\xeb\xe8\x72\x9f\x1b\xf6\xc0\xa9\x8b\x04\x14\x53\
\x2e\x31\x9a\xc6\x18\x8e\xa7\x88\x27\x13\x55\xda\xd3\xcf\x23\x4f\
\x12\x4c\xc7\xa3\x8c\x31\x45\x71\x8c\x28\x49\x10\x25\xbc\xb2\xcf\
\x54\xb7\x17\xe7\x02\x08\x8a\x9b\x6e\xb9\x45\x45\x60\xc8\x92\x8a\
\xd0\x70\x7c\xcf\x85\x0c\x39\x40\x15\x9e\x57\xc8\x4a\x79\x77\x41\
\x04\x51\xb9\x01\xcb\x42\xe9\xcf\xb6\x81\xe7\xa0\xb4\xd8\x87\x69\
\xeb\xf2\x76\x31\xe2\x82\x34\x01\xa9\xc5\x17\x01\x10\x47\x71\x66\
\x40\x7c\x90\x53\xd3\x19\xa1\x0a\x25\x78\xf6\xf3\x9f\x4f\x19\x53\
\x15\x38\x35\x1d\xae\x6d\x41\xa9\x2d\xe5\xbd\x6e\xac\xa9\x1c\x10\
\xa6\x10\x9e\x28\x70\x12\x9c\x43\x32\x07\xa0\xb9\x2a\x29\xad\xae\
\xa4\x59\x47\x90\x9a\x09\x48\xb3\x94\xc7\x40\x29\xcf\x1d\xc7\x69\
\x49\x20\x41\x59\x76\x6b\xb2\x62\xb3\x71\x5c\x17\xdd\x6e\x4f\xf9\
\x86\x25\x53\x88\xf1\x00\xf0\x42\x08\xa1\x32\x9a\x98\xc3\xb2\x4d\
\x2f\xfd\x1c\x53\xc6\x40\x0d\xb6\xe7\x79\x1e\x9e\x7b\xe6\x69\x4c\
\xb9\x80\xcf\x94\xcd\x4b\x22\x25\x92\x24\x86\x48\x12\x08\xc7\xc9\
\xe2\xd5\x05\x21\x60\x8e\x8b\x4b\x17\x37\x91\x08\x01\xca\x68\x81\
\x01\x28\xa7\x5b\x89\xbd\xe1\x08\x5b\x17\xce\x21\x8e\x63\x74\x7a\
\x7d\x04\x9d\x0e\x82\x20\x84\x1f\x86\x08\x82\x40\x25\xfb\x7a\x3e\
\x3c\xdf\x43\x10\xf8\xb8\xf3\xce\x3b\xb0\xb6\xbe\x86\xa7\x3e\xfb\
\x38\x06\xbb\xbb\xda\xbf\x8f\x16\xcb\x98\x94\x81\xa6\xcf\x08\x53\
\xd1\x15\x42\x33\x2b\x91\x28\xbf\x3d\xc6\x75\xba\x6f\x92\xa8\x9c\
\xaa\x24\x81\xe3\x07\xaa\xe4\x17\x47\x48\xa2\x48\x7d\x95\x1c\xc9\
\x78\x0a\x57\x70\x30\xb8\xea\x7e\xf3\x04\xd3\xc9\x18\x93\xf1\x18\
\xd3\xc9\x14\x71\x1c\x23\x49\x12\x24\x5c\x20\xd1\x79\x4f\xb2\x81\
\xdb\x78\xb9\xf8\x4a\x09\xc1\x5b\xdf\xf6\x36\x35\x5b\x25\x65\x89\
\x8c\x10\x23\x12\x1e\xc6\x70\x6d\x1e\x16\x68\xc6\xac\xcb\xcc\x1e\
\x02\x59\x14\x46\xe1\x06\x73\x8b\x8c\x2c\x5e\xbe\x5c\xae\xb3\xbe\
\xf3\xf5\x75\xb8\x10\x38\x7c\x68\x1d\x9e\xeb\x35\x2a\xe5\xa5\xec\
\x73\xe3\xc2\x46\xbd\x05\x51\xa5\x75\xd7\x62\x7b\xb8\x94\x12\xd7\
\x5c\x5b\xf2\xc9\xbb\xe2\x72\x1e\xc1\xa5\xad\x4b\xf3\x4a\x79\x75\
\x6c\xa9\x05\xa5\x16\x98\xae\x08\x90\x80\xc5\x8c\x5b\x6d\x00\x55\
\xf8\xc4\x09\x29\x40\x38\xd7\xaa\x2f\x5a\x3a\x89\xd3\x56\x38\xa0\
\x00\x95\x20\x32\x65\x4a\x0c\x84\x72\xdd\x5b\xca\xc1\x89\x52\x06\
\x49\xb9\xb2\xd9\xa1\x14\x3c\x89\x11\xc7\xca\xbb\x2e\xff\x18\x13\
\xe3\xcc\x57\xa9\xeb\x3c\xdf\x57\x4c\x23\x89\x01\x9e\x80\x50\x8a\
\x24\x8a\xb1\xb7\x7d\x19\xeb\xc7\x8e\xe9\xe6\xbf\x00\xd1\xb9\x4a\
\xb9\xa0\x81\x02\x10\xa0\x94\x61\x32\xda\xc5\x85\xfd\x11\xae\x5f\
\xee\x81\x4b\x89\x58\x08\x0c\x07\xfb\xda\xa5\x81\x1b\x02\x08\x02\
\xc6\x18\x46\x83\x01\xf6\xa3\x04\xab\x81\x57\x98\x82\x11\xba\x74\
\x18\xc7\x31\x2e\x6f\x5c\xc0\x74\x3c\x56\xec\xa5\xd7\x47\xd8\xed\
\x2a\x17\x8a\x30\x44\x10\x76\xe0\xf9\x3e\xfc\x20\x80\xef\xfb\xf0\
\x7c\x1f\x47\x0e\xad\x63\xfd\x2f\x7d\x05\x5e\x78\xfe\x05\x3c\xff\
\xf4\xd3\xe0\x71\xac\x9c\xc5\x0b\x9b\x2e\xd1\x39\x54\x14\x54\xa8\
\xe7\x4f\x32\x01\xc1\x1c\x23\x72\x5e\x59\x1e\xa5\x20\xc5\x93\x44\
\x01\x53\xe2\xc3\xf1\x62\x08\x1e\xab\xd2\xe7\x74\x02\x1e\x27\x70\
\x7d\xbd\x91\x6b\x75\x5e\x34\x55\x21\x90\xd3\x69\x8c\x69\x14\x23\
\xe6\x09\xb8\x10\x3a\x3c\x90\x58\xb7\xbf\xca\x2d\x4f\x0b\x2b\x6f\
\xb8\xfe\xba\x3c\xbe\x23\xfb\xa5\xfc\xb5\x4c\x01\x28\x8b\xc0\xc8\
\x13\x2f\x8a\x31\x18\xd9\x05\xfa\x77\x8d\x04\x56\x45\x22\x6a\x40\
\xc8\xec\x35\x49\x64\xb6\x45\xe5\x9e\x24\xd7\x65\xd5\x45\xc0\x62\
\x63\x63\xa3\x99\x81\xab\xbc\x32\x70\x92\x00\x3a\x1d\xe5\x93\x57\
\x18\xe8\x6d\xe8\xf0\x60\xb5\x23\x02\x70\x71\x73\xb3\x0e\x98\x44\
\xcd\x89\x2a\xd0\x2a\xf2\x5a\x60\x7a\x8d\xc0\x6a\x91\x5e\x53\x51\
\x14\x2b\x04\x20\x78\x16\xd7\x90\x65\x1c\x19\x0d\x69\xf5\x4f\x03\
\x9c\xb2\x3c\x26\xa1\x41\x49\x39\x2c\x08\xca\x35\x68\x29\xb0\x48\
\xe2\x08\x34\x4e\xe0\x38\x6e\x9e\x3a\x2b\x4b\x1f\xe5\x6c\xae\x45\
\x5b\xdd\xa4\x73\x51\x84\x60\x3c\xd8\x87\x14\x47\xb2\xf8\x89\x2c\
\xef\x08\x30\xd8\x19\x32\x49\xf8\x8b\xe7\x37\x71\xb4\xdf\x41\xcc\
\x05\x76\xc7\x13\x9c\x7e\xe1\x05\x1d\x51\xc1\xc1\xd3\x32\xa4\x06\
\x35\x9e\x24\xd8\x9f\x4c\xb1\x12\xb8\x05\xc6\x14\x6b\x77\x05\x87\
\x02\xc3\x9d\xcb\x88\xa7\x13\x0c\xf7\x76\xe1\x77\xba\x4a\x55\xd7\
\xed\x21\xe8\x76\x11\x76\xba\x8a\x45\x85\x1d\xf8\x41\x00\xcf\x57\
\x00\x15\x84\x01\x6e\xb9\xf5\x16\xac\xac\xac\xe0\xa5\xe7\x5f\xc0\
\xc6\xd9\xb3\xa0\x0e\x9b\x8d\x4f\x07\xd4\x73\x48\x29\xa4\x66\x6e\
\x42\x30\x48\xee\x14\xfd\xf8\x38\x07\x65\xb1\xea\x57\x25\x09\xb8\
\xe3\x82\xc7\x91\x36\x96\x75\xd5\xef\x4b\x09\x4a\x91\x95\xd0\xa2\
\xe9\x14\xd1\x34\x42\x14\x6b\x07\x88\x28\x06\x17\x12\x5c\x2a\xe0\
\xa5\x0b\x56\x90\x28\x21\x58\x5b\x5a\x02\x73\x5c\xed\x4a\x4f\xb3\
\xd2\x9a\x99\x8f\x95\x89\x20\xd2\x68\x75\x4b\x0c\x06\x0c\x16\x64\
\xf3\xb9\x43\x29\x83\x49\xb1\xae\x32\x6b\xaa\x12\x48\xa8\x2f\x4e\
\x29\x52\xbd\x9e\x6c\x28\x73\x61\xce\xc5\x15\x7c\x14\x6d\x89\x56\
\xd5\x7b\xfc\xea\xea\x5a\x05\xcc\x34\x60\x48\xf6\x54\x10\x7c\xf6\
\xb1\xc7\x6c\x3d\x26\x5b\x39\x6f\x9e\x79\x6b\xdb\x63\x6a\x81\xe9\
\xaa\x94\xf4\x16\x0d\x0b\x14\x30\xea\xf1\x94\x20\x8b\x5d\xa0\x42\
\xea\x72\x9e\x84\xe9\x30\x9e\x35\x1b\xb4\x59\x6b\x51\x99\x67\x32\
\x26\x5a\x2c\xeb\x19\xb1\x18\x7a\x47\x9e\x21\x7c\x99\xdc\x38\x2d\
\xf9\xc5\x13\xc8\x09\x03\x71\x03\x24\x71\x84\xbd\xed\xcb\x58\x3d\
\x7c\x44\x3b\x3f\xa8\x99\x1e\x62\x38\x44\xa4\x92\x72\xc7\x73\x31\
\x18\x0e\x30\xd2\x0c\xe1\x85\xb3\x67\x71\x69\xe3\x02\x98\x17\x28\
\x66\x28\x84\xea\x4d\x11\x64\x7e\x6f\x5b\x7b\x03\x5c\xbb\xdc\xcb\
\x1c\xb8\xb9\x90\xca\x91\x5b\x2b\xdc\xa6\xc3\x7d\x88\x24\x41\x34\
\x1e\x61\x32\x1c\x60\x3c\xd8\x87\xeb\x07\x08\xba\x3d\x04\x9d\x2e\
\xc2\x5e\x0f\x61\xb7\x67\x80\x54\x08\x6f\xe4\xc3\xf7\x7d\x74\x3a\
\x21\xee\x7a\xe7\x3d\x38\x7a\xfc\x1a\x7c\xee\xb3\x9f\x45\x92\xc4\
\x60\x8e\xab\xc1\x49\x66\x4a\x34\xd5\xcf\x63\x8a\xad\x52\x01\x49\
\x15\x33\x24\x9c\x81\x32\x05\x4c\x84\x31\xd0\x24\x01\x67\x09\xa8\
\xc3\x55\xd8\x62\x1c\x69\xc6\x58\xec\xdb\xf0\x24\x41\x34\x99\x20\
\x8a\x22\xc4\xb1\x12\x40\x44\x71\x82\x44\x08\x05\x4e\x54\x82\x2d\
\x50\xce\x4b\x4b\xb1\xdd\x30\x40\x77\xa9\x8f\xfd\x9d\x1d\x50\xa6\
\xca\x76\x2a\xdc\x30\xa3\x3a\x8a\x35\xa5\xa5\x3c\xdd\xb3\x4c\xc3\
\x03\x61\x30\x26\x69\x30\xa6\x8c\x88\x90\xa2\xbd\xab\x3d\x9c\x56\
\x1a\x69\xb7\x98\x65\x4d\xda\x66\xeb\xd0\xfa\xaa\x45\x11\x5a\xbd\
\xb8\xe0\xd8\xd8\xd8\x40\xa3\x67\x85\xa0\xd6\x91\xbf\xc9\x5a\x5e\
\x5e\xb2\x03\xd1\x15\x98\xb8\x4e\x27\xd3\x3a\x96\xd4\x24\x4a\xbd\
\x9d\x65\x6a\x81\xe9\xc0\x60\x24\xe7\x80\x13\x1a\x81\x13\xc9\x37\
\x31\x4a\x19\xe0\x2a\x06\xa1\x66\x87\x28\xc8\x8c\x6b\x72\x3a\xcf\
\xa4\x19\x93\xb4\x95\xf3\x58\x06\x52\x29\x68\x51\xca\xc0\x79\x82\
\x24\x8e\x94\x74\xba\x34\x10\xe9\xba\x69\x19\xcf\x28\xa6\x4d\x27\
\x90\x8e\x07\x1a\x74\x21\xe2\x18\x7b\x5b\x5b\x58\x5e\x5b\x57\x20\
\x67\x18\xbf\x02\xf9\x7c\x93\x10\x02\x7e\x10\xa2\xe3\x7b\xd8\x1f\
\x8f\xb0\xb9\xbd\x83\xff\xfa\xdf\x3e\x08\x9e\x70\x30\xaf\x24\x58\
\x27\x79\x94\xc7\x34\x8e\x95\x2c\x5b\x1f\x31\xe7\x98\xc6\x09\x24\
\x24\x2e\x5e\xba\x84\x68\x34\x84\x14\x02\x6e\xa0\x7b\x5e\x71\x8c\
\xa9\x3b\xc2\x64\xb0\x0f\x2f\xec\xc0\xf1\x7c\x04\xdd\x2e\x3a\xbd\
\xa5\x0c\xa4\x82\x30\x84\x1f\x04\xd9\xd7\xe5\x95\x65\xdc\xf1\x8e\
\x77\xe0\xdc\x2b\xaf\x62\x6b\x73\x53\xf5\xcc\xd2\x59\xac\xb4\x0c\
\xa6\x4d\x70\x21\x73\x47\x77\x4a\x04\x84\x30\x66\xc3\xa8\x02\x2b\
\x21\xb8\x4e\x02\x76\x40\x5d\x57\x0d\x49\x1b\x72\x7f\x9e\x24\x98\
\x4c\x94\x21\x69\x1c\x27\x48\x38\xc7\x34\x8e\x11\xeb\x08\x0c\xb1\
\x40\xe7\xc2\x24\x15\x8c\x52\xf8\x41\x80\xbd\x6c\x70\x36\x2f\xc9\
\x65\xb6\x4a\x84\x64\xef\x1d\x45\x94\x4a\x86\xae\x29\x90\x48\x52\
\x69\x2a\x5b\x04\x9b\x32\x6b\x32\xaf\x6b\x32\xae\xe2\xa5\x9e\xbb\
\xd8\x0c\x53\x92\x24\x18\x8e\x46\x58\x08\xad\xaf\x60\xeb\xce\x18\
\x53\x93\x17\xa2\x82\x21\x95\x4b\x91\xe7\xcf\x9d\x9b\xd7\x57\x6a\
\x9d\x1f\x5a\x60\x7a\xdd\x00\xaa\x89\x81\x6b\xe1\xec\x49\x4a\xc9\
\xcf\x3c\xff\x79\x79\xdd\x2d\x6f\x25\x3c\x49\x40\x19\x53\x53\xf2\
\x29\x6b\xca\x84\x06\x36\xc9\x2d\xd5\x15\xbd\x94\x31\x31\x08\xc6\
\x55\xaf\x44\x30\x50\xc1\x20\xb8\x2a\xe5\x11\xa2\x06\x50\x79\x1c\
\x81\x27\x3c\x2b\xe7\xa5\xc4\x49\x4a\xc0\xf5\x3d\xf8\xbe\x9f\x46\
\x42\xe7\xf1\x0e\x49\x04\x19\x4d\x40\x1d\xe5\x12\x7e\xe1\x95\xd3\
\x38\x72\xdd\x0d\x70\x5d\x17\x84\xb2\x2c\xaf\x29\x75\x3d\xe7\x71\
\x84\x9b\x6f\xbd\x05\x81\xc7\xf0\xd8\xe7\x9e\xc1\x87\xfe\xf0\x43\
\x78\xfc\xb1\xcf\x22\xe8\x2d\x65\x81\x7a\x54\x03\x41\x36\xcf\xe4\
\xb8\x58\xea\x04\xe0\x42\x22\x11\x02\x89\x50\xa0\xc4\xf5\x06\xfe\
\xc8\xc9\x13\x6a\x9e\x28\x89\x31\x1d\x0d\x94\xb2\xce\x53\x0a\xba\
\xd8\x71\x11\x4f\xa7\xa0\xae\x8b\xc9\x70\x80\xc1\xce\x8e\xea\x3d\
\x75\xbb\x59\x2f\x2a\xe8\x76\x11\x86\x5d\x78\xbe\x8f\xb0\xd3\xc1\
\x2d\x6f\xbd\x0d\x41\x27\xc4\x85\x33\x67\x20\x79\x02\x18\x43\xc3\
\xd2\xec\xe7\x80\x42\x32\xa9\x1c\xdb\x85\xee\x43\xa5\x06\xb9\x8c\
\x41\x72\x0e\xce\x04\x68\xa2\x4f\x06\x92\x18\x32\x89\x32\xe2\x24\
\x04\x47\x34\x51\x3d\xa6\x24\x49\x90\x24\x5c\xb1\xa7\x84\x9b\xba\
\x82\x85\x0b\x55\x2e\x63\x38\x7e\xc3\x8d\xaa\x34\x49\x99\x2e\xc9\
\xa5\xac\x89\x14\xca\x76\xd2\x28\xe9\x91\x02\xfb\xc9\xe3\x2f\x88\
\x4c\xbd\x84\x49\x61\x1e\x8b\x14\x54\x37\xb6\xcd\xbb\x04\x6c\x65\
\xd2\x21\x04\xd6\x57\x57\x4b\x11\x2c\xf3\x4a\x95\x14\xd3\xe9\x74\
\xf1\x27\xa5\xb6\xe0\x55\xe5\x1c\x41\x0a\x06\xae\xcd\xca\x79\xf5\
\xcc\x8a\x73\x8e\xdd\xbd\xdd\x45\x12\x6b\x5b\x80\x6a\x81\xe9\x0d\
\x53\xce\x2b\x53\x7b\x96\xa9\xdc\xa0\x36\x34\xc9\x39\x24\x63\x90\
\x84\xce\x46\x1b\xa4\x61\x7f\xaa\xa9\x93\xf5\x99\xa8\x60\x90\x54\
\x80\x32\x01\xc9\xd5\x9c\x91\x10\x3c\x2f\xe5\x31\x06\xc1\x13\x24\
\x5a\x08\x50\x98\x4f\x49\x5d\x0c\xf2\x53\x3f\x35\xd4\x3b\x9d\xa8\
\xcd\xae\xb7\x0a\x42\x29\x46\xfb\x7b\xd8\x3c\x73\x1a\xd7\xdc\x78\
\x73\x41\x4c\x90\x0e\xf3\x3a\x8e\x8b\x43\xab\x7d\xfc\xe6\x7f\xfa\
\x4d\x9c\xfc\x93\x4f\x62\x34\x99\xa2\xbb\xb2\x9e\xb1\x29\x0a\x0e\
\x30\x9a\xb9\x78\xa7\xbf\x97\x70\x8e\x69\x92\x20\xe2\x8a\x59\x24\
\x5c\x20\xe1\x1c\x93\x69\x84\x87\x3e\xfa\x91\xac\x04\x28\x93\x04\
\x60\x1c\x9d\x4e\x07\x0e\x05\xa2\x68\x82\xf1\x74\x0a\xe6\x2a\x80\
\x62\x8e\x83\xc9\x68\x80\xd1\x7e\x80\x7d\x6f\x0b\x41\xaf\xa7\x00\
\xaa\xd7\x57\x3d\xa8\x30\x44\xd8\xe9\xe0\xd0\xe1\x43\x08\x82\x00\
\x2f\x7e\xfe\xf3\x10\x49\x9c\x59\x39\xa5\xcf\x6d\xe6\xbc\x91\x3e\
\xdf\x4c\x85\x22\x11\x4a\x40\xb8\x8a\xae\x17\x8c\x81\x72\xae\x18\
\x14\xa5\xa0\xb4\x8f\x78\x32\x56\xc3\xc9\xfa\x39\x4d\x62\x25\x80\
\x88\xa2\x48\xd9\x43\x25\x89\x02\xdd\x03\xce\x32\x15\x62\x51\xa4\
\x69\xcc\x9a\x83\x8c\xca\x50\x2a\xe1\x89\xe9\x8b\x37\xc3\x82\xd2\
\x7e\x63\xd9\x0f\xab\x2c\x82\x58\x8c\x35\xcd\xfa\x4a\xcc\x5f\xd3\
\x68\x8a\xc9\x64\x02\x72\x25\x39\x16\xb2\x19\x36\x51\x4a\xd0\xe9\
\x74\x1b\x83\xce\x3c\x2a\x45\x28\xc1\x74\x32\xc5\x78\x34\xe2\x73\
\x00\xa9\x0a\xa0\xda\xde\x52\x0b\x4c\xaf\x1b\x38\x01\xd5\x61\x81\
\xd6\x37\xa4\x14\x42\xc9\xb3\xcd\x09\x4a\x92\x97\xbf\xb2\x0b\x08\
\x81\x34\x7c\xf2\x24\x53\xee\x0a\x54\x0a\x48\xc7\x01\x15\x02\x94\
\x73\x48\x2a\x32\x85\x1e\x8f\x23\x70\x9e\xc0\x71\xdd\x6c\x5f\x73\
\x5d\xc5\x96\x4c\xfb\x1a\x92\xef\x4a\x10\xd3\x31\x88\xe3\x81\x84\
\x3d\x50\x4a\x11\x4d\x26\xb8\xf0\xca\xcb\xe8\x2d\xaf\x20\xec\xf6\
\xe0\xf9\xbe\x3a\x73\x47\x8c\xe9\x60\x17\x0f\x7f\xfc\x63\xd8\xdb\
\xd9\x01\xa1\x14\x41\xb7\x07\xc7\xf3\x40\x18\xcb\x8c\x42\x85\x4e\
\xa3\x15\x44\xd9\xfa\xf8\x61\x00\x4a\x80\x69\x12\x23\x4e\x38\x12\
\xce\x11\xc5\x09\xa6\x71\x84\xc7\x9e\x3c\x85\x67\x3e\xfb\xa8\x76\
\x6f\x60\xe8\x2d\xaf\xa0\xd3\xed\x2a\x66\x29\x25\x28\x24\xa2\x84\
\xab\x24\x59\xae\xca\x64\x3c\x49\x90\x44\x11\x22\xc7\xc1\x74\x34\
\xc4\x70\x37\x65\x51\xaa\x1f\x15\x74\xba\xe8\xf4\x7a\xe8\xf6\xfb\
\x38\x76\xdd\xb5\x38\x77\xfa\x74\x76\x9f\xca\x9e\x84\x66\xff\x49\
\x12\xc5\x0c\x29\x28\x88\x24\x59\x7f\x8f\x32\xa6\x07\x8e\x3b\x18\
\x53\x82\xf1\xde\x8e\x3e\xc5\x90\xe0\x9c\x67\xca\xbc\x38\x56\x8f\
\x2f\x4a\x12\xdd\x3f\x73\x00\x4a\x16\x2e\xe7\x31\x42\x71\xfc\xfa\
\xeb\xf1\x68\x81\x51\x57\xe4\x30\xc9\xd9\x0d\x56\x01\x95\xd1\x74\
\x2a\xd5\x8b\xab\x45\x10\x8b\xb0\x26\xf5\xde\xed\x86\x61\xe3\x4a\
\x1c\x01\xb4\x73\xba\xbc\xf2\x4f\xe1\x1c\xa0\x92\x52\xc2\x73\x3d\
\x1c\x3f\x7e\x4d\x51\xdd\x48\xb0\x10\x43\x2a\x5c\xc5\x68\x2f\x1a\
\x47\x9d\x4c\xbc\xe9\x80\x6d\xbb\x5a\x60\xba\x2a\xbd\xa6\xa6\xec\
\xa9\x94\x83\x90\x36\x8e\x05\xa0\xa5\xca\x34\xb5\xf2\x29\x7c\x14\
\xd2\xe0\x3a\x2d\x80\x20\x54\xcb\xc2\x19\x28\x15\xa0\xcc\xd1\xea\
\x32\x83\x35\x09\xd5\x87\x52\xe9\xae\x5c\x87\xf7\x29\xd6\xe4\x69\
\x89\xb5\x30\x32\xa1\x8a\xfb\x10\x81\x88\x26\x58\xbb\xe6\x7a\x50\
\xcf\x03\xd7\x0e\xdc\xe3\xe1\x00\x49\x1c\xc1\x0f\x54\x78\x1f\x8f\
\xa6\x20\x44\x42\x50\x86\xee\xaa\x8a\x12\x60\xae\x07\xea\x78\xd9\
\x99\xb6\xb6\x8f\x50\x60\x29\x94\xc8\xe1\xf8\xf5\xd7\xa1\xe3\x79\
\x1a\x8c\x94\x43\xc2\x68\x32\xc1\xfe\x60\x80\x0f\xbc\xef\x97\x11\
\x47\x11\x96\x96\x57\xd0\xeb\xf7\x35\xa0\xa6\xbd\x15\x20\xf0\x7d\
\x04\xbe\x6a\xee\x73\xce\x31\x4d\x22\x24\xb1\xc0\x94\x4b\x35\x48\
\xeb\x38\x60\x63\x55\xe6\x1b\xed\xef\xc1\x71\x3d\xf8\x61\x47\xf5\
\xa1\x7a\x7d\xf4\x96\x96\x11\x84\xa1\x16\x12\xb0\xdc\x04\x97\x92\
\x02\x50\x65\x5a\x6d\x69\x98\xeb\x4a\x40\x12\xa6\xae\x2b\xf4\xf5\
\x67\x5e\x4b\x99\x01\x53\x14\xc7\xe0\x9c\x23\xd1\xe0\x1b\x0b\x01\
\x37\x4d\xc9\x5d\x80\x14\x10\x42\xb0\xbc\xba\x9a\x65\x78\x49\x99\
\x06\x4c\x1a\x12\xf1\x4c\x83\xa0\x81\x2a\x55\xe6\x99\x3d\xa8\x19\
\x60\x31\xb8\xb9\x94\x99\x08\x62\x61\xd6\x64\xfc\xfd\x63\x47\x0e\
\xcf\x2d\xae\x65\x7b\x3a\x21\x18\x0c\x87\x10\x5c\x0d\x61\x5f\x11\
\x28\xcd\xe9\x1b\x11\x42\xc0\x85\x1d\x04\x9b\x32\xa4\xf2\x65\x84\
\x50\x6c\x6f\x6f\xe3\x2a\x95\xf0\x5a\x70\x6a\x81\xe9\x8a\xcf\xcd\
\x9a\xf8\xe4\xd5\xf5\x9d\x8a\x25\x06\xe8\x8c\x26\xce\x21\x1d\x35\
\xd3\x64\x0e\xb5\x12\x42\xf2\xfd\x84\x52\xc5\x1c\x8c\x5e\x13\xa5\
\x42\x7d\x65\xca\xe9\x80\x72\xae\xe4\xe3\x44\xfd\x2c\x89\x23\xd0\
\x24\x01\x73\xdc\xf9\x1f\xbf\xb4\xa4\x97\x44\x18\x6f\x5d\xc0\xfa\
\x5b\xde\x8a\x98\x31\xd5\xd7\x21\x02\xd1\x64\x82\x78\x3a\x85\xeb\
\xb9\x60\x94\xc1\xf5\x43\xb5\x7f\xeb\xd2\x60\xe6\xd3\x97\xb2\x3f\
\x6a\x2a\xb9\xd4\xe0\xed\x0d\xd7\x5f\x07\x42\x80\xfd\xd1\x18\xc3\
\xf1\x18\x7b\x83\x01\x76\x76\x77\xf1\xa9\x4f\x7e\x12\x4f\x9d\x7c\
\x18\x9d\x6e\x0f\x6b\xeb\x87\x72\x09\xbd\x51\xd2\x32\x8d\x07\x18\
\x63\xe8\x30\xa6\x94\x7c\x71\x02\x50\x20\x8a\xa7\x88\xa7\x13\x30\
\xe6\x20\x9e\x8c\xe1\x78\x3e\x26\xc3\x01\x86\xbb\xdb\x70\x7d\x1f\
\x41\xb7\x0f\x42\x29\xe2\x48\xc9\xc0\x29\x73\x32\x21\x47\x3a\xe3\
\x54\x60\x50\x33\xbd\x3e\x99\xb9\x60\xcc\xa8\xa6\x35\x58\xc6\x51\
\x84\x38\x52\x66\xb0\x69\x39\x2f\xe6\x5a\x99\x27\xd1\x28\xc5\xb7\
\xbc\xa9\xaf\xad\xaf\xe7\x8f\x3d\x05\x95\x2c\x06\x3d\x77\x7d\x20\
\xa5\x77\x61\x31\x6e\x3d\x3b\xc7\xc9\x67\x6b\xd3\xb9\x36\x42\x66\
\x7b\x2d\x35\xac\x29\x2d\x1f\x96\xdf\xf4\x8e\xc3\x1a\x75\x7c\xd2\
\xcb\x26\x93\x31\xe6\x8c\xf0\x36\xa3\x5f\x56\xb0\x32\x1e\x91\x90\
\x58\x5e\x5d\xc1\xe1\xc3\x87\x4b\xe0\xb4\x00\x43\xb2\xfc\x1d\xfd\
\x45\x34\x38\x9a\x1a\xb7\xb6\x00\xd5\x02\xd3\xeb\xde\x6b\xb2\x1b\
\xe3\x69\xaf\x35\x99\x24\x7a\x3e\x46\x40\x4a\x32\x23\x84\xc8\x26\
\x9b\x28\x05\x91\x0c\x94\xa5\x91\x0c\x4a\x94\x40\x05\xcb\x58\x13\
\xe5\xf9\xc0\x6d\xca\xa2\x92\x38\x06\x65\x4c\x0d\x82\x3a\x0e\x5c\
\xd7\xb3\xc6\xbe\xa9\x7d\x8f\x60\xb4\xbd\x05\xf9\xc2\x33\x58\xba\
\xee\x66\x05\x88\x9a\x25\x50\xa6\x06\x77\x29\x53\x76\x48\x4c\x83\
\x83\x30\xcf\xe8\xd3\x0f\xbf\x0e\xd9\xa3\xc4\xc9\xb6\xcd\xb7\xdd\
\x7a\x33\xf6\x86\x43\xec\xee\xed\x63\x7b\x77\x17\xcf\x3e\xfb\x2c\
\x3e\xfe\x47\x1f\xc6\xa9\x13\x0f\x21\x8e\x62\x55\x66\x34\x9e\x9e\
\x6c\x96\x26\x55\xa1\x91\xfc\x7c\x1d\x52\xf9\x9f\x75\x98\x0f\x02\
\x80\x01\x88\xe2\x04\x8c\x02\x22\x89\x30\x9e\x8c\xc1\x5c\x0f\xcc\
\x71\x30\x1d\x39\x18\xef\xef\x83\x30\x06\xe6\x7a\x70\x5c\x95\xef\
\x44\xb3\xc7\xc2\xb2\xc7\x64\x32\xa8\xd4\x1e\xaa\xb0\xd9\xe9\xdd\
\xbd\xb0\xc9\x11\x55\x96\x4d\x92\x18\x49\x1c\x2b\xf7\x07\xce\x11\
\x2b\xf7\x69\xa3\xc7\xb7\xf8\x06\x7c\xf8\xc8\xe1\xbc\xc7\x64\x91\
\x76\xe7\x83\xb5\x65\x01\x84\x34\x4a\x79\x06\xfb\xa9\x80\x8c\xf4\
\x3d\x67\x5e\xd3\xc6\x9a\x60\x29\xfd\x11\x02\x84\x95\xa5\x3c\x52\
\x94\xff\xe9\xb5\xbb\xbb\xab\xfb\x5d\x24\x63\x7c\x57\x0c\x4e\xd6\
\x0f\xaa\x72\x29\xe9\xf7\x7a\xa5\xde\x6a\x83\x72\x5e\xc5\xa5\x84\
\x12\x3c\xf2\xc8\x49\xa0\x99\xdb\xc3\x3c\xe3\xd6\xb6\xa4\xd7\x02\
\xd3\x55\x67\x4f\xf3\xc0\xc9\x78\xd3\x92\xec\x5c\x35\x57\x84\x13\
\x10\x21\x95\x3a\x8f\x0b\x50\x66\xd9\xc0\x52\xd1\x01\x28\x40\xb5\
\xd7\x9e\x64\xa0\x54\x42\x32\x75\x46\x48\x85\x00\x65\x5a\xd2\xcc\
\x12\x08\x4e\xb3\x50\xc1\x24\x8e\x40\xa9\xea\x35\x65\xc0\xe4\x79\
\x66\xda\x59\xfe\x77\xd2\xb2\x0e\x21\x98\xec\x6e\x43\x0a\x89\xde\
\x35\xd7\xe7\x65\x46\x53\x84\x61\x30\x0d\x70\xae\xa7\xff\x79\x76\
\xb7\x85\x10\x48\xf4\xa0\xaf\x90\x02\x37\xdc\x78\x23\xba\x81\x87\
\x57\xce\x9e\xc3\xc6\xc6\x06\x3e\xfd\x89\x4f\xe0\xc4\x27\x3e\x86\
\xcb\x9b\x9b\x3a\xce\x22\x9d\x2f\xd2\x77\xc7\x98\xbd\x49\xcb\x4b\
\xe5\x01\x53\xf3\x85\x08\x7c\x0f\x61\xa0\x4a\x89\x49\xa2\x8c\x56\
\x27\xa3\x01\x22\x10\x38\x9e\x07\xaa\x73\x9c\x52\x47\x75\x1a\x3b\
\x0a\x90\x5c\x17\x8c\x39\x60\xda\xa6\x48\x05\x31\xa6\x16\x4f\x24\
\xf3\xdf\xcb\xa2\x49\x32\x24\x2a\xbe\x50\x42\x08\xf0\x84\x2b\xa6\
\x94\xda\x12\x25\x1c\x5c\x14\xed\x84\x16\xe9\x33\x11\x00\x61\x10\
\xcc\x60\xc1\xec\xad\x58\xd4\x78\x12\x25\xda\x64\xe2\x6b\xda\x63\
\x24\x85\x1e\x23\xcc\x7f\xd7\xb1\xa6\xc2\xd0\x2d\xc0\x28\xc3\x52\
\xaf\x67\x67\x4b\xc4\x8e\x26\x83\xc1\xa0\x00\x46\xa4\x02\x10\x6a\
\xc9\x44\x03\x13\x72\x02\x20\xd6\x23\x0a\x36\x30\x3b\x48\x39\x8f\
\x80\x60\x5f\x39\x8b\x73\x2c\x2e\x7c\x68\xcb\x78\x2d\x30\xbd\x26\
\x3d\xa6\x45\x92\x6c\x67\x52\x6c\x0b\x1b\x84\xae\x78\x09\x29\x20\
\x78\x02\x29\x1c\x48\x9a\x0f\xc0\x66\x3d\x89\xec\x4c\x96\x82\xd2\
\x1c\x50\x54\xf2\x6a\xca\x98\x1c\x50\xc6\x41\xf4\x57\x29\x84\x56\
\xee\x31\x0d\x12\x91\x76\x2a\x27\xf6\x93\x4d\xb3\x1f\xa1\x37\xa7\
\xe9\x60\x17\x38\x2f\xd1\xbd\xe6\xfa\x3c\x1a\x43\x2a\xa9\x6f\xce\
\x2c\xf2\x92\x89\x69\x4c\x9b\x9e\x9d\x72\x2e\xb0\xbc\xba\x82\xbb\
\xdf\x7e\x3b\x5e\x7d\xf5\x0c\x36\x37\x36\xf0\x5f\x7f\xeb\x3f\xe1\
\xfc\xe9\x97\x91\x4a\xe7\x05\x01\x48\x92\x75\x56\xb4\xbc\x5d\x16\
\xc1\x09\xb9\xd4\xb9\xaa\x5c\x94\x0d\xfe\x3a\x0c\x4b\x6e\x17\x9d\
\xc0\x47\x1c\x27\xe0\x52\x62\x32\x19\x21\x4e\x59\x94\xab\x4c\x5d\
\x99\xe7\xa9\xa1\x59\x4a\x55\x8f\xca\x51\xbd\x2a\xca\x9c\xdc\x34\
\x57\xa7\xf9\xa6\x60\x0c\x5d\xea\x93\xe5\x92\x91\x94\xe0\x5c\x7b\
\xed\x71\x0e\xce\x05\x92\x24\x41\x94\xa8\x4d\xf1\xa0\x3b\x50\x81\
\x45\xa2\x38\xd8\x5a\x28\xed\x15\xd4\x78\x16\xa5\x9e\x29\x6e\x40\
\x41\xa7\x67\xc4\x64\x18\x4c\xbd\x54\x68\xb3\xb3\xa6\xfc\x67\xcc\
\x74\xa0\x2f\x9d\x54\x15\x98\xa5\x26\x70\x1b\x17\x36\xd0\x24\x7b\
\x49\x36\xa1\x47\x73\xc4\x0f\xd7\x1c\x3f\x0e\xdf\xf3\x8c\x32\xe6\
\x15\x96\xf3\x00\x3c\xf3\xf9\x67\xe6\x95\xf2\x16\x95\x89\xb7\x20\
\xd5\x02\xd3\x81\x18\x52\x15\x58\x35\x99\x6b\x2a\x5e\xaf\xec\x8d\
\x27\x04\x24\x4f\x20\x05\x87\x94\x54\x0f\x1d\x51\xdd\xab\xa1\xc5\
\x5f\xa1\x14\x04\x52\xc9\xc6\xa5\x84\x64\x02\x54\x28\x30\xa2\x8e\
\x03\xc6\x39\x64\x0a\x4c\x52\x1d\x3c\x8e\xb5\xcd\x8e\x63\xdc\x01\
\xdb\xe9\x63\xbe\x51\xa5\xd7\x8a\x06\x7b\xc0\xf9\x33\x08\x0f\x1f\
\x03\x75\x7d\xc3\x01\x9d\x6a\xd3\x54\x02\x70\x02\x49\x38\x88\xa0\
\x90\x9c\x17\x1e\xae\xe0\x1c\x87\x56\xfa\x38\xb4\xb6\x8a\xaf\xfe\
\xd2\x77\xa3\x1f\x78\xf8\xe0\x7f\xf9\x2f\x10\x52\x2a\x23\x55\xce\
\x41\xa4\xc8\x9d\x2a\x0a\xb6\x04\x06\x38\xa5\x65\xa3\xf2\xcb\x32\
\x93\xd6\x9b\x5f\xe6\x3a\x2e\x5c\x3d\xf8\xd9\x09\x7c\x44\x71\x02\
\x2e\x81\xd1\x78\xa8\xfa\x51\xae\x0b\x47\x97\xf6\x84\xe3\x20\xa1\
\x91\x56\xde\xb9\x06\x7b\x52\x4a\x48\x5a\x62\x8a\x28\xe5\xfa\x48\
\xa9\x14\x96\x82\xab\xe7\x9e\xeb\x23\x49\x38\x22\xce\xc1\x85\x80\
\x24\x6c\x61\x83\x6c\xd7\x71\x8b\x01\xc4\xe5\x5d\xd3\x74\x65\xb0\
\x56\xa7\x52\x43\xd7\xa2\x6c\x7c\x56\x5c\x27\x4b\xd2\xf1\xd9\x3f\
\x68\xfe\x2b\xbb\x45\xa9\xec\x93\x1c\x0d\x4c\x96\x57\x23\x7f\xa7\
\x65\x6a\x50\x89\xe7\x5f\x78\xa1\xa1\x55\x6a\x43\x70\xaa\xfa\x90\
\x4a\xe5\x93\x97\xda\x50\xcd\xa7\x4b\xcd\xca\x79\x2f\xbf\xf8\x52\
\xca\x8a\x0e\x12\xab\x8e\xb6\x8c\xd7\x02\xd3\x6b\xc1\x9c\x9a\xb8\
\x3e\x08\x34\x91\x85\x6a\xb7\x71\x29\x38\x38\x57\x0c\x42\x52\xaa\
\x40\x05\x34\x2f\xdf\xe8\x8d\x9b\x08\x68\xc7\x71\x09\xc9\x18\xa8\
\x14\xba\x94\xa7\x65\xe3\x0e\x07\x15\x5c\x2b\xf4\x84\x12\x48\x30\
\xa1\x4b\x4d\x31\x08\xe9\xe4\xb1\x18\x15\x49\x07\xc4\x4c\x43\x25\
\x14\xd1\x70\x0f\x3c\x9a\x20\x58\x3d\x84\xce\xfa\x91\xdc\xc5\x3c\
\x95\xaf\x43\xc5\xa2\xa7\x06\xaf\x69\xe4\x77\x12\xc7\xb8\xe3\xce\
\xb7\xe1\xab\xbe\xf2\x2b\xf0\xa5\xef\xb8\x0b\xeb\x9d\x00\x14\x04\
\x37\xdd\xfe\x56\xbc\xfa\xc2\x73\x19\x7b\xd3\x05\x33\xc4\x51\x94\
\x19\x95\x92\xc2\x60\xa8\x4e\x3f\x22\xf6\x4d\xaf\xd0\xff\x49\xbf\
\x90\x62\x04\xa3\xe3\x38\x59\xf4\xb7\xe7\x50\x8c\xc7\x13\x4c\xc7\
\x43\xc4\xa3\x01\x98\xeb\x2b\x16\xe5\xab\xaf\x69\xa9\x8f\xa4\xa2\
\x12\x46\xf3\x1e\x14\xa1\xa0\x42\x40\x08\x5e\x7a\x57\xa8\x7e\xa1\
\xc9\x9a\x84\x50\x0e\xe3\x09\x4f\xcd\x5c\x0f\xd0\x64\xaa\x2c\x36\
\xd5\x49\x07\x66\xc3\xf0\xf2\xc8\x07\x59\x59\x36\xb3\x89\x20\x0c\
\x8b\x3d\xd8\x24\xe3\x52\x0a\xf4\x7a\x3d\xf4\xfb\x3d\x54\x51\xd9\
\xad\xd1\x18\x1e\xa5\x08\x3d\x17\x54\xb3\xa6\x8d\x8d\x0d\x55\xca\
\x6b\x80\x37\x07\x06\x27\x7d\xa2\xb3\xb2\xba\xda\x1c\x74\x1a\x80\
\x95\x90\x12\x67\xce\xbc\x3a\xcf\x55\x5c\x36\x60\x50\x2d\x5b\x6a\
\x81\xe9\x8a\x59\xd3\x95\x18\xb8\x0a\x10\x54\x3b\x56\xea\x90\x3f\
\x41\x22\xe5\xd6\x20\x84\x1a\xb8\x25\x02\x92\x11\x10\x50\x18\x23\
\x2c\x6a\x63\x49\xc1\x89\x32\x50\x26\xc0\x1c\x06\x29\x18\x24\x73\
\x20\x98\x06\x38\x21\x54\xa9\x4f\x2b\xf4\x88\x10\x88\xe3\x18\xd3\
\x68\xaa\x98\x44\xaa\xc4\x33\x36\xcd\x4c\x9d\x57\x3a\x4f\x16\x49\
\x8c\xf1\xa5\x0b\x48\x86\xfb\x08\x57\xd6\xd0\x3f\x7a\x5c\x07\x09\
\x6a\x53\x53\x21\x95\xcf\x9c\xa0\x10\x89\x80\xef\xfb\xb8\xeb\x9d\
\xf7\xe0\x4b\x1f\xbc\x0f\x6f\x7d\xcb\xcd\xf0\x18\x4b\x8d\xbe\x71\
\xe8\xc8\xd1\x4c\x06\x9f\xc9\xb3\xcd\x3d\xd8\x02\x4e\x40\x6e\xbd\
\x53\xb5\x01\x92\x19\x80\x22\xb3\xec\x94\x00\x81\x1f\x20\xf0\xfd\
\x7c\x10\x36\x8a\x31\x9d\x8e\x10\x4f\xc7\xaa\x9c\xe7\xa6\xf9\x4d\
\x01\xa8\x23\x40\xd3\x9e\x9d\x06\x27\xe5\xb6\xc1\x8b\x55\x20\xed\
\x34\x9e\xca\xc4\xb9\xee\x31\xc5\x71\x0c\x21\x16\x17\x3f\x98\x19\
\x49\x64\xc1\xae\xc8\xec\xf5\xca\x35\xaa\xd2\xcf\x24\x0c\xb6\x54\
\x14\x41\x54\x83\xa3\x96\x58\x48\xc0\x75\x9c\xcc\xf4\xb7\xcc\x62\
\x2f\x8f\xa7\xb8\x38\x8e\x41\x09\x81\x37\x8d\xe1\x53\x8a\x9e\xeb\
\x80\xf8\x1d\x10\x42\xb5\x45\x17\x2d\xc5\x95\xd4\x55\xeb\x16\x04\
\x27\x09\x2c\x2f\x2f\x17\x1e\x76\x13\x13\xd7\x3a\xb0\x92\x52\x20\
\x9a\x4e\xe7\xe5\x30\xcd\x8b\xbb\x68\xc1\xa8\x05\xa6\xd7\x8c\x35\
\x35\x03\x25\x45\x21\x44\xf9\x8c\xaf\xd0\x72\x52\x9a\x63\x70\x1d\
\x41\xa1\x14\x7a\xb4\xf8\xa1\xc8\x14\x7a\x6a\x20\x94\x50\xa9\x7a\
\x34\x3a\x1e\x9d\xe8\xc6\x3d\x63\x0e\x04\xe5\x4a\x9d\xc7\x28\xa4\
\x64\xa0\x42\xbd\x84\xd3\xc9\x04\x8c\xb1\xac\xc4\x55\xc5\x98\x64\
\xc5\xd6\x10\x8f\x87\x48\xa6\x63\x44\xfb\xbb\xf0\x3a\x5d\x74\xd7\
\xf5\xfc\x0a\x73\x11\x4d\xa7\x18\x0f\xf7\xd1\xed\xf5\x70\xeb\xed\
\xb7\xe2\xe6\x9b\x94\xa5\x91\x90\xa2\x20\x79\x36\xfb\x37\xa6\x23\
\x35\xd1\x6e\x0c\x79\x94\x79\x69\x53\x24\xb2\x62\xd3\x22\xb3\x00\
\x45\x8a\x60\x34\xb3\xc5\xe9\x24\x5e\xd7\xf3\xd0\x09\x81\x84\x27\
\x88\x22\x65\xbc\x3a\x1c\x0e\x10\x4f\xc7\x70\x26\x3e\x98\xe7\xc3\
\xf1\x02\x30\xcf\x05\x49\x74\x59\x8f\x29\x60\x22\x33\xe1\x75\x52\
\x27\x14\xe7\x8e\x16\xb1\x2e\xe3\xe9\x37\xc1\x02\x02\xe9\x2b\xdf\
\xb7\x0c\x92\x64\x05\x24\xf5\x5a\xd7\x64\xbf\x9b\x25\xc2\x6c\x53\
\x37\x7b\x4d\x32\x73\xb0\xb7\x3d\xaa\xad\xe1\x04\xe7\x47\x53\x78\
\x4c\xbd\x2f\x63\x49\x10\x73\x60\x3f\x89\xf1\x37\x7f\xe4\x7f\xc3\
\x7d\x5f\xfb\x4d\xf8\xed\x0f\xfc\x7b\x9c\xfc\xd8\xff\xc0\xfe\xce\
\xb6\x76\x2a\x61\xa0\x35\x20\x55\xb2\xa1\x6d\xc4\x9a\x56\x57\x57\
\xab\x81\x7d\xc1\x72\x1e\x25\x04\x51\x14\x61\x7f\x7f\x3f\xb9\x82\
\x1e\x53\x5b\xca\x6b\x81\xe9\x35\x65\x4d\x8b\x00\x94\xcc\xcc\xbe\
\x6d\x4f\x30\x23\x48\xa4\x50\x1f\x4e\xe6\xa8\xf9\x20\x2d\x84\x50\
\x67\xae\x86\x3b\x01\x84\x96\x8e\xab\xa8\x0b\xe6\xb8\x88\xe3\x04\
\x93\x28\x86\xc7\x1c\x08\x2e\x94\x15\x51\xea\xc5\x47\x05\x24\xa3\
\x2a\x18\x8f\xf0\xfc\xec\x96\x18\xea\x32\xd3\xd4\x55\xbb\x56\x17\
\x3f\xa6\xb9\x3b\x37\x24\x10\x8d\x06\x88\xc7\x43\x8c\x2e\x5f\x52\
\x9b\x0e\x18\xa6\x52\x0b\x0f\x96\x97\xe0\x07\x81\xf2\xd8\x03\xc9\
\x6c\x79\xa4\x51\x1e\xcc\x98\x12\x8c\xaf\x65\x65\x48\xe9\x2e\xda\
\x3a\xef\xa4\x11\x20\x99\xd7\x25\x56\xc6\xaa\xfa\x51\x1e\x00\x09\
\xdf\x75\x30\x1c\x8d\x30\x1d\x2b\x80\x62\x5e\xa0\x01\xca\x87\xe3\
\xb8\x59\x6f\xad\x1c\xf3\x90\x47\x9c\xab\xf3\x10\xa1\xdd\x2f\xd2\
\x7e\x93\x90\x4c\xb5\x0f\xb1\x60\xab\xc9\x48\x37\xb6\x09\x0a\x2c\
\xff\x9c\xff\x4e\x26\x75\x48\x56\x49\x2f\x2c\xbf\x22\xd1\xef\xf5\
\xb2\x32\x69\x7a\x59\xc2\x05\x5e\xd9\xd9\x07\x28\x53\xa5\x54\x50\
\x25\x22\x21\x4a\x3c\xb3\xdc\xed\xe0\xcb\xee\xfb\x12\xbc\xfb\x4b\
\xde\x81\xed\xc1\x08\x4f\x3f\xfb\x3c\x1e\xfd\xd4\xc7\xf1\xdb\xff\
\xe6\x5f\x63\x6f\x7b\x7b\x36\x85\xd9\xb8\xff\x8b\xb0\x27\xe5\x93\
\xb7\xb6\x10\xbf\x9c\x07\x56\x42\xc5\x75\x5c\x49\x09\xaf\x05\xa4\
\xab\xb4\xe8\x9b\x1c\x90\x80\x6a\xb7\x87\x26\x7d\x26\xa1\x27\x22\
\x6b\x4b\x14\xc4\x70\x82\x90\x52\x00\x32\x15\x30\x94\xaa\x24\x69\
\x9c\x3a\xa1\x98\x4e\xc6\xd8\xdf\xdf\xc3\x9d\xb7\xdf\x82\x7f\xf2\
\xc3\xef\xcd\x66\x77\xd4\x10\x29\xcb\x5c\x0e\x28\x65\x20\x2c\x97\
\x7d\x93\x39\xa7\xda\x66\x8c\x77\x9a\xdb\x94\x29\xee\x90\x02\x0d\
\x29\x94\x37\x54\x46\x11\x2b\x46\xc0\x9b\x51\x19\x7a\x05\x61\x58\
\xd8\xd8\x49\xf1\x7f\x28\xe2\x47\x51\x46\x3e\x0b\x34\xe9\x75\x88\
\x61\x2b\x64\x64\x5b\x19\xce\xe6\xb9\x93\x86\x61\x47\x64\x24\x07\
\xa7\x9b\x4f\x18\x06\x38\xb4\xb6\x86\x23\x87\xd7\xb1\xb6\xd4\x83\
\x4f\x05\x92\xd1\x00\xe3\xbd\x1d\x8c\xf6\xf7\x30\x1e\xec\x23\x8e\
\xa6\xf9\x1d\x30\x06\xa2\xcb\x0e\x03\x6a\x93\xe6\x2a\x02\x43\x3f\
\x7f\x8b\xbc\xf9\x84\x10\xf9\x7d\x9c\xe5\x89\x07\x7e\x4b\x4b\xe3\
\xdd\x2b\x9b\x9e\x93\x99\xd7\x37\x7e\x29\x73\x16\x97\x99\x6b\x31\
\xce\x5c\xde\xc1\xd6\xfe\x10\xa3\xe9\x14\xe3\x28\xc2\x38\x8a\x31\
\x89\x63\xc4\x89\x06\x6c\x09\x24\x42\x40\x12\x82\x63\xab\xcb\xf8\
\x8e\xbf\xfc\x65\xf8\x67\xff\xf0\xa7\xf0\x89\x47\x1f\xad\xcf\x75\
\x9a\x01\xe2\x9a\x4c\x76\xa9\x66\x8e\x3a\x9d\x4e\x31\x8b\x6c\xe6\
\x31\xcb\xf9\x9c\x55\xe6\xaf\xf1\x1c\xd7\x87\x45\x24\xe2\x2d\x38\
\xb5\x8c\xe9\x35\x01\xab\x45\x59\x53\x61\x53\x29\xdf\x10\xd5\x06\
\xa8\x49\xa2\xdc\x09\x88\x10\x50\x2a\x6d\x99\xfd\x96\x84\x04\x4f\
\x12\xc4\xd3\x09\xba\xfd\x65\x7c\xeb\x5f\xff\xeb\xf8\xfe\xff\xe9\
\x3d\x58\xd2\xcd\xe7\x53\xcf\x9f\xc6\x7f\xfa\xe0\x1f\x29\x50\x72\
\x5c\x50\xdd\x67\x92\x52\x80\x42\x82\xc7\x31\x86\x83\x7d\x84\x9d\
\x8e\x35\x06\xdb\x9c\x70\xc9\x36\x59\x22\x8b\x29\x83\x42\x91\x9e\
\xbc\x1c\xa4\xce\x5d\xb2\x2c\x28\x53\xc1\x46\x29\x58\x1a\x3a\xa8\
\xb7\x8f\xf5\xf5\x43\xf9\xd6\x42\x72\xf9\x43\xb1\x54\x57\x64\x50\
\x44\xdf\x8f\xe2\xc9\xac\x0d\xa0\xca\xff\xce\xc1\xa3\xdc\x83\x82\
\x75\xbb\xcf\xff\xac\xeb\x7a\x70\x5d\x0f\x9d\x4e\x88\x24\x51\x4e\
\xe8\x02\x2a\xba\x63\x3a\xe2\xf0\x82\xd0\x12\xc0\x2a\x33\x70\x64\
\x1a\xfc\x14\x73\xca\xc7\x00\x16\x79\x93\x8d\x27\x93\x22\x71\x3a\
\x08\x53\x9a\xc9\xf7\xb3\x67\xea\xe6\x4a\x3b\xb3\xcf\x64\x23\x11\
\xa6\xa8\x42\xc0\x75\x5d\x2d\x82\x51\x8f\x71\x3c\x8d\xf0\xd9\x97\
\x5e\x05\x07\xc5\x34\x0e\x11\x78\x3e\x7c\xcf\x85\xeb\x3a\xf0\x1c\
\x07\x8c\x53\x38\x4c\xbd\x2f\x1c\xc6\x70\xb4\x17\xc2\xd3\x49\xc9\
\x37\x1e\x3e\x84\x1b\x6e\xbb\x0d\x2f\x3f\xfb\xf9\xda\x92\x9e\xed\
\x5d\x32\x5b\x82\x94\x70\x5d\x0f\xc7\x8f\x1f\xaf\x8f\x7c\x6f\x5c\
\xce\x33\x3b\x7f\xb5\x6a\xbc\x45\x06\x6c\x5b\x80\x6a\x81\xe9\xaa\
\x96\xf4\x0e\x14\x16\x48\xac\x5c\x29\xf7\x10\x83\x54\xd2\x71\x91\
\xce\xf8\x70\x15\x9d\xa0\x62\x2a\x08\x82\x4e\x07\x77\xbd\xeb\x7e\
\xfc\xb5\x6f\xfe\x06\x7c\xf9\x1d\x6f\x41\xdf\x2d\x5a\xc1\xfc\xa3\
\x1f\xfb\x7b\xf8\x77\xbf\xfb\x41\xf4\xc3\x00\xd2\x95\xca\xbd\x5c\
\xa7\xe5\x42\x2a\xef\xba\x28\x8a\xb0\xb7\xbb\x83\xa5\xa5\xe5\xd9\
\x19\x1b\x43\xd2\x9b\xd5\xd1\x84\x34\x38\xb3\x71\xc6\x6d\xfe\x3b\
\xf3\xf4\xcb\xa3\x25\x08\xa1\xca\xae\xc7\x48\xc1\x05\x80\xc3\x47\
\x8f\x64\x2d\xa4\xc2\x50\xad\x51\xbb\xb3\x66\x1c\xda\x58\x82\xb9\
\x53\x13\x4b\xd9\x8e\x18\x67\xd6\xa4\x74\x1b\x64\xce\x0e\x6e\x5c\
\x5e\x50\xf5\xb1\x18\x11\x71\x8c\xfb\xa4\xbd\xe4\x64\xe9\xa4\x58\
\x67\x2a\xd1\x74\x1e\x8a\x90\x9a\x0e\x86\x65\x97\x92\x2a\xeb\x29\
\x7b\x40\x86\x1b\xc5\x62\x6c\x69\x4e\x13\x09\xb3\x79\x4d\x85\xab\
\x54\x0d\xf6\xea\xb1\xa9\x6e\xb7\x93\xb1\x1c\x21\x25\x86\xe3\x31\
\x5e\x39\x73\x0e\x8e\x17\xa0\xd7\xef\xa1\x13\x86\x08\x02\x1f\xbe\
\xe7\xc1\x73\x5d\x78\xae\x03\xd7\x61\x60\x8c\xe1\xda\x95\x7e\x06\
\x4a\xe9\xc9\xd9\xb5\x37\xdd\x84\x97\xd5\x9c\xd0\x15\x2d\x02\x52\
\x61\x16\x7b\x40\x75\x9e\x54\xfd\xd1\x13\x27\x4e\xa4\x8c\x69\xde\
\x80\x6d\xd3\x3e\x53\xbb\x5a\x60\xba\x6a\x25\xbd\xc5\xc3\x02\x6d\
\xa5\x29\x39\x5b\x33\x15\x9c\x23\x8e\xa6\x8a\x35\x81\xa0\xbf\xb4\
\x8c\x1b\x6f\xbb\x1d\xb7\xdc\x7e\x1b\xee\xbe\xf3\x0e\x3c\xf8\xf6\
\xdb\xb0\x1e\xfa\xf0\xb4\x54\xdb\xfc\xfc\xf8\xcb\x6b\xb8\xf7\x9e\
\xbb\xf0\xf4\xf3\x2f\xa8\xfe\x53\x2a\x3e\xd0\x7d\x1e\x2a\x25\x64\
\x2c\x30\x1a\x0c\xd0\xeb\xf5\x73\xf0\xb1\xfa\x8f\xa5\xa0\x25\x00\
\x41\x35\x38\x09\x95\x5f\x54\x02\xa6\xd4\x31\x22\x2d\x31\xa6\x25\
\x33\x09\x89\x28\x4e\x20\x8c\xb3\x4d\x95\x88\x4b\xf2\xf2\x1a\xca\
\xb6\x3f\xc4\x40\xbb\x1a\x45\x1b\x29\xca\xc5\x8b\x80\x43\x66\x58\
\x52\x91\x31\x91\x03\xbf\x19\x7c\xcf\x05\x25\x2e\x62\xcb\xf6\x5f\
\x2e\x43\x11\x42\xc0\x18\xcd\x40\x69\x51\x3a\xbe\x79\xf1\xa2\x21\
\x7a\xa9\x00\x1c\xd2\x64\xdb\xad\xfb\x6b\x64\x0e\x95\x98\x1d\xec\
\xcd\x4c\x8b\xa4\xc0\xda\xea\x8a\x7a\x97\x08\xf5\x3e\xdb\xde\xdd\
\xc3\xd3\x4f\x3d\x85\x95\xf5\x43\xe8\x6b\x53\xde\x5e\xb7\x8b\xb0\
\xa3\xd4\x90\xbe\xe7\xc1\xf7\x3c\x38\x0e\xc3\xdd\xc7\x0f\x15\xfe\
\x82\x90\x12\x83\xdd\xbd\x85\x5f\x1f\x5b\xff\x56\x4a\x89\xe5\x95\
\x65\x8b\x4f\x5e\x3d\x0b\xac\xe3\x96\x04\xc0\xde\xee\xee\xbc\x52\
\x5e\xab\xcc\x6b\x81\xe9\x75\x67\x49\x75\xe5\xbc\xea\xb0\x40\x21\
\xf8\xab\xcf\x3f\x23\xaf\xbb\x35\x0d\x0b\x4c\xc0\x18\xcb\xe4\xda\
\x65\xd6\x94\xf6\x9a\x56\x0e\x1d\xc6\x5d\x5f\xf2\x2e\xbc\xfd\xae\
\xb7\xe3\xf8\xb1\xa3\x38\xbc\xb6\x82\x69\x9c\x60\xec\x3a\x20\xae\
\x3a\x0b\x2f\x7f\x9c\xfe\xf3\x2f\xff\x02\xde\xf2\xe7\xbf\x0a\xfd\
\x4e\x08\x09\x80\x65\xe5\x3c\x09\x30\x55\x6e\xe1\x71\x84\xfd\xfd\
\x3d\x2c\x2d\xaf\xe8\xfb\x30\x8b\xbf\xaa\x17\x9e\x96\xf4\x84\x1a\
\xfa\x4d\xd9\x94\x4c\x3f\x9b\x14\x52\x68\x44\xd5\xc0\xa4\xc4\x01\
\x29\x4b\xa0\x70\x1c\x06\xa6\x1d\xb9\x89\x3e\x2b\xce\x00\xc9\x24\
\x3a\xb2\xe8\x40\x4d\x0a\xa9\xad\xf5\xa0\x54\xec\x51\xcd\xfa\xdb\
\x91\x4a\xc6\x44\x16\x7b\x23\x48\x69\x1d\x22\x4d\x01\x95\x94\x1c\
\x4e\x29\x21\x60\xd4\x30\xa2\x5d\x08\x36\x24\x76\xb6\x77\x0a\x1a\
\x11\x02\x3b\x43\x6c\x90\x04\xde\xac\x94\x55\x9c\xae\xad\xbd\x49\
\x09\x25\x91\x5f\x59\x5a\xca\x80\x40\x48\x81\xf1\x78\x8c\x97\x9f\
\x7b\x06\xcb\x5b\x87\xd1\x5b\x59\xc3\xd2\xca\x0a\xfa\xcb\xcb\xe8\
\xf7\xfb\xe8\xf5\xba\x08\xc3\x10\x8e\xe3\xe0\xae\x5b\x6e\xcc\xc7\
\x08\xf4\x6d\xc6\x5c\xe0\x85\xa7\x9f\x6a\xec\x3a\x2e\x6b\xee\x69\
\xea\x93\xd7\x6b\xe4\x93\xd7\x7c\xed\xef\xed\xa1\x41\x09\xaf\xb5\
\x22\x6a\x81\xe9\x0d\x57\xce\xab\xf0\xcc\x22\x02\x00\xe3\x49\xac\
\x1d\x06\x9c\x9c\x19\x18\x25\xbd\xd4\x75\x3c\x89\xa6\x98\x8e\x47\
\xd8\xdf\xdf\xc3\xd6\xd6\x65\x74\x3a\x1d\x78\xae\x8b\xc0\x73\xe1\
\x32\x06\x87\x52\x38\x84\xa1\x2c\x60\xea\xac\xad\xe3\x2b\xbe\xf4\
\xdd\x78\xf8\xb1\xc7\x54\x8f\xc7\x71\x0d\xbb\xa0\x3c\x2e\x63\x34\
\x18\x22\x08\x42\xed\x9d\x57\x2c\xe9\xe5\x62\x3d\xdd\x6f\x90\xc8\
\x4a\x7a\x02\x02\xd4\x60\x50\x02\x39\xc3\x51\xde\x72\xb9\x53\x02\
\x63\x14\x8c\x16\xef\xa3\xeb\xb9\x79\xe4\x84\xa9\xa4\x23\xd6\xae\
\xc1\x2c\x73\x22\xb3\x4d\x96\x99\xfe\x11\x31\x89\x13\x29\x96\x02\
\x0f\xc8\x98\xcc\x52\x63\x85\xb8\xcf\x10\x7b\xa8\xe8\xf8\xcc\x2b\
\x2f\x2d\x7d\x35\x7d\x93\x49\xcd\x1e\xf6\xf7\x32\x91\x46\x2e\xe6\
\x20\xb9\x51\x46\xf6\x58\x48\x25\xa0\x2c\x02\x36\xe5\xdf\x99\x27\
\x39\x07\x80\x38\x49\xb2\xc7\x2b\x84\xc4\x68\x30\xc0\x2b\xcf\x7e\
\x1e\xdd\xa5\x0d\x74\xfa\x4b\xe8\xad\xac\x61\x79\x7d\x1d\x4b\x2b\
\xab\x58\x5e\x5d\x41\xaf\xbf\x04\xd7\xf3\x71\xff\xdb\x6f\xcd\x2a\
\xc4\xe9\xf3\x72\xfa\xe2\x26\x06\xbb\x7b\xa0\x8c\x2e\xf4\x91\x94\
\x15\xfd\xc2\x28\x8e\x33\x49\x7b\xf1\x65\x3b\x68\x58\x20\xf0\xd8\
\x63\x8f\xca\x06\x25\xbc\xa6\xce\x0f\x2d\x50\xb5\xc0\xf4\xba\x82\
\x53\x6d\x39\x6f\xa6\x7b\x2d\x4b\x3b\x9c\x54\xfd\xa1\xe1\xde\x1e\
\x2e\x9e\x3b\x87\xd5\xb5\x75\x2c\x2d\x2d\xa1\x13\x06\x08\x7c\x0f\
\xbd\x30\x40\xe8\x3a\x70\x29\x51\xae\xdf\xa5\x3b\xf8\x81\x5f\xfc\
\x19\xdc\xf6\xa5\x7f\x49\x9d\x91\x32\xa1\xd8\x99\x60\x90\xc2\x51\
\x1b\x24\x73\xc0\x85\xc0\xde\xee\x2e\xd6\xd6\xd7\x6b\xcf\x43\xd3\
\x28\x8e\x94\x38\xcd\x82\x13\x32\x6f\x3f\x18\x25\xbd\xcc\xca\x87\
\xe4\x39\x88\x00\xb0\xd4\xef\x1b\xa8\x61\x88\x1f\x2c\x80\x44\x32\
\xab\x4f\x62\x6f\xf8\x57\x95\xeb\x6c\xe5\x41\x0b\x28\x55\x01\x95\
\x69\xa1\x63\x45\x20\xdb\xcb\xa8\xc5\x1e\x94\xe6\xe0\x94\xf0\x44\
\x0d\xd8\xa6\x25\x5c\x5d\xf6\x94\x73\x0a\x68\x0a\xd4\x04\x5e\x7c\
\xf6\x59\x1d\xab\x4e\x66\xb1\x85\x10\xcc\x3e\x35\xa4\xf0\x70\x6c\
\x2c\x87\xd4\x72\x0c\x52\x2a\xde\x55\x97\xf3\xd2\x7f\x2a\x1f\x3a\
\xf5\x02\x0b\x21\xd0\xeb\x74\x30\xdd\xdf\x45\x34\x1e\x61\x7f\xfb\
\x32\x2e\x6f\x6e\x20\xe8\xf5\xd1\x5f\x59\xc5\xf2\xda\x1a\x96\x56\
\xd7\xe0\x87\x5d\xf4\xbe\xfe\x2f\x17\xe6\x01\x24\x80\x5f\x7e\xdf\
\xaf\x1c\x30\x40\xd0\x52\xaa\x93\x12\xd7\x5c\x53\xf4\xc9\x6b\x4e\
\x1d\x91\x0d\x70\x95\x3d\x03\xcf\x9f\x3d\x27\x61\xef\x2f\x2d\x52\
\xc2\x6b\x41\xa9\x05\xa6\xab\x06\x46\x07\x35\x70\xad\xcc\x64\x2a\
\x83\x11\x31\x36\x79\x29\x94\xfa\xee\xf2\xe6\x06\x2e\x6d\x1e\xc1\
\xf2\xca\x8a\x2a\x85\x04\x01\xf6\x86\x63\xf4\x7c\x1f\x9e\xc3\xc0\
\x88\x54\x33\x22\xc6\xcd\x79\x9d\x2e\xbe\xe3\xaf\xfd\x35\xfc\xd6\
\xef\xfc\x8e\x1e\x0a\x75\xb4\x42\x4f\xb3\x26\xc9\x20\xa5\x8b\x38\
\x9e\x62\xb0\xbf\x8f\xa5\xe5\x65\x70\x21\x8c\xcc\x1e\x63\xbe\x89\
\x98\x97\x91\xac\xdf\x94\x81\x13\x91\xc5\x8d\x12\xb9\x24\x3b\x55\
\x5e\xe5\xa5\x2c\xb5\x91\x65\x12\x6f\x09\x3b\x43\x6a\x68\x57\x63\
\x2b\xe5\x65\x3d\x19\x62\x6b\xc5\x90\x22\xfb\x99\xc7\x8e\xca\xbb\
\x87\x8e\x26\x2f\xc7\x61\x10\x2d\xf6\xc8\xc0\x18\xa9\xb1\xab\x40\
\x9c\xe4\x0d\xf8\xaa\xf1\x9c\xc2\x1b\x49\x2a\x63\x5f\x29\x25\xe2\
\x69\x54\x28\x5b\x16\x02\x0d\x4b\x85\x4b\x7b\xbb\x28\xa5\x02\x15\
\xac\xc9\x6a\x37\x54\x01\x5f\xd9\x55\x8a\xac\x69\x7d\x6d\x55\xfb\
\xc7\xaa\xfd\x78\x69\xa9\x0f\x97\x48\x44\xa3\x7d\x50\x24\x88\x92\
\x08\xfb\x3b\x97\x71\xe9\xfc\x59\x84\xdd\x1e\xba\x4b\x2b\x08\x7b\
\x7d\x78\x0e\x53\x7d\x25\x7d\x4b\x83\xe9\x14\xbf\xf5\xab\xbf\xa2\
\xd9\x12\x69\x5c\xb8\xab\x7a\xa3\x28\x61\x46\x57\x3b\x93\xf0\x03\
\x33\xa4\xf2\x5d\x98\x46\xd3\xa6\xfd\xa5\x26\xb1\xea\xed\x6a\x81\
\xe9\x8a\x19\x52\x13\x0a\x5e\xdb\x6b\xaa\xff\x48\x15\x4b\x7a\x44\
\xb3\xa6\xd1\xfe\x1e\x2e\x9e\x3f\x87\xe5\xd5\x55\x2c\x2d\xf7\xd1\
\xed\x74\xb0\x17\x06\xe8\x85\x01\x7c\x87\x81\x11\x17\x8c\x10\xb0\
\xd2\xa6\xf7\x7f\xfc\xe8\x8f\xe0\x37\x7f\xe7\x77\x95\x3d\x91\x54\
\xf1\x18\x69\x39\x4f\x59\x08\x49\x48\xe1\x60\x38\x1c\x82\x10\xa0\
\xdb\x5f\xb2\x84\xa9\xe5\xa0\x54\xe8\x37\x99\xe0\x64\x4a\xcb\x35\
\x8d\x50\x52\x5f\xb5\x85\x29\x65\x5a\xbe\x81\xd2\x6c\xbe\x49\x96\
\xea\x5b\xf6\x68\x39\xd2\x28\xad\x87\x58\xc0\x86\x94\xfa\x50\x75\
\xa0\x64\xfa\x07\x56\xf9\x5e\xa8\x7f\xc4\x82\x20\x91\xc6\x74\x51\
\x5a\x5e\x4b\xc3\x06\x0b\xb3\x54\x4a\x95\xc8\xb3\x19\xb0\xf9\x6f\
\x30\x09\x35\xe7\x13\x25\x09\x36\xcf\x9f\x53\xcf\x25\x99\x4d\x83\
\x25\xa6\x24\x9e\x54\x3d\x83\xa4\x36\x2d\xbd\x5e\xb0\x97\x1a\xd4\
\x1a\xb1\xee\x16\xd6\xc4\x52\xa9\xb8\xbe\x4f\x81\xef\xe1\xd8\xe1\
\x35\x5c\xbe\x74\x11\xd7\x1c\x59\x06\x65\x0e\xee\x7c\xe7\xbb\xb0\
\x7c\xf8\x38\x3e\xf4\x3f\x3e\x8a\x0b\x17\xce\x02\x84\x62\x38\x99\
\x42\xf6\x7b\xd9\xec\xd3\xcf\xfd\xf2\xfb\xb0\xb3\xb5\xa5\x4a\xdc\
\x75\x00\x54\x79\xc2\x32\xfb\x83\x5e\xbf\x5f\xc3\x18\x17\x2c\xe7\
\x11\x82\x38\x49\xb0\xb3\xb3\x33\x8f\x2d\x1d\xc4\x5d\xbc\x5d\x07\
\x58\xb4\x7d\x0a\x0e\x54\xce\xb3\xf5\x9a\xaa\xb6\xcd\x99\x52\x15\
\x21\x04\x10\x09\xa2\xc9\x18\xdb\x9b\x9b\xb8\x78\x61\x03\x97\xb7\
\x2e\x63\x6f\x7f\x1f\xc3\xd1\x18\x3b\x83\x21\xf6\xa7\x11\x22\x2e\
\x10\x4b\x59\xce\x6f\x87\xe7\x7b\xf8\x91\x1f\xfc\x41\xc4\x49\xa2\
\x1d\x22\x1c\x15\xf4\x67\x0c\xe0\xa6\x5e\x77\xa3\xd1\x48\xe5\x22\
\x11\xab\xce\x2d\x2b\x8d\xe4\xc3\xb7\x5a\x50\xa1\xe3\x2e\xd2\x1e\
\x93\xd4\x6e\x07\x66\xdc\x93\x84\x2c\x00\x53\xa8\xa3\x1c\xa4\x45\
\x14\x26\xeb\x79\x51\x45\x29\x8b\xcc\xfd\x59\x81\xe1\x14\xec\x22\
\x66\x7b\x36\x85\x88\x75\x4b\xcc\x46\x02\x8a\x44\xd2\x02\xfb\x21\
\x3a\x38\x91\xe8\xb0\x41\x4a\x15\x38\xab\xb2\x9e\x12\x05\x08\x39\
\x7f\xac\x33\xed\x2d\x01\xc0\x34\x4e\xb0\xbf\xb3\x93\xe5\x41\xa1\
\x1c\xff\x5e\xa2\x85\xa4\xe6\xd9\x92\x36\xf6\x33\xef\x59\x6f\xb8\
\x75\xba\xae\x93\x0b\x5b\x28\x41\xbf\xd7\xc3\x3d\x77\xdd\x81\xc3\
\x87\x56\xe1\xfb\x3e\xde\x72\xd3\x8d\xf8\xe9\xbf\xff\x53\xf8\xfb\
\x7f\xf7\x47\xf0\xc7\xbf\xf7\x5b\xf8\xae\x6f\xfd\x26\x5c\x3e\xf7\
\x2a\x3e\xf8\xd1\x4f\x64\x35\xde\x4f\x3c\xfe\x24\xfe\xef\x9f\xfc\
\xc9\x1a\x50\xb2\x3f\xb6\xba\xc7\x0c\x02\xac\xa7\x65\x6a\xb9\xe8\
\xc7\xba\xf8\x6d\x0a\x56\x2a\xa5\x38\x5a\xc4\x51\x5c\xa0\x9d\x5f\
\x6a\x19\xd3\x17\xa0\x9c\xd7\xfc\x20\xb6\x37\x62\xe9\x2c\xcf\xa8\
\xb9\x67\x46\x3d\x82\x63\x3c\xdc\xc7\xe6\xb9\x33\x58\x5d\x5f\xc3\
\xd2\xd2\x12\xba\xdd\x8e\xee\x35\x85\xe8\xf9\x1e\x3c\x46\x15\x63\
\x2a\xa9\xf4\xfe\x97\xf7\x7e\x17\xfe\xd5\xbf\x7d\x3f\x84\x6e\x50\
\x4b\x29\xc1\xd2\xd9\x24\x21\x20\x99\x04\x93\x0e\x78\x1c\x63\xfb\
\xf2\x16\x56\x56\xd7\x32\x99\xb7\x6d\xf4\x5d\xce\x84\xe4\x89\xac\
\xfe\x44\x8d\x28\x75\x73\x98\xb4\xac\x1b\x3c\xb2\xba\xbc\x60\x1f\
\xa1\xc4\x24\x17\xda\xba\xec\x78\x35\xeb\xa1\x57\xcd\x90\xa4\x91\
\x63\x84\x14\x64\x4b\xaa\x31\x42\x89\x06\x7e\x96\x33\x42\xa2\x54\
\x79\x94\x52\x3d\x97\x2c\x73\x69\x7d\xdd\x19\x8e\x66\x6d\x83\xd1\
\x08\x93\xf1\x18\x4c\x97\xbc\x2a\x1f\x1f\x29\xb1\xc0\x99\x19\x2e\
\x03\xf5\x48\x45\xe0\x90\x45\xdc\x60\x8f\xc7\x30\xca\x79\x52\x3d\
\xb6\xc3\xa9\xe5\x8f\x7e\xef\x79\xae\x8b\x3f\xff\x65\x5f\x86\xcf\
\x3d\x75\x0a\xab\xab\xab\xf8\x7b\x3f\xfa\x13\xe8\xf6\xfa\x90\x52\
\x22\x08\x42\x74\x5d\x86\x64\x3c\xc0\xff\xf1\x43\xdf\x0f\x31\x19\
\xe2\xa5\x17\x5e\xc0\x7f\xf8\xc5\x5f\x00\x21\x0b\xbc\x1f\x48\x33\
\x25\xc9\xf2\xca\x4a\x35\x45\x6c\x5c\xce\xcb\x87\xa6\xb7\x77\x76\
\x00\xd5\x5f\x6a\x3a\x60\xdb\x7a\xe4\xb5\xc0\xf4\xba\x97\xf3\x0e\
\x02\x50\x85\xbd\x43\xfd\x76\xa9\x5c\x65\x80\x13\x25\x04\x52\x70\
\x4c\x47\x23\xec\x6e\x5d\xc4\xc6\xd9\xb3\x58\x5a\x59\x41\xaf\xd7\
\x43\xe0\xfb\xe8\x86\x01\x96\x3a\x01\x5c\x46\x41\xc0\x40\x18\x29\
\x9c\xc9\x33\x46\xf1\xb3\xff\xf4\x9f\xe2\x87\xfe\xce\xdf\xc9\x8c\
\x5b\x33\xc6\x23\x4d\x09\x39\x10\xc7\x53\x0c\x87\x03\x2c\x2d\x2d\
\x81\xf3\x12\x60\x16\x9b\x2c\x0b\x34\x93\xab\xbe\xb3\xcf\xe6\x90\
\xf2\x6d\x1b\x6e\xe3\x45\x13\x24\x52\x03\x27\xa4\xe2\x3a\x65\xc9\
\x5e\xe9\x72\xeb\x6c\x99\x2c\xce\xc8\x48\x18\xb2\xf0\x9c\x51\x51\
\x42\x33\x40\x22\x46\xb9\xcb\x54\x82\x65\x76\x4e\x92\x64\xe0\x64\
\x9b\xae\x91\x1a\xc0\x2e\x5c\xbc\x04\x21\x04\x18\x9c\x19\x56\x98\
\x9a\x29\x11\x62\x73\x51\xaf\x79\x16\x2c\xa0\x54\x3f\x6e\x5a\xee\
\x51\xcd\xaa\xf2\x28\xd3\x8f\x5b\x5f\x87\x50\x82\x6f\xf8\x86\x6f\
\xc1\xdd\x77\xdf\x83\xe3\xc7\xaf\xc3\xd2\xf2\x6a\xfe\x3c\x48\x89\
\xbd\xfd\x7d\x50\x4a\x31\x1d\x0e\xf1\x93\xdf\xf7\xb7\xf5\x6d\x30\
\xed\x30\x2e\x8b\x6c\x7a\x1e\x38\xa1\x1a\xa3\x08\x08\xd6\x2c\x3e\
\x79\x07\x2e\xe7\x11\x95\x86\x6b\x80\xcf\x41\x07\x6c\x0f\xc0\x4b\
\xdb\xd5\x02\xd3\xfc\x37\xce\x41\x23\xd6\xed\x61\x81\xb6\xd2\x79\
\x99\x39\x49\x05\x4e\x9b\x67\x5f\xc5\xd2\xea\x2a\xfa\xfd\x3e\xc2\
\x30\x40\x18\xf8\xe8\x06\x01\x1c\x4a\x41\x7c\xa8\x99\x19\x10\x50\
\x92\xd7\x5f\xbf\xee\x2f\x3c\x80\xff\xeb\xa6\xb7\x60\xe3\xdc\x59\
\x55\xbe\x93\x4e\x16\x89\x91\xb2\x1b\xca\x24\xa4\x74\x31\x1e\x8d\
\x40\x08\x41\xb7\xdb\xcb\xa2\xd6\x67\xf0\x49\xa2\x00\xa4\x12\x50\
\x2c\x0c\xb9\x57\x5a\x7a\xcf\x33\xe7\x87\xf2\xc6\x40\x60\xd9\x6c\
\x0d\x56\x23\x8d\xbf\x60\x86\x07\x36\xa1\x45\x55\x5b\xb4\x15\x97\
\x88\xfd\xf5\x40\x81\x32\xe5\x8f\x97\xe4\x65\x56\xb3\xd2\x47\x19\
\x83\xe3\xba\xca\x1d\xdb\x48\xf7\x25\x44\x3d\xfe\xc4\x48\xf7\xad\
\xd0\x15\x20\x55\xe4\x0b\xa1\xc0\xe9\xe9\xa7\x9f\x29\x81\x76\xa9\
\x8c\x57\xe8\x2f\x59\xfa\x68\x35\x67\xff\x05\xad\x59\xc9\x39\x5c\
\x92\xf9\x09\xae\x06\x8f\xc8\x4c\x81\x89\xe1\x4a\xe1\x07\x21\xde\
\x76\xc7\xdd\xd6\xdf\x19\x0c\x86\x59\x69\x72\xb6\x74\x67\x3a\x77\
\xc8\xc2\x7b\xae\xfa\x75\x95\x56\x70\xa2\x94\xa2\xdf\xef\x17\x7d\
\xf2\x1a\x3b\xdd\xce\xaa\xf3\x28\xa1\x78\xe6\xe9\xa7\x31\x87\x29\
\x35\x71\x7c\x68\x15\x79\x57\x69\xb5\x3d\xa6\x6a\x96\x34\x0f\x9c\
\x2c\x5e\x59\xb2\xb2\xc6\x64\xdb\xaa\x29\xa5\x70\x08\x85\xe4\x09\
\x06\xbb\x3b\x38\xff\xca\x69\x6c\x5c\xb8\x80\xed\xed\x1d\xec\xed\
\x0f\x71\x79\x6f\x1f\x3b\xa3\x31\xc6\x31\xc7\x34\xed\x37\x19\x1f\
\x54\x4a\x80\xff\xfc\x6f\xdf\xa7\xca\x78\xda\x1d\x3b\x37\x7a\x35\
\xfa\x4d\xcc\x01\x21\x14\xe3\xd1\xd8\x68\x78\x13\xeb\x69\x77\x66\
\xea\x6a\x0e\xef\x1a\xa7\xba\x04\xaa\x29\x4e\x2c\xec\xca\x5a\xc6\
\x2b\x34\xda\x4c\xd7\x86\x72\xe3\x0d\xf3\x7d\xe2\xca\x0a\xf1\xc2\
\x60\x2d\x99\xad\x81\x35\xaa\x0d\xaa\xdf\x4f\x24\x41\x02\x9a\x67\
\x49\x65\xa5\x3c\x0a\xd7\x75\xe1\x30\x07\x9e\xe7\x29\xb6\x6a\x98\
\xd8\x2a\x77\x71\x59\x59\x17\xce\xd5\x78\xea\xb9\xe5\x42\xe0\xe9\
\x53\x4f\x16\x73\x8e\x6c\xef\x8f\x2a\x50\x22\x57\x72\xae\x85\x7a\
\x83\x57\xc3\xac\xb5\xd3\xe9\x60\x65\x69\xc9\x30\xc6\x85\xe1\x54\
\x21\xcb\x4f\x21\x84\x10\x78\xfe\xf9\x17\xea\x8d\x5a\x4b\x2f\x38\
\x31\xdd\x52\xaa\x5e\xf0\x72\x79\x54\x02\xae\xeb\xe2\xd0\xa1\x43\
\xa5\x37\xa0\x6c\xfc\x8c\xd8\xd6\x8e\x2a\xe5\xcd\x33\x6e\x15\xa8\
\xf7\xc9\x6b\x41\xa9\x05\xa6\xd7\x8c\x35\xd9\xf6\x97\x7a\xe6\xa4\
\xf4\xb4\x73\xcf\xec\xad\x62\x08\x02\x80\x2b\x21\xc4\xe5\xcd\x0d\
\x5c\x38\xf3\x2a\x2e\x5e\xbc\x88\xcb\x3b\x3b\xd8\xdd\x1f\xe2\xf2\
\xfe\x00\x7b\xe3\x09\xc6\x71\x82\x48\x27\xa6\x9a\x14\xed\xd8\x4a\
\x1f\xdf\xf5\x37\xbf\x17\x09\xe7\x60\x8e\xa7\x0c\x5e\x59\xee\x40\
\x9e\xba\x8f\x53\xc7\x85\x04\xb0\xb3\xb3\xad\xce\xa0\x67\x9c\x25\
\x64\x61\x27\xcd\x5d\xc7\x65\xe1\xcc\x3e\x9d\x5f\x4a\xa3\x0e\x6c\
\x1b\x7d\x11\x6d\xec\x92\x45\x33\xe1\xb6\xf8\x5f\x5a\xc2\x6a\x48\
\x9d\x66\xd8\x12\x59\x8c\x75\xe9\xfe\x5d\x02\x0a\x0e\x36\x13\xa9\
\x41\x09\xd1\x8c\xc9\x51\xa1\x8d\x52\xea\x59\x2e\x92\x19\x96\x12\
\xc3\x2b\x6f\xa6\xe1\x90\xb9\xb6\x2b\x56\x35\x8d\x13\x3c\xf3\xc4\
\x13\xd9\xf3\x38\x77\xfb\x2e\x60\x2c\x69\x4e\x2b\xe5\x41\xb6\x69\
\x99\x9d\x60\x78\x9e\xab\xe5\xff\xb9\x83\xbb\xd5\x2d\xde\x28\x0d\
\xe8\x72\xd8\xc2\xac\x37\x7b\xdd\xc9\x9c\xd7\x58\x5f\x87\x73\x5e\
\x09\x80\xb2\x5c\x02\x68\xf8\x2c\x6c\x5c\xb8\x00\x54\xcf\x30\xb5\
\x8a\xbc\x16\x98\xbe\x60\xe0\xd4\x64\x70\x4e\x56\x9c\x45\x89\x46\
\x9b\xa7\x85\x49\x65\x3f\xe6\x1c\x93\xe1\x00\x17\x5e\x7d\x05\x1b\
\xe7\xce\xe1\xd2\xc5\x2d\xec\xec\xed\x61\x7f\x30\xc2\xd6\xfe\x00\
\xdb\xc3\x31\xc6\x71\x92\xb1\x26\x13\x9c\x7e\xe2\xfb\xbe\x1b\x2b\
\xeb\x87\x40\x34\x3b\x62\x8e\x5b\x54\xea\x51\x96\xb1\xa9\x38\x4e\
\xb0\xb3\xbd\xad\x66\xab\xa8\xfd\x54\x35\xdb\x50\x4b\x62\x07\xa9\
\xc3\xf2\x84\x8e\x5b\x67\x94\x16\x80\x8b\x51\x5a\xdc\x4d\x67\x76\
\x0a\x69\x67\x49\x85\xa3\x1a\x58\xa4\xac\x7a\x52\x17\xd8\xb0\xab\
\x5e\x22\x3d\xa7\x84\x52\x6c\x07\xd1\xcf\x9b\xeb\x2a\x57\x0b\xcf\
\x73\xb3\x99\xb0\x74\x9e\x8b\xa0\xe4\x4f\x6d\xb9\xdf\xda\x28\x02\
\xe3\x28\xc2\xce\xd6\x96\x11\xd7\x51\x1c\x46\xce\xfb\x4b\xb8\xa2\
\xc7\x24\x6b\x77\x62\x39\x03\x44\x65\xe6\x4b\x8c\xc8\x8f\x0c\x34\
\xac\xa0\x94\xff\xce\xfe\x60\x50\x88\x21\x59\xf0\x15\x68\xf4\x60\
\xa4\x94\x58\x5a\x5e\xc6\x91\x23\x47\x8a\xae\xee\xb2\xe9\x93\x62\
\x67\x90\xcf\x3c\xf3\x0c\x1a\x02\x52\x1d\x5b\x3a\x08\x59\x6b\x57\
\x0b\x4c\x07\x2e\xf1\xcd\x05\xa9\xd9\x16\x76\x83\x92\x1e\xc9\xcf\
\xca\x19\x01\x44\x12\x63\x7f\xfb\x32\xce\xbf\xfa\x0a\x36\x37\x2e\
\x60\xeb\xf2\x36\xf6\x06\x43\x0c\x46\x63\xec\x0c\x47\x99\x84\x9c\
\x97\xc0\xc9\x63\x14\xbf\xf6\x6f\xfe\xb5\x6a\xa8\x7b\x69\x6e\x93\
\xc1\x9e\xd2\xd2\x9e\x06\xad\x38\x4e\xb0\xbd\xbd\x9d\x6f\x40\x33\
\x49\xa5\xf6\x0a\xa5\xd0\x83\xa5\x42\xef\xb2\x8a\x35\x91\x02\x30\
\xd9\x1d\xb2\x65\x9e\x13\xb4\xd0\x79\x25\xa9\x0e\x96\x6b\xbc\xd9\
\xd5\x1d\xc6\x07\xc1\x98\x57\x4a\x95\x7d\x84\x52\x38\x1a\xd8\x53\
\x55\x9e\xa7\xa3\x20\x28\x25\x19\x78\x93\x0a\x03\xef\xf4\x7f\x42\
\x7b\xcd\x01\xc0\xe6\xd6\x16\x26\xa3\xd1\xec\xfb\x61\xe6\x6e\x55\
\xcc\x63\x5d\x61\x41\x60\xee\x53\xaf\x4f\x46\x56\x57\x56\xe0\x6b\
\xf9\x3f\x48\x91\x01\xdb\xee\x46\x92\x24\xd8\xda\xba\x5c\xa6\xa2\
\x8b\xbf\x5e\x64\xfe\x23\xf2\x7c\x8b\x4f\xde\x15\x96\xf3\xf6\xf7\
\xf6\x9a\x98\xb6\x36\x75\x7e\x68\x41\xa9\x05\xa6\xab\x52\xc6\x5b\
\x94\x35\x59\x0e\x32\x73\x16\xdf\x08\x9c\x0a\xac\x49\x95\xf4\x2e\
\x9d\x3b\x8b\xf3\x67\xce\xe0\xe2\xe6\x26\xb6\x77\x77\xb1\x3f\x1c\
\x63\x38\x9e\x60\x77\x38\xc6\x30\x8a\x11\x71\x81\x44\x14\xfb\x4d\
\x6f\xbb\xf6\x30\xbe\xfd\xff\xfd\x5e\x70\xce\xe1\xf8\x01\x1c\xcf\
\xd3\xcc\x49\x1d\xd4\x71\x40\x34\x48\x31\xd7\x43\x9c\x24\x18\x0d\
\x47\xda\xcd\xc0\xd2\x6f\x2a\x6a\x9c\x8d\x33\x6b\x99\xcd\x34\x71\
\x51\x74\x32\x73\x28\xb5\xce\x08\x65\xe0\x84\x3c\xf1\xb6\xfe\x23\
\x4c\x2c\xcf\x1f\xb1\x27\xd5\xca\xf9\x1b\x50\x75\xbb\xc9\xec\x2f\
\xb1\x62\xef\x0d\x00\x63\x0c\x8e\xe3\xea\x39\xa6\xdc\x96\xc8\x61\
\x0c\x8e\x1e\x6e\xb6\xbd\xd2\xb2\x54\x19\x15\x46\x28\xe3\x53\x4f\
\x3f\x53\x60\x24\xf6\xf7\x43\x59\xd4\x71\x35\x40\x49\x36\xd6\x8d\
\x11\xe4\x8a\x3c\x58\x8a\x76\x36\x2c\x11\x42\x60\x34\x1c\xce\x9e\
\x98\x90\x2b\x0d\xf2\x98\x7d\xec\x71\x94\xfb\xe4\x5d\x8d\x72\x9e\
\x94\x12\xe7\xce\x9d\xb5\x29\xf2\xe6\x89\x1f\xd0\x02\x51\x0b\x4c\
\xaf\x37\x50\xd5\x79\x60\x15\xe5\xa3\x84\x14\xac\x52\x49\x6d\xe3\
\xbd\x7c\xa6\x4c\x8a\x2f\x06\xe7\x18\x0f\x07\xb8\xf0\xca\xcb\xb8\
\x70\xee\x1c\x2e\x5e\xbc\x84\x9d\xbd\x3d\x0c\xc7\x13\x0c\xc6\x13\
\xec\x8d\x26\x18\xc6\x09\xa6\x42\x20\x29\x89\x21\x7e\xfc\x6f\x7d\
\x17\x56\x0f\x1f\x55\xcc\xc8\xf5\xc0\x3c\x0f\xd4\x55\xcc\x89\x39\
\x1e\x98\xeb\x82\x32\x57\x7f\xef\x62\x3c\x1e\x63\x38\x18\xea\x12\
\x96\x29\x23\x98\x1d\x54\x95\x12\x05\xb5\x1f\xe7\x1c\x51\x9c\x94\
\x62\x95\x72\xf3\xd6\x62\x77\x89\xe4\xca\xb5\x14\xdc\x50\x5d\x86\
\x29\x55\x8d\x0a\xa0\x54\x76\x44\x28\xb3\x93\x83\x70\x2a\x4e\x18\
\x38\x61\x33\xec\x8c\x32\x06\xc7\x73\x55\x60\x1e\xa1\x70\x1d\x17\
\x52\x62\xc6\x26\x6a\x06\x70\xb3\x37\x47\xfa\xfa\xa8\xff\x12\x2e\
\xf0\xf0\xa7\x3e\xad\x85\x0f\x35\x03\xa5\xb3\x4f\x40\xb3\x92\x57\
\x53\x8a\x20\xe7\x91\x26\x09\x29\x64\x16\x04\x59\x07\x4a\xd9\x49\
\x09\x53\xd2\x77\x6b\xe0\x06\x59\x8c\x3d\x91\x39\x91\xef\xd7\x1c\
\x2f\xfa\xe4\x5d\x51\x39\x8f\x00\x09\xe7\x18\x0e\x87\x57\xea\xf6\
\xd0\x02\xd4\x55\x5c\xed\x1c\x93\xbd\x74\x87\xe6\x4c\xa9\xee\x0d\
\x69\xb1\xdd\xb1\x7a\x9a\x6a\x3f\x3d\x42\xc0\xa0\x4b\x7a\x97\x2f\
\xe3\xdc\xe9\x97\xd1\xe9\xf6\x10\x04\x01\x3c\xd7\xcb\xce\xd4\x19\
\xa3\x00\x02\x00\x0e\x88\xf6\x1f\xa3\x04\x08\x1d\x86\x0f\xbc\xff\
\x7d\xf8\xe6\x6f\xf9\x36\x38\x9e\x9f\xcd\x09\x11\x42\x20\x98\x03\
\x92\x30\x00\x51\xae\x28\x03\x30\x1c\x8d\x00\x00\x9d\x6e\x07\x82\
\x0b\xbb\xc7\x8d\xde\x01\x84\x48\xcb\x78\x32\x63\x02\x69\x9d\x5f\
\xce\xa0\x72\x69\xeb\x16\x52\xcf\xa7\x98\xe0\xa7\x65\xeb\x20\xe6\
\x8f\x00\x2b\x28\xd5\x9d\x5f\x97\x86\x47\xcb\xd6\x3b\x35\xbf\x3d\
\x15\x12\x71\x3a\x2c\x6b\xcc\x0e\x29\xa5\xa3\x03\xcf\xf3\xe1\xb8\
\x0e\x82\x30\x00\x90\x6e\xd6\x24\x0b\x08\x94\xda\x69\x5c\x50\x35\
\xc7\x24\x8c\xc0\xde\x4c\x62\xaf\xbf\x9f\xc4\x31\x9e\x79\xfc\xb3\
\xa0\x8c\x59\x76\xe0\x62\x7f\x29\x17\x04\x90\x2b\x7b\x43\xcb\xa6\
\x98\x50\x9a\x02\xd2\x3d\xc8\xb9\x4f\xbd\x7e\x1c\xa3\xd1\x10\x93\
\xc9\xa4\x70\x7f\x67\xdf\xea\x8d\x4c\x12\x4b\xbd\x44\x39\xf3\x89\
\xec\x74\x3a\x76\x9f\x3c\xcb\xe3\xa8\xbf\x54\x85\x60\x4e\x27\x13\
\x4c\xc6\xe3\x04\xf3\x87\x6b\x6d\x40\x75\x90\xca\x61\xbb\x5a\xc6\
\xd4\x08\x88\xe6\xe5\x30\xd9\x2e\xcb\xde\xa4\x52\x08\x7e\xe6\xf9\
\xcf\xcf\x16\x8e\xc8\x02\x25\x3d\xf3\x32\x9e\x20\x9a\x8c\xb0\x75\
\xfe\x2c\xce\xbe\xfc\x12\xce\x9f\x3b\x8f\xcb\x97\x2f\x67\xfd\xa6\
\xdd\xe1\x18\x7b\x93\x29\x46\x51\x82\xa9\xd1\x73\x92\x00\x6e\x3b\
\xbc\x82\xff\xf9\xef\xfd\x28\x78\x12\xc3\xf5\x03\xb8\xbe\x0f\x37\
\xec\xe8\xf2\x9e\x0f\xc7\xf3\x33\xc6\xc4\x5c\x0f\x94\x39\x18\x8e\
\x46\x18\x0e\x87\x85\xb2\x5e\xfa\x7f\x11\x4f\x73\x97\xe8\xcc\xb6\
\x48\xbf\x79\x74\xbc\xb8\x94\xd6\x1d\x25\x27\x00\x84\x66\x3e\x7e\
\xf9\x6d\x68\x9e\x91\xda\x21\x19\x1b\x90\xac\x02\x79\x1b\x8b\xa8\
\x62\x16\x0d\x07\x85\x13\x49\xc1\x41\xf3\xa8\x8e\xf4\x83\xa1\xc5\
\x10\x7e\xe0\xc3\x75\x15\x6b\x92\x12\xf0\x3c\x57\x29\xf5\x18\x83\
\xe3\xb0\x82\x50\x42\x16\x4a\x96\xb2\xb0\xa7\x12\x10\x9c\xd9\xd8\
\xc0\xa5\xcd\x8d\x22\xd8\xcc\xcc\x2f\x99\xac\x89\x94\xde\x51\xe4\
\x8a\xde\xe8\xf6\xcb\x66\x7f\x22\x84\xc0\xb1\xa3\x47\xf4\x60\x6c\
\x1d\x28\xe5\xf7\x6c\x34\x1e\x43\x70\x6e\x1d\x7d\x3e\x68\x4e\x56\
\xd5\x23\xc9\x7c\xf2\x9a\x94\xea\x6a\x04\x0f\x99\xd3\xbc\x0e\xe9\
\xc5\x95\xa9\xf1\x5a\x40\x6a\x19\xd3\x6b\x5a\xca\x5b\x64\x76\xa9\
\xd0\x18\x25\x04\x94\x27\x31\x92\x38\x02\x73\x5c\xe4\xd3\xb5\x36\
\xe6\x54\x0a\x12\x2c\x9d\x2d\x70\xce\x31\x19\x0e\xb1\x71\xe6\x15\
\x84\xdd\x1e\x3a\xdd\x0e\xfc\xc0\x87\xa3\x07\x3d\xd3\xcd\x8e\x51\
\x75\xe6\xee\x51\xe5\x65\x40\x09\xf0\xb7\xbe\xe1\x2f\xe1\xe3\x1f\
\xf9\x08\x9e\x3b\xf5\x04\xbc\xb0\x0b\x9e\x24\x88\xc9\xa4\xc0\x30\
\x12\xf3\x81\x4a\x60\x34\x1c\x03\xda\xb5\x59\x65\x3c\xe9\x4d\x36\
\x89\x0b\x6a\xf8\xd4\x1b\x2e\x9d\xcd\x49\x4b\x55\x56\x66\xa2\x19\
\x9b\xef\xfb\x86\x8b\x79\xea\x7d\x63\x78\xf8\x98\xdf\x96\x7f\x36\
\x73\xd6\x6b\x9f\xe8\x37\xe9\x52\x31\x9d\xb4\xce\xd1\x54\xf5\x91\
\x04\x73\x0a\x2e\x0b\x52\x4a\x30\xaa\xc4\x0e\xae\xe7\xa9\xf8\x75\
\xc6\xe0\x3a\x4e\xd6\x67\xa2\x54\xa9\x12\x19\x25\x45\x39\x75\x09\
\xa6\x48\x56\xd2\x93\xf8\xd3\xcf\x3c\xa4\x04\x2a\x4e\x5d\x51\xae\
\xa1\xc2\xb0\xae\x5c\x3c\x77\xd6\x89\x58\x18\x52\xce\xac\x84\x94\
\x58\x5b\x5d\xd1\x2e\xf1\xb2\xe2\x76\x8b\x7f\x64\x3a\x9d\x1a\x33\
\x72\xf6\xbb\x94\x1b\x7d\x90\x2b\xd8\xc7\x49\xee\x93\x67\x63\x44\
\x45\xca\x5c\xc7\x09\x33\xe6\x7b\xf1\xe2\x25\x60\xbe\x79\xeb\x22\
\x03\xb6\xed\x6a\x81\xe9\x75\x01\xa7\x2a\x89\xb8\xd1\x30\x25\x02\
\x84\xd0\x24\x8e\x41\x99\x03\x47\x9f\x61\x37\xa9\x60\x14\x53\x6e\
\x75\x49\x8f\x48\x88\x24\xc6\x68\x6f\x17\xe7\x4f\xbf\x84\xae\x8e\
\xc5\x70\x98\x93\x9d\xcd\x3b\x8c\x69\xcb\x22\x40\x38\x0c\x2e\xa5\
\x60\x14\xf0\x19\xc5\xbf\xfa\xbf\x7e\x1a\xdf\xf2\x5d\xdf\x8b\xc9\
\x68\x04\x92\xca\xb8\xd3\x33\x7a\x59\x7c\x98\x0e\x80\x24\x02\x46\
\xa3\x31\x84\x10\xe8\x76\x3b\xf9\x6c\x8e\x10\x48\x06\x3b\x70\x83\
\x6b\xb2\x9d\x4b\x70\x91\x31\x1e\x69\x75\x08\xb7\x0c\x9c\x66\xc2\
\x09\x02\x42\x6a\xc0\xc5\x24\x0d\x1a\xa4\xb2\xdf\x91\x45\x19\xba\
\x24\xb3\x29\x43\xd9\x63\x2c\x94\x07\xed\x4f\x7e\x2c\x09\xb8\x06\
\xa0\x62\xbd\x4b\x82\x32\x86\xa0\xd3\x85\xe3\xb8\x70\x5c\x17\x8e\
\x9e\x63\x62\x5a\xa9\xe7\x39\x0e\x1c\x4a\x41\x75\x82\xaf\x19\x6a\
\x47\x0a\x6f\x20\x45\x9b\xa6\x71\x8c\x3f\xf9\xc8\x47\x54\xb8\x62\
\x13\xd0\xb1\xa0\x10\x69\x3a\x88\x7c\xc5\x9f\x02\x89\x30\xf0\x6b\
\xfe\xc0\xec\x85\xd3\xe9\xa4\x58\x9e\xb4\x30\x95\x66\xe0\x54\x65\
\x99\x95\xff\xb8\xe8\x93\xd7\xb4\x4a\x69\x8f\x58\x37\x2e\x6a\xd2\
\x5f\x9a\xa7\xca\x43\xcb\x9e\x5a\x60\x7a\xbd\xca\x7b\xb6\xa9\xef\
\xd9\x83\x80\x13\x10\x87\x94\x63\xb8\x0d\x86\x44\xa4\x9d\x35\x59\
\xc1\x09\x04\x10\x1c\xd3\xd1\x10\xbb\x97\x2e\xe2\xcc\xcb\x2f\x21\
\xec\x74\xe0\x7a\x2e\x18\x53\x71\x13\x94\x10\x38\x94\x42\x02\xe0\
\x52\x22\x74\x1c\xb8\x50\x9e\x45\xeb\x81\x87\xff\xfb\xe7\x7e\x06\
\x3f\xf0\x3f\xff\x00\x1c\xd7\x2b\x6e\x16\x85\xae\x71\xbe\x4d\xf2\
\x84\x60\x34\x1e\x23\x8a\x22\xac\xd8\xce\x98\x65\xda\x35\x4b\x9d\
\xb2\x49\x4d\x83\xa0\xf8\x7b\x52\x68\xd6\xa5\x01\x46\x12\x39\xa3\
\x82\x4b\xf1\xc5\x9e\xaf\xa8\xc0\xa9\x00\x6c\xc6\xc9\x7f\x06\x52\
\xd9\xc9\x80\xcc\x4c\x5a\xad\xf6\x79\x52\x89\x1e\x04\x75\xc0\x4a\
\xa0\x44\x40\xe0\x05\x01\x3a\xdd\x6e\x56\xc6\x73\x5d\x27\xeb\xef\
\xd1\xd4\xb5\x9c\xcc\xf6\xf5\x65\xe9\xff\x29\xa3\xdc\xdc\xde\xc6\
\xe7\x9f\x78\x7c\xa6\xbf\x44\xe6\x51\x9d\x52\x99\x8f\x34\x66\x47\
\x4d\x62\x04\x61\x37\x7e\x5d\x0c\x35\x01\x00\x1b\x1b\x9b\x45\xf9\
\x76\x5a\xb6\x2b\x29\x13\x8a\x2e\x54\x76\x73\xc6\x82\xd9\x70\xe9\
\x3d\x48\x80\xa2\x4f\x5e\x63\x86\x64\xff\x21\x21\x14\x27\x4f\x9e\
\x00\x0e\x36\x5c\x5b\x75\x42\xdb\xae\x16\x98\xae\x3a\x18\xcd\x2b\
\xe5\x95\x98\x92\x71\x10\x14\xf2\x7a\x6c\x1f\xea\xaa\x92\x9e\xed\
\xa4\x51\xb9\x42\x70\x4c\xc7\x43\x6c\x9d\x3f\x8b\x6e\xaf\x07\x3f\
\xf0\x75\xa4\xb9\x6e\xc0\x53\x5d\x42\x0b\x03\x7d\xa7\x99\x2a\x06\
\x52\xe0\x5d\x37\x1e\xc5\xdf\xfc\x81\xff\x05\xff\xee\x5f\xfe\x0b\
\xb8\x99\x18\xa2\xd4\x4c\x26\x40\x42\xcc\x6d\x83\x20\x89\xa6\xd8\
\xdd\xd9\xc5\xf2\xca\xb2\x92\x49\x3b\x6e\x19\xcb\x34\x06\x89\x42\
\x8f\x29\xe6\x5c\xf5\x92\x08\xcd\x41\xd6\x28\x01\x2a\x40\x20\x05\
\x10\x91\x04\x25\x36\x64\x77\xdb\x4c\xad\x5e\x53\x70\x82\xbe\x0d\
\x99\x1a\x8c\x6a\x70\xca\x80\xd6\xd8\xb0\xca\xbd\x74\x42\x80\x04\
\x04\x82\x3a\xda\x64\x94\x14\xbd\x6c\x09\x81\xeb\x79\x70\x3d\x17\
\x41\x18\xc2\xf5\xd4\xe3\xf7\x7d\x2f\x63\xab\xb2\x60\xe4\x6a\x93\
\xb7\x23\x93\xd5\x0b\x29\xf1\xd0\x23\x8f\x82\x27\x1c\x8e\x47\x8b\
\xaf\x3d\x4a\xfd\xa3\x06\x14\x88\x94\xe7\xb1\xc8\xe2\x6f\x76\x52\
\x4b\x98\x24\x8e\x1d\x39\x3c\x63\xaf\x5b\xb7\x26\x93\x49\xae\xca\
\x2c\x18\x17\x1b\xff\x90\x28\x95\x38\xab\x19\x96\x29\x42\xc9\x4e\
\x3e\x00\x50\xca\xd4\x0c\x53\x56\x40\xbe\x92\x72\x9e\xfa\xf7\xde\
\xee\x1e\xb0\xb8\x79\x2b\xda\x32\x5e\x0b\x4c\xaf\x47\xf9\xce\x06\
\x54\xa2\x21\x28\x25\x04\xe0\x4a\x6e\x5c\xf3\xb1\x6f\xdc\x6f\x52\
\xb7\x43\x41\xe1\x32\x02\xce\x13\x8c\x07\xfb\xb8\xf0\xea\x69\xf8\
\x41\xa8\x9c\x1c\x68\xee\x7a\x2d\xa5\x36\x79\x25\x29\x93\x71\x00\
\x50\x30\x42\xf0\xde\xaf\xfb\x0a\x3c\xfd\xf4\x33\x38\xf1\x89\x8f\
\xc2\xf5\x7d\xcc\x06\xf8\x65\x89\x3b\xd9\x26\xee\x80\x20\x8e\x15\
\x38\xf5\x7a\x3d\xb8\xd9\xc9\xad\x56\xd7\xe9\xdf\xe7\x5c\x66\xc6\
\xa4\x52\x02\x71\xc2\x67\x9f\x51\x42\x20\x04\x87\xe0\x1c\x40\xd1\
\x77\x4d\xa6\x1b\x59\x66\x30\x9a\x66\x3f\x99\x66\x9f\xc4\x9a\xc6\
\x9a\x27\x02\x1b\x17\xcb\xa2\xd2\x2f\x35\x69\x2d\x0f\xad\x46\x89\
\x40\x44\x5c\x50\x57\xb3\x25\x3d\x7b\x93\x9e\xf1\xbb\x9e\x0b\x3f\
\x08\xe0\x07\x01\x1c\xd7\x81\xeb\x38\x00\x24\x3c\xcd\x9a\x3c\xd7\
\xc9\x43\x12\x0d\xf6\x54\x2c\x5d\x42\x8b\x52\x24\x26\x51\x8c\x3f\
\xf8\xdd\xdf\xb5\x88\x4b\x90\x51\x2e\x62\x1b\xae\xad\x29\xa3\xcd\
\x65\x5a\x57\x88\x4e\x1d\x7d\xa2\xd3\x74\x3d\xf7\xfc\x0b\x05\xa6\
\x94\x2b\x13\xab\x58\x94\x2c\x9a\x83\xd4\x30\xa8\x4c\xc3\x29\x05\
\x1c\xcf\xc1\xa1\x43\x87\x66\x6d\xf2\xe6\x01\x91\xed\x3a\xfa\x36\
\x9e\x7b\xf6\x59\xcc\x01\xa4\xba\xef\x5b\x67\xf1\x16\x98\x5e\x57\
\xd6\xd4\x94\x29\x25\x39\x38\x19\x9b\xcc\xec\xb9\x63\x91\x0d\x95\
\xdf\xbd\x36\x70\x82\x21\x21\x8f\x95\x2b\xc4\xb9\x97\x5f\x54\x9b\
\xa5\xab\x07\x3f\xf5\xe6\xe8\x3a\x0c\x00\x81\xe7\x30\xfd\x60\xd4\
\xa6\xeb\x52\x8a\x7f\xf8\xc3\xff\x1f\xfc\xd0\xa5\x4b\x78\xe9\x99\
\xa7\x94\x8c\xdc\xfc\x9b\x34\x0f\xa9\x33\x6d\x68\x40\x80\x24\x8a\
\xb0\xbd\xb3\x03\x67\xe5\x30\xbc\x34\x2c\x50\xe6\xc6\xae\xa2\xf4\
\xd8\x12\xce\x8d\x0d\xc0\xec\x3f\x4c\xe1\xb9\x9e\x2a\x63\x49\x0d\
\x48\xba\x94\x27\x33\xe7\x6a\x32\x53\xe2\x53\x65\x3b\x73\x43\x21\
\x95\xbb\x6a\xb9\x7f\x91\x72\x20\x49\x4a\x99\x4b\x00\x38\x28\x04\
\x53\x20\x33\x43\x6f\x09\xe0\x7a\x1e\x3c\xcf\x53\xac\xc9\x75\x11\
\x04\x3e\x3c\xcf\x03\xd5\x36\x4c\x6e\x2a\xdb\xd7\xe2\x07\x6a\x76\
\xba\xa4\xc1\x96\x74\x24\xf9\xf9\x4b\x5b\x78\xee\xd4\xa9\x39\x65\
\xbc\xb2\x4c\xdc\xc6\xc1\xc8\x02\xc5\xb5\x66\x80\x64\x0a\x4a\xf2\
\x13\x02\x82\x30\x58\x0c\x98\x2e\x5d\xba\x54\x52\x1b\x22\x63\xc8\
\x4d\x00\x4a\xd6\x55\x10\x8c\x12\x9f\xa8\xf1\xc9\x3b\x28\x6b\x7a\
\xf9\xe5\x97\x64\xc3\x32\xde\xbc\x21\xdb\x16\x90\x5a\x60\x7a\xdd\
\x00\xca\x06\x4a\x65\x70\x8a\x01\xc4\x33\x72\x58\x7d\x16\x3f\x0b\
\x4e\x15\x8a\xbc\x32\x68\x91\xbc\xb4\x24\x39\xc7\x64\x30\xc0\x36\
\xd9\x80\xe3\xba\x70\x3d\x2f\x4b\x56\x4d\xd9\x53\xcc\x05\x3a\x81\
\x0f\x42\x08\xb8\x94\xf0\x18\x83\x60\x12\x7d\xcf\xc5\x3f\xfe\xf1\
\x1f\xc1\xf7\xfd\xf0\xff\x86\xe1\xde\x2e\x1c\xdf\xd7\x82\x88\xd4\
\x86\xa7\xe8\xd8\x90\xc4\xf9\x1d\xe2\x71\xa4\xb6\x0e\x82\xa2\xd4\
\x5b\xa2\xe8\x55\x66\xdb\x22\x75\xaf\x4c\x68\x8f\x3d\x32\xc3\x92\
\x64\x06\x8a\xd2\x88\x2e\x07\x91\x19\x60\x99\x00\x45\xea\xb1\xc9\
\x02\x52\xf9\xf3\x9c\xb2\xac\x58\x52\x48\xd7\x87\xeb\xfa\x19\xa8\
\x67\xb2\x61\x28\x95\x9e\x17\x04\x08\xc2\x10\xbe\xef\xc3\xf7\x15\
\x48\x79\xae\x03\xca\xb4\xe8\xc4\x71\xe0\x39\x4a\x78\xc2\x74\x0c\
\x86\xa9\x75\x03\x34\x5b\x12\x6a\xc6\xe9\xc3\x7f\xf4\x47\xe0\x49\
\x02\x47\xe7\x66\xe5\xe1\x7f\x64\x96\xb9\x5a\x3c\xe9\x0e\x26\x15\
\x6f\x20\x30\x81\x5d\x10\x90\xa6\xd5\x36\xff\x53\x12\x93\xe9\x34\
\x83\xd5\x42\x82\xee\x0c\x40\x19\x84\xa2\xc4\x6c\xad\xd1\x30\x7a\
\x56\x2c\x05\x7b\xd3\x27\xaf\x49\x59\x72\x1e\x58\x49\x29\x71\xe1\
\xfc\x79\x51\xd3\x63\x6a\x32\x68\xdb\xb2\xa5\x16\x98\x5e\xd3\x72\
\xde\xbc\x99\xa5\x19\x96\xa4\x41\x29\x21\x84\x24\x64\x26\xee\x7b\
\x51\x70\x9a\xe1\x4b\x59\x5a\x1a\x25\x44\x67\x37\x0d\xb1\x75\xe1\
\x3c\x5c\xcf\x87\x9b\x46\x5d\x68\xfb\x18\xae\x05\x06\x8c\x52\x44\
\x89\x83\xd0\xf3\x20\x3d\x07\x12\xc0\xb1\xa5\x2e\x7e\xee\x67\xfe\
\x09\xfe\xee\x8f\xfe\x14\x06\xbb\x3b\x1a\x04\x28\x08\x65\x3a\x63\
\x88\x64\x07\x08\x05\xc7\x34\xab\x93\x91\x34\xa9\x55\x88\xac\x67\
\x22\xf5\xc6\x2b\xa5\xe1\x18\x51\x2a\x45\x15\xfb\x51\xaa\xac\x45\
\x64\x0e\x3a\xaa\x2f\x64\xfe\xdd\x14\x84\x72\xa6\x24\x4b\xe1\x7d\
\xe9\xcf\xb3\x0d\xa6\x24\x2b\x37\x41\x3d\x63\x2f\xfa\x35\x88\x84\
\x44\x4c\x99\x72\xbf\x20\xd4\x32\x83\xa4\xdc\x1e\x54\x5f\xc9\x87\
\xe7\xab\x19\x26\x47\x1b\xe2\xaa\xde\x1e\x32\xe5\x64\xea\x74\x20\
\x8d\x32\xa0\x24\x2a\x77\x29\xe1\x1c\x42\x0a\xec\x8d\x46\xf8\xd0\
\xef\xfe\x2e\x18\x63\x76\xe5\x21\x29\xab\xed\x88\x95\x4b\x91\x6a\
\x9b\x3f\x94\x9e\xfc\x06\x5b\x74\xf5\x76\xae\x9c\x2d\x28\x82\xc0\
\x6f\xfc\xe1\x11\x42\xe0\xd9\xe7\x9e\x47\xd9\xbf\x55\x9a\x29\x8c\
\x86\xe8\x24\xef\xfb\xc9\x9a\x12\xf7\xac\x6a\x4f\xcd\x91\xf9\xe8\
\xf7\x7b\x99\xca\x13\x85\xec\xa9\xc6\xc1\x4c\x05\x60\x92\x42\x34\
\xf1\xc9\x6b\x62\x57\xd6\xae\x16\x98\xae\x7a\x7f\xc9\xf6\x46\x13\
\x35\x65\xbc\xc4\x38\x62\x80\xc4\x33\xa5\x0c\x69\x82\x93\x2d\xfe\
\xc1\x02\x4e\x33\x4a\x3d\xa2\xcf\x62\x95\x81\x68\xcc\x13\x4c\x86\
\x03\x6c\x9e\x79\x05\x8e\xeb\x82\x3a\xca\xfd\x9a\x50\x06\x29\xa1\
\xca\x53\x00\x62\xcf\x05\xd7\x03\xad\x5c\x4a\x04\x0e\xc3\xcd\x87\
\x56\xf0\x93\x3f\xf9\x63\xf8\x89\x1f\xfd\x09\x50\x47\xb3\x24\x42\
\x15\x6b\xca\x98\x13\xcd\xcc\x4c\x49\x92\xa8\xfb\xa1\xad\x69\x14\
\xf3\x51\x83\xb2\x22\x8b\xc4\x90\x46\xab\xc4\xd4\x72\x17\x3e\xf8\
\x98\x4e\x26\xe8\x74\xbb\xc6\x50\xa3\x66\x49\x26\x50\xa5\x20\x24\
\x8d\x12\x5f\x09\xa0\xca\x2c\x4a\x92\x34\x04\x8f\xcc\xd9\x9b\x25\
\x38\x18\xa4\xe3\x65\xde\x77\x65\x0b\x74\xc7\x71\xd0\xe9\x76\x11\
\x76\x3a\xf0\x7c\x0f\xbe\xaf\x4b\x78\xa9\x79\xab\xfe\xfb\x89\xe0\
\x2a\x87\x49\x08\x48\xc3\x5e\x48\x00\x80\x90\x88\x85\x00\x97\x2a\
\x9a\xfe\x89\x67\x3e\x8f\xcd\x73\xe7\xe0\x7a\x5e\x61\x56\xaa\xae\
\x8c\x37\xf3\x1e\x69\xae\x8b\xb8\x2a\x8b\x10\x02\x2f\x55\x72\x36\
\xfc\x10\x8d\xc7\x93\x19\xd6\x4c\x88\x6c\x00\x50\x15\xe0\x64\x91\
\x66\x12\x02\xc4\x71\x04\x29\x64\x49\x92\x7f\x30\x11\x04\xa5\x04\
\x93\xe9\x14\xdb\xdb\xdb\xc9\x82\xa0\x84\x96\x2d\xb5\xc0\xf4\x85\
\xee\x33\xd5\x81\x52\x0c\x20\x4a\x0f\x2b\x63\xaa\x39\x03\xac\x06\
\xa7\x99\x93\xc9\x5c\x2d\xc6\x1c\x24\x82\x63\x3c\xd8\xc7\xc6\xab\
\xa7\xe1\x7a\x2e\x1c\xc7\xcd\x82\xe7\x1c\x57\x31\x24\xae\xcb\x48\
\x09\xe7\xe0\xd2\x07\xa4\x07\x87\x49\xdc\x75\xc3\x31\x7c\xff\x8f\
\xfc\xaf\xf8\x57\x3f\xff\xf3\x60\x8e\xab\x59\x93\xb1\xe9\xeb\xe1\
\x51\x42\x29\x68\x1c\x67\xa0\x08\x28\xc9\xb7\x10\xbc\xd0\x67\x32\
\xfb\x07\xa9\x5d\x51\x59\x61\x95\xb9\xe3\xcd\x26\x0b\x1a\xaa\xac\
\x12\x40\x15\xc0\x29\x67\x0c\x69\xf9\x4f\x95\xe0\x88\x9e\x75\x32\
\xba\x25\x69\x5f\x4a\xa2\x28\x0d\xa7\x0c\xc4\x0b\x14\x40\x98\x73\
\x4b\xc6\x5d\x72\x5c\x27\x13\x3d\xa4\xa0\xa4\x18\x93\xb6\x81\x22\
\x8a\xb9\x42\x97\x31\x53\x71\x83\xd4\x19\x59\xc8\xcc\x6d\xd5\xf3\
\x33\x8e\x22\xfc\xf6\x7f\xfc\x8d\x52\x28\xe0\xac\xd9\x6f\x59\x0f\
\x9e\xa5\x00\x13\xf2\xfa\xbd\xeb\x0d\x66\x1b\x86\x01\x3a\x9d\x70\
\x21\x20\xfb\xba\xaf\xfb\x3a\x3c\xf1\xc4\x93\x98\x4e\xc6\x79\x22\
\xaf\x2c\xa5\xd6\x4a\xa3\xcc\x97\xc5\xa7\x1b\xec\x69\x66\xbe\xa9\
\x58\xdb\x96\x12\x38\x76\xcd\x71\x78\xbe\x97\xbf\x97\x48\x33\xd6\
\x64\x05\xab\x7c\x8c\x41\x34\x3c\x5a\xd7\x87\x16\x98\xbe\xa0\x60\
\xd4\x44\xf0\x10\x1b\x47\x0e\x4c\xb2\xda\xb2\xd9\x5a\xd2\xb3\x82\
\x56\x99\x62\xe5\xdf\x13\x3d\xbb\xc4\x45\x82\xe1\xde\x0e\xce\x9f\
\x7e\x59\xb9\x4c\xe8\x9d\x9b\x31\x06\x21\x84\x02\x24\xe1\x67\xf1\
\xe7\x42\x4a\xf8\x8e\x03\x97\x31\xfc\x95\xfb\xee\x06\xff\xe1\xbf\
\x83\x5f\xf9\x17\xff\x02\xcc\x75\x33\xb6\xa4\x98\x13\x43\xc2\x1c\
\x10\xc6\x40\xa8\xba\xad\xd4\x9a\x26\x55\xe5\x09\x99\x1f\xe6\xc3\
\xdd\xd8\x52\x51\x1a\x92\x54\x65\x8c\xcb\x8a\xfc\xba\x0a\x80\x32\
\x36\xed\x14\x84\x52\x61\x46\xa1\x3f\x65\x02\x54\x49\x28\x41\x20\
\x95\x49\xab\x13\x80\xb8\xbe\x1e\xa6\xa5\x85\x13\x5c\x15\x41\x4f\
\xe1\x07\x41\xe6\x4d\x18\x04\x01\x3c\xcf\x55\x87\x06\x27\x87\xb1\
\xcc\x53\x4f\x01\xbf\x02\x21\x82\xd4\x9e\x49\xa7\xd9\xea\x27\xe5\
\x85\x57\x5e\xc5\xa3\x9f\xfe\x54\x2e\x7a\x28\x60\x11\x99\x2d\xe3\
\x11\x93\x3b\xcd\x61\x48\x57\x5f\x88\x97\x3d\x17\xbe\xaf\xca\xc4\
\x4d\x77\xdb\x24\x49\xb0\xbe\x7e\x08\xdf\xff\x03\x3f\x88\x57\x5e\
\x79\x05\xff\xfd\x8f\x3e\x8c\xfd\xbd\xdd\xac\x44\x2c\x65\x3e\xa0\
\x96\xc1\x90\x34\xe2\xd3\x75\x0d\x54\x6a\x10\x9a\xa9\x2e\x18\xe2\
\x95\x4e\xa7\x03\x4a\x68\x36\x7e\x80\x03\xb3\x26\x95\x29\xb6\xb1\
\xb9\x89\x39\xfd\xa5\x79\x03\xb6\x2d\x5b\x6a\x81\xe9\x75\x07\xab\
\x32\x30\x95\xca\x77\x19\x28\x4d\x09\x21\x11\xc1\x9c\x33\xdd\xca\
\x7e\x13\x2c\x4a\x3d\x03\x8c\x4a\xfd\x26\xa5\xd4\xa3\x48\x52\xa5\
\xde\xe9\x97\x0a\xe0\xc2\x39\x57\x3d\x0e\x6d\xba\xaa\x8c\x46\x05\
\x02\xd7\x45\xe8\xb9\x08\x3d\x07\x5f\xf3\xc0\x3b\x30\x1c\x7f\x2f\
\x7e\xfd\x57\x7f\x35\x07\x27\x0d\x4c\x29\x28\x11\xea\x68\xb9\xb7\
\x98\xd1\x43\xa7\xc2\x07\x61\x80\x0d\x17\x7c\x26\x2a\xc3\xfc\xa5\
\xf4\x77\x08\x66\xc5\x02\x96\x53\xf7\xbc\xdc\x67\xf6\xa0\x0c\x80\
\x92\xd9\x80\xab\x2c\xfc\x4c\x2a\xe2\x87\x28\xe1\x10\xd4\x81\xd3\
\x09\x41\xbc\x40\xab\x18\xa9\x55\x95\xcc\x18\x53\x2a\x3c\xdf\x83\
\xe7\xfb\x08\xc2\x20\x63\x4c\xae\xa3\xa2\xd5\x59\x6a\x43\xa4\x05\
\x0f\x66\xd0\x78\x6e\xd5\xa4\x80\x69\x1a\xc7\xf8\xcf\xbf\xf9\x9b\
\x90\x42\x80\x18\xea\xbf\x2a\x2e\x4d\x1a\x66\xc1\x93\xd7\xb8\xa0\
\x27\xe5\x62\xfb\x6b\x2a\xb3\x1f\x8d\xc7\x58\x5f\x5f\xc7\x91\x23\
\x87\x71\xc3\x0d\x37\xe0\x33\x9f\xf9\x0c\x1e\x7b\xf4\x11\x4c\xc6\
\xe3\x7c\xac\x21\xd5\xf5\x1b\x2c\xaa\x00\x50\xd9\x67\x43\x97\xf4\
\x2c\x26\x10\xfd\x7e\x7f\x66\x82\xe0\x60\xac\xc9\xfc\x66\x6e\xdc\
\xc5\x3c\x40\x6a\x01\xaa\x05\xa6\xd7\x8d\x39\x99\x6f\x50\x3e\xa7\
\x8c\x37\x05\xc1\x34\x9d\x87\x21\x05\x75\x92\x6c\x08\x4e\x8b\x89\
\x21\x54\x7a\x2a\x01\x8f\x26\xd8\xdb\xba\x68\x88\x19\x28\x12\xce\
\x91\xe8\x40\xbf\x84\x8b\x2c\xdc\xcf\x64\x4f\x2e\x63\xf8\xab\xef\
\xfe\x73\xb8\x78\xf1\x9b\xf1\x47\xff\xf5\xf7\xe1\x38\x4e\x56\x47\
\x2a\x32\x28\x32\x53\xb6\x49\x85\x0c\xb9\x10\x42\xfd\x6c\x1a\xc5\
\xf6\x06\x7e\xe6\x40\x2e\xb3\x99\x23\x13\x99\x52\xa2\x49\x2c\x9f\
\x70\x22\x2d\x3d\xa6\x14\x84\x60\xf6\xa3\x14\x40\x49\x5d\x06\x8c\
\x41\x10\x81\x81\x7a\xa1\x3a\xb4\x82\xb1\xdc\x57\x92\x69\xff\xce\
\xf7\xe1\x07\xa9\x12\x4f\x1d\x81\xef\x69\xb6\x94\x7b\xe2\x29\x4b\
\x22\xa6\x24\xe3\x94\x16\x9e\x0f\x09\x99\x39\x5c\x3c\xfd\xe2\x8b\
\xf8\xd8\x07\x3f\x08\xe6\x38\x39\x20\x55\xba\x3d\x90\x62\x98\xed\
\x0c\x31\xb2\x95\xff\x6c\xe7\x3f\x57\x0e\x5a\x84\x10\x15\xf3\x41\
\x9b\xfb\x3b\x53\xaa\x98\x7a\x1c\x27\x10\x42\xe2\xc8\xe1\xc3\xf8\
\xc6\x6f\xfc\x46\xdc\xf1\xf6\xb7\xe3\x73\x4f\x3d\x85\xc7\x1f\x7b\
\x14\xe3\xc9\x18\x8c\x32\x03\x3f\xd4\x1b\xa1\x00\x50\x59\xbf\x50\
\x16\x4b\x7a\x46\x25\x62\x75\x6d\xad\x12\x9c\x17\x65\x4d\x84\x50\
\x9c\x3c\x71\x12\xb8\x32\xe3\xd6\xd6\x8a\xa8\x05\xa6\xd7\x14\x94\
\x80\x66\x6a\xbc\x19\xb6\xa4\x19\xd3\x34\xf3\x97\x93\x02\x3c\x89\
\x32\x06\x62\xcb\x80\x39\xa8\x18\x02\x48\x3f\xb8\x50\x19\x41\xbe\
\x87\xf1\x64\x8c\xdd\xad\x4b\x19\xeb\x49\x92\x04\x3c\xe1\xca\xe7\
\x2e\xe1\x4a\xb0\x80\xbc\x1f\x12\xc5\x0e\x18\xa3\x08\x5c\x07\xdf\
\xfa\xb5\x5f\x89\x28\x8a\xf0\xd1\x3f\xfc\x03\x38\x8e\x51\xd6\xd3\
\x8a\x3d\xd7\x0f\xd4\xc6\x9b\x44\x85\xb3\x6a\x21\x8a\xfd\x14\x21\
\x81\x9d\xdd\xbd\x3c\xd3\xc8\xec\x77\x93\xdc\x8d\x41\x42\xe6\x83\
\xb0\x15\x9d\x37\x82\xdc\x88\x55\x96\x94\x57\xa9\x53\x44\x59\x66\
\x9e\x0f\xe9\x02\x82\x32\x24\x8e\x0f\x37\xe8\xc2\x0b\x02\xcd\xfe\
\x0c\xc9\x98\xf1\x6a\x13\xa8\x81\xda\xb0\xd3\x85\x1f\x06\x4a\x89\
\x67\xce\x31\x39\x2c\x33\x74\x4d\xa5\xe5\x99\x2b\x81\x7e\x4e\x91\
\xce\x2c\xe9\xd7\x79\x1a\x45\xf8\xfd\xdf\xfe\x2f\x10\x42\x58\xca\
\x78\x85\x69\x25\x8b\xfd\x76\x0e\xbe\xf6\xe1\xdb\x1a\x10\x22\xf5\
\x3f\x6f\x02\x5b\x42\x08\xac\xaf\xad\xea\x13\x95\x46\x48\x06\xce\
\xb9\x06\x28\x9a\x7f\x98\xa4\xc4\x5b\x6f\xbf\x1d\xb7\xdf\x76\x1b\
\xee\xba\xeb\x2e\x9c\x3c\x79\x12\x9f\x7b\xea\x14\xe2\x28\x52\x27\
\x09\x59\x9b\x27\x05\xa8\x1c\x9c\x50\x00\x29\xe4\x02\x19\x10\xf8\
\x99\x5a\xb0\x6c\xd6\x6b\x3d\xa3\xa9\x65\x4d\x04\xc0\x70\x38\x68\
\xd2\x63\x6a\xea\x93\xd7\xae\x16\x98\xae\x2a\x20\xd9\xc0\x69\x5e\
\x6f\x29\x32\x80\x69\x02\x60\x92\x4b\x9e\x05\x64\xc2\x01\xca\x00\
\x2a\x80\x0c\xa0\x64\xe1\x03\x4d\x6c\x3d\x97\x39\x62\x88\xb4\xa0\
\x93\x82\x53\x18\x86\x90\x90\x18\x0e\xf7\xb0\x4b\x95\xca\x2e\x8e\
\x63\x70\x6d\x0f\xa4\x4a\x7a\x2a\x8e\x40\x48\x89\x98\x73\xb8\x8c\
\xc1\xf7\x5c\x24\x9c\xa3\xeb\xfb\xf8\xeb\x5f\xff\xd5\x58\x5a\x5e\
\xc2\x27\xfe\xf8\x23\xd8\xdf\xde\x56\xf3\x36\x84\xe8\xd4\x56\x06\
\x29\x05\xc6\xfb\x51\x21\x83\x29\x8b\x4b\x37\xee\x5a\x36\xcb\x42\
\x68\x19\x99\x32\x65\x5f\x56\x2e\x22\x28\x9c\x1d\x57\x75\xdf\xec\
\xdb\x4a\x3a\x0c\x9a\x03\x14\xa0\xbc\xef\xc0\x5c\x50\x2f\x80\x1b\
\x74\xe1\x7a\xde\x0c\x53\x92\x25\xb6\xc4\x18\x83\x1f\x76\x10\x76\
\xd4\xe1\xfb\x41\x36\xbc\xcc\x28\xd5\x72\x7c\x25\x7e\x70\x1d\xa6\
\xcb\xa2\x1c\x49\xc2\xc1\x08\x51\x0c\x29\x3b\xd1\x50\x20\xf5\xd4\
\x73\xcf\xe1\xa3\x7f\xf0\x07\x33\x9b\x7b\x39\x2d\x22\x17\xdc\x11\
\x34\xf2\x72\x98\x71\x20\x22\xaf\x89\x54\x2f\x8e\x63\x25\xf2\x68\
\xb8\x26\x93\x29\xa6\xd3\x08\xcc\x61\xc5\xd2\x9b\x7e\x83\xdc\x7e\
\xfb\xed\xb8\xe5\x96\x5b\xf0\xc4\x13\x6f\xc7\x67\x3e\xf3\xa7\x78\
\xf9\xa5\x17\xd5\xed\x13\x82\x19\xdb\x43\xfd\xba\x4a\x39\x5b\x3b\
\x00\x01\x0e\x1f\x3a\x3c\xfb\x4e\x39\xa8\xf3\x03\x80\xfd\xbd\x7d\
\xe0\x60\x83\xb5\x55\xa0\xd4\x82\x54\x0b\x4c\xaf\x09\x38\xd9\x0c\
\x5b\xab\x4b\x78\x1a\x98\x08\xa1\xd3\xc2\x5c\x0c\x21\x80\x14\x6a\
\x52\x5d\x18\x00\x45\x18\x8a\x29\x3d\xf5\xe0\x84\x52\x09\xaf\xdc\
\x17\x09\xb4\xd9\xa8\xd8\xb8\x80\xf1\xfe\x1e\x08\xa1\x10\x82\x83\
\x27\x09\x78\x92\x28\xf6\xc4\x39\xa4\x54\x0a\xbd\x4e\x18\x64\xa0\
\x14\xb9\x0e\x62\xce\xe1\x3b\x2e\xbe\xfe\x2b\xde\x8d\x3b\x6e\x7b\
\x0b\x7e\xf5\x57\xff\x1d\x76\x2e\x5d\x82\xe3\x7a\x10\x8c\x81\x32\
\x06\xc1\x93\xec\xde\x66\x91\x18\xb2\xdc\x22\x93\xd8\xdb\xdf\x9f\
\xa9\x47\xa5\x9b\x53\x1c\xab\xfb\xe3\x38\x0e\x3c\xcf\x2b\x3d\xfb\
\x69\x3f\x81\x64\x6c\x69\x36\x43\xa7\x28\x90\x48\xa7\x5a\x25\x01\
\xa4\x06\x24\xe2\x06\xa0\x7e\x08\x37\x08\xe0\xb8\xae\xea\x95\x19\
\x03\xb0\x45\xe6\xaa\xe2\xcd\x3d\xcf\x53\xc3\xb4\x61\x88\x30\x0c\
\xb5\xcb\x83\x9b\xcd\x86\x51\x5d\x32\x65\xda\xcd\xdd\x61\x14\x42\
\x48\x44\x5a\x4a\xef\xe8\xd8\x11\xaa\xa5\x80\xfb\xa3\x11\x7e\xe3\
\xdf\x7f\x40\x45\x85\x64\xa9\xb8\xa4\xb6\x8c\xd7\xb4\xbb\x64\x43\
\xad\xcc\x6d\xa4\xf4\xa3\x2b\xc1\x2b\x21\xe4\xc2\x8a\x40\x9a\x0a\
\x43\xca\xc6\xe0\xfa\x44\x86\x52\x8a\x77\xbd\xeb\x4b\xf0\xf6\x3b\
\xdf\x8e\xc7\x1f\x7f\x1c\x7f\xfc\xdf\xff\x08\xbb\x3b\x3b\xb9\xeb\
\x48\xca\xa6\xb5\xc5\x56\xb9\xc7\x24\xa5\x04\x25\x54\xf5\x98\x8c\
\x11\xa6\xca\xf2\x5d\xc3\xf5\xb9\xa7\x9e\x02\xe6\x07\x04\xb6\x65\
\xbc\x16\x98\xde\x50\x3d\xa6\x9a\xb9\xa5\x02\x5b\xf2\xa4\x14\xc3\
\xac\x94\x87\xd2\x59\x6d\x06\x50\x54\x01\x94\x2e\x93\xa1\x8e\x2d\
\xd8\xe6\x99\x0c\x70\x92\x42\x22\xe8\x04\xf0\x3c\x1f\x52\x0a\x1c\
\x39\x7a\x0c\x1b\x17\x2e\x60\xb4\xbf\x0b\x40\xaa\x0c\xa6\x28\x46\
\x1c\xc7\x48\x92\x04\x42\x0b\x22\x26\x51\x84\x30\xf0\xd1\x0d\xc3\
\xcc\xc5\x21\xe1\x02\xd3\x84\xe2\xba\x23\xeb\xf8\xae\xef\xfe\x4e\
\x7c\xe0\xdf\x7e\x00\xfb\x3b\x3b\x6a\x3e\x8a\x10\x44\x63\x55\xc6\
\x63\xae\xab\xe2\xd5\xcb\xb3\x4b\xfa\xae\x9e\x3e\x7d\x3a\x97\x62\
\xa7\x71\xec\x12\x00\x61\x10\x52\xb1\x0c\x21\x09\x04\x62\xa5\xee\
\x13\x1c\xae\xe3\xc0\xf3\x5c\x4b\xae\x92\xb1\xf9\x68\x07\x09\x69\
\x78\xe5\x09\x49\x21\x29\x03\xa3\x0e\xe0\xfa\xa0\x7e\x08\xcf\x0f\
\xf4\x6c\x57\x6a\xce\x4a\x4b\x2d\x25\x99\x09\x37\x00\xc0\x71\x5d\
\xf8\x61\x98\xcb\xc3\x7d\x0f\x9e\xef\x19\x43\xb5\xc5\xc1\xe3\x54\
\x29\x98\x4a\xdf\xa5\x14\x90\x92\x42\x6a\x95\x1e\x20\xf1\xb1\x4f\
\x7c\x12\x27\x3f\xf9\x49\xb8\x9e\x67\x2d\x7b\x81\x98\xa5\x3a\x83\
\x2c\x11\x5b\x09\xaf\x28\x25\x37\x21\x8c\x34\x72\x15\x5f\x1c\xa1\
\x84\x10\x38\x7e\xcd\xd1\x85\x18\x53\x5a\xc6\xa3\xa5\xaa\x80\xe9\
\xa8\x01\xcd\xb6\x03\xdf\xc7\xbb\x1f\x7c\x10\x77\xbc\xed\x6d\x78\
\xee\xb9\xe7\xf1\xe1\x0f\xfd\x21\x76\x77\xb6\x75\x09\x59\xbd\xaf\
\xd5\x89\x44\xd1\x11\x42\x4a\x01\xcf\xf5\x70\xcd\xf1\xe3\xa5\xd8\
\x96\x0a\xd1\x43\x03\x16\x25\xa5\xc4\xab\xaf\xbe\xc2\xd1\xcc\x23\
\xaf\x09\x20\xb5\xe0\xd4\x02\xd3\x6b\xda\x63\xaa\x2a\xe3\x25\x1a\
\x90\x5c\x0d\x4a\x6e\x7a\x24\x71\xbc\xad\xe2\x9e\x85\xde\x50\xd2\
\x1a\xb8\x21\x01\x92\x12\x92\xc7\xaa\xc4\x27\x45\x36\xcc\xaa\x4c\
\x2f\x17\x03\x27\x3f\xf0\x11\x74\x3a\x99\xcb\x32\xa3\x14\x47\x8f\
\xa5\xe0\xb4\xa7\x7a\x40\x9c\x23\x8e\xa6\xe0\x49\x02\xa9\x6d\x81\
\xba\xbd\x1e\x38\xef\x6a\x49\x79\x00\x9f\xbb\x70\x1d\x07\xae\xc3\
\x90\x24\x02\x37\x5e\x73\x04\xdf\xf9\xdd\xdf\x89\xdf\xff\xbd\xff\
\x86\x8d\x33\x67\x73\x77\x02\xdd\x2b\xc9\x4a\x79\x04\x99\x91\x29\
\xa4\x7e\xb2\xf4\xf0\x2d\xa1\x12\x5e\xd8\x41\x12\x27\xa0\x8e\x0f\
\xe2\xe4\x67\xbd\xa9\x42\x50\x12\x01\xa1\xfb\x4d\x44\x90\x3c\xcd\
\xd6\x2c\xff\xa5\x7f\xdb\x18\x00\x26\x3a\x06\x5d\x32\x07\xc4\xf1\
\xc0\x7c\x1f\x8e\xa7\x00\x29\x1d\x34\xa6\x94\x2a\x59\x5e\x49\xe8\
\x90\xf3\x4f\x9d\xb7\x14\x84\x08\x3b\x1d\x04\x61\x3e\xb7\xe4\xb9\
\xea\xf9\x70\x1c\x96\x7d\x25\xe9\x63\x14\x42\xf7\x92\x68\xc6\x04\
\xa4\x94\x10\x5c\x6d\xa6\xaf\x9e\xbf\x80\xff\xf0\xcb\xbf\x5c\x5d\
\xc2\xb3\x70\xa5\x32\x5f\x22\xb0\xb6\xa4\xe6\xf6\x8f\x66\xa6\x70\
\x89\xa5\x7c\xd8\x10\xa5\x3c\xd7\xad\xbd\x6a\x81\xcf\x6a\x3b\x22\
\xaa\x85\x21\x33\x49\xc4\xa6\x75\x90\x61\x2d\xb4\xbc\xb2\x82\xfb\
\xee\xbf\x0f\x37\xde\x74\x23\x3e\xfd\xe9\x4f\xe3\x91\x13\x27\x30\
\x1e\x0d\xb5\x9f\xa2\x34\xca\xad\x14\x80\x1a\x59\xe0\x82\x1f\x68\
\xb4\xab\xaa\x9c\x27\x01\x4c\x27\x13\xd9\xb0\x94\x37\xcf\xb8\xb5\
\x5d\x2d\x30\xbd\xa6\xe0\x24\x6a\x18\x53\xac\x9f\xb3\x48\x7f\x4d\
\x81\xc9\x01\xe0\x66\xae\xd9\x32\x4d\xc7\x94\x33\xce\xd9\xaa\x3f\
\x22\x20\x05\x07\x28\x05\x24\xcb\xdd\x16\xd2\xb2\x56\x0d\x38\x01\
\x04\x42\x72\xf8\xbe\x9a\xb5\x11\xba\xf1\x9c\x81\xd3\xd1\xa3\xb8\
\x74\xe9\x12\xc6\xa3\xa1\x1a\x88\xe5\xca\xd9\x3b\xf5\xab\x8b\xe2\
\x38\x93\x92\x27\x49\x82\xd8\x0f\x10\xf8\x1e\xb8\x76\xd1\x8e\x39\
\xc7\x4d\xd7\x1e\xc3\xf7\x7e\xcf\xdf\xc0\x87\xfe\xf8\x13\x38\xf1\
\xc9\x4f\xc2\x0b\x3b\x70\x7d\x5f\x25\xe7\xa6\x62\x86\x72\x3c\xb8\
\xde\xf2\x09\xa3\x00\x28\x88\xe3\xc1\xeb\xad\xc0\x95\x00\xa4\xd0\
\xc3\xb9\x42\x95\xb8\x4c\xcf\x3d\x21\x66\x7a\x56\x99\x00\x80\x12\
\xf5\x1c\x51\xed\x09\xa8\xcb\x45\x94\x39\x60\xae\x1a\x2c\x66\x29\
\x43\xca\x00\x89\x16\xee\x5b\xf1\xec\x5a\xfb\xe1\x39\x0c\x7e\x06\
\x4a\xa1\x9a\x59\x4a\x15\x78\xd9\xcc\x92\x93\xcd\x2e\x29\xe6\x94\
\xdf\x4c\x9a\xde\xcb\xb9\x48\x27\xac\x10\xc7\x11\x7e\xfd\x03\x1f\
\xc0\xf6\xa5\x4b\x70\x3d\x77\x46\xb0\x90\x82\x50\x91\x15\xc1\x18\
\xa8\x9d\x69\x25\x59\x7b\x53\x95\xfd\xa5\xab\x34\xf4\x24\x84\x44\
\xbf\xd7\xb5\xfe\x4e\xe1\x35\xd7\x74\x58\x12\x82\x28\x8a\x8a\xce\
\x1d\x86\x1e\xbf\xcc\x9a\xca\x60\x75\xf4\xe8\x51\x7c\xcb\xb7\x7c\
\x0b\xee\xba\xeb\x2e\x3c\xf9\xe4\x29\x3c\xf6\xc8\x09\x8c\x46\x23\
\x50\x42\x15\x88\x08\x01\x80\x42\x42\x60\x69\x69\x19\x47\x0e\x1f\
\x99\x91\xb4\x1f\xa8\x9c\x47\x08\xe2\x38\xc6\xee\xee\xee\x22\x1e\
\x79\xed\x90\x6d\x0b\x4c\x6f\x28\xc6\x94\x00\x60\x1a\x98\x98\xe5\
\xa0\x84\x10\xff\xa5\x67\x3e\xf7\x2b\x52\xca\xae\x10\xa2\x73\xeb\
\xdb\xef\xfe\x66\x25\x1f\x56\x67\xe8\x29\x40\x21\x55\xa5\x69\x00\
\x93\x22\x56\x76\x42\x70\x8c\x7a\x7b\x49\x68\x6e\x80\x93\x90\x52\
\x49\x9b\x7d\x5f\x4b\x93\xf3\x52\xa0\xd4\xb5\xfe\xa3\x47\x8f\x62\
\x7f\x30\xc0\xa5\xad\xcb\x59\x26\x10\xe7\xaa\xc7\x13\xc7\x31\xa2\
\x28\x42\x12\xc7\xe8\xf5\x7a\x88\xe3\x04\x49\x12\x20\x08\x7c\xb8\
\x0e\x07\x63\x14\x71\x92\x20\xf0\x3c\x7c\xd5\x57\x7c\x19\x96\x97\
\x97\xf1\xe4\x67\x3f\x8b\x4b\xe7\xcf\x21\x89\x62\x9c\x7b\xe5\x65\
\x1c\x3a\x72\x18\xd7\x5e\x73\x0c\x66\xeb\x9e\x4b\x89\x73\xaf\xbe\
\x8a\xce\xea\x61\x10\xea\x28\x5f\x33\xc0\x00\xc7\x04\x52\x0b\x31\
\xa4\x30\xc1\x49\x14\xad\x9b\x50\x2c\x77\xa5\x32\x6b\xc5\x94\x54\
\xcf\x8b\x39\x0c\x94\x39\xfa\x60\xb9\x85\x92\xd1\xcb\x29\x38\x53\
\xc8\xbc\x84\x47\x29\x81\x1f\x04\x08\xbb\x1d\x04\x9d\x50\xb1\xa5\
\x40\x95\xf1\x1c\xd7\x55\x7d\x24\x87\xe9\x08\x7b\x1d\x6d\x81\x1c\
\x88\x33\xe1\xbb\x14\x90\x92\x40\x08\x09\x4a\x08\x3e\xf9\xa7\x9f\
\xc1\x27\x3f\xf4\x87\x70\x5c\xa7\xc0\x87\xca\x20\x04\x94\x8d\x59\
\x6d\xd7\x9d\x2d\xe5\x11\x8b\x2f\x51\x39\x42\xa3\x91\x0e\x6f\x2e\
\x73\x92\x08\x82\xc0\xe2\x08\xa4\x4e\xad\xf6\xa7\x11\xa6\x31\x07\
\xa4\xc0\x4a\xa0\xec\x9d\xa6\xd3\xa9\x7a\x7d\x18\x2d\x64\x64\x55\
\x02\x93\xd1\x7b\x4a\xaf\xf7\xb6\xb7\xbe\x15\x6f\xbd\xfd\x76\xbc\
\xe3\x1d\xf7\xe0\xa1\xcf\x3c\x84\x53\x4f\x3e\x8e\x48\xdf\x6e\xfa\
\xac\x7b\x9e\x8f\x5e\xbf\x9f\x9f\xba\xcd\x2b\xdf\xd5\x0d\xd7\x42\
\x01\x53\x1c\xc7\x89\xf1\x39\x6f\x2a\x19\x47\x0b\x48\x2d\x30\xbd\
\x11\x7a\x4c\x55\xc0\x44\xf5\x41\x84\x10\x64\x34\x18\x24\x00\xba\
\x94\xb1\xe5\xcf\x3d\x76\xf2\xd7\x28\x21\x5d\xc7\x75\x97\x01\x04\
\x52\x22\x94\x52\x78\x00\x02\x00\x3e\x24\x7c\x00\xbe\x84\xf4\x6f\
\xbb\xeb\x1e\x5f\x8a\x48\x95\x2d\x68\x11\xa0\x4c\x70\x4a\xa7\xf2\
\x97\x96\x96\xe0\x79\xbe\x2a\x2b\x59\x86\x73\x25\xa0\xdc\xa1\xa5\
\xc4\xc5\xad\x4b\x9a\xa1\x29\x80\x48\xe2\x18\x93\xf1\x18\xd3\xc9\
\x14\x51\x14\x61\x69\xa9\x8f\x28\x8a\x31\x8d\x22\x78\x9e\x0b\xdf\
\xf3\xe0\x3a\x0e\xa6\x51\x0c\x87\x31\xfc\xf9\xfb\xff\x1c\xee\x7e\
\xfb\x5b\x71\x79\x67\x17\x9c\x27\xd8\xdd\xdd\xc3\xde\xee\x2e\xb6\
\xb6\xb7\xc1\x28\x41\xc2\x13\x5c\x0c\x43\xec\x8d\x26\xd8\xdd\xdd\
\x43\xd0\x5f\x03\xa1\x54\xff\xad\x28\x3b\xb3\x16\x82\x6b\x60\x12\
\x39\x4b\x4a\x81\xa9\x70\x46\x9e\xc7\x86\xa4\x2c\x8a\x68\x9b\x24\
\xaa\x59\x13\xd1\x00\x65\x82\x91\x99\x86\x9b\x95\x05\x8d\x43\xca\
\x54\xec\xe0\x2b\x96\x94\x1e\xda\xe5\x21\x7d\xdc\x8e\x96\x87\x33\
\x1d\x9b\x5e\x64\x5e\x39\xc0\x49\xfd\x98\x00\x82\x17\x5e\x79\x15\
\xff\xf1\x57\x7f\x15\x36\x5d\x37\xa9\x28\xe2\xd9\x44\x0f\x95\xde\
\xac\x33\x72\x72\xcc\xb0\xd5\xe2\x5f\x20\x57\xf4\x21\x58\xee\xf7\
\x4a\x4c\x5d\xbd\xf7\xb6\x27\x11\xb6\xa7\x49\x26\x76\x19\x8d\xa6\
\x08\x28\xc1\x1e\x27\x58\x5e\x5d\x41\x32\x99\x22\xe6\xc9\xcc\x0c\
\x94\x84\xac\xdc\xbe\x25\xf2\x74\x63\x42\x29\xde\xf6\xb6\xb7\xe1\
\x96\x5b\x6e\xc1\xa9\x53\xef\xc0\x47\x3e\xf2\xc7\x38\xf3\xca\x69\
\xf0\x44\x89\x22\x26\x93\x31\x38\x4f\xa0\x4f\x79\x0e\x56\xce\x33\
\xde\x6b\x9b\xca\xf5\x61\x1e\x5b\x6a\xf3\x97\x5a\x60\xfa\x82\x01\
\x12\xa9\x60\x4c\x65\x70\xa2\xa5\xc3\xd6\x01\x10\x42\x0d\x76\x4c\
\x38\x30\xe6\x9c\x0f\x01\x84\x1a\x90\x82\x0c\x98\xf4\x57\x42\x48\
\xf0\xf4\x63\x8f\x78\x84\x52\x9f\x31\xe6\x43\xc2\x05\x81\x93\xfb\
\xee\xd1\xec\xc3\xfd\x96\x3b\xdf\x09\xcf\x57\xae\xd7\x42\x88\x99\
\x72\x5f\x11\x9c\x24\xfa\xfd\x3e\xa4\x94\xd8\xbc\xb8\x09\xa9\x95\
\x79\x3c\x49\x30\x9d\x8c\x31\x9d\x4c\x10\x45\x53\xc4\x51\x84\x6e\
\xaf\x87\x28\x0e\x11\x86\x01\xa2\x28\x86\xeb\xba\x2a\xad\x95\x10\
\x50\x42\xe1\xb9\x0e\xae\x3d\x7a\x18\x52\x4a\x5c\x7b\xcd\x51\x08\
\xae\xca\x82\x42\x08\x5c\xb8\xbc\x8b\x84\x5f\x06\xe7\x02\xdf\xfa\
\xdd\x7f\x03\xe7\xce\x5d\xc0\x89\x4f\xff\x29\x76\x2f\x6f\xc1\xd3\
\xfd\x02\xce\x13\x50\x2e\x00\x47\x18\xa2\x81\x1c\x30\x8a\x65\x22\
\x23\x08\x50\x5f\x27\x8d\xf6\xc8\x07\x7f\x0d\x20\x2a\x39\x30\x14\
\x0c\x64\xd3\xff\x34\xa8\xb8\xae\x87\xa0\x13\xe6\x82\x07\xcd\x94\
\x3c\xcf\xd3\x5f\x53\xfb\x21\x47\xcf\x2d\x95\xcb\x57\x79\x2d\x4f\
\x70\x01\x42\x09\xb6\xb6\x77\xf1\xfe\x7f\xf9\x2f\xb1\x71\xe6\x8c\
\x52\x02\xce\x0c\xc9\x92\x62\x2f\xa9\x6c\x41\x54\x12\x43\x54\x2a\
\xf4\x48\x5d\x27\x6a\x7e\xc9\xae\x31\x54\x49\x89\xf5\xb5\xd5\x19\
\x60\x19\x44\x09\x36\x46\x11\x3c\x6d\x80\x4b\x35\x6e\x8d\x84\xc4\
\xca\x91\xa3\xe8\xae\xac\x60\x3c\x1a\x61\x7f\xe3\x02\xe2\xc9\x58\
\xcd\x70\x51\x0a\xe6\x38\x10\x5c\x60\x34\x1e\x67\x00\x9f\x24\x49\
\xe6\x28\x12\x47\x31\x40\x69\xae\xe0\x03\xe0\x3a\x0e\xbe\xe4\x4b\
\xfe\x1c\x6e\xb9\xe5\x2d\x78\xea\xa9\xcf\xe1\xc3\x1f\xfa\x43\x5c\
\xdc\xb8\x80\x9b\x6e\xb9\x15\x41\x10\x54\xdb\x7e\x35\x29\xe7\x19\
\x2d\x5f\xae\x94\x95\x1c\xb3\x91\x36\x07\x19\xb0\x6d\x01\xaa\x05\
\xa6\xd7\x85\x31\x49\xfd\x46\x4d\x41\x28\xa9\x01\x25\x13\xd8\x4c\
\x20\x33\x95\x7b\xbe\x01\x4a\xe9\xe1\x49\x29\xd5\x57\x21\xfc\x44\
\x08\x4f\x9f\x0e\x7a\xba\x77\x95\xfe\x9b\xb9\x9e\x87\xd3\xcf\x9c\
\x42\x10\x86\x78\xe7\xbb\xff\xc2\xac\xd0\xdc\x22\x31\x97\x90\x58\
\x5a\x5e\x82\x94\x02\x5b\x5b\x5b\xba\x8c\xc6\x11\x47\x11\x26\xe3\
\x31\xa2\xa9\x02\xa6\xe5\xc9\x04\x41\xa7\x83\x20\x08\xd0\xed\x74\
\xe0\xf9\x3e\x26\x93\x09\x5c\x4f\x0b\x01\xb8\xb2\xe3\x21\x99\xd2\
\x4e\xff\x5d\x9d\xc8\x4a\xd5\x94\x14\xfa\xbd\x2e\x6e\xbd\xe5\x66\
\x1c\x3e\x7c\x08\xaf\xbc\x7a\x06\x4f\x9e\x7c\x44\x45\x6c\x50\x0a\
\xe2\x01\x92\x0b\xcd\x32\x30\x53\x6e\x83\x59\xf2\x49\x11\x36\x8d\
\x4d\xd7\x33\x55\xc5\x72\xd6\x6c\x79\x26\xfb\x9d\x8c\xdd\x48\x40\
\x6a\x2f\x3b\xe6\xc0\xf3\x83\xbc\xa7\xe4\x79\xf0\xdc\xd4\x41\x5c\
\x01\x52\xea\x8d\xe7\xba\x39\x63\x4a\xa5\xe0\x29\xf4\x09\x21\x20\
\x34\xa0\x08\x2e\xf1\x5f\x7f\xef\xf7\x70\xea\x91\x93\x86\x0a\x2f\
\x1f\x92\x25\x25\xe5\x5d\xfe\xed\xec\xf9\x4c\x56\x94\x2b\x2b\xf7\
\xca\xa0\x56\xea\xf7\x98\x8e\x12\x33\xc2\x87\x03\x12\x27\xd7\x71\
\x0b\xdf\xc7\x09\xc7\xe9\xed\x3d\x80\x3a\x48\x28\x85\x23\x89\xfa\
\x00\xa4\x52\x7a\x46\xe1\xba\x0e\x82\xb0\x83\xfe\xf2\x32\x64\x12\
\xc3\xa7\x04\xbb\x97\x2e\x62\xb8\xb7\x0f\x42\x29\xba\xdd\x4e\x76\
\xdf\x52\x95\xa5\x90\x02\xaa\x92\x56\x7c\x5c\x9c\x73\x8c\x46\x63\
\xac\xac\x2c\xe3\xc6\x1b\xae\xc7\x3b\xdf\xf9\x0e\x3c\xfc\xf0\x09\
\xf4\xfa\x3d\xed\x93\x27\x6d\xaf\xfe\x42\x3c\x91\x10\x8a\x67\x9f\
\x7b\x16\x28\x0a\x9c\x0e\x3a\x60\xdb\x82\x52\x0b\x4c\xaf\x2b\x6b\
\x22\x06\x38\x91\x1a\x96\x54\xfe\xbd\x54\x28\x31\x2d\x01\x93\x67\
\x7c\x2d\xff\xdb\x06\x48\xd9\xf7\x71\x14\xf9\x71\x14\x79\x9d\x6e\
\xcf\x7b\xea\xe4\x43\xb8\xf3\xde\x07\x66\x47\x9b\x2c\x2a\x3e\x29\
\x25\x96\x97\x57\xd0\xe9\x74\xb1\xb5\x75\x09\xc3\xdd\x6d\xe5\xa5\
\x17\x47\x88\xa7\x13\x44\x93\x31\xa6\xe3\x31\x7a\x4b\x4b\xe8\xf5\
\xfb\x88\xa6\x53\xf8\x41\x88\x4e\x27\x84\x9f\x70\x44\x8c\x2a\x1f\
\x39\x6d\x53\x23\x8d\x79\x13\x4a\x29\x64\x6a\x75\xa4\xe7\xa4\xe2\
\x38\x86\xe3\x38\xb8\xe1\xfa\xeb\xb0\xba\xb2\x82\x8d\x8d\x0d\x5c\
\x38\x73\x16\x9b\xe7\xce\x21\x89\x23\x30\xe2\x68\xec\x10\x86\xe3\
\x4c\xa9\x2f\x64\x94\xf8\xc8\x4c\x6e\x79\x11\xbc\x8a\x3d\x0c\x99\
\x65\x23\xc9\x8c\x8d\x11\x30\x47\xf9\xe0\x65\xae\x0e\xa9\x73\xb8\
\xe7\x2a\x2f\x3c\xdd\x5b\x62\x54\x09\x1d\x98\x9e\x57\x4a\xe5\xe2\
\x29\x5e\xa4\x0c\x8e\x73\x01\x41\x24\xfe\xe0\x83\x7f\x80\x8f\xfe\
\x3f\xff\x4d\x07\x00\x16\x2d\x93\x32\x80\x41\xd1\x8c\x16\xa4\x64\
\x3f\x44\xaa\x59\xcd\x2c\xfe\x96\xcb\x78\xf3\x4a\x86\x8b\xd2\x25\
\x25\xfb\x5e\xea\xf7\x0a\x27\x0f\xe3\x28\xc2\xf9\xcb\xbb\xe8\x84\
\x01\xc2\x20\x40\xe0\xaa\x39\x2f\x47\x0b\x5d\xa8\x7e\x2c\x94\xaa\
\xe4\xdb\x43\xdd\x15\xf8\x8c\x61\xb4\xba\x82\xc7\x1f\x79\x34\xf3\
\x9b\x22\x30\xc4\x33\x20\x60\x84\xc1\x09\x9c\x22\x98\xea\x7f\xf4\
\xba\xdd\xec\xf2\x23\x87\x0f\xe1\x9d\xf7\xdc\xa5\xfd\x08\x85\xd1\
\x25\x6a\xfa\xc9\xb6\x27\x1e\xef\xed\xee\x01\xc5\x7c\x35\x5e\x03\
\x54\xed\x0c\x53\x0b\x4c\x5f\x70\xc6\x24\x0c\xf0\x49\x19\x10\xd1\
\x6f\x60\x58\x80\x49\x5a\xd8\x92\x39\xeb\xe4\x37\x01\x1f\xcb\x57\
\xf3\xdf\x3e\x00\xef\xf2\xc5\x8d\x00\x80\xff\xc4\x43\x9f\x0a\x19\
\x73\xd8\x9d\xf7\x3e\x50\x64\x1e\x36\x70\x82\x84\xeb\xba\x38\x7c\
\xf8\x08\x70\xf1\x22\x46\xc3\x3d\x08\x9e\x40\x24\x09\xa2\xb1\x02\
\xa6\xf1\xda\x1a\x26\xe3\x31\xba\xfd\x3e\x7c\x7f\x84\xe1\xc0\x87\
\x1f\xf8\xe8\x74\x3a\x99\x13\x82\xa7\x1d\x21\xa4\xde\xc0\x52\x79\
\x30\xe7\x22\x13\x59\x24\x09\x57\x6a\x3f\x3d\x4c\x7b\xfc\xf8\x71\
\x1c\x3d\x7a\x04\xdb\x37\xdf\x8c\xf3\x67\xcf\xe2\xe2\xf9\x73\x98\
\x8c\xc7\xba\x45\xa7\x81\xa7\x90\xed\x94\xaa\x16\x67\xfb\x29\xa9\
\x4c\x5d\xca\xd9\x97\xcc\x54\xf9\x01\x52\x31\x3c\x2d\x8c\x60\x7a\
\xa8\x37\x0d\xfe\x73\x5d\x57\x95\xf1\x74\x0a\x30\xd3\x82\x07\xa6\
\x13\x6a\x59\x5a\x3a\x24\x46\xe9\x4e\x08\x08\x42\x90\x48\x09\x4a\
\x81\x53\xa7\x9e\xc2\x1f\xfe\xf6\x6f\x63\x3a\x9e\x64\xfd\xae\x59\
\x71\x43\x09\x8f\x48\x99\x2d\xcd\x8a\x1e\x88\x2d\x11\xb0\xb2\x8c\
\x67\xfb\xf7\xfc\x38\xf6\x99\xdb\x32\xae\xc2\x28\x55\xa0\x90\x46\
\x7b\x08\x81\xa7\x5f\x3d\x8f\xcd\xcb\xdb\xe8\xf7\x7a\xe8\x44\x31\
\x42\xdf\x47\xe0\xb9\xf0\x3d\x17\x9e\x56\x2d\x3a\x7a\xec\xe1\x70\
\x37\x84\xcf\xd4\xbf\x03\xcf\xc3\xd2\xea\x0a\xf6\xb6\x77\x2c\x73\
\x51\xe9\x6b\x9d\xbb\x80\x00\xca\x35\xbe\xdc\x27\x4b\x61\xa5\xda\
\xbf\xef\x00\x26\xae\x00\xb6\xb7\xb7\x65\x05\x28\x35\x89\xbe\x68\
\x59\x52\x0b\x4c\xaf\x3b\x5b\x92\x16\xb0\x21\x96\x4f\x7f\xd5\x75\
\x4d\x60\xf2\x34\x63\x2a\x03\x8f\x79\x78\x35\xdf\x7b\x25\x86\xe5\
\x03\xf0\x2f\x5f\xdc\x0c\x00\x04\x4f\x3c\xf4\xa9\x2e\x63\x8e\x77\
\xd7\x7d\x0f\xe6\x7d\x27\x9b\xbf\x9e\xb6\xdf\x39\x76\xec\x18\xf6\
\xf6\xf6\xb0\xb9\xb9\x01\x1e\x47\xe0\x49\x8c\x68\x3a\xc1\x64\x34\
\xc4\x64\x38\xc4\x78\x79\x05\x9d\x7e\x5f\xc9\xd1\xc3\x10\x93\xc9\
\x04\x41\x10\xc0\x75\x3d\xb8\xae\xa3\xfd\xf4\x14\x5b\x62\x4c\x59\
\xd0\x70\x3d\x74\x2b\x0c\x6f\x3e\x21\x38\x04\xd7\x89\xb7\x82\xa3\
\xbf\xd4\x47\x10\xde\x82\xa3\xd7\x1c\xc3\x60\x7f\x80\x68\x3a\xc1\
\xf6\xd6\x65\xec\xef\xee\x40\xf0\xa4\x18\xbd\x2d\x8d\xde\x4e\x2a\
\x00\x91\xa5\x8c\x1e\x6d\x9a\x0a\x03\x90\x08\x21\xa0\x0e\x53\x33\
\x35\x4c\x05\x28\x2a\xc1\x04\x55\xf7\xdf\xf3\xe0\xb8\xda\x31\x5c\
\x7f\x4d\xa3\x2c\xa8\x16\x3c\xe4\xc2\xf7\xbc\x88\xa6\xa4\xee\x2a\
\xae\x1e\x94\xe0\xf9\xe7\x5f\xc2\xfb\xff\xd9\x3f\xc3\x70\x7f\x5f\
\x83\x12\x32\x46\x40\x4a\x20\x53\x66\x50\x36\xb6\x34\x23\x82\x28\
\x24\xad\x2f\x56\xc6\x6b\xdc\x65\xaa\xba\x3e\x51\x0c\x33\xf5\x01\
\x14\x42\xe0\xfc\xc6\x26\xce\x5e\xb8\x84\xd5\xd5\x55\xf4\xfb\x3d\
\x74\xc2\x10\x61\xe0\x23\xf0\x3c\xf8\x9e\x0b\xdf\x75\xe1\xb9\x0e\
\xd6\xba\x21\x3c\xa6\xfa\x45\x69\xc8\x30\xa9\x04\x13\xb2\xf8\x47\
\x74\xf1\x80\x5a\xd4\x3d\x1d\x9f\x3b\x75\x8a\x23\xb7\x18\x4b\x4a\
\x20\x65\xf6\x9c\x9a\xca\xc3\x5b\xa0\x6a\x81\xe9\x35\x67\x4e\x02\
\xf3\x45\x53\x55\xa0\x94\x18\xa0\x54\x06\x21\xa7\xe2\xdf\x75\xc7\
\x0c\x30\xe9\x7e\x55\x70\xf9\xe2\xe6\x00\x40\x70\xe2\xe3\x7f\xdc\
\x0d\x3a\x9d\x40\x4a\x49\xef\xba\xf7\xc1\x02\x38\xa5\x67\xa0\x69\
\x4f\x6a\x69\x49\xf5\x9d\x76\x77\x77\x31\xda\xdd\x46\x12\x47\x48\
\xe2\x08\xe3\xe1\x10\xe3\xe1\x00\xbd\xe5\x55\x04\xdd\xae\x9a\xf5\
\xe9\x76\x94\xdb\xb6\x76\xde\x76\x5c\x07\xae\xe3\x82\x69\xf5\x1a\
\x74\x94\x78\x5a\x9e\xe3\x42\x28\x40\x92\x3a\xe9\x36\x35\x79\xd5\
\x36\x49\xae\xeb\x62\x69\x79\x09\x49\xd2\x41\x6f\x69\x09\x83\xbd\
\x3d\x4c\x75\xaf\x6b\x3c\x1c\x2a\xf5\xd5\x68\x84\x68\x32\xc9\xf6\
\x22\x33\xc7\x49\x1a\xd1\x12\x52\x8a\xac\xa4\x08\x4a\xd5\x7d\xd2\
\x40\xc3\xf4\xf7\x34\x63\x44\x69\xd9\xce\x81\xe3\x3a\x99\x24\x5c\
\xa9\xf0\x28\x68\x1a\x90\x08\x92\x45\xb2\x13\xe4\x7f\x87\x27\x0a\
\x94\x5e\x78\xfe\x25\xbc\xff\x9f\x97\x41\xc9\x9c\x51\xb2\xcd\x21\
\x59\x4a\x7a\x36\xb6\x64\x7b\xb3\x19\x7e\x7a\x8d\xca\x78\x57\xe0\
\x49\x24\xa5\x84\xe3\xa8\xd7\x37\x7d\x9e\x87\xa3\x31\x1e\x3a\x79\
\x12\xc3\x58\x62\x6f\x6f\x0f\x2b\xab\xab\xe8\xf7\x97\xd0\xeb\x76\
\xd0\xd1\x16\x4e\x81\xaf\x14\x8d\x37\xae\xf6\xb3\x61\x64\x40\x8d\
\x10\x28\xc9\x77\x3d\x40\x5c\xb5\xd3\xca\x05\xd7\x70\x34\x4c\x2a\
\x40\xa9\x4e\x3e\xbe\x08\x50\xb5\xab\x05\xa6\x2b\x7e\x7b\xa3\x78\
\x4a\x5e\x00\xa7\x14\x74\xe6\x01\x93\x09\x4e\x2e\x72\x97\x08\xc7\
\xf8\xea\xcc\xf9\xde\x06\x5a\x36\xd6\x64\xaa\xfc\x82\xc1\xde\xee\
\x70\xb0\xb7\x1b\xf4\x96\x96\x7b\x4f\x3d\xf2\x50\x20\x85\x70\xee\
\xba\xef\xdd\x33\xe0\x94\x6a\xd5\x96\x97\x57\xd0\xeb\xf5\x70\xf1\
\xe2\x45\x0c\x86\x03\xf0\x24\x46\x12\x47\x98\x8e\x47\x18\x0d\x06\
\xe8\xf4\x97\x10\x74\x7b\x08\x3b\x5d\x84\xdd\xae\x72\x9a\x08\x43\
\x04\x41\x08\xe6\x38\x39\x7b\xd2\xa5\xbd\x94\xe9\x88\x74\x90\x56\
\x37\x80\x52\xe7\xe9\x3c\xdd\x55\x95\xfa\x52\x9b\x24\x3f\x08\x40\
\x99\x4a\x8e\x0d\x3b\x9d\xc2\xec\x4a\xae\xfe\xe3\x80\x21\x31\x4f\
\xd5\x72\x52\xd2\x4c\xf9\xc5\xb2\x41\x58\x92\x81\x13\xa5\x14\x8e\
\x93\x02\x91\x03\x47\x97\xf1\x18\x65\x99\xe2\x30\xbb\x2e\x21\x0a\
\x9c\xd2\xbe\x92\x66\x80\x92\x2a\x91\x03\x08\xf0\xc2\xf3\x2f\xe1\
\x3f\xfc\xd2\x2f\x61\xb8\xb7\x97\x81\x52\x2e\x71\xcf\xc1\x85\x94\
\x18\x13\x29\xb7\x98\x48\x05\x88\xcd\x15\x3d\x90\xb2\x95\x43\x05\
\x1a\x91\x6a\x13\xd8\x9a\x5d\x5c\x4a\x89\x5e\xaf\x8b\x30\x08\x32\
\x16\x3a\x8d\x22\x3c\xf3\xe4\x13\x18\x27\x02\x2b\x87\x8e\x62\xf5\
\xf0\x61\xac\xac\x1f\xc2\xf2\xca\x0a\x96\xfa\x7d\x74\xf5\x89\xcb\
\xcd\xc7\x8f\x22\x74\x9d\x82\x9d\x94\x10\x42\x9d\x60\x1c\xb0\xdf\
\x85\xd7\x10\xb3\xa4\x90\x38\x77\xf6\x6c\x84\x62\xe0\x67\x52\xc1\
\x9c\x9a\xca\xc6\xdb\xd5\x02\xd3\x6b\x0e\x52\x26\xe0\xcc\x63\x56\
\x75\x2e\x11\xe9\xc1\xe6\x7c\x5f\x07\x52\x36\x70\x0a\x4a\x00\x15\
\x1a\x00\x15\x76\xfb\x4b\x29\x40\x79\x77\xdd\xf7\x60\xc1\xaa\x5c\
\xbb\xbd\xe9\xd2\xde\x35\xd8\xdd\xdd\x51\x6e\x11\x71\x0c\x1e\xc5\
\x48\xa2\x08\xe3\xe1\x00\x7e\xd8\x45\xd8\xeb\xa3\xd3\xeb\xa1\xdb\
\xef\x63\xec\x07\x2a\x1a\xc2\xf3\xb5\x80\xc0\x55\xfe\x68\xc6\x66\
\x9a\xf6\x9a\x52\xc2\x26\x84\xd0\x4e\xd2\x00\x4f\x72\x50\x92\x3a\
\xcb\x29\x2d\xfb\xe5\x2e\x10\x42\x45\x9c\x87\x21\xe2\x69\xa4\x76\
\x96\x58\xe4\x2f\x82\x31\xd3\x04\xdd\x77\xa0\x8c\x16\xbc\xed\xd2\
\xbe\x51\x5a\x6e\x4c\x41\x49\x39\x3b\x38\x2a\x5f\x89\x69\x96\xa4\
\x95\x65\xa4\x6c\xb2\xaa\x99\x52\x12\xab\xfb\x7f\xfa\xe5\x97\xf0\
\x1b\xff\xfa\x5f\x63\xb8\xbf\x67\xcc\x50\xe5\x6c\x29\x03\x22\x03\
\x60\xac\x65\xbd\x42\x87\xa7\x28\x92\x98\xc1\x0f\x0b\x5b\x2a\x0c\
\xd5\x96\xcb\x78\xb6\x68\x0c\xb2\x98\x54\x1c\xc8\x4f\x2e\xb8\x90\
\xf0\x5c\x17\x62\x3a\xc1\xcb\xcf\x3d\x8f\xee\xd2\x39\xf4\x57\xd7\
\xb0\x7a\xf8\x28\xd6\x8e\x1c\xc5\xca\xfa\x3a\x96\x57\x56\x10\x84\
\x1d\xdc\x72\xed\x91\xbc\x8f\xa4\x19\xee\x60\x34\x42\x12\xc7\x3a\
\xfa\x83\xbc\x01\x3e\xd6\xf9\x13\x95\x70\x8e\xfd\xbd\xbd\x89\x3e\
\x79\x8c\x8d\xcf\x6c\x15\x28\xb5\x91\x17\x2d\x30\x7d\xc1\xde\xb5\
\x65\xf9\xa7\x98\xc3\x92\xaa\x80\x89\x95\xc0\xc7\x1c\xca\x75\x2c\
\xff\xae\x03\xaa\x32\x38\xf9\x75\xcc\x49\x03\x54\x38\xdc\xdf\x1b\
\x0e\xf7\xf7\xc2\x6e\x7f\x69\xe9\xa9\x47\x1e\x56\x00\x75\xef\x83\
\xb3\x85\x3d\x29\xb1\xbc\xbc\x8c\x4e\xd8\xc1\xd6\xe5\x2d\x0c\x06\
\xfb\xaa\xb4\x17\x4d\x11\x4d\x26\x98\x8e\x86\x98\x0c\xbb\x98\x8c\
\x86\xe8\xf4\xfa\xf0\x02\x05\x4c\xbe\x4e\x78\x65\x8e\x5b\x8c\x96\
\x28\x6f\xf0\x44\xc5\x8e\x2b\x90\xe2\x88\x23\x15\xc9\x91\x06\xec\
\xa5\xce\xe7\x99\xc0\x80\x8b\x82\xf2\x8e\x12\x02\x41\x09\x20\xd4\
\xe6\x4c\x09\xc9\xac\x89\x52\x19\x39\xa3\x1a\x7c\xb4\xe9\x2c\x63\
\x0c\x8e\xeb\x64\x00\xc6\x98\x0a\xf7\x63\x69\xe9\x4e\x83\x95\x6b\
\xcc\x2b\x41\x03\xa3\xe0\x1c\x60\x14\x3c\x91\x10\x1c\x60\x94\xe0\
\xe5\x17\x5f\xc4\xef\xfc\xfb\x7f\x8f\xd1\xfe\x3e\x18\x73\xf2\x3e\
\x4f\xa9\xaf\x54\x06\xa5\x02\x73\x9a\x91\x91\x93\x59\x32\xd4\x94\
\x2d\x11\x9b\x14\xa2\x8e\x95\xcc\xf7\x2e\x07\x90\x85\x42\x72\x7d\
\xd2\x90\xf5\xf2\x26\x23\xc4\x7b\x97\x31\xe1\x11\x86\xbb\x3b\xd8\
\xba\x70\x0e\x9d\xfe\x32\xd6\xaf\x39\x8e\x95\x43\x87\xd1\xe9\x2f\
\xe1\x9b\xbe\xf2\xdd\x85\x52\x03\x17\x02\x9b\x1b\x9b\x39\x58\x5f\
\xc5\xea\xdd\x95\x7e\xd0\x29\x21\x98\x4e\x26\x18\x8f\xc7\x23\xe4\
\x49\x01\x55\x8c\xa9\x0c\x52\x36\x50\x6a\xc1\xa9\x05\xa6\xd7\x8d\
\xf9\x9b\xde\x79\x65\x50\x02\xea\x07\x71\x59\xcd\x41\x2b\x2e\xaf\
\x02\x29\x93\x3d\x79\x15\xfd\xa6\x19\xe6\x54\x02\xa8\x4e\xb7\xbf\
\xd4\x7f\xea\xd1\x87\x43\x48\xe9\xdd\xf9\xae\x07\x48\x0a\x4e\xa9\
\xca\xcd\xf5\x5c\x1c\x3b\x76\x0c\xbb\x3b\x3b\xd8\xdc\xdc\x44\x12\
\x4d\xe0\x25\x1d\xf0\x68\x8a\x68\x3a\xc6\x64\x38\xc0\xb8\xd7\x47\
\xd0\xed\xc1\x33\x98\x93\xeb\xfb\x70\x5c\x4f\x25\xb5\x92\xd4\x1a\
\x88\x66\x02\x89\x82\x88\x41\x0f\x57\xf2\x84\x67\x9b\xa0\x14\xbc\
\xe8\x9d\x67\xf4\x90\x88\xde\x2c\x29\xa1\x90\x44\x64\xd6\x43\x54\
\xcf\xce\xe4\x36\x45\x74\x06\x8c\x5c\xed\x79\x47\x88\x56\xd9\x69\
\x86\x94\xf6\xa4\x68\x76\x3b\xe9\x9c\x92\x32\xbd\xe5\x94\x20\x8a\
\x44\x36\xbb\xf4\xb1\x0f\x7f\x08\x4f\x3d\x72\x12\x93\xd1\x48\x9d\
\xf9\x9b\x60\x54\x2a\xdb\xa5\xdf\xcf\x30\xa5\x82\xcd\x52\x01\x0a\
\x2c\xd6\x43\xf3\xd9\x52\x7d\x33\xa9\xae\x8c\x57\xaf\xc8\xe3\x5c\
\xe0\xe8\x91\x23\x08\x7c\x1f\x52\xa8\xd7\xc1\x75\x1c\xdc\xf1\xd6\
\x5b\xf1\xc2\x33\x4f\xe2\x50\xd7\x01\xf5\x5c\x4c\x05\x10\x4f\x06\
\xf8\xfc\xa3\x0f\xa3\xb7\xbc\x8a\xee\xd2\x0a\x3a\xff\xeb\xf7\x15\
\x58\xd7\x70\x32\xc1\xf6\xc5\xcd\x1a\xf1\x43\xdd\x3d\x5e\x00\xca\
\xc8\x41\x3e\xd9\x32\xfd\x7e\x6a\x80\x52\x54\x62\x4c\x49\x05\x6b\
\x6a\xcb\x79\x2d\x30\x7d\xc1\xfb\x4d\x28\x81\x13\x29\x5d\xc6\x2c\
\xfd\x25\x13\x7c\xcc\xaf\xb4\xe6\x67\x75\x8c\xea\x20\xe0\x94\x01\
\x93\x3e\x46\x29\x83\x72\x5d\xaf\xf7\xd4\xa3\x0f\x77\x21\xa5\x7f\
\xd7\xbd\x0f\x10\x99\x3a\x46\xe8\x47\xbd\xbc\xb2\x82\xb0\xd3\xc1\
\x70\x30\xc0\xc5\x8b\x9b\x88\x1d\x0f\xae\x1f\x20\x99\x4e\x11\x4d\
\x27\x18\x0f\x07\x70\xfd\x00\x41\xa7\x03\xcf\x0f\xe0\xfa\x01\xfc\
\x20\x80\xe3\xf9\x9a\xc9\xa8\xd2\x9e\x59\x4e\x93\x59\x15\x4e\x95\
\x50\x78\x92\xe4\x9b\xb4\x21\xfd\x4e\x0d\x5e\x85\x28\xb9\x41\xe8\
\x19\x19\xd3\x8d\x21\x05\x18\xe6\x50\x30\xe6\x64\x60\x63\xf6\x97\
\x18\x73\xf2\x92\x5d\x61\x60\x36\x15\x36\x88\x6c\x20\x57\xc9\x88\
\x05\x24\x4f\x20\xc0\x30\x9e\x4c\xf0\x89\x3f\xfa\x30\x9e\x7d\xfc\
\x71\x08\xc1\x15\x2b\x44\x89\x19\x95\xcb\x76\x25\x60\xb2\x81\xd2\
\x0c\xc3\x32\x49\x90\x59\x1a\xac\x61\x4b\xc4\x82\x4b\xcd\xca\x78\
\x73\xa5\x7b\x88\xe3\x18\xa6\xf4\xda\x71\x1c\xdc\x7e\xcb\x4d\x58\
\x5e\xea\x63\xa9\xdf\x85\xe7\xba\xf8\x47\xff\xf8\xff\x8b\x1b\x6e\
\xba\x05\xbf\xff\x07\x7f\x88\x5f\xfd\xc0\xaf\xe3\xc5\xe7\x9e\xc6\
\x99\xcd\x4b\xb8\x69\x7d\x4d\x39\x76\x27\x09\x5e\x7a\xfe\x05\xcc\
\xb1\x3a\xaf\xbc\x1f\xe4\x00\x50\xb6\xc8\x22\x94\xe0\xc2\xf9\x0b\
\x12\x4a\x2d\x9b\xce\x1a\xc6\xa5\xa3\xc9\x3c\x53\xbb\x5a\x60\x7a\
\xdd\x00\x89\xd4\x80\x93\x59\xad\x48\xff\x9d\x82\x8e\xd0\x5f\x4d\
\xb7\x88\x26\x47\x1d\x8b\x62\x15\x65\x3d\xaf\x06\xa0\x82\x2a\xf6\
\x04\x20\x8c\xe3\x68\x74\xe9\xc2\xf9\x90\x31\xa7\xfb\xf8\x67\x3e\
\xdd\x65\x8e\x13\x70\xce\xe9\x3d\xf7\x3f\x98\x99\x26\x78\xae\x07\
\x6f\x6d\x0d\xae\xe7\x61\x7f\x6f\x0f\xfb\xfb\xfb\xa0\x8e\x03\x37\
\x56\x00\xe5\x06\x01\xa6\xa3\xa1\xea\xdb\x04\x1d\x55\xde\x0b\x42\
\xc5\x9c\xf4\x20\x2e\xd5\x72\x6d\xa6\x63\xcd\xd3\xf8\x8a\x54\xd0\
\x90\xb3\x29\x15\x22\x07\x9d\x06\x6b\x3a\x90\x13\x7d\x76\x4b\xb4\
\x4c\x3b\x07\x25\x05\x2c\x24\x13\x30\x28\xd0\x49\x4f\x84\x19\x63\
\x59\x70\x5f\x1a\xc7\x40\x34\x20\x31\xaa\xcb\x98\xba\x6c\xc7\x93\
\x04\x0e\x25\x4a\x75\xc7\x28\xb8\xa4\xb8\xb4\x71\x01\x0f\x7d\xfc\
\xe3\x78\xe9\x99\x67\x34\xd0\xb1\xa2\xc1\x6c\x06\x48\xc8\xca\x73\
\x29\xb3\x69\x06\x4a\xb0\x80\x5a\xd1\xd9\xa2\x9e\x2d\x95\x2f\x23\
\xb3\x00\xd6\x60\x9b\xb7\xfd\x24\x2d\x87\xa6\x55\x59\xc6\x28\xee\
\xb9\xe7\x1e\x84\xa1\x0f\x10\x82\xaf\xfb\xfa\xaf\xc7\xdb\xee\xb8\
\x1b\xcc\x61\xf8\x1b\xdf\xfe\xed\xf8\xcb\x5f\xfe\xe5\x78\xff\xaf\
\xfd\x06\x3e\xf7\xf8\x67\xf1\xee\xb7\xde\x8a\x44\x08\xbc\x7a\xe6\
\x8c\x12\x88\x38\x6c\xb1\x32\xde\x81\xd1\x86\x2c\x7c\x7d\x3d\x9b\
\x3d\x31\x58\x53\x5d\x39\xaf\x89\xb1\x6b\x0b\x54\x2d\x30\xbd\xee\
\xe0\x64\x38\x6c\x15\x00\x49\x1a\x80\x44\x50\xb4\x2b\xaa\xba\xac\
\xfc\xef\x3a\x36\xe5\xd4\x80\x93\x3b\x07\x9c\xfc\x0a\x70\x1a\x01\
\x08\x39\x4f\x46\xdb\x5b\x17\x07\x00\xc2\xd5\x43\x87\x97\x9e\x7a\
\xe4\x84\xcf\x39\x67\xf7\xdc\xf7\x60\xd6\x7b\xea\xf5\x7a\xe8\xf5\
\x7a\x08\xb7\xb7\xb1\xb7\xbb\x8b\xc9\x70\x00\xc2\xc6\x88\xa7\x3e\
\x98\xeb\xc1\xf5\x02\x44\xe3\x31\xa8\xe3\xc0\x0f\x3b\x70\xfd\x00\
\xcc\x55\x2e\xdd\x8c\x39\xa0\x0e\xd3\xbe\x73\x2c\x2f\xc9\x69\x63\
\x56\xa6\x3d\xd7\x80\x5c\xcc\xa0\xe2\x39\x12\xed\xeb\xa7\xf6\x81\
\x94\x1d\x10\x89\x5c\x22\x4e\xb5\xf8\x00\x79\x1f\x44\x65\x02\xea\
\x01\x5b\xa9\xcf\x21\x52\x90\x03\xd5\xd7\xd5\xcc\x4c\x08\x35\x60\
\xcc\x08\x78\x2c\x11\x49\x01\xcf\x75\x30\x1d\xc7\x38\xf1\x27\x9f\
\xc4\xab\xcf\x3f\x8f\xc9\x68\xa4\x9d\xc2\x51\xcb\x94\x72\x66\x67\
\x88\x21\xca\x82\x08\x03\x98\x6c\xbf\x6f\x32\x26\xd3\x03\xb0\x9a\
\x2d\x91\xca\x6a\x1e\xb1\xb1\xa5\x86\xfb\xb6\x10\x02\x87\xd6\x57\
\x55\xbc\x09\xd4\x0c\x12\x01\xc1\x1d\x6f\xbf\x0b\xff\xaf\xef\xf8\
\x0e\x5c\x73\xcd\x35\xf8\xea\xaf\xf9\x06\x50\x46\x91\x32\x6d\xca\
\x28\xbe\xea\x2b\xff\x22\x38\x17\x78\xe1\xe5\x97\x31\x19\x8f\xb1\
\xb7\xbd\x0d\xea\xb0\x46\x20\xd2\x04\xa8\xc8\x55\xc6\x28\x4a\x09\
\x9e\x7e\xfa\xe9\xd4\x91\x65\x11\x70\x92\x96\x3e\x53\xbb\x5a\x60\
\x7a\x43\x30\xa7\x52\xbe\x6a\x26\x27\xb7\x59\x16\x55\x7d\x5f\x05\
\x4e\x65\xa0\x62\x73\xca\x7a\x36\x70\x2a\xab\xf6\xc6\x75\x00\x05\
\x20\xdc\xbe\x74\x71\x04\x20\x5c\x5d\x3f\xbc\xf4\xd4\xa3\x27\x7c\
\xce\xb9\x73\xf7\x7d\x0f\x66\x8e\x12\x2b\x2b\xab\x58\x59\x59\xc5\
\xce\xce\x36\xf6\x76\x77\x30\x19\x0d\x91\xb0\x09\xb8\x3b\x05\xd3\
\x02\x88\x64\x3a\x01\x75\x1c\x30\xc7\x83\xe3\x69\x70\xd2\x99\x49\
\x54\x47\xb4\x53\x9a\xbb\x3d\x50\xa3\xe4\x96\xfe\x5c\x0a\x01\x91\
\x24\x90\xda\xd3\x4f\x68\x80\xa2\x80\x8e\xd9\x36\xe6\x97\xa0\x67\
\x88\x74\xb6\x95\x24\x50\x61\x86\x52\xf5\x8a\x28\xd1\xb1\xeb\x82\
\x43\x72\x40\xa6\x4a\x3e\x21\x00\x2d\x01\xe7\xb1\x04\x75\x1c\x70\
\x29\xb0\xb9\x75\x11\xa7\x4e\x9e\xc0\x99\x17\x5e\xcc\xa2\x35\x0a\
\xbc\xa4\x12\x90\x60\xcc\x31\x61\x56\xa5\x67\x0e\xca\x56\xdd\x46\
\x41\x99\x67\x32\xb1\x66\x6c\x89\x34\xdc\xe5\xf3\x12\x60\xf5\x15\
\x57\x96\x97\x55\x5f\x28\x95\xe5\x83\x20\x0c\xbb\x78\xef\xdf\xfa\
\x01\xfd\x18\x4a\xb7\x4a\x28\x38\x17\xa0\x8c\x62\xf3\xdc\xb9\xac\
\xef\x57\x00\x49\x1b\x99\x23\x55\x40\x75\xb0\x7e\x12\xa9\xbb\xcc\
\xc2\x22\xb7\xb6\x2e\x45\xfa\xb3\x61\x96\xf3\x22\x4b\xaf\xa9\xa9\
\x3a\xaf\x5d\x2d\x30\x7d\xc1\x99\x93\x09\x4a\xb0\x00\x54\xd3\xa3\
\x0a\xa8\x98\x05\xa0\x4c\xf6\x64\x03\xa7\xb2\x6a\x6f\x52\x62\x50\
\xe3\x8a\xfe\x53\x06\x52\xdb\x5b\x06\x40\x3d\xf2\xb0\x2f\xa5\x70\
\xef\xba\xf7\x81\x6c\x30\x77\x65\x65\x05\x2b\x2b\x2b\xd8\xd9\xde\
\xc6\xee\xee\x0e\x26\xe3\x01\x30\xa1\xaa\x84\xe7\x79\x60\x8e\x07\
\xea\x4c\x41\x46\x4a\x6c\xc0\x1c\x17\x8e\xeb\x81\x3a\x6a\xe6\xc9\
\xc9\x92\x51\x73\x60\x52\xd7\x51\x73\x48\xca\x73\x55\xbb\x48\x70\
\xae\x41\x85\x67\x91\x15\xb9\xbb\xb7\x62\x3c\x84\x68\x87\x02\xa3\
\x5f\x44\x1d\x40\x24\x12\x5c\x0a\x10\x29\xc0\xa5\x00\x38\x57\xc3\
\xb6\xae\x72\xba\x8e\xb9\x8a\xf4\x90\x9c\x62\xef\xf2\x16\x5e\x7e\
\xf6\xf3\xd8\x3c\x7b\x16\xd1\x78\xa2\x7d\xef\x4a\x9b\x9b\x15\x88\
\xca\x5f\x49\x9e\xf6\x6b\x29\xe1\xd9\x00\x8d\x14\xfc\xf4\x6c\x25\
\xbc\x45\xd8\x12\x69\x96\xc7\x34\xfb\xe0\xf2\x37\xb7\x94\x08\x03\
\x5f\xa9\x28\x8d\xc7\x5e\x00\x98\xfc\x07\x90\x40\xe6\x1a\xae\x98\
\x08\x5d\x88\xdf\x90\x46\x77\x95\x2c\x00\x38\xcd\x1e\x37\x01\xf0\
\xd2\x0b\x2f\x0e\x0c\x60\x32\x59\x53\xd3\x72\x1e\xd0\x9a\xb8\xb6\
\xc0\xf4\x05\x02\x27\x7b\xca\x58\x11\x9c\x60\x01\xa8\xaa\x7f\x97\
\xbf\xa7\x15\x20\x55\x55\xe2\x9b\xa7\xd8\x4b\x23\xdf\xcb\xe5\xbd\
\x49\xa9\xff\x34\x6e\x02\x50\xdd\xfe\x52\xff\xa9\x47\x4e\x04\x52\
\x0a\x4f\x01\x94\x3e\xab\x5e\x5d\xc5\xf2\xea\x2a\x86\x83\x7d\xec\
\xee\xec\x60\x38\x18\x20\x9a\x0c\xc1\x98\x9b\x31\x28\xea\xa8\x5e\
\x53\xa4\xe3\x2a\x98\xe3\xc2\xf5\x3c\x50\xe6\x64\x8c\x89\x64\xc0\
\xa4\x63\xd1\xf5\x46\x4c\x75\x44\xbd\x94\x4a\x3e\x2e\xb5\x43\xb8\
\xf9\xd9\x17\x3c\x81\xe0\xaa\x54\x48\x1c\x06\x21\xa8\x02\x31\x9e\
\x28\xb6\x23\x18\x20\x19\x88\x74\x00\x4a\x21\x92\x08\x7c\x4a\x32\
\x31\xc4\xde\x68\x84\xf3\xa7\x4f\x63\x7b\x73\x13\xd1\x64\xa2\xa2\
\x35\x1c\x56\xb4\x43\x2a\x6f\x68\x75\xc0\x54\x2e\xe7\xc1\x54\xe1\
\xd5\x83\x52\x41\xf4\x40\xca\x45\x39\xb3\x27\x55\xc3\x96\x50\x2c\
\xfd\x2d\x5a\xc6\x4b\x17\xe7\xb9\x79\xae\xc9\xb0\x48\x05\x22\x10\
\x42\xb4\xc1\x6f\x9e\xce\x8c\x34\x8a\x5e\x8a\x6c\xa8\xdb\x5e\x9b\
\x9b\x4f\x81\xe6\x83\xed\xc1\x1a\x53\x9b\x9b\x1b\x7b\xfa\xfd\x3e\
\x9e\x53\xce\xe3\x35\xe5\xbc\x16\x94\x5a\x60\xfa\x82\xb3\x27\xcc\
\x29\xeb\x55\x54\xfd\x2b\xc1\xcb\xfc\x7e\x1e\x40\x31\x0b\x7b\x72\
\x50\x1c\xe2\x8d\x2c\xe5\xbd\xe9\x95\x00\xd4\x70\x7f\x6f\x94\xcf\
\x42\x95\x00\x4a\x02\xbd\x5e\x1f\xdd\x9e\x72\x24\x1f\xec\xef\x61\
\xb0\xbf\x8f\xd1\x68\x90\x31\x22\xe6\xb8\x1a\xa4\x1c\x24\x94\x21\
\x9e\x50\x9d\xad\xa4\xc2\xfe\x88\x56\xce\x39\x3a\xd2\x3c\x1d\x5c\
\x4d\x95\x75\x6a\xa3\xd4\x89\xb7\xf9\xfe\x9d\x53\x59\x4a\x21\x39\
\x83\xe4\x2a\x43\x89\x50\x02\x29\x14\x60\x49\x46\x91\xc4\x14\x89\
\x1e\xa2\x05\xa4\x0a\x2a\xe4\x09\xb6\x37\x37\xb1\xbf\xb3\x83\x38\
\x9a\x2a\x39\xb9\xe3\x98\x44\xc0\x86\x48\xa5\xfd\xd4\xce\x94\x80\
\x9a\x7e\x52\xb9\xaf\x64\xf9\xdd\x2a\x10\x9b\x71\x74\x98\x51\xe2\
\xcd\x13\x3d\xcc\x96\xf1\xaa\xb6\xf7\x5e\xb7\x93\x89\x52\xec\xd7\
\x2d\x3a\xbd\xff\xe2\x3f\xff\x05\xbc\x74\xfa\x34\x6e\xbc\xf1\x26\
\x74\xba\x5d\xbc\xe5\x96\xb7\x60\x34\x1c\x62\x79\x65\x05\xb7\xde\
\x7a\x2b\xa0\x47\x11\x98\x3e\x41\x31\x55\x98\x42\xc7\x5f\xe4\x99\
\x59\xa8\xb6\x6b\x68\x52\xc6\x6b\x80\x51\x04\x2a\x05\xfa\xd5\xd3\
\xaf\x6c\x58\x80\xe9\xa0\xe5\xbc\x76\xb5\xc0\xf4\x86\x00\x28\x5b\
\xa9\x6f\x26\x8d\xba\xe2\xf3\x53\x07\x54\x4d\xd8\x13\x43\x3e\x2b\
\x55\x55\xde\x8b\x1a\x00\x54\x60\x29\xf3\xd5\x02\x54\xa7\xd7\xeb\
\x3f\xf5\xc8\x89\x50\x4a\xe1\xe7\x00\xa5\xa2\xde\xd7\xfd\xc3\x58\
\x5b\x3f\x84\xc1\xfe\x3e\xa2\x48\x01\xd5\x70\x30\xd0\x4e\xe4\x4c\
\xf7\x9f\x34\x33\xd2\xa0\x94\x6e\x54\x84\x92\xac\xd4\x97\xf5\xa7\
\x74\xdf\x49\x24\x89\xb2\x35\x92\xb2\x60\xf1\x93\xfe\x9b\xc7\x14\
\xdc\x89\xc1\x1d\x47\x9b\xb6\xaa\xb3\xf5\x28\x55\xfb\xe9\xf4\xde\
\xe9\x70\x80\x78\x3a\x45\x12\xc7\x48\xa6\x53\x2d\x69\x77\x4a\x66\
\xb7\xb3\x60\x34\xbb\xf9\x95\x99\x0c\x99\x55\xe8\x19\x97\xcf\xb0\
\x24\xcc\x8a\x25\x8a\x7d\xa5\xea\xb2\x61\xf1\x7e\x91\x32\x49\x5a\
\x8c\x2d\x91\xd9\xdb\x90\x52\xe2\xc6\xeb\xae\xcd\x72\xb7\x66\xaf\
\x46\x66\x36\xf8\xf7\xbd\xef\x7d\x2a\xf8\xaf\x6e\x93\x71\x1c\x78\
\xbe\x8f\x43\x87\x0e\xe1\xee\x7b\xee\xc1\xa1\x43\x87\x71\xed\x75\
\xd7\xe2\xa6\x9b\x6f\x46\x14\xc5\x58\x5a\xea\xe3\xba\x6b\xaf\x03\
\x21\x04\xbe\xef\x17\x9c\x3d\xd2\x12\xa3\x19\xa7\x2e\xe5\x41\xb0\
\xa0\x08\xa8\x49\x12\x0f\xf4\xfb\xdb\xc6\x9a\xca\x16\x45\xad\x5c\
\xbc\x05\xa6\x2f\x2e\xb0\x92\xc5\x0c\x06\xb3\xc4\x41\x6a\x4f\x61\
\xeb\x4b\x80\x65\x06\x95\x1e\xbc\x06\xa0\x92\x12\x8b\x4a\x01\xca\
\xec\x3f\x4d\x2d\x3d\xa8\x32\x40\x85\x16\x90\x1a\x01\x08\x47\x83\
\xc1\x68\x34\x18\x84\x9d\x5e\x6f\xe9\xa9\x47\x4e\x84\x80\xf4\xee\
\x7c\xd7\xfd\xc4\x34\x59\xed\x2f\x2d\x01\x80\x06\xa9\x3d\x4c\x27\
\x13\xec\xef\xed\x61\x3a\x19\x63\x3c\x1a\xe6\x8c\x89\xe5\x8c\x89\
\x32\x86\x98\x52\xc5\x9a\xf4\xc6\xce\x98\x02\x1a\xd7\x73\x41\xa9\
\x93\x39\xa7\xa7\xb9\x48\x94\x10\x0d\x72\x14\xf1\x74\x92\x0f\xf4\
\x42\xf5\xa9\x08\x94\xcc\x3c\x15\x54\x08\x9e\x5b\x1d\xa6\x22\x09\
\x1b\x00\xd9\xb7\xb4\xd9\xba\x52\x19\x64\x2a\x41\x6a\x4e\x09\xd0\
\x2a\x76\xa8\x00\x25\x93\x41\x91\x99\xde\x12\x39\x30\x5b\x32\x97\
\xeb\xb9\x15\x2c\x64\xd6\x9d\x5c\xa2\xba\xec\x69\xae\xd4\x86\xea\
\x95\xe1\x10\xaf\x9c\x3e\x0d\xcb\x66\x9f\xdd\xaa\xe3\x38\x34\x08\
\x02\x7a\xf8\xc8\x11\x7a\xcd\xb5\xd7\xb2\x6b\x8e\x5d\x83\x5b\x6f\
\xbb\x15\xb7\xdc\x72\x2b\x00\x60\x75\x6d\x15\x87\x0f\x1f\xd1\x20\
\xe6\xa9\x93\x1e\x63\x26\x2e\xf5\x68\xcc\xcc\x7f\x4b\x51\x29\x84\
\x12\x4c\xa6\x53\x6c\x6e\x6e\xbe\x04\x60\xa8\xdf\xdb\x75\x7d\xa6\
\x3a\xf7\x87\x16\x9c\x5a\x60\xfa\xe2\x45\xac\x32\x70\x11\x5b\x8d\
\xa6\xf8\xd5\x54\xf9\x89\x05\x01\xca\x2c\xf3\x99\xe0\x14\x95\x7a\
\x50\x55\x00\x55\xa5\xe2\x9b\x01\x28\xc7\x75\x7b\x4f\x3d\x7a\x42\
\x0d\xeb\xbe\xeb\x7e\x22\x8d\xa8\x74\x00\x2a\x7c\x70\x69\x19\xeb\
\x87\x8f\x60\x3a\x9d\x60\x3c\x1a\x21\x49\x62\xec\xed\xec\x20\x8e\
\x63\xc8\x84\x63\x3c\x1a\xe4\x8e\x11\x80\x06\x2b\x96\xcd\x41\x51\
\x63\x50\x37\xdd\xac\xcd\xe6\xbc\x94\x12\x9d\x4e\x17\x9e\xef\x2b\
\x97\x5d\x29\x21\x25\x07\x91\xba\x19\x9f\x06\x1b\x6a\xa5\x59\xbe\
\x47\x17\x63\x36\xaa\xf6\x18\x52\x51\x26\x33\xc5\x09\xd5\x65\xbb\
\xfc\x9c\x63\xf6\xfa\xe6\x6d\xcf\x82\xd9\x0c\x28\x81\x58\xc8\x1c\
\x99\xc1\xa3\xfa\x94\x5f\x3b\x5b\xca\xef\x1b\x81\xef\x79\xea\x79\
\x9d\xab\x4c\x20\xe0\x3c\xd1\x03\xb9\x73\x57\x6c\x61\x22\xe5\x8d\
\x1e\x00\x48\x92\x24\x64\x30\x18\xd0\xc1\x60\x40\x5f\x7a\xf1\xc5\
\x72\xc5\xa0\x90\x16\xed\xba\x2e\xf1\x7d\x1f\xcb\x2b\x2b\xb8\xfe\
\x86\x1b\xd8\x75\xd7\x5d\x4f\xef\xba\xe7\x6e\xf7\xd8\xb1\x63\xd4\
\x75\x3d\xac\xad\xad\xb1\xd5\xd5\x55\x4a\x29\x45\x10\xe4\x4c\x8c\
\x27\x1c\x00\x06\x06\x30\x8d\x1a\xf4\x99\x5a\x57\xf1\xd7\x71\x91\
\x83\xd1\xe2\x37\xd8\x83\x20\xe4\x0b\x09\x40\x57\xe3\xfe\x93\x05\
\x4a\x7c\x66\x99\x6f\x9e\xc5\x91\x6d\xf6\xa9\x6a\x40\xd7\x2b\xb1\
\x27\xbf\x06\xa0\xd2\xa3\x03\x20\x64\x8c\x75\xfb\xcb\x2b\x3d\xe6\
\x38\xfe\x5d\xef\xba\x9f\xda\x31\xb9\xa8\xfe\xe2\x7a\xb8\x75\x34\
\x1c\x64\x42\x80\x24\x8e\xb1\xbb\xb3\x5d\xd8\x3b\xa3\x89\x0a\xe2\
\xeb\x74\x7b\x9a\x49\x31\x84\x9d\xae\x62\x4d\x7a\x70\xd6\xd5\xaa\
\x3f\xe8\x19\xa9\x74\xaf\x28\xfe\xdb\xe8\x61\x94\xf6\x12\x59\xf9\
\x4d\x99\x50\x11\x0b\x00\xd8\x58\x10\xaa\xd9\x52\x2d\x28\xe5\x00\
\x41\x2c\x65\x43\xfb\xed\x98\x00\x35\x2b\x52\x20\x75\x40\x54\x7a\
\x8c\x51\x14\xe3\x97\x7e\xe6\x9f\xe0\xe6\x1b\x6f\x9c\xbb\xdb\x12\
\x42\x30\x1a\x0e\xb1\x7e\xe8\x70\xdd\xd5\xa6\x0d\xd8\x88\xe9\x49\
\x49\x50\x3d\x46\x91\x5e\x5e\x7e\xb5\x44\x89\xd5\x98\x59\x68\x69\
\x50\xe7\x34\x08\x02\x1a\x76\x3a\x58\x5b\x5d\xf3\x24\xe4\xf8\xc5\
\x17\x5e\x78\xa2\x04\x4c\x63\xe3\xb0\xf5\x9c\x22\xe3\xb6\x79\x45\
\x89\xef\x0d\xb9\xbf\xb4\x8c\xa9\x5d\x57\xc2\xae\xa4\xa5\xfc\x67\
\x1b\xec\x15\x06\x93\x32\xdd\x26\x98\x85\x45\x39\x46\x99\x6f\x5e\
\x89\xcf\x2c\xf5\x99\x2c\x6a\x82\xea\x3e\x94\x1e\xd6\xe5\xa3\x9d\
\xcb\x5b\x03\xc6\x58\xef\xf1\x87\x3e\xdd\xd1\x6e\x12\xec\x9e\xfb\
\x1e\x2c\x61\xad\xcc\x4a\x2a\xa9\x65\x91\x1f\x04\x69\x0d\x06\x12\
\x52\x6f\x74\xd2\x88\xd1\x50\x7b\x17\xa5\x6c\xf6\x43\xaa\xbf\x37\
\xcb\x37\xc4\x0a\x85\x86\x6d\x2d\x31\xea\x50\x98\xed\x2f\x49\x52\
\x55\x7f\x2d\x32\x91\x82\x62\xcd\x2c\x93\x11\x52\x3a\x61\x2a\x03\
\xd1\x01\x98\x92\x4d\x12\x3e\x03\x4a\x15\xfd\xa0\x39\xa0\x84\xd2\
\x7d\x77\x5c\xa7\x7a\x82\xaf\xb4\x28\xab\xf4\xc1\x13\xc6\xa6\x6f\
\x4a\xb2\x4d\x36\x62\x6e\xee\xb2\xf4\x5e\xb7\x01\xd2\x0c\x63\xc2\
\x6c\x16\x9a\x99\x87\x66\x82\x53\x34\xd1\x6b\xfb\xf2\xe5\x89\xbe\
\x4f\x65\x40\xaa\xeb\x31\xd5\x99\xb8\xb6\x8c\xa9\x05\xa6\x16\xa0\
\x50\x94\xaa\x97\x81\xca\x04\x29\x86\xa2\xa9\x6c\xb9\xc4\x67\x96\
\xfa\x6c\x3d\x28\x9b\x8a\xaf\x09\x40\x85\x00\x3a\x2b\x6b\xeb\xfd\
\x74\x58\xd7\x04\xa8\x34\xae\x3c\x1b\x49\x92\x35\x9f\x6d\x02\x1d\
\x99\x80\x4c\xfc\x20\xb3\x06\x42\xba\xcb\x4a\x10\x49\xd4\x80\x6d\
\x65\xdd\x4a\x03\x92\x34\x76\x5c\x62\x41\xa1\x6c\xd7\x93\x25\x99\
\xe5\xec\x46\x5e\x64\x47\x26\x10\x90\x59\xf5\x5e\x0d\x4b\xb2\xb2\
\xaa\x0a\xa0\xa9\xeb\x2b\xd9\x0c\x5e\x9b\xd4\x11\xd2\xdf\x93\x52\
\x82\x32\x06\x87\xb1\x66\x2c\x1f\xc0\x74\x3a\xb1\xfd\x28\xd1\x65\
\xb2\x79\xe2\x02\xb3\x7f\x63\xbe\x09\xe6\xb9\xa5\x94\x3f\x17\x65\
\xaf\x4a\x93\x35\xc5\x06\x40\x4d\x8d\x63\x52\x02\xa4\x26\x3d\x26\
\xf1\x7a\x30\xa4\x76\xb5\xc0\xf4\x67\x09\xa0\x44\xe9\x2c\xd3\x66\
\x28\xcb\x0d\x16\x55\x66\x50\xe5\x5e\x54\x59\xc9\x57\x56\xf1\x55\
\x09\x25\x52\x37\x89\xce\xce\xe5\xad\xa1\x01\x50\xc1\x0c\x40\x65\
\x3b\xa7\x04\x64\x6a\x18\x24\x8b\x1b\xbf\x59\x76\xd3\xa0\x44\x0a\
\x08\x24\x21\xe5\xac\x59\x69\x7d\xa8\x69\x19\x9c\xaa\xb7\xeb\x99\
\xdb\x29\xcf\x18\x11\x0b\x18\x59\x4a\x6c\x05\x55\x9d\xad\xdf\x64\
\x65\x4a\xb6\xdf\x29\x32\xa4\xd9\xb2\x62\x09\x94\x6a\xd8\x51\x19\
\xb9\xa4\x94\xe8\xf7\xba\xe8\xf7\xfa\x8d\xb7\x5c\xdd\xab\x29\x33\
\xa5\x01\x80\x7d\xe4\x3d\x9c\x61\x05\x6b\x2a\xb3\x91\x02\x19\xab\
\x61\x4b\xa4\x06\x98\x6c\xe0\x94\x94\xca\x71\x53\x4b\x89\xd1\x26\
\x15\xb7\xf5\xc2\xaa\xa4\xe2\x2d\x48\xb5\xc0\xf4\xa6\x07\x28\x69\
\xf9\x90\x56\xf9\xf6\x71\x03\x94\x78\xa9\xc4\xc7\x4a\x0c\xca\x56\
\xe2\xab\x2a\xef\xd9\x64\xe6\x8d\x00\x4a\x0a\xe1\xde\x75\xdf\x03\
\x85\xe0\x42\x10\x99\x6f\xa7\x59\x2b\x48\x16\x37\x52\x3d\xf3\x52\
\x06\x25\x62\x7c\x5f\x43\x9b\xb4\x82\xcc\xb2\x85\xd8\x44\xfe\xb2\
\xa2\x9c\x57\xa2\x33\xa4\x34\x50\x64\x2f\xad\xd9\x66\x90\xca\xce\
\x0e\x8b\x81\x12\xa9\x00\xa8\xd9\xbb\xd9\xdc\x97\xce\xec\xd9\x35\
\xa3\x4c\x04\xfb\x83\xfd\xf2\xa5\x23\x0d\x44\x03\xe3\x28\x97\xf4\
\x6c\x73\x42\xa6\x3a\xaf\xca\x11\xa5\x0e\x98\xca\xac\x49\xa0\xe8\
\xde\x50\xc7\x9e\x22\x4b\x09\xaf\xcc\xe8\x38\x5a\x8f\xbc\x16\x98\
\xda\xb5\x30\x40\xf1\x1a\x16\x55\x55\xe2\x63\x15\x0c\x2a\xb6\x80\
\x54\x0a\x4e\xd3\x12\x50\x35\xf5\xe3\xcb\x00\x4a\xb9\x49\x9c\x0c\
\xa4\xe0\xde\xdd\xf7\x3d\xa0\xdb\x44\xe6\xae\x2a\x8b\xa5\xa9\x94\
\x35\x15\x54\x74\xb2\xb4\x61\xab\xef\x0b\xe5\x37\x83\xee\x48\xeb\
\x16\x9d\xef\x2f\xb2\x0c\x46\x74\x76\x23\x9f\x2d\xe9\xd5\x80\x51\
\xb9\x2f\x34\xc3\xb4\xec\x8c\xe9\x20\xa0\x64\xcd\x68\xb2\x29\xf2\
\xac\x40\x55\xee\x87\x95\xde\x45\x73\xd6\xc4\xb0\x23\xd2\xef\x9b\
\x91\x71\x0c\xe6\xb0\x26\x33\x5e\xa2\xaa\xcf\x44\x1a\x00\x13\x6a\
\x58\x13\xaf\x00\xa8\xc8\x72\xcc\x03\xa5\x2a\xa9\x78\x0b\x54\x2d\
\x30\xb5\x00\x55\xd8\x44\x66\xf7\xdd\xf2\x87\x5b\x96\xca\x7c\xb6\
\x12\x5f\x15\x83\x72\x4a\xe5\xbd\xaa\x12\x5f\x59\x6a\x1e\x62\xb6\
\x0f\x95\x01\x54\x1a\x5c\xd8\xe9\xf5\x7a\xa7\x1e\x39\xd9\x91\x92\
\x7b\x77\xdf\xfb\x40\x71\x07\x95\x46\x97\xa7\xc0\x9a\x34\xfc\x18\
\x8f\x5f\xa6\x4c\x09\xb3\x23\x49\x65\x3b\x8e\x22\x42\x65\x19\xbe\
\x0d\x2c\xd7\x88\x9d\x75\x90\x72\x4c\x3a\x2c\xec\xc8\x02\x48\x55\
\x8c\x8b\x94\xe4\x1a\x4d\x41\x89\x94\xff\xc6\xec\xe3\x20\xa8\x54\
\x75\xa8\x1a\x9c\x90\x38\x7c\x68\x1d\xbe\xe7\x35\xde\x6a\xb7\xb5\
\x82\x32\xc5\x29\xe4\xbd\x9b\x51\x89\x3d\x8d\x2a\x58\x53\x59\x9d\
\x57\xae\x06\xd8\x40\xc9\x56\xde\x36\x59\x93\x34\xc0\xa4\x0e\x9c\
\x6c\x47\x82\x59\x9f\xbc\xd6\xc0\xb5\x05\xa6\x76\x5d\x05\x80\x92\
\xa8\x17\x49\xd8\x58\x94\x8d\x41\x39\xc6\x07\xb6\xca\x4d\xc2\x9c\
\x85\x0a\x8c\xcd\xa9\x4a\x28\x91\x01\xd4\x68\x30\x18\x8e\x06\x83\
\x4e\xa7\xd7\xeb\x9f\x7a\xe4\x64\x28\x25\xf7\x33\x80\x22\xb3\x8c\
\x49\xda\xce\xfa\x67\xca\x7b\x79\x89\x2f\xbf\x58\xe6\x25\x42\x52\
\x01\x58\xb5\x25\x2b\xfb\x35\xad\xcc\xc8\x06\x66\x65\x50\xb0\xf4\
\x84\xc8\x0c\xa2\x2c\x0a\x4a\xb5\xf0\x59\x23\x0a\x29\x3e\x6f\x42\
\x88\x85\x46\x2f\xce\x9d\x3d\x97\xe1\x1a\x8a\x7d\x1b\x53\x7a\x3d\
\xb2\x94\xf3\xa6\x15\xe5\x3c\xf3\xce\xd9\x00\xaa\xea\xe1\xd8\x4a\
\x7a\x4d\xd9\x93\x0d\x8c\xea\xca\x78\x2d\x20\xb5\xc0\xd4\xae\x03\
\x00\x94\xad\xd4\x57\x2e\xef\x91\x0a\x16\x55\x16\x49\x30\xe3\x43\
\x5c\x66\x51\x75\x25\x3e\x9b\x92\xcf\x2c\xf3\xd9\x01\xea\xd1\x93\
\x61\x3a\xac\x8b\x12\x63\x2a\xb0\x1e\xcc\xba\x36\xe4\x6a\x3d\x02\
\x9b\x64\x44\x92\x9a\x8d\x5a\xce\x41\x29\x52\x27\xa5\x20\x15\x60\
\x64\x43\x0d\x62\xb1\x36\x2a\xdd\x7e\x9d\x90\x02\x55\xa0\x54\x13\
\x69\x51\x71\x99\x8d\x76\x30\xed\x55\xd8\x74\x3d\xf1\xc4\x13\x66\
\x19\xcf\x26\x2e\x28\x03\x54\xfa\xef\x69\x89\x35\x99\x9b\x7f\x15\
\x30\xd9\x66\xfd\xca\xe5\xbc\x3a\x70\x12\x16\xe0\xb1\xb9\x88\x57\
\x95\xf0\xaa\x7a\x4c\x2d\x48\xb5\xc0\xd4\xae\x3a\x80\xc2\xc1\xa4\
\xe6\x55\xb3\x50\x36\xf6\x94\xaa\xf8\x4c\x16\x65\x2b\xf1\xcd\x33\
\x8c\xad\x04\x28\xc7\x75\xbb\x4f\x3d\x7a\xa2\x2b\xa5\xf4\xef\xbe\
\xf7\x7e\x5a\x28\xeb\x59\x37\x5a\xa9\x4b\x7c\xc5\xdd\x56\x9a\x88\
\x34\xb3\x11\xcb\x42\xd9\xd0\xd0\x5c\xd4\x52\x27\xfb\x9e\x3d\x1f\
\x8c\x8a\xff\xac\x00\xa4\x99\xdb\xb7\x80\xd2\x8c\x96\xdc\xf6\x7d\
\x93\x12\x1e\xb1\xbd\x89\xd0\xed\x74\xd0\x2c\xd8\x5c\x5d\xff\x33\
\x0f\x3d\x6c\x02\x93\x0d\x9c\xd2\x63\x8c\xd9\x01\xd6\x72\x39\xaf\
\x2c\xc1\x6e\x02\x4a\x55\xac\xa9\x4a\xad\x67\x63\x50\x65\x20\x2a\
\x7f\x15\x96\x52\x61\xcb\x9c\x5a\x60\x6a\xd7\x01\x40\xea\x4a\x67\
\xa1\xcc\x0f\x70\xd5\xb0\xae\x8d\x41\x35\x99\x85\xaa\x05\xa8\x24\
\x8e\x87\x97\x36\x2e\x74\x18\x63\xdd\xcf\x7e\xe6\xd3\x5d\xe6\xb8\
\xbe\x14\x9c\xdd\x73\xff\x83\x15\x16\x0d\xa4\x54\xa2\x93\xb9\xea\
\xdc\x52\xe6\x53\xcf\x11\xb1\xe1\x4a\xd3\xba\x9e\x05\xe8\x6a\xc0\
\x68\x2e\x20\xcd\xf6\x96\xac\x40\x57\x13\x3f\x41\x2a\xee\x07\xa9\
\x40\x2b\x9b\x61\xad\x90\x12\x2b\xcb\x4b\xd5\x91\x1f\x96\x37\xd3\
\xc5\x8b\x97\xd2\x6f\x39\xec\x02\x83\x32\x40\x55\xcd\x0c\x95\xe7\
\x99\xe6\xc5\xc5\x54\x01\x93\x8d\x39\xd5\x95\xf7\xaa\x80\xa8\xcc\
\x92\xaa\x32\x98\xda\xd5\x02\x53\xbb\xae\x02\x40\xd9\x9a\xcb\xb6\
\x59\xa8\x26\xc3\xba\xe6\xa0\xae\xcd\x97\x6f\xde\x2c\x54\x2d\x40\
\x71\xce\x87\xe9\xb0\xee\xea\xa1\xc3\x4b\x4f\x9e\x3c\xe1\x49\x59\
\x9c\x85\x2a\x9f\xf1\x13\x2b\x50\x21\x77\xf0\xac\x13\x08\xd4\xec\
\x3a\xb5\x99\x40\xa4\x62\xcb\x27\x16\xc8\x20\x33\xf1\xaf\xb3\x00\
\x57\xa7\xee\xab\x02\xa5\x79\xf3\x4a\x75\x25\xc9\x4c\x8d\x2f\xb1\
\xb6\xba\xaa\x80\x49\xca\xf9\x60\x2d\x25\xf6\xf6\xf6\x4c\x60\x6a\
\xa2\x80\x33\x01\xca\xd6\x67\x2a\x0f\xda\xa2\x82\x2d\x2d\x02\x4e\
\x75\x00\x65\x63\x46\x36\x40\xb2\x29\xf1\xa4\x94\x52\x7e\x21\xed\
\xd0\x5a\x60\x6a\xd7\x9f\x15\x80\x22\xa8\x56\x3f\xd9\x44\x12\xf3\
\x86\x75\x13\x54\x2b\xf9\x6c\x42\x09\x5b\x1f\xaa\x16\xa0\x00\x8c\
\xb6\x2f\x5d\x1c\x66\x00\xf5\xc8\x09\x5f\x0a\x13\xa0\xaa\x36\x5d\
\x99\x2a\xcf\x67\x7e\x26\xad\xdb\x59\xdd\x66\x4c\x2c\x5f\x48\x0d\
\x82\x5d\x05\x40\x2a\xdd\x5e\xb5\xca\xcf\x0e\x4a\x55\x31\x1e\xf5\
\xc1\x7b\x0d\xab\x53\x84\x40\x08\x8e\xcd\xcd\x8b\xe9\x25\x65\xe6\
\x61\xeb\xe1\x44\x15\x40\x55\x16\x40\xd8\xa2\x63\x9a\x02\x53\x1d\
\x38\xc9\x0a\xe0\x11\x16\xf0\x92\x73\x8e\x76\xb5\xc0\xd4\xae\xd7\
\x91\x41\x01\x07\x1f\xd6\xad\x62\x50\x2e\xec\x3d\x28\xdb\x2c\x54\
\x88\xa2\x50\xa2\x0c\x50\x2a\xfa\xfd\xd0\xe1\xa5\x53\x8f\x9c\x08\
\x84\x10\xce\x3b\xee\x7b\xb0\x92\xe7\xcc\x38\x0e\x55\x66\x2f\xe9\
\xeb\xcf\x65\x4b\x55\x75\x3f\x62\xbb\xb9\xd9\xcb\x6d\x49\x28\x55\
\x60\x77\x10\x50\xc2\x82\xa0\x44\x8a\x4d\xb9\x5e\xb7\x9b\x9d\x9f\
\x2c\xc8\x03\x6c\x8c\x64\x9e\x54\xdb\x04\x2a\xb3\xd7\x83\x86\xe0\
\x84\x86\xe0\x84\x1a\x80\x92\x0d\xc1\xa8\x8c\xda\x52\xbe\x59\xdd\
\x55\x5b\x60\x6a\xd7\x6b\x08\x50\x55\x52\xf3\xaa\x61\xdd\xb2\x50\
\x42\xc0\x2e\x35\xb7\x31\x28\xb3\xc4\xe7\x19\x67\xca\xb6\x1e\x54\
\xfa\xef\xb0\xc4\xa2\x4c\x80\x0a\x53\x80\xea\x2d\x2d\xf5\x9f\x7c\
\xe4\xe1\x50\x4a\xe9\xde\x73\xdf\x03\xb3\xa0\x62\xba\x8b\xd7\xd5\
\xf0\xe4\x9c\x1d\x8f\xcc\xdd\xfa\xeb\xd3\xf9\xe6\x32\xa4\x2a\xd0\
\x5b\xa0\xa7\x64\xfd\x3b\x0d\x41\x09\x4a\x60\x72\xe4\xd0\x7a\x73\
\x24\xe2\x02\x51\x14\xd9\x36\xff\x2a\xa9\x76\x13\xc9\x76\x95\xf2\
\x8d\x54\xa2\x70\x7d\x35\xb6\x09\x40\xc9\x8a\x9f\x03\xf6\x41\xda\
\x16\x94\x5a\x60\x6a\xd7\x17\x08\xa0\x50\x2a\xf9\xd9\xc4\x11\x14\
\xf3\xfd\xf8\xca\xbd\xa8\x26\xb3\x50\x26\x93\x2a\xcf\x41\x8d\xcd\
\x52\xdf\x60\x6f\x6f\x34\xd8\xdb\xeb\x74\xfb\x4b\x7d\xcd\xa0\xbc\
\x02\x40\x95\x45\x07\xd2\xdc\x86\xe7\x6c\x6f\x75\x40\xd4\x34\xcb\
\xfb\x0a\x00\x69\x96\x74\x91\x5a\x36\x56\x07\x4a\x98\x73\x79\x7a\
\xcb\x4a\x95\x57\x07\xce\xb9\x25\x44\x45\x0e\x53\xd9\x89\xa1\xca\
\x64\xb5\x0a\xac\x4c\x6b\x22\x59\x03\x42\x8b\x10\x3a\x39\x07\xa4\
\x2a\x01\xc8\x06\x74\x2d\x28\xb5\xc0\xd4\xae\x2f\x3c\x40\x2d\x3a\
\xac\x3b\xcf\x8f\xcf\x16\xbb\x61\xb2\xa7\xaa\x59\xa8\xba\xe8\xf7\
\xcc\x4d\xa2\xdb\x5f\x5a\xb2\x02\x54\x55\x79\x0c\x68\xaa\x76\x68\
\xf6\x43\x52\xc9\xa7\x2c\xcc\x65\x0e\x20\x5d\x29\x28\xcd\x2b\x47\
\x96\xa9\x08\x01\x02\xdf\x6b\x00\x64\x55\xc8\x5a\xcb\x60\xaa\xfa\
\x3c\x55\x73\x43\x72\x81\x57\xa6\x49\xbf\xa9\x09\x9b\xaa\xba\x2c\
\xfb\xbe\x05\xa5\x16\x98\xda\xf5\xc6\x00\x28\x5b\xa9\xcf\xa6\xe2\
\x23\x73\x4a\x7c\x55\x0c\xaa\xac\xe4\x6b\x32\x0b\x65\xf3\xe3\xeb\
\x00\x18\x0d\xf7\xf7\x46\x1a\xa0\xfa\xa7\x1e\x39\x11\x4a\x29\xbd\
\x7b\xee\x7d\xa0\x2e\x16\xf0\x40\x20\x44\x9a\x32\xa6\x05\x19\x52\
\x15\x4b\x3a\x10\x28\x11\xb2\x10\xae\x52\x4a\xd1\xb1\x31\xa6\x8a\
\xa9\x03\x29\x44\xf9\x56\xab\xe6\x8e\xd0\xa0\x8c\x66\x13\x26\x2c\
\x02\x4e\x0b\xbf\xdd\x9b\x7e\xdf\x82\x51\x0b\x4c\xed\x7a\x03\x01\
\x14\xae\x4e\x70\x61\x5a\xe6\x6b\xc2\xa0\xaa\x4a\x7c\xf3\x44\x12\
\xe5\x12\x5f\xc6\xa0\x5c\xd7\xeb\x3d\xf9\xc8\xc3\x5d\x29\xa5\x77\
\x8f\xcd\x30\xb6\xc9\x8e\x47\x0e\xb0\x2f\x92\x2a\x8e\x42\x2a\x6f\
\xaf\x8a\x25\x55\x5e\xd6\x10\x94\x48\xa3\xfb\xa5\x43\x02\xcb\x59\
\x4c\xa5\xdb\x51\x1a\x69\x25\x13\x19\x8d\x47\x05\x5c\x43\xb5\x13\
\xf8\x41\x40\xab\xc9\xdc\xd0\x55\x07\xa8\x16\x84\x5a\x60\x6a\xd7\
\x17\x0f\x48\x5d\xc9\xb0\x6e\x9d\x92\xaf\xcc\xa0\xcc\x3e\x54\x95\
\x93\x44\xd9\x8f\xaf\x96\x41\xc5\x71\x34\xba\x78\xe1\x7c\xe8\x7a\
\x5e\xef\xc9\x93\x0f\x77\x01\xf8\x77\xdf\xf7\x80\x31\xd7\xd4\x64\
\x91\x06\x3f\x9e\xe7\x4d\x37\x07\x90\x6a\xc0\x8f\x5c\x2d\x50\xaa\
\x79\x1c\x2a\x12\x84\xc2\x71\xec\xdb\x81\x90\x12\x7b\x93\x08\x0e\
\x01\x7c\xa6\xae\xb7\xbb\xb3\x63\x03\xa6\xb2\xdd\x15\x6d\x00\x54\
\x75\xef\x3f\xb1\x00\xeb\x69\x57\x0b\x4c\xed\x6a\x01\xea\xaa\x0c\
\xeb\x96\xa5\xe6\x36\x06\x65\x96\xf8\xa6\x07\x61\x50\x71\x14\x8d\
\x2e\x5e\x38\xdf\x61\x8c\x75\x1f\xfb\xd3\x4f\x75\x1d\xc7\xf1\xef\
\xb9\xef\x01\x22\xa5\xf9\x30\x16\xc1\xa9\x05\x4c\x52\x2d\xa0\x43\
\x2a\x7f\x99\x58\x30\xa6\x89\xca\x6f\x4e\xf9\xce\x02\x8c\x26\x7c\
\x49\x29\x54\x48\x60\xbf\x37\x73\x5b\x12\xc0\xc6\x38\xc2\x34\xe1\
\x90\x42\x80\x02\xe8\x7b\x1c\x9b\xdb\xbb\x55\xc0\x54\x05\x48\xb6\
\xe8\x8a\xc6\x20\xd5\xae\x16\x98\xbe\x18\x37\xce\xf6\x95\x7c\xfd\
\x01\xea\x6a\x0c\xeb\x9a\xec\xa9\x8e\x41\xd9\xec\x8e\x16\x66\x50\
\x9c\xf3\xd1\xf6\xa5\x8b\x03\x00\x9d\xc7\x3e\xf3\xe9\x3e\x73\x1c\
\xff\x9e\x7b\x1f\x20\x85\xf7\x4f\xc3\x9e\xd3\x62\xc0\x30\x2f\x76\
\x82\x54\xdc\xd4\xc1\x41\x89\x34\x22\x4b\x24\x3b\x8d\x70\x5c\x07\
\x8c\xb2\xc2\xf5\xa5\x04\xf6\xa2\x04\xb1\x24\x70\x98\x03\xc9\x24\
\xa4\x94\xd8\x4d\x04\x56\x6e\xba\x0d\x3f\xf7\x6b\xbf\x85\x9f\xf8\
\xdb\xdf\x83\xc9\x68\x58\x05\x4a\xf3\x58\x53\xf9\x1e\x96\x2a\x8f\
\xe4\x0d\xff\xd9\x6e\xf7\x9e\x16\x98\xda\xf5\x06\xfa\x3c\x62\x56\
\x10\xd1\x04\xa0\x08\xe6\x2b\xf9\x16\x89\x7e\x6f\xc2\xa0\x02\x13\
\x9c\xf4\x65\x9d\xcb\x17\x37\x47\x00\xc2\xcf\x7e\xe6\xd3\x7d\xe6\
\xb0\xe0\xee\xfb\x1e\x20\x65\xeb\xa2\x32\x35\x6c\xca\x46\x2c\xc5\
\xba\x4a\xf6\x54\x7d\x73\x57\x0b\x94\xe6\x47\x76\xc8\x99\xf8\x10\
\xf5\x8f\x69\x92\x60\x73\x1c\xc1\x73\x18\x08\xa5\x20\x20\x90\x44\
\x82\x51\x06\x97\x39\xf8\xc6\xaf\xfd\x2b\xf8\x9a\x17\x4f\xe3\xf4\
\xb9\x0b\xfd\x1f\xfa\xee\xef\x8c\x9e\x7f\xea\x89\x2d\xd4\xf7\x9a\
\xea\x00\xaa\xcc\xa2\xda\x1d\xbf\x05\xa6\x76\xb5\xeb\x8a\x01\xca\
\x56\xe2\x03\x9a\xc9\xcd\x79\x45\x89\xaf\x29\x83\x2a\x4b\xcd\x6d\
\x73\x50\x63\x0b\x8b\x0a\xb7\x2e\x6e\xa4\x00\xb5\xc4\x18\xf3\xef\
\xb9\xff\xdd\xb4\xa4\x38\x6b\x3e\x1f\xd4\x08\x8c\xe6\x01\x92\xe5\
\xe7\x0d\x64\xe8\x4d\x41\xc9\xfe\x22\x4a\xf4\xfb\x3d\xb8\xba\xc7\
\x24\xa5\x62\x46\x67\xb6\xf7\xb0\x1b\x0b\xf4\xc2\x10\xbe\xeb\x80\
\x51\x0a\x46\xa9\x7a\x41\xf5\x6d\x7b\xae\x8b\x5b\x6f\xb8\x0e\x1f\
\xfa\xc4\x27\xd6\x3d\x8a\xf5\x9f\xff\xc5\x5f\xd8\xf9\xf9\x7f\xf0\
\x0f\x3e\xd8\x10\x88\x9a\x3a\x87\xb7\xeb\x4d\xb6\x48\x4b\x45\xdb\
\xb5\xf0\x9b\x86\xcc\xf5\x48\xa8\x32\xe0\xb4\x45\x66\x9b\x07\xb3\
\x1c\x4e\xe9\x70\x0d\x60\x32\x95\x7c\xa6\x8a\xcf\x4c\xd5\x0d\x60\
\x8f\x7d\x4f\x8f\x8e\xf9\xb5\xbf\xb2\xd2\x0f\xc3\x4e\x20\xa5\xcc\
\x1d\xcd\xc9\xfc\x3d\xd3\xee\x71\xd7\x00\x90\x30\x47\x7e\x7e\x50\
\x50\xaa\x60\x72\x36\xd7\xf5\x24\x49\x70\xcb\xcd\x37\xe1\x67\xfe\
\xe1\xdf\x87\xeb\xba\x90\x52\x62\x12\xc5\xf8\xd8\x33\x2f\x82\x3a\
\x2e\xfa\xdd\x2e\xba\x61\x80\xc0\xf3\xe0\xb9\x0c\x8e\x06\x28\xaa\
\xfd\x5e\x29\x01\xd6\x42\x1f\x1e\xa3\x88\x39\x47\xdf\xf7\x7f\x1d\
\xc0\x65\x7d\xec\x00\xd8\x05\xb0\x07\x60\x1f\x79\xa2\x6d\x39\x9b\
\xc9\x96\x1a\xdb\x0e\xb4\xb6\x8c\xa9\x5d\xed\xba\x2a\x0c\xca\x76\
\xd9\xd5\x8c\x7e\x37\xad\x6c\xaa\x4a\x7c\xbe\xa5\xcc\x57\xd5\x87\
\x2a\x94\xf9\xf6\x77\x76\x46\xfb\x3b\x3b\x61\x7f\x69\xb9\xff\xe4\
\x89\x87\x43\x09\xc9\x66\x0c\x63\x67\x80\xe0\x60\x80\x54\xcb\x92\
\x16\x04\x25\x34\x00\xa5\xaa\xbf\x23\x25\xe0\x7a\x6e\xd6\xd3\x11\
\x42\x60\x30\x1a\xe1\xcc\xb9\x0b\xf0\x3b\x1d\x4c\xa2\x18\xa3\x69\
\x88\x6e\x18\x20\xf4\x7d\x04\x9e\x0b\xdf\x75\xe0\x31\x06\x4a\x08\
\x56\x43\x1f\x2e\xa3\x2a\x6c\x90\x52\xf4\x97\x97\x97\xf7\x77\x77\
\x2f\x37\xb8\x03\x2d\x53\x6a\x57\x0b\x4c\xed\x7a\x43\x00\xd4\x95\
\x44\xbf\x9b\xa5\xbe\x2a\x99\xb9\x99\xac\x5b\x17\xb9\x11\xc2\xae\
\xe8\x53\x00\xb5\xb7\x3b\xda\xdf\xdb\xd5\x00\xf5\x50\x28\x21\xb5\
\x61\x6c\x93\xcd\xbf\x69\xc9\xae\x1e\xb4\x16\x01\x25\xd2\xe0\x7e\
\xd5\x11\xb3\xb4\x8c\x27\x84\x02\xa6\x97\x5e\x3d\x8b\x53\xa7\x9e\
\xc2\x91\x63\xd7\x60\xb0\xb6\x86\xe5\xe5\x25\xf4\x7a\x8a\x39\x85\
\x81\x8f\xd0\x53\x00\xb5\xde\x0b\xe1\xd2\x9c\x2f\x26\x52\x62\x34\
\x18\x8c\x50\xdd\x23\x92\x73\xde\x27\xed\x6a\x57\x0b\x4c\xed\x7a\
\xdd\x01\xaa\x0c\x54\x8b\x44\xbf\xdb\x66\xa1\x6c\x91\x1b\xd1\x82\
\x0c\xaa\xca\xee\x28\x07\xa8\xe5\x95\xa5\x53\x8f\x9c\x08\xa4\x94\
\xee\xdd\x36\xbb\xa3\x3a\xb0\x21\xcd\x67\x8a\x72\xf2\xd5\xcc\xe7\
\xae\x29\x28\xd5\xfd\x5d\x21\x38\x6e\x7d\xcb\xcd\xa0\x94\x42\x08\
\x01\x2e\x04\x2e\x6c\x5c\xc0\xe7\x1e\x3d\x89\xed\x9b\x6e\xc6\xa1\
\xa3\xd7\x60\xfd\xd0\x21\xac\xac\xad\x62\x79\x69\x09\xbd\x6e\x07\
\xdd\x30\x84\xe7\xb9\xb8\x7e\xb5\x57\x28\xed\x46\x49\x02\xce\x79\
\x84\xe6\x4e\xdd\xed\x6a\x57\x0b\x4c\xed\xfa\x82\x02\x94\x4d\xe0\
\xb6\x68\xf4\xbb\x6d\x16\xca\x64\x51\xe5\x12\x5f\x95\xa3\x79\xb9\
\x07\x55\x0f\x50\xbb\x3b\xa3\xfd\xdd\x9d\x8e\xe7\xfb\xdd\x53\xca\
\x4d\xc2\xbd\xe7\xbe\x07\x4b\x72\x61\x52\x87\x1f\x68\x3a\xac\x5b\
\x5d\x85\x3b\x68\xf9\xae\x80\x78\xb3\x2f\x8e\x04\x1c\xc6\x74\x19\
\x4f\x1d\xd1\x64\x82\x33\xcf\x7f\x1e\xbb\x97\xb7\xb0\x7a\xe4\x18\
\x0e\x5d\x73\x2d\x0e\x1f\x3b\x86\xf5\xc3\x87\xb1\xb2\xb2\x82\x7e\
\xbf\x8f\xe3\x47\x0f\x21\x74\x9d\xc2\x5f\x78\xfc\xb9\xe7\x81\xea\
\x24\x58\x59\xc3\xa6\xdb\xd5\xae\x16\x98\xda\xf5\x05\x05\xa9\x83\
\x00\xd4\xbc\xd0\x42\x5b\xf4\x7b\x9d\xa3\x79\x9d\x61\xac\x4d\x28\
\x31\x02\xd0\x89\xa6\xd3\xe1\x85\x33\xaf\x76\x1c\xc7\xe9\x3c\xfa\
\xa7\x7f\xd2\x73\x1c\xc7\xbb\xe7\xbe\x07\x67\x73\x57\x17\x06\xa4\
\x83\x81\x12\x69\x08\x4a\xb5\xfa\x0d\x02\x4c\xa3\x08\x42\x8d\xa9\
\x41\x4a\x81\xe5\x6e\x07\x7b\x1b\xe7\x20\xa7\x63\x0c\x76\x77\x70\
\xf1\xfc\x79\x5c\x38\x72\x04\x47\xaf\xbd\x1e\x87\x8e\x1d\xc3\xd2\
\xca\x2a\x6e\xbc\xe6\x10\x1c\x42\x73\xe6\x25\x25\x7e\xf8\xbd\xdf\
\xf3\x04\xe6\xc7\x94\x8b\x0a\x16\xd5\x02\x56\xbb\x5a\x60\x6a\xd7\
\x1b\x0e\xa0\x16\x75\x93\x30\x81\x6a\x9e\x1f\x9f\xd9\x87\xaa\x32\
\x8c\x35\x67\xa1\x6c\x4a\xbe\x6c\x0e\x2a\x49\x92\x70\x6b\xe3\xc2\
\x10\x40\xf8\x18\xff\x54\xdf\x71\x5c\xff\xee\x7b\x1f\x80\x3d\xe3\
\x6e\x3e\x20\xd5\x63\xda\x95\x80\x52\x23\xab\x59\x38\x8e\x93\xc9\
\xc4\x09\x80\xd5\xe5\x25\x74\x7c\x07\x6b\x1d\x06\x37\x24\x18\x4d\
\x77\xb1\x7d\x76\x8c\x73\x2f\xbd\x88\xf5\x63\xd7\x60\xed\xc8\x31\
\xfc\x85\xfb\xdf\x01\x42\xf2\x17\xe8\xf4\xa5\x2d\x9c\x7a\xe4\x91\
\xe7\x51\x54\xd8\xf1\x0a\xe6\x34\x8f\x45\xb5\xab\x05\xa6\x76\xb5\
\xeb\x0d\x01\x50\x8b\xba\x49\x94\x01\xaa\x2c\x92\xb0\xf5\xa2\xca\
\xd1\xef\x55\x6e\x12\x65\x91\x84\x15\xa0\x00\x84\x97\x2e\x9c\x1f\
\x01\x08\x93\x24\xee\x3b\x8e\x6b\xd8\x1d\xcd\x43\x09\x52\x0f\x1c\
\x15\xa0\xb4\x88\x84\x8d\x34\x50\x0c\x4a\x09\x1c\x39\x74\x08\x90\
\xda\xa4\x95\x10\x1c\x3b\x7a\x04\xb7\xdc\x7c\x03\x18\x05\x3c\xcf\
\xc5\xdf\xfe\xb6\x6f\xc3\xd7\x7d\xfd\x5f\xc3\x6f\xfc\xce\xef\xe1\
\x27\x7f\xf4\xc7\x10\x47\x53\xbc\xe7\xeb\xff\x0a\xf0\x25\xf7\x28\
\xd1\x83\x10\xb8\xff\xce\xb7\x9f\x28\x81\x92\x09\x4e\x55\xd1\x16\
\x6d\x6c\x79\xbb\x66\x16\x6d\x9f\x82\x76\xbd\x81\x00\xaa\xec\x2a\
\x2d\x2a\x8e\xaa\x24\xd4\xc8\x60\x43\x53\xe4\xc3\xb6\xe9\xcc\xcc\
\x48\x1f\x43\x7d\x0c\xf4\xb1\xaf\x8f\x3d\xa8\x99\x9b\x5d\xa8\xf9\
\x9b\x1d\x00\xdb\xc6\x91\xce\xe6\x6c\xe9\xe3\x92\x79\x5c\xba\x70\
\x7e\x63\xe3\xec\xab\x97\x1e\xfb\xd3\x3f\x99\x3c\x79\xf2\x21\x49\
\x29\x2d\xa2\x09\x29\x7e\x43\xae\x18\x94\xc8\x1c\x1d\x45\x73\x19\
\xbb\x97\xf6\x8a\x88\x8a\xc0\x58\xea\xf7\x71\xe4\xc8\x21\x08\x21\
\xf0\xe5\x5f\xfe\xe5\xf8\xd6\x6f\xfb\x2e\xac\xae\xac\xe2\x07\xde\
\xfb\x3d\xf8\xdc\xa9\xcf\x82\xc7\x31\xfe\xcd\xcf\xfd\x2c\xa4\x04\
\xb8\x94\xf8\xe9\x9f\xf9\xd9\xd1\xee\xe5\xcb\x5b\x28\xc6\xa7\xd7\
\x31\x27\x51\x7a\xbd\xcb\x27\x2a\xed\x6a\x19\x53\xbb\xda\xf5\x86\
\x64\x50\xe6\x65\x07\xf1\xe3\x6b\x6a\x18\x5b\x66\x50\xf3\x32\xa1\
\xca\x65\xbe\x8c\x41\x49\x29\xc3\x8b\x17\xce\x0f\x09\x21\x9d\xcf\
\x7c\x74\xd0\xeb\xf4\x7a\x81\x10\x82\xde\x73\xff\xbb\x8b\x60\x31\
\xb7\xf6\x36\x47\xc7\x47\x9a\x14\xe8\x9a\xd3\x2b\xd7\x75\x41\x08\
\x40\xf5\x2f\x84\x9d\x0e\xbe\xff\xfb\x7f\x10\xe7\xce\x9d\xc1\xd7\
\x7c\xed\x37\xc2\xf3\x7d\x08\x29\x41\x29\x01\xd3\x7d\xa5\x27\x3f\
\xf3\x69\x7c\xdd\x37\x7f\xf3\xe4\xd9\x53\xa7\xb6\xce\x9e\x7e\xf9\
\x65\xe3\xc4\x20\x9e\xc3\x9c\xea\x58\x53\xbb\xda\xd5\x02\x53\xbb\
\xde\xd0\x00\x65\xbb\xec\xa0\x86\xb1\x66\x2f\x6a\x5e\x68\x61\xd3\
\x59\xa8\x5a\x80\xda\xdd\xbe\x3c\xdc\xdd\xbe\x1c\x2e\xaf\xae\xf5\
\x4f\x9d\x7c\x28\x10\x42\xb0\x77\xdc\xff\xa5\x73\xb1\x64\x6e\xe6\
\x6c\x83\xf9\xa9\xf9\x66\x15\xf9\x0f\x19\xa3\x38\xbc\xbe\xa6\x65\
\xdf\xea\x29\x26\x84\xe0\xfe\x07\xbf\x0c\x84\xa8\x5b\x53\x39\x4c\
\xea\xf7\xc6\x79\x16\xd3\xe4\xa3\x1f\xfc\x7f\x52\xe6\x38\x2d\x01\
\x93\x79\x54\x81\x52\xdb\x67\x6a\x57\x0b\x4c\xed\xfa\x33\x0b\x50\
\xd0\xe0\x33\xcf\x30\x96\x61\xbe\x61\x6c\x39\x72\xa3\x1c\xb7\xe1\
\xd7\x00\x94\xd5\x34\x76\x77\xfb\xf2\x48\x03\xd4\xd2\x93\x27\x3f\
\x13\x48\x89\xa2\x9b\x44\xcd\xe4\xeb\x6b\x03\x4a\xb3\xbf\xe3\x30\
\x86\xdc\x34\x9e\x68\x40\x2a\x3e\xd9\xe9\x8a\xe3\x38\x03\x26\x7d\
\x4c\x8d\x23\x32\x8e\xa4\x74\xd4\x31\x26\x60\xbe\x4a\xaf\x5d\x2d\
\x30\xb5\xab\x5d\x5f\x54\x00\xc5\x71\xe5\x86\xb1\x75\x52\x73\xb3\
\xc4\x57\xe7\x6a\x3e\xc3\x9e\x6c\x00\x75\xea\x91\x87\x03\x29\x84\
\x73\xf7\xfd\x0f\x5e\x45\x50\x42\x43\x50\x9a\x1d\x00\xa6\x94\x16\
\x54\x7e\xb9\xdb\x38\x99\xf1\x10\xda\x51\x21\x81\xb1\x01\x4c\x93\
\x12\x30\xd5\xf5\x99\xaa\x54\x7a\xad\x23\x44\xbb\x5a\x60\x6a\xd7\
\x9f\x49\x80\x32\xcf\xba\x6d\x52\xf3\xaa\xd0\x42\x5b\x89\xcf\x16\
\xb9\x51\x55\xe2\x4b\xd9\x53\x13\x57\xf3\x0c\xa0\x3c\x3f\xe8\x9d\
\x3a\xf9\x70\x47\x42\xba\x77\xdf\xfb\x20\x6a\x79\x53\x23\x50\x6a\
\x42\x93\x8a\xce\xe7\x52\x48\x74\x3b\x1d\xac\x2c\x2f\x15\x81\xa8\
\x66\xd8\xf7\xb9\xe7\x9e\x03\x72\x41\xc9\xa2\xe0\x24\x8c\xaf\x6d\
\x39\xaf\x5d\x2d\x30\xb5\xeb\x4d\x0b\x50\x8b\x1a\xc6\x3a\xc6\xf7\
\xb6\x3e\x54\xb9\xc4\xe7\x61\x71\x37\x89\x4e\x34\x9d\x8c\xce\xbd\
\xf2\x72\xc7\x0f\xc2\xde\xa9\x47\x1e\xea\x40\xc2\xbd\xfb\xbe\x07\
\x4b\xd1\xef\xa4\x61\x59\xae\x89\xd8\xc1\x62\xe0\x0a\x09\xd7\x75\
\xe1\x79\x9e\x06\x22\x39\xd7\x81\xe2\xfc\x85\xf3\xd2\x00\xa6\xb1\
\x05\x94\x4c\x70\x6a\xca\x98\x5a\xb6\xd4\xae\x16\x98\xda\xf5\xa6\
\x00\xa8\x83\x1a\xc6\xda\xac\x8e\xaa\x94\x7c\x55\x25\xbe\x79\x6e\
\x12\x59\xa9\x6f\x3a\x19\x0f\xcf\x9d\x7e\xb9\xe3\xba\x5e\xf7\xb1\
\x4f\x7f\xb2\xeb\xb8\xae\x97\x01\x54\x43\x50\x5a\x44\xec\x60\x7e\
\x2b\xb5\xd2\x0e\x50\x83\xb5\x92\xd4\x0f\xfb\x4a\x00\x1f\xff\xf8\
\x27\x23\x28\xb9\x7d\x2a\xbf\x2f\x03\x54\x59\x04\xd1\xa4\xc7\xd4\
\x32\xa6\x76\xb5\xc0\xd4\xae\x37\x05\x40\x95\x81\xaa\xca\x49\x82\
\xa0\x99\x61\x6c\x9d\x92\xef\x8a\xdd\x24\xe2\x38\x1a\x6e\x9e\x3f\
\xdb\x21\x84\x74\x39\xe7\x5d\xc6\x98\x7f\x77\x45\xe4\xc6\xd5\x00\
\xa5\xf4\xd2\xc0\x0f\xe0\x30\xa7\x86\x57\x99\x17\x4a\x6c\x6d\x5d\
\x9e\x56\x80\xd2\xa4\x06\x9c\x16\x55\xe5\xb5\x20\xd5\x02\x53\xbb\
\xda\xf5\x67\x0e\xa0\x9a\xfa\xf1\x99\xfd\xa7\x32\x7b\xaa\xca\x84\
\x6a\x32\x0b\x65\x96\xf8\x6c\xec\xa9\x32\x17\x4a\x4a\x39\xdc\x38\
\xfb\x6a\x0a\x50\x3d\xc7\x71\xbd\xbb\xef\x7b\xa0\x3a\xd4\xf3\x0a\
\x40\x09\x12\x08\xc3\x00\x8c\x31\xfb\x4d\x59\x9e\xc1\xd1\x68\x34\
\x5e\x80\x31\xd5\x29\xf3\xaa\x54\x79\x2d\x28\xb5\xc0\xd4\xae\x76\
\xfd\x99\x06\xa9\x2b\x31\x8c\xb5\xd9\x1d\x35\x65\x50\x65\xb3\xd8\
\xa9\x01\x52\x36\x91\x44\x80\x92\x92\x4f\x4a\x39\xda\x38\xfb\xea\
\x80\x10\xd2\xe5\x49\xdc\x63\xae\xeb\xdf\x73\xdf\x83\x44\x64\xd1\
\xef\xa4\x51\xae\x6e\xed\x13\x24\x25\x08\x21\x70\x1c\x96\x3f\x03\
\x95\xbf\xae\x82\x04\x5f\x7e\xf9\xe5\x4b\x50\x8e\x19\x65\x70\x2a\
\xf7\x9a\xaa\xfa\x4c\x55\xce\xe3\xed\x6a\x57\x0b\x4c\xed\x7a\x53\
\x03\xd4\xa2\x86\xb1\x8b\xba\x49\x94\x41\xaa\xa9\x9b\x84\xc9\xa6\
\x46\x00\x42\x29\xe5\xe8\x82\x06\xa8\xd1\xfe\x7e\xb7\xd3\xef\x07\
\x42\x70\x7a\xcf\x7d\x5f\xba\xa8\x71\x9e\x15\x6f\x58\x36\xc3\x54\
\x87\x67\x6a\xe8\xf6\x63\x1f\xfb\x88\x1c\x8f\x27\x5b\xc8\x6d\x9d\
\x86\x25\x60\x32\x59\xd3\x41\x7b\x4c\x2d\x48\xb5\xc0\xd4\xae\x76\
\xbd\x29\x01\x6a\x51\xc3\x58\x9b\x92\xcf\x64\x4f\x75\xc9\xba\xb6\
\x12\x5f\x5d\xb2\xae\x2d\x72\x23\x94\x52\x8e\xb6\xb7\x2e\x0e\xb6\
\xb7\x2e\x76\x56\xd6\xd6\x7b\xa7\x1e\x49\xdd\x24\xde\x3d\x9f\x2d\
\x55\x00\x18\x17\x1c\x37\x5d\x7f\x2d\x68\x1a\x5f\x51\xa9\x7a\x90\
\xf8\x85\x5f\xf8\xe7\x93\x1f\xfd\xb1\x9f\x78\x14\xb9\xc7\xe0\x00\
\xc5\x52\x5e\x9d\x00\xa2\x8e\x2d\x95\x5f\xa3\x76\xb5\xc0\xd4\xae\
\x76\xb5\x0c\x0a\x8b\xb9\x49\x98\x02\x89\x72\x89\xcf\xe6\x26\x51\
\x16\x49\xd4\x25\xeb\x56\x39\x9a\x17\x84\x12\x3b\x97\xb7\x86\x3b\
\x97\xb7\x3a\x2b\x6b\xeb\xfd\x53\x27\x1f\xf2\xb9\x10\x8e\x1d\xa0\
\x50\x1e\x5d\x9a\x79\x26\xba\xdd\x8e\xf6\xde\x93\x36\x9e\x04\x21\
\x04\x7e\xfc\xc7\x7f\x6c\xf0\x0b\xbf\xf8\x4b\x4f\x42\x19\xdd\xee\
\x23\x2f\xe5\x95\x19\x93\xe9\x02\x71\x10\xc6\xd4\x02\x53\xbb\x5a\
\x60\x6a\xd7\x9b\x1b\xa0\xd2\x1e\x4b\x05\x40\xd5\xb9\x49\xd8\x32\
\xa1\x6c\x6e\x12\x8b\x32\x28\x13\xa4\x82\x86\x00\x15\x2a\x80\x7a\
\x38\x50\xc3\xba\x0f\xcc\xc3\xa7\xc2\x83\x75\xb4\xf0\xc1\x06\x4a\
\x09\xe7\xf8\xb6\x6f\xfd\x9f\x2e\x7d\xe8\xc3\xff\xfd\x39\x03\x94\
\x4c\x60\x2a\xf7\x98\x26\x68\xa5\xe2\xed\x6a\x81\xa9\x5d\xed\xba\
\x0a\xe8\x04\x54\x01\x54\x99\x61\x2d\xea\x26\xb1\x08\x83\x9a\x17\
\xfd\x5e\x25\x35\x0f\x53\x80\xf2\xc3\xb0\xfb\xd4\xa3\x27\x3a\x52\
\x08\xe7\xee\xfb\x1e\x64\x72\xce\x76\x4f\x00\x24\x09\x9f\xbd\x9c\
\x10\xc4\x71\x8c\xfb\xef\x7f\xe0\xd5\x67\x9e\xf9\xfc\x2b\x28\x46\
\x83\x0c\x4a\xc0\x54\xee\x2f\x95\x7b\x4c\x4d\x06\x6b\xd1\x82\x53\
\xbb\x5a\x60\x6a\x57\xbb\x16\x03\xa8\xaa\xa1\xdd\x2b\x75\x93\x58\
\x24\xfa\xbd\x6a\x16\x2a\xbb\x6c\x3a\x1e\xef\xbf\xfa\xe2\xf3\x81\
\xeb\x79\x9d\xe4\x4f\xff\xa4\xe3\x79\x9e\x7b\xe7\xbb\x1e\x08\x64\
\xc5\x9e\x2f\xa5\xc4\xb1\x23\x87\x0b\x82\x3c\x42\x28\x46\xa3\x21\
\xee\xba\xeb\xee\x67\xcf\x9f\xbf\x70\x1e\xc5\x9e\x52\x0a\x50\x55\
\x65\xbc\x32\x5b\xb2\x05\x05\xb6\x25\xbc\x76\xb5\xc0\xd4\xae\x76\
\x5d\x05\x80\x2a\x03\xd5\x6b\xe5\x26\x61\x2b\xf1\x55\x19\xc6\x96\
\x81\x2a\x63\x59\x71\x14\xf9\x17\xce\xbc\xe2\x11\x4a\xfd\x24\x49\
\x96\x1c\xd7\x63\x77\x7e\xc9\x7d\x2b\x36\x3d\xf8\xe1\x43\x6b\xaa\
\xc7\x24\x25\x08\xa1\x18\xec\xef\xe1\xc6\x9b\xde\xf2\xc8\x68\x34\
\xba\x8c\x3c\x58\x71\x80\x62\xb8\x62\x9d\x1a\xaf\xec\x2c\x3e\x6f\
\xb0\xb6\x05\xa5\x76\xb5\xc0\xd4\xae\x76\xbd\x46\x00\x75\x35\xdc\
\x24\x6c\x52\x73\xdb\xb0\x6e\x59\x72\x6e\x02\x53\x7a\x78\x52\x08\
\xef\xdc\x2b\x2f\xef\x50\x4a\x3d\xce\xe3\x81\xeb\x7a\xec\x8e\x3f\
\x77\xef\x35\x99\x1f\x1f\x21\x70\x1d\x27\x63\x4a\x3b\x3b\xdb\xb8\
\xe9\xa6\xb7\x7c\x62\x3a\x9d\xee\xa2\x98\xfc\x3b\x44\x31\xfd\x77\
\x88\x6a\x25\x5e\x62\x61\x4c\x36\x50\x42\x0b\x4a\xed\x6a\x81\xa9\
\x5d\xed\xba\x02\x80\x02\x20\xc9\x2c\x4a\x2d\xea\x26\x61\x06\x17\
\x36\x4d\xd6\x2d\xcf\x41\x4d\x31\x9b\x0d\x55\x3e\x3c\xe3\x70\x84\
\x10\xce\xd9\x97\x5f\xba\x44\x29\x75\x92\x84\xef\xb9\x9e\x4b\xef\
\x78\xe7\xbd\xb7\x51\x4a\xd1\xed\x74\x40\x08\xc1\xcb\x2f\xbd\x80\
\xb7\xdd\x71\xd7\xef\xa3\x3a\x96\xde\x8c\xa7\x9f\x37\xbb\x34\x4f\
\x1e\xde\x32\xa5\x76\x55\xae\x6a\x9b\x93\x76\xb5\xab\xea\x4d\x43\
\xc8\x9f\x99\xc7\x72\xd0\xf7\x3f\xc9\x53\xf5\x50\xfa\x5a\x3e\x4c\
\xf6\x94\x1e\x66\x0f\x8a\xa1\xa8\xe2\x73\x50\x14\x49\xa4\x87\x57\
\x3a\x6c\x40\x54\x06\x25\xf3\xf7\x4d\x50\xa4\x94\x52\xb6\x7e\xe4\
\xd8\x6a\xd0\xe9\x38\x1f\xfb\x1f\x1f\x7e\x40\x24\x11\x6e\xbb\xfd\
\x8e\x5f\x33\x58\x9b\x09\x4e\x26\x40\x99\x2c\xc9\x64\x4b\x13\x14\
\x43\x02\x17\x51\xe4\x5d\xf5\xd7\xa7\x5d\x2d\x30\xb5\xab\x05\xa6\
\x37\x1d\x30\x55\x00\x54\x15\x38\x11\x0b\x38\xd1\x12\x38\x31\x0b\
\x38\x95\x41\xca\x2b\x81\x94\x5f\xf1\xef\x32\x28\xa5\xb7\x63\xfe\
\xdd\xec\x29\xf8\x9e\xef\x7d\xef\x97\xff\xdb\x7f\xf3\xfe\xff\x81\
\xbc\x04\x17\x19\xe0\x34\xb5\x80\x54\x55\x06\x93\x2d\x87\x69\x9e\
\x79\xeb\x6b\xfa\xfa\xb4\xab\x05\xa6\x76\xb5\xc0\xf4\xa6\x7e\x5a\
\xae\x32\x40\x35\x61\x50\x36\x26\x65\xfe\xcc\x31\xbe\x9a\x8c\xa9\
\x3c\x58\x6c\xfa\x01\xc6\x25\x70\x2a\x03\x54\xf9\x88\x50\x1d\x73\
\x51\x16\x3e\x2c\x2c\x7a\x68\xf7\xa7\x37\xe7\x6a\x7b\x4c\xed\x6a\
\xd7\x55\x22\x5f\x38\xb8\xdd\x11\x81\x5d\x6a\x5e\x56\xf3\x99\x7d\
\x28\x73\x0e\xca\xad\x60\x49\x65\x50\x32\x81\xc9\x54\x88\xa7\xa0\
\x61\x02\x4a\x6c\x80\x4d\x54\x02\xa1\x32\x43\xaa\x2b\xdd\xb5\xb1\
\x16\xed\x6a\x81\xa9\x5d\xed\x7a\x03\x01\x94\x79\xd9\x3c\xbb\x23\
\x9b\xc4\xbc\xac\xe2\x33\x45\x12\x31\x66\x05\x13\xe5\xd2\x9d\x63\
\x61\x4b\xb4\x74\x3f\x64\x89\x35\x95\xc1\x29\xb6\x80\x54\x8c\xfa\
\xf8\xf4\x79\x2c\xa9\x05\xa5\x76\xb5\xc0\xd4\xae\x76\x7d\x81\x00\
\xca\x76\x59\x9d\xdd\x51\x53\x37\x09\x53\x66\xee\x54\x80\x91\x53\
\xc1\x96\xcc\x52\x1e\x29\x01\x53\x15\x38\x95\x41\x2a\x2e\xfd\xac\
\xb5\x1d\x6a\x57\x0b\x4c\xed\x6a\xd7\x9f\x11\x80\x2a\x33\xac\xa6\
\x6e\x12\x36\xa9\xb9\x09\x44\xe5\xaf\xa6\x12\xb0\xcc\xdc\x50\x02\
\xa6\x32\x38\xf1\x0a\x10\xb2\x01\x12\x37\x7e\xbf\xca\x7a\xa8\x05\
\xa8\x76\xb5\xc0\xd4\xae\x76\x7d\x11\x00\xd4\xa2\x6e\x12\x26\x7b\
\x62\x25\x66\x64\x63\x49\xb6\x32\x1e\xb1\x80\x85\x09\x4c\xe6\x91\
\x54\x80\x15\xaf\x01\x25\x89\xd6\x7a\xa8\x5d\x2d\x30\xb5\xab\x5d\
\x5f\xb4\x00\x55\x06\xaa\x45\xdc\x24\x4c\x80\xaa\x03\xa4\x26\xc0\
\x24\x4b\xe0\xc2\x6b\x0e\x31\x87\x25\x89\x16\x8c\xda\xd5\x02\x53\
\xbb\xda\xf5\xc5\x09\x50\x4d\xa3\xdf\xeb\xdc\x24\xca\x20\x54\x05\
\x48\x4d\x80\xa9\xcc\x9c\x84\x05\xac\xca\x3f\x13\x0d\x40\xa9\x05\
\xa8\x76\xb5\xc0\xd4\xae\x76\x7d\x91\x81\x54\x53\x80\xb2\x01\x55\
\x0a\x52\x55\x60\x54\x06\x24\x52\xf1\xb7\xca\xc0\x54\x77\xc8\x06\
\x80\xd4\x82\x52\xbb\x5a\x60\x6a\x57\xbb\xde\x64\x00\x25\x2a\x00\
\xc8\xc6\x90\xca\x6a\xbc\x3a\x60\x92\x25\xa0\x29\x03\x91\x9c\x03\
\x46\x2d\x28\xb5\xab\x05\xa6\x76\xb5\xeb\x4d\x00\x50\x75\xc3\xba\
\x29\x48\x91\x1a\x76\x54\x66\x4a\xa4\xe6\xef\xd6\x81\x54\xdd\x65\
\x40\x2b\x74\x68\x57\x0b\x4c\xed\x6a\xd7\x9b\x06\xa0\xaa\xdc\x24\
\x50\xfa\x5e\xd4\x00\x91\x0d\x94\x08\xaa\xe5\xdc\xb2\xc1\x81\x96\
\x25\xb5\xab\x05\xa6\x76\xb5\xab\x65\x50\x80\x5d\xc1\x57\xe5\x76\
\x8e\x9a\xaf\xe5\xbf\x83\x0a\x80\xa9\xfb\x37\x5a\x50\x6a\x57\x0b\
\x4c\xed\x6a\xd7\x9b\x17\xa0\x6c\x97\x11\x0b\x70\xd5\x01\x11\x69\
\xf8\x37\xe4\x9c\xaf\xf3\x7e\xd6\xae\x76\xb5\xc0\xd4\xae\x76\xbd\
\x89\x01\xca\xbc\x9c\x94\xfe\x8d\x86\xa0\x54\x75\xfb\x72\x01\xf0\
\x6a\x57\xbb\x5a\x60\x6a\x57\xbb\x5a\x80\xb2\x2a\xf9\xaa\x40\x85\
\x2c\x78\xdb\x8b\x82\x56\xbb\xda\xd5\x02\x53\xbb\xda\xd5\xae\x4a\
\x16\x63\x03\x23\x59\x03\x52\xb2\xe1\xed\xb7\xab\x5d\xaf\xe9\x6a\
\x83\x02\xdb\xd5\xae\x76\xb5\xab\x5d\x6f\xa8\x45\xdb\xa7\xa0\x5d\
\xed\x6a\x57\xbb\xda\xd5\x02\x53\xbb\xda\xd5\xae\x76\xb5\xab\x5d\
\x2d\x30\xb5\xab\x5d\xed\x6a\x57\xbb\x5a\x60\x6a\x57\xbb\xda\xd5\
\xae\x76\xb5\xab\x05\xa6\x76\xb5\xab\x5d\xed\x6a\x57\x0b\x4c\xed\
\x6a\x57\xbb\xda\xd5\xae\x76\xb5\xc0\xd4\xae\x76\xb5\xab\x5d\xed\
\x6a\x81\xa9\x5d\xed\x6a\x57\xbb\xda\xd5\xae\xd7\x78\xfd\xff\x07\
\x00\xdf\xeb\xa6\x5e\x67\x5d\xc3\xc8\x00\x00\x00\x00\x49\x45\x4e\
\x44\xae\x42\x60\x82\
\x00\x00\x10\xaf\
\x3c\
\xb8\x64\x18\xca\xef\x9c\x95\xcd\x21\x1c\xbf\x60\xa1\xbd\xdd\x42\
\x00\x00\x01\x10\x00\x00\x05\x5b\x00\x00\x0e\xce\x00\x00\x05\x5b\
\x00\x00\x0f\x2c\x00\x04\xec\x30\x00\x00\x09\x90\x00\x2a\xcf\x04\
\x00\x00\x00\x94\x00\x2b\x66\xbe\x00\x00\x00\xc1\x00\x4c\x99\x62\
\x00\x00\x08\x7f\x00\x5c\x8c\x34\x00\x00\x0d\x6c\x00\xc2\x69\x4a\
\x00\x00\x09\x0c\x01\x41\x67\xe1\x00\x00\x09\x4e\x01\x6e\x3c\x3e\
\x00\x00\x06\x40\x02\x77\x43\xb2\x00\x00\x07\x30\x02\xa7\x96\xc4\
\x00\x00\x00\x00\x03\x0f\x07\xc2\x00\x00\x07\xa8\x04\x26\xa4\x7e\
\x00\x00\x0d\x95\x04\x84\x78\xf1\x00\x00\x0c\x0e\x04\xa3\x1d\x95\
\x00\x00\x06\x0e\x04\xeb\xd1\x1e\x00\x00\x0a\xe7\x05\x0f\xee\xd1\
\x00\x00\x04\xef\x05\x97\x18\xa4\x00\x00\x08\x1b\x06\x1b\x1e\xf4\
\x00\x00\x04\xb6\x06\x5b\x01\x15\x00\x00\x07\x76\x06\x7c\x5c\x69\
\x00\x00\x08\xaa\x08\xaa\xe3\xe4\x00\x00\x0e\xf5\x08\xaa\xe3\xe4\
\x00\x00\x0f\x4d\x0a\xa8\xb8\x85\x00\x00\x00\x2a\x0a\xa8\xc3\x5f\
\x00\x00\x0c\x7a\x0a\xac\x2c\x85\x00\x00\x00\x61\x0b\x30\x83\x76\
\x00\x00\x01\x44\x0d\x19\x52\xba\x00\x00\x0e\x82\x0d\x7e\x3d\x9a\
\x00\x00\x05\x9a\x0d\xde\x2e\x6a\x00\x00\x0e\x16\x0e\x1c\x3f\xe7\
\x00\x00\x0a\x9b\x0e\xf1\xf0\x41\x00\x00\x00\xf0\x0f\xb2\x8a\xe1\
\x00\x00\x09\xbc\x69\x00\x00\x0f\x7e\x03\x00\x00\x00\x0a\x00\x26\
\x03\xa0\x03\xb5\x03\xc1\x03\xaf\x08\x00\x00\x00\x00\x06\x00\x00\
\x00\x06\x26\x41\x62\x6f\x75\x74\x07\x00\x00\x00\x05\x56\x61\x75\
\x6c\x74\x01\x03\x00\x00\x00\x16\x00\x26\x03\x94\x03\xb7\x03\xbc\
\x03\xb9\x03\xbf\x03\xc5\x03\xc1\x03\xb3\x03\xaf\x03\xb1\x08\x00\
\x00\x00\x00\x06\x00\x00\x00\x07\x26\x43\x72\x65\x61\x74\x65\x07\
\x00\x00\x00\x05\x56\x61\x75\x6c\x74\x01\x03\x00\x00\x00\x12\x00\
\x26\x03\x94\x03\xb9\x03\xb1\x03\xb3\x03\xc1\x03\xb1\x03\xc6\x03\
\xae\x08\x00\x00\x00\x00\x06\x00\x00\x00\x07\x26\x44\x65\x6c\x65\
\x74\x65\x07\x00\x00\x00\x05\x56\x61\x75\x6c\x74\x01\x03\x00\x00\
\x00\x0e\x00\x26\x03\x88\x03\xbe\x03\xbf\x03\xb4\x03\xbf\x03\xc2\
\x08\x00\x00\x00\x00\x06\x00\x00\x00\x05\x26\x45\x78\x69\x74\x07\
\x00\x00\x00\x05\x56\x61\x75\x6c\x74\x01\x03\x00\x00\x00\x10\x00\
\x26\x03\x86\x03\xbd\x03\xbf\x03\xb9\x03\xb3\x03\xbc\x03\xb1\x08\
\x00\x00\x00\x00\x06\x00\x00\x00\x05\x26\x4f\x70\x65\x6e\x07\x00\
\x00\x00\x05\x56\x61\x75\x6c\x74\x01\x03\x00\x00\x00\x2c\x00\x26\
\x03\x91\x03\xbd\x03\xb1\x03\xc6\x03\xad\x03\xc1\x03\xb5\x03\xc4\
\x03\xb5\x00\x20\x03\xad\x03\xbd\x03\xb1\x00\x20\x03\xc3\x03\xc6\
\x03\xac\x03\xbb\x03\xbc\x03\xb1\x00\x21\x08\x00\x00\x00\x00\x06\
\x00\x00\x00\x0e\x26\x52\x65\x70\x6f\x72\x74\x20\x61\x20\x62\x75\
\x67\x21\x07\x00\x00\x00\x05\x56\x61\x75\x6c\x74\x01\x03\x00\x00\
\x02\x58\x00\x3c\x00\x62\x00\x3e\x00\x20\x00\x56\x00\x61\x00\x75\
\x00\x6c\x00\x74\x00\x20\x00\x25\x00\x31\x00\x20\x00\x3c\x00\x2f\
\x00\x62\x00\x3e\x00\x0a\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\
\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x3c\
\x00\x70\x00\x3e\x03\x94\x03\xb7\x03\xbc\x03\xb9\x03\xbf\x03\xc5\
\x03\xc1\x03\xb3\x03\xaf\x03\xb1\x00\x20\x03\xba\x03\xb1\x03\xb9\
\x00\x20\x03\xb4\x03\xb9\x03\xb1\x03\xc7\x03\xb5\x03\xaf\x03\xc1\
\x03\xb7\x03\xc3\x03\xb7\x00\x20\x03\xba\x03\xc1\x03\xc5\x03\xc0\
\x03\xc4\x03\xbf\x03\xb3\x03\xc1\x03\xb1\x03\xc6\x03\xb7\x03\xbc\
\x03\xad\x03\xbd\x03\xc9\x03\xbd\x00\x20\x00\x0a\x00\x20\x00\x20\
\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\
\x00\x20\x00\x20\x00\x3c\x00\x70\x00\x3e\x03\xc6\x03\xb1\x03\xba\
\x03\xad\x03\xbb\x03\xc9\x03\xbd\x00\x20\x03\xbc\x03\xb5\x00\x20\
\x03\xc4\x03\xb7\x03\xbd\x00\x20\x03\xc7\x03\xc1\x03\xae\x03\xc3\
\x03\xb7\x00\x20\x03\xc4\x03\xbf\x03\xc5\x00\x20\x00\x65\x00\x6e\
\x00\x63\x00\x66\x00\x73\x00\x2e\x00\x0a\x00\x20\x00\x20\x00\x20\
\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\
\x00\x20\x00\x3c\x00\x70\x00\x3e\x00\x3c\x00\x61\x00\x20\x00\x68\
\x00\x72\x00\x65\x00\x66\x00\x3d\x00\x22\x00\x25\x00\x32\x00\x22\
\x00\x3e\x00\x56\x00\x61\x00\x75\x00\x6c\x00\x74\x00\x3c\x00\x2f\
\x00\x61\x00\x3e\x00\x0a\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\
\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x3c\
\x00\x70\x00\x3e\x00\x43\x00\x6f\x00\x70\x00\x79\x00\x72\x00\x69\
\x00\x67\x00\x68\x00\x74\x00\x20\x00\x26\x00\x63\x00\x6f\x00\x70\
\x00\x79\x00\x3b\x00\x20\x03\xa7\x03\xc1\x03\xae\x03\xc3\x03\xc4\
\x03\xbf\x03\xc2\x00\x20\x03\xa4\x03\xc1\x03\xb9\x03\xb1\x03\xbd\
\x03\xc4\x03\xb1\x03\xc6\x03\xcd\x03\xbb\x03\xbb\x03\xb7\x03\xc2\
\x00\x20\x00\x20\x00\x0a\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\
\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x3c\
\x00\x62\x00\x72\x00\x3e\x00\x4c\x00\x69\x00\x63\x00\x65\x00\x6e\
\x00\x73\x00\x65\x00\x3a\x00\x20\x00\x47\x00\x4e\x00\x55\x00\x20\
\x00\x47\x00\x50\x00\x4c\x00\x33\x00\x0a\x00\x20\x00\x20\x00\x20\
\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\
\x00\x20\x00\x3c\x00\x70\x00\x3e\x00\x50\x00\x79\x00\x74\x00\x68\
\x00\x6f\x00\x6e\x00\x20\x00\x25\x00\x33\x00\x20\x00\x2d\x00\x20\
\x00\x51\x00\x74\x00\x20\x00\x25\x00\x34\x00\x20\x00\x2d\x00\x20\
\x00\x50\x00\x79\x00\x51\x00\x74\x00\x20\x00\x25\x00\x35\x00\x20\
\x00\x6f\x00\x6e\x00\x20\x00\x25\x00\x36\x08\x00\x00\x00\x00\x06\
\x00\x00\x01\x00\x3c\x62\x3e\x20\x56\x61\x75\x6c\x74\x20\x25\x31\
\x20\x3c\x2f\x62\x3e\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x3c\x70\x3e\x43\x72\x65\x61\x74\x65\x20\x61\x6e\x64\x20\
\x6d\x61\x6e\x61\x67\x65\x20\x65\x6e\x63\x72\x79\x70\x74\x65\x64\
\x20\x66\x6f\x6c\x64\x65\x72\x73\x20\x75\x73\x69\x6e\x67\x20\x65\
\x6e\x63\x66\x73\x2e\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x20\x20\x3c\x70\x3e\x3c\x61\x20\x68\x72\x65\x66\x3d\x22\x25\x32\
\x22\x3e\x56\x61\x75\x6c\x74\x3c\x2f\x61\x3e\x0a\x20\x20\x20\x20\
\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x70\x3e\x43\x6f\x70\x79\x72\
\x69\x67\x68\x74\x20\x26\x63\x6f\x70\x79\x3b\x20\x43\x68\x72\x69\
\x73\x20\x54\x72\x69\x61\x6e\x74\x61\x66\x69\x6c\x6c\x69\x73\x20\
\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x3c\x62\
\x72\x3e\x4c\x69\x63\x65\x6e\x73\x65\x3a\x20\x47\x4e\x55\x20\x47\
\x50\x4c\x33\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\
\x3c\x70\x3e\x50\x79\x74\x68\x6f\x6e\x20\x25\x33\x20\x2d\x20\x51\
\x74\x20\x25\x34\x20\x2d\x20\x50\x79\x51\x74\x20\x25\x35\x20\x6f\
\x6e\x20\x25\x36\x07\x00\x00\x00\x05\x56\x61\x75\x6c\x74\x01\x03\
\x00\x00\x00\x14\x03\xa0\x03\xb5\x03\xc1\x03\xaf\x00\x20\x00\x56\
\x00\x61\x00\x75\x00\x6c\x00\x74\x08\x00\x00\x00\x00\x06\x00\x00\
\x00\x0b\x41\x62\x6f\x75\x74\x20\x56\x61\x75\x6c\x74\x07\x00\x00\
\x00\x05\x56\x61\x75\x6c\x74\x01\x03\x00\x00\x00\x66\x03\x88\x03\
\xbd\x03\xb1\x00\x20\x03\xc3\x03\xc6\x03\xac\x03\xbb\x03\xbc\x03\
\xb1\x00\x20\x03\xc0\x03\xc1\x03\xbf\x03\xad\x03\xba\x03\xc5\x03\
\xc8\x03\xb5\x00\x20\x03\xc3\x03\xc4\x03\xb7\x03\xbd\x00\x20\x03\
\xb1\x03\xc0\x03\xbf\x03\xc0\x03\xc1\x03\xbf\x03\xc3\x03\xac\x03\
\xc1\x03\xc4\x03\xb7\x03\xc3\x03\xb7\x00\x20\x03\xc4\x03\xbf\x03\
\xc5\x00\x20\x03\xc6\x03\xb1\x03\xba\x03\xad\x03\xbb\x03\xbf\x03\
\xc5\x00\x21\x08\x00\x00\x00\x00\x06\x00\x00\x00\x2b\x41\x6e\x20\
\x65\x72\x72\x6f\x72\x20\x6f\x63\x63\x75\x72\x20\x77\x68\x69\x6c\
\x65\x20\x75\x6e\x6d\x6f\x75\x6e\x74\x69\x6e\x67\x20\x74\x68\x65\
\x20\x66\x6f\x6c\x64\x65\x72\x21\x07\x00\x00\x00\x05\x56\x61\x75\
\x6c\x74\x01\x03\x00\x00\x00\x3c\x03\x95\x03\xc0\x03\xb9\x03\xbb\
\x03\xbf\x03\xb3\x03\xae\x00\x20\x03\xc6\x03\xb1\x03\xba\x03\xad\
\x03\xbb\x03\xbf\x03\xc5\x00\x20\x03\xb1\x03\xc0\x03\xcc\x00\x20\
\x03\xc4\x03\xb7\x03\xbd\x00\x20\x03\xbb\x03\xaf\x03\xc3\x03\xc4\
\x03\xb1\x00\x3a\x08\x00\x00\x00\x00\x06\x00\x00\x00\x1e\x43\x68\
\x6f\x6f\x73\x65\x20\x61\x20\x66\x6f\x6c\x64\x65\x72\x20\x66\x72\
\x6f\x6d\x20\x74\x68\x65\x20\x6c\x69\x73\x74\x3a\x07\x00\x00\x00\
\x05\x56\x61\x75\x6c\x74\x01\x03\x00\x00\x00\x12\x00\x26\x03\x9a\
\x03\xbb\x03\xb5\x03\xaf\x03\xc3\x03\xb9\x03\xbc\x03\xbf\x08\x00\
\x00\x00\x00\x06\x00\x00\x00\x06\x43\x6c\x6f\x26\x73\x65\x07\x00\
\x00\x00\x05\x56\x61\x75\x6c\x74\x01\x03\x00\x00\x00\x9c\x03\x9a\
\x03\xbb\x03\xb5\x03\xaf\x03\xc3\x03\xc4\x03\xb5\x00\x20\x03\xcc\
\x03\xbb\x03\xb1\x00\x20\x03\xc4\x03\xb1\x00\x20\x03\xc0\x03\xc1\
\x03\xbf\x03\xb3\x03\xc1\x03\xac\x03\xbc\x03\xbc\x03\xb1\x03\xc4\
\x03\xb1\x00\x20\x03\xc0\x03\xbf\x03\xc5\x00\x20\x03\xba\x03\xc1\
\x03\xb1\x03\xc4\x03\xac\x03\xbd\x03\xb5\x00\x20\x03\xc4\x03\xbf\
\x03\xbd\x00\x20\x03\xc6\x03\xac\x03\xba\x03\xb5\x03\xbb\x03\xbf\
\x00\x20\x03\xb1\x03\xc0\x03\xb1\x03\xc3\x03\xc7\x03\xbf\x03\xbb\
\x03\xb7\x03\xbc\x03\xad\x03\xbd\x03\xbf\x00\x20\x03\xba\x03\xb1\
\x03\xb9\x00\x20\x03\xc0\x03\xb1\x03\xc4\x03\xae\x03\xc3\x03\xc4\
\x03\xb5\x00\x20\x03\xbf\x03\xba\x00\x2e\x08\x00\x00\x00\x00\x06\
\x00\x00\x00\x3a\x43\x6c\x6f\x73\x65\x20\x61\x6c\x6c\x20\x70\x72\
\x6f\x67\x72\x61\x6d\x73\x20\x74\x68\x61\x74\x20\x6b\x65\x65\x70\
\x20\x74\x68\x65\x20\x66\x6f\x6c\x64\x65\x72\x20\x62\x75\x73\x79\
\x20\x61\x6e\x64\x20\x70\x72\x65\x73\x73\x20\x6f\x6b\x2e\x07\x00\
\x00\x00\x05\x56\x61\x75\x6c\x74\x01\x03\x00\x00\x00\x20\x03\x9a\
\x03\xbb\x03\xb5\x03\xaf\x03\xc3\x03\xb9\x03\xbc\x03\xbf\x00\x20\
\x03\xc6\x03\xb1\x03\xba\x03\xad\x03\xbb\x03\xbf\x03\xc5\x08\x00\
\x00\x00\x00\x06\x00\x00\x00\x0c\x43\x6c\x6f\x73\x65\x20\x66\x6f\
\x6c\x64\x65\x72\x07\x00\x00\x00\x05\x56\x61\x75\x6c\x74\x01\x03\
\x00\x00\x00\x10\x03\xa3\x03\xc5\x03\xbd\x03\xad\x03\xc7\x03\xb5\
\x03\xb9\x03\xb1\x08\x00\x00\x00\x00\x06\x00\x00\x00\x08\x43\x6f\
\x6e\x74\x69\x6e\x75\x65\x07\x00\x00\x00\x05\x56\x61\x75\x6c\x74\
\x01\x03\x00\x00\x00\x42\x03\x94\x03\xb9\x03\xb1\x03\xb3\x03\xc1\
\x03\xb1\x03\xc6\x03\xae\x00\x20\x03\xba\x03\xc1\x03\xc5\x03\xc0\
\x03\xc1\x03\xbf\x03\xb3\x03\xc1\x03\xb1\x03\xb3\x03\xb7\x03\xbc\
\x03\xad\x03\xbd\x03\xbf\x03\xc5\x00\x20\x03\xc6\x03\xb1\x03\xba\
\x03\xad\x03\xbb\x03\xbf\x03\xc5\x08\x00\x00\x00\x00\x06\x00\x00\
\x00\x17\x44\x65\x6c\x65\x74\x65\x20\x65\x6e\x63\x72\x79\x70\x74\
\x65\x64\x20\x66\x6f\x6c\x64\x65\x72\x07\x00\x00\x00\x05\x56\x61\
\x75\x6c\x74\x01\x03\x00\x00\x00\x38\x03\x94\x03\xb9\x03\xb1\x03\
\xb3\x03\xc1\x03\xb1\x03\xc6\x03\xae\x00\x20\x03\xc3\x03\xb7\x03\
\xbc\x03\xb5\x03\xaf\x03\xbf\x03\xc5\x00\x20\x03\xc0\x03\xc1\x03\
\xbf\x03\xc3\x03\xac\x03\xc1\x03\xc4\x03\xb7\x03\xc3\x03\xb7\x03\
\xc2\x08\x00\x00\x00\x00\x06\x00\x00\x00\x12\x44\x65\x6c\x65\x74\
\x65\x20\x6d\x6f\x75\x6e\x74\x20\x70\x6f\x69\x6e\x74\x07\x00\x00\
\x00\x05\x56\x61\x75\x6c\x74\x01\x03\x00\x00\x00\x0c\x03\xa3\x03\
\xc6\x03\xac\x03\xbb\x03\xbc\x03\xb1\x08\x00\x00\x00\x00\x06\x00\
\x00\x00\x05\x45\x72\x72\x6f\x72\x07\x00\x00\x00\x05\x56\x61\x75\
\x6c\x74\x01\x03\x00\x00\x00\x3a\x03\x9f\x00\x20\x03\xc6\x03\xac\
\x03\xba\x03\xb5\x03\xbb\x03\xbf\x03\xc2\x00\x20\x03\xb5\x03\xaf\
\x03\xbd\x03\xb1\x03\xb9\x00\x20\x03\xb1\x03\xc0\x03\xb1\x03\xc3\
\x03\xc7\x03\xbf\x03\xbb\x03\xb7\x03\xbc\x03\xad\x03\xbd\x03\xbf\
\x03\xc2\x08\x00\x00\x00\x00\x06\x00\x00\x00\x0e\x46\x6f\x6c\x64\
\x65\x72\x20\x69\x73\x20\x62\x75\x73\x79\x07\x00\x00\x00\x05\x56\
\x61\x75\x6c\x74\x01\x03\x00\x00\x00\x1c\x03\x8c\x03\xbd\x03\xbf\
\x03\xbc\x03\xb1\x00\x20\x03\xc6\x03\xb1\x03\xba\x03\xad\x03\xbb\
\x03\xbf\x03\xc5\x00\x3a\x08\x00\x00\x00\x00\x06\x00\x00\x00\x0c\
\x46\x6f\x6c\x64\x65\x72\x20\x6e\x61\x6d\x65\x3a\x07\x00\x00\x00\
\x05\x56\x61\x75\x6c\x74\x01\x03\x00\x00\x00\x1a\x00\x26\x03\xa3\
\x03\xc5\x03\xbc\x03\xbc\x03\xb5\x03\xc4\x03\xad\x03\xc7\x03\xb5\
\x03\xc4\x03\xb5\x00\x21\x08\x00\x00\x00\x00\x06\x00\x00\x00\x0e\
\x47\x65\x74\x20\x26\x49\x6e\x76\x6f\x6c\x76\x65\x64\x21\x07\x00\
\x00\x00\x05\x56\x61\x75\x6c\x74\x01\x03\x00\x00\x00\x0e\x03\x92\
\x03\xbf\x03\xae\x03\xb8\x03\xb5\x03\xb9\x03\xb1\x08\x00\x00\x00\
\x00\x06\x00\x00\x00\x04\x48\x65\x6c\x70\x07\x00\x00\x00\x05\x56\
\x61\x75\x6c\x74\x01\x03\x00\x00\x00\x8a\x03\x91\x03\xbd\x00\x20\
\x03\xb8\x03\xad\x03\xbb\x03\xb5\x03\xc4\x03\xb5\x00\x20\x03\xbd\
\x03\xb1\x00\x20\x03\xb4\x03\xb9\x03\xb1\x03\xb3\x03\xc1\x03\xac\
\x03\xc8\x03\xb5\x03\xc4\x03\xb5\x00\x20\x03\xb1\x03\xc5\x03\xc4\
\x03\xcc\x00\x20\x03\xc4\x03\xbf\x00\x20\x03\xc6\x03\xac\x03\xba\
\x03\xb5\x03\xbb\x03\xbf\x00\x2c\x00\x20\x03\xc0\x03\xc1\x03\xad\
\x03\xc0\x03\xb5\x03\xb9\x00\x20\x03\xc0\x03\xc1\x03\xce\x03\xc4\
\x03\xb1\x00\x20\x03\xbd\x03\xb1\x00\x20\x03\xc4\x03\xbf\x03\xbd\
\x00\x20\x03\xba\x03\xbb\x03\xb5\x03\xaf\x03\xc3\x03\xb5\x03\xc4\
\x03\xb5\x00\x21\x08\x00\x00\x00\x00\x06\x00\x00\x00\x3b\x49\x66\
\x20\x79\x6f\x75\x20\x77\x61\x6e\x74\x20\x74\x6f\x20\x64\x65\x6c\
\x65\x74\x65\x20\x74\x68\x69\x73\x20\x66\x6f\x6c\x64\x65\x72\x2c\
\x20\x79\x6f\x75\x20\x6d\x75\x73\x74\x20\x63\x6c\x6f\x73\x65\x20\
\x69\x74\x20\x66\x69\x72\x73\x74\x21\x07\x00\x00\x00\x05\x56\x61\
\x75\x6c\x74\x01\x03\x00\x00\x00\x20\x03\x9a\x03\xac\x03\xc4\x03\
\xb9\x00\x20\x03\xc0\x03\xae\x03\xb3\x03\xb5\x00\x20\x03\xc3\x03\
\xc4\x03\xc1\x03\xb1\x03\xb2\x03\xac\x08\x00\x00\x00\x00\x06\x00\
\x00\x00\x12\x53\x6f\x6d\x65\x74\x68\x69\x6e\x67\x20\x69\x73\x20\
\x77\x72\x6f\x6e\x67\x07\x00\x00\x00\x05\x56\x61\x75\x6c\x74\x01\
\x03\x00\x00\x00\xb8\x03\x9a\x03\xac\x03\xc4\x03\xb9\x00\x20\x03\
\xc0\x03\xae\x03\xb3\x03\xb5\x00\x20\x03\xc3\x03\xc4\x03\xc1\x03\
\xb1\x03\xb2\x03\xac\x00\x2c\x00\x20\x03\xb5\x03\xbb\x03\xad\x03\
\xb3\x03\xbe\x03\xb5\x03\xc4\x03\xb5\x00\x20\x03\xc4\x03\xbf\x03\
\xbd\x00\x20\x03\xba\x03\xc9\x03\xb4\x03\xb9\x03\xba\x03\xcc\x00\
\x20\x03\xbe\x03\xb1\x03\xbd\x03\xac\x00\x2e\x00\x20\x03\x95\x03\
\xc0\x03\xaf\x03\xc3\x03\xb7\x03\xc2\x00\x20\x03\xb5\x03\xbb\x03\
\xad\x03\xb3\x03\xbe\x03\xb5\x03\xc4\x03\xb5\x00\x20\x03\xb1\x03\
\xbd\x00\x20\x03\xbf\x00\x20\x03\xc6\x03\xac\x03\xba\x03\xb5\x03\
\xbb\x03\xbf\x03\xc2\x00\x20\x03\xb5\x03\xaf\x03\xbd\x03\xb1\x03\
\xb9\x00\x20\x03\xae\x03\xb4\x03\xb7\x00\x20\x03\xb1\x03\xbd\x03\
\xbf\x03\xb9\x03\xc7\x03\xc4\x03\xcc\x03\xc2\x00\x2e\x08\x00\x00\
\x00\x00\x06\x00\x00\x00\x55\x53\x6f\x6d\x65\x74\x68\x69\x6e\x67\
\x20\x69\x73\x20\x77\x72\x6f\x6e\x67\x2c\x20\x63\x68\x65\x63\x6b\
\x20\x74\x68\x65\x20\x70\x61\x73\x73\x77\x6f\x72\x64\x20\x61\x67\
\x61\x69\x6e\x2e\x20\x41\x6c\x73\x6f\x20\x63\x68\x65\x63\x6b\x20\
\x69\x66\x20\x74\x68\x65\x20\x66\x6f\x6c\x64\x65\x72\x20\x69\x73\
\x20\x73\x74\x69\x6c\x6c\x20\x6f\x70\x65\x6e\x2e\x07\x00\x00\x00\
\x05\x56\x61\x75\x6c\x74\x01\x03\x00\x00\x00\x3c\x03\x9f\x00\x20\
\x03\xc6\x03\xac\x03\xba\x03\xb5\x03\xbb\x03\xbf\x03\xc2\x00\x20\
\x03\xb5\x03\xaf\x03\xbd\x03\xb1\x03\xb9\x00\x20\x03\xc0\x03\xc1\
\x03\xbf\x03\xc3\x03\xb1\x03\xc1\x03\xc4\x03\xb7\x03\xbc\x03\xad\
\x03\xbd\x03\xbf\x03\xc2\x00\x21\x08\x00\x00\x00\x00\x06\x00\x00\
\x00\x16\x54\x68\x65\x20\x66\x6f\x6c\x64\x65\x72\x20\x69\x73\x20\
\x6d\x6f\x75\x6e\x74\x65\x64\x21\x07\x00\x00\x00\x05\x56\x61\x75\
\x6c\x74\x01\x03\x00\x00\x00\x9c\x03\x9f\x00\x20\x03\xc6\x03\xac\
\x03\xba\x03\xb5\x03\xbb\x03\xbf\x03\xc2\x00\x20\x03\xb5\x03\xaf\
\x03\xbd\x03\xb1\x03\xb9\x00\x20\x03\xc0\x03\xb9\x03\xb8\x03\xb1\
\x03\xbd\x03\xcc\x03\xbd\x00\x20\x03\xb1\x03\xc0\x03\xb1\x03\xc3\
\x03\xc7\x03\xbf\x03\xbb\x03\xb7\x03\xbc\x03\xad\x03\xbd\x03\xbf\
\x03\xc2\x00\x2c\x00\x20\x03\xb8\x03\xad\x03\xbb\x03\xb5\x03\xc4\
\x03\xb5\x00\x20\x03\xbd\x03\xb1\x00\x20\x03\xc4\x03\xbf\x03\xbd\
\x00\x20\x03\xba\x03\xbb\x03\xb5\x03\xaf\x03\xc3\x03\xb5\x03\xc4\
\x03\xb5\x00\x20\x03\xad\x03\xc4\x03\xc3\x03\xb9\x00\x20\x03\xba\
\x03\xb1\x03\xb9\x00\x20\x03\xb1\x03\xbb\x03\xbb\x03\xb9\x03\xce\
\x03\xc2\x00\x3b\x08\x00\x00\x00\x00\x06\x00\x00\x00\x3c\x54\x68\
\x65\x20\x66\x6f\x6c\x64\x65\x72\x20\x69\x73\x20\x70\x72\x6f\x62\
\x61\x62\x6c\x79\x20\x62\x75\x73\x79\x2c\x20\x64\x6f\x20\x79\x6f\
\x75\x20\x77\x61\x6e\x74\x20\x74\x6f\x20\x63\x6c\x6f\x73\x65\x20\
\x69\x74\x20\x61\x6e\x79\x77\x61\x79\x3f\x07\x00\x00\x00\x05\x56\
\x61\x75\x6c\x74\x01\x03\x00\x00\x00\x0a\x00\x56\x00\x61\x00\x75\
\x00\x6c\x00\x74\x08\x00\x00\x00\x00\x06\x00\x00\x00\x05\x56\x61\
\x75\x6c\x74\x07\x00\x00\x00\x05\x56\x61\x75\x6c\x74\x01\x03\x00\
\x00\x00\x42\x00\x3c\x00\x62\x00\x3e\x03\x9f\x03\xb9\x00\x20\x03\
\xba\x03\xc9\x03\xb4\x03\xb9\x03\xba\x03\xbf\x03\xaf\x00\x20\x03\
\xb4\x03\xb5\x03\xbd\x00\x20\x03\xc4\x03\xb1\x03\xb9\x03\xc1\x03\
\xb9\x03\xac\x03\xb6\x03\xbf\x03\xc5\x03\xbd\x00\x21\x00\x3c\x00\
\x2f\x00\x62\x00\x3e\x08\x00\x00\x00\x00\x06\x00\x00\x00\x1e\x3c\
\x62\x3e\x50\x61\x73\x73\x77\x6f\x72\x64\x73\x20\x64\x6f\x20\x6e\
\x6f\x74\x20\x6d\x61\x74\x63\x68\x21\x3c\x2f\x62\x3e\x07\x00\x00\
\x00\x0c\x63\x72\x65\x61\x74\x65\x70\x61\x73\x73\x77\x64\x01\x03\
\x00\x00\x00\x34\x03\x95\x03\xc0\x03\xb9\x03\xb2\x03\xb5\x03\xb2\
\x03\xb1\x03\xaf\x03\xc9\x03\xc3\x03\xb7\x00\x20\x03\xba\x03\xc9\
\x03\xb4\x03\xb9\x03\xba\x03\xbf\x03\xcd\x00\x20\x00\x45\x00\x6e\
\x00\x63\x00\x46\x00\x53\x00\x3a\x08\x00\x00\x00\x00\x06\x00\x00\
\x00\x17\x43\x6f\x6e\x66\x69\x72\x6d\x20\x45\x6e\x63\x46\x53\x20\
\x70\x61\x73\x73\x77\x6f\x72\x64\x3a\x07\x00\x00\x00\x0c\x63\x72\
\x65\x61\x74\x65\x70\x61\x73\x73\x77\x64\x01\x03\x00\x00\x00\x1c\
\x03\x9a\x03\xc9\x03\xb4\x03\xb9\x03\xba\x03\xcc\x03\xc2\x00\x20\
\x00\x45\x00\x6e\x00\x63\x00\x46\x00\x53\x00\x3a\x08\x00\x00\x00\
\x00\x06\x00\x00\x00\x0f\x45\x6e\x63\x46\x53\x20\x70\x61\x73\x73\
\x77\x6f\x72\x64\x3a\x07\x00\x00\x00\x0c\x63\x72\x65\x61\x74\x65\
\x70\x61\x73\x73\x77\x64\x01\x03\x00\x00\x00\x04\x03\x9f\x03\x9a\
\x08\x00\x00\x00\x00\x06\x00\x00\x00\x02\x4f\x6b\x07\x00\x00\x00\
\x0c\x63\x72\x65\x61\x74\x65\x70\x61\x73\x73\x77\x64\x01\x03\x00\
\x00\x00\x0e\x03\x9a\x03\xc9\x03\xb4\x03\xb9\x03\xba\x03\xcc\x03\
\xc2\x08\x00\x00\x00\x00\x06\x00\x00\x00\x08\x50\x61\x73\x73\x77\
\x6f\x72\x64\x07\x00\x00\x00\x0c\x63\x72\x65\x61\x74\x65\x70\x61\
\x73\x73\x77\x64\x01\x03\x00\x00\x00\x04\x03\x9f\x03\x9a\x08\x00\
\x00\x00\x00\x06\x00\x00\x00\x02\x4f\x6b\x07\x00\x00\x00\x06\x70\
\x61\x73\x73\x77\x64\x01\x03\x00\x00\x00\x0e\x03\x9a\x03\xc9\x03\
\xb4\x03\xb9\x03\xba\x03\xcc\x03\xc2\x08\x00\x00\x00\x00\x06\x00\
\x00\x00\x08\x50\x61\x73\x73\x77\x6f\x72\x64\x07\x00\x00\x00\x06\
\x70\x61\x73\x73\x77\x64\x01\x88\x00\x00\x00\x02\x01\x01\
"
qt_resource_name = "\
\x00\x09\
\x0c\x37\xae\x47\
\x00\x76\
\x00\x61\x00\x75\x00\x6c\x00\x74\x00\x2e\x00\x70\x00\x6e\x00\x67\
\x00\x0b\
\x0a\xa2\xed\x1d\
\x00\x76\
\x00\x61\x00\x75\x00\x6c\x00\x74\x00\x5f\x00\x65\x00\x6c\x00\x2e\x00\x71\x00\x6d\
"
qt_resource_struct = "\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x02\x00\x00\x00\x01\
\x00\x00\x00\x18\x00\x00\x00\x00\x00\x01\x00\x01\x2b\xea\
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
"
def qInitResources():
QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
def qCleanupResources():
QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
qInitResources()
| gpl-3.0 | -27,897,063,524,471,724 | -6,555,669,736,924,667,000 | 64.643892 | 96 | 0.727183 | false |
KNMI/VERCE | verce-hpc-pe/src/networkx/algorithms/centrality/tests/test_closeness_centrality.py | 84 | 2746 | """
Tests for degree centrality.
"""
from nose.tools import *
import networkx as nx
class TestClosenessCentrality:
def setUp(self):
self.K = nx.krackhardt_kite_graph()
self.P3 = nx.path_graph(3)
self.P4 = nx.path_graph(4)
self.K5 = nx.complete_graph(5)
self.C4=nx.cycle_graph(4)
self.T=nx.balanced_tree(r=2, h=2)
self.Gb = nx.Graph()
self.Gb.add_edges_from([(0,1), (0,2), (1,3), (2,3),
(2,4), (4,5), (3,5)])
F = nx.florentine_families_graph()
self.F = F
def test_k5_closeness(self):
c=nx.closeness_centrality(self.K5)
d={0: 1.000,
1: 1.000,
2: 1.000,
3: 1.000,
4: 1.000}
for n in sorted(self.K5):
assert_almost_equal(c[n],d[n],places=3)
def test_p3_closeness(self):
c=nx.closeness_centrality(self.P3)
d={0: 0.667,
1: 1.000,
2: 0.667}
for n in sorted(self.P3):
assert_almost_equal(c[n],d[n],places=3)
def test_krackhardt_closeness(self):
c=nx.closeness_centrality(self.K)
d={0: 0.529,
1: 0.529,
2: 0.500,
3: 0.600,
4: 0.500,
5: 0.643,
6: 0.643,
7: 0.600,
8: 0.429,
9: 0.310}
for n in sorted(self.K):
assert_almost_equal(c[n],d[n],places=3)
def test_florentine_families_closeness(self):
c=nx.closeness_centrality(self.F)
d={'Acciaiuoli': 0.368,
'Albizzi': 0.483,
'Barbadori': 0.4375,
'Bischeri': 0.400,
'Castellani': 0.389,
'Ginori': 0.333,
'Guadagni': 0.467,
'Lamberteschi': 0.326,
'Medici': 0.560,
'Pazzi': 0.286,
'Peruzzi': 0.368,
'Ridolfi': 0.500,
'Salviati': 0.389,
'Strozzi': 0.4375,
'Tornabuoni': 0.483}
for n in sorted(self.F):
assert_almost_equal(c[n],d[n],places=3)
def test_weighted_closeness(self):
XG=nx.Graph()
XG.add_weighted_edges_from([('s','u',10), ('s','x',5), ('u','v',1),
('u','x',2), ('v','y',1), ('x','u',3),
('x','v',5), ('x','y',2), ('y','s',7),
('y','v',6)])
c=nx.closeness_centrality(XG,distance='weight')
d={'y': 0.200,
'x': 0.286,
's': 0.138,
'u': 0.235,
'v': 0.200}
for n in sorted(XG):
assert_almost_equal(c[n],d[n],places=3)
| mit | -9,145,208,820,247,210,000 | 4,246,472,512,582,739,000 | 28.526882 | 75 | 0.429716 | false |
apagac/robottelo | tests/foreman/ui/test_operatingsys.py | 2 | 19232 | # -*- encoding: utf-8 -*-
"""Test class for Operating System UI"""
from ddt import ddt
from fauxfactory import gen_string
from robottelo import entities
from robottelo.common.constants import (
INSTALL_MEDIUM_URL, PARTITION_SCRIPT_DATA_FILE)
from robottelo.common.decorators import data
from robottelo.common.decorators import run_only_on, skip_if_bug_open
from robottelo.common.helpers import get_data_file
from robottelo.test import UITestCase
from robottelo.ui.factory import make_os
from robottelo.ui.locators import common_locators
from robottelo.ui.session import Session
@run_only_on('sat')
@ddt
class OperatingSys(UITestCase):
"""Implements Operating system tests from UI"""
@classmethod
def setUpClass(cls): # noqa
org_attrs = entities.Organization().create_json()
cls.org_name = org_attrs['name']
cls.org_id = org_attrs['id']
super(OperatingSys, cls).setUpClass()
def test_create_os(self):
"""@Test: Create a new OS
@Feature: OS - Positive Create
@Assert: OS is created
"""
name = gen_string("alpha", 6)
major_version = gen_string('numeric', 1)
minor_version = gen_string('numeric', 1)
os_family = "Red Hat"
arch = "x86_64"
with Session(self.browser) as session:
make_os(session, name=name,
major_version=major_version,
minor_version=minor_version,
os_family=os_family, archs=[arch])
self.assertIsNotNone(self.operatingsys.search(name))
@data({u'name': gen_string('alpha', 10),
u'major_version': gen_string('numeric', 1),
u'minor_version': gen_string('numeric', 1),
u'desc': gen_string('alpha', 10),
u'os_family': "Red Hat"},
{u'name': gen_string('html', 10),
u'major_version': gen_string('numeric', 4),
u'minor_version': gen_string('numeric', 4),
u'desc': gen_string('html', 10),
u'os_family': "Gentoo"},
{u'name': gen_string('utf8', 10),
u'major_version': gen_string('numeric', 5),
u'minor_version': gen_string('numeric', 16),
u'desc': gen_string('utf8', 10),
u'os_family': "SUSE"},
{u'name': gen_string('alphanumeric', 255),
u'major_version': gen_string('numeric', 5),
u'minor_version': gen_string('numeric', 1),
u'desc': gen_string('alphanumeric', 255),
u'os_family': "SUSE"})
def test_positive_create_os(self, test_data):
"""@Test: Create a new OS with different data values
@Feature: OS - Positive Create
@Assert: OS is created
@BZ: 1120568
"""
arch = "i386"
with Session(self.browser) as session:
make_os(session, name=test_data['name'],
major_version=test_data['major_version'],
minor_version=test_data['minor_version'],
description=test_data['desc'],
os_family=test_data['os_family'], archs=[arch])
self.assertIsNotNone(self.operatingsys.search
(test_data['desc'], search_key="description"))
def test_negative_create_os_1(self):
"""@Test: OS - Create a new OS with 256 characters in name
@Feature: Create a new OS - Negative
@Assert: OS is not created
@BZ: 1120181
"""
name = gen_string("alpha", 256)
major_version = gen_string('numeric', 1)
minor_version = gen_string('numeric', 1)
os_family = "Red Hat"
arch = "x86_64"
with Session(self.browser) as session:
make_os(session, name=name,
major_version=major_version,
minor_version=minor_version,
os_family=os_family, archs=[arch])
self.assertIsNotNone(self.operatingsys.wait_until_element
(common_locators["name_haserror"]))
self.assertIsNone(self.operatingsys.search(name))
def test_negative_create_os_2(self):
"""@Test: OS - Create a new OS with blank name
@Feature: Create a new OS - Negative
@Assert: OS is not created
"""
name = ""
major_version = gen_string('numeric', 1)
minor_version = gen_string('numeric', 1)
os_family = "Red Hat"
arch = "x86_64"
with Session(self.browser) as session:
make_os(session, name=name,
major_version=major_version,
minor_version=minor_version,
os_family=os_family, archs=[arch])
self.assertIsNotNone(self.operatingsys.wait_until_element
(common_locators["name_haserror"]))
def test_negative_create_os_3(self):
"""@Test: OS - Create a new OS with description containing
256 characters
@Feature: Create a new OS - Negative
@Assert: OS is not created
"""
name = gen_string("alpha", 6)
major_version = gen_string('numeric', 1)
minor_version = gen_string('numeric', 1)
description = gen_string("alphanumeric", 256)
os_family = "Red Hat"
arch = "x86_64"
with Session(self.browser) as session:
make_os(session, name=name,
major_version=major_version,
minor_version=minor_version,
description=description,
os_family=os_family, archs=[arch])
self.assertIsNotNone(self.operatingsys.wait_until_element
(common_locators["haserror"]))
self.assertIsNone(self.operatingsys.search(name))
def test_negative_create_os_4(self):
"""@Test: OS - Create a new OS with long major version (More than 5
characters in major version)
@Feature: Create a new OS - Negative
@Assert: OS is not created
"""
name = gen_string("alpha", 6)
major_version = gen_string('numeric', 6)
minor_version = gen_string('numeric', 1)
os_family = "Red Hat"
arch = "x86_64"
with Session(self.browser) as session:
make_os(session, name=name,
major_version=major_version,
minor_version=minor_version,
os_family=os_family, archs=[arch])
self.assertIsNotNone(self.operatingsys.wait_until_element
(common_locators["haserror"]))
self.assertIsNone(self.operatingsys.search(name))
def test_negative_create_os_5(self):
"""@Test: OS - Create a new OS with long minor version (More than 16
characters in minor version)
@Feature: Create a new OS - Negative
@Assert: OS is not created
"""
name = gen_string("alpha", 6)
major_version = gen_string('numeric', 1)
minor_version = gen_string('numeric', 17)
os_family = "Red Hat"
arch = "x86_64"
with Session(self.browser) as session:
make_os(session, name=name,
major_version=major_version,
minor_version=minor_version,
os_family=os_family, archs=[arch])
self.assertIsNotNone(self.operatingsys.wait_until_element
(common_locators["haserror"]))
self.assertIsNone(self.operatingsys.search(name))
def test_negative_create_os_6(self):
"""@Test: OS - Create a new OS without major version
@Feature: Create a new OS - Negative
@Assert: OS is not created
"""
name = gen_string("alpha", 6)
major_version = " "
minor_version = gen_string('numeric', 6)
os_family = "Red Hat"
arch = "x86_64"
with Session(self.browser) as session:
make_os(session, name=name,
major_version=major_version,
minor_version=minor_version,
os_family=os_family, archs=[arch])
self.assertIsNotNone(self.operatingsys.wait_until_element
(common_locators["haserror"]))
self.assertIsNone(self.operatingsys.search(name))
def test_negative_create_os_7(self):
"""@Test: OS - Create a new OS with -ve value of major version
@Feature: Create a new OS - Negative
@Assert: OS is not created
@BZ: 1120199
"""
name = gen_string("alpha", 6)
major_version = "-6"
minor_version = "-5"
os_family = "Red Hat"
arch = "x86_64"
with Session(self.browser) as session:
make_os(session, name=name,
major_version=major_version,
minor_version=minor_version,
os_family=os_family, archs=[arch])
self.assertIsNotNone(self.operatingsys.wait_until_element
(common_locators["haserror"]))
self.assertIsNone(self.operatingsys.search(name))
@skip_if_bug_open('bugzilla', 1120985)
def test_negative_create_os_8(self):
"""@Test: OS - Create a new OS with same name and version
@Feature: Create a new OS - Negative
@Assert: OS is not created
@BZ: 1120985
"""
name = gen_string("alpha", 6)
major_version = gen_string('numeric', 1)
minor_version = gen_string('numeric', 1)
os_family = "Red Hat"
arch = "x86_64"
with Session(self.browser) as session:
make_os(session, name=name,
major_version=major_version,
minor_version=minor_version,
os_family=os_family, archs=[arch])
self.assertIsNotNone(self.operatingsys.search(name))
make_os(session, name=name,
major_version=major_version,
minor_version=minor_version,
os_family=os_family, archs=[arch])
self.assertIsNotNone(self.operatingsys.wait_until_element
(common_locators["haserror"]))
self.assertIsNone(self.operatingsys.search(name))
def test_remove_os(self):
"""@Test: Delete an existing OS
@Feature: OS - Positive Delete
@Assert: OS is deleted
"""
os_name = entities.OperatingSystem().create_json()['name']
with Session(self.browser) as session:
session.nav.go_to_operating_systems()
self.operatingsys.delete(os_name, really=True)
self.assertIsNone(self.operatingsys.search(os_name))
@data(
{u'new_name': gen_string('alpha', 10),
u'new_major_version': gen_string('numeric', 1),
u'new_minor_version': gen_string('numeric', 1),
u'new_os_family': "Red Hat"},
{u'new_name': gen_string('html', 10),
u'new_major_version': gen_string('numeric', 4),
u'new_minor_version': gen_string('numeric', 4),
u'new_os_family': "Gentoo"},
{u'new_name': gen_string('utf8', 10),
u'new_major_version': gen_string('numeric', 5),
u'new_minor_version': gen_string('numeric', 16),
u'new_os_family': "SUSE"},
{u'new_name': gen_string('alphanumeric', 255),
u'new_major_version': gen_string('numeric', 5),
u'new_minor_version': gen_string('numeric', 1),
u'new_os_family': "SUSE"}
)
def test_update_os_1(self, test_data):
"""@Test: Update OS name, major_version, minor_version, os_family
and arch
@Feature: OS - Positive Update
@Assert: OS is updated
"""
os_name = entities.OperatingSystem().create_json()['name']
arch_name = entities.Architecture().create_json()['name']
with Session(self.browser):
self.operatingsys.update(os_name, test_data['new_name'],
test_data['new_major_version'],
test_data['new_minor_version'],
os_family=test_data['new_os_family'],
new_archs=[arch_name])
self.assertIsNotNone(self.operatingsys.search(
test_data['new_name']))
def test_update_os_medium(self):
"""@Test: Update OS medium
@Feature: OS - Positive Update
@Assert: OS is updated
"""
medium_name = gen_string("alpha", 4)
path = INSTALL_MEDIUM_URL % medium_name
entities.Media(
name=medium_name,
media_path=path,
organization=[self.org_id],
).create_json()
os_name = entities.OperatingSystem().create_json()['name']
with Session(self.browser) as session:
session.nav.go_to_select_org(self.org_name)
self.operatingsys.update(os_name, new_mediums=[medium_name])
result_obj = self.operatingsys.get_os_entities(os_name, "medium")
self.assertEqual(medium_name, result_obj['medium'])
def test_update_os_partition_table(self):
"""@Test: Update OS partition table
@Feature: OS - Positive Update
@Assert: OS is updated
"""
ptable = gen_string("alpha", 4)
script_file = get_data_file(PARTITION_SCRIPT_DATA_FILE)
with open(script_file, 'r') as file_contents:
layout = file_contents.read()
entities.PartitionTable(
name=ptable,
layout=layout,
).create_json()
os_name = entities.OperatingSystem().create_json()['name']
with Session(self.browser):
self.operatingsys.update(os_name, new_ptables=[ptable])
result_obj = self.operatingsys.get_os_entities(os_name, "ptable")
self.assertEqual(ptable, result_obj['ptable'])
def test_update_os_template(self):
"""@Test: Update provisioning template
@Feature: OS - Positive Update
@Assert: OS is updated
@BZ: 1129612
"""
os_name = gen_string("alpha", 4)
template_name = gen_string("alpha", 4)
os_attrs = entities.OperatingSystem(name=os_name).create_json()
entities.ConfigTemplate(
name=template_name,
operatingsystem=[os_attrs['id']],
organization=[self.org_id],
).create_json()
with Session(self.browser) as session:
session.nav.go_to_select_org(self.org_name)
self.operatingsys.update(os_name, template=template_name)
result_obj = self.operatingsys.get_os_entities(os_name, "template")
self.assertEqual(template_name, result_obj['template'])
def test_positive_set_os_parameter_1(self):
"""@Test: Set OS parameter
@Feature: OS - Positive Update
@Assert: OS is updated
"""
param_name = gen_string("alpha", 4)
param_value = gen_string("alpha", 3)
os_name = entities.OperatingSystem().create_json()['name']
with Session(self.browser):
try:
self.operatingsys.set_os_parameter(os_name, param_name,
param_value)
except Exception as e:
self.fail(e)
def test_positive_set_os_parameter_2(self):
"""@Test: Set OS parameter with blank value
@Feature: OS - Positive update
@Assert: Parameter is created with blank value
"""
param_name = gen_string("alpha", 4)
param_value = ""
os_name = entities.OperatingSystem().create_json()['name']
with Session(self.browser):
try:
self.operatingsys.set_os_parameter(os_name, param_name,
param_value)
except Exception as e:
self.fail(e)
def test_remove_os_parameter(self):
"""@Test: Remove selected OS parameter
@Feature: OS - Positive Update
@Assert: OS is updated
"""
param_name = gen_string("alpha", 4)
param_value = gen_string("alpha", 3)
os_name = entities.OperatingSystem().create_json()['name']
with Session(self.browser):
try:
self.operatingsys.set_os_parameter(os_name, param_name,
param_value)
self.operatingsys.remove_os_parameter(os_name, param_name)
except Exception as e:
self.fail(e)
def test_negative_set_os_parameter_1(self):
"""@Test: Set same OS parameter again as it was set earlier
@Feature: OS - Negative Update
@Assert: Proper error should be raised, Name already taken
@BZ: 1120663
"""
param_name = gen_string("alpha", 4)
param_value = gen_string("alpha", 3)
os_name = entities.OperatingSystem().create_json()['name']
with Session(self.browser):
try:
self.operatingsys.set_os_parameter(os_name, param_name,
param_value)
self.operatingsys.set_os_parameter(os_name, param_name,
param_value)
except Exception as e:
self.fail(e)
self.assertIsNotNone(self.operatingsys.wait_until_element
(common_locators["common_param_error"]))
def test_negative_set_os_parameter_2(self):
"""@Test: Set OS parameter with blank name and value
@Feature: OS - Negative Update
@Assert: Proper error should be raised, Name can't contain whitespaces
@BZ: 1120663
"""
param_name = " "
param_value = " "
os_name = entities.OperatingSystem().create_json()['name']
with Session(self.browser):
try:
self.operatingsys.set_os_parameter(os_name, param_name,
param_value)
except Exception as e:
self.fail(e)
self.assertIsNotNone(self.operatingsys.wait_until_element
(common_locators["common_param_error"]))
def test_negative_set_os_parameter_3(self):
"""@Test: Set OS parameter with name and value exceeding 255 characters
@Feature: OS - Negative Update
@Assert: Proper error should be raised, Name should contain a value
"""
param_name = gen_string("alpha", 256)
param_value = gen_string("alpha", 256)
os_name = entities.OperatingSystem().create_json()['name']
with Session(self.browser):
try:
self.operatingsys.set_os_parameter(os_name, param_name,
param_value)
except Exception as e:
self.fail(e)
self.assertIsNotNone(self.operatingsys.wait_until_element
(common_locators["common_param_error"]))
| gpl-3.0 | 8,046,653,833,289,840,000 | 6,567,998,071,130,732,000 | 35.082552 | 79 | 0.552153 | false |
clovis/PhiloLogic4 | www/webApp.py | 2 | 7294 | #!/usr/bin/env python3
"""Bootstrap Web app"""
import os.path
from philologic.runtime import WebConfig
from philologic.runtime import WSGIHandler
from philologic.runtime import access_control
from philologic.utils import load_module
config = WebConfig(os.path.abspath(os.path.dirname(__file__)))
global_config = load_module("philologic4", config.global_config_location)
path = os.path.abspath(os.path.dirname(__file__))
dbname = path.strip().split("/")[-1]
config = WebConfig(os.path.abspath(os.path.dirname(__file__)))
config_location = os.path.join("app/assets/css/split/", os.path.basename(config.theme))
if os.path.realpath(os.path.abspath(config.theme)) == os.path.realpath(os.path.abspath(config_location)):
theme = config_location
elif os.path.exists(config_location) and config.production:
theme = config_location
else:
os.system("cp %s %s" % (config.theme, config_location))
theme = config_location
css_files = [
"app/assets/css/bootstrap.min.css",
"app/assets/css/split/style.css",
"app/assets/css/split/searchForm.css",
"app/assets/css/split/landingPage.css",
"app/assets/css/split/concordanceKwic.css",
"app/assets/css/split/timeSeries.css",
"app/assets/css/image_gallery/blueimp-gallery.min.css",
"app/assets/css/split/textObjectNavigation.css",
theme,
]
# External JavaScript assets
js_plugins = [
"app/assets/js/plugins/ui-utils.min.js",
"app/assets/js/plugins/ng-infinite-scroll.min.js",
"app/assets/js/plugins/jquery.tagcloud.js",
"app/assets/js/plugins/blueimp-gallery.min.js",
"app/assets/js/plugins/jquery.scrollTo.min.js",
"app/assets/js/plugins/Chart.min.js",
"app/assets/js/plugins/angular-chart.min.js",
"app/assets/js/plugins/bootstrap.min.js",
"app/assets/js/plugins/velocity.min.js",
"app/assets/js/plugins/velocity.ui.min.js",
"app/assets/js/plugins/angular-velocity.min.js",
]
# Full List of all AngularJS specific JavaScript
js_files = [
"app/bootstrapApp.js",
"app/philoLogicMain.js",
"app/routes.js",
"app/shared/directives.js",
"app/shared/services.js",
"app/shared/config.js",
"app/shared/filters.js",
"app/shared/values.js",
"app/shared/searchArguments/searchArgumentsDirective.js",
"app/shared/exportResults/exportResults.js",
"app/components/landingPage/landingPageDirectives.js",
"app/components/landingPage/landingPage.js",
"app/shared/searchForm/searchFormServices.js",
"app/shared/searchForm/searchFormFilters.js",
"app/shared/searchForm/searchFormDirectives.js",
"app/shared/searchForm/searchForm.js",
"app/components/concordanceKwic/concordanceKwicValues.js",
"app/components/concordanceKwic/concordanceKwicDirectives.js",
"app/components/concordanceKwic/facetsDirectives.js",
"app/components/concordanceKwic/concordanceKwicFilters.js",
"app/components/concordanceKwic/concordanceKwic.js",
"app/components/textNavigation/textNavigationFilters.js",
"app/components/textNavigation/textNavigationValues.js",
"app/components/textNavigation/textNavigationDirectives.js",
"app/components/textNavigation/textNavigationCtrl.js",
"app/components/tableOfContents/tableOfContents.js",
"app/components/collocation/collocationDirectives.js",
"app/components/collocation/collocation.js",
"app/components/timeSeries/timeSeriesFilters.js",
"app/components/timeSeries/timeSeriesDirectives.js",
"app/components/timeSeries/timeSeries.js",
"app/shared/accessControl/accessControlDirective.js",
"app/shared/accessControl/accessControlCtrl.js",
]
def angular(environ, start_response):
headers = [("Content-type", "text/html; charset=UTF-8"), ("Access-Control-Allow-Origin", "*")]
if not config.valid_config: # This means we have an error in the webconfig file
html = build_misconfig_page(config.traceback, "webconfig.cfg")
# TODO handle errors in db.locals.py
else:
request = WSGIHandler(environ, config)
if config.access_control:
if not request.authenticated:
token = access_control.check_access(environ, config)
if token:
h, ts = token
headers.append(("Set-Cookie", "hash=%s" % h))
headers.append(("Set-Cookie", "timestamp=%s" % ts))
html = build_html_page(config)
start_response("200 OK", headers)
return html
def build_html_page(config):
html_page = open("%s/app/index.html" % config.db_path, encoding="utf8", errors="ignore").read()
html_page = html_page.replace("$DBNAME", config.dbname)
html_page = html_page.replace("$DBURL", os.path.join(global_config.url_root, dbname))
html_page = html_page.replace("$CSS", load_CSS())
html_page = html_page.replace("$JS", load_JS())
return html_page
def build_misconfig_page(traceback, config_file):
html_page = open("%s/app/misconfiguration.html" % path, encoding="utf8", errors="ignore").read()
html_page = html_page.replace("$CSS", load_CSS())
html_page = html_page.replace("$TRACEBACK", traceback)
html_page = html_page.replace("$CONFIG_FILE", config_file)
return html_page
def load_CSS():
mainCSS = os.path.join(path, "app/assets/css/philoLogic.css")
if os.path.exists(mainCSS):
if not config.production:
css_links = concat_CSS()
else:
css_links = concat_CSS()
if config.production:
return '<link rel="stylesheet" href="app/assets/css/philoLogic.css">'
else:
return "\n".join(css_links)
def concat_CSS():
css_string, css_links = concatenate_files(css_files, "css")
output = open(os.path.join(path, "app/assets/css/philoLogic.css"), "w")
output.write(css_string)
return css_links
def load_JS():
mainJS = os.path.join(path, "app/assets/js/philoLogic.js")
if os.path.exists(mainJS):
if not config.production:
js_links, js_plugins_links = concat_JS()
else:
js_links, js_plugins_links = concat_JS()
if config.production:
scripts = '<script src="app/assets/js/plugins/philoLogicPlugins.js"></script>'
scripts += '<script src="app/assets/js/philoLogic.js"></script>'
return scripts
else:
return "\n".join(js_plugins_links + js_links)
def concat_JS():
js_plugins_string, js_plugins_links = concatenate_files(js_plugins, "js")
plugin_output = open(os.path.join(path, "app/assets/js/plugins/philoLogicPlugins.js"), "w")
plugin_output.write(js_plugins_string)
js_string, js_links = concatenate_files(js_files, "js")
output = open(os.path.join(path, "app/assets/js/philoLogic.js"), "w")
output.write(js_string)
return js_links, js_plugins_links
def concatenate_files(file_list, file_type):
string = []
links = []
for file_path in file_list:
try:
string.append(open(os.path.join(path, file_path)).read())
if not config.production:
if file_type == "css":
links.append('<link rel="stylesheet" href="%s">' % file_path)
else:
links.append('<script src="%s"></script>' % file_path)
except IOError:
pass
string = "\n".join(string)
return string, links
| gpl-3.0 | -1,888,624,171,076,175,400 | 7,923,808,127,343,407,000 | 37.797872 | 105 | 0.676309 | false |
fiuba08/robotframework | src/robot/libraries/Collections.py | 3 | 29511 | # Copyright 2008-2014 Nokia Solutions and Networks
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from robot.api import logger
from robot.utils import plural_or_not, seq2str, seq2str2, unic
from robot.utils.asserts import assert_equals
from robot.version import get_version
class _List:
def convert_to_list(self, item):
"""Converts the given `item` to a list.
Mainly useful for converting tuples and other iterable to lists.
Use `Create List` from the BuiltIn library for constructing new lists.
"""
return list(item)
def append_to_list(self, list_, *values):
"""Adds `values` to the end of `list`.
Example:
| Append To List | ${L1} | xxx | | |
| Append To List | ${L2} | x | y | z |
=>
- ${L1} = ['a', 'xxx']
- ${L2} = ['a', 'b', 'x', 'y', 'z']
"""
for value in values:
list_.append(value)
def insert_into_list(self, list_, index, value):
"""Inserts `value` into `list` to the position specified with `index`.
Index '0' adds the value into the first position, '1' to the second,
and so on. Inserting from right works with negative indices so that
'-1' is the second last position, '-2' third last, and so on. Use
`Append To List` to add items to the end of the list.
If the absolute value of the index is greater than
the length of the list, the value is added at the end
(positive index) or the beginning (negative index). An index
can be given either as an integer or a string that can be
converted to an integer.
Example:
| Insert Into List | ${L1} | 0 | xxx |
| Insert Into List | ${L2} | ${-1} | xxx |
=>
- ${L1} = ['xxx', 'a']
- ${L2} = ['a', 'xxx', 'b']
"""
list_.insert(self._index_to_int(index), value)
def combine_lists(self, *lists):
"""Combines the given `lists` together and returns the result.
The given lists are not altered by this keyword.
Example:
| ${x} = | Combine List | ${L1} | ${L2} | |
| ${y} = | Combine List | ${L1} | ${L2} | ${L1} |
=>
- ${x} = ['a', 'a', 'b']
- ${y} = ['a', 'a', 'b', 'a']
- ${L1} and ${L2} are not changed.
"""
ret = []
for item in lists:
ret.extend(item)
return ret
def set_list_value(self, list_, index, value):
"""Sets the value of `list` specified by `index` to the given `value`.
Index '0' means the first position, '1' the second and so on.
Similarly, '-1' is the last position, '-2' second last, and so on.
Using an index that does not exist on the list causes an error.
The index can be either an integer or a string that can be converted to
an integer.
Example:
| Set List Value | ${L3} | 1 | xxx |
| Set List Value | ${L3} | -1 | yyy |
=>
- ${L3} = ['a', 'xxx', 'yyy']
"""
try:
list_[self._index_to_int(index)] = value
except IndexError:
self._index_error(list_, index)
def remove_values_from_list(self, list_, *values):
"""Removes all occurences of given `values` from `list`.
It is not an error is a value does not exist in the list at all.
Example:
| Remove Values From List | ${L4} | a | c | e | f |
=>
- ${L4} = ['b', 'd']
"""
for value in values:
while value in list_:
list_.remove(value)
def remove_from_list(self, list_, index):
"""Removes and returns the value specified with an `index` from `list`.
Index '0' means the first position, '1' the second and so on.
Similarly, '-1' is the last position, '-2' the second last, and so on.
Using an index that does not exist on the list causes an error.
The index can be either an integer or a string that can be converted
to an integer.
Example:
| ${x} = | Remove From List | ${L2} | 0 |
=>
- ${x} = 'a'
- ${L2} = ['b']
"""
try:
return list_.pop(self._index_to_int(index))
except IndexError:
self._index_error(list_, index)
def remove_duplicates(self, list_):
"""Returns a list without duplicates based on the given `list`.
Creates and returns a new list that contains all items in the given
list so that one item can appear only once. Order of the items in
the new list is the same as in the original except for missing
duplicates. Number of the removed duplicates is logged.
New in Robot Framework 2.7.5.
"""
ret = []
for item in list_:
if item not in ret:
ret.append(item)
removed = len(list_) - len(ret)
logger.info('%d duplicate%s removed.' % (removed, plural_or_not(removed)))
return ret
def get_from_list(self, list_, index):
"""Returns the value specified with an `index` from `list`.
The given list is never altered by this keyword.
Index '0' means the first position, '1' the second, and so on.
Similarly, '-1' is the last position, '-2' the second last, and so on.
Using an index that does not exist on the list causes an error.
The index can be either an integer or a string that can be converted
to an integer.
Examples (including Python equivalents in comments):
| ${x} = | Get From List | ${L5} | 0 | # L5[0] |
| ${y} = | Get From List | ${L5} | -2 | # L5[-2] |
=>
- ${x} = 'a'
- ${y} = 'd'
- ${L5} is not changed
"""
try:
return list_[self._index_to_int(index)]
except IndexError:
self._index_error(list_, index)
def get_slice_from_list(self, list_, start=0, end=None):
"""Returns a slice of the given list between `start` and `end` indexes.
The given list is never altered by this keyword.
If both `start` and `end` are given, a sublist containing values from
`start` to `end` is returned. This is the same as 'list[start:end]' in
Python. To get all items from the beginning, use 0 as the start value,
and to get all items until the end, use 'None' as the end value. 'None'
is also a default value, so in this case, it is enough to give only
`start`. If only `end` is given, `start` gets the value 0.
Using `start` or `end` not found on the list is the same as using the
largest (or smallest) available index.
Examples (incl. Python equivelants in comments):
| ${x} = | Get Slice From List | ${L5} | 2 | 4 | # L5[2:4] |
| ${y} = | Get Slice From List | ${L5} | 1 | | # L5[1:None] |
| ${z} = | Get Slice From List | ${L5} | | -2 | # L5[0:-2] |
=>
- ${x} = ['c', 'd']
- ${y} = ['b', 'c', 'd', 'e']
- ${z} = ['a', 'b', 'c']
- ${L5} is not changed
"""
start = self._index_to_int(start, True)
if end is not None:
end = self._index_to_int(end)
return list_[start:end]
def count_values_in_list(self, list_, value, start=0, end=None):
"""Returns the number of occurrences of the given `value` in `list`.
The search can be narrowed to the selected sublist by the `start` and
`end` indexes having the same semantics as in the `Get Slice From List`
keyword. The given list is never altered by this keyword.
Example:
| ${x} = | Count Values In List | ${L3} | b |
=>
- ${x} = 1
- ${L3} is not changed
"""
return self.get_slice_from_list(list_, start, end).count(value)
def get_index_from_list(self, list_, value, start=0, end=None):
"""Returns the index of the first occurrence of the `value` on the list.
The search can be narrowed to the selected sublist by the `start` and
`end` indexes having the same semantics as in the `Get Slice From List`
keyword. In case the value is not found, -1 is returned. The given list
is never altered by this keyword.
Example:
| ${x} = | Get Index From List | ${L5} | d |
=>
- ${x} = 3
- ${L5} is not changed
"""
if start == '':
start = 0
list_ = self.get_slice_from_list(list_, start, end)
try:
return int(start) + list_.index(value)
except ValueError:
return -1
def copy_list(self, list_):
"""Returns a copy of the given list.
The given list is never altered by this keyword.
"""
return list_[:]
def reverse_list(self, list_):
"""Reverses the given list in place.
Note that the given list is changed and nothing is returned. Use
`Copy List` first, if you need to keep also the original order.
| Reverse List | ${L3} |
=>
- ${L3} = ['c', 'b', 'a']
"""
list_.reverse()
def sort_list(self, list_):
"""Sorts the given list in place.
The strings are sorted alphabetically and the numbers numerically.
Note that the given list is changed and nothing is returned. Use
`Copy List` first, if you need to keep also the original order.
${L} = [2,1,'a','c','b']
| Sort List | ${L} |
=>
- ${L} = [1, 2, 'a', 'b', 'c']
"""
list_.sort()
def list_should_contain_value(self, list_, value, msg=None):
"""Fails if the `value` is not found from `list`.
If `msg` is not given, the default error message "[ a | b | c ] does
not contain the value 'x'" is shown in case of a failure. Otherwise,
the given `msg` is used in case of a failure.
"""
default = "%s does not contain value '%s'." % (seq2str2(list_), value)
_verify_condition(value in list_, default, msg)
def list_should_not_contain_value(self, list_, value, msg=None):
"""Fails if the `value` is not found from `list`.
See `List Should Contain Value` for an explanation of `msg`.
"""
default = "%s contains value '%s'." % (seq2str2(list_), value)
_verify_condition(value not in list_, default, msg)
def list_should_not_contain_duplicates(self, list_, msg=None):
"""Fails if any element in the `list` is found from it more than once.
The default error message lists all the elements that were found
from the `list` multiple times, but it can be overridden by giving
a custom `msg`. All multiple times found items and their counts are
also logged.
This keyword works with all iterables that can be converted to a list.
The original iterable is never altered.
"""
if not isinstance(list_, list):
list_ = list(list_)
dupes = []
for item in list_:
if item not in dupes:
count = list_.count(item)
if count > 1:
logger.info("'%s' found %d times." % (item, count))
dupes.append(item)
if dupes:
raise AssertionError(msg or
'%s found multiple times.' % seq2str(dupes))
def lists_should_be_equal(self, list1, list2, msg=None, values=True,
names=None):
"""Fails if given lists are unequal.
The keyword first verifies that the lists have equal lengths, and then
it checks are all their values equal. Possible differences between the
values are listed in the default error message like `Index 4: ABC !=
Abc`.
The error message can be configured using `msg` and `values` arguments:
- If `msg` is not given, the default error message is used.
- If `msg` is given and `values` is either Boolean False or a string
'False' or 'No Values', the error message is simply `msg`.
- Otherwise the error message is `msg` + 'new line' + default.
Optional `names` argument (new in 2.6) can be used for naming
the indices shown in the default error message. It can either
be a list of names matching the indices in the lists or a
dictionary where keys are indices that need to be named. It is
not necessary to name all of the indices. When using a
dictionary, keys can be either integers or strings that can be
converted to integers.
Examples:
| ${names} = | Create List | First Name | Family Name | Email |
| Lists Should Be Equal | ${people1} | ${people2} | names=${names} |
| ${names} = | Create Dictionary | 0 | First Name | 2 | Email |
| Lists Should Be Equal | ${people1} | ${people2} | names=${names} |
If the items in index 2 would differ in the above examples, the error
message would contain a row like `Index 2 (email): [email protected] !=
[email protected]`.
"""
len1 = len(list1)
len2 = len(list2)
default = 'Lengths are different: %d != %d' % (len1, len2)
_verify_condition(len1 == len2, default, msg, values)
names = self._get_list_index_name_mapping(names, len1)
diffs = list(self._yield_list_diffs(list1, list2, names))
default = 'Lists are different:\n' + '\n'.join(diffs)
_verify_condition(diffs == [], default, msg, values)
def _get_list_index_name_mapping(self, names, list_length):
if not names:
return {}
if isinstance(names, dict):
return dict((int(index), names[index]) for index in names)
return dict(zip(range(list_length), names))
def _yield_list_diffs(self, list1, list2, names):
for index, (item1, item2) in enumerate(zip(list1, list2)):
name = ' (%s)' % names[index] if index in names else ''
try:
assert_equals(item1, item2, msg='Index %d%s' % (index, name))
except AssertionError, err:
yield unic(err)
def list_should_contain_sub_list(self, list1, list2, msg=None, values=True):
"""Fails if not all of the elements in `list2` are found in `list1`.
The order of values and the number of values are not taken into
account.
See the use of `msg` and `values` from the `Lists Should Be Equal`
keyword.
"""
diffs = ', '.join(unic(item) for item in list2 if item not in list1)
default = 'Following values were not found from first list: ' + diffs
_verify_condition(not diffs, default, msg, values)
def log_list(self, list_, level='INFO'):
"""Logs the length and contents of the `list` using given `level`.
Valid levels are TRACE, DEBUG, INFO (default), and WARN.
If you only want to the length, use keyword `Get Length` from
the BuiltIn library.
"""
logger.write('\n'.join(self._log_list(list_)), level)
def _log_list(self, list_):
if not list_:
yield 'List is empty.'
elif len(list_) == 1:
yield 'List has one item:\n%s' % list_[0]
else:
yield 'List length is %d and it contains following items:' % len(list_)
for index, item in enumerate(list_):
yield '%s: %s' % (index, item)
def _index_to_int(self, index, empty_to_zero=False):
if empty_to_zero and not index:
return 0
try:
return int(index)
except ValueError:
raise ValueError("Cannot convert index '%s' to an integer." % index)
def _index_error(self, list_, index):
raise IndexError('Given index %s is out of the range 0-%d.'
% (index, len(list_)-1))
class _Dictionary:
def create_dictionary(self, *key_value_pairs, **items):
"""Creates and returns a dictionary based on given items.
Giving items as `key_value_pairs` means giving keys and values
as separate arguments:
| ${x} = | Create Dictionary | name | value | | |
| ${y} = | Create Dictionary | a | 1 | b | ${2} |
=>
- ${x} = {'name': 'value'}
- ${y} = {'a': '1', 'b': 2}
Starting from Robot Framework 2.8.1, items can also be given as kwargs:
| ${x} = | Create Dictionary | name=value | |
| ${y} = | Create Dictionary | a=1 | b=${2} |
The latter syntax is typically more convenient to use, but it has
a limitation that keys must be strings.
"""
if len(key_value_pairs) % 2 != 0:
raise ValueError("Creating a dictionary failed. There should be "
"even number of key-value-pairs.")
return self.set_to_dictionary({}, *key_value_pairs, **items)
def set_to_dictionary(self, dictionary, *key_value_pairs, **items):
"""Adds the given `key_value_pairs` and `items`to the `dictionary`.
See `Create Dictionary` for information about giving items.
Example:
| Set To Dictionary | ${D1} | key | value |
=>
- ${D1} = {'a': 1, 'key': 'value'}
"""
if len(key_value_pairs) % 2 != 0:
raise ValueError("Adding data to a dictionary failed. There "
"should be even number of key-value-pairs.")
for i in range(0, len(key_value_pairs), 2):
dictionary[key_value_pairs[i]] = key_value_pairs[i+1]
dictionary.update(items)
return dictionary
def remove_from_dictionary(self, dictionary, *keys):
"""Removes the given `keys` from the `dictionary`.
If the given `key` cannot be found from the `dictionary`, it
is ignored.
Example:
| Remove From Dictionary | ${D3} | b | x | y |
=>
- ${D3} = {'a': 1, 'c': 3}
"""
for key in keys:
if key in dictionary:
value = dictionary.pop(key)
logger.info("Removed item with key '%s' and value '%s'." % (key, value))
else:
logger.info("Key '%s' not found." % key)
def keep_in_dictionary(self, dictionary, *keys):
"""Keeps the given `keys` in the `dictionary` and removes all other.
If the given `key` cannot be found from the `dictionary`, it
is ignored.
Example:
| Keep In Dictionary | ${D5} | b | x | d |
=>
- ${D5} = {'b': 2, 'd': 4}
"""
remove_keys = [k for k in dictionary if k not in keys]
self.remove_from_dictionary(dictionary, *remove_keys)
def copy_dictionary(self, dictionary):
"""Returns a copy of the given dictionary.
The given dictionary is never altered by this keyword.
"""
return dictionary.copy()
def get_dictionary_keys(self, dictionary):
"""Returns `keys` of the given `dictionary`.
`Keys` are returned in sorted order. The given `dictionary` is never
altered by this keyword.
Example:
| ${keys} = | Get Dictionary Keys | ${D3} |
=>
- ${keys} = ['a', 'b', 'c']
"""
return sorted(dictionary)
def get_dictionary_values(self, dictionary):
"""Returns values of the given dictionary.
Values are returned sorted according to keys. The given dictionary is
never altered by this keyword.
Example:
| ${values} = | Get Dictionary Values | ${D3} |
=>
- ${values} = [1, 2, 3]
"""
return [dictionary[k] for k in self.get_dictionary_keys(dictionary)]
def get_dictionary_items(self, dictionary):
"""Returns items of the given `dictionary`.
Items are returned sorted by keys. The given `dictionary` is not
altered by this keyword.
Example:
| ${items} = | Get Dictionary Items | ${D3} |
=>
- ${items} = ['a', 1, 'b', 2, 'c', 3]
"""
ret = []
for key in self.get_dictionary_keys(dictionary):
ret.extend((key, dictionary[key]))
return ret
def get_from_dictionary(self, dictionary, key):
"""Returns a value from the given `dictionary` based on the given `key`.
If the given `key` cannot be found from the `dictionary`, this keyword
fails.
The given dictionary is never altered by this keyword.
Example:
| ${value} = | Get From Dictionary | ${D3} | b |
=>
- ${value} = 2
"""
try:
return dictionary[key]
except KeyError:
raise RuntimeError("Dictionary does not contain key '%s'." % key)
def dictionary_should_contain_key(self, dictionary, key, msg=None):
"""Fails if `key` is not found from `dictionary`.
See `List Should Contain Value` for an explanation of `msg`.
The given dictionary is never altered by this keyword.
"""
default = "Dictionary does not contain key '%s'." % key
_verify_condition(key in dictionary, default, msg)
def dictionary_should_not_contain_key(self, dictionary, key, msg=None):
"""Fails if `key` is found from `dictionary`.
See `List Should Contain Value` for an explanation of `msg`.
The given dictionary is never altered by this keyword.
"""
default = "Dictionary contains key '%s'." % key
_verify_condition(key not in dictionary, default, msg)
def dictionary_should_contain_item(self, dictionary, key, value, msg=None):
"""An item of `key`/`value` must be found in a `dictionary`.
Value is converted to unicode for comparison.
See `Lists Should Be Equal` for an explanation of `msg`.
The given dictionary is never altered by this keyword.
"""
self.dictionary_should_contain_key(dictionary, key, msg)
actual, expected = unicode(dictionary[key]), unicode(value)
default = "Value of dictionary key '%s' does not match: %s != %s" % (key, actual, expected)
_verify_condition(actual == expected, default, msg)
def dictionary_should_contain_value(self, dictionary, value, msg=None):
"""Fails if `value` is not found from `dictionary`.
See `List Should Contain Value` for an explanation of `msg`.
The given dictionary is never altered by this keyword.
"""
default = "Dictionary does not contain value '%s'." % value
_verify_condition(value in dictionary.values(), default, msg)
def dictionary_should_not_contain_value(self, dictionary, value, msg=None):
"""Fails if `value` is found from `dictionary`.
See `List Should Contain Value` for an explanation of `msg`.
The given dictionary is never altered by this keyword.
"""
default = "Dictionary contains value '%s'." % value
_verify_condition(not value in dictionary.values(), default, msg)
def dictionaries_should_be_equal(self, dict1, dict2, msg=None, values=True):
"""Fails if the given dictionaries are not equal.
First the equality of dictionaries' keys is checked and after that all
the key value pairs. If there are differences between the values, those
are listed in the error message.
See `Lists Should Be Equal` for an explanation of `msg`.
The given dictionaries are never altered by this keyword.
"""
keys = self._keys_should_be_equal(dict1, dict2, msg, values)
self._key_values_should_be_equal(keys, dict1, dict2, msg, values)
def dictionary_should_contain_sub_dictionary(self, dict1, dict2, msg=None,
values=True):
"""Fails unless all items in `dict2` are found from `dict1`.
See `Lists Should Be Equal` for an explanation of `msg`.
The given dictionaries are never altered by this keyword.
"""
keys = self.get_dictionary_keys(dict2)
diffs = [unic(k) for k in keys if k not in dict1]
default = "Following keys missing from first dictionary: %s" \
% ', '.join(diffs)
_verify_condition(not diffs, default, msg, values)
self._key_values_should_be_equal(keys, dict1, dict2, msg, values)
def log_dictionary(self, dictionary, level='INFO'):
"""Logs the size and contents of the `dictionary` using given `level`.
Valid levels are TRACE, DEBUG, INFO (default), and WARN.
If you only want to log the size, use keyword `Get Length` from
the BuiltIn library.
"""
logger.write('\n'.join(self._log_dictionary(dictionary)), level)
def _log_dictionary(self, dictionary):
if not dictionary:
yield 'Dictionary is empty.'
elif len(dictionary) == 1:
yield 'Dictionary has one item:'
else:
yield 'Dictionary size is %d and it contains following items:' % len(dictionary)
for key in self.get_dictionary_keys(dictionary):
yield '%s: %s' % (key, dictionary[key])
def _keys_should_be_equal(self, dict1, dict2, msg, values):
keys1 = self.get_dictionary_keys(dict1)
keys2 = self.get_dictionary_keys(dict2)
miss1 = [unic(k) for k in keys2 if k not in dict1]
miss2 = [unic(k) for k in keys1 if k not in dict2]
error = []
if miss1:
error += ['Following keys missing from first dictionary: %s'
% ', '.join(miss1)]
if miss2:
error += ['Following keys missing from second dictionary: %s'
% ', '.join(miss2)]
_verify_condition(not error, '\n'.join(error), msg, values)
return keys1
def _key_values_should_be_equal(self, keys, dict1, dict2, msg, values):
diffs = list(self._yield_dict_diffs(keys, dict1, dict2))
default = 'Following keys have different values:\n' + '\n'.join(diffs)
_verify_condition(not diffs, default, msg, values)
def _yield_dict_diffs(self, keys, dict1, dict2):
for key in keys:
try:
assert_equals(dict1[key], dict2[key], msg='Key %s' % (key,))
except AssertionError, err:
yield unic(err)
class Collections(_List, _Dictionary):
"""A test library providing keywords for handling lists and dictionaries.
`Collections` is Robot Framework's standard library that provides a
set of keywords for handling Python lists and dictionaries. This
library has keywords, for example, for modifying and getting
values from lists and dictionaries (e.g. `Append To List`, `Get
From Dictionary`) and for verifying their contents (e.g. `Lists
Should Be Equal`, `Dictionary Should Contain Value`).
Following keywords from the BuiltIn library can also be used with
lists and dictionaries:
| *Keyword Name* | *Applicable With* |
| `Create List` | lists |
| `Get Length` | both |
| `Length Should Be` | both |
| `Should Be Empty` | both |
| `Should Not Be Empty` | both |
| `Should Contain` | lists |
| `Should Not Contain` | lists |
| `Should Contain X Times` | lists |
| `Should Not Contain X Times` | lists |
| `Get Count` | lists |
All list keywords expect a scalar variable (e.g. ${list}) as an
argument. It is, however, possible to use list variables
(e.g. @{list}) as scalars simply by replacing '@' with '$'.
List keywords that do not alter the given list can also be used
with tuples, and to some extend also with other iterables.
`Convert To List` can be used to convert tuples and other iterables
to lists.
-------
List related keywords use variables in format ${Lx} in their examples,
which means a list with as many alphabetic characters as specified by 'x'.
For example ${L1} means ['a'] and ${L3} means ['a', 'b', 'c'].
Dictionary keywords use similar ${Dx} variables. For example ${D1} means
{'a': 1} and ${D3} means {'a': 1, 'b': 2, 'c': 3}.
--------
"""
ROBOT_LIBRARY_SCOPE = 'GLOBAL'
ROBOT_LIBRARY_VERSION = get_version()
def _verify_condition(condition, default_msg, given_msg, include_default=False):
if not condition:
if not given_msg:
raise AssertionError(default_msg)
if _include_default_message(include_default):
raise AssertionError(given_msg + '\n' + default_msg)
raise AssertionError(given_msg)
def _include_default_message(include):
if isinstance(include, basestring):
return include.lower() not in ['no values', 'false']
return bool(include)
| apache-2.0 | -8,622,461,936,391,606,000 | 1,884,591,076,693,572,000 | 37.881423 | 99 | 0.577107 | false |
edxnercel/edx-platform | common/djangoapps/microsite_configuration/tests/test_microsites.py | 187 | 1186 | # -*- coding: utf-8 -*-
"""
Tests microsite_configuration templatetags and helper functions.
"""
from django.test import TestCase
from django.conf import settings
from microsite_configuration.templatetags import microsite
class MicroSiteTests(TestCase):
"""
Make sure some of the helper functions work
"""
def test_breadcrumbs(self):
crumbs = ['my', 'less specific', 'Page']
expected = u'my | less specific | Page | edX'
title = microsite.page_title_breadcrumbs(*crumbs)
self.assertEqual(expected, title)
def test_unicode_title(self):
crumbs = [u'øo', u'π tastes gréât', u'驴']
expected = u'øo | π tastes gréât | 驴 | edX'
title = microsite.page_title_breadcrumbs(*crumbs)
self.assertEqual(expected, title)
def test_platform_name(self):
pname = microsite.platform_name()
self.assertEqual(pname, settings.PLATFORM_NAME)
def test_breadcrumb_tag(self):
crumbs = ['my', 'less specific', 'Page']
expected = u'my | less specific | Page | edX'
title = microsite.page_title_breadcrumbs_tag(None, *crumbs)
self.assertEqual(expected, title)
| agpl-3.0 | 6,288,337,452,355,160,000 | -2,544,713,010,191,069,700 | 33.529412 | 67 | 0.653322 | false |
ludojmj/treelud | server/paramiko/sftp_client.py | 1 | 32863 | # Copyright (C) 2003-2007 Robey Pointer <[email protected]>
#
# This file is part of Paramiko.
#
# Paramiko 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 the License, or (at your option)
# any later version.
#
# Paramiko is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Paramiko; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
from binascii import hexlify
import errno
import os
import stat
import threading
import time
import weakref
from paramiko import util
from paramiko.channel import Channel
from paramiko.message import Message
from paramiko.common import INFO, DEBUG, o777
from paramiko.py3compat import bytestring, b, u, long, string_types, bytes_types
from paramiko.sftp import BaseSFTP, CMD_OPENDIR, CMD_HANDLE, SFTPError, CMD_READDIR, \
CMD_NAME, CMD_CLOSE, SFTP_FLAG_READ, SFTP_FLAG_WRITE, SFTP_FLAG_CREATE, \
SFTP_FLAG_TRUNC, SFTP_FLAG_APPEND, SFTP_FLAG_EXCL, CMD_OPEN, CMD_REMOVE, \
CMD_RENAME, CMD_MKDIR, CMD_RMDIR, CMD_STAT, CMD_ATTRS, CMD_LSTAT, \
CMD_SYMLINK, CMD_SETSTAT, CMD_READLINK, CMD_REALPATH, CMD_STATUS, SFTP_OK, \
SFTP_EOF, SFTP_NO_SUCH_FILE, SFTP_PERMISSION_DENIED
from paramiko.sftp_attr import SFTPAttributes
from paramiko.ssh_exception import SSHException
from paramiko.sftp_file import SFTPFile
from paramiko.util import ClosingContextManager
def _to_unicode(s):
"""
decode a string as ascii or utf8 if possible (as required by the sftp
protocol). if neither works, just return a byte string because the server
probably doesn't know the filename's encoding.
"""
try:
return s.encode('ascii')
except (UnicodeError, AttributeError):
try:
return s.decode('utf-8')
except UnicodeError:
return s
b_slash = b'/'
class SFTPClient(BaseSFTP, ClosingContextManager):
"""
SFTP client object.
Used to open an SFTP session across an open SSH `.Transport` and perform
remote file operations.
Instances of this class may be used as context managers.
"""
def __init__(self, sock):
"""
Create an SFTP client from an existing `.Channel`. The channel
should already have requested the ``"sftp"`` subsystem.
An alternate way to create an SFTP client context is by using
`from_transport`.
:param .Channel sock: an open `.Channel` using the ``"sftp"`` subsystem
:raises SSHException: if there's an exception while negotiating
sftp
"""
BaseSFTP.__init__(self)
self.sock = sock
self.ultra_debug = False
self.request_number = 1
# lock for request_number
self._lock = threading.Lock()
self._cwd = None
# request # -> SFTPFile
self._expecting = weakref.WeakValueDictionary()
if type(sock) is Channel:
# override default logger
transport = self.sock.get_transport()
self.logger = util.get_logger(transport.get_log_channel() + '.sftp')
self.ultra_debug = transport.get_hexdump()
try:
server_version = self._send_version()
except EOFError:
raise SSHException('EOF during negotiation')
self._log(INFO, 'Opened sftp connection (server version %d)' % server_version)
def from_transport(cls, t, window_size=None, max_packet_size=None):
"""
Create an SFTP client channel from an open `.Transport`.
Setting the window and packet sizes might affect the transfer speed.
The default settings in the `.Transport` class are the same as in
OpenSSH and should work adequately for both files transfers and
interactive sessions.
:param .Transport t: an open `.Transport` which is already authenticated
:param int window_size:
optional window size for the `.SFTPClient` session.
:param int max_packet_size:
optional max packet size for the `.SFTPClient` session..
:return:
a new `.SFTPClient` object, referring to an sftp session (channel)
across the transport
.. versionchanged:: 1.15
Added the ``window_size`` and ``max_packet_size`` arguments.
"""
chan = t.open_session(window_size=window_size,
max_packet_size=max_packet_size)
if chan is None:
return None
chan.invoke_subsystem('sftp')
return cls(chan)
from_transport = classmethod(from_transport)
def _log(self, level, msg, *args):
if isinstance(msg, list):
for m in msg:
self._log(level, m, *args)
else:
# escape '%' in msg (they could come from file or directory names) before logging
msg = msg.replace('%','%%')
super(SFTPClient, self)._log(level, "[chan %s] " + msg, *([self.sock.get_name()] + list(args)))
def close(self):
"""
Close the SFTP session and its underlying channel.
.. versionadded:: 1.4
"""
self._log(INFO, 'sftp session closed.')
self.sock.close()
def get_channel(self):
"""
Return the underlying `.Channel` object for this SFTP session. This
might be useful for doing things like setting a timeout on the channel.
.. versionadded:: 1.7.1
"""
return self.sock
def listdir(self, path='.'):
"""
Return a list containing the names of the entries in the given ``path``.
The list is in arbitrary order. It does not include the special
entries ``'.'`` and ``'..'`` even if they are present in the folder.
This method is meant to mirror ``os.listdir`` as closely as possible.
For a list of full `.SFTPAttributes` objects, see `listdir_attr`.
:param str path: path to list (defaults to ``'.'``)
"""
return [f.filename for f in self.listdir_attr(path)]
def listdir_attr(self, path='.'):
"""
Return a list containing `.SFTPAttributes` objects corresponding to
files in the given ``path``. The list is in arbitrary order. It does
not include the special entries ``'.'`` and ``'..'`` even if they are
present in the folder.
The returned `.SFTPAttributes` objects will each have an additional
field: ``longname``, which may contain a formatted string of the file's
attributes, in unix format. The content of this string will probably
depend on the SFTP server implementation.
:param str path: path to list (defaults to ``'.'``)
:return: list of `.SFTPAttributes` objects
.. versionadded:: 1.2
"""
path = self._adjust_cwd(path)
self._log(DEBUG, 'listdir(%r)' % path)
t, msg = self._request(CMD_OPENDIR, path)
if t != CMD_HANDLE:
raise SFTPError('Expected handle')
handle = msg.get_binary()
filelist = []
while True:
try:
t, msg = self._request(CMD_READDIR, handle)
except EOFError:
# done with handle
break
if t != CMD_NAME:
raise SFTPError('Expected name response')
count = msg.get_int()
for i in range(count):
filename = msg.get_text()
longname = msg.get_text()
attr = SFTPAttributes._from_msg(msg, filename, longname)
if (filename != '.') and (filename != '..'):
filelist.append(attr)
self._request(CMD_CLOSE, handle)
return filelist
def listdir_iter(self, path='.', read_aheads=50):
"""
Generator version of `.listdir_attr`.
See the API docs for `.listdir_attr` for overall details.
This function adds one more kwarg on top of `.listdir_attr`:
``read_aheads``, an integer controlling how many
``SSH_FXP_READDIR`` requests are made to the server. The default of 50
should suffice for most file listings as each request/response cycle
may contain multiple files (dependant on server implementation.)
.. versionadded:: 1.15
"""
path = self._adjust_cwd(path)
self._log(DEBUG, 'listdir(%r)' % path)
t, msg = self._request(CMD_OPENDIR, path)
if t != CMD_HANDLE:
raise SFTPError('Expected handle')
handle = msg.get_string()
nums = list()
while True:
try:
# Send out a bunch of readdir requests so that we can read the
# responses later on Section 6.7 of the SSH file transfer RFC
# explains this
# http://filezilla-project.org/specs/draft-ietf-secsh-filexfer-02.txt
for i in range(read_aheads):
num = self._async_request(type(None), CMD_READDIR, handle)
nums.append(num)
# For each of our sent requests
# Read and parse the corresponding packets
# If we're at the end of our queued requests, then fire off
# some more requests
# Exit the loop when we've reached the end of the directory
# handle
for num in nums:
t, pkt_data = self._read_packet()
msg = Message(pkt_data)
new_num = msg.get_int()
if num == new_num:
if t == CMD_STATUS:
self._convert_status(msg)
count = msg.get_int()
for i in range(count):
filename = msg.get_text()
longname = msg.get_text()
attr = SFTPAttributes._from_msg(
msg, filename, longname)
if (filename != '.') and (filename != '..'):
yield attr
# If we've hit the end of our queued requests, reset nums.
nums = list()
except EOFError:
self._request(CMD_CLOSE, handle)
return
def open(self, filename, mode='r', bufsize=-1):
"""
Open a file on the remote server. The arguments are the same as for
Python's built-in `python:file` (aka `python:open`). A file-like
object is returned, which closely mimics the behavior of a normal
Python file object, including the ability to be used as a context
manager.
The mode indicates how the file is to be opened: ``'r'`` for reading,
``'w'`` for writing (truncating an existing file), ``'a'`` for
appending, ``'r+'`` for reading/writing, ``'w+'`` for reading/writing
(truncating an existing file), ``'a+'`` for reading/appending. The
Python ``'b'`` flag is ignored, since SSH treats all files as binary.
The ``'U'`` flag is supported in a compatible way.
Since 1.5.2, an ``'x'`` flag indicates that the operation should only
succeed if the file was created and did not previously exist. This has
no direct mapping to Python's file flags, but is commonly known as the
``O_EXCL`` flag in posix.
The file will be buffered in standard Python style by default, but
can be altered with the ``bufsize`` parameter. ``0`` turns off
buffering, ``1`` uses line buffering, and any number greater than 1
(``>1``) uses that specific buffer size.
:param str filename: name of the file to open
:param str mode: mode (Python-style) to open in
:param int bufsize: desired buffering (-1 = default buffer size)
:return: an `.SFTPFile` object representing the open file
:raises IOError: if the file could not be opened.
"""
filename = self._adjust_cwd(filename)
self._log(DEBUG, 'open(%r, %r)' % (filename, mode))
imode = 0
if ('r' in mode) or ('+' in mode):
imode |= SFTP_FLAG_READ
if ('w' in mode) or ('+' in mode) or ('a' in mode):
imode |= SFTP_FLAG_WRITE
if 'w' in mode:
imode |= SFTP_FLAG_CREATE | SFTP_FLAG_TRUNC
if 'a' in mode:
imode |= SFTP_FLAG_CREATE | SFTP_FLAG_APPEND
if 'x' in mode:
imode |= SFTP_FLAG_CREATE | SFTP_FLAG_EXCL
attrblock = SFTPAttributes()
t, msg = self._request(CMD_OPEN, filename, imode, attrblock)
if t != CMD_HANDLE:
raise SFTPError('Expected handle')
handle = msg.get_binary()
self._log(DEBUG, 'open(%r, %r) -> %s' % (filename, mode, hexlify(handle)))
return SFTPFile(self, handle, mode, bufsize)
# Python continues to vacillate about "open" vs "file"...
file = open
def remove(self, path):
"""
Remove the file at the given path. This only works on files; for
removing folders (directories), use `rmdir`.
:param str path: path (absolute or relative) of the file to remove
:raises IOError: if the path refers to a folder (directory)
"""
path = self._adjust_cwd(path)
self._log(DEBUG, 'remove(%r)' % path)
self._request(CMD_REMOVE, path)
unlink = remove
def rename(self, oldpath, newpath):
"""
Rename a file or folder from ``oldpath`` to ``newpath``.
:param str oldpath: existing name of the file or folder
:param str newpath: new name for the file or folder
:raises IOError: if ``newpath`` is a folder, or something else goes
wrong
"""
oldpath = self._adjust_cwd(oldpath)
newpath = self._adjust_cwd(newpath)
self._log(DEBUG, 'rename(%r, %r)' % (oldpath, newpath))
self._request(CMD_RENAME, oldpath, newpath)
def mkdir(self, path, mode=o777):
"""
Create a folder (directory) named ``path`` with numeric mode ``mode``.
The default mode is 0777 (octal). On some systems, mode is ignored.
Where it is used, the current umask value is first masked out.
:param str path: name of the folder to create
:param int mode: permissions (posix-style) for the newly-created folder
"""
path = self._adjust_cwd(path)
self._log(DEBUG, 'mkdir(%r, %r)' % (path, mode))
attr = SFTPAttributes()
attr.st_mode = mode
self._request(CMD_MKDIR, path, attr)
def rmdir(self, path):
"""
Remove the folder named ``path``.
:param str path: name of the folder to remove
"""
path = self._adjust_cwd(path)
self._log(DEBUG, 'rmdir(%r)' % path)
self._request(CMD_RMDIR, path)
def stat(self, path):
"""
Retrieve information about a file on the remote system. The return
value is an object whose attributes correspond to the attributes of
Python's ``stat`` structure as returned by ``os.stat``, except that it
contains fewer fields. An SFTP server may return as much or as little
info as it wants, so the results may vary from server to server.
Unlike a Python `python:stat` object, the result may not be accessed as
a tuple. This is mostly due to the author's slack factor.
The fields supported are: ``st_mode``, ``st_size``, ``st_uid``,
``st_gid``, ``st_atime``, and ``st_mtime``.
:param str path: the filename to stat
:return:
an `.SFTPAttributes` object containing attributes about the given
file
"""
path = self._adjust_cwd(path)
self._log(DEBUG, 'stat(%r)' % path)
t, msg = self._request(CMD_STAT, path)
if t != CMD_ATTRS:
raise SFTPError('Expected attributes')
return SFTPAttributes._from_msg(msg)
def lstat(self, path):
"""
Retrieve information about a file on the remote system, without
following symbolic links (shortcuts). This otherwise behaves exactly
the same as `stat`.
:param str path: the filename to stat
:return:
an `.SFTPAttributes` object containing attributes about the given
file
"""
path = self._adjust_cwd(path)
self._log(DEBUG, 'lstat(%r)' % path)
t, msg = self._request(CMD_LSTAT, path)
if t != CMD_ATTRS:
raise SFTPError('Expected attributes')
return SFTPAttributes._from_msg(msg)
def symlink(self, source, dest):
"""
Create a symbolic link (shortcut) of the ``source`` path at
``destination``.
:param str source: path of the original file
:param str dest: path of the newly created symlink
"""
dest = self._adjust_cwd(dest)
self._log(DEBUG, 'symlink(%r, %r)' % (source, dest))
source = bytestring(source)
self._request(CMD_SYMLINK, source, dest)
def chmod(self, path, mode):
"""
Change the mode (permissions) of a file. The permissions are
unix-style and identical to those used by Python's `os.chmod`
function.
:param str path: path of the file to change the permissions of
:param int mode: new permissions
"""
path = self._adjust_cwd(path)
self._log(DEBUG, 'chmod(%r, %r)' % (path, mode))
attr = SFTPAttributes()
attr.st_mode = mode
self._request(CMD_SETSTAT, path, attr)
def chown(self, path, uid, gid):
"""
Change the owner (``uid``) and group (``gid``) of a file. As with
Python's `os.chown` function, you must pass both arguments, so if you
only want to change one, use `stat` first to retrieve the current
owner and group.
:param str path: path of the file to change the owner and group of
:param int uid: new owner's uid
:param int gid: new group id
"""
path = self._adjust_cwd(path)
self._log(DEBUG, 'chown(%r, %r, %r)' % (path, uid, gid))
attr = SFTPAttributes()
attr.st_uid, attr.st_gid = uid, gid
self._request(CMD_SETSTAT, path, attr)
def utime(self, path, times):
"""
Set the access and modified times of the file specified by ``path``. If
``times`` is ``None``, then the file's access and modified times are set
to the current time. Otherwise, ``times`` must be a 2-tuple of numbers,
of the form ``(atime, mtime)``, which is used to set the access and
modified times, respectively. This bizarre API is mimicked from Python
for the sake of consistency -- I apologize.
:param str path: path of the file to modify
:param tuple times:
``None`` or a tuple of (access time, modified time) in standard
internet epoch time (seconds since 01 January 1970 GMT)
"""
path = self._adjust_cwd(path)
if times is None:
times = (time.time(), time.time())
self._log(DEBUG, 'utime(%r, %r)' % (path, times))
attr = SFTPAttributes()
attr.st_atime, attr.st_mtime = times
self._request(CMD_SETSTAT, path, attr)
def truncate(self, path, size):
"""
Change the size of the file specified by ``path``. This usually
extends or shrinks the size of the file, just like the `~file.truncate`
method on Python file objects.
:param str path: path of the file to modify
:param size: the new size of the file
:type size: int or long
"""
path = self._adjust_cwd(path)
self._log(DEBUG, 'truncate(%r, %r)' % (path, size))
attr = SFTPAttributes()
attr.st_size = size
self._request(CMD_SETSTAT, path, attr)
def readlink(self, path):
"""
Return the target of a symbolic link (shortcut). You can use
`symlink` to create these. The result may be either an absolute or
relative pathname.
:param str path: path of the symbolic link file
:return: target path, as a `str`
"""
path = self._adjust_cwd(path)
self._log(DEBUG, 'readlink(%r)' % path)
t, msg = self._request(CMD_READLINK, path)
if t != CMD_NAME:
raise SFTPError('Expected name response')
count = msg.get_int()
if count == 0:
return None
if count != 1:
raise SFTPError('Readlink returned %d results' % count)
return _to_unicode(msg.get_string())
def normalize(self, path):
"""
Return the normalized path (on the server) of a given path. This
can be used to quickly resolve symbolic links or determine what the
server is considering to be the "current folder" (by passing ``'.'``
as ``path``).
:param str path: path to be normalized
:return: normalized form of the given path (as a `str`)
:raises IOError: if the path can't be resolved on the server
"""
path = self._adjust_cwd(path)
self._log(DEBUG, 'normalize(%r)' % path)
t, msg = self._request(CMD_REALPATH, path)
if t != CMD_NAME:
raise SFTPError('Expected name response')
count = msg.get_int()
if count != 1:
raise SFTPError('Realpath returned %d results' % count)
return msg.get_text()
def chdir(self, path=None):
"""
Change the "current directory" of this SFTP session. Since SFTP
doesn't really have the concept of a current working directory, this is
emulated by Paramiko. Once you use this method to set a working
directory, all operations on this `.SFTPClient` object will be relative
to that path. You can pass in ``None`` to stop using a current working
directory.
:param str path: new current working directory
:raises IOError: if the requested path doesn't exist on the server
.. versionadded:: 1.4
"""
if path is None:
self._cwd = None
return
if not stat.S_ISDIR(self.stat(path).st_mode):
raise SFTPError(errno.ENOTDIR, "%s: %s" % (os.strerror(errno.ENOTDIR), path))
self._cwd = b(self.normalize(path))
def getcwd(self):
"""
Return the "current working directory" for this SFTP session, as
emulated by Paramiko. If no directory has been set with `chdir`,
this method will return ``None``.
.. versionadded:: 1.4
"""
return self._cwd and u(self._cwd)
def putfo(self, fl, remotepath, file_size=0, callback=None, confirm=True):
"""
Copy the contents of an open file object (``fl``) to the SFTP server as
``remotepath``. Any exception raised by operations will be passed
through.
The SFTP operations use pipelining for speed.
:param file fl: opened file or file-like object to copy
:param str remotepath: the destination path on the SFTP server
:param int file_size:
optional size parameter passed to callback. If none is specified,
size defaults to 0
:param callable callback:
optional callback function (form: ``func(int, int)``) that accepts
the bytes transferred so far and the total bytes to be transferred
(since 1.7.4)
:param bool confirm:
whether to do a stat() on the file afterwards to confirm the file
size (since 1.7.7)
:return:
an `.SFTPAttributes` object containing attributes about the given
file.
.. versionadded:: 1.10
"""
with self.file(remotepath, 'wb') as fr:
fr.set_pipelined(True)
size = 0
while True:
data = fl.read(32768)
fr.write(data)
size += len(data)
if callback is not None:
callback(size, file_size)
if len(data) == 0:
break
if confirm:
s = self.stat(remotepath)
if s.st_size != size:
raise IOError('size mismatch in put! %d != %d' % (s.st_size, size))
else:
s = SFTPAttributes()
return s
def put(self, localpath, remotepath, callback=None, confirm=True):
"""
Copy a local file (``localpath``) to the SFTP server as ``remotepath``.
Any exception raised by operations will be passed through. This
method is primarily provided as a convenience.
The SFTP operations use pipelining for speed.
:param str localpath: the local file to copy
:param str remotepath: the destination path on the SFTP server. Note
that the filename should be included. Only specifying a directory
may result in an error.
:param callable callback:
optional callback function (form: ``func(int, int)``) that accepts
the bytes transferred so far and the total bytes to be transferred
:param bool confirm:
whether to do a stat() on the file afterwards to confirm the file
size
:return: an `.SFTPAttributes` object containing attributes about the given file
.. versionadded:: 1.4
.. versionchanged:: 1.7.4
``callback`` and rich attribute return value added.
.. versionchanged:: 1.7.7
``confirm`` param added.
"""
file_size = os.stat(localpath).st_size
with open(localpath, 'rb') as fl:
return self.putfo(fl, remotepath, file_size, callback, confirm)
def getfo(self, remotepath, fl, callback=None):
"""
Copy a remote file (``remotepath``) from the SFTP server and write to
an open file or file-like object, ``fl``. Any exception raised by
operations will be passed through. This method is primarily provided
as a convenience.
:param object remotepath: opened file or file-like object to copy to
:param str fl:
the destination path on the local host or open file object
:param callable callback:
optional callback function (form: ``func(int, int)``) that accepts
the bytes transferred so far and the total bytes to be transferred
:return: the `number <int>` of bytes written to the opened file object
.. versionadded:: 1.10
"""
with self.open(remotepath, 'rb') as fr:
file_size = self.stat(remotepath).st_size
fr.prefetch()
size = 0
while True:
data = fr.read(32768)
fl.write(data)
size += len(data)
if callback is not None:
callback(size, file_size)
if len(data) == 0:
break
return size
def get(self, remotepath, localpath, callback=None):
"""
Copy a remote file (``remotepath``) from the SFTP server to the local
host as ``localpath``. Any exception raised by operations will be
passed through. This method is primarily provided as a convenience.
:param str remotepath: the remote file to copy
:param str localpath: the destination path on the local host
:param callable callback:
optional callback function (form: ``func(int, int)``) that accepts
the bytes transferred so far and the total bytes to be transferred
.. versionadded:: 1.4
.. versionchanged:: 1.7.4
Added the ``callback`` param
"""
file_size = self.stat(remotepath).st_size
with open(localpath, 'wb') as fl:
size = self.getfo(remotepath, fl, callback)
s = os.stat(localpath)
if s.st_size != size:
raise IOError('size mismatch in get! %d != %d' % (s.st_size, size))
### internals...
def _request(self, t, *arg):
num = self._async_request(type(None), t, *arg)
return self._read_response(num)
def _async_request(self, fileobj, t, *arg):
# this method may be called from other threads (prefetch)
self._lock.acquire()
try:
msg = Message()
msg.add_int(self.request_number)
for item in arg:
if isinstance(item, long):
msg.add_int64(item)
elif isinstance(item, int):
msg.add_int(item)
elif isinstance(item, (string_types, bytes_types)):
msg.add_string(item)
elif isinstance(item, SFTPAttributes):
item._pack(msg)
else:
raise Exception('unknown type for %r type %r' % (item, type(item)))
num = self.request_number
self._expecting[num] = fileobj
self._send_packet(t, msg)
self.request_number += 1
finally:
self._lock.release()
return num
def _read_response(self, waitfor=None):
while True:
try:
t, data = self._read_packet()
except EOFError as e:
raise SSHException('Server connection dropped: %s' % str(e))
msg = Message(data)
num = msg.get_int()
if num not in self._expecting:
# might be response for a file that was closed before responses came back
self._log(DEBUG, 'Unexpected response #%d' % (num,))
if waitfor is None:
# just doing a single check
break
continue
fileobj = self._expecting[num]
del self._expecting[num]
if num == waitfor:
# synchronous
if t == CMD_STATUS:
self._convert_status(msg)
return t, msg
if fileobj is not type(None):
fileobj._async_response(t, msg, num)
if waitfor is None:
# just doing a single check
break
return None, None
def _finish_responses(self, fileobj):
while fileobj in self._expecting.values():
self._read_response()
fileobj._check_exception()
def _convert_status(self, msg):
"""
Raises EOFError or IOError on error status; otherwise does nothing.
"""
code = msg.get_int()
text = msg.get_text()
if code == SFTP_OK:
return
elif code == SFTP_EOF:
raise EOFError(text)
elif code == SFTP_NO_SUCH_FILE:
# clever idea from john a. meinel: map the error codes to errno
raise IOError(errno.ENOENT, text)
elif code == SFTP_PERMISSION_DENIED:
raise IOError(errno.EACCES, text)
else:
raise IOError(text)
def _adjust_cwd(self, path):
"""
Return an adjusted path if we're emulating a "current working
directory" for the server.
"""
path = b(path)
if self._cwd is None:
return path
if len(path) and path[0:1] == b_slash:
# absolute path
return path
if self._cwd == b_slash:
return self._cwd + path
return self._cwd + b_slash + path
class SFTP(SFTPClient):
"""
An alias for `.SFTPClient` for backwards compatability.
"""
pass
| mit | -7,609,468,367,358,879,000 | -8,149,961,381,981,870,000 | 37.689614 | 107 | 0.564982 | false |
ksmaheshkumar/weevely3 | core/vectors.py | 12 | 9253 | """
The module `core.vectors` defines the following vectors classes.
* `ModuleExec` vector executes a given module with given arguments.
* `PhpCode` vector contains PHP code, executed via `shell_php` module.
* `PhpFile` vector loads PHP code from an external file, and execute it via `shell_php` module.
* `ShellCmd` vector contains a shell command, executed via `shell_sh` module.
"""
from mako.template import Template
from mako.lookup import TemplateLookup
from core.weexceptions import DevException
from core.loggers import log
from core import modules
import utils
from core import messages
import re
import os
import thread
class Os:
"""Represent the operating system vector compatibility.
It is passed as vectors `target` argument.
* `Os.ANY` if the vector is compatible with every operating system
* `Os.NIX` if the vector is compatible only with Unix/Linux enviroinments
* `Os.WIN` if the vector is compatible only with Microsoft Windows enviroinments
"""
ANY = 0
NIX = 1
WIN = 2
class ModuleExec:
"""This vector contains commands to execute other modules.
Args:
module (str): Module name.
arguments (list of str): arguments passed as command line splitted string, e.g. `[ '--optional=o', 'mandatory1, .. ]`.
name (str): This vector name.
target (Os): The operating system supported by the vector.
postprocess (func): The function which postprocess the execution result.
background (bool): Execute in a separate thread on `run()`
"""
def __init__(self, module, arguments, name = '', target = 0, postprocess = None, background = False):
self.name = name if name else utils.strings.randstr()
if isinstance(arguments, list):
self.arguments = arguments
else:
raise DevException(messages.vectors.wrong_payload_type)
if not isinstance(target, int) or not target < 3:
raise DevException(messages.vectors.wrong_target_type)
if not callable(postprocess) and postprocess is not None:
raise DevException(messages.vectors.wrong_postprocessing_type)
self.module = module
self.target = target
self.postprocess = postprocess
self.background = background
def format(self, values):
"""Format the arguments.
This format the vector payloads using Mako template.
Args:
values (dict): The values passed as arguments of Mako
`template.Template(arg[n]).render(**values)`
Returns:
A list of string containing the formatted payloads.
"""
return [ Template(arg).render(**values) for arg in self.arguments ]
def run(self, format_args = {}):
"""Run the module with the formatted payload.
Render the contained payload with mako and pass the result
as argument to the given module. The result is processed by the
`self.postprocess` method.
Args:
format_arg (dict): The dictionary to format the payload with.
Return:
Object. Contains the postprocessed result of the `run_argv`
module execution.
"""
try:
formatted = self.format(format_args)
except TypeError as e:
import traceback; log.debug(traceback.format_exc())
raise DevException(messages.vectors.wrong_arguments_type)
# The background argument is set at vector init in order
# to threadify vectors also if called by VectorList methods.
if self.background:
thread.start_new_thread(modules.loaded[self.module].run_argv, (formatted, ))
result = None
else:
result = modules.loaded[self.module].run_argv(formatted)
if self.postprocess:
result = self.postprocess(result)
return result
def load_result_or_run(self, result_name, format_args = {}):
"""Load a result stored in module session or run the module.
Return the variable stored or run the `self.run` method.
Args:
field (string): The variable name.
format_arg (dict): The dictionary to format the payload with.
Return:
Object. Contains the postprocessed result of the `run_argv`
module execution.
"""
result = modules.loaded[self.module].session[self.module]['results'].get(result_name)
if result: return result
else: return self.run(format_args)
class PhpCode(ModuleExec):
"""This vector contains PHP code.
The PHP code is executed via the module `shell_php`. Inherit `ModuleExec`.
Args:
payload (str): PHP code to execute.
name (str): This vector name.
target (Os): The operating system supported by the vector.
postprocess (func): The function which postprocess the execution result.
arguments (list of str): Additional arguments for `shell_php`
background (bool): Execute in a separate thread on `run()`
"""
def __init__(self, payload, name = None, target = 0, postprocess = None, arguments = [], background = False):
if not isinstance(payload, basestring):
raise DevException(messages.vectors.wrong_payload_type)
ModuleExec.__init__(
self,
module = 'shell_php',
arguments = [ payload ] + arguments,
name = name,
target = target,
postprocess = postprocess,
background = background
)
def format(self, values):
"""Format the payload.
This format the vector payloads using Mako template.
Args:
values (dict): The values passed as arguments of Mako
`template.Template(arg[n]).render(**values)`
Returns:
A list of string containing the formatted payloads.
"""
return [
Template(arg).render(**values)
for arg in self.arguments
]
class PhpFile(PhpCode):
"""This vector contains PHP code imported from a template.
The PHP code in the given template is executed via the module `shell_php`.
Inherit `PhpCode`.
Args:
payload_path (str): Path of the template to execute, usually placed in self.folder.
name (str): This vector name.
target (Os): The operating system supported by the vector.
postprocess (func): The function which postprocess the execution result.
arguments (list of str): Additional arguments for `shell_php`
background (bool): Execute in a separate thread on `run()`
"""
def __init__(self, payload_path, name = None, target = 0, postprocess = None, arguments = [], background = False):
if not isinstance(payload_path, basestring):
raise DevException(messages.vectors.wrong_payload_type)
try:
payload = file(payload_path, 'r').read()
except Exception as e:
raise DevException(messages.generic.error_loading_file_s_s % (payload_path, e))
self.folder, self.name = os.path.split(payload_path)
ModuleExec.__init__(
self,
module = 'shell_php',
arguments = [ payload ] + arguments,
name = name,
target = target,
postprocess = postprocess,
background = background
)
def format(self, values):
"""Format the payload.
This format the vector payloads using Mako template.
Also set a TemplateLookup to the template folder, to allow an easy
`<% include>` tag usage.
Args:
values (dict): The values passed as arguments of Mako
`template.Template(arg[n]).render(**values)`
Returns:
A list of string containing the formatted payloads.
"""
return [
Template(
text = arg,
lookup = TemplateLookup(directories = [ self.folder ])
).render(**values)
for arg in self.arguments
]
class ShellCmd(PhpCode):
"""This vector contains a shell command.
The shell command is executed via the module `shell_sh`. Inherit `ModuleExec`.
Args:
payload (str): Command line to execute.
name (str): This vector name.
target (Os): The operating system supported by the vector.
postprocess (func): The function which postprocess the execution result.
arguments (list of str): Additional arguments for `shell_php`
background (bool): Execute in a separate thread on `run()`
"""
def __init__(self, payload, name = None, target = 0, postprocess = None, arguments = [], background = False):
if not isinstance(payload, basestring):
raise DevException(messages.vectors.wrong_payload_type)
ModuleExec.__init__(
self,
module = 'shell_sh',
arguments = [ payload ] + arguments,
name = name,
target = target,
postprocess = postprocess,
background = background
)
| gpl-3.0 | -798,930,063,945,424,500 | 1,324,803,913,920,480,300 | 29.4375 | 126 | 0.61526 | false |
pigshell/nhnick | src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/stack_utils_unittest.py | 124 | 2709 | # Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
# * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import sys
import unittest2 as unittest
from webkitpy.common.system import outputcapture
from webkitpy.common.system import stack_utils
def current_thread_id():
thread_id, _ = sys._current_frames().items()[0]
return thread_id
class StackUtilsTest(unittest.TestCase):
def test_find_thread_stack_found(self):
thread_id = current_thread_id()
found_stack = stack_utils._find_thread_stack(thread_id)
self.assertIsNotNone(found_stack)
def test_find_thread_stack_not_found(self):
found_stack = stack_utils._find_thread_stack(0)
self.assertIsNone(found_stack)
def test_log_thread_state(self):
msgs = []
def logger(msg):
msgs.append(msg)
thread_id = current_thread_id()
stack_utils.log_thread_state(logger, "test-thread", thread_id,
"is tested")
self.assertTrue(msgs)
def test_log_traceback(self):
msgs = []
def logger(msg):
msgs.append(msg)
try:
raise ValueError
except:
stack_utils.log_traceback(logger, sys.exc_info()[2])
self.assertTrue(msgs)
| bsd-3-clause | -983,948,965,364,345,300 | -3,759,014,759,258,577,400 | 36.625 | 72 | 0.707641 | false |
likelyzhao/mxnet | example/reinforcement-learning/parallel_actor_critic/model.py | 15 | 4253 | from itertools import chain
import numpy as np
import scipy.signal
import mxnet as mx
class Agent(object):
def __init__(self, input_size, act_space, config):
super(Agent, self).__init__()
self.input_size = input_size
self.num_envs = config.num_envs
self.ctx = config.ctx
self.act_space = act_space
self.config = config
# Shared network.
net = mx.sym.Variable('data')
net = mx.sym.FullyConnected(
data=net, name='fc1', num_hidden=config.hidden_size, no_bias=True)
net = mx.sym.Activation(data=net, name='relu1', act_type="relu")
# Policy network.
policy_fc = mx.sym.FullyConnected(
data=net, name='policy_fc', num_hidden=act_space, no_bias=True)
policy = mx.sym.SoftmaxActivation(data=policy_fc, name='policy')
policy = mx.sym.clip(data=policy, a_min=1e-5, a_max=1 - 1e-5)
log_policy = mx.sym.log(data=policy, name='log_policy')
out_policy = mx.sym.BlockGrad(data=policy, name='out_policy')
# Negative entropy.
neg_entropy = policy * log_policy
neg_entropy = mx.sym.MakeLoss(
data=neg_entropy, grad_scale=config.entropy_wt, name='neg_entropy')
# Value network.
value = mx.sym.FullyConnected(data=net, name='value', num_hidden=1)
self.sym = mx.sym.Group([log_policy, value, neg_entropy, out_policy])
self.model = mx.mod.Module(self.sym, data_names=('data',),
label_names=None)
self.paralell_num = config.num_envs * config.t_max
self.model.bind(
data_shapes=[('data', (self.paralell_num, input_size))],
label_shapes=None,
grad_req="write")
self.model.init_params(config.init_func)
optimizer_params = {'learning_rate': config.learning_rate,
'rescale_grad': 1.0}
if config.grad_clip:
optimizer_params['clip_gradient'] = config.clip_magnitude
self.model.init_optimizer(
kvstore='local', optimizer=config.update_rule,
optimizer_params=optimizer_params)
def act(self, ps):
us = np.random.uniform(size=ps.shape[0])[:, np.newaxis]
as_ = (np.cumsum(ps, axis=1) > us).argmax(axis=1)
return as_
def train_step(self, env_xs, env_as, env_rs, env_vs):
# NOTE(reed): Reshape to set the data shape.
self.model.reshape([('data', (len(env_xs), self.input_size))])
xs = mx.nd.array(env_xs, ctx=self.ctx)
as_ = np.array(list(chain.from_iterable(env_as)))
# Compute discounted rewards and advantages.
advs = []
gamma, lambda_ = self.config.gamma, self.config.lambda_
for i in xrange(len(env_vs)):
# Compute advantages using Generalized Advantage Estimation;
# see eqn. (16) of [Schulman 2016].
delta_t = (env_rs[i] + gamma*np.array(env_vs[i][1:]) -
np.array(env_vs[i][:-1]))
advs.extend(self._discount(delta_t, gamma * lambda_))
# Negative generalized advantage estimations.
neg_advs_v = -np.asarray(advs)
# NOTE(reed): Only keeping the grads for selected actions.
neg_advs_np = np.zeros((len(advs), self.act_space), dtype=np.float32)
neg_advs_np[np.arange(neg_advs_np.shape[0]), as_] = neg_advs_v
neg_advs = mx.nd.array(neg_advs_np, ctx=self.ctx)
# NOTE(reed): The grads of values is actually negative advantages.
v_grads = mx.nd.array(self.config.vf_wt * neg_advs_v[:, np.newaxis],
ctx=self.ctx)
data_batch = mx.io.DataBatch(data=[xs], label=None)
self._forward_backward(data_batch=data_batch,
out_grads=[neg_advs, v_grads])
self._update_params()
def _discount(self, x, gamma):
return scipy.signal.lfilter([1], [1, -gamma], x[::-1], axis=0)[::-1]
def _forward_backward(self, data_batch, out_grads=None):
self.model.forward(data_batch, is_train=True)
self.model.backward(out_grads=out_grads)
def _update_params(self):
self.model.update()
self.model._sync_params_from_devices()
| apache-2.0 | -7,170,085,573,845,899,000 | 615,062,383,654,817,900 | 38.37963 | 79 | 0.585939 | false |
vmturbo/nova | nova/config.py | 5 | 1949 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright 2012 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 required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from oslo_log import log
from oslo_utils import importutils
from nova.common import config
import nova.conf
from nova.db.sqlalchemy import api as sqlalchemy_api
from nova import rpc
from nova import version
profiler = importutils.try_import('osprofiler.opts')
CONF = nova.conf.CONF
def parse_args(argv, default_config_files=None, configure_db=True,
init_rpc=True):
log.register_options(CONF)
# We use the oslo.log default log levels which includes suds=INFO
# and add only the extra levels that Nova needs
if CONF.glance.debug:
extra_default_log_levels = ['glanceclient=DEBUG']
else:
extra_default_log_levels = ['glanceclient=WARN']
log.set_defaults(default_log_levels=log.get_default_log_levels() +
extra_default_log_levels)
rpc.set_defaults(control_exchange='nova')
if profiler:
profiler.set_defaults(CONF)
config.set_middleware_defaults()
CONF(argv[1:],
project='nova',
version=version.version_string(),
default_config_files=default_config_files)
if init_rpc:
rpc.init(CONF)
if configure_db:
sqlalchemy_api.configure(CONF)
| apache-2.0 | 1,412,847,765,062,427,400 | -7,698,327,304,824,054,000 | 32.603448 | 78 | 0.706003 | false |
Subsets and Splits