blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
3
616
content_id
stringlengths
40
40
detected_licenses
listlengths
0
112
license_type
stringclasses
2 values
repo_name
stringlengths
5
115
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
777 values
visit_date
timestamp[us]date
2015-08-06 10:31:46
2023-09-06 10:44:38
revision_date
timestamp[us]date
1970-01-01 02:38:32
2037-05-03 13:00:00
committer_date
timestamp[us]date
1970-01-01 02:38:32
2023-09-06 01:08:06
github_id
int64
4.92k
681M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]date
2012-06-04 01:52:49
2023-09-14 21:59:50
gha_created_at
timestamp[us]date
2008-05-22 07:58:19
2023-08-21 12:35:19
gha_language
stringclasses
149 values
src_encoding
stringclasses
26 values
language
stringclasses
1 value
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
3
10.2M
extension
stringclasses
188 values
content
stringlengths
3
10.2M
authors
listlengths
1
1
author_id
stringlengths
1
132
83e951914a404df185985df975b14b4ab79ebab7
90419da201cd4948a27d3612f0b482c68026c96f
/sdk/python/pulumi_azure_nextgen/logic/v20160601/integration_account_assembly.py
066e5da2149a6ba23cfac81ccc509fccdca4431d
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
test-wiz-sec/pulumi-azure-nextgen
cd4bee5d70cb0d332c04f16bb54e17d016d2adaf
20a695af0d020b34b0f1c336e1b69702755174cc
refs/heads/master
2023-06-08T02:35:52.639773
2020-11-06T22:39:06
2020-11-06T22:39:06
312,993,761
0
0
Apache-2.0
2023-06-02T06:47:28
2020-11-15T09:04:00
null
UTF-8
Python
false
false
6,192
py
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._inputs import * __all__ = ['IntegrationAccountAssembly'] class IntegrationAccountAssembly(pulumi.CustomResource): def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, assembly_artifact_name: Optional[pulumi.Input[str]] = None, integration_account_name: Optional[pulumi.Input[str]] = None, location: Optional[pulumi.Input[str]] = None, properties: Optional[pulumi.Input[pulumi.InputType['AssemblyPropertiesArgs']]] = None, resource_group_name: Optional[pulumi.Input[str]] = None, tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, __props__=None, __name__=None, __opts__=None): """ The assembly definition. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] assembly_artifact_name: The assembly artifact name. :param pulumi.Input[str] integration_account_name: The integration account name. :param pulumi.Input[str] location: The resource location. :param pulumi.Input[pulumi.InputType['AssemblyPropertiesArgs']] properties: The assembly properties. :param pulumi.Input[str] resource_group_name: The resource group name. :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: The resource tags. """ if __name__ is not None: warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning) resource_name = __name__ if __opts__ is not None: warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning) opts = __opts__ if opts is None: opts = pulumi.ResourceOptions() if not isinstance(opts, pulumi.ResourceOptions): raise TypeError('Expected resource options to be a ResourceOptions instance') if opts.version is None: opts.version = _utilities.get_version() if opts.id is None: if __props__ is not None: raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = dict() if assembly_artifact_name is None: raise TypeError("Missing required property 'assembly_artifact_name'") __props__['assembly_artifact_name'] = assembly_artifact_name if integration_account_name is None: raise TypeError("Missing required property 'integration_account_name'") __props__['integration_account_name'] = integration_account_name __props__['location'] = location if properties is None: raise TypeError("Missing required property 'properties'") __props__['properties'] = properties if resource_group_name is None: raise TypeError("Missing required property 'resource_group_name'") __props__['resource_group_name'] = resource_group_name __props__['tags'] = tags __props__['name'] = None __props__['type'] = None alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="azure-nextgen:logic/latest:IntegrationAccountAssembly"), pulumi.Alias(type_="azure-nextgen:logic/v20180701preview:IntegrationAccountAssembly"), pulumi.Alias(type_="azure-nextgen:logic/v20190501:IntegrationAccountAssembly")]) opts = pulumi.ResourceOptions.merge(opts, alias_opts) super(IntegrationAccountAssembly, __self__).__init__( 'azure-nextgen:logic/v20160601:IntegrationAccountAssembly', resource_name, __props__, opts) @staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None) -> 'IntegrationAccountAssembly': """ Get an existing IntegrationAccountAssembly resource's state with the given name, id, and optional extra properties used to qualify the lookup. :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = dict() return IntegrationAccountAssembly(resource_name, opts=opts, __props__=__props__) @property @pulumi.getter def location(self) -> pulumi.Output[Optional[str]]: """ The resource location. """ return pulumi.get(self, "location") @property @pulumi.getter def name(self) -> pulumi.Output[str]: """ Gets the resource name. """ return pulumi.get(self, "name") @property @pulumi.getter def properties(self) -> pulumi.Output['outputs.AssemblyPropertiesResponse']: """ The assembly properties. """ return pulumi.get(self, "properties") @property @pulumi.getter def tags(self) -> pulumi.Output[Optional[Mapping[str, str]]]: """ The resource tags. """ return pulumi.get(self, "tags") @property @pulumi.getter def type(self) -> pulumi.Output[str]: """ Gets the resource type. """ return pulumi.get(self, "type") def translate_output_property(self, prop): return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop def translate_input_property(self, prop): return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop
[ "public@paulstack.co.uk" ]
public@paulstack.co.uk
e4a14f008c431ab5a0199aef5f80e6faa18074b2
f82e67dd5f496d9e6d42b4fad4fb92b6bfb7bf3e
/scripts/client/gui/scaleform/daapi/view/lobby/prb_windows/switchperipherywindow.py
a61163d0f6e932c14da512b0c3b78e6e2d0e305f
[]
no_license
webiumsk/WOT0.10.0
4e4413ed4e7b00e22fb85d25fdae9400cbb4e76b
a84f536c73f86d9e8fab559e97f88f99f2ad7e95
refs/heads/master
2021-01-09T21:55:00.662437
2015-10-23T20:46:45
2015-10-23T20:46:45
44,835,654
1
0
null
null
null
null
UTF-8
Python
false
false
3,904
py
# Embedded file name: scripts/client/gui/Scaleform/daapi/view/lobby/prb_windows/SwitchPeripheryWindow.py from ConnectionManager import connectionManager import constants from debug_utils import LOG_DEBUG from gui.Scaleform.daapi.settings import BUTTON_LINKAGES from gui.Scaleform.daapi.view.meta.SwitchPeripheryWindowMeta import SwitchPeripheryWindowMeta from gui.Scaleform.locale.DIALOGS import DIALOGS from gui.shared.formatters import text_styles from helpers.i18n import makeString as _ms from gui.Scaleform.locale.RES_ICONS import RES_ICONS from gui.Scaleform.genConsts.TEXT_ALIGN import TEXT_ALIGN from predefined_hosts import g_preDefinedHosts from gui import makeHtmlString from gui import DialogsInterface from gui import game_control from adisp import process class SwitchPeripheryWindow(SwitchPeripheryWindowMeta): _BTN_WIDTH = 140 _CLOSE_BTN_ACTION = 'closeAction' _SWITCH_BTN_ACTION = 'switchAction' def __init__(self, ctx): super(SwitchPeripheryWindow, self).__init__() self.__ctx = ctx def onBtnClick(self, action): if action == self._CLOSE_BTN_ACTION: self.onWindowClose() def requestForChange(self, peripheryId): if connectionManager.peripheryID != peripheryId: self.__relogin(peripheryId) else: LOG_DEBUG('Current server for relogin has been chosen: %s' % peripheryId) def onWindowClose(self): self.destroy() def _updateServersList(self): hostsList = g_preDefinedHosts.getSimpleHostsList(g_preDefinedHosts.hostsWithRoaming()) serversList = [] for key, name, csisStatus, peripheryID in hostsList: if peripheryID not in self.__ctx.getForbiddenPeripherieIDs(): serversList.append({'label': name if not constants.IS_CHINA else makeHtmlString('html_templates:lobby/serverStats', 'serverName', {'name': name}), 'id': peripheryID, 'csisStatus': csisStatus, 'selected': True}) label = _ms(self.__ctx.getSelectServerLabel()) if len(serversList) == 1: label = _ms(self.__ctx.getApplySwitchLabel(), server=text_styles.stats(serversList[0]['label'])) self.as_setDataS({'label': label, 'peripheries': serversList, 'isServerDropdownMenuVisibility': len(serversList) > 1, 'selectedIndex': 0}) def _populate(self): super(SwitchPeripheryWindow, self)._populate() self.as_setImageS(RES_ICONS.MAPS_ICONS_WINDOWS_SWITCH_PERIPHERY_WINDOW_BG, 0) self.as_setWindowTitleS(_ms(DIALOGS.SWITCHPERIPHERYWINDOW_WINDOWTITLE)) currentServer = connectionManager.serverUserName self.as_setTextS(_ms(self.__ctx.getHeader()), _ms(self.__ctx.getDescription(), server=text_styles.error(currentServer))) self._updateServersList() self.as_setButtonsS([{'label': _ms(DIALOGS.SWITCHPERIPHERYWINDOW_BTNSWITCH), 'btnLinkage': BUTTON_LINKAGES.BUTTON_NORMAL, 'action': self._SWITCH_BTN_ACTION, 'isFocused': True, 'tooltip': ''}, {'label': _ms(DIALOGS.SWITCHPERIPHERYWINDOW_BTNCANCEL), 'btnLinkage': BUTTON_LINKAGES.BUTTON_BLACK, 'action': self._CLOSE_BTN_ACTION, 'isFocused': False, 'tooltip': ''}], TEXT_ALIGN.RIGHT, self._BTN_WIDTH) def _dispose(self): super(SwitchPeripheryWindow, self)._dispose() @process def __relogin(self, peripheryID): self.__isGuiUpdateSuppressed = True if g_preDefinedHosts.isRoamingPeriphery(peripheryID): success = yield DialogsInterface.showI18nConfirmDialog('changeRoamingPeriphery') else: success = yield DialogsInterface.showI18nConfirmDialog('changePeriphery') if success: game_control.g_instance.relogin.doRelogin(peripheryID, extraChainSteps=self.__ctx.getExtraChainSteps())
[ "info@webium.sk" ]
info@webium.sk
8adc6e2f1aa9c4d7713b8cb7dd3b2fbb27f47ab4
dde5bd0d7819a25751570de8d2b9cdd4337337b0
/Password.py
e7c28aefd9ba7dd2001e72c9632274d43cc5ba5b
[]
no_license
Anubamagpljecs07/Codekata_Hunter
01ba4a12d2447525d8b1729af1701b6202b5f00e
06b1c9b272d505f54a98539413dc2d4824305509
refs/heads/master
2020-04-18T14:07:22.766109
2019-07-28T12:39:31
2019-07-28T12:39:31
167,580,855
0
0
null
null
null
null
UTF-8
Python
false
false
331
py
r,s=map(str,input().split()) r=list(r) s=list(s) a=len(r) b=len(s) g="" if a<b: for i in range(1,(b-a)+1): r.append(i) else: for i in range(1,(a-b)+1): s.append(i) for i in range(0,len(r)): for j in range(0,len(s)): if i==j: g=g+str(r[i]) g=g+str(s[j]) print(g)
[ "noreply@github.com" ]
Anubamagpljecs07.noreply@github.com
cea8dfad15c256206c665989e02288ff8003ef73
53fab060fa262e5d5026e0807d93c75fb81e67b9
/backup/user_247/ch121_2020_09_23_20_43_59_414450.py
3604105d5458c23584fe29d41fa578480d0b6eb8
[]
no_license
gabriellaec/desoft-analise-exercicios
b77c6999424c5ce7e44086a12589a0ad43d6adca
01940ab0897aa6005764fc220b900e4d6161d36b
refs/heads/main
2023-01-31T17:19:42.050628
2020-12-16T05:21:31
2020-12-16T05:21:31
306,735,108
0
0
null
null
null
null
UTF-8
Python
false
false
100
py
lista1 = [4, 6, 8] lista2 = [2, 6] subtracao_de_listas= lista1 - lista2 print (subtracao_de_listas)
[ "you@example.com" ]
you@example.com
fd59c3f1feb10e6b28954e5a34f2009dff2dd443
ccbfc7818c0b75929a1dfae41dc061d5e0b78519
/aliyun-openapi-python-sdk-master/aliyun-python-sdk-cloudapi/aliyunsdkcloudapi/request/v20160714/SetAppsAuthoritiesRequest.py
7c04bda93500029462eeb32ea6b4059064120130
[ "Apache-2.0" ]
permissive
P79N6A/dysms_python
44b634ffb2856b81d5f79f65889bfd5232a9b546
f44877b35817e103eed469a637813efffa1be3e4
refs/heads/master
2020-04-28T15:25:00.368913
2019-03-13T07:52:34
2019-03-13T07:52:34
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,302
py
# 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 aliyunsdkcore.request import RpcRequest class SetAppsAuthoritiesRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'CloudAPI', '2016-07-14', 'SetAppsAuthorities','apigateway') def get_AuthVaildTime(self): return self.get_query_params().get('AuthVaildTime') def set_AuthVaildTime(self,AuthVaildTime): self.add_query_param('AuthVaildTime',AuthVaildTime) def get_StageName(self): return self.get_query_params().get('StageName') def set_StageName(self,StageName): self.add_query_param('StageName',StageName) def get_AppIds(self): return self.get_query_params().get('AppIds') def set_AppIds(self,AppIds): self.add_query_param('AppIds',AppIds) def get_SecurityToken(self): return self.get_query_params().get('SecurityToken') def set_SecurityToken(self,SecurityToken): self.add_query_param('SecurityToken',SecurityToken) def get_GroupId(self): return self.get_query_params().get('GroupId') def set_GroupId(self,GroupId): self.add_query_param('GroupId',GroupId) def get_Description(self): return self.get_query_params().get('Description') def set_Description(self,Description): self.add_query_param('Description',Description) def get_ApiId(self): return self.get_query_params().get('ApiId') def set_ApiId(self,ApiId): self.add_query_param('ApiId',ApiId) def get_AuthValidTime(self): return self.get_query_params().get('AuthValidTime') def set_AuthValidTime(self,AuthValidTime): self.add_query_param('AuthValidTime',AuthValidTime)
[ "1478458905@qq.com" ]
1478458905@qq.com
2522d3ebf8d60e701f772219533f915da1524c41
861fb6e46bfd1ef4ef94b82269babe8fd8e04da1
/src/programy/parser/template/nodes/srai.py
7c50ac234eb307b5badc810d202ce48547351ed6
[ "MIT" ]
permissive
Doshmaku/program-y
5b436b83f409feeddb9fe626c156a426e1170187
6c2e14eebaa92fb61b27deba1b28e6775090c327
refs/heads/master
2021-01-18T20:45:29.330015
2017-03-31T23:35:30
2017-03-31T23:35:30
86,988,411
0
0
null
2017-04-02T13:35:03
2017-04-02T13:35:03
null
UTF-8
Python
false
false
1,832
py
""" Copyright (c) 2016 Keith Sterling 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. """ import logging from programy.parser.template.nodes.base import TemplateNode class TemplateSRAINode(TemplateNode): def __init__(self): TemplateNode.__init__(self) def resolve(self, bot, clientid): srai_text = self.resolve_children_to_string(bot, clientid) logging.debug("[%s] SRAI Text [%s]"%(self.to_string(), srai_text)) resolved = bot.ask_question(clientid, srai_text, srai=True) logging.debug("[%s] resolved to [%s]", self.to_string(), resolved) return resolved def to_string(self): return "[SRAI]" def to_xml(self, bot, clientid): xml = "<srai>" for child in self.children: xml += child.to_xml(bot, clientid) xml += "</srai>" return xml
[ "keith@keithsterling.com" ]
keith@keithsterling.com
540d539597adb3706f95ff6300b78db3ff41ab95
0bfb4c9185743a5b2024816c4ef0f1c9031d8294
/Ewaah/Ewaah/settings.py
a3d89991066848017ea4db1f7e7da3afc971a048
[]
no_license
Husain-Jinia/Django-Ewaah
f0d9e114d0d1a3129a88f3fc0b9bb7a4f5c8c4e0
7862a1bfa984b101eb2a5e9da4bd6be65167befe
refs/heads/master
2023-06-24T05:09:58.524651
2021-07-27T16:16:44
2021-07-27T16:16:44
388,485,460
1
0
null
null
null
null
UTF-8
Python
false
false
3,603
py
""" Django settings for Ewaah project. Generated by 'django-admin startproject' using Django 3.2.5. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ from pathlib import Path import os # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'django-insecure-=45g%1*rf&dty^7qiz9-x87krmvwh@*eh#w8$iba(mn7zq2f6f' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'education.apps.EducationConfig', 'users.apps.UsersConfig', 'product.apps.ProductConfig', 'blog.apps.BlogConfig', 'crispy_forms', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] ROOT_URLCONF = 'Ewaah.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'Ewaah.wsgi.application' # Database # https://docs.djangoproject.com/en/3.2/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': BASE_DIR / 'db.sqlite3', } } # Password validation # https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', }, { 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', }, { 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', }, ] # Internationalization # https://docs.djangoproject.com/en/3.2/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/3.2/howto/static-files/ STATIC_URL = '/static/' MEDIA_URL = "/images/downloads/" MEDIA_ROOT = BASE_DIR STATICFILES_DIRS=[ os.path.join(BASE_DIR,'static') ] CRISPY_TEMPLATE_PACK = 'bootstrap4' LOGIN_REDIRECT_URL = 'product-home' LOGIN_URL = 'login' # Default primary key field type # https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
[ "husainjinia0201@gmail.com" ]
husainjinia0201@gmail.com
635b68ce18964e25d7cbb14f15778925c773d5e3
1c452562b8899cc8d16fc074d660c5d736647144
/update/test/process_my.py
2b42cdf5822e181c5d63a449ae22847701d13e1a
[]
no_license
cash2one/autumn
6ac6caec6f7eeec06cb622689aa5ec9ee3173321
dc03c31beb3b331264ac83643cefee4839e456fc
refs/heads/master
2020-05-23T12:58:09.635418
2016-09-28T01:25:30
2016-09-28T01:25:30
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,077
py
import multiprocessing import time def wait_for_event(e): """Wait for the event to be set before doing anything""" print ('wait_for_event: starting') e.wait() print ('wait_for_event: e.is_set()->' + str(e.is_set())) def wait_for_event_timeout(e, t): """Wait t seconds and then timeout""" print ('wait_for_event_timeout: starting') e.wait(t) print ('wait_for_event_timeout: e.is_set()->' + str(e.is_set())) if __name__ == '__main__': e = multiprocessing.Event() w1 = multiprocessing.Process(name='block', target=wait_for_event, args=(e,)) w1.start() w2 = multiprocessing.Process(name='non-block', target=wait_for_event_timeout, args=(e, 2)) w2.start() time.sleep(3) e.set() print ('main: event is set') #the output is: #wait_for_event_timeout: starting #wait_for_event: starting #wait_for_event_timeout: e.is_set()->False #main: event is set #wait_for_event: e.is_set()->True
[ "xutao.ding@chinascopefinancial.com" ]
xutao.ding@chinascopefinancial.com
6d4b704f15fa273b6ad4e27a805bd1cd9d828c8f
0600f0979fe17624d33aa74c739775f0f27a3bb5
/docs/support/python2_module.py
5a0f9c7411e1d5dc7f7e231dc98a1e38ad09a560
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
pmacosta/putil
2c8177fb6b9be667b8d52b48bfd3272de8b0160d
416cea52df8221981727e25d133e9b4e3f464798
refs/heads/master
2021-01-21T13:33:41.232773
2016-05-17T12:57:30
2016-05-17T12:57:30
44,289,408
6
2
null
null
null
null
UTF-8
Python
false
false
180
py
# python2_module.py # Copyright (c) 2013-2016 Pablo Acosta-Serafini # See LICENSE for details # pylint: disable=C0111,W0212 def _set_value(self, value): self._value = value+2
[ "pmasdev@gmail.com" ]
pmasdev@gmail.com
bf2e6170279efa042ff2f01f06ad6eb43b661e82
f3b233e5053e28fa95c549017bd75a30456eb50c
/bace_input/L4A/4A-4O_wat_20Abox/set_1ns_equi.py
ac6bea51cee9ca3647a26c47a2e7f61edbdeda9e
[]
no_license
AnguseZhang/Input_TI
ddf2ed40ff1c0aa24eea3275b83d4d405b50b820
50ada0833890be9e261c967d00948f998313cb60
refs/heads/master
2021-05-25T15:02:38.858785
2020-02-18T16:57:04
2020-02-18T16:57:04
null
0
0
null
null
null
null
UTF-8
Python
false
false
915
py
import os dir = '/mnt/scratch/songlin3/run/bace/L4A/wat_20Abox/ti_one-step/4A_4O/' filesdir = dir + 'files/' temp_equiin = filesdir + 'temp_equi.in' temp_pbs = filesdir + 'temp_1ns_equi.pbs' lambd = [ 0.00922, 0.04794, 0.11505, 0.20634, 0.31608, 0.43738, 0.56262, 0.68392, 0.79366, 0.88495, 0.95206, 0.99078] for j in lambd: os.system("rm -r %6.5f" %(j)) os.system("mkdir %6.5f" %(j)) os.chdir("%6.5f" %(j)) os.system("rm *") workdir = dir + "%6.5f" %(j) + '/' #equiin eqin = workdir + "%6.5f_equi.in" %(j) os.system("cp %s %s" %(temp_equiin, eqin)) os.system("sed -i 's/XXX/%6.5f/g' %s" %(j, eqin)) #PBS pbs = workdir + "%6.5f_1ns_equi.pbs" %(j) os.system("cp %s %s" %(temp_pbs, pbs)) os.system("sed -i 's/XXX/%6.5f/g' %s" %(j, pbs)) #top os.system("cp ../4A-4O_merged.prmtop .") os.system("cp ../0.5_equi_0.rst .") #submit pbs os.system("qsub %s" %(pbs)) os.chdir(dir)
[ "songlin3@msu.edu" ]
songlin3@msu.edu
b9a19bc74f525432842757cd26bb159cadd3965a
fe6740673af5f093f41d9cfab5c12883aa6ebbb2
/plata/contact/models.py
b1711efce2ce444b95b4e2a266df5032ee10a468
[ "BSD-2-Clause" ]
permissive
chrisglass/plata
7cb0a2697faff7e0482909aedc2c1b4d3fe8fb0d
fce185e5a1c528b0e059a875eaa5724292827bc7
refs/heads/master
2021-01-17T09:41:05.019482
2011-01-20T17:11:41
2011-01-20T17:11:41
1,320,066
1
0
null
null
null
null
UTF-8
Python
false
false
2,466
py
from datetime import datetime from django.contrib.auth.models import User from django.db import models from django.utils.translation import ugettext_lazy as _ from cldr_countries.fields import CountryField from plata.fields import CurrencyField class BillingShippingAddress(models.Model): ADDRESS_FIELDS = ['company', 'first_name', 'last_name', 'address', 'zip_code', 'city', 'country'] billing_company = models.CharField(_('company'), max_length=100, blank=True) billing_first_name = models.CharField(_('first name'), max_length=100) billing_last_name = models.CharField(_('last name'), max_length=100) billing_address = models.TextField(_('address')) billing_zip_code = models.CharField(_('ZIP code'), max_length=50) billing_city = models.CharField(_('city'), max_length=100) billing_country = CountryField() shipping_same_as_billing = models.BooleanField(_('shipping address equals billing address'), default=True) shipping_company = models.CharField(_('company'), max_length=100, blank=True) shipping_first_name = models.CharField(_('first name'), max_length=100, blank=True) shipping_last_name = models.CharField(_('last name'), max_length=100, blank=True) shipping_address = models.TextField(_('address'), blank=True) shipping_zip_code = models.CharField(_('ZIP code'), max_length=50, blank=True) shipping_city = models.CharField(_('city'), max_length=100, blank=True) shipping_country = CountryField(blank=True) class Meta: abstract = True def addresses(self): billing = dict((f, getattr(self, 'billing_%s' % f)) for f in self.ADDRESS_FIELDS) if self.shipping_same_as_billing: shipping = billing else: shipping = dict((f, getattr(self, 'shipping_%s' % f)) for f in self.ADDRESS_FIELDS) return {'billing': billing, 'shipping': shipping} class Contact(BillingShippingAddress): user = models.OneToOneField(User, verbose_name=_('user'), related_name='contactuser') dob = models.DateField(_('date of birth'), blank=True, null=True) created = models.DateTimeField(_('created'), default=datetime.now) currency = CurrencyField(help_text=_('Preferred currency.')) notes = models.TextField(_('notes'), blank=True) class Meta: verbose_name = _('contact') verbose_name_plural = _('contacts') def __unicode__(self): return unicode(self.user)
[ "mk@spinlock.ch" ]
mk@spinlock.ch
dc65aff0849a6f9e7add17f702ee6edab4d723f5
61aa319732d3fa7912e28f5ff7768498f8dda005
/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/addition.py
2f6ec4017b97d797e5b8083d54b8c9509e44e395
[ "BSD-3-Clause", "LicenseRef-scancode-proprietary-license", "LGPL-2.0-or-later", "MIT" ]
permissive
TeCSAR-UNCC/gem5-SALAM
37f2f7198c93b4c18452550df48c1a2ab14b14fb
c14c39235f4e376e64dc68b81bd2447e8a47ff65
refs/heads/main
2023-06-08T22:16:25.260792
2023-05-31T16:43:46
2023-05-31T16:43:46
154,335,724
62
22
BSD-3-Clause
2023-05-31T16:43:48
2018-10-23T13:45:44
C++
UTF-8
Python
false
false
3,943
py
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality of the software # licensed hereunder. You may use the software subject to the license # terms below provided that you ensure that this notice is replicated # unmodified and in its entirety in all distributions of the software, # modified or unmodified, in source code or in binary form. # # 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 copyright holders 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. microcode = ''' def macroop ADDSS_XMM_XMM { maddf xmml, xmml, xmmlm, size=4, ext=Scalar }; def macroop ADDSS_XMM_M { ldfp ufp1, seg, sib, disp, dataSize=8 maddf xmml, xmml, ufp1, size=4, ext=Scalar }; def macroop ADDSS_XMM_P { rdip t7 ldfp ufp1, seg, riprel, disp, dataSize=8 maddf xmml, xmml, ufp1, size=4, ext=Scalar }; def macroop ADDSD_XMM_XMM { maddf xmml, xmml, xmmlm, size=8, ext=Scalar }; def macroop ADDSD_XMM_M { ldfp ufp1, seg, sib, disp, dataSize=8 maddf xmml, xmml, ufp1, size=8, ext=Scalar }; def macroop ADDSD_XMM_P { rdip t7 ldfp ufp1, seg, riprel, disp, dataSize=8 maddf xmml, xmml, ufp1, size=8, ext=Scalar }; def macroop ADDPS_XMM_XMM { maddf xmml, xmml, xmmlm, size=4, ext=0 maddf xmmh, xmmh, xmmhm, size=4, ext=0 }; def macroop ADDPS_XMM_M { ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 maddf xmml, xmml, ufp1, size=4, ext=0 maddf xmmh, xmmh, ufp2, size=4, ext=0 }; def macroop ADDPS_XMM_P { rdip t7 ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 maddf xmml, xmml, ufp1, size=4, ext=0 maddf xmmh, xmmh, ufp2, size=4, ext=0 }; def macroop ADDPD_XMM_XMM { maddf xmml, xmml, xmmlm, size=8, ext=0 maddf xmmh, xmmh, xmmhm, size=8, ext=0 }; def macroop ADDPD_XMM_M { ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 maddf xmml, xmml, ufp1, size=8, ext=0 maddf xmmh, xmmh, ufp2, size=8, ext=0 }; def macroop ADDPD_XMM_P { rdip t7 ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 maddf xmml, xmml, ufp1, size=8, ext=0 maddf xmmh, xmmh, ufp2, size=8, ext=0 }; '''
[ "sroger48@uncc.edu" ]
sroger48@uncc.edu
579a5194f8865743d8b7c464ce393de43269a4ed
ad2704933de4502ae9de91e6d915f9dbe010b446
/kurosawa/chapter02/knock16.py
b57dff9bb7454290f6f99303a1a306d21f23b3c4
[]
no_license
tmu-nlp/100knock2017
266e68917d8d5a7f5d0c064f1bc2da5fa402a253
629bd1155d0fe78cd9302ae9a7cdf0922b778fe7
refs/heads/master
2021-01-19T17:36:53.328997
2017-07-24T07:09:54
2017-07-24T07:09:54
88,334,932
8
2
null
null
null
null
UTF-8
Python
false
false
212
py
with open('hightemp.txt','r') as f: n = int(input('N > ')) i = 0 for line in f: if i % n ==0: print() print(line, end="") i += 1 # split -l 10 hightemp.txt split_
[ "michiki@Michiki-no-MacBook-Pro.local" ]
michiki@Michiki-no-MacBook-Pro.local
942c662266b556899f7415f446eabe370954b27e
711756b796d68035dc6a39060515200d1d37a274
/output_cog/optimized_23998.py
93d04e7fa917a8a85e616a89be81071fa717a042
[]
no_license
batxes/exocyst_scripts
8b109c279c93dd68c1d55ed64ad3cca93e3c95ca
a6c487d5053b9b67db22c59865e4ef2417e53030
refs/heads/master
2020-06-16T20:16:24.840725
2016-11-30T16:23:16
2016-11-30T16:23:16
75,075,164
0
0
null
null
null
null
UTF-8
Python
false
false
10,846
py
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_sets={} surf_sets={} if "Cog2_GFPN" not in marker_sets: s=new_marker_set('Cog2_GFPN') marker_sets["Cog2_GFPN"]=s s= marker_sets["Cog2_GFPN"] mark=s.place_marker((562.956, 606.319, 542.196), (0.89, 0.1, 0.1), 18.4716) if "Cog2_0" not in marker_sets: s=new_marker_set('Cog2_0') marker_sets["Cog2_0"]=s s= marker_sets["Cog2_0"] mark=s.place_marker((596.918, 663.937, 548.858), (0.89, 0.1, 0.1), 17.1475) if "Cog2_1" not in marker_sets: s=new_marker_set('Cog2_1') marker_sets["Cog2_1"]=s s= marker_sets["Cog2_1"] mark=s.place_marker((643.841, 731.339, 542.762), (0.89, 0.1, 0.1), 17.1475) if "Cog2_GFPC" not in marker_sets: s=new_marker_set('Cog2_GFPC') marker_sets["Cog2_GFPC"]=s s= marker_sets["Cog2_GFPC"] mark=s.place_marker((592.522, 674.052, 426.156), (0.89, 0.1, 0.1), 18.4716) if "Cog2_Anch" not in marker_sets: s=new_marker_set('Cog2_Anch') marker_sets["Cog2_Anch"]=s s= marker_sets["Cog2_Anch"] mark=s.place_marker((759.202, 885.626, 574.56), (0.89, 0.1, 0.1), 18.4716) if "Cog3_GFPN" not in marker_sets: s=new_marker_set('Cog3_GFPN') marker_sets["Cog3_GFPN"]=s s= marker_sets["Cog3_GFPN"] mark=s.place_marker((595.975, 638.826, 544.225), (1, 1, 0), 18.4716) if "Cog3_0" not in marker_sets: s=new_marker_set('Cog3_0') marker_sets["Cog3_0"]=s s= marker_sets["Cog3_0"] mark=s.place_marker((596.057, 637.395, 544.308), (1, 1, 0.2), 17.1475) if "Cog3_1" not in marker_sets: s=new_marker_set('Cog3_1') marker_sets["Cog3_1"]=s s= marker_sets["Cog3_1"] mark=s.place_marker((614.126, 623.694, 527.722), (1, 1, 0.2), 17.1475) if "Cog3_2" not in marker_sets: s=new_marker_set('Cog3_2') marker_sets["Cog3_2"]=s s= marker_sets["Cog3_2"] mark=s.place_marker((605.054, 597.156, 528.573), (1, 1, 0.2), 17.1475) if "Cog3_3" not in marker_sets: s=new_marker_set('Cog3_3') marker_sets["Cog3_3"]=s s= marker_sets["Cog3_3"] mark=s.place_marker((628.721, 582.259, 531.074), (1, 1, 0.2), 17.1475) if "Cog3_4" not in marker_sets: s=new_marker_set('Cog3_4') marker_sets["Cog3_4"]=s s= marker_sets["Cog3_4"] mark=s.place_marker((649.006, 599.654, 522.519), (1, 1, 0.2), 17.1475) if "Cog3_5" not in marker_sets: s=new_marker_set('Cog3_5') marker_sets["Cog3_5"]=s s= marker_sets["Cog3_5"] mark=s.place_marker((662.524, 575.594, 527.694), (1, 1, 0.2), 17.1475) if "Cog3_GFPC" not in marker_sets: s=new_marker_set('Cog3_GFPC') marker_sets["Cog3_GFPC"]=s s= marker_sets["Cog3_GFPC"] mark=s.place_marker((572.778, 627.147, 555.985), (1, 1, 0.4), 18.4716) if "Cog3_Anch" not in marker_sets: s=new_marker_set('Cog3_Anch') marker_sets["Cog3_Anch"]=s s= marker_sets["Cog3_Anch"] mark=s.place_marker((752.186, 523.515, 505.736), (1, 1, 0.4), 18.4716) if "Cog4_GFPN" not in marker_sets: s=new_marker_set('Cog4_GFPN') marker_sets["Cog4_GFPN"]=s s= marker_sets["Cog4_GFPN"] mark=s.place_marker((812.378, 708.375, 561.014), (0, 0, 0.8), 18.4716) if "Cog4_0" not in marker_sets: s=new_marker_set('Cog4_0') marker_sets["Cog4_0"]=s s= marker_sets["Cog4_0"] mark=s.place_marker((812.378, 708.375, 561.014), (0, 0, 0.8), 17.1475) if "Cog4_1" not in marker_sets: s=new_marker_set('Cog4_1') marker_sets["Cog4_1"]=s s= marker_sets["Cog4_1"] mark=s.place_marker((799.289, 683.454, 558.875), (0, 0, 0.8), 17.1475) if "Cog4_2" not in marker_sets: s=new_marker_set('Cog4_2') marker_sets["Cog4_2"]=s s= marker_sets["Cog4_2"] mark=s.place_marker((771.976, 678.21, 552.698), (0, 0, 0.8), 17.1475) if "Cog4_3" not in marker_sets: s=new_marker_set('Cog4_3') marker_sets["Cog4_3"]=s s= marker_sets["Cog4_3"] mark=s.place_marker((743.116, 678.784, 553.339), (0, 0, 0.8), 17.1475) if "Cog4_4" not in marker_sets: s=new_marker_set('Cog4_4') marker_sets["Cog4_4"]=s s= marker_sets["Cog4_4"] mark=s.place_marker((714.502, 677.798, 558.064), (0, 0, 0.8), 17.1475) if "Cog4_5" not in marker_sets: s=new_marker_set('Cog4_5') marker_sets["Cog4_5"]=s s= marker_sets["Cog4_5"] mark=s.place_marker((685.673, 677.352, 564.292), (0, 0, 0.8), 17.1475) if "Cog4_6" not in marker_sets: s=new_marker_set('Cog4_6') marker_sets["Cog4_6"]=s s= marker_sets["Cog4_6"] mark=s.place_marker((657.285, 670.505, 568.966), (0, 0, 0.8), 17.1475) if "Cog4_GFPC" not in marker_sets: s=new_marker_set('Cog4_GFPC') marker_sets["Cog4_GFPC"]=s s= marker_sets["Cog4_GFPC"] mark=s.place_marker((881.64, 606.623, 464.7), (0, 0, 0.8), 18.4716) if "Cog4_Anch" not in marker_sets: s=new_marker_set('Cog4_Anch') marker_sets["Cog4_Anch"]=s s= marker_sets["Cog4_Anch"] mark=s.place_marker((417.405, 721.536, 663.307), (0, 0, 0.8), 18.4716) if "Cog5_GFPN" not in marker_sets: s=new_marker_set('Cog5_GFPN') marker_sets["Cog5_GFPN"]=s s= marker_sets["Cog5_GFPN"] mark=s.place_marker((650.76, 705.733, 581.794), (0.3, 0.3, 0.3), 18.4716) if "Cog5_0" not in marker_sets: s=new_marker_set('Cog5_0') marker_sets["Cog5_0"]=s s= marker_sets["Cog5_0"] mark=s.place_marker((650.76, 705.733, 581.794), (0.3, 0.3, 0.3), 17.1475) if "Cog5_1" not in marker_sets: s=new_marker_set('Cog5_1') marker_sets["Cog5_1"]=s s= marker_sets["Cog5_1"] mark=s.place_marker((646.502, 699.493, 554.106), (0.3, 0.3, 0.3), 17.1475) if "Cog5_2" not in marker_sets: s=new_marker_set('Cog5_2') marker_sets["Cog5_2"]=s s= marker_sets["Cog5_2"] mark=s.place_marker((639.155, 702.744, 526.424), (0.3, 0.3, 0.3), 17.1475) if "Cog5_3" not in marker_sets: s=new_marker_set('Cog5_3') marker_sets["Cog5_3"]=s s= marker_sets["Cog5_3"] mark=s.place_marker((631.852, 726.109, 511.126), (0.3, 0.3, 0.3), 17.1475) if "Cog5_GFPC" not in marker_sets: s=new_marker_set('Cog5_GFPC') marker_sets["Cog5_GFPC"]=s s= marker_sets["Cog5_GFPC"] mark=s.place_marker((547.772, 636.033, 494.28), (0.3, 0.3, 0.3), 18.4716) if "Cog5_Anch" not in marker_sets: s=new_marker_set('Cog5_Anch') marker_sets["Cog5_Anch"]=s s= marker_sets["Cog5_Anch"] mark=s.place_marker((711.716, 821.821, 525.234), (0.3, 0.3, 0.3), 18.4716) if "Cog6_GFPN" not in marker_sets: s=new_marker_set('Cog6_GFPN') marker_sets["Cog6_GFPN"]=s s= marker_sets["Cog6_GFPN"] mark=s.place_marker((585.639, 660.6, 523.058), (0.21, 0.49, 0.72), 18.4716) if "Cog6_0" not in marker_sets: s=new_marker_set('Cog6_0') marker_sets["Cog6_0"]=s s= marker_sets["Cog6_0"] mark=s.place_marker((585.507, 660.592, 522.735), (0.21, 0.49, 0.72), 17.1475) if "Cog6_1" not in marker_sets: s=new_marker_set('Cog6_1') marker_sets["Cog6_1"]=s s= marker_sets["Cog6_1"] mark=s.place_marker((613.67, 662.817, 519.543), (0.21, 0.49, 0.72), 17.1475) if "Cog6_2" not in marker_sets: s=new_marker_set('Cog6_2') marker_sets["Cog6_2"]=s s= marker_sets["Cog6_2"] mark=s.place_marker((629.29, 655.933, 542.269), (0.21, 0.49, 0.72), 17.1475) if "Cog6_3" not in marker_sets: s=new_marker_set('Cog6_3') marker_sets["Cog6_3"]=s s= marker_sets["Cog6_3"] mark=s.place_marker((628.309, 635.844, 562.067), (0.21, 0.49, 0.72), 17.1475) if "Cog6_4" not in marker_sets: s=new_marker_set('Cog6_4') marker_sets["Cog6_4"]=s s= marker_sets["Cog6_4"] mark=s.place_marker((616.493, 610.528, 560.246), (0.21, 0.49, 0.72), 17.1475) if "Cog6_5" not in marker_sets: s=new_marker_set('Cog6_5') marker_sets["Cog6_5"]=s s= marker_sets["Cog6_5"] mark=s.place_marker((635.145, 592.307, 570.65), (0.21, 0.49, 0.72), 17.1475) if "Cog6_6" not in marker_sets: s=new_marker_set('Cog6_6') marker_sets["Cog6_6"]=s s= marker_sets["Cog6_6"] mark=s.place_marker((657.287, 577.763, 560.258), (0.21, 0.49, 0.72), 17.1475) if "Cog6_GFPC" not in marker_sets: s=new_marker_set('Cog6_GFPC') marker_sets["Cog6_GFPC"]=s s= marker_sets["Cog6_GFPC"] mark=s.place_marker((625.652, 636.703, 612.493), (0.21, 0.49, 0.72), 18.4716) if "Cog6_Anch" not in marker_sets: s=new_marker_set('Cog6_Anch') marker_sets["Cog6_Anch"]=s s= marker_sets["Cog6_Anch"] mark=s.place_marker((692.507, 519.993, 503.511), (0.21, 0.49, 0.72), 18.4716) if "Cog7_GFPN" not in marker_sets: s=new_marker_set('Cog7_GFPN') marker_sets["Cog7_GFPN"]=s s= marker_sets["Cog7_GFPN"] mark=s.place_marker((601.128, 675.644, 608.623), (0.7, 0.7, 0.7), 18.4716) if "Cog7_0" not in marker_sets: s=new_marker_set('Cog7_0') marker_sets["Cog7_0"]=s s= marker_sets["Cog7_0"] mark=s.place_marker((598.806, 684.097, 583.102), (0.7, 0.7, 0.7), 17.1475) if "Cog7_1" not in marker_sets: s=new_marker_set('Cog7_1') marker_sets["Cog7_1"]=s s= marker_sets["Cog7_1"] mark=s.place_marker((603.954, 702.205, 528.502), (0.7, 0.7, 0.7), 17.1475) if "Cog7_2" not in marker_sets: s=new_marker_set('Cog7_2') marker_sets["Cog7_2"]=s s= marker_sets["Cog7_2"] mark=s.place_marker((609.265, 720.893, 474.302), (0.7, 0.7, 0.7), 17.1475) if "Cog7_GFPC" not in marker_sets: s=new_marker_set('Cog7_GFPC') marker_sets["Cog7_GFPC"]=s s= marker_sets["Cog7_GFPC"] mark=s.place_marker((533.719, 694.295, 470.952), (0.7, 0.7, 0.7), 18.4716) if "Cog7_Anch" not in marker_sets: s=new_marker_set('Cog7_Anch') marker_sets["Cog7_Anch"]=s s= marker_sets["Cog7_Anch"] mark=s.place_marker((672.807, 765.909, 404.604), (0.7, 0.7, 0.7), 18.4716) if "Cog8_0" not in marker_sets: s=new_marker_set('Cog8_0') marker_sets["Cog8_0"]=s s= marker_sets["Cog8_0"] mark=s.place_marker((608.141, 632.811, 594.168), (1, 0.5, 0), 17.1475) if "Cog8_1" not in marker_sets: s=new_marker_set('Cog8_1') marker_sets["Cog8_1"]=s s= marker_sets["Cog8_1"] mark=s.place_marker((619.729, 657.123, 586.901), (1, 0.5, 0), 17.1475) if "Cog8_2" not in marker_sets: s=new_marker_set('Cog8_2') marker_sets["Cog8_2"]=s s= marker_sets["Cog8_2"] mark=s.place_marker((629.02, 682.797, 580.225), (1, 0.5, 0), 17.1475) if "Cog8_3" not in marker_sets: s=new_marker_set('Cog8_3') marker_sets["Cog8_3"]=s s= marker_sets["Cog8_3"] mark=s.place_marker((618.907, 709.552, 573.672), (1, 0.5, 0), 17.1475) if "Cog8_4" not in marker_sets: s=new_marker_set('Cog8_4') marker_sets["Cog8_4"]=s s= marker_sets["Cog8_4"] mark=s.place_marker((620.518, 737.879, 567.368), (1, 0.5, 0), 17.1475) if "Cog8_5" not in marker_sets: s=new_marker_set('Cog8_5') marker_sets["Cog8_5"]=s s= marker_sets["Cog8_5"] mark=s.place_marker((613.017, 763.813, 557.782), (1, 0.5, 0), 17.1475) if "Cog8_GFPC" not in marker_sets: s=new_marker_set('Cog8_GFPC') marker_sets["Cog8_GFPC"]=s s= marker_sets["Cog8_GFPC"] mark=s.place_marker((590.523, 686.806, 560.614), (1, 0.6, 0.1), 18.4716) if "Cog8_Anch" not in marker_sets: s=new_marker_set('Cog8_Anch') marker_sets["Cog8_Anch"]=s s= marker_sets["Cog8_Anch"] mark=s.place_marker((632.939, 843.689, 553.686), (1, 0.6, 0.1), 18.4716) for k in surf_sets.keys(): chimera.openModels.add([surf_sets[k]])
[ "batxes@gmail.com" ]
batxes@gmail.com
e0311af79cc11245fd436e626060357ede26188e
9f483a97f0ecf8c606c9695fab283e1d83f807de
/docs/source/conf.py
55d81e87f24de5a9b7797699e0723307d6d730b7
[]
no_license
AndreaCensi/geometric_saccade_detector
306c75db79d4410713cb68806dabb75cb55726d9
a83bb74c6f22c6d566481ebe6f57833a7449e095
refs/heads/master
2016-09-06T13:51:34.423876
2012-06-24T00:12:38
2012-06-24T00:12:38
949,846
1
3
null
null
null
null
UTF-8
Python
false
false
7,232
py
# -*- coding: utf-8 -*- # # RepRep documentation build configuration file, created by # sphinx-quickstart on Wed Aug 18 20:45:54 2010. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys, os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. #sys.path.append(os.path.abspath('.')) # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', 'sphinxtogithub'] # Add any paths that contain templates here, relative to this directory. templates_path = ['my_templates'] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. #source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' # General information about the project. project = u'The Geometric Saccade Detector' copyright = u'2010, Andrea Censi' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = '0.1' # The full version, including alpha/beta/rc tags. release = '0.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. #today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = [] # The reST default role (used for this markup: `text`) to use for all documents. #default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. #add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). #add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. #show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] # -- Options for HTML output --------------------------------------------------- # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. #html_theme = 'default' html_theme = "haiku" html_theme_options = { } # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # "<project> v<release> documentation". #html_title = None # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. #html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. #html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['my_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. #html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. #html_domain_indices = True # If false, no index is generated. #html_use_index = True # If true, the index is split into individual pages for each letter. #html_split_index = False # If true, links to the reST sources are added to the pages. #html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. #html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. #html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a <link> tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. #html_use_opensearch = '' # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = '' # Output file base name for HTML help builder. htmlhelp_basename = 'GSDdoc' # -- Options for LaTeX output -------------------------------------------------- # The paper size ('letter' or 'a4'). #latex_paper_size = 'letter' # The font size ('10pt', '11pt' or '12pt'). #latex_font_size = '10pt' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ ('index', 'geometric_saccade_detector.tex', u'geometric_saccade_detector Documentation', u'Andrea Censi', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. #latex_use_parts = False # Additional stuff for the LaTeX preamble. #latex_preamble = '' # Documents to append as an appendix to all manuals. #latex_appendices = [] # If false, no module index is generated. #latex_domain_indices = True # -- Options for manual page output -------------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'The Geometric Saccade Detector', u'geometric_saccade_detector Documentation', [u'Andrea Censi'], 1) ] # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {'http://docs.python.org/': None}
[ "andrea@cds.caltech.edu" ]
andrea@cds.caltech.edu
c44588f710820a05e261c2f28202de73c5a2db69
c7967ec500b210513aa0b1f540144c931ca687ac
/알고리즘 스터디/개인공부/파이썬 문법/Chapter2/Chapter2_2_float.py
9f2181e9034ed7925522325dd57519b48b641c3e
[]
no_license
sunminky/algorythmStudy
9a88e02c444b10904cebae94170eba456320f8e8
2ee1b5cf1f2e5f7ef87b44643210f407c4aa90e2
refs/heads/master
2023-08-17T01:49:43.528021
2023-08-13T08:11:37
2023-08-13T08:11:37
225,085,243
1
3
null
null
null
null
UTF-8
Python
false
false
777
py
a = 1.2 print(a.is_integer()) #a가 정수로 오차없이 표현가능한가?, False a = 1.0 print(a.is_integer()) #a가 정수로 오차없이 표현가능한가?, True import math as mm print(mm.ceil(1.2)) #1.2보다 크거나 같은 정수 print(mm.floor(1.2)) #1.2보다 작거나 같은 정수 from fractions import Fraction #분수형태의 연산을 가능하게 해주는 모듈 print(Fraction('5/7') * Fraction('14/15')) # 5/7 * 14/15 from decimal import * #실수를 오차없이 계산하게 해주는 모듈 temp = 0 for i in range(100): temp += Decimal('0.01') #0.01을 100번더함 print(temp) del temp x = y = 10 x1 = y1 = 11 print(x is y) #x와 y가 같은 객체인지, True print(x is y1) #x와 y1가 같은 객체인지, False
[ "suns1502@gmail.com" ]
suns1502@gmail.com
7aea6af0f1582ad8eb4db2522aea82debe1aa40a
36959b56e506dbbe2d3c381cdccfe16965c14d24
/alms/employee/forms.py
1732062e713481d4df10db6ae09d1f6fe1a8ec33
[]
no_license
Sathishkumar-M/Django
e2935fe0c69acb4cb39be2bc0504fd3d5619d002
e54038ef70295274639b6207efe8e7e3939cbe36
refs/heads/master
2020-03-21T20:22:48.684770
2018-06-28T10:42:51
2018-06-28T10:42:51
139,003,364
0
0
null
null
null
null
UTF-8
Python
false
false
566
py
from django import forms from django.contrib.auth.models import User from employee.models import EmployeeProfileInfo class EmployeeForm(forms.ModelForm): class Meta(): model = User fields = ('first_name','email',) class EmployeeProfileInfoForm(forms.ModelForm): class Meta(): model = EmployeeProfileInfo fields = ('profile_pic','age','phone','address') widgets = { 'phone':forms.TextInput(attrs={'class':'textinputclass'}), 'address':forms.Textarea(attrs={'class':'editable'}) }
[ "sathishkumar.appiness@gmail.com" ]
sathishkumar.appiness@gmail.com
89c143918667a650795911a434f8d3e48a986bbf
0e1e643e864bcb96cf06f14f4cb559b034e114d0
/Exps_7_v3/doc3d/Ablation4_ch016_ep003_7_10/Gather1_W_change_C_fix_2blk/train/pyr_1s/L8/step09_1side_L8.py
192b566c76306d64353da01da03c0854a4f91b76
[]
no_license
KongBOy/kong_model2
33a94a9d2be5b0f28f9d479b3744e1d0e0ebd307
1af20b168ffccf0d5293a393a40a9fa9519410b2
refs/heads/master
2022-10-14T03:09:22.543998
2022-10-06T11:33:42
2022-10-06T11:33:42
242,080,692
3
0
null
null
null
null
UTF-8
Python
false
false
6,324
py
############################################################################################################################################################################################################# from step08_c_use_G_generate_I_w_M_to_Wx_Wy_Wz_focus_to_Cx_Cy_focus_combine import I_w_M_to_W_to_C from step08_b_use_G_generate_0_util import Tight_crop, Color_jit from step09_c_train_step import Train_step_I_w_M_to_W_to_C from step09_d_KModel_builder_combine_step789 import KModel_builder, MODEL_NAME color_jit = Color_jit(do_ratio=0.6) use_gen_op_p20 = I_w_M_to_W_to_C( separate_out=True, focus=True, tight_crop=Tight_crop(pad_size=20, resize=(255, 255), jit_scale= 0) ) ### 我目前的 multi_model 的 I_to_Wxyz_to_Cxy_general 是 全部都回傳 Wz_pre_w_M, Wy_pre_w_M, Wx_pre_w_M, Cx_pre_w_M, Cy_pre_w_M, 所以不管 wi/woDIV, Separate 全設 True 就對了 use_train_step_p20 = Train_step_I_w_M_to_W_to_C( separate_out=True, focus=True, tight_crop=Tight_crop(pad_size=20, resize=(255, 255), jit_scale= 15), color_jit=color_jit ) ### 我目前的 multi_model 的 I_to_Wxyz_to_Cxy_general 是 全部都回傳 Wz_pre_w_M, Wy_pre_w_M, Wx_pre_w_M, Cx_pre_w_M, Cy_pre_w_M, 所以不管 wi/woDIV, Separate 全設 True 就對了 from Exps_7_v3.doc3d.Ablation4_ch016_ep003_7_10.I_w_M_to_W_pyr.pyr_1s.L8.step09_1side_L8 import * from Exps_7_v3.doc3d.Ablation4_ch016_ep003_7_10.W_w_M_to_C_pyr.pyr_2s.L5.step09_2side_L5 import ch032_pyramid_1side_6__2side_6 as W_w_M_to_Cxy_Tcrop255_p20_2s_L5 import time start_time = time.time() ############################################################################################################################################################################################### ######################################################################################### ch032_pyramid_1side_1_and_1s6_2s6 = KModel_builder().set_model_name(MODEL_NAME.multi_flow_unet).set_multi_model_builders(op_type="I_to_Wxyz_to_Cxy_general", I_to_Wx_Wy_Wz=ch032_pyramid_1side_1, W_to_Cx_Cy=W_w_M_to_Cxy_Tcrop255_p20_2s_L5).set_multi_model_separate_focus(I_to_W_separ=False, I_to_W_focus=True, W_to_C_separ=False, W_to_C_focus=True).set_gen_op( use_gen_op_p20 ).set_train_step( use_train_step_p20 ) ch032_pyramid_1side_2_and_1s6_2s6 = KModel_builder().set_model_name(MODEL_NAME.multi_flow_unet).set_multi_model_builders(op_type="I_to_Wxyz_to_Cxy_general", I_to_Wx_Wy_Wz=ch032_pyramid_1side_2, W_to_Cx_Cy=W_w_M_to_Cxy_Tcrop255_p20_2s_L5).set_multi_model_separate_focus(I_to_W_separ=False, I_to_W_focus=True, W_to_C_separ=False, W_to_C_focus=True).set_gen_op( use_gen_op_p20 ).set_train_step( use_train_step_p20 ) ch032_pyramid_1side_3_and_1s6_2s6 = KModel_builder().set_model_name(MODEL_NAME.multi_flow_unet).set_multi_model_builders(op_type="I_to_Wxyz_to_Cxy_general", I_to_Wx_Wy_Wz=ch032_pyramid_1side_3, W_to_Cx_Cy=W_w_M_to_Cxy_Tcrop255_p20_2s_L5).set_multi_model_separate_focus(I_to_W_separ=False, I_to_W_focus=True, W_to_C_separ=False, W_to_C_focus=True).set_gen_op( use_gen_op_p20 ).set_train_step( use_train_step_p20 ) ch032_pyramid_1side_4_and_1s6_2s6 = KModel_builder().set_model_name(MODEL_NAME.multi_flow_unet).set_multi_model_builders(op_type="I_to_Wxyz_to_Cxy_general", I_to_Wx_Wy_Wz=ch032_pyramid_1side_4, W_to_Cx_Cy=W_w_M_to_Cxy_Tcrop255_p20_2s_L5).set_multi_model_separate_focus(I_to_W_separ=False, I_to_W_focus=True, W_to_C_separ=False, W_to_C_focus=True).set_gen_op( use_gen_op_p20 ).set_train_step( use_train_step_p20 ) ch032_pyramid_1side_5_and_1s6_2s6 = KModel_builder().set_model_name(MODEL_NAME.multi_flow_unet).set_multi_model_builders(op_type="I_to_Wxyz_to_Cxy_general", I_to_Wx_Wy_Wz=ch032_pyramid_1side_5, W_to_Cx_Cy=W_w_M_to_Cxy_Tcrop255_p20_2s_L5).set_multi_model_separate_focus(I_to_W_separ=False, I_to_W_focus=True, W_to_C_separ=False, W_to_C_focus=True).set_gen_op( use_gen_op_p20 ).set_train_step( use_train_step_p20 ) ch032_pyramid_1side_6_and_1s6_2s6 = KModel_builder().set_model_name(MODEL_NAME.multi_flow_unet).set_multi_model_builders(op_type="I_to_Wxyz_to_Cxy_general", I_to_Wx_Wy_Wz=ch032_pyramid_1side_6, W_to_Cx_Cy=W_w_M_to_Cxy_Tcrop255_p20_2s_L5).set_multi_model_separate_focus(I_to_W_separ=False, I_to_W_focus=True, W_to_C_separ=False, W_to_C_focus=True).set_gen_op( use_gen_op_p20 ).set_train_step( use_train_step_p20 ) ch032_pyramid_1side_7_and_1s6_2s6 = KModel_builder().set_model_name(MODEL_NAME.multi_flow_unet).set_multi_model_builders(op_type="I_to_Wxyz_to_Cxy_general", I_to_Wx_Wy_Wz=ch032_pyramid_1side_7, W_to_Cx_Cy=W_w_M_to_Cxy_Tcrop255_p20_2s_L5).set_multi_model_separate_focus(I_to_W_separ=False, I_to_W_focus=True, W_to_C_separ=False, W_to_C_focus=True).set_gen_op( use_gen_op_p20 ).set_train_step( use_train_step_p20 ) ch032_pyramid_1side_8_and_1s6_2s6 = KModel_builder().set_model_name(MODEL_NAME.multi_flow_unet).set_multi_model_builders(op_type="I_to_Wxyz_to_Cxy_general", I_to_Wx_Wy_Wz=ch032_pyramid_1side_8, W_to_Cx_Cy=W_w_M_to_Cxy_Tcrop255_p20_2s_L5).set_multi_model_separate_focus(I_to_W_separ=False, I_to_W_focus=True, W_to_C_separ=False, W_to_C_focus=True).set_gen_op( use_gen_op_p20 ).set_train_step( use_train_step_p20 ) ch032_pyramid_1side_9_and_1s6_2s6 = KModel_builder().set_model_name(MODEL_NAME.multi_flow_unet).set_multi_model_builders(op_type="I_to_Wxyz_to_Cxy_general", I_to_Wx_Wy_Wz=ch032_pyramid_1side_9, W_to_Cx_Cy=W_w_M_to_Cxy_Tcrop255_p20_2s_L5).set_multi_model_separate_focus(I_to_W_separ=False, I_to_W_focus=True, W_to_C_separ=False, W_to_C_focus=True).set_gen_op( use_gen_op_p20 ).set_train_step( use_train_step_p20 ) ######################################################################################### ############################################################################################################################################################################################### if(__name__ == "__main__"): import numpy as np print("build_model cost time:", time.time() - start_time) data = np.zeros(shape=(1, 512, 512, 1)) use_model = ch032_pyramid_1side_4_and_1s6_2s6 use_model = use_model.build() result = use_model.generator(data, Mask=data) print(result[0].shape) from kong_util.tf_model_util import Show_model_weights Show_model_weights(use_model.generator) use_model.generator.summary()
[ "s89334roy@yahoo.com.tw" ]
s89334roy@yahoo.com.tw
c824fd1884b5d04e2dbd69645eafc7d1f0077a29
37f1563cdacf4b37b5b927b892538218aae79c77
/medium/string/findAndReplacePattern.py
10a8d751878274bf0b03f1f2f1c0571cf919e852
[]
no_license
unsortedtosorted/elgoog
9dee49a20f981305910a8924d86e8f2a16fe14c2
5be9fab24c0c1fd9d5dc7a7bdaca105f1ca873ee
refs/heads/master
2020-04-15T00:51:12.114249
2019-05-19T04:37:24
2019-05-19T04:37:24
164,254,079
0
0
null
null
null
null
UTF-8
Python
false
false
967
py
""" #890 Find and Replace pattern 1. Runtime : O(P + W*N ) """ class Solution: def findAndReplacePattern(self, words, pattern): """ :type words: List[str] :type pattern: str :rtype: List[str] """ p="" pm={} for i,x in enumerate(pattern): if x in pm: p=p+pm[x] else: p=p+str(i) pm[x]=str(i) r = [] for word in words: w="" wm={} if len(word)!=len(pattern): continue for i,x in enumerate(word): if x in wm: w=w+wm[x] else: w=w+str(i) wm[x]=str(i) if w==p: r.append(word) return (r)
[ "noreply@github.com" ]
unsortedtosorted.noreply@github.com
e5e6e121285d7248c84fdf05f7584f8e05b9251f
438d6a867e23e49fe84041d1dcb3456b71af8ebb
/Modulos/entradas/models.py
54d3b94c457ff563b802ec8f071b7d5589d0c784
[]
no_license
Nicko1722/inventario-is
76d0108ecd2e01843c60292d80f6c27c39f53faa
b7ed35de235673ad896ffdcefcf6d6c9c08501c5
refs/heads/master
2021-01-01T03:56:34.485005
2016-04-24T21:35:07
2016-04-24T21:35:07
56,994,494
0
0
null
null
null
null
UTF-8
Python
false
false
359
py
from django.db import models from Modulos.inventario.models import Producto from django.contrib.auth.models import User # Create your models here. class Entrada(models.Model): usuario = models.ForeignKey(User) producto = models.ForeignKey(Producto) fecha = models.DateField(auto_now_add=True) unidades = models.PositiveIntegerField()
[ "ioswxd@gmail.com" ]
ioswxd@gmail.com
e346746ff6b18c3d47a4d0417aebf6bbe6593c32
e9321204dfca38eaf12eca38f83476879c170441
/bwi_my_ws/bwi_ws/devel/lib/python2.7/dist-packages/bwi_msgs/msg/_LEDControlFeedback.py
fa964812af45f7efee3aa6131e7b8cb289fbe085
[]
no_license
jumperbeng/backup
1d96d471e4aa1adc1179fa78db02b08ff944f7ab
64e36db87446ddae132524e19fef45f2b1b01242
refs/heads/master
2021-07-14T08:27:34.831316
2017-10-17T04:09:31
2017-10-17T04:09:31
107,211,167
1
0
null
null
null
null
UTF-8
Python
false
false
3,917
py
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from bwi_msgs/LEDControlFeedback.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import genpy class LEDControlFeedback(genpy.Message): _md5sum = "75824f08f05571689ccf412bca8194f3" _type = "bwi_msgs/LEDControlFeedback" _has_header = False #flag to mark the presence of a Header object _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== #feedback duration time_running """ __slots__ = ['time_running'] _slot_types = ['duration'] def __init__(self, *args, **kwds): """ Constructor. Any message fields that are implicitly/explicitly set to None will be assigned a default value. The recommend use is keyword arguments as this is more robust to future message changes. You cannot mix in-order arguments and keyword arguments. The available fields are: time_running :param args: complete set of field values, in .msg order :param kwds: use keyword arguments corresponding to message field names to set specific fields. """ if args or kwds: super(LEDControlFeedback, self).__init__(*args, **kwds) #message fields cannot be None, assign default values for those that are if self.time_running is None: self.time_running = genpy.Duration() else: self.time_running = genpy.Duration() def _get_types(self): """ internal API method """ return self._slot_types def serialize(self, buff): """ serialize message into buffer :param buff: buffer, ``StringIO`` """ try: _x = self buff.write(_struct_2i.pack(_x.time_running.secs, _x.time_running.nsecs)) except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))) def deserialize(self, str): """ unpack serialized message in str into this message instance :param str: byte array of serialized message, ``str`` """ try: if self.time_running is None: self.time_running = genpy.Duration() end = 0 _x = self start = end end += 8 (_x.time_running.secs, _x.time_running.nsecs,) = _struct_2i.unpack(str[start:end]) self.time_running.canon() return self except struct.error as e: raise genpy.DeserializationError(e) #most likely buffer underfill def serialize_numpy(self, buff, numpy): """ serialize message with numpy array types into buffer :param buff: buffer, ``StringIO`` :param numpy: numpy python module """ try: _x = self buff.write(_struct_2i.pack(_x.time_running.secs, _x.time_running.nsecs)) except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(locals().get('_x', self))))) except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(locals().get('_x', self))))) def deserialize_numpy(self, str, numpy): """ unpack serialized message in str into this message instance using numpy for array types :param str: byte array of serialized message, ``str`` :param numpy: numpy python module """ try: if self.time_running is None: self.time_running = genpy.Duration() end = 0 _x = self start = end end += 8 (_x.time_running.secs, _x.time_running.nsecs,) = _struct_2i.unpack(str[start:end]) self.time_running.canon() return self except struct.error as e: raise genpy.DeserializationError(e) #most likely buffer underfill _struct_I = genpy.struct_I _struct_2i = struct.Struct("<2i")
[ "wangzixuan828@gmail.com" ]
wangzixuan828@gmail.com
d68a1825942a601091c0bb9216565841509b6d29
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_5690574640250880_0/Python/Hierynomus/MinesweeperMaster.py
63f8968bba3f816d5a599a74f31c299ba2954136
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
Python
false
false
2,993
py
import sys R = 0 C = 0 M = 0 def gridToString(grid): return '\n'.join([''.join(line) for line in grid]) def transposedGridToString(grid): return '\n'.join([''.join([grid[y][x] for y in range(R)]) for x in range(C)]) def fillGrid(grid): if M == 0: return x, y = (0, 0) m = M # Fill left to right until one but last row or 1 mine left while m > 1 and y < R - 2: grid[y][x] = '*' m -= 1 x = x + 1 if (x == C): x = 0 y += 1 # Fill top to bottom until one mine left while m > 1: grid[y][x] = '*' m -= 1 if y == R - 2: y = y + 1 else: y = y - 1 x = x + 1 # If last mine would be placed at one-but-last # And there are still 2 rows underneath empty # Move to first of new row if x == C - 2 and y < R - 2: grid[y + 1][0] = '*' else: grid[y][x] = '*' # # Last mine # if x + 1 == C - 1 and y + 1 < R: # # Now in second to last column and not on last row # grid[y + 1][0] = '*' # elif x == 1 and C > 2: # # Let's place the last one at the end of the row # grid[y][C - 1] = '*' # else: # grid[y][x] = '*' neig = [(i, j) for i in (-1, 0, 1) for j in (-1, 0, 1) if not (i == j == 0)] def get_adjacent_cells(grid, x, y): for dx, dy in neig: if 0 <= (x + dx) < C and 0 <= y + dy < R: yield grid[y + dy][x + dx] def cleanCells(grid, x, y): for dx, dy in neig: ny = y + dy nx = x + dx if 0 <= nx < C and 0 <= ny < R and not grid[ny][nx] == 'c': grid[ny][nx] = '.' def hasNeighbourMines(grid, x, y): l = list(get_adjacent_cells(grid, x, y)) # print x, y, l return '*' in l def doPlacement(grid): # We can always place right-bottom if R * C > M: grid[R - 1][C - 1] = 'c' else: # Already done all are mines return for x in reversed(range(C)): for y in reversed(range(R)): if grid[y][x] in ['?', 'c', '.'] and not hasNeighbourMines(grid, x, y): cleanCells(grid, x, y) if '*' == grid[y][x]: break def solveOne(file): global R, C, M R, C, M = map(lambda s: int(s), file.readline().split()) print("R = ", R, "C = ", C, "M = ", M) grid = [['?' for x in range(C)] for y in range(R)] fillGrid(grid) doPlacement(grid) s = gridToString(grid) if '?' in s: # Transpose R, C = C, R grid = [['?' for x in range(C)] for y in range(R)] fillGrid(grid) doPlacement(grid) s = transposedGridToString(grid) print s return s if '?' not in s else "Impossible" f = open(sys.argv[1], 'r') of = open(sys.argv[2], 'w') T = int(f.readline()) print "Running [%s] Cases" % T for t in range(T): res = solveOne(f) of.write("Case #%d:\n%s\n" % (t + 1, res)) f.close() of.close()
[ "eewestman@gmail.com" ]
eewestman@gmail.com
03a2b85cdb052abbcb6f2660163bdf3dd59091cd
2f98aa7e5bfc2fc5ef25e4d5cfa1d7802e3a7fae
/python/python_12741.py
a2e3fa15d62721986e84d9154196302337e35430
[]
no_license
AK-1121/code_extraction
cc812b6832b112e3ffcc2bb7eb4237fd85c88c01
5297a4a3aab3bb37efa24a89636935da04a1f8b6
refs/heads/master
2020-05-23T08:04:11.789141
2015-10-22T19:19:40
2015-10-22T19:19:40
null
0
0
null
null
null
null
UTF-8
Python
false
false
88
py
# '==' operator not working correctly in python base_addr.value == base_addr_temp.value
[ "ubuntu@ip-172-31-7-228.us-west-2.compute.internal" ]
ubuntu@ip-172-31-7-228.us-west-2.compute.internal
c40ab6abed19bb93242d6c71cdc7ea9bd555c69a
7002ec859c1f8d59448dba5f091a3c1162cb4d92
/App/forms.py
093cabcf41ebe13a0e84cb356e1ed8cba847f25a
[]
no_license
shubhamjain31/Employee_Management_System
39ad0226b6b6ca86b9ff3fc132d8467d0adbf802
e80d09a8f9c93a65fc64c1179d21130059e23780
refs/heads/main
2023-08-06T00:53:57.498939
2021-09-16T16:29:08
2021-09-16T16:29:08
null
0
0
null
null
null
null
UTF-8
Python
false
false
2,688
py
from django import forms from App.models import Employee, Company # This is for employee class EmployeeForm(forms.ModelForm): eFname = forms.CharField( label = 'First Name', widget = forms.TextInput(attrs={ 'class': 'form-control', 'placeholder': 'First Name', 'rows': 1 }) ) eLname = forms.CharField( label = 'Last Name', widget = forms.TextInput(attrs={ 'class': 'form-control', 'placeholder': 'Last Name', 'rows': 1 }) ) eCompany = forms.ModelChoiceField(queryset=Company.objects.all(), empty_label='-----', to_field_name="cName", error_messages={ 'required' : 'Please Select Company Name', }, widget=forms.Select( attrs={ "placeholder" : "Company", "class" : "form-control form-control-alternative", } )) eEmail = forms.EmailField(error_messages={ 'required' : 'Please Enter Company Email', }, widget=forms.EmailInput( attrs={ "placeholder" : "Employee Email", "class" : "form-control form-control-alternative" } )) ePhone = forms.CharField( label = 'Employee Phone', widget = forms.TextInput(attrs={ 'class': 'form-control', 'placeholder': 'Employee Phone', 'rows': 1 }) ) class Meta: model = Employee fields = ['eFname', 'eLname', 'eCompany', 'eEmail', 'ePhone'] # This is for company class CompanyForm(forms.ModelForm): cName = forms.CharField( label = 'Customer', widget = forms.TextInput(attrs={ 'class': 'form-control', 'placeholder': 'Company Name', 'rows': 1 }) ) cEmail = forms.EmailField(error_messages={ 'required' : 'Please Enter Company Email', }, widget=forms.EmailInput( attrs={ "placeholder" : "Company Email", "class" : "form-control form-control-alternative" } )) cLogo = forms.FileField(required=False) cUrl = forms.CharField( label = 'Customer', widget = forms.TextInput(attrs={ 'class': 'form-control', 'placeholder': 'Company URL', 'rows': 1 }) ) class Meta: model = Company fields = ['cName', 'cEmail', 'cLogo', 'cUrl']
[ "sj27754@gmail.com" ]
sj27754@gmail.com
53116c468f023c8dc22f35757c12e5ea7a48855c
f9d564f1aa83eca45872dab7fbaa26dd48210d08
/huaweicloud-sdk-projectman/huaweicloudsdkprojectman/v4/model/create_project_module_response.py
62c7bbfa7375d683eb98a59a28db5cbf95bb5dc2
[ "Apache-2.0" ]
permissive
huaweicloud/huaweicloud-sdk-python-v3
cde6d849ce5b1de05ac5ebfd6153f27803837d84
f69344c1dadb79067746ddf9bfde4bddc18d5ecf
refs/heads/master
2023-09-01T19:29:43.013318
2023-08-31T08:28:59
2023-08-31T08:28:59
262,207,814
103
44
NOASSERTION
2023-06-22T14:50:48
2020-05-08T02:28:43
Python
UTF-8
Python
false
false
5,790
py
# coding: utf-8 import six from huaweicloudsdkcore.sdk_response import SdkResponse from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class CreateProjectModuleResponse(SdkResponse): """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ sensitive_list = [] openapi_types = { 'description': 'str', 'module_name': 'str', 'module_id': 'int', 'owner': 'ModuleOwner' } attribute_map = { 'description': 'description', 'module_name': 'module_name', 'module_id': 'module_id', 'owner': 'owner' } def __init__(self, description=None, module_name=None, module_id=None, owner=None): """CreateProjectModuleResponse The model defined in huaweicloud sdk :param description: 模块描述 :type description: str :param module_name: 模块名称 :type module_name: str :param module_id: 模块id :type module_id: int :param owner: :type owner: :class:`huaweicloudsdkprojectman.v4.ModuleOwner` """ super(CreateProjectModuleResponse, self).__init__() self._description = None self._module_name = None self._module_id = None self._owner = None self.discriminator = None if description is not None: self.description = description if module_name is not None: self.module_name = module_name if module_id is not None: self.module_id = module_id if owner is not None: self.owner = owner @property def description(self): """Gets the description of this CreateProjectModuleResponse. 模块描述 :return: The description of this CreateProjectModuleResponse. :rtype: str """ return self._description @description.setter def description(self, description): """Sets the description of this CreateProjectModuleResponse. 模块描述 :param description: The description of this CreateProjectModuleResponse. :type description: str """ self._description = description @property def module_name(self): """Gets the module_name of this CreateProjectModuleResponse. 模块名称 :return: The module_name of this CreateProjectModuleResponse. :rtype: str """ return self._module_name @module_name.setter def module_name(self, module_name): """Sets the module_name of this CreateProjectModuleResponse. 模块名称 :param module_name: The module_name of this CreateProjectModuleResponse. :type module_name: str """ self._module_name = module_name @property def module_id(self): """Gets the module_id of this CreateProjectModuleResponse. 模块id :return: The module_id of this CreateProjectModuleResponse. :rtype: int """ return self._module_id @module_id.setter def module_id(self, module_id): """Sets the module_id of this CreateProjectModuleResponse. 模块id :param module_id: The module_id of this CreateProjectModuleResponse. :type module_id: int """ self._module_id = module_id @property def owner(self): """Gets the owner of this CreateProjectModuleResponse. :return: The owner of this CreateProjectModuleResponse. :rtype: :class:`huaweicloudsdkprojectman.v4.ModuleOwner` """ return self._owner @owner.setter def owner(self, owner): """Sets the owner of this CreateProjectModuleResponse. :param owner: The owner of this CreateProjectModuleResponse. :type owner: :class:`huaweicloudsdkprojectman.v4.ModuleOwner` """ self._owner = owner def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_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: if attr in self.sensitive_list: result[attr] = "****" else: result[attr] = value return result def to_str(self): """Returns the string representation of the model""" import simplejson as json if six.PY2: import sys reload(sys) sys.setdefaultencoding("utf-8") return json.dumps(sanitize_for_serialization(self), ensure_ascii=False) def __repr__(self): """For `print`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, CreateProjectModuleResponse): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
[ "hwcloudsdk@huawei.com" ]
hwcloudsdk@huawei.com
4ab388d8d0e0d57aea8e2618360b21ac2695539d
7c593f4cc70ee56106cc9cce105e6b9e7839431e
/tests/nn_moving_average.py
668ad36ea26c9ff97d100fc9637d63a35adc5bc6
[ "Apache-2.0" ]
permissive
google/objax
84e397cafb70813a1e89467f745facf828ed24b8
a2d025d9e1da8660a1883404207c41d4327d8c48
refs/heads/master
2023-09-02T07:04:26.801269
2023-06-12T22:12:53
2023-06-12T22:12:53
288,923,752
801
80
Apache-2.0
2023-06-12T22:12:54
2020-08-20T06:20:40
Python
UTF-8
Python
false
false
1,921
py
# Copyright 2020 Google LLC # # 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 # # https://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 MovingAverage and ExponentialMovingAverage Layer.""" import unittest import jax.numpy as jn import numpy as np import objax class TestMovingAverage(unittest.TestCase): def test_MovingAverage(self): """Test MovingAverage.""" x1 = jn.array([[0, 1, 2]]) x2 = jn.array([[0, 0, 0]]) x3 = jn.array([[-3, -4, 5]]) init_value = 100 shape = x1.shape ma = objax.nn.MovingAverage(shape=shape, buffer_size=2, init_value=init_value) x_ma1 = ma(x1) x_ma2 = ma(x2) x_ma3 = ma(x3) np.testing.assert_allclose(x_ma1, np.array([[50, 50.5, 51]])) np.testing.assert_allclose(x_ma2, np.array([[0, 0.5, 1]])) np.testing.assert_allclose(x_ma3, np.array([[-1.5, -2, 2.5]])) def test_ExponentialMovingAverage(self): """Test ExponentialMovingAverage.""" x1 = jn.array([[0, 1, 2]]) * 100 x2 = jn.array([[-3, -4, 5]]) * 100 init_value = 100 shape = x1.shape ema = objax.nn.ExponentialMovingAverage(shape=shape, init_value=init_value, momentum=0.8) x_ema1 = ema(x1) x_ema2 = ema(x2) np.testing.assert_allclose(x_ema1, np.array([[80, 100, 120]])) np.testing.assert_allclose(x_ema2, np.array([[4, 0, 196]])) if __name__ == '__main__': unittest.main()
[ "dberth@google.com" ]
dberth@google.com
920da64de4037860257f877a1e15c50ee0aa9612
2daa3894e6d6929fd04145100d8a3be5eedbe21c
/tests/artificial/transf_cumsum/trend_poly/cycle_0/ar_12/test_artificial_128_cumsum_poly_0_12_100.py
fe8bd2b350a1675d404de1ea84265e5c035b44d2
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
Henri-Lo/pyaf
a1f73a0cc807873bd7b79648fe51de9cfd6c126a
08c968425d85dcace974d90db7f07c845a0fe914
refs/heads/master
2021-07-01T12:27:31.600232
2017-09-21T11:19:04
2017-09-21T11:19:04
null
0
0
null
null
null
null
UTF-8
Python
false
false
308
py
import pyaf.Bench.TS_datasets as tsds import pyaf.tests.artificial.process_artificial_dataset as art dataset = tsds.generate_random_TS(N = 128 , FREQ = 'D', seed = 0, trendtype = "poly", cycle_length = 0, transform = "cumsum", sigma = 0.0, exog_count = 100, ar_order = 12); art.process_dataset(dataset);
[ "antoine.carme@laposte.net" ]
antoine.carme@laposte.net
2877d6f7bf785768c362b788247f5dbdb10c3d7a
670eee1bf73cc98e9c16d28847de4fd20f0d3ad8
/detection/object_detection/obj_1_gluoncv_finetune/WindowObj1GluoncvFinetuneDataParam.py
c20165955e45832916cec04c81dc05af5f43a3f8
[ "Apache-2.0" ]
permissive
THEFASHIONGEEK/Monk_Gui
0a0e0165c91f727981a6fbbf24b9528943979e60
7c23cdd3487ae5a5b28b0a3419e4e64022b11e06
refs/heads/master
2020-12-24T04:06:04.772899
2020-02-04T06:21:06
2020-02-04T06:21:06
237,376,939
0
0
Apache-2.0
2020-02-04T06:21:07
2020-01-31T06:56:29
null
UTF-8
Python
false
false
12,340
py
import os import sys import json from PyQt5 import QtCore, QtWidgets from PyQt5.QtWidgets import * from PyQt5.QtGui import * class WindowObj1GluoncvFinetuneDataParam(QtWidgets.QWidget): backward_1_gluoncv_finetune = QtCore.pyqtSignal(); forward_model_param = QtCore.pyqtSignal(); def __init__(self): super().__init__() self.title = 'GluonCV Finetune - Data Param' self.left = 100 self.top = 100 self.width = 800 self.height = 500 self.cfg_setup(); self.initUI(); def cfg_setup(self): if(os.path.isfile("obj_1_gluoncv_finetune.json")): with open('obj_1_gluoncv_finetune.json') as json_file: self.system = json.load(json_file) else: self.system = {}; self.system["anno_type"] = "monk" self.system["root_dir"] = "Monk_Object_Detection/example_notebooks/sample_dataset/kangaroo/"; self.system["img_dir"] = "Images"; self.system["anno_file"] = "train_labels.csv"; self.system["anno_dir"] = ""; self.system["batch_size"] = "4"; self.system["model"] = "ssd_300_vgg16_atrous_coco"; self.system["use_pretrained"] = "yes"; self.system["use_gpu"] = "yes"; self.system["devices"] = "0"; self.system["lr"] = "0.001"; self.system["epochs"] = "2"; self.system["output_model_name"] = "saved_model"; with open('obj_1_gluoncv_finetune.json', 'w') as outfile: json.dump(self.system, outfile) def initUI(self): self.setWindowTitle(self.title) self.setGeometry(self.left, self.top, self.width, self.height); # Backward self.b1 = QPushButton('Back', self) self.b1.move(500,450) self.b1.clicked.connect(self.backward) # Forward self.b2 = QPushButton('Next', self) self.b2.move(600,450) self.b2.clicked.connect(self.forward); # Quit self.b3 = QPushButton('Quit', self) self.b3.move(700,450) self.b3.clicked.connect(self.close) self.tb1 = QTextEdit(self) self.tb1.move(20, 20) self.tb1.resize(400, 450) self.tb1.setText(self.monk_format()); self.tb1.setReadOnly(True) self.r1 = QRadioButton("Monk format", self) if self.system["anno_type"] == "monk": self.r1.setChecked(True) self.r1.move(450,20) self.r1.toggled.connect(self.monk); self.r2 = QRadioButton("VOC format", self) if self.system["anno_type"] == "voc": self.r2.setChecked(True) self.r2.move(600,20) self.r2.toggled.connect(self.voc); self.m = []; self.m_l1 = QLabel(self); self.m_l1.setText("1. root:"); self.m_l1.move(450, 70); self.m.append(self.m_l1); self.m_b1 = QPushButton('Select Folder', self) self.m_b1.move(550,70) self.m_b1.clicked.connect(self.select_root_dataset) self.m.append(self.m_b1); self.m_tb1 = QTextEdit(self) self.m_tb1.move(450, 100) self.m_tb1.resize(300, 50) self.m_tb1.setText(self.system["root_dir"]); self.m_tb1.setReadOnly(True) self.m.append(self.m_tb1); self.m_l2 = QLabel(self); self.m_l2.setText("2. img_dir:"); self.m_l2.move(450, 180); self.m.append(self.m_l2); self.m_b2 = QPushButton('Select Folder', self) self.m_b2.move(550,180) self.m_b2.clicked.connect(self.select_img_dir) self.m.append(self.m_b2); self.m_tb2 = QTextEdit(self) self.m_tb2.move(450, 210) self.m_tb2.resize(300, 50) self.m_tb2.setText(self.system["img_dir"]); self.m_tb2.setReadOnly(True) self.m.append(self.m_tb2); self.m_l3 = QLabel(self); self.m_l3.setText("3. anno_file:"); self.m_l3.move(450, 280); self.m.append(self.m_l3); self.m_b3 = QPushButton('Select File', self) self.m_b3.move(550, 280) self.m_b3.clicked.connect(self.select_anno_file) self.m.append(self.m_b3); self.m_tb3 = QTextEdit(self) self.m_tb3.move(450, 310) self.m_tb3.resize(300, 50) self.m_tb3.setText(self.system["anno_file"]); self.m_tb3.setReadOnly(True) self.m.append(self.m_tb3); self.m_l4 = QLabel(self); self.m_l4.setText("4. batch_size:"); self.m_l4.move(450, 380); self.m.append(self.m_l4); self.m_e4 = QLineEdit(self) self.m_e4.move(550, 380); self.m_e4.setText(self.system["batch_size"]); self.m_e4.resize(200, 25); self.m.append(self.m_e4); self.v = []; self.v_l1 = QLabel(self); self.v_l1.setText("1. root:"); self.v_l1.move(450, 70); self.v.append(self.v_l1); self.v_b1 = QPushButton('Select Folder', self) self.v_b1.move(550,70) self.v_b1.clicked.connect(self.select_root_dataset) self.v.append(self.v_b1); self.v_tb1 = QTextEdit(self) self.v_tb1.move(450, 100) self.v_tb1.resize(300, 50) self.v_tb1.setText(self.system["root_dir"]); self.v_tb1.setReadOnly(True) self.v.append(self.v_tb1); self.v_l2 = QLabel(self); self.v_l2.setText("2. img_dir:"); self.v_l2.move(450, 180); self.v.append(self.v_l2); self.v_b2 = QPushButton('Select Folder', self) self.v_b2.move(550,180) self.v_b2.clicked.connect(self.select_img_dir) self.v.append(self.v_b2); self.v_tb2 = QTextEdit(self) self.v_tb2.move(450, 210) self.v_tb2.resize(300, 50) self.v_tb2.setText(self.system["img_dir"]); self.v_tb2.setReadOnly(True) self.v.append(self.v_tb2); self.v_l3 = QLabel(self); self.v_l3.setText("3. anno_dir:"); self.v_l3.move(450, 280); self.v.append(self.v_l3); self.v_b3 = QPushButton('Select Folder', self) self.v_b3.move(550, 280) self.v_b3.clicked.connect(self.select_anno_dir) self.v.append(self.v_b3); self.v_tb3 = QTextEdit(self) self.v_tb3.move(450, 310) self.v_tb3.resize(300, 50) self.v_tb3.setText(self.system["anno_dir"]); self.v_tb3.setReadOnly(True) self.v.append(self.v_tb3); self.v_l4 = QLabel(self); self.v_l4.setText("4. batch_size:"); self.v_l4.move(450, 380); self.v.append(self.v_l4); self.v_e4 = QLineEdit(self) self.v_e4.move(550, 380); self.v_e4.setText(self.system["batch_size"]); self.v_e4.resize(200, 25); self.v.append(self.v_e4); if self.system["anno_type"] == "monk": self.monk(); else: self.voc(); def monk(self): self.tb1.setText(self.monk_format()); for x in self.m: x.show(); for x in self.v: x.hide(); def voc(self): self.tb1.setText(self.voc_format()); for x in self.m: x.hide(); for x in self.v: x.show(); def select_root_dataset(self): options = QFileDialog.Options() options |= QFileDialog.DontUseNativeDialog folderName = QFileDialog.getExistingDirectory(self,"QFileDialog.getExistingDirectory()", os.getcwd()) if self.r1.isChecked(): self.m_b1.setText("Selected"); self.m_tb1.setText(folderName); if self.r2.isChecked(): self.v_b1.setText("Selected"); self.v_tb1.setText(folderName); self.system["root_dir"] = folderName; def select_img_dir(self): options = QFileDialog.Options() options |= QFileDialog.DontUseNativeDialog folderName = QFileDialog.getExistingDirectory(self,"QFileDialog.getExistingDirectory()", self.system["root_dir"]) folderName = folderName.split("/")[-1]; if self.r1.isChecked(): self.m_b2.setText("Selected"); self.m_tb2.setText(folderName); if self.r2.isChecked(): self.v_b2.setText("Selected"); self.v_tb2.setText(folderName); self.system["img_dir"] = folderName; def select_anno_file(self): options = QFileDialog.Options() options |= QFileDialog.DontUseNativeDialog fileName, _ = QFileDialog.getOpenFileName(self,"QFileDialog.getOpenFileName()", self.system["root_dir"], "Monk Project Files (*.csv);;All Files (*)", options=options) if fileName: fileName = fileName.split("/")[-1]; self.system["anno_file"] = fileName; self.m_b3.setText("Selected"); self.m_tb3.setText(fileName); def select_anno_dir(self): options = QFileDialog.Options() options |= QFileDialog.DontUseNativeDialog folderName = QFileDialog.getExistingDirectory(self,"QFileDialog.getExistingDirectory()", self.system["root_dir"]) folderName = folderName.split("/")[-1]; self.v_b3.setText("Selected"); self.v_tb3.setText(folderName); self.system["anno_dir"] = folderName; def forward(self): if self.r1.isChecked(): self.system["anno_type"] == "monk"; self.system["batch_size"] = self.m_e4.text(); else: self.system["anno_type"] == "voc"; self.system["batch_size"] = self.v_e4.text(); with open('obj_1_gluoncv_finetune.json', 'w') as outfile: json.dump(self.system, outfile) self.forward_model_param.emit(); def backward(self): if self.r1.isChecked(): self.system["anno_type"] == "monk"; self.system["batch_size"] = self.m_e4.text(); else: self.system["anno_type"] == "voc"; self.system["batch_size"] = self.v_e4.text(); with open('obj_1_gluoncv_finetune.json', 'w') as outfile: json.dump(self.system, outfile) self.backward_1_gluoncv_finetune.emit(); def monk_format(self): wr = ""; wr += "Monk Type Data Format\n" wr += "Dataset Directory Structure\n\n"; wr += "Parent_Directory (root)\n"; wr += " |\n"; wr += " |-----------Images (img_dir)\n"; wr += " | |\n"; wr += " | |------------------img1.jpg\n"; wr += " | |------------------img2.jpg\n"; wr += " | |------------------.........(and so on)\n"; wr += " |\n"; wr += " |\n"; wr += " |-----------train_labels.csv (anno_file)\n\n"; wr += "Annotation file format\n"; wr += " | Id | Labels |\n"; wr += " | img1.jpg | x1 y1 x2 y2 label1 x1 y1 x2 y2 label2 |\n"; wr += " Labels: xmin ymin xmax ymax label\n"; wr += " xmin, ymin - top left corner of bounding box\n"; wr += " xmax, ymax - bottom right corner of bounding box\n"; return wr; def voc_format(self): wr = ""; wr += "VOC Type Data Format\n" wr += "Dataset Directory Structure\n\n"; wr += "Parent_Directory (root)\n"; wr += " |\n"; wr += " |-----------Images (img_dir)\n"; wr += " | |\n"; wr += " | |------------------img1.jpg\n"; wr += " | |------------------img2.jpg\n"; wr += " | |------------------.........(and so on)\n"; wr += " |\n"; wr += " |\n"; wr += " |-----------Annotations (anno_dir)\n"; wr += " | |\n"; wr += " | |------------------img1.xml\n"; wr += " | |------------------img2.xml\n"; wr += " | |------------------.........(and so on)\n"; return wr; ''' app = QApplication(sys.argv) screen = WindowObj1GluoncvFinetuneDataParam() screen.show() sys.exit(app.exec_()) '''
[ "abhishek4273@gmail.com" ]
abhishek4273@gmail.com
31388253ad9f976d7fc459180e78b72315cb0b27
de24f83a5e3768a2638ebcf13cbe717e75740168
/moodledata/vpl_data/303/usersdata/289/82677/submittedfiles/testes.py
cd6176c92d865353ff61835fc612cd1756f0a12f
[]
no_license
rafaelperazzo/programacao-web
95643423a35c44613b0f64bed05bd34780fe2436
170dd5440afb9ee68a973f3de13a99aa4c735d79
refs/heads/master
2021-01-12T14:06:25.773146
2017-12-22T16:05:45
2017-12-22T16:05:45
69,566,344
0
0
null
null
null
null
UTF-8
Python
false
false
124
py
n = int(input("Digite um número: ")) i = 1 cont = 0 while (i<n): ifi%2==1: cont=cont+i i = i+1 print(cont)
[ "rafael.mota@ufca.edu.br" ]
rafael.mota@ufca.edu.br
2f727ec747999ca318d678a2849754bc2c28fa40
d49cfe38764aa35992ba5cf65655a6a45d9487c8
/旋转矩阵.py
12438a807352bdee830a20ba6fcda6d71748d2fc
[]
no_license
getabear/leetcode
fc0797f664ab4052aa2635341f4bbe40b74ec2b8
4af6608166f2e4cdfcfb0bbb92133b4a0f90ea34
refs/heads/master
2021-07-15T11:05:23.049235
2020-11-15T12:57:14
2020-11-15T12:57:14
224,601,175
0
0
null
null
null
null
UTF-8
Python
false
false
344
py
from typing import List class Solution: def rotate(self, matrix: List[List[int]]) -> None: high=len(matrix) width=len(matrix[0]) tmp=[[0 for i in range(width)] for j in range(high)] for i in range(high): for j in range(width): tmp[j][width-i-1]=matrix[i][j] matrix[:]=tmp
[ "1874178998@qq.com" ]
1874178998@qq.com
19946adb6c4387a7e49170a912c4c7ecbfb5a0f0
a0eceb74aeb933defece02c5c74d0872c35e9742
/django_bootstrap3view/django_bootstrap3view_app/utils/render.py
e71eb23c53a48748e6bcf7f49450decae5308593
[ "BSD-3-Clause" ]
permissive
bossiernesto/django-bootstrap3-classview
77ab317a818521437b64a4599083ec5cdf762e29
25d5efdf321953578fd1aaa6f1e3dd6ee688f806
refs/heads/master
2021-01-21T21:47:38.735681
2016-04-20T00:44:43
2016-04-20T00:44:43
17,086,076
0
1
null
null
null
null
UTF-8
Python
false
false
346
py
from django.template.loader import get_template from django.template import Context, Template def render(template, context): context = Context(context) return get_template(template).render(context) def render_string(string, context): template = Template(string) context = Context(context) return template.render(context)
[ "bossi.ernestog@gmail.com" ]
bossi.ernestog@gmail.com
f03fc963c85f85a748d2f0eaf1fbb2922fdb2816
f2770a694a8aedb71c326ced49e76531d69d9f4f
/bin_SPIDERS_CLUSTERS/create_gaia_mask_CODEX.py
ed05458c277af7fc3b8f8f23cddfede122232c25
[]
no_license
JohanComparat/makeSample
258280ccb0f9dfa7dc13e934f453c520a1f416b8
b15f942f51750f504150f6ec29eba857123c29c4
refs/heads/master
2021-06-07T18:21:27.559530
2020-01-22T08:46:04
2020-01-22T08:46:04
106,016,246
2
2
null
null
null
null
UTF-8
Python
false
false
5,189
py
import astropy.io.fits as fits import os, sys, glob from os.path import join #import pymangle as mangle import numpy as np import matplotlib.pyplot as p from scipy.interpolate import interp1d import astropy.units as u import astropy.cosmology as cc cosmo = cc.Planck13 from astropy.coordinates import SkyCoord from sklearn.neighbors import BallTree, DistanceMetric from astropy.table import Table,unique from math import radians, cos, sin, asin, sqrt, pi in_dir = '/data36s/comparat/CODEX_clustering/catalogs/' out_dir = '/data36s/comparat/CODEX_clustering/angular_clustering/' deg_to_rad = np.pi/180. arcsec = 1. / 3600. rs = 10**np.arange(-1,1.6,0.1) *arcsec #rs = 10**np.arange(-1,2.6,0.1) *arcsec # DATA path_2_data_2rxs = join( in_dir, 'cat_spiders_masked_X.fits' ) data_file = path_2_data_2rxs ra_name_data = 'RA' dec_name_data = 'Dec' hduD = fits.open(data_file) ra_data = hduD[1].data[ra_name_data] dec_data = hduD[1].data[dec_name_data] z_data = hduD[1].data['z'] coords = SkyCoord(ra_data, dec_data, unit='deg', frame='icrs') bb_data = coords.galactic.b.value ll_data = coords.galactic.l.value bb_ecl_data = coords.barycentrictrueecliptic.lat selection_data = (z_data>0) N_data = len(ra_data[selection_data]) # GAIA CATALOGS gaia_dir = '/data44s/eroAGN_WG_DATA/DATA/photometry/catalogs/GAIA/DR2/' gaia_table_list = np.array(glob.glob(os.path.join(gaia_dir, 'table_*.fits'))) gaia_table_list.sort() for gaia_file in gaia_table_list[1:][::-1][:5]: print(gaia_file) hdu_G = fits.open(gaia_file) ra_gaia, dec_gaia = hdu_G[1].data['ra'], hdu_G[1].data['dec'] coords = SkyCoord(ra_gaia, dec_gaia, unit='deg', frame='icrs') bb_gaia = coords.galactic.b.value ll_gaia = coords.galactic.l.value bb_ecl_gaia = coords.barycentrictrueecliptic.lat x_gal_gaia = (abs(bb_gaia)>20)&(dec_gaia<80)&(dec_gaia>-80)&(bb_ecl_gaia.value>-80) selection_gaia = (x_gal_gaia) N_gaia = len(ra_gaia[selection_gaia]) agn_coordinates = deg_to_rad * np.transpose([dec_data[selection_data], ra_data[selection_data]]) gaia_coordinates = deg_to_rad * np.transpose([dec_gaia[selection_gaia], ra_gaia[selection_gaia]]) Tree_obj_Gaia = BallTree(gaia_coordinates, metric='haversine') Tree_obj_AGN = BallTree(agn_coordinates , metric='haversine') test_c = np.array([ Tree_obj_Gaia.query_radius(agn_coordinates, r = rr, count_only=True) for rr in rs ]) N_pairs_total = test_c.sum(axis=1) Delta_N_pairs = N_pairs_total[1:]-N_pairs_total[:-1] area = 4.*np.pi*(rs[1:]**2 - rs[:-1]**2) pair_density = Delta_N_pairs/(area*N_data*N_gaia) out_data = os.path.join(out_dir , 'cat_spiders_masked_X_GAIA_'+os.path.basename(gaia_file)+'.data') np.savetxt(out_data, np.transpose([rs[1:], pair_density]), header='radius_arcsec density' ) # EXCEPTION for the first file, that has a broad magnitude range 1-5 that I re-cut by hand into 2 and extend the radius. gaia_file = gaia_table_list[0] print(gaia_file) hdu_G = fits.open(gaia_file) ra_gaia, dec_gaia = hdu_G[1].data['ra'], hdu_G[1].data['dec'] coords = SkyCoord(ra_gaia, dec_gaia, unit='deg', frame='icrs') bb_gaia = coords.galactic.b.value ll_gaia = coords.galactic.l.value bb_ecl_gaia = coords.barycentrictrueecliptic.lat g_mag = hdu_G[1].data['phot_g_mean_mag'] x_gal_gaia = (abs(bb_gaia)>20)&(dec_gaia<80)&(dec_gaia>-80)&(bb_ecl_gaia.value>-80) mag_sel = (g_mag>4) selection_gaia = (x_gal_gaia)&(mag_sel) N_gaia = len(ra_gaia[selection_gaia]) # Tree to select pairs # COUNT UNIQUE agn_coordinates = deg_to_rad * np.transpose([dec_data[selection_data], ra_data[selection_data]]) gaia_coordinates = deg_to_rad * np.transpose([dec_gaia[selection_gaia], ra_gaia[selection_gaia]]) Tree_obj_Gaia = BallTree(gaia_coordinates, metric='haversine') Tree_obj_AGN = BallTree(agn_coordinates , metric='haversine') test_c = np.array([ Tree_obj_Gaia.query_radius(agn_coordinates, r = rr, count_only=True) for rr in rs ]) N_pairs_total = test_c.sum(axis=1) Delta_N_pairs = N_pairs_total[1:]-N_pairs_total[:-1] area = 4.*np.pi*(rs[1:]**2 - rs[:-1]**2) pair_density = Delta_N_pairs/(area*N_data*N_gaia) out_data = os.path.join(out_dir , 'cat_spiders_masked_X_GAIA_table_4_g_5.fits.data') np.savetxt(out_data, np.transpose([rs[1:], pair_density]), header='radius_arcsec density' ) mag_sel = (g_mag<=4) selection_gaia = (x_gal_gaia)&(mag_sel) N_gaia = len(ra_gaia[selection_gaia]) # Tree to select pairs # COUNT UNIQUE agn_coordinates = deg_to_rad * np.transpose([dec_data[selection_data], ra_data[selection_data]]) gaia_coordinates = deg_to_rad * np.transpose([dec_gaia[selection_gaia], ra_gaia[selection_gaia]]) Tree_obj_Gaia = BallTree(gaia_coordinates, metric='haversine') Tree_obj_AGN = BallTree(agn_coordinates , metric='haversine') test_c = np.array([ Tree_obj_Gaia.query_radius(agn_coordinates, r = rr, count_only=True) for rr in rs ]) N_pairs_total = test_c.sum(axis=1) Delta_N_pairs = N_pairs_total[1:]-N_pairs_total[:-1] area = 4.*np.pi*(rs[1:]**2 - rs[:-1]**2) pair_density = Delta_N_pairs/(area*N_data*N_gaia) out_data = os.path.join(out_dir , 'cat_spiders_masked_X_GAIA_table_1_g_4.fits.data') np.savetxt(out_data, np.transpose([rs[1:], pair_density]), header='radius_arcsec density' )
[ "johan.comparat@gmail.com" ]
johan.comparat@gmail.com
69428a8de65e3a9d7e128759819730afde9441e3
2b88e4385b2ed720005f9809e257ef0ed5b6b1d5
/hashing/Permutations_of_A_in_B.py
aa12c64fb98d821e421e8a2807a9927423d7bf71
[]
no_license
arnabs542/DataStructures_Algorithms
c5efbbbea9aafc3406b8cefa7bf4c33c4c3c6f2e
431e7bddcb04f7a3df84fcd6ee823fd91ce317ad
refs/heads/master
2023-06-16T13:11:25.378555
2021-07-08T13:29:00
2021-07-08T13:29:00
null
0
0
null
null
null
null
UTF-8
Python
false
false
1,787
py
''' Permutations of A in B You are given two strings A and B of size N and M respectively. You have to find the count of all permutations of A present in B as a substring. You can assume a string will have only lowercase letters. Problem Constraints 1 <= N < M <= 105 Example Input Input 1: A = "abc" B = "abcbacabc" Input 2: A = "aca" B = "acaa" Example Output Output 1: 5 Output 2: 2 ''' # we will maintain two frequency hashmaps # one map will have the pattern string and another will be the search window of the main string # the window will be from i to j # for each window check if the window hashmap is equal to the pattern map class Solution: # comparing maps def cmp(self,win,map): for key in map: if key not in win or win[key] != map[key]: return 0 return 1 def solve(self, a, b): map = {} window = {} for i in range(len(a)): if a[i] not in map: map[a[i]] = 1 else: map[a[i]] += 1 # initial window for i in range(len(a)): if b[i] not in window: window[b[i]] = 1 else: window[b[i]] += 1 i=0 j=len(a) count = 0 if self.cmp(window,map) == 1: count += 1 # create window from i to j of size len(a) while j<len(b) and i<len(b): if b[j] not in window: window[b[j]] = 1 else: window[b[j]] += 1 window[b[i]] -= 1 j += 1 i += 1 if self.cmp(window,map) == 1: count += 1 return count # TC O(m), m is the len(b) # SC O(m), m is the len(b)
[ "nik.dhoot@gmail.com" ]
nik.dhoot@gmail.com
c6e60e69fb58f34c5459db46cc74163d54e47571
2af4823ae83fbcc780ef538bd02fa5bf3a51208c
/ABC134/C.py
4b2fa43a79291ed0783a652b320f75a2c2d0e7c0
[]
no_license
jre233kei/procon-atcoder
102420cc246a5123ac9774f8b28440f1d8b70b0f
c463c9c92d45f19fba32d0c8a25f97d73db67bc5
refs/heads/master
2022-12-04T09:30:39.271433
2020-08-14T11:38:46
2020-08-14T11:38:46
276,779,835
0
0
null
null
null
null
UTF-8
Python
false
false
427
py
n = int(input()) a = [] maxa = 0 maxa1 = 0 maxcnt = 0 for i in range(n): ai = int(input()) a.append(ai) if maxa < ai: maxa1 = maxa maxa = ai maxcnt = 0 elif maxa == ai: maxcnt += 1 elif maxa1 < ai: maxa1 = ai for i in range(n): if a[i] == maxa: if maxcnt > 0: print(maxa) else: print(maxa1) else: print(maxa)
[ "jre233kei+github@gmail.com" ]
jre233kei+github@gmail.com
f9e7743751a0b8047b216a8b84778e5fb3854cec
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p03503/s091731182.py
541db4752b84f1d8e1675c7c44d0fe983000cf86
[]
no_license
Aasthaengg/IBMdataset
7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901
f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8
refs/heads/main
2023-04-22T10:22:44.763102
2021-05-13T17:27:22
2021-05-13T17:27:22
367,112,348
0
0
null
null
null
null
UTF-8
Python
false
false
512
py
n=int(input()) f=[] P=[] for i in range(n): a=list(map(int,input().split())) f.append(a) for i in range(n): a=list(map(int, input().split())) P.append(a) from itertools import product ans=-(10**10) for p in product([0, 1], repeat = 10): if sum(p)!=0: ret = 0 for i in range(n): cnt = 0 for j in range(10): if p[j] == f[i][j] and p[j] == 1: cnt += 1 ret += P[i][cnt] ans = max(ans, ret) print(ans)
[ "66529651+Aastha2104@users.noreply.github.com" ]
66529651+Aastha2104@users.noreply.github.com
48a2bf2dd99c7b1445e55e0a5edd5549e1dfd5cd
5131a1b062c6a3c07479645a1fdfaa429f5375c4
/gradslam/datasets/icl.py
c23acf09252e20536a3093ef35a3cb9ffd4d0f8f
[ "MIT" ]
permissive
zeta1999/gradslam
e6d72c7dfe177cf7955ba1f496529e8f6514a4f2
1804dc9d9b940ffbacbb6717c6e9fe15b1070510
refs/heads/main
2023-01-12T09:22:34.603036
2020-11-11T03:13:40
2020-11-11T03:13:40
null
0
0
null
null
null
null
UTF-8
Python
false
false
25,353
py
import os import warnings from typing import Optional, Union import cv2 import imageio import numpy as np import torch from ..geometry.geometryutils import relative_transformation from torch.utils import data from . import datautils __all__ = ["ICL"] class ICL(data.Dataset): r"""A torch Dataset for loading in the \href{https://www.doc.ic.ac.uk/~ahanda/VaFRIC/iclnuim.html}{ICL-NUIM dataset}. Will fetch sequences of rgb images, depth maps, intrinsics matrix, poses, frame to frame relative transformations (with first frame's pose as the reference transformation), names of frames. Uses the `TUM RGB-D Compatible PNGs` files and `Global_RT_Trajectory_GT` from the \href{https://www.doc.ic.ac.uk/~ahanda/VaFRIC/iclnuim.html}{ICL-NUIM dataset}. Expects the following folder structure for the ICL dataset: | ├── ICL | │ ├── living_room_traj0_frei_png | │ │ ├── depth/ | │ │ ├── rgb/ | │ │ ├── associations.txt | │ │ └── livingRoom0n.gt.sim | │ ├── living_room_traj1_frei_png | │ │ ├── depth/ | │ │ ├── rgb/ | │ │ ├── associations.txt | │ │ └── livingRoom1n.gt.sim | │ ├── living_room_traj2_frei_png | │ │ ├── depth/ | │ │ ├── rgb/ | │ │ ├── associations.txt | │ │ └── livingRoom2n.gt.sim | │ ├── living_room_traj3_frei_png | │ │ ├── depth/ | │ │ ├── rgb/ | │ │ ├── associations.txt | │ │ └── livingRoom3n.gt.sim | │ ├── living_room_trajX_frei_png | │ │ ├── depth/ | │ │ ├── rgb/ | │ │ ├── associations.txt | │ │ └── livingRoomXn.gt.sim | Example of sequence creation from frames with `seqlen=4`, `dilation=1`, `stride=3`, and `start=2`: sequence0 ┎───────────────┲───────────────┲───────────────┒ | | | | frame0 frame1 frame2 frame3 frame4 frame5 frame6 frame7 frame8 frame9 frame10 frame11 ... | | | | └───────────────┵───────────────┵────────────────┚ sequence1 Args: basedir (str): Path to the base directory containing the `living_room_trajX_frei_png/` directories from ICL-NUIM. Each trajectory subdirectory is assumed to contain `depth/`, `rgb/`, `associations.txt` and `livingRoom0n.gt.sim`. ├── living_room_trajX_frei_png │ ├── depth/ │ ├── rgb/ │ ├── associations.txt │ └── livingRoomXn.gt.sim trajectories (str or tuple of str or None): Trajectories to use from "living_room_traj0_frei_png", "living_room_traj1_frei_png", "living_room_traj2_frei_png" or "living_room_traj3_frei_png". Can be path to a `.txt` file where each line is a trajectory name (`living_room_traj0_frei_png`), a tuple of trajectory names, or None to use all trajectories. Default: None seqlen (int): Number of frames to use for each sequence of frames. Default: 4 dilation (int or None): Number of (original trajectory's) frames to skip between two consecutive frames in the extracted sequence. See above example if unsure. If None, will set `dilation = 0`. Default: None stride (int or None): Number of frames between the first frames of two consecutive extracted sequences. See above example if unsure. If None, will set `stride = seqlen * (dilation + 1)` (non-overlapping sequences). Default: None start (int or None): Index of the frame from which to start extracting sequences for every trajectory. If None, will start from the first frame. Default: None end (int): Index of the frame at which to stop extracting sequences for every trajectory. If None, will continue extracting frames until the end of the trajectory. Default: None height (int): Spatial height to resize frames to. Default: 480 width (int): Spatial width to resize frames to. Default: 640 channels_first (bool): If True, will use channels first representation :math:`(B, L, C, H, W)` for images `(batchsize, sequencelength, channels, height, width)`. If False, will use channels last representation :math:`(B, L, H, W, C)`. Default: False normalize_color (bool): Normalize color to range :math:`[0 1]` or leave it at range :math:`[0 255]`. Default: False return_depth (bool): Determines whether to return depths. Default: True return_intrinsics (bool): Determines whether to return intrinsics. Default: True return_pose (bool): Determines whether to return poses. Default: True return_transform (bool): Determines whether to return transforms w.r.t. initial pose being transformed to be identity. Default: True return_names (bool): Determines whether to return sequence names. Default: True Examples:: >>> dataset = ICL( basedir="ICL-data/", trajectories=("living_room_traj0_frei_png", "living_room_traj1_frei_png") ) >>> loader = data.DataLoader(dataset=dataset, batch_size=4) >>> colors, depths, intrinsics, poses, transforms, names = next(iter(loader)) """ def __init__( self, basedir: str, trajectories: Union[tuple, str, None] = None, seqlen: int = 4, dilation: Optional[int] = None, stride: Optional[int] = None, start: Optional[int] = None, end: Optional[int] = None, height: int = 480, width: int = 640, channels_first: bool = False, normalize_color: bool = False, *, return_depth: bool = True, return_intrinsics: bool = True, return_pose: bool = True, return_transform: bool = True, return_names: bool = True, ): super(ICL, self).__init__() basedir = os.path.normpath(basedir) self.height = height self.width = width self.height_downsample_ratio = float(height) / 480 self.width_downsample_ratio = float(width) / 640 self.channels_first = channels_first self.normalize_color = normalize_color self.return_depth = return_depth self.return_intrinsics = return_intrinsics self.return_pose = return_pose self.return_transform = return_transform self.return_names = return_names self.load_poses = self.return_pose or self.return_transform if not isinstance(seqlen, int): raise TypeError("seqlen must be int. Got {0}.".format(type(seqlen))) if not (isinstance(stride, int) or stride is None): raise TypeError("stride must be int or None. Got {0}.".format(type(stride))) if not (isinstance(dilation, int) or dilation is None): raise TypeError( "dilation must be int or None. Got {0}.".format(type(dilation)) ) dilation = dilation if dilation is not None else 0 stride = stride if stride is not None else seqlen * (dilation + 1) self.seqlen = seqlen self.stride = stride self.dilation = dilation if seqlen < 0: raise ValueError("seqlen must be positive. Got {0}.".format(seqlen)) if dilation < 0: raise ValueError('"dilation" must be positive. Got {0}.'.format(dilation)) if stride < 0: raise ValueError("stride must be positive. Got {0}.".format(stride)) if not (isinstance(start, int) or start is None): raise TypeError("start must be int or None. Got {0}.".format(type(start))) if not (isinstance(end, int) or end is None): raise TypeError("end must be int or None. Got {0}.".format(type(end))) start = start if start is not None else 0 self.start = start self.end = end if start < 0: raise ValueError("start must be positive. Got {0}.".format(stride)) if not (end is None or end > start): raise ValueError( "end ({0}) must be None or greater than start ({1})".format(end, start) ) # preprocess trajectories to be a tuple or None valid_trajectory_dirs = [ f for f in os.listdir(basedir) if os.path.isdir(os.path.join(basedir, f)) and f[:16] == "living_room_traj" and f[-9:] == "_frei_png" ] if len(valid_trajectory_dirs) == 0: msg = "basedir ({0}) should contain trajectory folders with the following naming ".format( basedir ) msg += 'convention: "living_room_trajX_frei_png". Found 0 folders with this naming convention.' raise ValueError(msg) if isinstance(trajectories, str): if os.path.isfile(trajectories): with open(trajectories, "r") as f: trajectories = tuple(f.read().split("\n")) valid_trajectory_dirs = list(trajectories) else: raise ValueError( "incorrect filename: {} doesn't exist".format(trajectories) ) elif not (trajectories is None or isinstance(trajectories, tuple)): msg = '"trajectories" should either be path to .txt file or tuple of trajectory names or None, ' msg += " but was of type {0} instead" raise TypeError(msg.format(type(trajectories))) if isinstance(trajectories, tuple): if len(trajectories) == 0: raise ValueError( '"trajectories" must have atleast one element. Got len(trajectories)=0' ) msg = '"trajectories" should only contain trajectory folder names of the following convention: ' msg += '"living_room_trajX_frei_png". It contained: {0}.' for t in trajectories: if not (t[:16] == "living_room_traj" and t[-9:] == "_frei_png"): raise ValueError(msg.format(t)) valid_trajectory_dirs = list(trajectories) # check if ICL folder structure correct: If trajectories is not None, should contain all trajectory paths. # Should also contain atleast one trajectory path. trajectory_paths = [] dirmsg = "ICL folder should look something like:\n\n| ├── basedir\n" for i in range(4): dirmsg += ( "| │ ├── living_room_traj{0}_frei_png\n| │ │ ├── depth/\n".format( str(i) ) ) dirmsg += "| │ │ ├── rgb/\n| │ │ ├── associations.txt\n" dirmsg += "| │ │ └── livingRoom{0}n.gt.sim\n".format(str(i)) for item in os.listdir(basedir): if ( os.path.isdir(os.path.join(basedir, item)) and item in valid_trajectory_dirs ): trajectory_paths.append(os.path.join(basedir, item)) if len(trajectory_paths) == 0: raise ValueError( 'Incorrect folder structure in basedir ("{0}"). '.format(basedir) + dirmsg ) if trajectories is not None and len(trajectory_paths) != len(trajectories): msg = '"trajectories" contains trajectories not available in basedir:\n' msg += "trajectories contains: " + ", ".join(trajectories) + "\n" msg += ( "basedir contains: " + ", ".join(list(map(os.path.basename, trajectory_paths))) + "\n" ) raise ValueError(msg.format(basedir) + dirmsg) # get association and pose file paths associationsfiles, posesfiles = [], [] for trajectory_path in trajectory_paths: associationsfile = os.path.join(trajectory_path, "associations.txt") if not os.path.isfile(associationsfile): msg = 'Missing associations file ("associations.txt") in {0}. '.format( trajectory_path ) raise ValueError(msg + dirmsg) associationsfiles.append(associationsfile) if self.load_poses: trajectory_num = trajectory_path[ trajectory_path.index("living_room_traj") + 16 : ].split("_")[0] posesfile = os.path.join( trajectory_path, "livingRoom{0}n.gt.sim".format(trajectory_num) ) if not os.path.isfile(posesfile): msg = 'Missing ground truth poses file ("{0}") in {1}. '.format( posesfile, basedir ) raise ValueError(msg + dirmsg) posesfiles.append(posesfile) # Get a list of all color, depth, pose, label and intrinsics files. colorfiles, depthfiles, posemetas, framenames = [], [], [], [] idx = np.arange(seqlen) * (dilation + 1) for file_num, associationsfile in enumerate(associationsfiles): parentdir = os.path.dirname(associationsfile) splitpath = associationsfile.split(os.sep) trajectory_name = splitpath[-2] if trajectories is not None: if trajectory_name not in trajectories: continue traj_colorfiles, traj_depthfiles = [], [] traj_poselinenums, traj_framenames = [], [] with open(associationsfile, "r") as f: lines = f.readlines() if self.end is None: end = len(lines) if end > len(lines): msg = "end was larger than number of frames in trajectory: {0} > {1} (trajectory: {2})" warnings.warn(msg.format(end, len(lines), trajectory_name)) # traj0 is missing a pose in livingRoom0n.gt.sim, thus we remove one of the frames if trajectory_name == "living_room_traj0_frei_png": lines = lines[:-1] lines = lines[start:end] if self.load_poses: posesfile = posesfiles[file_num] with open(posesfile, "r") as f: len_posesfile = sum(1 for line in f) for line_num, line in enumerate(lines): line = line.strip().split() msg = "incorrect reading from ICL associations" if line[3][:3] != "rgb": raise ValueError(msg) traj_colorfiles.append( os.path.normpath(os.path.join(parentdir, line[3])) ) if line[1][:5] != "depth": raise ValueError(msg) traj_depthfiles.append( os.path.normpath(os.path.join(parentdir, line[1])) ) if self.load_poses: if line_num * 4 > len_posesfile: msg = '{0}th pose should start from line {1} of file "{2}", but said file has only {3} lines.' raise ValueError( msg.format( line_num, line_num * 4, os.path.join(*posesfile.split(os.sep)[-2:]), len_posesfile, ) ) traj_poselinenums.append(line_num * 4) traj_framenames.append( os.path.join(trajectory_name, line[1][6:].split(".")[0]) ) traj_len = len(traj_colorfiles) for start_ind in range(0, traj_len, stride): if (start_ind + idx[-1]) >= traj_len: break inds = start_ind + idx colorfiles.append([traj_colorfiles[i] for i in inds]) depthfiles.append([traj_depthfiles[i] for i in inds]) framenames.append(", ".join([traj_framenames[i] for i in inds])) if self.load_poses: posemetas.append( { "file": posesfile, "line_nums": [traj_poselinenums[i] for i in inds], } ) self.num_sequences = len(colorfiles) # Class members to store the list of valid filepaths. self.colorfiles = colorfiles self.depthfiles = depthfiles self.posemetas = posemetas self.framenames = framenames # Camera intrinsics matrix for ICL dataset intrinsics = torch.tensor( [[481.20, 0, 319.5, 0], [0, -480.0, 239.5, 0], [0, 0, 1, 0], [0, 0, 0, 1]] ).float() self.intrinsics = datautils.scale_intrinsics( intrinsics, self.height_downsample_ratio, self.width_downsample_ratio ).unsqueeze(0) # Scaling factor for depth images self.scaling_factor = 5000.0 def __len__(self): r"""Returns the length of the dataset. """ return self.num_sequences def __getitem__(self, idx: int): r"""Returns the data from the sequence at index idx. Returns: color_seq (torch.Tensor): Sequence of rgb images of each frame depth_seq (torch.Tensor): Sequence of depths of each frame pose_seq (torch.Tensor): Sequence of poses of each frame transform_seq (torch.Tensor): Sequence of transformations between each frame in the sequence and the previous frame. Transformations are w.r.t. the first frame in the sequence having identity pose (relative transformations with first frame's pose as the reference transformation). First transformation in the sequence will always be `torch.eye(4)`. intrinsics (torch.Tensor): Intrinsics for the current sequence framename (str): Name of the frame Shape: - color_seq: :math:`(L, H, W, 3)` if `channels_first` is False, else :math:`(L, 3, H, W)`. `L` denotes sequence length. - depth_seq: :math:`(L, H, W, 1)` if `channels_first` is False, else :math:`(L, 1, H, W)`. `L` denotes sequence length. - pose_seq: :math:`(L, 4, 4)` where `L` denotes sequence length. - transform_seq: :math:`(L, 4, 4)` where `L` denotes sequence length. - intrinsics: :math:`(1, 4, 4)` """ # Read in the color, depth, pose, label and intrinstics info. color_seq_path = self.colorfiles[idx] depth_seq_path = self.depthfiles[idx] pose_seq_meta = self.posemetas[idx] if self.load_poses else None framename = self.framenames[idx] color_seq, depth_seq, pose_seq, label_seq = [], [], [], [] for i in range(self.seqlen): color = np.asarray(imageio.imread(color_seq_path[i]), dtype=float) color = self._preprocess_color(color) color = torch.from_numpy(color) color_seq.append(color) if self.return_depth: depth = np.asarray(imageio.imread(depth_seq_path[i]), dtype=np.int64) depth = self._preprocess_depth(depth) depth = torch.from_numpy(depth) depth_seq.append(depth) if self.load_poses: poses = self._loadPoses(pose_seq_meta["file"], pose_seq_meta["line_nums"]) pose_seq = [torch.from_numpy(pose) for pose in poses] output = [] color_seq = torch.stack(color_seq, 0).float() output.append(color_seq) if self.return_depth: depth_seq = torch.stack(depth_seq, 0).float() output.append(depth_seq) if self.return_intrinsics: intrinsics = self.intrinsics output.append(intrinsics) if self.return_pose: pose_seq = torch.stack(pose_seq, 0).float() pose_seq = self._preprocess_poses(pose_seq) output.append(pose_seq) if self.return_transform: transform_seq = datautils.poses_to_transforms(poses) transform_seq = [torch.from_numpy(x).float() for x in transform_seq] transform_seq = torch.stack(transform_seq, 0).float() output.append(transform_seq) if self.return_names: output.append(framename) return tuple(output) def _preprocess_color(self, color: np.ndarray): r"""Preprocesses the color image by resizing to :math:`(H, W, C)`, (optionally) normalizing values to :math:`[0, 1]`, and (optionally) using channels first :math:`(C, H, W)` representation. Args: color (np.ndarray): Raw input rgb image Retruns: np.ndarray: Preprocessed rgb image Shape: - Input: :math:`(H_\text{old}, W_\text{old}, C)` - Output: :math:`(H, W, C)` if `self.channels_first == False`, else :math:`(C, H, W)`. """ color = cv2.resize( color, (self.width, self.height), interpolation=cv2.INTER_LINEAR ) if self.normalize_color: color = datautils.normalize_image(color) if self.channels_first: color = datautils.channels_first(color) return color def _preprocess_depth(self, depth: np.ndarray): r"""Preprocesses the depth image by resizing, adding channel dimension, and scaling values to meters. Optionally converts depth from channels last :math:`(H, W, 1)` to channels first :math:`(1, H, W)` representation. Args: depth (np.ndarray): Raw depth image Returns: np.ndarray: Preprocessed depth Shape: - depth: :math:`(H_\text{old}, W_\text{old})` - Output: :math:`(H, W, 1)` if `self.channels_first == False`, else :math:`(1, H, W)`. """ depth = cv2.resize( depth.astype(float), (self.width, self.height), interpolation=cv2.INTER_NEAREST, ) depth = np.expand_dims(depth, -1) if self.channels_first: depth = datautils.channels_first(depth) return depth / self.scaling_factor def _preprocess_poses(self, poses: torch.Tensor): r"""Preprocesses the poses by setting first pose in a sequence to identity and computing the relative homogenous transformation for all other poses. Args: poses (torch.Tensor): Pose matrices to be preprocessed Returns: Output (torch.Tensor): Preprocessed poses Shape: - poses: :math:`(L, 4, 4)` where :math:`L` denotes sequence length. - Output: :math:`(L, 4, 4)` where :math:`L` denotes sequence length. """ return relative_transformation( poses[0].unsqueeze(0).repeat(poses.shape[0], 1, 1), poses, orthogonal_rotations=False, ) def _loadPoses(self, pose_path, start_lines): r"""Loads poses from groundtruth pose text files and returns the poses as a list of numpy arrays. Args: pose_path (str): The path to groundtruth pose text file. start_lines (list of ints): Returns: poses (list of np.array): List of ground truth poses in np.array format. Each np.array has a shape of [4, 4] if homogen_coord is True, or a shape of [3, 4] otherwise. """ pose = [] poses = [] parsing_pose = False with open(pose_path, "r") as f: lines = f.readlines() for i, line in enumerate(lines): if not (i in start_lines or parsing_pose): continue parsing_pose = True line = line.strip().split() if len(line) != 4: msg = "Faulty poses file: Expected line {0} of the poses file {1} to contain pose matrix values, " msg += 'but it didn\'t. You can download "Global_RT_Trajectory_GT" from here:\n' msg += "https://www.doc.ic.ac.uk/~ahanda/VaFRIC/iclnuim.html" raise ValueError(msg) pose.append(line) if len(pose) == 3: pose.append([0.0, 0.0, 0.0, 1.0]) poses.append(np.array(pose, dtype=np.float32)) pose = [] parsing_pose = False return poses
[ "noreply@github.com" ]
zeta1999.noreply@github.com
4a8afc496c44532758c44e68adbf5ca79f4fc7d0
4e4bc85d0f17b6999db4cd62bb3016f96ed8f0ff
/on_convolution-12.py
334aceb04aefbfa739d97be7ddb6e98902914f08
[]
no_license
practical-neuroimaging/practical-neuroimaging.github.com
e6b06b6a83559cdb7527d5e34cc402e36cecd7c0
26a5830c7d6668ae3690f45da9792c71c1c7fad3
refs/heads/master
2020-04-23T18:55:02.058479
2017-02-15T19:07:54
2017-02-15T19:07:54
8,209,908
8
3
null
2015-02-11T19:53:00
2013-02-14T23:29:41
JavaScript
UTF-8
Python
false
false
199
py
bold_signal = np.convolve(neural_signal, hrf_signal) plt.plot(times_and_tail, bold_signal) plt.xlabel('time (seconds)') plt.ylabel('bold signal') plt.title('Our algorithm is the same as convolution')
[ "matthew.brett@gmail.com" ]
matthew.brett@gmail.com
41f70e8dae3381876bac0e30a6b465f6b478ab3d
f4dd8aa4e5476ffde24e27273dd47913c7f9177a
/Dlv2_safe2/tests/parser/aggregates.min.5.test.py
911033b9032337d0a150eeba603118cbfefa0ac4
[ "Apache-2.0" ]
permissive
dave90/Dlv_safe2
e56071ec1b07c45defda571cb721852e2391abfb
f127f413e3f35d599554e64aaa918bc1629985bc
refs/heads/master
2020-05-30T10:44:13.473537
2015-07-12T12:35:22
2015-07-12T12:35:22
38,256,201
0
0
null
null
null
null
UTF-8
Python
false
false
14,523
py
input = """ %Non-safe rules with the aggregate min. a(1). b(1). c(1,2). c(1,3). p(1). q(1). %---- non-safe atoms in #min{nonGroundAtoms} op int ---- non_safe01(M, N) :- #min{V:a(M),b(N),c(M,V)} = 2. non_safe02(M, N) :- #min{V:a(M),b(N),c(M,V)} < 3. non_safe03(M, N) :- #min{V:a(M),b(N),c(M,V)} <= 2. non_safe04(M, N) :- #min{V:a(M),b(N),c(M,V)} > 1. non_safe05(M, N) :- #min{V:a(M),b(N),c(M,V)} >= 2. :- #min{V:a(M),b(N),c(M,V)} = 3. %:- #min{V:a(M),b(N),c(M,V)} = 3. [1:1] :- #min{V:a(M),b(N),c(M,V)} < 2. %:- #min{V:a(M),b(N),c(M,V)} < 2. [1:1] :- #min{V:a(M),b(N),c(M,V)} <= 1. %:- #min{V:a(M),b(N),c(M,V)} <= 1. [1:1] :- #min{V:a(M),b(N),c(M,V)} > 2. %:- #min{V:a(M),b(N),c(M,V)} > 2. [1:1] :- #min{V:a(M),b(N),c(M,V)} >= 3. %:- #min{V:a(M),b(N),c(M,V)} >= 3. [1:1] %---- non-safe atoms in #min{nonGroundAtoms} op int ----(at the end) non_safe06(M, N) :- p(M), #min{V:a(M),b(N),c(M,V)} = 2. non_safe07(M, N) :- p(M), #min{V:a(M),b(N),c(M,V)} < 3. non_safe08(M, N) :- p(M), #min{V:a(M),b(N),c(M,V)} <= 2. non_safe09(M, N) :- p(M), #min{V:a(M),b(N),c(M,V)} > 1. non_safe10(M, N) :- p(M), #min{V:a(M),b(N),c(M,V)} >= 2. :- p(M), #min{V:a(M),b(N),c(M,V)} = 3. %:- p(M), #min{V:a(M),b(N),c(M,V)} = 3. [1:1] :- p(M), #min{V:a(M),b(N),c(M,V)} < 2. %:- p(M), #min{V:a(M),b(N),c(M,V)} < 2. [1:1] :- p(M), #min{V:a(M),b(N),c(M,V)} <= 1. %:- p(M), #min{V:a(M),b(N),c(M,V)} <= 1. [1:1] :- p(M), #min{V:a(M),b(N),c(M,V)} > 2. %:- p(M), #min{V:a(M),b(N),c(M,V)} > 2. [1:1] :- p(M), #min{V:a(M),b(N),c(M,V)} >= 3. %:- p(M), #min{V:a(M),b(N),c(M,V)} >= 3. [1:1] %---- non-safe #min{nonGroundAtoms} op int ----(at the beginning) non_safe11(M, N) :- #min{V:a(M),b(N),c(M,V)} = 2, p(M). non_safe12(M, N) :- #min{V:a(M),b(N),c(M,V)} < 3, p(M). non_safe13(M, N) :- #min{V:a(M),b(N),c(M,V)} <= 2, p(M). non_safe14(M, N) :- #min{V:a(M),b(N),c(M,V)} > 1, p(M). non_safe15(M, N) :- #min{V:a(M),b(N),c(M,V)} >= 2, p(M). :- #min{V:a(M),b(N),c(M,V)} = 3, p(M). %:- #min{V:a(M),b(N),c(M,V)} = 3, p(M). [1:1] :- #min{V:a(M),b(N),c(M,V)} < 1, p(M). %:- #min{V:a(M),b(N),c(M,V)} < 1, p(M). [1:1] :- #min{V:a(M),b(N),c(M,V)} <= 1, p(M). %:- #min{V:a(M),b(N),c(M,V)} <= 1, p(M). [1:1] :- #min{V:a(M),b(N),c(M,V)} > 2, p(M). %:- #min{V:a(M),b(N),c(M,V)} > 2, p(M). [1:1] :- #min{V:a(M),b(N),c(M,V)} >= 3, p(M). %:- #min{V:a(M),b(N),c(M,V)} >= 3, p(M). [1:1] %---- non-safe int op #min{nonGroundAtoms}---- non_safe16(M, N) :- 2 = #min{V:a(M),b(N),c(M,V)}. non_safe17(M, N) :- 1 < #min{V:a(M),b(N),c(M,V)}. non_safe18(M, N) :- 1 <= #min{V:a(M),b(N),c(M,V)}. non_safe19(M, N) :- 3 > #min{V:a(M),b(N),c(M,V)}. non_safe20(M, N) :- 3 >= #min{V:a(M),b(N),c(M,V)}. :- 1 = #min{V:a(M),b(N),c(M,V)}. %:- 1 = #min{V:a(M),b(N),c(M,V)}. [1:1] :- 3 < #min{V:a(M),b(N),c(M,V)}. %:- 3 < #min{V:a(M),b(N),c(M,V)}. [1:1] :- 3 <= #min{V:a(M),b(N),c(M,V)}. %:- 3 <= #min{V:a(M),b(N),c(M,V)}. [1:1] :- 1 > #min{V:a(M),b(N),c(M,V)}. %:- 1 > #min{V:a(M),b(N),c(M,V)}. [1:1] :- 1 >= #min{V:a(M),b(N),c(M,V)}. %:- 1 >= #min{V:a(M),b(N),c(M,V)}. [1:1] %---- non-safe int op #min{nonGroundAtoms}----(at the end) non_safe21(M, N) :- q(N), 2 = #min{V:a(M),b(N),c(M,V)}. non_safe22(M, N) :- q(N), 1 < #min{V:a(M),b(N),c(M,V)}. non_safe23(M, N) :- q(N), 1 <= #min{V:a(M),b(N),c(M,V)}. non_safe24(M, N) :- q(N), 3 > #min{V:a(M),b(N),c(M,V)}. non_safe25(M, N) :- q(N), 3 >= #min{V:a(M),b(N),c(M,V)}. :- q(N), 1 = #min{V:a(M),b(N),c(M,V)}. %:- q(N), 1 = #min{V:a(M),b(N),c(M,V)}. [1:1] :- q(N), 3 < #min{V:a(M),b(N),c(M,V)}. %:- q(N), 3 < #min{V:a(M),b(N),c(M,V)}. [1:1] :- q(N), 3 <= #min{V:a(M),b(N),c(M,V)}. %:- q(N), 3 <= #min{V:a(M),b(N),c(M,V)}. [1:1] :- q(N), 1 > #min{V:a(M),b(N),c(M,V)}. %:- q(N), 1 > #min{V:a(M),b(N),c(M,V)}. [1:1] :- q(N), 1 >= #min{V:a(M),b(N),c(M,V)}. %:- q(N), 1 >= #min{V:a(M),b(N),c(M,V)}. [1:1] %---- non-safe int op #min{nonGroundAtoms}---- (at the beginning) non_safe26(M, N) :- 2 = #min{V:a(M),b(N),c(M,V)}, q(N). non_safe27(M, N) :- 1 < #min{V:a(M),b(N),c(M,V)}, q(N). non_safe28(M, N) :- 1 <= #min{V:a(M),b(N),c(M,V)}, q(N). non_safe29(M, N) :- 3 > #min{V:a(M),b(N),c(M,V)}, q(N). non_safe30(M, N) :- 2 >= #min{V:a(M),b(N),c(M,V)}, q(N). :- 1 = #min{V:a(M),b(N),c(M,V)}, q(N). %:- 1 = #min{V:a(M),b(N),c(M,V)}, q(N). [1:1] :- 3 < #min{V:a(M),b(N),c(M,V)}, q(N). %:- 3 < #min{V:a(M),b(N),c(M,V)}, q(N). [1:1] :- 3 <= #min{V:a(M),b(N),c(M,V)}, q(N). %:- 3 <= #min{V:a(M),b(N),c(M,V)}, q(N). [1:1] :- 1 > #min{V:a(M),b(N),c(M,V)}, q(N). %:- 1 > #min{V:a(M),b(N),c(M,V)}, q(N). [1:1] :- 1 >= #min{V:a(M),b(N),c(M,V)}, q(N). %:- 1 >= #min{V:a(M),b(N),c(M,V)}, q(N). [1:1] %---- non-safe int < #min{nonGroundAtoms} < int ---- non_safe31(M,N) :- 1 < #min{V:a(M),b(N),c(M,V)} < 3. non_safe32(M,N) :- 1< #min{V:a(M),b(N),c(M,V)} < 3, q(N). non_safe33(M,N) :- p(N), 1< #min{V:a(M),b(N),c(M,V)} < 3. :- 2 < #min{V:a(M),b(N),c(M,V)} < 3. :- 2 < #min{V:a(M),b(N),c(M,V)} < 3, q(N). %:- 2 < #min{V:a(M),b(N),c(M,V)} < 3. [1:1] %:- 2 < #min{V:a(M),b(N),c(M,V)} < 3, q(N). [1:1] %---- non-safe int < #min{} <= int ---- non_safe34(M, N) :- 1 < #min{V:a(M),b(N),c(M,V)} <= 2. non_safe35(M, N) :- q(N), 1 < #min{V:a(M),b(N),c(M,V)} <= 2. non_safe36(M, N) :- 1 < #min{V:a(M),b(N),c(M,V)} <= 2, p(M). :- q(N), 2 < #min{V:a(M),b(N),c(M,V)} <= 3. :- 2 < #min{V:a(M),b(N),c(M,V)} <= 3, p(M). %:- 2 < #min{V:a(M),b(N),c(M,V)} <= 3. [1:1] %:- p(M), 2 < #min{V:a(M),b(N),c(M,V)} <= 3. [1:1] %---- non-safe int <= #min{nonGroundAtoms} < int ---- non_safe37(M, N) :- 2 <= #min{V:a(M),b(N),c(M,V)} < 3. non_safe38(M, N) :- q(N), 2 <= #min{V:a(M),b(N),c(M,V)} < 3. non_safe39(M, N) :- 2 <= #min{V:a(M),b(N),c(M,V)} < 3, q(N). :- 3 <= #min{V:a(M),b(N),c(M,V)} < 4. :- p(M), 3 <= #min{V:a(M),b(N),c(M,V)} < 4. :- 3 <= #min{V:a(M),b(N),c(M,V)} < 4, q(N). %:- 3 <= #min{V:a(M),b(N),c(M,V)} < 4. [1:1] %:- p(M), 3 <= #min{V:a(M),b(N),c(M,V)} < 4. [1:1] %:- 3 <= #min{V:a(M),b(N),c(M,V)} < 4, q(N). [1:1] %---- non-safe int <= #min{nonGroundAtoms} <= int ---- non_safe40(M, N) :- 2 <= #min{V:a(M),b(N),c(M,V)} <= 3. non_safe41(M, N) :- p(M), 2 <= #min{V:a(M),b(N),c(M,V)} <= 3. non_safe42(M, N) :- 2 <= #min{V:a(M),b(N),c(M,V)} <= 3, q(N). :- 3 <= #min{V:a(M),b(N),c(M,V)} <= 4. :- 3 <= #min{V:a(M),b(N),c(M,V)} <= 4, q(N). :- p(M), 3 <= #min{V:a(M),b(N),c(M,V)} <= 4. %:- 3 <= #min{V:a(M),b(N),c(M,V)} <= 4. [1:1] %:- 3 <= #min{V:a(M),b(N),c(M,V)} <= 4, q(N). [1:1] %:- p(M), 3 <= #min{V:a(M),b(N),c(M,V)} <= 4. [1:1] """ output = """ %Non-safe rules with the aggregate min. a(1). b(1). c(1,2). c(1,3). p(1). q(1). %---- non-safe atoms in #min{nonGroundAtoms} op int ---- non_safe01(M, N) :- #min{V:a(M),b(N),c(M,V)} = 2. non_safe02(M, N) :- #min{V:a(M),b(N),c(M,V)} < 3. non_safe03(M, N) :- #min{V:a(M),b(N),c(M,V)} <= 2. non_safe04(M, N) :- #min{V:a(M),b(N),c(M,V)} > 1. non_safe05(M, N) :- #min{V:a(M),b(N),c(M,V)} >= 2. :- #min{V:a(M),b(N),c(M,V)} = 3. %:- #min{V:a(M),b(N),c(M,V)} = 3. [1:1] :- #min{V:a(M),b(N),c(M,V)} < 2. %:- #min{V:a(M),b(N),c(M,V)} < 2. [1:1] :- #min{V:a(M),b(N),c(M,V)} <= 1. %:- #min{V:a(M),b(N),c(M,V)} <= 1. [1:1] :- #min{V:a(M),b(N),c(M,V)} > 2. %:- #min{V:a(M),b(N),c(M,V)} > 2. [1:1] :- #min{V:a(M),b(N),c(M,V)} >= 3. %:- #min{V:a(M),b(N),c(M,V)} >= 3. [1:1] %---- non-safe atoms in #min{nonGroundAtoms} op int ----(at the end) non_safe06(M, N) :- p(M), #min{V:a(M),b(N),c(M,V)} = 2. non_safe07(M, N) :- p(M), #min{V:a(M),b(N),c(M,V)} < 3. non_safe08(M, N) :- p(M), #min{V:a(M),b(N),c(M,V)} <= 2. non_safe09(M, N) :- p(M), #min{V:a(M),b(N),c(M,V)} > 1. non_safe10(M, N) :- p(M), #min{V:a(M),b(N),c(M,V)} >= 2. :- p(M), #min{V:a(M),b(N),c(M,V)} = 3. %:- p(M), #min{V:a(M),b(N),c(M,V)} = 3. [1:1] :- p(M), #min{V:a(M),b(N),c(M,V)} < 2. %:- p(M), #min{V:a(M),b(N),c(M,V)} < 2. [1:1] :- p(M), #min{V:a(M),b(N),c(M,V)} <= 1. %:- p(M), #min{V:a(M),b(N),c(M,V)} <= 1. [1:1] :- p(M), #min{V:a(M),b(N),c(M,V)} > 2. %:- p(M), #min{V:a(M),b(N),c(M,V)} > 2. [1:1] :- p(M), #min{V:a(M),b(N),c(M,V)} >= 3. %:- p(M), #min{V:a(M),b(N),c(M,V)} >= 3. [1:1] %---- non-safe #min{nonGroundAtoms} op int ----(at the beginning) non_safe11(M, N) :- #min{V:a(M),b(N),c(M,V)} = 2, p(M). non_safe12(M, N) :- #min{V:a(M),b(N),c(M,V)} < 3, p(M). non_safe13(M, N) :- #min{V:a(M),b(N),c(M,V)} <= 2, p(M). non_safe14(M, N) :- #min{V:a(M),b(N),c(M,V)} > 1, p(M). non_safe15(M, N) :- #min{V:a(M),b(N),c(M,V)} >= 2, p(M). :- #min{V:a(M),b(N),c(M,V)} = 3, p(M). %:- #min{V:a(M),b(N),c(M,V)} = 3, p(M). [1:1] :- #min{V:a(M),b(N),c(M,V)} < 1, p(M). %:- #min{V:a(M),b(N),c(M,V)} < 1, p(M). [1:1] :- #min{V:a(M),b(N),c(M,V)} <= 1, p(M). %:- #min{V:a(M),b(N),c(M,V)} <= 1, p(M). [1:1] :- #min{V:a(M),b(N),c(M,V)} > 2, p(M). %:- #min{V:a(M),b(N),c(M,V)} > 2, p(M). [1:1] :- #min{V:a(M),b(N),c(M,V)} >= 3, p(M). %:- #min{V:a(M),b(N),c(M,V)} >= 3, p(M). [1:1] %---- non-safe int op #min{nonGroundAtoms}---- non_safe16(M, N) :- 2 = #min{V:a(M),b(N),c(M,V)}. non_safe17(M, N) :- 1 < #min{V:a(M),b(N),c(M,V)}. non_safe18(M, N) :- 1 <= #min{V:a(M),b(N),c(M,V)}. non_safe19(M, N) :- 3 > #min{V:a(M),b(N),c(M,V)}. non_safe20(M, N) :- 3 >= #min{V:a(M),b(N),c(M,V)}. :- 1 = #min{V:a(M),b(N),c(M,V)}. %:- 1 = #min{V:a(M),b(N),c(M,V)}. [1:1] :- 3 < #min{V:a(M),b(N),c(M,V)}. %:- 3 < #min{V:a(M),b(N),c(M,V)}. [1:1] :- 3 <= #min{V:a(M),b(N),c(M,V)}. %:- 3 <= #min{V:a(M),b(N),c(M,V)}. [1:1] :- 1 > #min{V:a(M),b(N),c(M,V)}. %:- 1 > #min{V:a(M),b(N),c(M,V)}. [1:1] :- 1 >= #min{V:a(M),b(N),c(M,V)}. %:- 1 >= #min{V:a(M),b(N),c(M,V)}. [1:1] %---- non-safe int op #min{nonGroundAtoms}----(at the end) non_safe21(M, N) :- q(N), 2 = #min{V:a(M),b(N),c(M,V)}. non_safe22(M, N) :- q(N), 1 < #min{V:a(M),b(N),c(M,V)}. non_safe23(M, N) :- q(N), 1 <= #min{V:a(M),b(N),c(M,V)}. non_safe24(M, N) :- q(N), 3 > #min{V:a(M),b(N),c(M,V)}. non_safe25(M, N) :- q(N), 3 >= #min{V:a(M),b(N),c(M,V)}. :- q(N), 1 = #min{V:a(M),b(N),c(M,V)}. %:- q(N), 1 = #min{V:a(M),b(N),c(M,V)}. [1:1] :- q(N), 3 < #min{V:a(M),b(N),c(M,V)}. %:- q(N), 3 < #min{V:a(M),b(N),c(M,V)}. [1:1] :- q(N), 3 <= #min{V:a(M),b(N),c(M,V)}. %:- q(N), 3 <= #min{V:a(M),b(N),c(M,V)}. [1:1] :- q(N), 1 > #min{V:a(M),b(N),c(M,V)}. %:- q(N), 1 > #min{V:a(M),b(N),c(M,V)}. [1:1] :- q(N), 1 >= #min{V:a(M),b(N),c(M,V)}. %:- q(N), 1 >= #min{V:a(M),b(N),c(M,V)}. [1:1] %---- non-safe int op #min{nonGroundAtoms}---- (at the beginning) non_safe26(M, N) :- 2 = #min{V:a(M),b(N),c(M,V)}, q(N). non_safe27(M, N) :- 1 < #min{V:a(M),b(N),c(M,V)}, q(N). non_safe28(M, N) :- 1 <= #min{V:a(M),b(N),c(M,V)}, q(N). non_safe29(M, N) :- 3 > #min{V:a(M),b(N),c(M,V)}, q(N). non_safe30(M, N) :- 2 >= #min{V:a(M),b(N),c(M,V)}, q(N). :- 1 = #min{V:a(M),b(N),c(M,V)}, q(N). %:- 1 = #min{V:a(M),b(N),c(M,V)}, q(N). [1:1] :- 3 < #min{V:a(M),b(N),c(M,V)}, q(N). %:- 3 < #min{V:a(M),b(N),c(M,V)}, q(N). [1:1] :- 3 <= #min{V:a(M),b(N),c(M,V)}, q(N). %:- 3 <= #min{V:a(M),b(N),c(M,V)}, q(N). [1:1] :- 1 > #min{V:a(M),b(N),c(M,V)}, q(N). %:- 1 > #min{V:a(M),b(N),c(M,V)}, q(N). [1:1] :- 1 >= #min{V:a(M),b(N),c(M,V)}, q(N). %:- 1 >= #min{V:a(M),b(N),c(M,V)}, q(N). [1:1] %---- non-safe int < #min{nonGroundAtoms} < int ---- non_safe31(M,N) :- 1 < #min{V:a(M),b(N),c(M,V)} < 3. non_safe32(M,N) :- 1< #min{V:a(M),b(N),c(M,V)} < 3, q(N). non_safe33(M,N) :- p(N), 1< #min{V:a(M),b(N),c(M,V)} < 3. :- 2 < #min{V:a(M),b(N),c(M,V)} < 3. :- 2 < #min{V:a(M),b(N),c(M,V)} < 3, q(N). %:- 2 < #min{V:a(M),b(N),c(M,V)} < 3. [1:1] %:- 2 < #min{V:a(M),b(N),c(M,V)} < 3, q(N). [1:1] %---- non-safe int < #min{} <= int ---- non_safe34(M, N) :- 1 < #min{V:a(M),b(N),c(M,V)} <= 2. non_safe35(M, N) :- q(N), 1 < #min{V:a(M),b(N),c(M,V)} <= 2. non_safe36(M, N) :- 1 < #min{V:a(M),b(N),c(M,V)} <= 2, p(M). :- q(N), 2 < #min{V:a(M),b(N),c(M,V)} <= 3. :- 2 < #min{V:a(M),b(N),c(M,V)} <= 3, p(M). %:- 2 < #min{V:a(M),b(N),c(M,V)} <= 3. [1:1] %:- p(M), 2 < #min{V:a(M),b(N),c(M,V)} <= 3. [1:1] %---- non-safe int <= #min{nonGroundAtoms} < int ---- non_safe37(M, N) :- 2 <= #min{V:a(M),b(N),c(M,V)} < 3. non_safe38(M, N) :- q(N), 2 <= #min{V:a(M),b(N),c(M,V)} < 3. non_safe39(M, N) :- 2 <= #min{V:a(M),b(N),c(M,V)} < 3, q(N). :- 3 <= #min{V:a(M),b(N),c(M,V)} < 4. :- p(M), 3 <= #min{V:a(M),b(N),c(M,V)} < 4. :- 3 <= #min{V:a(M),b(N),c(M,V)} < 4, q(N). %:- 3 <= #min{V:a(M),b(N),c(M,V)} < 4. [1:1] %:- p(M), 3 <= #min{V:a(M),b(N),c(M,V)} < 4. [1:1] %:- 3 <= #min{V:a(M),b(N),c(M,V)} < 4, q(N). [1:1] %---- non-safe int <= #min{nonGroundAtoms} <= int ---- non_safe40(M, N) :- 2 <= #min{V:a(M),b(N),c(M,V)} <= 3. non_safe41(M, N) :- p(M), 2 <= #min{V:a(M),b(N),c(M,V)} <= 3. non_safe42(M, N) :- 2 <= #min{V:a(M),b(N),c(M,V)} <= 3, q(N). :- 3 <= #min{V:a(M),b(N),c(M,V)} <= 4. :- 3 <= #min{V:a(M),b(N),c(M,V)} <= 4, q(N). :- p(M), 3 <= #min{V:a(M),b(N),c(M,V)} <= 4. %:- 3 <= #min{V:a(M),b(N),c(M,V)} <= 4. [1:1] %:- 3 <= #min{V:a(M),b(N),c(M,V)} <= 4, q(N). [1:1] %:- p(M), 3 <= #min{V:a(M),b(N),c(M,V)} <= 4. [1:1] """
[ "davide@davide-All-Series" ]
davide@davide-All-Series
e92a0a2bd507628450b55e377eb3da19b6dba4a4
66c94b5e427c0b8f8f7101de9c17af1423f00682
/keras/keras05_train_test2.py
f5c59354a7e50d47f591bc1843fa17a044e404ff
[]
no_license
NamkyuHan/bit_seoul
a34ea3c49666ee2183026e960e45092778643d55
3112eb576089cdf906c4f326337b4d2b5e5e4c29
refs/heads/master
2023-01-30T19:02:53.323592
2020-12-17T01:05:17
2020-12-17T01:05:17
311,277,610
0
0
null
null
null
null
UTF-8
Python
false
false
2,588
py
import numpy as np #1. 데이터 x_train = np.array([1,2,3,4,5,6,7,8,9,10]) y_train = np.array([1,2,3,4,5,6,7,8,9,10]) x_test = np.array([11,12,13,14,15]) y_test = np.array([11,12,13,14,15]) x_pred = np.array([16,17,18]) from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense #2. 모델구성 # 하이퍼파라미터 튜닝(나의 취미이자 특기가 될것이다) # Sequential을 통해 (연산) 을 만든다 # layers를 통해 레이어(줄,층) 을 만든다 # Dense DNN # Dense 레이어는 입력과 출력을 모두 연결해주며 입력과 출력을 각각 연결해주는 가중치를 포함하고 있습니다. # 입력이 3개 출력이 4개라면 가중치는 총 3X4인 12개가 존재하게 됩니다. # Dense레이어는 머신러닝의 기본층으로 영상이나 서로 연속적으로 상관관계가 있는 데이터가 아니라면 # Dense레이어를 통해 학습시킬 수 있는 데이터가 많다는 뜻이 됩니다. model = Sequential() model.add(Dense(300, input_dim=1)) # input_dim = 1, 입력 차원이 1이라는 뜻이며 입력 노드가 한개라고 생각하면 됩니다. # 만약 x배열의 데이터가 2개라면 2, 3개라면 3으로 지정을 해줍니다. # 그 다음, 만든 시퀀스 오브젝트 model에 5개의 노드를 Dense레이어를 통해 연결해줍니다. 여기서 add를 통해 하나의 레이어를 추가해주는 것입니다. # input 1 output 5 model.add(Dense(500)) model.add(Dense(300)) model.add(Dense(70)) model.add(Dense(1)) #3. 컴파일 시키기, 훈련시키기 # 하이퍼파라미터 튜닝(나의 취미이자 특기가 될것이다) # mse 평균제곱오차 손실값은 mse로 잡을거야 # optimizer 손실 최적화를 위해서는? 이번 최적화는 아담을 쓸거야 # metrics 평가지표 평가지표는 ACC를 쓸거야 #정리하자면? 손실값을 구할때는 평균제곱오차 mse를 쓰고 손실 최적화를 위해서 adam을 쓸거야 평가지표는 acc를 쓸거고 model.compile(loss='mse', optimizer='adam', metrics=['mae']) # 하이퍼파라미터 튜닝(나의 취미이자 특기가 될것이다) # fit 훈련 실행 # epochs 100번 작업할거야 # batch_size 1개씩 배치해서 # model.fit(x, y, epochs=10000, batch_size=1) model.fit(x_train, y_train, epochs=1000) #4. 평가 예측 # loss, acc = model.evaluate(x,y, batch_size=1) # loss, acc = model.evaluate(x,y) loss = model.evaluate(x_test,y_test) print("loss : ", loss) # print("acc : ", acc) y_pred = model.predict(x_pred) print("결과물 : \n : ", y_pred)
[ "rksh333@naver.com" ]
rksh333@naver.com
9dd33882af864b4b5fc7ab3f5089bc4419d2ee5d
59de7788673ade984b9c9fbc33664a7cbdba67d3
/res/scripts/common/versionupdater.py
c3b4f0e5cda0cb664ce768974e6c7c47946eb77d
[]
no_license
webiumsk/WOT-0.9.15-CT
3fa24ab37a6c91b7073034afb2f355efa5b7fe36
fbd194fbaa6bdece51c7a68fc35bbb5257948341
refs/heads/master
2020-12-24T21:27:23.175774
2016-05-01T13:47:44
2016-05-01T13:47:44
57,600,180
0
0
null
null
null
null
WINDOWS-1250
Python
false
false
4,344
py
# 2016.05.01 15:26:19 Střední Evropa (letní čas) # Embedded file name: scripts/common/VersionUpdater.py import sys from debug_utils import LOG_DEBUG class VersionUpdaterBase(object): """Base class for different types of version updaters. Suggested descendant implementation: @singleton class SomeVersionUpdater(VersionUpdaterBase): def __init__(self): super(self.__class__, self).__init__(UPDATE_FUNCTION_TEMPLATE, LATEST_VERSION) def updateVersion(self, logID, owner, data): self._updateToLatestVersion(lambda _, data: data['ver'], logID, owner, data) Usage: SomeVersionUpdater.updateVersion('Some, id:%d' % (owner.id,), owner, owner.data) """ def __init__(self, template, latestVersion, moduleWithUpdaters = None): self._startVersion = None self._updaters = None self._template = template self._latestVersion = latestVersion self._module = moduleWithUpdaters if moduleWithUpdaters is None: self._module = sys.modules[self.__module__] return latestVersion = property(lambda self: self._latestVersion) def __buildUpdaters(self): """Builds and caches list of updater functions.""" raise self._updaters is None or AssertionError('Build once is enough') self._updaters = [] for fromVer in xrange(self._latestVersion): args = (fromVer,) if self._template.count('%d') == 1 else (fromVer, fromVer + 1) funcName = self._template % args func = getattr(self._module, funcName, None) if func is not None: self._updaters.append(func) if self._startVersion is None: self._startVersion = fromVer else: raise self._startVersion is None or AssertionError('Sequence of updaters should be continuous, absentFunc=%s, ' % (funcName,)) raise self._startVersion is not None or AssertionError raise len(self._updaters) == self._latestVersion - self._startVersion or AssertionError LOG_DEBUG('__buildUpdaters', self.__class__, self._startVersion, self._latestVersion) return def __getUpdaters(self, startVersion): """Returns list of updaters from startVersion to self._latestVersion.""" if startVersion == self._latestVersion: return [] else: if self._updaters is None: self.__buildUpdaters() raise startVersion >= self._startVersion or AssertionError('%s >= %s' % (startVersion, self._startVersion)) raise startVersion <= self._latestVersion or AssertionError('%s <= %s' % (startVersion, self._latestVersion)) return enumerate(self._updaters[startVersion - self._startVersion:], start=startVersion) def _updateToLatestVersion(self, versionOrGetter, logID, *args): """Updates data to latest version by applying updaters [currentVersion..latestVersion). logID is a data owner identity, f.e. account.logID. versionOrGetter is current data version or function to get current data version from args. args is an argument list to be passed to every updater function. Also used by versionOrGetter. Returns updated args. Update algorithm depends on callable(versionOrGetter), True or False: for ver, updater: updater(args) or for ver, updater: ver, args = updater(args) """ isCallable = callable(versionOrGetter) currentVersion = versionOrGetter(*args) if isCallable else versionOrGetter for fromVer, updater in self.__getUpdaters(currentVersion): LOG_DEBUG('_updateToLatestVersion', logID, fromVer) result = updater(*args) if isCallable: resultVer = versionOrGetter(*args) else: resultVer, args = result[0], result[1:] raise resultVer == fromVer + 1 or AssertionError('resultVer=%s, ver=%s, updater=%s' % (resultVer, fromVer, updater.__name__)) return args # okay decompyling c:\Users\PC\wotsources\files\originals\res\scripts\common\versionupdater.pyc # decompiled 1 files: 1 okay, 0 failed, 0 verify failed # 2016.05.01 15:26:19 Střední Evropa (letní čas)
[ "info@webium.sk" ]
info@webium.sk
a59d82b82274466e0ec3c3607c765c265f0ffb6d
77a87e7b15d58b2d23bfdd9ed78b637bebfcc6eb
/.closet/jython.configurator.efr32.multiPhy/5.2.3.201904231805-1264/host_py_rm_studio_internal/host_py_rm_studio_internal_efr32xg22x000f512im32/revA0/MODEM_register.py
c1a2cdd7b7d675b03aeda347f8e60ffccf5f2486
[]
no_license
lenloe1/other-stuff
b06331a4f247f06066579472b296f1ae66f6bdaf
897069e0464b19f81b14488d463710c81bb7fda4
refs/heads/master
2021-05-19T13:41:04.509601
2020-03-31T20:52:38
2020-03-31T20:52:38
251,728,852
0
0
null
null
null
null
UTF-8
Python
false
false
100,408
py
# -*- coding: utf-8 -*- from .static import Base_RM_Register from .MODEM_field import * class RM_Register_MODEM_IPVERSION(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_IPVERSION, self).__init__(rmio, label, 0xa8014000, 0x000, 'IPVERSION', 'MODEM.IPVERSION', 'read-only', u"", 0x00000001, 0xFFFFFFFF) self.IPVERSION = RM_Field_MODEM_IPVERSION_IPVERSION(self) self.zz_fdict['IPVERSION'] = self.IPVERSION self.__dict__['zz_frozen'] = True class RM_Register_MODEM_EN(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_EN, self).__init__(rmio, label, 0xa8014000, 0x004, 'EN', 'MODEM.EN', 'read-write', u"", 0x00000000, 0x00000001) self.EN = RM_Field_MODEM_EN_EN(self) self.zz_fdict['EN'] = self.EN self.__dict__['zz_frozen'] = True class RM_Register_MODEM_STATUS(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_STATUS, self).__init__(rmio, label, 0xa8014000, 0x008, 'STATUS', 'MODEM.STATUS', 'read-only', u"", 0x00000000, 0xFFFF7FF7) self.DEMODSTATE = RM_Field_MODEM_STATUS_DEMODSTATE(self) self.zz_fdict['DEMODSTATE'] = self.DEMODSTATE self.FRAMEDETID = RM_Field_MODEM_STATUS_FRAMEDETID(self) self.zz_fdict['FRAMEDETID'] = self.FRAMEDETID self.ANTSEL = RM_Field_MODEM_STATUS_ANTSEL(self) self.zz_fdict['ANTSEL'] = self.ANTSEL self.TIMSEQINV = RM_Field_MODEM_STATUS_TIMSEQINV(self) self.zz_fdict['TIMSEQINV'] = self.TIMSEQINV self.TIMLOSTCAUSE = RM_Field_MODEM_STATUS_TIMLOSTCAUSE(self) self.zz_fdict['TIMLOSTCAUSE'] = self.TIMLOSTCAUSE self.DSADETECTED = RM_Field_MODEM_STATUS_DSADETECTED(self) self.zz_fdict['DSADETECTED'] = self.DSADETECTED self.DSAFREQESTDONE = RM_Field_MODEM_STATUS_DSAFREQESTDONE(self) self.zz_fdict['DSAFREQESTDONE'] = self.DSAFREQESTDONE self.VITERBIDEMODTIMDET = RM_Field_MODEM_STATUS_VITERBIDEMODTIMDET(self) self.zz_fdict['VITERBIDEMODTIMDET'] = self.VITERBIDEMODTIMDET self.VITERBIDEMODFRAMEDET = RM_Field_MODEM_STATUS_VITERBIDEMODFRAMEDET(self) self.zz_fdict['VITERBIDEMODFRAMEDET'] = self.VITERBIDEMODFRAMEDET self.STAMPSTATE = RM_Field_MODEM_STATUS_STAMPSTATE(self) self.zz_fdict['STAMPSTATE'] = self.STAMPSTATE self.CORR = RM_Field_MODEM_STATUS_CORR(self) self.zz_fdict['CORR'] = self.CORR self.WEAKSYMBOLS = RM_Field_MODEM_STATUS_WEAKSYMBOLS(self) self.zz_fdict['WEAKSYMBOLS'] = self.WEAKSYMBOLS self.__dict__['zz_frozen'] = True class RM_Register_MODEM_TIMDETSTATUS(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_TIMDETSTATUS, self).__init__(rmio, label, 0xa8014000, 0x00C, 'TIMDETSTATUS', 'MODEM.TIMDETSTATUS', 'read-only', u"", 0x00000000, 0x1F0FFFFF) self.TIMDETCORR = RM_Field_MODEM_TIMDETSTATUS_TIMDETCORR(self) self.zz_fdict['TIMDETCORR'] = self.TIMDETCORR self.TIMDETFREQOFFEST = RM_Field_MODEM_TIMDETSTATUS_TIMDETFREQOFFEST(self) self.zz_fdict['TIMDETFREQOFFEST'] = self.TIMDETFREQOFFEST self.TIMDETPREERRORS = RM_Field_MODEM_TIMDETSTATUS_TIMDETPREERRORS(self) self.zz_fdict['TIMDETPREERRORS'] = self.TIMDETPREERRORS self.TIMDETPASS = RM_Field_MODEM_TIMDETSTATUS_TIMDETPASS(self) self.zz_fdict['TIMDETPASS'] = self.TIMDETPASS self.TIMDETINDEX = RM_Field_MODEM_TIMDETSTATUS_TIMDETINDEX(self) self.zz_fdict['TIMDETINDEX'] = self.TIMDETINDEX self.__dict__['zz_frozen'] = True class RM_Register_MODEM_FREQOFFEST(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_FREQOFFEST, self).__init__(rmio, label, 0xa8014000, 0x010, 'FREQOFFEST', 'MODEM.FREQOFFEST', 'read-only', u"", 0x00000000, 0xFFFF1FFF) self.FREQOFFEST = RM_Field_MODEM_FREQOFFEST_FREQOFFEST(self) self.zz_fdict['FREQOFFEST'] = self.FREQOFFEST self.CORRVAL = RM_Field_MODEM_FREQOFFEST_CORRVAL(self) self.zz_fdict['CORRVAL'] = self.CORRVAL self.SOFTVAL = RM_Field_MODEM_FREQOFFEST_SOFTVAL(self) self.zz_fdict['SOFTVAL'] = self.SOFTVAL self.__dict__['zz_frozen'] = True class RM_Register_MODEM_AFCADJRX(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_AFCADJRX, self).__init__(rmio, label, 0xa8014000, 0x014, 'AFCADJRX', 'MODEM.AFCADJRX', 'read-only', u"", 0x00000000, 0x0007FFFF) self.AFCADJRX = RM_Field_MODEM_AFCADJRX_AFCADJRX(self) self.zz_fdict['AFCADJRX'] = self.AFCADJRX self.__dict__['zz_frozen'] = True class RM_Register_MODEM_AFCADJTX(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_AFCADJTX, self).__init__(rmio, label, 0xa8014000, 0x018, 'AFCADJTX', 'MODEM.AFCADJTX', 'read-only', u"", 0x00000000, 0x0007FFFF) self.AFCADJTX = RM_Field_MODEM_AFCADJTX_AFCADJTX(self) self.zz_fdict['AFCADJTX'] = self.AFCADJTX self.__dict__['zz_frozen'] = True class RM_Register_MODEM_MIXCTRL(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_MIXCTRL, self).__init__(rmio, label, 0xa8014000, 0x01C, 'MIXCTRL', 'MODEM.MIXCTRL', 'read-write', u"", 0x00000000, 0x0000001F) self.ANAMIXMODE = RM_Field_MODEM_MIXCTRL_ANAMIXMODE(self) self.zz_fdict['ANAMIXMODE'] = self.ANAMIXMODE self.DIGIQSWAPEN = RM_Field_MODEM_MIXCTRL_DIGIQSWAPEN(self) self.zz_fdict['DIGIQSWAPEN'] = self.DIGIQSWAPEN self.__dict__['zz_frozen'] = True class RM_Register_MODEM_CTRL0(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_CTRL0, self).__init__(rmio, label, 0xa8014000, 0x020, 'CTRL0', 'MODEM.CTRL0', 'read-write', u"", 0x00000000, 0xFFFFFFFF) self.FDM0DIFFDIS = RM_Field_MODEM_CTRL0_FDM0DIFFDIS(self) self.zz_fdict['FDM0DIFFDIS'] = self.FDM0DIFFDIS self.MAPFSK = RM_Field_MODEM_CTRL0_MAPFSK(self) self.zz_fdict['MAPFSK'] = self.MAPFSK self.CODING = RM_Field_MODEM_CTRL0_CODING(self) self.zz_fdict['CODING'] = self.CODING self.MODFORMAT = RM_Field_MODEM_CTRL0_MODFORMAT(self) self.zz_fdict['MODFORMAT'] = self.MODFORMAT self.DUALCORROPTDIS = RM_Field_MODEM_CTRL0_DUALCORROPTDIS(self) self.zz_fdict['DUALCORROPTDIS'] = self.DUALCORROPTDIS self.OOKASYNCPIN = RM_Field_MODEM_CTRL0_OOKASYNCPIN(self) self.zz_fdict['OOKASYNCPIN'] = self.OOKASYNCPIN self.DSSSLEN = RM_Field_MODEM_CTRL0_DSSSLEN(self) self.zz_fdict['DSSSLEN'] = self.DSSSLEN self.DSSSSHIFTS = RM_Field_MODEM_CTRL0_DSSSSHIFTS(self) self.zz_fdict['DSSSSHIFTS'] = self.DSSSSHIFTS self.DSSSDOUBLE = RM_Field_MODEM_CTRL0_DSSSDOUBLE(self) self.zz_fdict['DSSSDOUBLE'] = self.DSSSDOUBLE self.DETDIS = RM_Field_MODEM_CTRL0_DETDIS(self) self.zz_fdict['DETDIS'] = self.DETDIS self.DIFFENCMODE = RM_Field_MODEM_CTRL0_DIFFENCMODE(self) self.zz_fdict['DIFFENCMODE'] = self.DIFFENCMODE self.SHAPING = RM_Field_MODEM_CTRL0_SHAPING(self) self.zz_fdict['SHAPING'] = self.SHAPING self.DEMODRAWDATASEL = RM_Field_MODEM_CTRL0_DEMODRAWDATASEL(self) self.zz_fdict['DEMODRAWDATASEL'] = self.DEMODRAWDATASEL self.FRAMEDETDEL = RM_Field_MODEM_CTRL0_FRAMEDETDEL(self) self.zz_fdict['FRAMEDETDEL'] = self.FRAMEDETDEL self.__dict__['zz_frozen'] = True class RM_Register_MODEM_CTRL1(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_CTRL1, self).__init__(rmio, label, 0xa8014000, 0x024, 'CTRL1', 'MODEM.CTRL1', 'read-write', u"", 0x00000000, 0xFFFFDFFF) self.SYNCBITS = RM_Field_MODEM_CTRL1_SYNCBITS(self) self.zz_fdict['SYNCBITS'] = self.SYNCBITS self.SYNCERRORS = RM_Field_MODEM_CTRL1_SYNCERRORS(self) self.zz_fdict['SYNCERRORS'] = self.SYNCERRORS self.DUALSYNC = RM_Field_MODEM_CTRL1_DUALSYNC(self) self.zz_fdict['DUALSYNC'] = self.DUALSYNC self.TXSYNC = RM_Field_MODEM_CTRL1_TXSYNC(self) self.zz_fdict['TXSYNC'] = self.TXSYNC self.SYNCDATA = RM_Field_MODEM_CTRL1_SYNCDATA(self) self.zz_fdict['SYNCDATA'] = self.SYNCDATA self.SYNC1INV = RM_Field_MODEM_CTRL1_SYNC1INV(self) self.zz_fdict['SYNC1INV'] = self.SYNC1INV self.COMPMODE = RM_Field_MODEM_CTRL1_COMPMODE(self) self.zz_fdict['COMPMODE'] = self.COMPMODE self.RESYNCPER = RM_Field_MODEM_CTRL1_RESYNCPER(self) self.zz_fdict['RESYNCPER'] = self.RESYNCPER self.PHASEDEMOD = RM_Field_MODEM_CTRL1_PHASEDEMOD(self) self.zz_fdict['PHASEDEMOD'] = self.PHASEDEMOD self.FREQOFFESTPER = RM_Field_MODEM_CTRL1_FREQOFFESTPER(self) self.zz_fdict['FREQOFFESTPER'] = self.FREQOFFESTPER self.FREQOFFESTLIM = RM_Field_MODEM_CTRL1_FREQOFFESTLIM(self) self.zz_fdict['FREQOFFESTLIM'] = self.FREQOFFESTLIM self.__dict__['zz_frozen'] = True class RM_Register_MODEM_CTRL2(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_CTRL2, self).__init__(rmio, label, 0xa8014000, 0x028, 'CTRL2', 'MODEM.CTRL2', 'read-write', u"", 0x00001000, 0xFFFFFFFF) self.SQITHRESH = RM_Field_MODEM_CTRL2_SQITHRESH(self) self.zz_fdict['SQITHRESH'] = self.SQITHRESH self.RXFRCDIS = RM_Field_MODEM_CTRL2_RXFRCDIS(self) self.zz_fdict['RXFRCDIS'] = self.RXFRCDIS self.RXPINMODE = RM_Field_MODEM_CTRL2_RXPINMODE(self) self.zz_fdict['RXPINMODE'] = self.RXPINMODE self.TXPINMODE = RM_Field_MODEM_CTRL2_TXPINMODE(self) self.zz_fdict['TXPINMODE'] = self.TXPINMODE self.DATAFILTER = RM_Field_MODEM_CTRL2_DATAFILTER(self) self.zz_fdict['DATAFILTER'] = self.DATAFILTER self.BRDIVA = RM_Field_MODEM_CTRL2_BRDIVA(self) self.zz_fdict['BRDIVA'] = self.BRDIVA self.BRDIVB = RM_Field_MODEM_CTRL2_BRDIVB(self) self.zz_fdict['BRDIVB'] = self.BRDIVB self.DEVMULA = RM_Field_MODEM_CTRL2_DEVMULA(self) self.zz_fdict['DEVMULA'] = self.DEVMULA self.DEVMULB = RM_Field_MODEM_CTRL2_DEVMULB(self) self.zz_fdict['DEVMULB'] = self.DEVMULB self.RATESELMODE = RM_Field_MODEM_CTRL2_RATESELMODE(self) self.zz_fdict['RATESELMODE'] = self.RATESELMODE self.DEVWEIGHTDIS = RM_Field_MODEM_CTRL2_DEVWEIGHTDIS(self) self.zz_fdict['DEVWEIGHTDIS'] = self.DEVWEIGHTDIS self.DMASEL = RM_Field_MODEM_CTRL2_DMASEL(self) self.zz_fdict['DMASEL'] = self.DMASEL self.__dict__['zz_frozen'] = True class RM_Register_MODEM_CTRL3(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_CTRL3, self).__init__(rmio, label, 0xa8014000, 0x02C, 'CTRL3', 'MODEM.CTRL3', 'read-write', u"", 0x00008000, 0xFFFFFF81) self.PRSDINEN = RM_Field_MODEM_CTRL3_PRSDINEN(self) self.zz_fdict['PRSDINEN'] = self.PRSDINEN self.RAMTESTEN = RM_Field_MODEM_CTRL3_RAMTESTEN(self) self.zz_fdict['RAMTESTEN'] = self.RAMTESTEN self.ANTDIVMODE = RM_Field_MODEM_CTRL3_ANTDIVMODE(self) self.zz_fdict['ANTDIVMODE'] = self.ANTDIVMODE self.ANTDIVREPEATDIS = RM_Field_MODEM_CTRL3_ANTDIVREPEATDIS(self) self.zz_fdict['ANTDIVREPEATDIS'] = self.ANTDIVREPEATDIS self.TSAMPMODE = RM_Field_MODEM_CTRL3_TSAMPMODE(self) self.zz_fdict['TSAMPMODE'] = self.TSAMPMODE self.TSAMPDEL = RM_Field_MODEM_CTRL3_TSAMPDEL(self) self.zz_fdict['TSAMPDEL'] = self.TSAMPDEL self.TSAMPLIM = RM_Field_MODEM_CTRL3_TSAMPLIM(self) self.zz_fdict['TSAMPLIM'] = self.TSAMPLIM self.__dict__['zz_frozen'] = True class RM_Register_MODEM_CTRL4(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_CTRL4, self).__init__(rmio, label, 0xa8014000, 0x030, 'CTRL4', 'MODEM.CTRL4', 'read-write', u"", 0x03000000, 0xBFFFFFFF) self.ISICOMP = RM_Field_MODEM_CTRL4_ISICOMP(self) self.zz_fdict['ISICOMP'] = self.ISICOMP self.DEVOFFCOMP = RM_Field_MODEM_CTRL4_DEVOFFCOMP(self) self.zz_fdict['DEVOFFCOMP'] = self.DEVOFFCOMP self.PREDISTGAIN = RM_Field_MODEM_CTRL4_PREDISTGAIN(self) self.zz_fdict['PREDISTGAIN'] = self.PREDISTGAIN self.PREDISTDEB = RM_Field_MODEM_CTRL4_PREDISTDEB(self) self.zz_fdict['PREDISTDEB'] = self.PREDISTDEB self.PREDISTAVG = RM_Field_MODEM_CTRL4_PREDISTAVG(self) self.zz_fdict['PREDISTAVG'] = self.PREDISTAVG self.PREDISTRST = RM_Field_MODEM_CTRL4_PREDISTRST(self) self.zz_fdict['PREDISTRST'] = self.PREDISTRST self.PHASECLICKFILT = RM_Field_MODEM_CTRL4_PHASECLICKFILT(self) self.zz_fdict['PHASECLICKFILT'] = self.PHASECLICKFILT self.SOFTDSSSMODE = RM_Field_MODEM_CTRL4_SOFTDSSSMODE(self) self.zz_fdict['SOFTDSSSMODE'] = self.SOFTDSSSMODE self.ADCSATLEVEL = RM_Field_MODEM_CTRL4_ADCSATLEVEL(self) self.zz_fdict['ADCSATLEVEL'] = self.ADCSATLEVEL self.ADCSATDENS = RM_Field_MODEM_CTRL4_ADCSATDENS(self) self.zz_fdict['ADCSATDENS'] = self.ADCSATDENS self.OFFSETPHASEMASKING = RM_Field_MODEM_CTRL4_OFFSETPHASEMASKING(self) self.zz_fdict['OFFSETPHASEMASKING'] = self.OFFSETPHASEMASKING self.OFFSETPHASESCALING = RM_Field_MODEM_CTRL4_OFFSETPHASESCALING(self) self.zz_fdict['OFFSETPHASESCALING'] = self.OFFSETPHASESCALING self.CLKUNDIVREQ = RM_Field_MODEM_CTRL4_CLKUNDIVREQ(self) self.zz_fdict['CLKUNDIVREQ'] = self.CLKUNDIVREQ self.__dict__['zz_frozen'] = True class RM_Register_MODEM_CTRL5(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_CTRL5, self).__init__(rmio, label, 0xa8014000, 0x034, 'CTRL5', 'MODEM.CTRL5', 'read-write', u"", 0x00000000, 0x607007FE) self.BRCALEN = RM_Field_MODEM_CTRL5_BRCALEN(self) self.zz_fdict['BRCALEN'] = self.BRCALEN self.BRCALMODE = RM_Field_MODEM_CTRL5_BRCALMODE(self) self.zz_fdict['BRCALMODE'] = self.BRCALMODE self.BRCALAVG = RM_Field_MODEM_CTRL5_BRCALAVG(self) self.zz_fdict['BRCALAVG'] = self.BRCALAVG self.DETDEL = RM_Field_MODEM_CTRL5_DETDEL(self) self.zz_fdict['DETDEL'] = self.DETDEL self.TDEDGE = RM_Field_MODEM_CTRL5_TDEDGE(self) self.zz_fdict['TDEDGE'] = self.TDEDGE self.TREDGE = RM_Field_MODEM_CTRL5_TREDGE(self) self.zz_fdict['TREDGE'] = self.TREDGE self.DEMODRAWDATASEL2 = RM_Field_MODEM_CTRL5_DEMODRAWDATASEL2(self) self.zz_fdict['DEMODRAWDATASEL2'] = self.DEMODRAWDATASEL2 self.RESYNCBAUDTRANS = RM_Field_MODEM_CTRL5_RESYNCBAUDTRANS(self) self.zz_fdict['RESYNCBAUDTRANS'] = self.RESYNCBAUDTRANS self.RESYNCLIMIT = RM_Field_MODEM_CTRL5_RESYNCLIMIT(self) self.zz_fdict['RESYNCLIMIT'] = self.RESYNCLIMIT self.__dict__['zz_frozen'] = True class RM_Register_MODEM_CTRL6(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_CTRL6, self).__init__(rmio, label, 0xa8014000, 0x038, 'CTRL6', 'MODEM.CTRL6', 'read-write', u"", 0x00000000, 0xF6000000) self.CODINGB = RM_Field_MODEM_CTRL6_CODINGB(self) self.zz_fdict['CODINGB'] = self.CODINGB self.RXRESTARTUPONRSSI = RM_Field_MODEM_CTRL6_RXRESTARTUPONRSSI(self) self.zz_fdict['RXRESTARTUPONRSSI'] = self.RXRESTARTUPONRSSI self.RXRESTARTUPONSHORTRSSI = RM_Field_MODEM_CTRL6_RXRESTARTUPONSHORTRSSI(self) self.zz_fdict['RXRESTARTUPONSHORTRSSI'] = self.RXRESTARTUPONSHORTRSSI self.RXBRCALCDIS = RM_Field_MODEM_CTRL6_RXBRCALCDIS(self) self.zz_fdict['RXBRCALCDIS'] = self.RXBRCALCDIS self.DEMODRESTARTALL = RM_Field_MODEM_CTRL6_DEMODRESTARTALL(self) self.zz_fdict['DEMODRESTARTALL'] = self.DEMODRESTARTALL self.__dict__['zz_frozen'] = True class RM_Register_MODEM_TXBR(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_TXBR, self).__init__(rmio, label, 0xa8014000, 0x058, 'TXBR', 'MODEM.TXBR', 'read-write', u"", 0x00000000, 0x00FFFFFF) self.TXBRNUM = RM_Field_MODEM_TXBR_TXBRNUM(self) self.zz_fdict['TXBRNUM'] = self.TXBRNUM self.TXBRDEN = RM_Field_MODEM_TXBR_TXBRDEN(self) self.zz_fdict['TXBRDEN'] = self.TXBRDEN self.__dict__['zz_frozen'] = True class RM_Register_MODEM_RXBR(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_RXBR, self).__init__(rmio, label, 0xa8014000, 0x05C, 'RXBR', 'MODEM.RXBR', 'read-write', u"", 0x00000000, 0x00001FFF) self.RXBRNUM = RM_Field_MODEM_RXBR_RXBRNUM(self) self.zz_fdict['RXBRNUM'] = self.RXBRNUM self.RXBRDEN = RM_Field_MODEM_RXBR_RXBRDEN(self) self.zz_fdict['RXBRDEN'] = self.RXBRDEN self.RXBRINT = RM_Field_MODEM_RXBR_RXBRINT(self) self.zz_fdict['RXBRINT'] = self.RXBRINT self.__dict__['zz_frozen'] = True class RM_Register_MODEM_CF(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_CF, self).__init__(rmio, label, 0xa8014000, 0x060, 'CF', 'MODEM.CF', 'read-write', u"", 0x00000000, 0xCFFFFFFF) self.DEC0 = RM_Field_MODEM_CF_DEC0(self) self.zz_fdict['DEC0'] = self.DEC0 self.DEC1 = RM_Field_MODEM_CF_DEC1(self) self.zz_fdict['DEC1'] = self.DEC1 self.DEC2 = RM_Field_MODEM_CF_DEC2(self) self.zz_fdict['DEC2'] = self.DEC2 self.CFOSR = RM_Field_MODEM_CF_CFOSR(self) self.zz_fdict['CFOSR'] = self.CFOSR self.DEC1GAIN = RM_Field_MODEM_CF_DEC1GAIN(self) self.zz_fdict['DEC1GAIN'] = self.DEC1GAIN self.ADCBITORDERI = RM_Field_MODEM_CF_ADCBITORDERI(self) self.zz_fdict['ADCBITORDERI'] = self.ADCBITORDERI self.ADCBITORDERQ = RM_Field_MODEM_CF_ADCBITORDERQ(self) self.zz_fdict['ADCBITORDERQ'] = self.ADCBITORDERQ self.__dict__['zz_frozen'] = True class RM_Register_MODEM_PRE(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_PRE, self).__init__(rmio, label, 0xa8014000, 0x064, 'PRE', 'MODEM.PRE', 'read-write', u"", 0x00000000, 0xFFFF1FFF) self.BASE = RM_Field_MODEM_PRE_BASE(self) self.zz_fdict['BASE'] = self.BASE self.BASEBITS = RM_Field_MODEM_PRE_BASEBITS(self) self.zz_fdict['BASEBITS'] = self.BASEBITS self.PRESYMB4FSK = RM_Field_MODEM_PRE_PRESYMB4FSK(self) self.zz_fdict['PRESYMB4FSK'] = self.PRESYMB4FSK self.PREERRORS = RM_Field_MODEM_PRE_PREERRORS(self) self.zz_fdict['PREERRORS'] = self.PREERRORS self.DSSSPRE = RM_Field_MODEM_PRE_DSSSPRE(self) self.zz_fdict['DSSSPRE'] = self.DSSSPRE self.SYNCSYMB4FSK = RM_Field_MODEM_PRE_SYNCSYMB4FSK(self) self.zz_fdict['SYNCSYMB4FSK'] = self.SYNCSYMB4FSK self.TXBASES = RM_Field_MODEM_PRE_TXBASES(self) self.zz_fdict['TXBASES'] = self.TXBASES self.__dict__['zz_frozen'] = True class RM_Register_MODEM_SYNC0(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_SYNC0, self).__init__(rmio, label, 0xa8014000, 0x068, 'SYNC0', 'MODEM.SYNC0', 'read-write', u"", 0x00000000, 0xFFFFFFFF) self.SYNC0 = RM_Field_MODEM_SYNC0_SYNC0(self) self.zz_fdict['SYNC0'] = self.SYNC0 self.__dict__['zz_frozen'] = True class RM_Register_MODEM_SYNC1(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_SYNC1, self).__init__(rmio, label, 0xa8014000, 0x06C, 'SYNC1', 'MODEM.SYNC1', 'read-write', u"", 0x00000000, 0xFFFFFFFF) self.SYNC1 = RM_Field_MODEM_SYNC1_SYNC1(self) self.zz_fdict['SYNC1'] = self.SYNC1 self.__dict__['zz_frozen'] = True class RM_Register_MODEM_TIMING(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_TIMING, self).__init__(rmio, label, 0xa8014000, 0x080, 'TIMING', 'MODEM.TIMING', 'read-write', u"", 0x00000000, 0xFFFFFFFF) self.TIMTHRESH = RM_Field_MODEM_TIMING_TIMTHRESH(self) self.zz_fdict['TIMTHRESH'] = self.TIMTHRESH self.TIMINGBASES = RM_Field_MODEM_TIMING_TIMINGBASES(self) self.zz_fdict['TIMINGBASES'] = self.TIMINGBASES self.ADDTIMSEQ = RM_Field_MODEM_TIMING_ADDTIMSEQ(self) self.zz_fdict['ADDTIMSEQ'] = self.ADDTIMSEQ self.TIMSEQINVEN = RM_Field_MODEM_TIMING_TIMSEQINVEN(self) self.zz_fdict['TIMSEQINVEN'] = self.TIMSEQINVEN self.TIMSEQSYNC = RM_Field_MODEM_TIMING_TIMSEQSYNC(self) self.zz_fdict['TIMSEQSYNC'] = self.TIMSEQSYNC self.FDM0THRESH = RM_Field_MODEM_TIMING_FDM0THRESH(self) self.zz_fdict['FDM0THRESH'] = self.FDM0THRESH self.OFFSUBNUM = RM_Field_MODEM_TIMING_OFFSUBNUM(self) self.zz_fdict['OFFSUBNUM'] = self.OFFSUBNUM self.OFFSUBDEN = RM_Field_MODEM_TIMING_OFFSUBDEN(self) self.zz_fdict['OFFSUBDEN'] = self.OFFSUBDEN self.TSAGCDEL = RM_Field_MODEM_TIMING_TSAGCDEL(self) self.zz_fdict['TSAGCDEL'] = self.TSAGCDEL self.FASTRESYNC = RM_Field_MODEM_TIMING_FASTRESYNC(self) self.zz_fdict['FASTRESYNC'] = self.FASTRESYNC self.__dict__['zz_frozen'] = True class RM_Register_MODEM_DSSS0(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_DSSS0, self).__init__(rmio, label, 0xa8014000, 0x084, 'DSSS0', 'MODEM.DSSS0', 'read-write', u"", 0x00000000, 0xFFFFFFFF) self.DSSS0 = RM_Field_MODEM_DSSS0_DSSS0(self) self.zz_fdict['DSSS0'] = self.DSSS0 self.__dict__['zz_frozen'] = True class RM_Register_MODEM_MODINDEX(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_MODINDEX, self).__init__(rmio, label, 0xa8014000, 0x088, 'MODINDEX', 'MODEM.MODINDEX', 'read-write', u"", 0x00000000, 0x003F03FF) self.MODINDEXM = RM_Field_MODEM_MODINDEX_MODINDEXM(self) self.zz_fdict['MODINDEXM'] = self.MODINDEXM self.MODINDEXE = RM_Field_MODEM_MODINDEX_MODINDEXE(self) self.zz_fdict['MODINDEXE'] = self.MODINDEXE self.FREQGAINE = RM_Field_MODEM_MODINDEX_FREQGAINE(self) self.zz_fdict['FREQGAINE'] = self.FREQGAINE self.FREQGAINM = RM_Field_MODEM_MODINDEX_FREQGAINM(self) self.zz_fdict['FREQGAINM'] = self.FREQGAINM self.__dict__['zz_frozen'] = True class RM_Register_MODEM_AFC(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_AFC, self).__init__(rmio, label, 0xa8014000, 0x08C, 'AFC', 'MODEM.AFC', 'read-write', u"", 0x00000000, 0x1FFFFDFF) self.AFCSCALEM = RM_Field_MODEM_AFC_AFCSCALEM(self) self.zz_fdict['AFCSCALEM'] = self.AFCSCALEM self.AFCSCALEE = RM_Field_MODEM_AFC_AFCSCALEE(self) self.zz_fdict['AFCSCALEE'] = self.AFCSCALEE self.AFCRXMODE = RM_Field_MODEM_AFC_AFCRXMODE(self) self.zz_fdict['AFCRXMODE'] = self.AFCRXMODE self.AFCTXMODE = RM_Field_MODEM_AFC_AFCTXMODE(self) self.zz_fdict['AFCTXMODE'] = self.AFCTXMODE self.AFCRXCLR = RM_Field_MODEM_AFC_AFCRXCLR(self) self.zz_fdict['AFCRXCLR'] = self.AFCRXCLR self.AFCDEL = RM_Field_MODEM_AFC_AFCDEL(self) self.zz_fdict['AFCDEL'] = self.AFCDEL self.AFCAVGPER = RM_Field_MODEM_AFC_AFCAVGPER(self) self.zz_fdict['AFCAVGPER'] = self.AFCAVGPER self.AFCLIMRESET = RM_Field_MODEM_AFC_AFCLIMRESET(self) self.zz_fdict['AFCLIMRESET'] = self.AFCLIMRESET self.AFCONESHOT = RM_Field_MODEM_AFC_AFCONESHOT(self) self.zz_fdict['AFCONESHOT'] = self.AFCONESHOT self.AFCENINTCOMP = RM_Field_MODEM_AFC_AFCENINTCOMP(self) self.zz_fdict['AFCENINTCOMP'] = self.AFCENINTCOMP self.AFCDSAFREQOFFEST = RM_Field_MODEM_AFC_AFCDSAFREQOFFEST(self) self.zz_fdict['AFCDSAFREQOFFEST'] = self.AFCDSAFREQOFFEST self.AFCDELDET = RM_Field_MODEM_AFC_AFCDELDET(self) self.zz_fdict['AFCDELDET'] = self.AFCDELDET self.__dict__['zz_frozen'] = True class RM_Register_MODEM_AFCADJLIM(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_AFCADJLIM, self).__init__(rmio, label, 0xa8014000, 0x090, 'AFCADJLIM', 'MODEM.AFCADJLIM', 'read-write', u"", 0x00000000, 0x0003FFFF) self.AFCADJLIM = RM_Field_MODEM_AFCADJLIM_AFCADJLIM(self) self.zz_fdict['AFCADJLIM'] = self.AFCADJLIM self.__dict__['zz_frozen'] = True class RM_Register_MODEM_SHAPING0(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_SHAPING0, self).__init__(rmio, label, 0xa8014000, 0x094, 'SHAPING0', 'MODEM.SHAPING0', 'read-write', u"", 0x22130A04, 0xFFFFFFFF) self.COEFF0 = RM_Field_MODEM_SHAPING0_COEFF0(self) self.zz_fdict['COEFF0'] = self.COEFF0 self.COEFF1 = RM_Field_MODEM_SHAPING0_COEFF1(self) self.zz_fdict['COEFF1'] = self.COEFF1 self.COEFF2 = RM_Field_MODEM_SHAPING0_COEFF2(self) self.zz_fdict['COEFF2'] = self.COEFF2 self.COEFF3 = RM_Field_MODEM_SHAPING0_COEFF3(self) self.zz_fdict['COEFF3'] = self.COEFF3 self.__dict__['zz_frozen'] = True class RM_Register_MODEM_SHAPING1(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_SHAPING1, self).__init__(rmio, label, 0xa8014000, 0x098, 'SHAPING1', 'MODEM.SHAPING1', 'read-write', u"", 0x4F4A4132, 0xFFFFFFFF) self.COEFF4 = RM_Field_MODEM_SHAPING1_COEFF4(self) self.zz_fdict['COEFF4'] = self.COEFF4 self.COEFF5 = RM_Field_MODEM_SHAPING1_COEFF5(self) self.zz_fdict['COEFF5'] = self.COEFF5 self.COEFF6 = RM_Field_MODEM_SHAPING1_COEFF6(self) self.zz_fdict['COEFF6'] = self.COEFF6 self.COEFF7 = RM_Field_MODEM_SHAPING1_COEFF7(self) self.zz_fdict['COEFF7'] = self.COEFF7 self.__dict__['zz_frozen'] = True class RM_Register_MODEM_SHAPING2(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_SHAPING2, self).__init__(rmio, label, 0xa8014000, 0x09C, 'SHAPING2', 'MODEM.SHAPING2', 'read-write', u"", 0x00000000, 0xFFFFFFFF) self.COEFF8 = RM_Field_MODEM_SHAPING2_COEFF8(self) self.zz_fdict['COEFF8'] = self.COEFF8 self.COEFF9 = RM_Field_MODEM_SHAPING2_COEFF9(self) self.zz_fdict['COEFF9'] = self.COEFF9 self.COEFF10 = RM_Field_MODEM_SHAPING2_COEFF10(self) self.zz_fdict['COEFF10'] = self.COEFF10 self.COEFF11 = RM_Field_MODEM_SHAPING2_COEFF11(self) self.zz_fdict['COEFF11'] = self.COEFF11 self.__dict__['zz_frozen'] = True class RM_Register_MODEM_SHAPING3(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_SHAPING3, self).__init__(rmio, label, 0xa8014000, 0x0A0, 'SHAPING3', 'MODEM.SHAPING3', 'read-write', u"", 0x00000000, 0xFFFFFFFF) self.COEFF12 = RM_Field_MODEM_SHAPING3_COEFF12(self) self.zz_fdict['COEFF12'] = self.COEFF12 self.COEFF13 = RM_Field_MODEM_SHAPING3_COEFF13(self) self.zz_fdict['COEFF13'] = self.COEFF13 self.COEFF14 = RM_Field_MODEM_SHAPING3_COEFF14(self) self.zz_fdict['COEFF14'] = self.COEFF14 self.COEFF15 = RM_Field_MODEM_SHAPING3_COEFF15(self) self.zz_fdict['COEFF15'] = self.COEFF15 self.__dict__['zz_frozen'] = True class RM_Register_MODEM_SHAPING4(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_SHAPING4, self).__init__(rmio, label, 0xa8014000, 0x0A4, 'SHAPING4', 'MODEM.SHAPING4', 'read-write', u"", 0x00000000, 0xFFFFFFFF) self.COEFF16 = RM_Field_MODEM_SHAPING4_COEFF16(self) self.zz_fdict['COEFF16'] = self.COEFF16 self.COEFF17 = RM_Field_MODEM_SHAPING4_COEFF17(self) self.zz_fdict['COEFF17'] = self.COEFF17 self.COEFF18 = RM_Field_MODEM_SHAPING4_COEFF18(self) self.zz_fdict['COEFF18'] = self.COEFF18 self.COEFF19 = RM_Field_MODEM_SHAPING4_COEFF19(self) self.zz_fdict['COEFF19'] = self.COEFF19 self.__dict__['zz_frozen'] = True class RM_Register_MODEM_SHAPING5(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_SHAPING5, self).__init__(rmio, label, 0xa8014000, 0x0A8, 'SHAPING5', 'MODEM.SHAPING5', 'read-write', u"", 0x00000000, 0xFFFFFFFF) self.COEFF20 = RM_Field_MODEM_SHAPING5_COEFF20(self) self.zz_fdict['COEFF20'] = self.COEFF20 self.COEFF21 = RM_Field_MODEM_SHAPING5_COEFF21(self) self.zz_fdict['COEFF21'] = self.COEFF21 self.COEFF22 = RM_Field_MODEM_SHAPING5_COEFF22(self) self.zz_fdict['COEFF22'] = self.COEFF22 self.COEFF23 = RM_Field_MODEM_SHAPING5_COEFF23(self) self.zz_fdict['COEFF23'] = self.COEFF23 self.__dict__['zz_frozen'] = True class RM_Register_MODEM_SHAPING6(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_SHAPING6, self).__init__(rmio, label, 0xa8014000, 0x0AC, 'SHAPING6', 'MODEM.SHAPING6', 'read-write', u"", 0x00000000, 0xFFFFFFFF) self.COEFF24 = RM_Field_MODEM_SHAPING6_COEFF24(self) self.zz_fdict['COEFF24'] = self.COEFF24 self.COEFF25 = RM_Field_MODEM_SHAPING6_COEFF25(self) self.zz_fdict['COEFF25'] = self.COEFF25 self.COEFF26 = RM_Field_MODEM_SHAPING6_COEFF26(self) self.zz_fdict['COEFF26'] = self.COEFF26 self.COEFF27 = RM_Field_MODEM_SHAPING6_COEFF27(self) self.zz_fdict['COEFF27'] = self.COEFF27 self.__dict__['zz_frozen'] = True class RM_Register_MODEM_SHAPING7(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_SHAPING7, self).__init__(rmio, label, 0xa8014000, 0x0B0, 'SHAPING7', 'MODEM.SHAPING7', 'read-write', u"", 0x00000000, 0xFFFFFFFF) self.COEFF28 = RM_Field_MODEM_SHAPING7_COEFF28(self) self.zz_fdict['COEFF28'] = self.COEFF28 self.COEFF29 = RM_Field_MODEM_SHAPING7_COEFF29(self) self.zz_fdict['COEFF29'] = self.COEFF29 self.COEFF30 = RM_Field_MODEM_SHAPING7_COEFF30(self) self.zz_fdict['COEFF30'] = self.COEFF30 self.COEFF31 = RM_Field_MODEM_SHAPING7_COEFF31(self) self.zz_fdict['COEFF31'] = self.COEFF31 self.__dict__['zz_frozen'] = True class RM_Register_MODEM_SHAPING8(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_SHAPING8, self).__init__(rmio, label, 0xa8014000, 0x0B4, 'SHAPING8', 'MODEM.SHAPING8', 'read-write', u"", 0x00000000, 0xFFFFFFFF) self.COEFF32 = RM_Field_MODEM_SHAPING8_COEFF32(self) self.zz_fdict['COEFF32'] = self.COEFF32 self.COEFF33 = RM_Field_MODEM_SHAPING8_COEFF33(self) self.zz_fdict['COEFF33'] = self.COEFF33 self.COEFF34 = RM_Field_MODEM_SHAPING8_COEFF34(self) self.zz_fdict['COEFF34'] = self.COEFF34 self.COEFF35 = RM_Field_MODEM_SHAPING8_COEFF35(self) self.zz_fdict['COEFF35'] = self.COEFF35 self.__dict__['zz_frozen'] = True class RM_Register_MODEM_SHAPING9(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_SHAPING9, self).__init__(rmio, label, 0xa8014000, 0x0B8, 'SHAPING9', 'MODEM.SHAPING9', 'read-write', u"", 0x00000000, 0xFFFFFFFF) self.COEFF36 = RM_Field_MODEM_SHAPING9_COEFF36(self) self.zz_fdict['COEFF36'] = self.COEFF36 self.COEFF37 = RM_Field_MODEM_SHAPING9_COEFF37(self) self.zz_fdict['COEFF37'] = self.COEFF37 self.COEFF38 = RM_Field_MODEM_SHAPING9_COEFF38(self) self.zz_fdict['COEFF38'] = self.COEFF38 self.COEFF39 = RM_Field_MODEM_SHAPING9_COEFF39(self) self.zz_fdict['COEFF39'] = self.COEFF39 self.__dict__['zz_frozen'] = True class RM_Register_MODEM_SHAPING10(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_SHAPING10, self).__init__(rmio, label, 0xa8014000, 0x0BC, 'SHAPING10', 'MODEM.SHAPING10', 'read-write', u"", 0x00000000, 0xFFFFFFFF) self.COEFF40 = RM_Field_MODEM_SHAPING10_COEFF40(self) self.zz_fdict['COEFF40'] = self.COEFF40 self.COEFF41 = RM_Field_MODEM_SHAPING10_COEFF41(self) self.zz_fdict['COEFF41'] = self.COEFF41 self.COEFF42 = RM_Field_MODEM_SHAPING10_COEFF42(self) self.zz_fdict['COEFF42'] = self.COEFF42 self.COEFF43 = RM_Field_MODEM_SHAPING10_COEFF43(self) self.zz_fdict['COEFF43'] = self.COEFF43 self.__dict__['zz_frozen'] = True class RM_Register_MODEM_SHAPING11(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_SHAPING11, self).__init__(rmio, label, 0xa8014000, 0x0C0, 'SHAPING11', 'MODEM.SHAPING11', 'read-write', u"", 0x00000000, 0xFFFFFFFF) self.COEFF44 = RM_Field_MODEM_SHAPING11_COEFF44(self) self.zz_fdict['COEFF44'] = self.COEFF44 self.COEFF45 = RM_Field_MODEM_SHAPING11_COEFF45(self) self.zz_fdict['COEFF45'] = self.COEFF45 self.COEFF46 = RM_Field_MODEM_SHAPING11_COEFF46(self) self.zz_fdict['COEFF46'] = self.COEFF46 self.COEFF47 = RM_Field_MODEM_SHAPING11_COEFF47(self) self.zz_fdict['COEFF47'] = self.COEFF47 self.__dict__['zz_frozen'] = True class RM_Register_MODEM_RAMPCTRL(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_RAMPCTRL, self).__init__(rmio, label, 0xa8014000, 0x0C4, 'RAMPCTRL', 'MODEM.RAMPCTRL', 'read-write', u"", 0x00000555, 0xFF800FFF) self.RAMPRATE0 = RM_Field_MODEM_RAMPCTRL_RAMPRATE0(self) self.zz_fdict['RAMPRATE0'] = self.RAMPRATE0 self.RAMPRATE1 = RM_Field_MODEM_RAMPCTRL_RAMPRATE1(self) self.zz_fdict['RAMPRATE1'] = self.RAMPRATE1 self.RAMPRATE2 = RM_Field_MODEM_RAMPCTRL_RAMPRATE2(self) self.zz_fdict['RAMPRATE2'] = self.RAMPRATE2 self.RAMPDIS = RM_Field_MODEM_RAMPCTRL_RAMPDIS(self) self.zz_fdict['RAMPDIS'] = self.RAMPDIS self.RAMPVAL = RM_Field_MODEM_RAMPCTRL_RAMPVAL(self) self.zz_fdict['RAMPVAL'] = self.RAMPVAL self.__dict__['zz_frozen'] = True class RM_Register_MODEM_RAMPLEV(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_RAMPLEV, self).__init__(rmio, label, 0xa8014000, 0x0CC, 'RAMPLEV', 'MODEM.RAMPLEV', 'read-write', u"", 0x009F9F9F, 0x00FFFFFF) self.RAMPLEV0 = RM_Field_MODEM_RAMPLEV_RAMPLEV0(self) self.zz_fdict['RAMPLEV0'] = self.RAMPLEV0 self.RAMPLEV1 = RM_Field_MODEM_RAMPLEV_RAMPLEV1(self) self.zz_fdict['RAMPLEV1'] = self.RAMPLEV1 self.RAMPLEV2 = RM_Field_MODEM_RAMPLEV_RAMPLEV2(self) self.zz_fdict['RAMPLEV2'] = self.RAMPLEV2 self.__dict__['zz_frozen'] = True class RM_Register_MODEM_DCCOMP(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_DCCOMP, self).__init__(rmio, label, 0xa8014000, 0x0E0, 'DCCOMP', 'MODEM.DCCOMP', 'read-write', u"", 0x00000030, 0x000001FF) self.DCESTIEN = RM_Field_MODEM_DCCOMP_DCESTIEN(self) self.zz_fdict['DCESTIEN'] = self.DCESTIEN self.DCCOMPEN = RM_Field_MODEM_DCCOMP_DCCOMPEN(self) self.zz_fdict['DCCOMPEN'] = self.DCCOMPEN self.DCRSTEN = RM_Field_MODEM_DCCOMP_DCRSTEN(self) self.zz_fdict['DCRSTEN'] = self.DCRSTEN self.DCCOMPFREEZE = RM_Field_MODEM_DCCOMP_DCCOMPFREEZE(self) self.zz_fdict['DCCOMPFREEZE'] = self.DCCOMPFREEZE self.DCCOMPGEAR = RM_Field_MODEM_DCCOMP_DCCOMPGEAR(self) self.zz_fdict['DCCOMPGEAR'] = self.DCCOMPGEAR self.DCLIMIT = RM_Field_MODEM_DCCOMP_DCLIMIT(self) self.zz_fdict['DCLIMIT'] = self.DCLIMIT self.__dict__['zz_frozen'] = True class RM_Register_MODEM_DCCOMPFILTINIT(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_DCCOMPFILTINIT, self).__init__(rmio, label, 0xa8014000, 0x0E4, 'DCCOMPFILTINIT', 'MODEM.DCCOMPFILTINIT', 'read-write', u"", 0x00000000, 0x7FFFFFFF) self.DCCOMPINITVALI = RM_Field_MODEM_DCCOMPFILTINIT_DCCOMPINITVALI(self) self.zz_fdict['DCCOMPINITVALI'] = self.DCCOMPINITVALI self.DCCOMPINITVALQ = RM_Field_MODEM_DCCOMPFILTINIT_DCCOMPINITVALQ(self) self.zz_fdict['DCCOMPINITVALQ'] = self.DCCOMPINITVALQ self.DCCOMPINIT = RM_Field_MODEM_DCCOMPFILTINIT_DCCOMPINIT(self) self.zz_fdict['DCCOMPINIT'] = self.DCCOMPINIT self.__dict__['zz_frozen'] = True class RM_Register_MODEM_DCESTI(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_DCESTI, self).__init__(rmio, label, 0xa8014000, 0x0E8, 'DCESTI', 'MODEM.DCESTI', 'read-only', u"", 0x00000000, 0x3FFFFFFF) self.DCCOMPESTIVALI = RM_Field_MODEM_DCESTI_DCCOMPESTIVALI(self) self.zz_fdict['DCCOMPESTIVALI'] = self.DCCOMPESTIVALI self.DCCOMPESTIVALQ = RM_Field_MODEM_DCESTI_DCCOMPESTIVALQ(self) self.zz_fdict['DCCOMPESTIVALQ'] = self.DCCOMPESTIVALQ self.__dict__['zz_frozen'] = True class RM_Register_MODEM_SRCCHF(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_SRCCHF, self).__init__(rmio, label, 0xa8014000, 0x0EC, 'SRCCHF', 'MODEM.SRCCHF', 'read-write', u"", 0x00000000, 0xEFFFF8FF) self.SRCRATIO1 = RM_Field_MODEM_SRCCHF_SRCRATIO1(self) self.zz_fdict['SRCRATIO1'] = self.SRCRATIO1 self.SRCENABLE1 = RM_Field_MODEM_SRCCHF_SRCENABLE1(self) self.zz_fdict['SRCENABLE1'] = self.SRCENABLE1 self.SRCRATIO2 = RM_Field_MODEM_SRCCHF_SRCRATIO2(self) self.zz_fdict['SRCRATIO2'] = self.SRCRATIO2 self.SRCENABLE2 = RM_Field_MODEM_SRCCHF_SRCENABLE2(self) self.zz_fdict['SRCENABLE2'] = self.SRCENABLE2 self.BWSEL = RM_Field_MODEM_SRCCHF_BWSEL(self) self.zz_fdict['BWSEL'] = self.BWSEL self.INTOSR = RM_Field_MODEM_SRCCHF_INTOSR(self) self.zz_fdict['INTOSR'] = self.INTOSR self.__dict__['zz_frozen'] = True class RM_Register_MODEM_DSATHD0(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_DSATHD0, self).__init__(rmio, label, 0xa8014000, 0x0F4, 'DSATHD0', 'MODEM.DSATHD0', 'read-write', u"", 0x07830464, 0xFFFFFFFF) self.SPIKETHD = RM_Field_MODEM_DSATHD0_SPIKETHD(self) self.zz_fdict['SPIKETHD'] = self.SPIKETHD self.UNMODTHD = RM_Field_MODEM_DSATHD0_UNMODTHD(self) self.zz_fdict['UNMODTHD'] = self.UNMODTHD self.FDEVMINTHD = RM_Field_MODEM_DSATHD0_FDEVMINTHD(self) self.zz_fdict['FDEVMINTHD'] = self.FDEVMINTHD self.FDEVMAXTHD = RM_Field_MODEM_DSATHD0_FDEVMAXTHD(self) self.zz_fdict['FDEVMAXTHD'] = self.FDEVMAXTHD self.__dict__['zz_frozen'] = True class RM_Register_MODEM_DSATHD1(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_DSATHD1, self).__init__(rmio, label, 0xa8014000, 0x0F8, 'DSATHD1', 'MODEM.DSATHD1', 'read-write', u"", 0x3AC81388, 0x7FFFFFFF) self.POWABSTHD = RM_Field_MODEM_DSATHD1_POWABSTHD(self) self.zz_fdict['POWABSTHD'] = self.POWABSTHD self.POWRELTHD = RM_Field_MODEM_DSATHD1_POWRELTHD(self) self.zz_fdict['POWRELTHD'] = self.POWRELTHD self.DSARSTCNT = RM_Field_MODEM_DSATHD1_DSARSTCNT(self) self.zz_fdict['DSARSTCNT'] = self.DSARSTCNT self.RSSIJMPTHD = RM_Field_MODEM_DSATHD1_RSSIJMPTHD(self) self.zz_fdict['RSSIJMPTHD'] = self.RSSIJMPTHD self.FREQLATDLY = RM_Field_MODEM_DSATHD1_FREQLATDLY(self) self.zz_fdict['FREQLATDLY'] = self.FREQLATDLY self.PWRFLTBYP = RM_Field_MODEM_DSATHD1_PWRFLTBYP(self) self.zz_fdict['PWRFLTBYP'] = self.PWRFLTBYP self.AMPFLTBYP = RM_Field_MODEM_DSATHD1_AMPFLTBYP(self) self.zz_fdict['AMPFLTBYP'] = self.AMPFLTBYP self.PWRDETDIS = RM_Field_MODEM_DSATHD1_PWRDETDIS(self) self.zz_fdict['PWRDETDIS'] = self.PWRDETDIS self.FREQSCALE = RM_Field_MODEM_DSATHD1_FREQSCALE(self) self.zz_fdict['FREQSCALE'] = self.FREQSCALE self.__dict__['zz_frozen'] = True class RM_Register_MODEM_DSACTRL(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_DSACTRL, self).__init__(rmio, label, 0xa8014000, 0x0FC, 'DSACTRL', 'MODEM.DSACTRL', 'read-write', u"", 0x000A2090, 0xFFEFFFFF) self.DSAMODE = RM_Field_MODEM_DSACTRL_DSAMODE(self) self.zz_fdict['DSAMODE'] = self.DSAMODE self.ARRTHD = RM_Field_MODEM_DSACTRL_ARRTHD(self) self.zz_fdict['ARRTHD'] = self.ARRTHD self.ARRTOLERTHD0 = RM_Field_MODEM_DSACTRL_ARRTOLERTHD0(self) self.zz_fdict['ARRTOLERTHD0'] = self.ARRTOLERTHD0 self.ARRTOLERTHD1 = RM_Field_MODEM_DSACTRL_ARRTOLERTHD1(self) self.zz_fdict['ARRTOLERTHD1'] = self.ARRTOLERTHD1 self.SCHPRD = RM_Field_MODEM_DSACTRL_SCHPRD(self) self.zz_fdict['SCHPRD'] = self.SCHPRD self.FREQAVGSYM = RM_Field_MODEM_DSACTRL_FREQAVGSYM(self) self.zz_fdict['FREQAVGSYM'] = self.FREQAVGSYM self.TRANRSTDSA = RM_Field_MODEM_DSACTRL_TRANRSTDSA(self) self.zz_fdict['TRANRSTDSA'] = self.TRANRSTDSA self.DSARSTON = RM_Field_MODEM_DSACTRL_DSARSTON(self) self.zz_fdict['DSARSTON'] = self.DSARSTON self.GAINREDUCDLY = RM_Field_MODEM_DSACTRL_GAINREDUCDLY(self) self.zz_fdict['GAINREDUCDLY'] = self.GAINREDUCDLY self.LOWDUTY = RM_Field_MODEM_DSACTRL_LOWDUTY(self) self.zz_fdict['LOWDUTY'] = self.LOWDUTY self.RESTORE = RM_Field_MODEM_DSACTRL_RESTORE(self) self.zz_fdict['RESTORE'] = self.RESTORE self.AGCBAUDEN = RM_Field_MODEM_DSACTRL_AGCBAUDEN(self) self.zz_fdict['AGCBAUDEN'] = self.AGCBAUDEN self.AMPJUPTHD = RM_Field_MODEM_DSACTRL_AMPJUPTHD(self) self.zz_fdict['AMPJUPTHD'] = self.AMPJUPTHD self.__dict__['zz_frozen'] = True class RM_Register_MODEM_VITERBIDEMOD(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_VITERBIDEMOD, self).__init__(rmio, label, 0xa8014000, 0x100, 'VITERBIDEMOD', 'MODEM.VITERBIDEMOD', 'read-write', u"", 0x00206100, 0xFFFFFFFF) self.VTDEMODEN = RM_Field_MODEM_VITERBIDEMOD_VTDEMODEN(self) self.zz_fdict['VTDEMODEN'] = self.VTDEMODEN self.HARDDECISION = RM_Field_MODEM_VITERBIDEMOD_HARDDECISION(self) self.zz_fdict['HARDDECISION'] = self.HARDDECISION self.VITERBIKSI1 = RM_Field_MODEM_VITERBIDEMOD_VITERBIKSI1(self) self.zz_fdict['VITERBIKSI1'] = self.VITERBIKSI1 self.VITERBIKSI2 = RM_Field_MODEM_VITERBIDEMOD_VITERBIKSI2(self) self.zz_fdict['VITERBIKSI2'] = self.VITERBIKSI2 self.VITERBIKSI3 = RM_Field_MODEM_VITERBIDEMOD_VITERBIKSI3(self) self.zz_fdict['VITERBIKSI3'] = self.VITERBIKSI3 self.SYNTHAFC = RM_Field_MODEM_VITERBIDEMOD_SYNTHAFC(self) self.zz_fdict['SYNTHAFC'] = self.SYNTHAFC self.CORRCYCLE = RM_Field_MODEM_VITERBIDEMOD_CORRCYCLE(self) self.zz_fdict['CORRCYCLE'] = self.CORRCYCLE self.CORRSTPSIZE = RM_Field_MODEM_VITERBIDEMOD_CORRSTPSIZE(self) self.zz_fdict['CORRSTPSIZE'] = self.CORRSTPSIZE self.DISDEMODOF = RM_Field_MODEM_VITERBIDEMOD_DISDEMODOF(self) self.zz_fdict['DISDEMODOF'] = self.DISDEMODOF self.__dict__['zz_frozen'] = True class RM_Register_MODEM_VTCORRCFG0(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_VTCORRCFG0, self).__init__(rmio, label, 0xa8014000, 0x104, 'VTCORRCFG0', 'MODEM.VTCORRCFG0', 'read-write', u"", 0x123556B7, 0xFFFFFFFF) self.EXPECTPATT = RM_Field_MODEM_VTCORRCFG0_EXPECTPATT(self) self.zz_fdict['EXPECTPATT'] = self.EXPECTPATT self.__dict__['zz_frozen'] = True class RM_Register_MODEM_DIGMIXCTRL(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_DIGMIXCTRL, self).__init__(rmio, label, 0xa8014000, 0x10C, 'DIGMIXCTRL', 'MODEM.DIGMIXCTRL', 'read-write', u"", 0x00000000, 0x007FFFFF) self.DIGMIXFREQ = RM_Field_MODEM_DIGMIXCTRL_DIGMIXFREQ(self) self.zz_fdict['DIGMIXFREQ'] = self.DIGMIXFREQ self.DIGMIXMODE = RM_Field_MODEM_DIGMIXCTRL_DIGMIXMODE(self) self.zz_fdict['DIGMIXMODE'] = self.DIGMIXMODE self.MIXERCONJ = RM_Field_MODEM_DIGMIXCTRL_MIXERCONJ(self) self.zz_fdict['MIXERCONJ'] = self.MIXERCONJ self.DIGMIXFB = RM_Field_MODEM_DIGMIXCTRL_DIGMIXFB(self) self.zz_fdict['DIGMIXFB'] = self.DIGMIXFB self.__dict__['zz_frozen'] = True class RM_Register_MODEM_VTCORRCFG1(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_VTCORRCFG1, self).__init__(rmio, label, 0xa8014000, 0x110, 'VTCORRCFG1', 'MODEM.VTCORRCFG1', 'read-write', u"", 0x29043020, 0x7FFFFFFF) self.CORRSHFTLEN = RM_Field_MODEM_VTCORRCFG1_CORRSHFTLEN(self) self.zz_fdict['CORRSHFTLEN'] = self.CORRSHFTLEN self.VTFRQLIM = RM_Field_MODEM_VTCORRCFG1_VTFRQLIM(self) self.zz_fdict['VTFRQLIM'] = self.VTFRQLIM self.EXPSYNCLEN = RM_Field_MODEM_VTCORRCFG1_EXPSYNCLEN(self) self.zz_fdict['EXPSYNCLEN'] = self.EXPSYNCLEN self.BUFFHEAD = RM_Field_MODEM_VTCORRCFG1_BUFFHEAD(self) self.zz_fdict['BUFFHEAD'] = self.BUFFHEAD self.EXPECTHT = RM_Field_MODEM_VTCORRCFG1_EXPECTHT(self) self.zz_fdict['EXPECTHT'] = self.EXPECTHT self.__dict__['zz_frozen'] = True class RM_Register_MODEM_VTTRACK(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_VTTRACK, self).__init__(rmio, label, 0xa8014000, 0x114, 'VTTRACK', 'MODEM.VTTRACK', 'read-write', u"", 0x4D80BB88, 0xFFFFFFFF) self.FREQTRACKMODE = RM_Field_MODEM_VTTRACK_FREQTRACKMODE(self) self.zz_fdict['FREQTRACKMODE'] = self.FREQTRACKMODE self.TIMTRACKTHD = RM_Field_MODEM_VTTRACK_TIMTRACKTHD(self) self.zz_fdict['TIMTRACKTHD'] = self.TIMTRACKTHD self.TIMEACQUTHD = RM_Field_MODEM_VTTRACK_TIMEACQUTHD(self) self.zz_fdict['TIMEACQUTHD'] = self.TIMEACQUTHD self.TIMCHK = RM_Field_MODEM_VTTRACK_TIMCHK(self) self.zz_fdict['TIMCHK'] = self.TIMCHK self.TIMEOUTMODE = RM_Field_MODEM_VTTRACK_TIMEOUTMODE(self) self.zz_fdict['TIMEOUTMODE'] = self.TIMEOUTMODE self.TIMGEAR = RM_Field_MODEM_VTTRACK_TIMGEAR(self) self.zz_fdict['TIMGEAR'] = self.TIMGEAR self.FREQBIAS = RM_Field_MODEM_VTTRACK_FREQBIAS(self) self.zz_fdict['FREQBIAS'] = self.FREQBIAS self.HIPWRTHD = RM_Field_MODEM_VTTRACK_HIPWRTHD(self) self.zz_fdict['HIPWRTHD'] = self.HIPWRTHD self.SYNCTIMEOUTSEL = RM_Field_MODEM_VTTRACK_SYNCTIMEOUTSEL(self) self.zz_fdict['SYNCTIMEOUTSEL'] = self.SYNCTIMEOUTSEL self.__dict__['zz_frozen'] = True class RM_Register_MODEM_BREST(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_BREST, self).__init__(rmio, label, 0xa8014000, 0x118, 'BREST', 'MODEM.BREST', 'read-only', u"", 0x00000000, 0x000007FF) self.BRESTINT = RM_Field_MODEM_BREST_BRESTINT(self) self.zz_fdict['BRESTINT'] = self.BRESTINT self.BRESTNUM = RM_Field_MODEM_BREST_BRESTNUM(self) self.zz_fdict['BRESTNUM'] = self.BRESTNUM self.__dict__['zz_frozen'] = True class RM_Register_MODEM_AUTOCG(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_AUTOCG, self).__init__(rmio, label, 0xa8014000, 0x124, 'AUTOCG', 'MODEM.AUTOCG', 'read-write', u"", 0x00000000, 0x0000FFFF) self.AUTOCGEN = RM_Field_MODEM_AUTOCG_AUTOCGEN(self) self.zz_fdict['AUTOCGEN'] = self.AUTOCGEN self.__dict__['zz_frozen'] = True class RM_Register_MODEM_CGCLKSTOP(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_CGCLKSTOP, self).__init__(rmio, label, 0xa8014000, 0x128, 'CGCLKSTOP', 'MODEM.CGCLKSTOP', 'read-write', u"", 0x00000000, 0x0000FFFF) self.FORCEOFF = RM_Field_MODEM_CGCLKSTOP_FORCEOFF(self) self.zz_fdict['FORCEOFF'] = self.FORCEOFF self.__dict__['zz_frozen'] = True class RM_Register_MODEM_DSATHD2(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_DSATHD2, self).__init__(rmio, label, 0xa8014000, 0x130, 'DSATHD2', 'MODEM.DSATHD2', 'read-write', u"", 0x0C660664, 0x7FFFFEFF) self.POWABSTHDLOG = RM_Field_MODEM_DSATHD2_POWABSTHDLOG(self) self.zz_fdict['POWABSTHDLOG'] = self.POWABSTHDLOG self.JUMPDETEN = RM_Field_MODEM_DSATHD2_JUMPDETEN(self) self.zz_fdict['JUMPDETEN'] = self.JUMPDETEN self.FDADJTHD = RM_Field_MODEM_DSATHD2_FDADJTHD(self) self.zz_fdict['FDADJTHD'] = self.FDADJTHD self.PMDETPASSTHD = RM_Field_MODEM_DSATHD2_PMDETPASSTHD(self) self.zz_fdict['PMDETPASSTHD'] = self.PMDETPASSTHD self.FREQESTTHD = RM_Field_MODEM_DSATHD2_FREQESTTHD(self) self.zz_fdict['FREQESTTHD'] = self.FREQESTTHD self.INTERFERDET = RM_Field_MODEM_DSATHD2_INTERFERDET(self) self.zz_fdict['INTERFERDET'] = self.INTERFERDET self.PMDETFORCE = RM_Field_MODEM_DSATHD2_PMDETFORCE(self) self.zz_fdict['PMDETFORCE'] = self.PMDETFORCE self.__dict__['zz_frozen'] = True class RM_Register_MODEM_DIRECTMODE(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_DIRECTMODE, self).__init__(rmio, label, 0xa8014000, 0x134, 'DIRECTMODE', 'MODEM.DIRECTMODE', 'read-write', u"", 0x0000010C, 0x00001F0F) self.DMENABLE = RM_Field_MODEM_DIRECTMODE_DMENABLE(self) self.zz_fdict['DMENABLE'] = self.DMENABLE self.SYNCASYNC = RM_Field_MODEM_DIRECTMODE_SYNCASYNC(self) self.zz_fdict['SYNCASYNC'] = self.SYNCASYNC self.SYNCPREAM = RM_Field_MODEM_DIRECTMODE_SYNCPREAM(self) self.zz_fdict['SYNCPREAM'] = self.SYNCPREAM self.CLKWIDTH = RM_Field_MODEM_DIRECTMODE_CLKWIDTH(self) self.zz_fdict['CLKWIDTH'] = self.CLKWIDTH self.__dict__['zz_frozen'] = True class RM_Register_MODEM_LONGRANGE(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_LONGRANGE, self).__init__(rmio, label, 0xa8014000, 0x138, 'LONGRANGE', 'MODEM.LONGRANGE', 'read-write', u"", 0x00FA53E8, 0x7FFFFFFF) self.LRCORRTHD = RM_Field_MODEM_LONGRANGE_LRCORRTHD(self) self.zz_fdict['LRCORRTHD'] = self.LRCORRTHD self.LRCORRSCHWIN = RM_Field_MODEM_LONGRANGE_LRCORRSCHWIN(self) self.zz_fdict['LRCORRSCHWIN'] = self.LRCORRSCHWIN self.LRBLE = RM_Field_MODEM_LONGRANGE_LRBLE(self) self.zz_fdict['LRBLE'] = self.LRBLE self.LRTIMCORRTHD = RM_Field_MODEM_LONGRANGE_LRTIMCORRTHD(self) self.zz_fdict['LRTIMCORRTHD'] = self.LRTIMCORRTHD self.LRBLEDSA = RM_Field_MODEM_LONGRANGE_LRBLEDSA(self) self.zz_fdict['LRBLEDSA'] = self.LRBLEDSA self.LRDEC = RM_Field_MODEM_LONGRANGE_LRDEC(self) self.zz_fdict['LRDEC'] = self.LRDEC self.__dict__['zz_frozen'] = True class RM_Register_MODEM_LONGRANGE1(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_LONGRANGE1, self).__init__(rmio, label, 0xa8014000, 0x13C, 'LONGRANGE1', 'MODEM.LONGRANGE1', 'read-write', u"", 0x00000000, 0x3FFF7FFF) self.LRSS = RM_Field_MODEM_LONGRANGE1_LRSS(self) self.zz_fdict['LRSS'] = self.LRSS self.LRTIMEOUTTHD = RM_Field_MODEM_LONGRANGE1_LRTIMEOUTTHD(self) self.zz_fdict['LRTIMEOUTTHD'] = self.LRTIMEOUTTHD self.CHPWRACCUDEL = RM_Field_MODEM_LONGRANGE1_CHPWRACCUDEL(self) self.zz_fdict['CHPWRACCUDEL'] = self.CHPWRACCUDEL self.HYSVAL = RM_Field_MODEM_LONGRANGE1_HYSVAL(self) self.zz_fdict['HYSVAL'] = self.HYSVAL self.AVGWIN = RM_Field_MODEM_LONGRANGE1_AVGWIN(self) self.zz_fdict['AVGWIN'] = self.AVGWIN self.LRSPIKETHADD = RM_Field_MODEM_LONGRANGE1_LRSPIKETHADD(self) self.zz_fdict['LRSPIKETHADD'] = self.LRSPIKETHADD self.LOGICBASEDPUGATE = RM_Field_MODEM_LONGRANGE1_LOGICBASEDPUGATE(self) self.zz_fdict['LOGICBASEDPUGATE'] = self.LOGICBASEDPUGATE self.LOGICBASEDLRDEMODGATE = RM_Field_MODEM_LONGRANGE1_LOGICBASEDLRDEMODGATE(self) self.zz_fdict['LOGICBASEDLRDEMODGATE'] = self.LOGICBASEDLRDEMODGATE self.__dict__['zz_frozen'] = True class RM_Register_MODEM_LONGRANGE2(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_LONGRANGE2, self).__init__(rmio, label, 0xa8014000, 0x140, 'LONGRANGE2', 'MODEM.LONGRANGE2', 'read-write', u"", 0x00000000, 0xFFFFFFFF) self.LRCHPWRTH1 = RM_Field_MODEM_LONGRANGE2_LRCHPWRTH1(self) self.zz_fdict['LRCHPWRTH1'] = self.LRCHPWRTH1 self.LRCHPWRTH2 = RM_Field_MODEM_LONGRANGE2_LRCHPWRTH2(self) self.zz_fdict['LRCHPWRTH2'] = self.LRCHPWRTH2 self.LRCHPWRTH3 = RM_Field_MODEM_LONGRANGE2_LRCHPWRTH3(self) self.zz_fdict['LRCHPWRTH3'] = self.LRCHPWRTH3 self.LRCHPWRTH4 = RM_Field_MODEM_LONGRANGE2_LRCHPWRTH4(self) self.zz_fdict['LRCHPWRTH4'] = self.LRCHPWRTH4 self.__dict__['zz_frozen'] = True class RM_Register_MODEM_LONGRANGE3(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_LONGRANGE3, self).__init__(rmio, label, 0xa8014000, 0x144, 'LONGRANGE3', 'MODEM.LONGRANGE3', 'read-write', u"", 0x00000000, 0xFFFFFFFF) self.LRCHPWRTH5 = RM_Field_MODEM_LONGRANGE3_LRCHPWRTH5(self) self.zz_fdict['LRCHPWRTH5'] = self.LRCHPWRTH5 self.LRCHPWRTH6 = RM_Field_MODEM_LONGRANGE3_LRCHPWRTH6(self) self.zz_fdict['LRCHPWRTH6'] = self.LRCHPWRTH6 self.LRCHPWRTH7 = RM_Field_MODEM_LONGRANGE3_LRCHPWRTH7(self) self.zz_fdict['LRCHPWRTH7'] = self.LRCHPWRTH7 self.LRCHPWRTH8 = RM_Field_MODEM_LONGRANGE3_LRCHPWRTH8(self) self.zz_fdict['LRCHPWRTH8'] = self.LRCHPWRTH8 self.__dict__['zz_frozen'] = True class RM_Register_MODEM_LONGRANGE4(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_LONGRANGE4, self).__init__(rmio, label, 0xa8014000, 0x148, 'LONGRANGE4', 'MODEM.LONGRANGE4', 'read-write', u"", 0x00000000, 0xFFFFFFFF) self.LRCHPWRTH9 = RM_Field_MODEM_LONGRANGE4_LRCHPWRTH9(self) self.zz_fdict['LRCHPWRTH9'] = self.LRCHPWRTH9 self.LRCHPWRTH10 = RM_Field_MODEM_LONGRANGE4_LRCHPWRTH10(self) self.zz_fdict['LRCHPWRTH10'] = self.LRCHPWRTH10 self.LRCHPWRSH1 = RM_Field_MODEM_LONGRANGE4_LRCHPWRSH1(self) self.zz_fdict['LRCHPWRSH1'] = self.LRCHPWRSH1 self.LRCHPWRSH2 = RM_Field_MODEM_LONGRANGE4_LRCHPWRSH2(self) self.zz_fdict['LRCHPWRSH2'] = self.LRCHPWRSH2 self.LRCHPWRSH3 = RM_Field_MODEM_LONGRANGE4_LRCHPWRSH3(self) self.zz_fdict['LRCHPWRSH3'] = self.LRCHPWRSH3 self.LRCHPWRSH4 = RM_Field_MODEM_LONGRANGE4_LRCHPWRSH4(self) self.zz_fdict['LRCHPWRSH4'] = self.LRCHPWRSH4 self.__dict__['zz_frozen'] = True class RM_Register_MODEM_LONGRANGE5(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_LONGRANGE5, self).__init__(rmio, label, 0xa8014000, 0x14C, 'LONGRANGE5', 'MODEM.LONGRANGE5', 'read-write', u"", 0x00000000, 0x0FFFFFFF) self.LRCHPWRSH5 = RM_Field_MODEM_LONGRANGE5_LRCHPWRSH5(self) self.zz_fdict['LRCHPWRSH5'] = self.LRCHPWRSH5 self.LRCHPWRSH6 = RM_Field_MODEM_LONGRANGE5_LRCHPWRSH6(self) self.zz_fdict['LRCHPWRSH6'] = self.LRCHPWRSH6 self.LRCHPWRSH7 = RM_Field_MODEM_LONGRANGE5_LRCHPWRSH7(self) self.zz_fdict['LRCHPWRSH7'] = self.LRCHPWRSH7 self.LRCHPWRSH8 = RM_Field_MODEM_LONGRANGE5_LRCHPWRSH8(self) self.zz_fdict['LRCHPWRSH8'] = self.LRCHPWRSH8 self.LRCHPWRSH9 = RM_Field_MODEM_LONGRANGE5_LRCHPWRSH9(self) self.zz_fdict['LRCHPWRSH9'] = self.LRCHPWRSH9 self.LRCHPWRSH10 = RM_Field_MODEM_LONGRANGE5_LRCHPWRSH10(self) self.zz_fdict['LRCHPWRSH10'] = self.LRCHPWRSH10 self.LRCHPWRSH11 = RM_Field_MODEM_LONGRANGE5_LRCHPWRSH11(self) self.zz_fdict['LRCHPWRSH11'] = self.LRCHPWRSH11 self.__dict__['zz_frozen'] = True class RM_Register_MODEM_LONGRANGE6(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_LONGRANGE6, self).__init__(rmio, label, 0xa8014000, 0x150, 'LONGRANGE6', 'MODEM.LONGRANGE6', 'read-write', u"", 0x00000000, 0xFFF7FFFF) self.LRCHPWRSPIKETH = RM_Field_MODEM_LONGRANGE6_LRCHPWRSPIKETH(self) self.zz_fdict['LRCHPWRSPIKETH'] = self.LRCHPWRSPIKETH self.LRSPIKETHD = RM_Field_MODEM_LONGRANGE6_LRSPIKETHD(self) self.zz_fdict['LRSPIKETHD'] = self.LRSPIKETHD self.LRCHPWRTH11 = RM_Field_MODEM_LONGRANGE6_LRCHPWRTH11(self) self.zz_fdict['LRCHPWRTH11'] = self.LRCHPWRTH11 self.LRCHPWRSH12 = RM_Field_MODEM_LONGRANGE6_LRCHPWRSH12(self) self.zz_fdict['LRCHPWRSH12'] = self.LRCHPWRSH12 self.__dict__['zz_frozen'] = True class RM_Register_MODEM_LRFRC(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_LRFRC, self).__init__(rmio, label, 0xa8014000, 0x154, 'LRFRC', 'MODEM.LRFRC', 'read-write', u"", 0x00000101, 0x000001FF) self.CI500 = RM_Field_MODEM_LRFRC_CI500(self) self.zz_fdict['CI500'] = self.CI500 self.FRCACKTIMETHD = RM_Field_MODEM_LRFRC_FRCACKTIMETHD(self) self.zz_fdict['FRCACKTIMETHD'] = self.FRCACKTIMETHD self.LRCORRMODE = RM_Field_MODEM_LRFRC_LRCORRMODE(self) self.zz_fdict['LRCORRMODE'] = self.LRCORRMODE self.__dict__['zz_frozen'] = True class RM_Register_MODEM_DSATHD3(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_DSATHD3, self).__init__(rmio, label, 0xa8014000, 0x168, 'DSATHD3', 'MODEM.DSATHD3', 'read-write', u"", 0x07830464, 0xFFFFFFFF) self.SPIKETHDLO = RM_Field_MODEM_DSATHD3_SPIKETHDLO(self) self.zz_fdict['SPIKETHDLO'] = self.SPIKETHDLO self.UNMODTHDLO = RM_Field_MODEM_DSATHD3_UNMODTHDLO(self) self.zz_fdict['UNMODTHDLO'] = self.UNMODTHDLO self.FDEVMINTHDLO = RM_Field_MODEM_DSATHD3_FDEVMINTHDLO(self) self.zz_fdict['FDEVMINTHDLO'] = self.FDEVMINTHDLO self.FDEVMAXTHDLO = RM_Field_MODEM_DSATHD3_FDEVMAXTHDLO(self) self.zz_fdict['FDEVMAXTHDLO'] = self.FDEVMAXTHDLO self.__dict__['zz_frozen'] = True class RM_Register_MODEM_DSATHD4(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_DSATHD4, self).__init__(rmio, label, 0xa8014000, 0x16C, 'DSATHD4', 'MODEM.DSATHD4', 'read-write', u"", 0x00821388, 0x07FFFFFF) self.POWABSTHDLO = RM_Field_MODEM_DSATHD4_POWABSTHDLO(self) self.zz_fdict['POWABSTHDLO'] = self.POWABSTHDLO self.ARRTOLERTHD0LO = RM_Field_MODEM_DSATHD4_ARRTOLERTHD0LO(self) self.zz_fdict['ARRTOLERTHD0LO'] = self.ARRTOLERTHD0LO self.ARRTOLERTHD1LO = RM_Field_MODEM_DSATHD4_ARRTOLERTHD1LO(self) self.zz_fdict['ARRTOLERTHD1LO'] = self.ARRTOLERTHD1LO self.SWTHD = RM_Field_MODEM_DSATHD4_SWTHD(self) self.zz_fdict['SWTHD'] = self.SWTHD self.__dict__['zz_frozen'] = True class RM_Register_MODEM_VTBLETIMING(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_VTBLETIMING, self).__init__(rmio, label, 0xa8014000, 0x170, 'VTBLETIMING', 'MODEM.VTBLETIMING', 'read-write', u"", 0x00000000, 0x0000FFF3) self.VTBLETIMINGSEL = RM_Field_MODEM_VTBLETIMING_VTBLETIMINGSEL(self) self.zz_fdict['VTBLETIMINGSEL'] = self.VTBLETIMINGSEL self.TIMINGDELAY = RM_Field_MODEM_VTBLETIMING_TIMINGDELAY(self) self.zz_fdict['TIMINGDELAY'] = self.TIMINGDELAY self.FLENOFF = RM_Field_MODEM_VTBLETIMING_FLENOFF(self) self.zz_fdict['FLENOFF'] = self.FLENOFF self.__dict__['zz_frozen'] = True class RM_Register_MODEM_IF(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_IF, self).__init__(rmio, label, 0xa8014000, 0x208, 'IF', 'MODEM.IF', 'read-write', u"", 0x00000000, 0x0007FFFF) self.TXFRAMESENT = RM_Field_MODEM_IF_TXFRAMESENT(self) self.zz_fdict['TXFRAMESENT'] = self.TXFRAMESENT self.TXSYNCSENT = RM_Field_MODEM_IF_TXSYNCSENT(self) self.zz_fdict['TXSYNCSENT'] = self.TXSYNCSENT self.TXPRESENT = RM_Field_MODEM_IF_TXPRESENT(self) self.zz_fdict['TXPRESENT'] = self.TXPRESENT self.TXRAMPDONE = RM_Field_MODEM_IF_TXRAMPDONE(self) self.zz_fdict['TXRAMPDONE'] = self.TXRAMPDONE self.LDTNOARR = RM_Field_MODEM_IF_LDTNOARR(self) self.zz_fdict['LDTNOARR'] = self.LDTNOARR self.PHDSADET = RM_Field_MODEM_IF_PHDSADET(self) self.zz_fdict['PHDSADET'] = self.PHDSADET self.PHYUNCODEDET = RM_Field_MODEM_IF_PHYUNCODEDET(self) self.zz_fdict['PHYUNCODEDET'] = self.PHYUNCODEDET self.PHYCODEDET = RM_Field_MODEM_IF_PHYCODEDET(self) self.zz_fdict['PHYCODEDET'] = self.PHYCODEDET self.RXTIMDET = RM_Field_MODEM_IF_RXTIMDET(self) self.zz_fdict['RXTIMDET'] = self.RXTIMDET self.RXPREDET = RM_Field_MODEM_IF_RXPREDET(self) self.zz_fdict['RXPREDET'] = self.RXPREDET self.RXFRAMEDET0 = RM_Field_MODEM_IF_RXFRAMEDET0(self) self.zz_fdict['RXFRAMEDET0'] = self.RXFRAMEDET0 self.RXFRAMEDET1 = RM_Field_MODEM_IF_RXFRAMEDET1(self) self.zz_fdict['RXFRAMEDET1'] = self.RXFRAMEDET1 self.RXTIMLOST = RM_Field_MODEM_IF_RXTIMLOST(self) self.zz_fdict['RXTIMLOST'] = self.RXTIMLOST self.RXPRELOST = RM_Field_MODEM_IF_RXPRELOST(self) self.zz_fdict['RXPRELOST'] = self.RXPRELOST self.RXFRAMEDETOF = RM_Field_MODEM_IF_RXFRAMEDETOF(self) self.zz_fdict['RXFRAMEDETOF'] = self.RXFRAMEDETOF self.RXTIMNF = RM_Field_MODEM_IF_RXTIMNF(self) self.zz_fdict['RXTIMNF'] = self.RXTIMNF self.FRCTIMOUT = RM_Field_MODEM_IF_FRCTIMOUT(self) self.zz_fdict['FRCTIMOUT'] = self.FRCTIMOUT self.ETS = RM_Field_MODEM_IF_ETS(self) self.zz_fdict['ETS'] = self.ETS self.CFGANTPATTRD = RM_Field_MODEM_IF_CFGANTPATTRD(self) self.zz_fdict['CFGANTPATTRD'] = self.CFGANTPATTRD self.__dict__['zz_frozen'] = True class RM_Register_MODEM_IEN(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_IEN, self).__init__(rmio, label, 0xa8014000, 0x20C, 'IEN', 'MODEM.IEN', 'read-write', u"", 0x00000000, 0x0007FFFF) self.TXFRAMESENT = RM_Field_MODEM_IEN_TXFRAMESENT(self) self.zz_fdict['TXFRAMESENT'] = self.TXFRAMESENT self.TXSYNCSENT = RM_Field_MODEM_IEN_TXSYNCSENT(self) self.zz_fdict['TXSYNCSENT'] = self.TXSYNCSENT self.TXPRESENT = RM_Field_MODEM_IEN_TXPRESENT(self) self.zz_fdict['TXPRESENT'] = self.TXPRESENT self.TXRAMPDONE = RM_Field_MODEM_IEN_TXRAMPDONE(self) self.zz_fdict['TXRAMPDONE'] = self.TXRAMPDONE self.LDTNOARR = RM_Field_MODEM_IEN_LDTNOARR(self) self.zz_fdict['LDTNOARR'] = self.LDTNOARR self.PHDSADET = RM_Field_MODEM_IEN_PHDSADET(self) self.zz_fdict['PHDSADET'] = self.PHDSADET self.PHYUNCODEDET = RM_Field_MODEM_IEN_PHYUNCODEDET(self) self.zz_fdict['PHYUNCODEDET'] = self.PHYUNCODEDET self.PHYCODEDET = RM_Field_MODEM_IEN_PHYCODEDET(self) self.zz_fdict['PHYCODEDET'] = self.PHYCODEDET self.RXTIMDET = RM_Field_MODEM_IEN_RXTIMDET(self) self.zz_fdict['RXTIMDET'] = self.RXTIMDET self.RXPREDET = RM_Field_MODEM_IEN_RXPREDET(self) self.zz_fdict['RXPREDET'] = self.RXPREDET self.RXFRAMEDET0 = RM_Field_MODEM_IEN_RXFRAMEDET0(self) self.zz_fdict['RXFRAMEDET0'] = self.RXFRAMEDET0 self.RXFRAMEDET1 = RM_Field_MODEM_IEN_RXFRAMEDET1(self) self.zz_fdict['RXFRAMEDET1'] = self.RXFRAMEDET1 self.RXTIMLOST = RM_Field_MODEM_IEN_RXTIMLOST(self) self.zz_fdict['RXTIMLOST'] = self.RXTIMLOST self.RXPRELOST = RM_Field_MODEM_IEN_RXPRELOST(self) self.zz_fdict['RXPRELOST'] = self.RXPRELOST self.RXFRAMEDETOF = RM_Field_MODEM_IEN_RXFRAMEDETOF(self) self.zz_fdict['RXFRAMEDETOF'] = self.RXFRAMEDETOF self.RXTIMNF = RM_Field_MODEM_IEN_RXTIMNF(self) self.zz_fdict['RXTIMNF'] = self.RXTIMNF self.FRCTIMOUT = RM_Field_MODEM_IEN_FRCTIMOUT(self) self.zz_fdict['FRCTIMOUT'] = self.FRCTIMOUT self.ETS = RM_Field_MODEM_IEN_ETS(self) self.zz_fdict['ETS'] = self.ETS self.CFGANTPATTRD = RM_Field_MODEM_IEN_CFGANTPATTRD(self) self.zz_fdict['CFGANTPATTRD'] = self.CFGANTPATTRD self.__dict__['zz_frozen'] = True class RM_Register_MODEM_CMD(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_CMD, self).__init__(rmio, label, 0xa8014000, 0x218, 'CMD', 'MODEM.CMD', 'write-only', u"", 0x00000000, 0x00000039) self.PRESTOP = RM_Field_MODEM_CMD_PRESTOP(self) self.zz_fdict['PRESTOP'] = self.PRESTOP self.AFCTXLOCK = RM_Field_MODEM_CMD_AFCTXLOCK(self) self.zz_fdict['AFCTXLOCK'] = self.AFCTXLOCK self.AFCTXCLEAR = RM_Field_MODEM_CMD_AFCTXCLEAR(self) self.zz_fdict['AFCTXCLEAR'] = self.AFCTXCLEAR self.AFCRXCLEAR = RM_Field_MODEM_CMD_AFCRXCLEAR(self) self.zz_fdict['AFCRXCLEAR'] = self.AFCRXCLEAR self.__dict__['zz_frozen'] = True class RM_Register_MODEM_FSMSTATUS(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_FSMSTATUS, self).__init__(rmio, label, 0xa8014000, 0x21C, 'FSMSTATUS', 'MODEM.FSMSTATUS', 'read-only', u"", 0x00000000, 0x00FFFFFF) self.DETSTATE = RM_Field_MODEM_FSMSTATUS_DETSTATE(self) self.zz_fdict['DETSTATE'] = self.DETSTATE self.DSASTATE = RM_Field_MODEM_FSMSTATUS_DSASTATE(self) self.zz_fdict['DSASTATE'] = self.DSASTATE self.LRBLESTATE = RM_Field_MODEM_FSMSTATUS_LRBLESTATE(self) self.zz_fdict['LRBLESTATE'] = self.LRBLESTATE self.NBBLESTATE = RM_Field_MODEM_FSMSTATUS_NBBLESTATE(self) self.zz_fdict['NBBLESTATE'] = self.NBBLESTATE self.ANTDIVSTATE = RM_Field_MODEM_FSMSTATUS_ANTDIVSTATE(self) self.zz_fdict['ANTDIVSTATE'] = self.ANTDIVSTATE self.__dict__['zz_frozen'] = True class RM_Register_MODEM_STATUS2(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_STATUS2, self).__init__(rmio, label, 0xa8014000, 0x220, 'STATUS2', 'MODEM.STATUS2', 'read-only', u"", 0x00000000, 0xFFFCFFFF) self.CHPWRACCUMUX = RM_Field_MODEM_STATUS2_CHPWRACCUMUX(self) self.zz_fdict['CHPWRACCUMUX'] = self.CHPWRACCUMUX self.BBSSMUX = RM_Field_MODEM_STATUS2_BBSSMUX(self) self.zz_fdict['BBSSMUX'] = self.BBSSMUX self.LRBLECI = RM_Field_MODEM_STATUS2_LRBLECI(self) self.zz_fdict['LRBLECI'] = self.LRBLECI self.UNCODEDPHY = RM_Field_MODEM_STATUS2_UNCODEDPHY(self) self.zz_fdict['UNCODEDPHY'] = self.UNCODEDPHY self.CODEDPHY = RM_Field_MODEM_STATUS2_CODEDPHY(self) self.zz_fdict['CODEDPHY'] = self.CODEDPHY self.RTVTCORR = RM_Field_MODEM_STATUS2_RTVTCORR(self) self.zz_fdict['RTVTCORR'] = self.RTVTCORR self.__dict__['zz_frozen'] = True class RM_Register_MODEM_STATUS3(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_STATUS3, self).__init__(rmio, label, 0xa8014000, 0x224, 'STATUS3', 'MODEM.STATUS3', 'read-only', u"", 0x00000000, 0x057FFFFF) self.BBPFOUTABS1 = RM_Field_MODEM_STATUS3_BBPFOUTABS1(self) self.zz_fdict['BBPFOUTABS1'] = self.BBPFOUTABS1 self.BBPFOUTABS = RM_Field_MODEM_STATUS3_BBPFOUTABS(self) self.zz_fdict['BBPFOUTABS'] = self.BBPFOUTABS self.LRDSALIVE = RM_Field_MODEM_STATUS3_LRDSALIVE(self) self.zz_fdict['LRDSALIVE'] = self.LRDSALIVE self.LRDSADET = RM_Field_MODEM_STATUS3_LRDSADET(self) self.zz_fdict['LRDSADET'] = self.LRDSADET self.SYNCSECPEAKABTH = RM_Field_MODEM_STATUS3_SYNCSECPEAKABTH(self) self.zz_fdict['SYNCSECPEAKABTH'] = self.SYNCSECPEAKABTH self.__dict__['zz_frozen'] = True class RM_Register_MODEM_IRCAL(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_IRCAL, self).__init__(rmio, label, 0xa8014000, 0x228, 'IRCAL', 'MODEM.IRCAL', 'read-write', u"", 0x00000000, 0x0000FFBF) self.IRCALEN = RM_Field_MODEM_IRCAL_IRCALEN(self) self.zz_fdict['IRCALEN'] = self.IRCALEN self.MURSHF = RM_Field_MODEM_IRCAL_MURSHF(self) self.zz_fdict['MURSHF'] = self.MURSHF self.MUISHF = RM_Field_MODEM_IRCAL_MUISHF(self) self.zz_fdict['MUISHF'] = self.MUISHF self.IRCORREN = RM_Field_MODEM_IRCAL_IRCORREN(self) self.zz_fdict['IRCORREN'] = self.IRCORREN self.IRCALCOEFRSTCMD = RM_Field_MODEM_IRCAL_IRCALCOEFRSTCMD(self) self.zz_fdict['IRCALCOEFRSTCMD'] = self.IRCALCOEFRSTCMD self.IRCALIFADCDBG = RM_Field_MODEM_IRCAL_IRCALIFADCDBG(self) self.zz_fdict['IRCALIFADCDBG'] = self.IRCALIFADCDBG self.__dict__['zz_frozen'] = True class RM_Register_MODEM_IRCALCOEF(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_IRCALCOEF, self).__init__(rmio, label, 0xa8014000, 0x22C, 'IRCALCOEF', 'MODEM.IRCALCOEF', 'read-only', u"", 0x00000000, 0x7FFF7FFF) self.CRV = RM_Field_MODEM_IRCALCOEF_CRV(self) self.zz_fdict['CRV'] = self.CRV self.CIV = RM_Field_MODEM_IRCALCOEF_CIV(self) self.zz_fdict['CIV'] = self.CIV self.__dict__['zz_frozen'] = True class RM_Register_MODEM_BLEIQDSA(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_BLEIQDSA, self).__init__(rmio, label, 0xa8014000, 0x230, 'BLEIQDSA', 'MODEM.BLEIQDSA', 'read-write', u"", 0x00000000, 0xFFFFFFFF) self.BLEIQDSAEN = RM_Field_MODEM_BLEIQDSA_BLEIQDSAEN(self) self.zz_fdict['BLEIQDSAEN'] = self.BLEIQDSAEN self.BLEIQDSATH = RM_Field_MODEM_BLEIQDSA_BLEIQDSATH(self) self.zz_fdict['BLEIQDSATH'] = self.BLEIQDSATH self.BLEIQDSAIIRCOEFPWR = RM_Field_MODEM_BLEIQDSA_BLEIQDSAIIRCOEFPWR(self) self.zz_fdict['BLEIQDSAIIRCOEFPWR'] = self.BLEIQDSAIIRCOEFPWR self.BLEIQDSADIFFTH1 = RM_Field_MODEM_BLEIQDSA_BLEIQDSADIFFTH1(self) self.zz_fdict['BLEIQDSADIFFTH1'] = self.BLEIQDSADIFFTH1 self.__dict__['zz_frozen'] = True class RM_Register_MODEM_BLEIQDSAEXT1(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_BLEIQDSAEXT1, self).__init__(rmio, label, 0xa8014000, 0x234, 'BLEIQDSAEXT1', 'MODEM.BLEIQDSAEXT1', 'read-write', u"", 0x0E000000, 0x3FFFFFFF) self.FREQSCALEIQDSA = RM_Field_MODEM_BLEIQDSAEXT1_FREQSCALEIQDSA(self) self.zz_fdict['FREQSCALEIQDSA'] = self.FREQSCALEIQDSA self.CHPWRFIRAVGEN = RM_Field_MODEM_BLEIQDSAEXT1_CHPWRFIRAVGEN(self) self.zz_fdict['CHPWRFIRAVGEN'] = self.CHPWRFIRAVGEN self.CHPWRFIRAVGVAL = RM_Field_MODEM_BLEIQDSAEXT1_CHPWRFIRAVGVAL(self) self.zz_fdict['CHPWRFIRAVGVAL'] = self.CHPWRFIRAVGVAL self.CORRIIRAVGMULFACT = RM_Field_MODEM_BLEIQDSAEXT1_CORRIIRAVGMULFACT(self) self.zz_fdict['CORRIIRAVGMULFACT'] = self.CORRIIRAVGMULFACT self.BLEIQDSAADDRBIAS = RM_Field_MODEM_BLEIQDSAEXT1_BLEIQDSAADDRBIAS(self) self.zz_fdict['BLEIQDSAADDRBIAS'] = self.BLEIQDSAADDRBIAS self.BLEIQDSATHCOMB = RM_Field_MODEM_BLEIQDSAEXT1_BLEIQDSATHCOMB(self) self.zz_fdict['BLEIQDSATHCOMB'] = self.BLEIQDSATHCOMB self.MAXCORRCNTIQDSA = RM_Field_MODEM_BLEIQDSAEXT1_MAXCORRCNTIQDSA(self) self.zz_fdict['MAXCORRCNTIQDSA'] = self.MAXCORRCNTIQDSA self.IIRRST = RM_Field_MODEM_BLEIQDSAEXT1_IIRRST(self) self.zz_fdict['IIRRST'] = self.IIRRST self.__dict__['zz_frozen'] = True class RM_Register_MODEM_SYNCPROPERTIES(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_SYNCPROPERTIES, self).__init__(rmio, label, 0xa8014000, 0x238, 'SYNCPROPERTIES', 'MODEM.SYNCPROPERTIES', 'read-write', u"", 0x00000000, 0x000000FF) self.SYNCCORRCLR = RM_Field_MODEM_SYNCPROPERTIES_SYNCCORRCLR(self) self.zz_fdict['SYNCCORRCLR'] = self.SYNCCORRCLR self.SYNCSECPEAKTH = RM_Field_MODEM_SYNCPROPERTIES_SYNCSECPEAKTH(self) self.zz_fdict['SYNCSECPEAKTH'] = self.SYNCSECPEAKTH self.__dict__['zz_frozen'] = True class RM_Register_MODEM_DIGIGAINCTRL(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_DIGIGAINCTRL, self).__init__(rmio, label, 0xa8014000, 0x23C, 'DIGIGAINCTRL', 'MODEM.DIGIGAINCTRL', 'read-write', u"", 0x00000000, 0x000001FF) self.DIGIGAINEN = RM_Field_MODEM_DIGIGAINCTRL_DIGIGAINEN(self) self.zz_fdict['DIGIGAINEN'] = self.DIGIGAINEN self.DIGIGAINSEL = RM_Field_MODEM_DIGIGAINCTRL_DIGIGAINSEL(self) self.zz_fdict['DIGIGAINSEL'] = self.DIGIGAINSEL self.DIGIGAINDOUBLE = RM_Field_MODEM_DIGIGAINCTRL_DIGIGAINDOUBLE(self) self.zz_fdict['DIGIGAINDOUBLE'] = self.DIGIGAINDOUBLE self.DIGIGAINHALF = RM_Field_MODEM_DIGIGAINCTRL_DIGIGAINHALF(self) self.zz_fdict['DIGIGAINHALF'] = self.DIGIGAINHALF self.DEC0GAIN = RM_Field_MODEM_DIGIGAINCTRL_DEC0GAIN(self) self.zz_fdict['DEC0GAIN'] = self.DEC0GAIN self.__dict__['zz_frozen'] = True class RM_Register_MODEM_PRSCTRL(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_PRSCTRL, self).__init__(rmio, label, 0xa8014000, 0x240, 'PRSCTRL', 'MODEM.PRSCTRL', 'read-write', u"", 0x00000000, 0x0003FFFF) self.POSTPONESEL = RM_Field_MODEM_PRSCTRL_POSTPONESEL(self) self.zz_fdict['POSTPONESEL'] = self.POSTPONESEL self.ADVANCESEL = RM_Field_MODEM_PRSCTRL_ADVANCESEL(self) self.zz_fdict['ADVANCESEL'] = self.ADVANCESEL self.NEWWNDSEL = RM_Field_MODEM_PRSCTRL_NEWWNDSEL(self) self.zz_fdict['NEWWNDSEL'] = self.NEWWNDSEL self.WEAKSEL = RM_Field_MODEM_PRSCTRL_WEAKSEL(self) self.zz_fdict['WEAKSEL'] = self.WEAKSEL self.SYNCSENTSEL = RM_Field_MODEM_PRSCTRL_SYNCSENTSEL(self) self.zz_fdict['SYNCSENTSEL'] = self.SYNCSENTSEL self.PRESENTSEL = RM_Field_MODEM_PRSCTRL_PRESENTSEL(self) self.zz_fdict['PRESENTSEL'] = self.PRESENTSEL self.LOWCORRSEL = RM_Field_MODEM_PRSCTRL_LOWCORRSEL(self) self.zz_fdict['LOWCORRSEL'] = self.LOWCORRSEL self.ANT0SEL = RM_Field_MODEM_PRSCTRL_ANT0SEL(self) self.zz_fdict['ANT0SEL'] = self.ANT0SEL self.ANT1SEL = RM_Field_MODEM_PRSCTRL_ANT1SEL(self) self.zz_fdict['ANT1SEL'] = self.ANT1SEL self.__dict__['zz_frozen'] = True class RM_Register_MODEM_PADEBUG(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_PADEBUG, self).__init__(rmio, label, 0xa8014000, 0x244, 'PADEBUG', 'MODEM.PADEBUG', 'read-write', u"", 0x00000000, 0x00001E00) self.MANPACLKAMPCTRL = RM_Field_MODEM_PADEBUG_MANPACLKAMPCTRL(self) self.zz_fdict['MANPACLKAMPCTRL'] = self.MANPACLKAMPCTRL self.ENMANPACLKAMPCTRL = RM_Field_MODEM_PADEBUG_ENMANPACLKAMPCTRL(self) self.zz_fdict['ENMANPACLKAMPCTRL'] = self.ENMANPACLKAMPCTRL self.ENMANPAPOWER = RM_Field_MODEM_PADEBUG_ENMANPAPOWER(self) self.zz_fdict['ENMANPAPOWER'] = self.ENMANPAPOWER self.ENMANPASELSLICE = RM_Field_MODEM_PADEBUG_ENMANPASELSLICE(self) self.zz_fdict['ENMANPASELSLICE'] = self.ENMANPASELSLICE self.__dict__['zz_frozen'] = True class RM_Register_MODEM_REALTIMCFE(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_REALTIMCFE, self).__init__(rmio, label, 0xa8014000, 0x248, 'REALTIMCFE', 'MODEM.REALTIMCFE', 'read-write', u"", 0x001F81F4, 0xE01FFFFF) self.MINCOSTTHD = RM_Field_MODEM_REALTIMCFE_MINCOSTTHD(self) self.zz_fdict['MINCOSTTHD'] = self.MINCOSTTHD self.RTSCHWIN = RM_Field_MODEM_REALTIMCFE_RTSCHWIN(self) self.zz_fdict['RTSCHWIN'] = self.RTSCHWIN self.RTSCHMODE = RM_Field_MODEM_REALTIMCFE_RTSCHMODE(self) self.zz_fdict['RTSCHMODE'] = self.RTSCHMODE self.TRACKINGWIN = RM_Field_MODEM_REALTIMCFE_TRACKINGWIN(self) self.zz_fdict['TRACKINGWIN'] = self.TRACKINGWIN self.SYNCACQWIN = RM_Field_MODEM_REALTIMCFE_SYNCACQWIN(self) self.zz_fdict['SYNCACQWIN'] = self.SYNCACQWIN self.SINEWEN = RM_Field_MODEM_REALTIMCFE_SINEWEN(self) self.zz_fdict['SINEWEN'] = self.SINEWEN self.VTAFCFRAME = RM_Field_MODEM_REALTIMCFE_VTAFCFRAME(self) self.zz_fdict['VTAFCFRAME'] = self.VTAFCFRAME self.RTCFEEN = RM_Field_MODEM_REALTIMCFE_RTCFEEN(self) self.zz_fdict['RTCFEEN'] = self.RTCFEEN self.__dict__['zz_frozen'] = True class RM_Register_MODEM_SEQIF(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_SEQIF, self).__init__(rmio, label, 0xa8014000, 0x24C, 'SEQIF', 'MODEM.SEQIF', 'read-write', u"", 0x00000000, 0x0007FFFF) self.TXFRAMESENT = RM_Field_MODEM_SEQIF_TXFRAMESENT(self) self.zz_fdict['TXFRAMESENT'] = self.TXFRAMESENT self.TXSYNCSENT = RM_Field_MODEM_SEQIF_TXSYNCSENT(self) self.zz_fdict['TXSYNCSENT'] = self.TXSYNCSENT self.TXPRESENT = RM_Field_MODEM_SEQIF_TXPRESENT(self) self.zz_fdict['TXPRESENT'] = self.TXPRESENT self.TXRAMPDONE = RM_Field_MODEM_SEQIF_TXRAMPDONE(self) self.zz_fdict['TXRAMPDONE'] = self.TXRAMPDONE self.LDTNOARR = RM_Field_MODEM_SEQIF_LDTNOARR(self) self.zz_fdict['LDTNOARR'] = self.LDTNOARR self.PHDSADET = RM_Field_MODEM_SEQIF_PHDSADET(self) self.zz_fdict['PHDSADET'] = self.PHDSADET self.PHYUNCODEDET = RM_Field_MODEM_SEQIF_PHYUNCODEDET(self) self.zz_fdict['PHYUNCODEDET'] = self.PHYUNCODEDET self.PHYCODEDET = RM_Field_MODEM_SEQIF_PHYCODEDET(self) self.zz_fdict['PHYCODEDET'] = self.PHYCODEDET self.RXTIMDET = RM_Field_MODEM_SEQIF_RXTIMDET(self) self.zz_fdict['RXTIMDET'] = self.RXTIMDET self.RXPREDET = RM_Field_MODEM_SEQIF_RXPREDET(self) self.zz_fdict['RXPREDET'] = self.RXPREDET self.RXFRAMEDET0 = RM_Field_MODEM_SEQIF_RXFRAMEDET0(self) self.zz_fdict['RXFRAMEDET0'] = self.RXFRAMEDET0 self.RXFRAMEDET1 = RM_Field_MODEM_SEQIF_RXFRAMEDET1(self) self.zz_fdict['RXFRAMEDET1'] = self.RXFRAMEDET1 self.RXTIMLOST = RM_Field_MODEM_SEQIF_RXTIMLOST(self) self.zz_fdict['RXTIMLOST'] = self.RXTIMLOST self.RXPRELOST = RM_Field_MODEM_SEQIF_RXPRELOST(self) self.zz_fdict['RXPRELOST'] = self.RXPRELOST self.RXFRAMEDETOF = RM_Field_MODEM_SEQIF_RXFRAMEDETOF(self) self.zz_fdict['RXFRAMEDETOF'] = self.RXFRAMEDETOF self.RXTIMNF = RM_Field_MODEM_SEQIF_RXTIMNF(self) self.zz_fdict['RXTIMNF'] = self.RXTIMNF self.FRCTIMOUT = RM_Field_MODEM_SEQIF_FRCTIMOUT(self) self.zz_fdict['FRCTIMOUT'] = self.FRCTIMOUT self.ETS = RM_Field_MODEM_SEQIF_ETS(self) self.zz_fdict['ETS'] = self.ETS self.CFGANTPATTRD = RM_Field_MODEM_SEQIF_CFGANTPATTRD(self) self.zz_fdict['CFGANTPATTRD'] = self.CFGANTPATTRD self.__dict__['zz_frozen'] = True class RM_Register_MODEM_SEQIEN(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_SEQIEN, self).__init__(rmio, label, 0xa8014000, 0x250, 'SEQIEN', 'MODEM.SEQIEN', 'read-write', u"", 0x00000000, 0x0007FFFF) self.TXFRAMESENT = RM_Field_MODEM_SEQIEN_TXFRAMESENT(self) self.zz_fdict['TXFRAMESENT'] = self.TXFRAMESENT self.TXSYNCSENT = RM_Field_MODEM_SEQIEN_TXSYNCSENT(self) self.zz_fdict['TXSYNCSENT'] = self.TXSYNCSENT self.TXPRESENT = RM_Field_MODEM_SEQIEN_TXPRESENT(self) self.zz_fdict['TXPRESENT'] = self.TXPRESENT self.TXRAMPDONE = RM_Field_MODEM_SEQIEN_TXRAMPDONE(self) self.zz_fdict['TXRAMPDONE'] = self.TXRAMPDONE self.LDTNOARR = RM_Field_MODEM_SEQIEN_LDTNOARR(self) self.zz_fdict['LDTNOARR'] = self.LDTNOARR self.PHDSADET = RM_Field_MODEM_SEQIEN_PHDSADET(self) self.zz_fdict['PHDSADET'] = self.PHDSADET self.PHYUNCODEDET = RM_Field_MODEM_SEQIEN_PHYUNCODEDET(self) self.zz_fdict['PHYUNCODEDET'] = self.PHYUNCODEDET self.PHYCODEDET = RM_Field_MODEM_SEQIEN_PHYCODEDET(self) self.zz_fdict['PHYCODEDET'] = self.PHYCODEDET self.RXTIMDET = RM_Field_MODEM_SEQIEN_RXTIMDET(self) self.zz_fdict['RXTIMDET'] = self.RXTIMDET self.RXPREDET = RM_Field_MODEM_SEQIEN_RXPREDET(self) self.zz_fdict['RXPREDET'] = self.RXPREDET self.RXFRAMEDET0 = RM_Field_MODEM_SEQIEN_RXFRAMEDET0(self) self.zz_fdict['RXFRAMEDET0'] = self.RXFRAMEDET0 self.RXFRAMEDET1 = RM_Field_MODEM_SEQIEN_RXFRAMEDET1(self) self.zz_fdict['RXFRAMEDET1'] = self.RXFRAMEDET1 self.RXTIMLOST = RM_Field_MODEM_SEQIEN_RXTIMLOST(self) self.zz_fdict['RXTIMLOST'] = self.RXTIMLOST self.RXPRELOST = RM_Field_MODEM_SEQIEN_RXPRELOST(self) self.zz_fdict['RXPRELOST'] = self.RXPRELOST self.RXFRAMEDETOF = RM_Field_MODEM_SEQIEN_RXFRAMEDETOF(self) self.zz_fdict['RXFRAMEDETOF'] = self.RXFRAMEDETOF self.RXTIMNF = RM_Field_MODEM_SEQIEN_RXTIMNF(self) self.zz_fdict['RXTIMNF'] = self.RXTIMNF self.FRCTIMOUT = RM_Field_MODEM_SEQIEN_FRCTIMOUT(self) self.zz_fdict['FRCTIMOUT'] = self.FRCTIMOUT self.ETS = RM_Field_MODEM_SEQIEN_ETS(self) self.zz_fdict['ETS'] = self.ETS self.CFGANTPATTRD = RM_Field_MODEM_SEQIEN_CFGANTPATTRD(self) self.zz_fdict['CFGANTPATTRD'] = self.CFGANTPATTRD self.__dict__['zz_frozen'] = True class RM_Register_MODEM_ETSCTRL(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_ETSCTRL, self).__init__(rmio, label, 0xa8014000, 0x254, 'ETSCTRL', 'MODEM.ETSCTRL', 'read-write', u"", 0x00000000, 0x3FFFF7FF) self.ETSLOC = RM_Field_MODEM_ETSCTRL_ETSLOC(self) self.zz_fdict['ETSLOC'] = self.ETSLOC self.CAPSIGONPRS = RM_Field_MODEM_ETSCTRL_CAPSIGONPRS(self) self.zz_fdict['CAPSIGONPRS'] = self.CAPSIGONPRS self.CAPTRIG = RM_Field_MODEM_ETSCTRL_CAPTRIG(self) self.zz_fdict['CAPTRIG'] = self.CAPTRIG self.__dict__['zz_frozen'] = True class RM_Register_MODEM_ANTSWCTRL(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_ANTSWCTRL, self).__init__(rmio, label, 0xa8014000, 0x258, 'ANTSWCTRL', 'MODEM.ANTSWCTRL', 'read-write', u"", 0x003C0000, 0x01FFFFFF) self.ANTDFLTSEL = RM_Field_MODEM_ANTSWCTRL_ANTDFLTSEL(self) self.zz_fdict['ANTDFLTSEL'] = self.ANTDFLTSEL self.ANTCOUNT = RM_Field_MODEM_ANTSWCTRL_ANTCOUNT(self) self.zz_fdict['ANTCOUNT'] = self.ANTCOUNT self.ANTSWTYPE = RM_Field_MODEM_ANTSWCTRL_ANTSWTYPE(self) self.zz_fdict['ANTSWTYPE'] = self.ANTSWTYPE self.ANTSWRST = RM_Field_MODEM_ANTSWCTRL_ANTSWRST(self) self.zz_fdict['ANTSWRST'] = self.ANTSWRST self.CFGANTPATTEN = RM_Field_MODEM_ANTSWCTRL_CFGANTPATTEN(self) self.zz_fdict['CFGANTPATTEN'] = self.CFGANTPATTEN self.ANTSWENABLE = RM_Field_MODEM_ANTSWCTRL_ANTSWENABLE(self) self.zz_fdict['ANTSWENABLE'] = self.ANTSWENABLE self.EXTDSTOPPULSECNT = RM_Field_MODEM_ANTSWCTRL_EXTDSTOPPULSECNT(self) self.zz_fdict['EXTDSTOPPULSECNT'] = self.EXTDSTOPPULSECNT self.__dict__['zz_frozen'] = True class RM_Register_MODEM_ANTSWSTART(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_ANTSWSTART, self).__init__(rmio, label, 0xa8014000, 0x25C, 'ANTSWSTART', 'MODEM.ANTSWSTART', 'read-write', u"", 0x00000000, 0x0003FFFF) self.ANTSWSTARTTIM = RM_Field_MODEM_ANTSWSTART_ANTSWSTARTTIM(self) self.zz_fdict['ANTSWSTARTTIM'] = self.ANTSWSTARTTIM self.__dict__['zz_frozen'] = True class RM_Register_MODEM_ANTSWEND(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_ANTSWEND, self).__init__(rmio, label, 0xa8014000, 0x260, 'ANTSWEND', 'MODEM.ANTSWEND', 'read-write', u"", 0x00000000, 0x0003FFFF) self.ANTSWENDTIM = RM_Field_MODEM_ANTSWEND_ANTSWENDTIM(self) self.zz_fdict['ANTSWENDTIM'] = self.ANTSWENDTIM self.__dict__['zz_frozen'] = True class RM_Register_MODEM_TRECPMPATT(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_TRECPMPATT, self).__init__(rmio, label, 0xa8014000, 0x264, 'TRECPMPATT', 'MODEM.TRECPMPATT', 'read-write', u"", 0x55555555, 0xFFFFFFFF) self.PMEXPECTPATT = RM_Field_MODEM_TRECPMPATT_PMEXPECTPATT(self) self.zz_fdict['PMEXPECTPATT'] = self.PMEXPECTPATT self.__dict__['zz_frozen'] = True class RM_Register_MODEM_TRECPMDET(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_TRECPMDET, self).__init__(rmio, label, 0xa8014000, 0x268, 'TRECPMDET', 'MODEM.TRECPMDET', 'read-write', u"", 0x00000017, 0xBFFFC3FF) self.PMACQUINGWIN = RM_Field_MODEM_TRECPMDET_PMACQUINGWIN(self) self.zz_fdict['PMACQUINGWIN'] = self.PMACQUINGWIN self.PMCOSTVALTHD = RM_Field_MODEM_TRECPMDET_PMCOSTVALTHD(self) self.zz_fdict['PMCOSTVALTHD'] = self.PMCOSTVALTHD self.PMTIMEOUTSEL = RM_Field_MODEM_TRECPMDET_PMTIMEOUTSEL(self) self.zz_fdict['PMTIMEOUTSEL'] = self.PMTIMEOUTSEL self.PHSCALE = RM_Field_MODEM_TRECPMDET_PHSCALE(self) self.zz_fdict['PHSCALE'] = self.PHSCALE self.PMMINCOSTTHD = RM_Field_MODEM_TRECPMDET_PMMINCOSTTHD(self) self.zz_fdict['PMMINCOSTTHD'] = self.PMMINCOSTTHD self.VTPMDETSEL = RM_Field_MODEM_TRECPMDET_VTPMDETSEL(self) self.zz_fdict['VTPMDETSEL'] = self.VTPMDETSEL self.COSTHYST = RM_Field_MODEM_TRECPMDET_COSTHYST(self) self.zz_fdict['COSTHYST'] = self.COSTHYST self.PREAMSCH = RM_Field_MODEM_TRECPMDET_PREAMSCH(self) self.zz_fdict['PREAMSCH'] = self.PREAMSCH self.__dict__['zz_frozen'] = True class RM_Register_MODEM_CFGANTPATT(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_CFGANTPATT, self).__init__(rmio, label, 0xa8014000, 0x26C, 'CFGANTPATT', 'MODEM.CFGANTPATT', 'read-write', u"", 0x00000000, 0x3FFFFFFF) self.CFGANTPATTVAL = RM_Field_MODEM_CFGANTPATT_CFGANTPATTVAL(self) self.zz_fdict['CFGANTPATTVAL'] = self.CFGANTPATTVAL self.__dict__['zz_frozen'] = True class RM_Register_MODEM_ETSTIM(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_ETSTIM, self).__init__(rmio, label, 0xa8014000, 0x270, 'ETSTIM', 'MODEM.ETSTIM', 'read-write', u"", 0x00000000, 0x0003FFFF) self.ETSTIMVAL = RM_Field_MODEM_ETSTIM_ETSTIMVAL(self) self.zz_fdict['ETSTIMVAL'] = self.ETSTIMVAL self.ETSCOUNTEREN = RM_Field_MODEM_ETSTIM_ETSCOUNTEREN(self) self.zz_fdict['ETSCOUNTEREN'] = self.ETSCOUNTEREN self.__dict__['zz_frozen'] = True class RM_Register_MODEM_ANTSWCTRL1(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_ANTSWCTRL1, self).__init__(rmio, label, 0xa8014000, 0x274, 'ANTSWCTRL1', 'MODEM.ANTSWCTRL1', 'read-write', u"", 0x0006AAAA, 0x00FFFFFF) self.TIMEPERIOD = RM_Field_MODEM_ANTSWCTRL1_TIMEPERIOD(self) self.zz_fdict['TIMEPERIOD'] = self.TIMEPERIOD self.__dict__['zz_frozen'] = True class RM_Register_MODEM_COCURRMODE(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_COCURRMODE, self).__init__(rmio, label, 0xa8014000, 0x278, 'COCURRMODE', 'MODEM.COCURRMODE', 'read-write', u"", 0x00000000, 0x80000000) self.CONCURRENT = RM_Field_MODEM_COCURRMODE_CONCURRENT(self) self.zz_fdict['CONCURRENT'] = self.CONCURRENT self.__dict__['zz_frozen'] = True class RM_Register_MODEM_ANTDIVCTRL(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_ANTDIVCTRL, self).__init__(rmio, label, 0xa8014000, 0x27C, 'ANTDIVCTRL', 'MODEM.ANTDIVCTRL', 'read-write', u"", 0x00000000, 0x000001FF) self.ADPRETHRESH = RM_Field_MODEM_ANTDIVCTRL_ADPRETHRESH(self) self.zz_fdict['ADPRETHRESH'] = self.ADPRETHRESH self.ENADPRETHRESH = RM_Field_MODEM_ANTDIVCTRL_ENADPRETHRESH(self) self.zz_fdict['ENADPRETHRESH'] = self.ENADPRETHRESH self.__dict__['zz_frozen'] = True class RM_Register_MODEM_BLEIQDSAEXT2(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_BLEIQDSAEXT2, self).__init__(rmio, label, 0xa8014000, 0x280, 'BLEIQDSAEXT2', 'MODEM.BLEIQDSAEXT2', 'read-write', u"", 0x00000000, 0x000007FF) self.DISMAXPEAKTRACKMODE = RM_Field_MODEM_BLEIQDSAEXT2_DISMAXPEAKTRACKMODE(self) self.zz_fdict['DISMAXPEAKTRACKMODE'] = self.DISMAXPEAKTRACKMODE self.BBSSDEBOUNCETIM = RM_Field_MODEM_BLEIQDSAEXT2_BBSSDEBOUNCETIM(self) self.zz_fdict['BBSSDEBOUNCETIM'] = self.BBSSDEBOUNCETIM self.BBSSDIFFCHVAL = RM_Field_MODEM_BLEIQDSAEXT2_BBSSDIFFCHVAL(self) self.zz_fdict['BBSSDIFFCHVAL'] = self.BBSSDIFFCHVAL self.__dict__['zz_frozen'] = True class RM_Register_MODEM_SPARE(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_SPARE, self).__init__(rmio, label, 0xa8014000, 0x284, 'SPARE', 'MODEM.SPARE', 'read-write', u"", 0x00000000, 0x000000FF) self.SPARE = RM_Field_MODEM_SPARE_SPARE(self) self.zz_fdict['SPARE'] = self.SPARE self.__dict__['zz_frozen'] = True class RM_Register_MODEM_IRCALCOEFWR0(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_IRCALCOEFWR0, self).__init__(rmio, label, 0xa8014000, 0x288, 'IRCALCOEFWR0', 'MODEM.IRCALCOEFWR0', 'read-write', u"", 0x00000000, 0xFFFFFFFF) self.CRVWD = RM_Field_MODEM_IRCALCOEFWR0_CRVWD(self) self.zz_fdict['CRVWD'] = self.CRVWD self.CRVWEN = RM_Field_MODEM_IRCALCOEFWR0_CRVWEN(self) self.zz_fdict['CRVWEN'] = self.CRVWEN self.CIVWD = RM_Field_MODEM_IRCALCOEFWR0_CIVWD(self) self.zz_fdict['CIVWD'] = self.CIVWD self.CIVWEN = RM_Field_MODEM_IRCALCOEFWR0_CIVWEN(self) self.zz_fdict['CIVWEN'] = self.CIVWEN self.__dict__['zz_frozen'] = True class RM_Register_MODEM_IRCALCOEFWR1(Base_RM_Register): def __init__(self, rmio, label): self.__dict__['zz_frozen'] = False super(RM_Register_MODEM_IRCALCOEFWR1, self).__init__(rmio, label, 0xa8014000, 0x28C, 'IRCALCOEFWR1', 'MODEM.IRCALCOEFWR1', 'read-write', u"", 0x00000000, 0xFFFFFFFF) self.CRVWD = RM_Field_MODEM_IRCALCOEFWR1_CRVWD(self) self.zz_fdict['CRVWD'] = self.CRVWD self.CRVWEN = RM_Field_MODEM_IRCALCOEFWR1_CRVWEN(self) self.zz_fdict['CRVWEN'] = self.CRVWEN self.CIVWD = RM_Field_MODEM_IRCALCOEFWR1_CIVWD(self) self.zz_fdict['CIVWD'] = self.CIVWD self.CIVWEN = RM_Field_MODEM_IRCALCOEFWR1_CIVWEN(self) self.zz_fdict['CIVWEN'] = self.CIVWEN self.__dict__['zz_frozen'] = True
[ "31710001+lenloe1@users.noreply.github.com" ]
31710001+lenloe1@users.noreply.github.com
1a3f22259ba23bd2b200afd33cef1fe3ec4a8fbe
45467e07e77131f631d0865046dcc4d18f483601
/src/Hackerearth/codearena/adam.py
104e61f60ac19049ac1addef4cd3944a4194b77b
[]
no_license
bvsbrk/Algos
98374e094bd3811579276d25a82bbf2c0f046d96
cbb18bce92054d57c0e825069ef7f2120a9cc622
refs/heads/master
2021-09-25T10:01:59.323857
2018-10-20T16:07:07
2018-10-20T16:07:07
98,708,839
0
0
null
null
null
null
UTF-8
Python
false
false
970
py
from math import ceil as c if __name__ == '__main__': tc = int(input().strip()) for _ in range(tc): n = int(input().strip()) arr = [int(i) for i in input().strip().split(" ")] while True: sm = min(arr) d = arr.index(sm) + 1 de = [] if sm == 0: for i in range(len(arr)): arr[i] -= 1 if arr[i] < 0: de.append(i) else: n = c((sm + d) / sm) r = -n * d for i in range(len(arr)): arr[i] += r if arr[i] < 0: de.append(i) co = 0 for i in de: del arr[i - co] co += 1 if len(arr) == 1: print("Ladia") break elif len(arr) == 0: print("Kushagra") break
[ "v.ramakoteswararao2015@vit.ac.in" ]
v.ramakoteswararao2015@vit.ac.in
0c1e33f9aacaa50af3117320d47326b1f04c0b7f
6206732b002f820d3664f8e3e689ed48a18ccc44
/ex16/ex16_2.py
f249735f091e4a7c98328fc83ed1fc4d0ce00bea
[]
no_license
jamtot/LearnPythonTheHardWay
4c0992f0bf7e6f9d130fe595c32483eec3a6e578
b08409f4f501af91130a99fae7eacd6847d5691f
refs/heads/master
2021-01-10T08:53:53.570473
2016-03-03T00:11:48
2016-03-03T00:11:48
51,035,514
0
0
null
null
null
null
UTF-8
Python
false
false
1,950
py
#asks user for input as to whether they want to read or write a file print "Would you like to read or write a file? Insert r or w" readOrWrite = raw_input(" >") #if the user types a word beginning with r or R do this if readOrWrite[0] == 'r' or readOrWrite[0] == 'R': print "Enter the name of the file you would like to read:" filename = raw_input(' >') #get the files name from input, and open the file into a var txt = open(filename) print "Here's your file %r:" % filename #read the file print txt.read() #close the file txt.close() #if the user types a word beginning with w or W elif readOrWrite[0] == 'w' or readOrWrite[0] == 'W': print "Enter the name of the file you would like to create/edit:" #get the files name from output filename = raw_input(' >') print "We're going to erase %r." % filename print "If you don't want that, hit CTRL-C (^C)." print "If you do want that, hit RETURN." raw_input("?") print "Opening the file..." #open the file to be written target = open(filename, 'w') #remove everything from the file print "Truncating the file. Goodbye!" target.truncate() print "Now I'm going to ask you for three lines." #take in 3 lines to write to the file line1 = raw_input("line 1: ") line2 = raw_input("line 2: ") line3 = raw_input("line 3: ") print "I'm going to write these to the file." #write each line to the file target.write(line1) target.write("\n") target.write(line2) target.write("\n") target.write(line3) target.write("\n") print "And finally, we close it." #close the file target.close() else: #a catch for if the user types something #other than a letter or word beginning with r or w print "Yeah... that's not an 'r' or a 'w', buddy.", print "You can even type in the whole word, because I only check the first letter!"
[ "jongrammor@gmail.com" ]
jongrammor@gmail.com
15dd4a1f748631efab3f33142b10c78e6df7b814
871f1ef6b9a476051b883ab551b44c7581284cdc
/tests/test_bert.py
742b13fac25dd5614a2c91cc8207eb09f5fba37c
[ "MIT" ]
permissive
bradfox2/keras-bert
6979a9fa69cba215930a2172de642bbc72a540e0
1ffd3f6beb1ffac08a4ee235b71e3bb2eed36923
refs/heads/master
2020-04-14T22:23:28.315133
2019-01-18T22:08:00
2019-01-18T22:08:00
164,160,370
0
1
MIT
2019-01-04T22:20:45
2019-01-04T22:20:44
null
UTF-8
Python
false
false
3,975
py
import unittest import os import tempfile import random import keras import numpy as np from keras_bert import gelu, get_model, get_custom_objects, get_base_dict, gen_batch_inputs class TestBERT(unittest.TestCase): def test_sample(self): model = get_model( token_num=200, head_num=3, transformer_num=2, ) model_path = os.path.join(tempfile.gettempdir(), 'keras_bert_%f.h5' % random.random()) model.save(model_path) model = keras.models.load_model( model_path, custom_objects=get_custom_objects(), ) model.summary(line_length=200) def test_fit(self): current_path = os.path.dirname(os.path.abspath(__file__)) model_path = os.path.join(current_path, 'test_bert_fit.h5') sentence_pairs = [ [['all', 'work', 'and', 'no', 'play'], ['makes', 'jack', 'a', 'dull', 'boy']], [['from', 'the', 'day', 'forth'], ['my', 'arm', 'changed']], [['and', 'a', 'voice', 'echoed'], ['power', 'give', 'me', 'more', 'power']], ] token_dict = get_base_dict() for pairs in sentence_pairs: for token in pairs[0] + pairs[1]: if token not in token_dict: token_dict[token] = len(token_dict) token_list = list(token_dict.keys()) if os.path.exists(model_path): model = keras.models.load_model( model_path, custom_objects=get_custom_objects(), ) else: model = get_model( token_num=len(token_dict), head_num=5, transformer_num=12, embed_dim=25, feed_forward_dim=100, seq_len=20, pos_num=20, dropout_rate=0.05, attention_activation=gelu, lr=1e-3, ) model.summary() def _generator(): while True: yield gen_batch_inputs( sentence_pairs, token_dict, token_list, seq_len=20, mask_rate=0.3, swap_sentence_rate=1.0, ) model.fit_generator( generator=_generator(), steps_per_epoch=1000, epochs=1, validation_data=_generator(), validation_steps=100, callbacks=[ keras.callbacks.ReduceLROnPlateau(monitor='val_MLM_loss', factor=0.5, patience=3), keras.callbacks.EarlyStopping(monitor='val_MLM_loss', patience=5) ], ) # model.save(model_path) for inputs, outputs in _generator(): predicts = model.predict(inputs) outputs = list(map(lambda x: np.squeeze(x, axis=-1), outputs)) predicts = list(map(lambda x: np.argmax(x, axis=-1), predicts)) batch_size, seq_len = inputs[-1].shape for i in range(batch_size): for j in range(seq_len): if inputs[-1][i][j]: self.assertEqual(outputs[0][i][j], predicts[0][i][j]) self.assertTrue(np.allclose(outputs[1], predicts[1])) break def test_get_layers(self): def _custom_layers(x, trainable=True): return keras.layers.LSTM( units=768, trainable=trainable, name='LSTM', )(x) inputs, output_layer = get_model( token_num=200, embed_dim=768, custom_layers=_custom_layers, training=False, ) model = keras.models.Model(inputs=inputs, outputs=output_layer) model.compile( optimizer='adam', loss='mse', metrics={}, ) model.summary() self.assertTrue(model is not None)
[ "CyberZHG@gmail.com" ]
CyberZHG@gmail.com
37ba444385cca6891b01ebd2c1328aac4771e1dd
7f29e2c30e047ec59fb104d4f0953a8a8bbead51
/rb/docs_processing/graph.py
282e1475c3c59251fc6f3eceab9d19526601ed12
[ "Apache-2.0" ]
permissive
rwth-acis/readerbenchpy
69597dc1f2d500aea2be49981799aa20a0e6ea68
1a070ae678f58ccd6f358c0802bdf0b3b3dde9d3
refs/heads/main
2023-07-17T11:57:25.507494
2021-09-03T12:49:10
2021-09-03T12:49:10
348,343,445
1
0
null
null
null
null
UTF-8
Python
false
false
13,991
py
from typing import Dict, List from munkres import Munkres, DISALLOWED from rb.docs_processing.author import Author from rb.docs_processing.article import Article from rb.similarity.vector_model import VectorModel import matplotlib.pyplot as plt import networkx as nx import numpy as np class Graph: EDGE_THRESHOLD = 0.07765611 BIG_VALUE = 10000 NO_EDGE_PENALTY = 100 # EDGE_THRESHOLD = 1.01 def __init__(self, semantic_models: List[VectorModel]): self.authors_dict: Dict[str, Author] = {} self.articles_set = set() self.authors_set = set() self.adjacent_list = {} self.authors_ranking_graph = {} self.articles_distances_dict = {} self.semantic_models = semantic_models self.articles_mean = 0.0 self.articles_std = 0.0 self.authors_mean = 0.0 self.authors_std = 0.0 def extract_authors_dict(self) -> None: self.authors_set = set([x for _, x in self.authors_dict.items()]) def add_to_adjacent_list(self, entity1, entity2, dist: float, link_type: str) -> None: if entity1 in self.adjacent_list: self.adjacent_list[entity1].append((entity2, dist, link_type)) else: self.adjacent_list[entity1] = [(entity2, dist, link_type)] if entity2 in self.adjacent_list: self.adjacent_list[entity2].append((entity1, dist, link_type)) else: self.adjacent_list[entity2] = [(entity1, dist, link_type)] def build_edges_and_construct_author_rankings_graph(self, include_authors=True) -> None: articles_list = list(self.articles_set) authors_list = list(self.authors_set) self.build_edges_between_articles_and_save_the_distances(articles_list) if include_authors: self.build_edges_between_articles_and_authors(articles_list, authors_list) authors_semantic_similarities_dictionary = self.compute_semantic_similarities_between_authors(authors_list) self.build_authors_ranking_graph(authors_semantic_similarities_dictionary) self.build_edges_between_authors(authors_semantic_similarities_dictionary) def build_edges_between_articles_and_authors(self, articles_list, authors_list): for i in range(len(articles_list)): for j in range(len(authors_list)): dist = compute_semantic_distance_between_author_and_article(authors_list[j], articles_list[i], self.semantic_models) if dist < Graph.EDGE_THRESHOLD: self.add_to_adjacent_list(authors_list[j], articles_list[i], dist, 'aut-art') def build_edges_between_articles_and_save_the_distances(self, articles_list): counter = 0 articles_to_distances_dict = self.build_article_pairs_to_distance_dict(articles_list) threshold, self.articles_mean, self.articles_std = \ compute_edge_threshold_mean_and_std(articles_to_distances_dict) for articles_pair, distance in articles_to_distances_dict.items(): article1 = articles_pair[0] article2 = articles_pair[1] if distance < threshold: counter += 1 # print(counter) self.add_to_adjacent_list(article1, article2, distance, 'art-art') self.articles_distances_dict[(article1, article2)] = distance else: self.articles_distances_dict[(article1, article2)] = 1.0 def build_article_pairs_to_distance_dict(self, articles_list): articles_to_distances_dict = {} for i in range(len(articles_list) - 1): for j in range(i + 1, len(articles_list)): article1 = articles_list[i] article2 = articles_list[j] distance = compute_distance_between_articles(article1, article2, self.semantic_models) articles_to_distances_dict[(article1, article2)] = distance return articles_to_distances_dict def build_edges_between_authors(self, authors_semantic_similarities_dictionary): similarities = authors_semantic_similarities_dictionary.values() maximum_value, minimal_value, self.authors_mean, self.authors_std = extract_min_max_mean_std(similarities) threshold = self.authors_mean - self.authors_std for authors_pair, similarity in authors_semantic_similarities_dictionary.items(): scaled_distance = 1 - (similarity - minimal_value) / (maximum_value - minimal_value) if scaled_distance < threshold: self.add_to_adjacent_list(authors_pair[0], authors_pair[1], scaled_distance, 'aut-aut') def build_authors_ranking_graph(self, authors_semantic_similarities_dictionary): for authors_pair, similarity in authors_semantic_similarities_dictionary.items(): author1 = authors_pair[0] author2 = authors_pair[1] self.authors_ranking_graph[author1] = self.authors_ranking_graph.get(author1, []) self.authors_ranking_graph[author1].append((author2, similarity)) self.authors_ranking_graph[author2] = self.authors_ranking_graph.get(author2, []) self.authors_ranking_graph[author2].append((author1, similarity)) def compute_semantic_similarities_between_authors(self, authors_list): authors_semantic_similarities_dictionary = {} for i in range(len(authors_list) - 1): # print(i) # print(authors_list[i].name, len(authors_list[i].articles)) for j in range(i + 1, len(authors_list)): # print(j) # print(authors_list[j].name, len(authors_list[j].articles)) author1 = authors_list[i] author2 = authors_list[j] similarity = self.compute_semantic_similarity_between_authors(author1, author2) authors_semantic_similarities_dictionary[(author1, author2)] = similarity # if dist < max_distance: # self.add_to_adjacent_list(authors_list[i], authors_list[j], dist, 'aut-aut') return authors_semantic_similarities_dictionary def get_authors_by_type_degree(self, max_=None): authors = [(author, sum(n for _, n in self.authors_ranking_graph[author])) for author in self.authors_set] if max_: return sorted(authors, key=lambda x: x[1], reverse=True)[:max_] return sorted(authors, key=lambda x: x[1], reverse=True) def get_articles_by_type_degree(self, max_=None): articles = [(article, sum(1 - n for _, n, t in self.adjacent_list[article] if t == 'art-art'), len([t for _, _, t in self.adjacent_list[article] if t == 'art-art'])) for article in self.articles_set if article in self.adjacent_list] if max_: return sorted(articles, key=lambda x: x[1], reverse=True)[:max_] return sorted(articles, key=lambda x: x[1], reverse=True) def get_similarities_between_articles(self): similarities_dictionary = {} for pair in self.get_distances_between_articles(): similarities_dictionary[(pair[0], pair[1])] = 1 - pair[2] return similarities_dictionary def get_similarities_between_authors(self): similarities_dictionary = {} for author, neighbours in self.authors_ranking_graph.items(): for neighbour in neighbours: if (neighbour[0], author) not in similarities_dictionary: similarities_dictionary[(author, neighbour[0])] = neighbour[1] return similarities_dictionary def get_distances_between_articles(self): return self.get_distances_between_nodes_of_same_type("art-art", self.articles_set) def get_distances_between_authors(self): return self.get_distances_between_nodes_of_same_type("aut-aut", self.authors_set) def get_distances_between_nodes_of_same_type(self, node_type, node_set): pairs = [] used_nodes = set() for node in node_set: if node in self.adjacent_list: for neigh, score, edge_type in self.adjacent_list[node]: if edge_type == node_type and neigh not in used_nodes: pairs.append((node, neigh, score)) used_nodes.add(node) return pairs def plot_histogram_of_articles_distance(self): distances = [pair[2] for pair in self.get_distances_between_articles()] print(np.mean(distances)) print(np.std(distances)) plt.hist(distances, color="blue", edgecolor="black") plt.show() def compute_semantic_similarity_between_authors(self, author1, author2): if author1 == author2: return len(author1.articles) distance_dict = self.build_articles_distance_dictionary(author1, author2) # (distance_dict) if len(distance_dict) == 1: return 1 - next(iter(distance_dict.values())) if distance_dict: a1 = (author1.name, list(set([x[0] for x in distance_dict.keys()]))) a2 = (author2.name, list(set([x[1] for x in distance_dict.keys()]))) return compute_maximum_coupling_of_maximum_similarity(a1, a2, distance_dict) return 0.0 def build_articles_distance_dictionary(self, author1, author2): distance_dict = {} for article1 in author1.articles: for article2 in author2.articles: distance_dict[(article1.title, article2.title)] = \ self.articles_distances_dict.get((article1, article2), 0) + \ self.articles_distances_dict.get((article2, article1), 0) return distance_dict def compute_maximum_coupling_of_maximum_similarity(author1_name_articles_tuple, author2_name_articles_tuple, distance_dictionary): articles_distances_matrix = build_distances_between_articles_matrix( author1_name_articles_tuple[1], author2_name_articles_tuple[1], distance_dictionary) # print(articles_distances_matrix) munkres_client = Munkres() try: indexes = munkres_client.compute(articles_distances_matrix) except: return 0.0 # minimum similarity possible return compute_semantic_similarity_coupling_value(articles_distances_matrix, indexes) def compute_semantic_similarity_coupling_value(articles_distances_matrix, indexes): total = 0 for row, column in indexes: if articles_distances_matrix[row][column] == Graph.BIG_VALUE: continue value = 1 - articles_distances_matrix[row][column] / 100 total += value return total def clear_matrix_of_only_disallowed(distances_matrix, only_disallowed_lines_index): only_disallowed_lines_index.reverse() for index in only_disallowed_lines_index: del distances_matrix[index] if not distances_matrix: return only_disallowed_columns_index = [] for j in range(len(distances_matrix[0])): was_only_disallowed = True for i in range(len(distances_matrix)): if distances_matrix[i][j] != DISALLOWED: was_only_disallowed = False break if was_only_disallowed: only_disallowed_columns_index.append(j) only_disallowed_columns_index.reverse() for line in distances_matrix: for index in only_disallowed_columns_index: del line[index] def build_distances_between_articles_matrix(author1_articles, author2_articles, distance_dictionary): distances_matrix = [[Graph.BIG_VALUE for x in range(len(author2_articles))] for y in range(len(author1_articles))] for i1, art1 in enumerate(author1_articles): for i2, art2 in enumerate(author2_articles): if (art1, art2) in distance_dictionary and distance_dictionary[(art1, art2)] < Graph.EDGE_THRESHOLD: distances_matrix[i1][i2] = distance_dictionary[(art1, art2)] * 100 elif (art2, art1) in distance_dictionary and distance_dictionary[(art2, art1)] < Graph.EDGE_THRESHOLD: distances_matrix[i1][i2] = distance_dictionary[(art2, art1)] * 100 return distances_matrix def compute_distance_between_articles(article1: Article, article2: Article, semantic_models: List[VectorModel]) -> float: if article1 == article2: return 0.0 similarity = 0.0 for model in semantic_models: similarity += model.similarity(article1.document, article2.document) if similarity != 0: distance = 1 - similarity / len(semantic_models) return distance if distance >= 0 else 0 return 1.0 def compute_semantic_distance_between_author_and_article(author: Author, article: Article, semantic_models: List[VectorModel]) -> float: if article in author.articles: return 0.0 distance = 0.0 for aa in author.articles: distance += compute_distance_between_articles(aa, article, semantic_models) if distance > 0: return distance / len(author.articles) return 1.0 def extract_min_max_mean_std(similarities): minimal_value = min(similarities) maximum_value = max(similarities) scaled_distances = [1 - (similarity - minimal_value) / (maximum_value - minimal_value) for similarity in similarities] mean = np.mean(scaled_distances) std = np.std(scaled_distances) return maximum_value, minimal_value, mean, std def compute_edge_threshold_mean_and_std(articles_to_distances_dict): values = articles_to_distances_dict.values() mean = np.mean(list(values)) std = np.std(list(values)) threshold = mean - std return threshold, mean, std
[ "karlydiamond214@gmail.com" ]
karlydiamond214@gmail.com
2065478dacf11a2c9e50fda8a21efd7a7b02a512
0abbb442df5cab82aa02e91839f090e325626818
/ppy_terminal/imports/setup_logging.py
014843f03653447465ce647d7f1d0a603ec2cef5
[ "MIT" ]
permissive
jimmyauyeung/generative_art
6f5571d8f60e2aeb1ab64237d9a82d3e6c3baf6a
eb1730d90e438327edaa53375765a9690b968d2b
refs/heads/master
2023-08-04T14:02:36.050556
2021-09-21T02:36:58
2021-09-21T02:36:58
null
0
0
null
null
null
null
UTF-8
Python
false
false
261
py
import sys import logging logging.basicConfig(level=logging.INFO, stream=sys.stdout, format='%(asctime)s - %(levelname)s - %(message)s', datefmt='%Y-%m-%d %H:%M:%S') log = logging.getLogger(__name__)
[ "aaronpenne@users.noreply.github.com" ]
aaronpenne@users.noreply.github.com
33910603346c2b37ce56acec1522d2892040487f
900c59d777ee74f52a34927b8e581a40dd50394b
/tests/test_20_rp_handler_oidc.py
b74b588b34adc94927ae70f61748fdfa3f38bb6c
[ "Apache-2.0" ]
permissive
AntonLazovsky/JWTConnect-Python-OidcRP
cb243147147ab2b5993e360aceed98b24d7cb408
ad6eb836796595b628cd2416f022a35258aebab6
refs/heads/master
2023-05-15T00:11:30.965303
2021-06-09T22:11:13
2021-06-09T22:11:13
375,501,128
0
0
Apache-2.0
2021-06-09T22:08:34
2021-06-09T22:08:34
null
UTF-8
Python
false
false
36,206
py
import json import os from urllib.parse import parse_qs from urllib.parse import urlparse from urllib.parse import urlsplit from cryptojwt.key_jar import KeyJar from cryptojwt.key_jar import init_key_jar from oidcmsg.oidc import AccessTokenResponse from oidcmsg.oidc import AuthorizationResponse from oidcmsg.oidc import IdToken from oidcmsg.oidc import JRD from oidcmsg.oidc import Link from oidcmsg.oidc import OpenIDSchema from oidcmsg.oidc import ProviderConfigurationResponse import pytest import responses from oidcrp.entity import Entity from oidcrp.rp_handler import RPHandler BASE_URL = 'https://example.com/rp' CLIENT_PREFS = { "application_type": "web", "application_name": "rphandler", "contacts": ["ops@example.com"], "response_types": ["code", "id_token", "id_token token", "code id_token", "code id_token token", "code token"], "scope": ["openid", "profile", "email", "address", "phone"], "token_endpoint_auth_method": "client_secret_basic", "verify_args": {"allow_sign_alg_none": True} } CLIENT_CONFIG = { "": { "client_preferences": CLIENT_PREFS, "redirect_uris": None, "services": { 'web_finger': { 'class': 'oidcrp.oidc.webfinger.WebFinger' }, "discovery": { 'class': 'oidcrp.oidc.provider_info_discovery' '.ProviderInfoDiscovery' }, 'registration': { 'class': 'oidcrp.oidc.registration.Registration' }, 'authorization': { 'class': 'oidcrp.oidc.authorization.Authorization' }, 'access_token': { 'class': 'oidcrp.oidc.access_token.AccessToken' }, 'refresh_access_token': { 'class': 'oidcrp.oidc.refresh_access_token' '.RefreshAccessToken' }, 'userinfo': { 'class': 'oidcrp.oidc.userinfo.UserInfo' } } }, "linkedin": { "issuer": "https://www.linkedin.com/oauth/v2/", "client_id": "xxxxxxx", "client_secret": "yyyyyyyyyyyyyyyyyyyy", "redirect_uris": ["{}/authz_cb/linkedin".format(BASE_URL)], "behaviour": { "response_types": ["code"], "scope": ["r_basicprofile", "r_emailaddress"], "token_endpoint_auth_method": 'client_secret_post' }, "provider_info": { "authorization_endpoint": "https://www.linkedin.com/oauth/v2/authorization", "token_endpoint": "https://www.linkedin.com/oauth/v2/accessToken", "userinfo_endpoint": "https://api.linkedin.com/v1/people/~?format=json" }, "userinfo_request_method": "GET", 'services': { 'authorization': { 'class': 'oidcrp.oidc.authorization.Authorization' }, 'access_token': { 'class': 'oidcrp.provider.linkedin.AccessToken' }, 'userinfo': { 'class': 'oidcrp.provider.linkedin.UserInfo' } } }, "facebook": { "issuer": "https://www.facebook.com/v2.11/dialog/oauth", "client_id": "ccccccccc", "client_secret": "dddddddddddddd", "behaviour": { "response_types": ["code"], "scope": ["email", "public_profile"], "token_endpoint_auth_method": '' }, "redirect_uris": ["{}/authz_cb/facebook".format(BASE_URL)], "provider_info": { "authorization_endpoint": "https://www.facebook.com/v2.11/dialog/oauth", "token_endpoint": "https://graph.facebook.com/v2.11/oauth/access_token", "userinfo_endpoint": "https://graph.facebook.com/me" }, 'services': { 'authorization': { 'class': 'oidcrp.oidc.authorization.Authorization' }, 'access_token': { 'class': 'oidcrp.oidc.access_token.AccessToken', 'kwargs': {'conf': {'default_authn_method': ''}} }, 'userinfo': { 'class': 'oidcrp.oidc.userinfo.UserInfo', 'kwargs': {'conf': {'default_authn_method': ''}} } } }, 'github': { "issuer": "https://github.com/login/oauth/authorize", 'client_id': 'eeeeeeeee', 'client_secret': 'aaaaaaaaaaaaaaaaaaaa', "redirect_uris": ["{}/authz_cb/github".format(BASE_URL)], "behaviour": { "response_types": ["code"], "scope": ["user", "public_repo"], "token_endpoint_auth_method": '', "verify_args": {"allow_sign_alg_none": True} }, "provider_info": { "authorization_endpoint": "https://github.com/login/oauth/authorize", "token_endpoint": "https://github.com/login/oauth/access_token", "userinfo_endpoint": "https://api.github.com/user" }, 'services': { 'authorization': { 'class': 'oidcrp.oidc.authorization.Authorization' }, 'access_token': { 'class': 'oidcrp.oidc.access_token.AccessToken' }, 'userinfo': { 'class': 'oidcrp.oidc.userinfo.UserInfo', 'kwargs': {'conf': {'default_authn_method': ''}} }, 'refresh_access_token': { 'class': 'oidcrp.oidc.refresh_access_token' '.RefreshAccessToken' } } } } KEYDEFS = [ {"type": "RSA", "use": ["sig"]}, {"type": "EC", "crv": "P-256", "use": ["sig"]}, ] _dirname = os.path.dirname(os.path.abspath(__file__)) ISS = 'https://example.com' CLI_KEY = init_key_jar(public_path='{}/pub_client.jwks'.format(_dirname), private_path='{}/priv_client.jwks'.format(_dirname), key_defs=KEYDEFS, issuer_id='') LINKEDIN_KEY = init_key_jar( public_path='{}/pub_linkedin.jwks'.format(_dirname), private_path='{}/priv_linkedin.jwks'.format(_dirname), key_defs=KEYDEFS, issuer_id=CLIENT_CONFIG['linkedin']['issuer'] ) FACEBOOK_KEY = init_key_jar( public_path='{}/pub_facebook.jwks'.format(_dirname), private_path='{}/priv_facebook.jwks'.format(_dirname), key_defs=KEYDEFS, issuer_id=CLIENT_CONFIG['facebook']['issuer'] ) GITHUB_KEY = init_key_jar( public_path='{}/pub_github.jwks'.format(_dirname), private_path='{}/priv_github.jwks'.format(_dirname), key_defs=KEYDEFS, issuer_id=CLIENT_CONFIG['github']['issuer'] ) def iss_id(iss): return CLIENT_CONFIG[iss]['issuer'] class TestRPHandler(object): @pytest.fixture(autouse=True) def rphandler_setup(self): self.rph = RPHandler(BASE_URL, client_configs=CLIENT_CONFIG, keyjar=CLI_KEY, module_dirs=['oidc']) def test_pick_config(self): cnf = self.rph.pick_config('facebook') assert cnf['issuer'] == "https://www.facebook.com/v2.11/dialog/oauth" cnf = self.rph.pick_config('linkedin') assert cnf['issuer'] == "https://www.linkedin.com/oauth/v2/" cnf = self.rph.pick_config('github') assert cnf['issuer'] == "https://github.com/login/oauth/authorize" cnf = self.rph.pick_config('') assert 'issuer' not in cnf def test_init_client(self): client = self.rph.init_client('github') assert set(client.client_get("services").keys()) == {'authorization', 'accesstoken', 'userinfo', 'refresh_token'} _context = client.client_get("service_context") assert _context.get('client_id') == 'eeeeeeeee' assert _context.get('client_secret') == 'aaaaaaaaaaaaaaaaaaaa' assert _context.get('issuer') == "https://github.com/login/oauth/authorize" assert _context.get('provider_info') is not None assert set(_context.get('provider_info').keys()) == { 'authorization_endpoint', 'token_endpoint', 'userinfo_endpoint' } assert _context.get('behaviour') == { "response_types": ["code"], "scope": ["user", "public_repo"], "token_endpoint_auth_method": '', 'verify_args': {'allow_sign_alg_none': True} } _github_id = iss_id('github') _context.keyjar.import_jwks(GITHUB_KEY.export_jwks(issuer_id=_github_id), _github_id) # The key jar should only contain a symmetric key that is the clients # secret. 2 because one is marked for encryption and the other signing # usage. assert list(_context.keyjar.owners()) == ['', _github_id] keys = _context.keyjar.get_issuer_keys('') assert len(keys) == 2 assert _context.base_url == BASE_URL def test_do_provider_info(self): client = self.rph.init_client('github') issuer = self.rph.do_provider_info(client) assert issuer == iss_id('github') # Make sure the service endpoints are set for service_type in ['authorization', 'accesstoken', 'userinfo']: _srv = client.client_get("service",service_type) _endp = client.client_get("service_context").get('provider_info')[_srv.endpoint_name] assert _srv.endpoint == _endp def test_do_client_registration(self): client = self.rph.init_client('github') issuer = self.rph.do_provider_info(client) self.rph.do_client_registration(client, 'github') # only 2 things should have happened assert self.rph.hash2issuer['github'] == issuer assert client.client_get("service_context").post_logout_redirect_uris == [] def test_do_client_setup(self): client = self.rph.client_setup('github') _github_id = iss_id('github') _context = client.client_get("service_context") assert _context.get('client_id') == 'eeeeeeeee' assert _context.get('client_secret') == 'aaaaaaaaaaaaaaaaaaaa' assert _context.get('issuer') == _github_id _context.keyjar.import_jwks(GITHUB_KEY.export_jwks(issuer_id=_github_id), _github_id) assert list(_context.keyjar.owners()) == ['', _github_id] keys = _context.keyjar.get_issuer_keys('') assert len(keys) == 2 for service_type in ['authorization', 'accesstoken', 'userinfo']: _srv = client.client_get("service",service_type) _endp = _srv.client_get("service_context").get('provider_info')[_srv.endpoint_name] assert _srv.endpoint == _endp assert self.rph.hash2issuer['github'] == _context.get('issuer') def test_create_callbacks(self): cb = self.rph.create_callbacks('https://op.example.com/') assert set(cb.keys()) == {'code', 'implicit', 'form_post', '__hex'} _hash = cb['__hex'] assert cb['code'] == 'https://example.com/rp/authz_cb/{}'.format(_hash) assert cb['implicit'] == 'https://example.com/rp/authz_im_cb/{}'.format(_hash) assert cb['form_post'] == 'https://example.com/rp/authz_fp_cb/{}'.format(_hash) assert list(self.rph.hash2issuer.keys()) == [_hash] assert self.rph.hash2issuer[_hash] == 'https://op.example.com/' def test_begin(self): res = self.rph.begin(issuer_id='github') assert set(res.keys()) == {'url', 'state'} _github_id = iss_id('github') client = self.rph.issuer2rp[_github_id] assert client.client_get("service_context").issuer == _github_id part = urlsplit(res['url']) assert part.scheme == 'https' assert part.netloc == 'github.com' assert part.path == '/login/oauth/authorize' query = parse_qs(part.query) assert set(query.keys()) == {'nonce', 'state', 'client_id', 'redirect_uri', 'response_type', 'scope'} # nonce and state are created on the fly so can't check for those assert query['client_id'] == ['eeeeeeeee'] assert query['redirect_uri'] == [ 'https://example.com/rp/authz_cb/github'] assert query['response_type'] == ['code'] assert query['scope'] == ['user public_repo openid'] def test_get_session_information(self): res = self.rph.begin(issuer_id='github') _session = self.rph.get_session_information(res['state']) assert self.rph.client_configs['github']['issuer'] == _session['iss'] def test_get_client_from_session_key(self): res = self.rph.begin(issuer_id='linkedin') cli1 = self.rph.get_client_from_session_key(state=res['state']) _session = self.rph.get_session_information(res['state']) cli2 = self.rph.issuer2rp[_session['iss']] assert cli1 == cli2 # redo self.rph.do_provider_info(state=res['state']) # get new redirect_uris cli2.client_get("service_context").redirect_uris = [] self.rph.do_client_registration(state=res['state']) def test_finalize_auth(self): res = self.rph.begin(issuer_id='linkedin') _session = self.rph.get_session_information(res['state']) client = self.rph.issuer2rp[_session['iss']] auth_response = AuthorizationResponse(code='access_code', state=res['state']) resp = self.rph.finalize_auth(client, _session['iss'], auth_response.to_dict()) assert set(resp.keys()) == {'state', 'code'} aresp = client.client_get("service_context").state.get_item(AuthorizationResponse, 'auth_response', res['state']) assert set(aresp.keys()) == {'state', 'code'} def test_get_client_authn_method(self): res = self.rph.begin(issuer_id='github') _session = self.rph.get_session_information(res['state']) client = self.rph.issuer2rp[_session['iss']] authn_method = self.rph.get_client_authn_method(client, 'token_endpoint') assert authn_method == '' res = self.rph.begin(issuer_id='linkedin') _session = self.rph.get_session_information(res['state']) client = self.rph.issuer2rp[_session['iss']] authn_method = self.rph.get_client_authn_method(client, 'token_endpoint') assert authn_method == 'client_secret_post' def test_get_access_token(self): res = self.rph.begin(issuer_id='github') _session = self.rph.get_session_information(res['state']) client = self.rph.issuer2rp[_session['iss']] _github_id = iss_id('github') client.client_get("service_context").keyjar.import_jwks( GITHUB_KEY.export_jwks(issuer_id=_github_id), _github_id) _nonce = _session['auth_request']['nonce'] _iss = _session['iss'] _aud = client.client_id idval = { 'nonce': _nonce, 'sub': 'EndUserSubject', 'iss': _iss, 'aud': _aud } idts = IdToken(**idval) _signed_jwt = idts.to_jwt( key=GITHUB_KEY.get_signing_key(issuer_id=_github_id), algorithm="RS256", lifetime=300) _info = { "access_token": "accessTok", "id_token": _signed_jwt, "token_type": "Bearer", "expires_in": 3600 } at = AccessTokenResponse(**_info) _url = "https://github.com/token" with responses.RequestsMock() as rsps: rsps.add("POST", _url, body=at.to_json(), adding_headers={"Content-Type": "application/json"}, status=200) client.client_get("service",'accesstoken').endpoint = _url auth_response = AuthorizationResponse(code='access_code', state=res['state']) resp = self.rph.finalize_auth(client, _session['iss'], auth_response.to_dict()) resp = self.rph.get_access_token(res['state'], client) assert set(resp.keys()) == {'access_token', 'expires_in', 'id_token', 'token_type', '__verified_id_token', '__expires_at'} atresp = client.client_get("service_context").state.get_item( AccessTokenResponse, 'token_response', res['state']) assert set(atresp.keys()) == {'access_token', 'expires_in', 'id_token', 'token_type', '__verified_id_token', '__expires_at'} def test_access_and_id_token(self): res = self.rph.begin(issuer_id='github') _session = self.rph.get_session_information(res['state']) client = self.rph.issuer2rp[_session['iss']] _nonce = _session['auth_request']['nonce'] _iss = _session['iss'] _aud = client.client_id idval = { 'nonce': _nonce, 'sub': 'EndUserSubject', 'iss': _iss, 'aud': _aud } _github_id = iss_id('github') client.client_get("service_context").keyjar.import_jwks( GITHUB_KEY.export_jwks(issuer_id=_github_id), _github_id) idts = IdToken(**idval) _signed_jwt = idts.to_jwt( key=GITHUB_KEY.get_signing_key('rsa', issuer_id=_github_id), algorithm="RS256", lifetime=300) _info = { "access_token": "accessTok", "id_token": _signed_jwt, "token_type": "Bearer", "expires_in": 3600 } at = AccessTokenResponse(**_info) _url = "https://github.com/token" with responses.RequestsMock() as rsps: rsps.add("POST", _url, body=at.to_json(), adding_headers={"Content-Type": "application/json"}, status=200) client.client_get("service",'accesstoken').endpoint = _url _response = AuthorizationResponse(code='access_code', state=res['state']) auth_response = self.rph.finalize_auth(client, _session['iss'], _response.to_dict()) resp = self.rph.get_access_and_id_token(auth_response, client=client) assert resp['access_token'] == 'accessTok' assert isinstance(resp['id_token'], IdToken) def test_access_and_id_token_by_reference(self): res = self.rph.begin(issuer_id='github') _session = self.rph.get_session_information(res['state']) client = self.rph.issuer2rp[_session['iss']] _nonce = _session['auth_request']['nonce'] _iss = _session['iss'] _aud = client.client_id idval = { 'nonce': _nonce, 'sub': 'EndUserSubject', 'iss': _iss, 'aud': _aud } _github_id = iss_id('github') client.client_get("service_context").keyjar.import_jwks( GITHUB_KEY.export_jwks(issuer_id=_github_id), _github_id) idts = IdToken(**idval) _signed_jwt = idts.to_jwt( key=GITHUB_KEY.get_signing_key('rsa', issuer_id=_github_id), algorithm="RS256", lifetime=300) _info = { "access_token": "accessTok", "id_token": _signed_jwt, "token_type": "Bearer", "expires_in": 3600 } at = AccessTokenResponse(**_info) _url = "https://github.com/token" with responses.RequestsMock() as rsps: rsps.add("POST", _url, body=at.to_json(), adding_headers={"Content-Type": "application/json"}, status=200) client.client_get("service",'accesstoken').endpoint = _url _response = AuthorizationResponse(code='access_code', state=res['state']) _ = self.rph.finalize_auth(client, _session['iss'], _response.to_dict()) resp = self.rph.get_access_and_id_token(state=res['state']) assert resp['access_token'] == 'accessTok' assert isinstance(resp['id_token'], IdToken) def test_get_user_info(self): res = self.rph.begin(issuer_id='github') _session = self.rph.get_session_information(res['state']) client = self.rph.issuer2rp[_session['iss']] _nonce = _session['auth_request']['nonce'] _iss = _session['iss'] _aud = client.client_id idval = { 'nonce': _nonce, 'sub': 'EndUserSubject', 'iss': _iss, 'aud': _aud } _github_id = iss_id('github') client.client_get("service_context").keyjar.import_jwks( GITHUB_KEY.export_jwks(issuer_id=_github_id), _github_id) idts = IdToken(**idval) _signed_jwt = idts.to_jwt( key=GITHUB_KEY.get_signing_key('rsa', issuer_id=_github_id), algorithm="RS256", lifetime=300) _info = { "access_token": "accessTok", "id_token": _signed_jwt, "token_type": "Bearer", "expires_in": 3600 } at = AccessTokenResponse(**_info) _url = "https://github.com/token" with responses.RequestsMock() as rsps: rsps.add("POST", _url, body=at.to_json(), adding_headers={"Content-Type": "application/json"}, status=200) client.client_get("service",'accesstoken').endpoint = _url _response = AuthorizationResponse(code='access_code', state=res['state']) auth_response = self.rph.finalize_auth(client, _session['iss'], _response.to_dict()) token_resp = self.rph.get_access_and_id_token(auth_response, client=client) _url = "https://github.com/user_info" with responses.RequestsMock() as rsps: rsps.add("GET", _url, body='{"sub":"EndUserSubject"}', adding_headers={"Content-Type": "application/json"}, status=200) client.client_get("service",'userinfo').endpoint = _url userinfo_resp = self.rph.get_user_info(res['state'], client, token_resp['access_token']) assert userinfo_resp def test_userinfo_in_id_token(self): res = self.rph.begin(issuer_id='github') _session = self.rph.get_session_information(res['state']) client = self.rph.issuer2rp[_session['iss']] _nonce = _session['auth_request']['nonce'] _iss = _session['iss'] _aud = client.client_id idval = { 'nonce': _nonce, 'sub': 'EndUserSubject', 'iss': _iss, 'aud': _aud, 'given_name': 'Diana', 'family_name': 'Krall', 'occupation': 'Jazz pianist' } idts = IdToken(**idval) userinfo = self.rph.userinfo_in_id_token(idts) assert set(userinfo.keys()) == {'sub', 'family_name', 'given_name', 'occupation'} def test_get_provider_specific_service(): srv_desc = { 'access_token': { 'class': 'oidcrp.provider.github.AccessToken' } } entity = Entity(services=srv_desc) assert entity.client_get("service",'accesstoken').response_body_type == 'urlencoded' class TestRPHandlerTier2(object): @pytest.fixture(autouse=True) def rphandler_setup(self): self.rph = RPHandler(BASE_URL, CLIENT_CONFIG, keyjar=CLI_KEY) res = self.rph.begin(issuer_id='github') _session = self.rph.get_session_information(res['state']) client = self.rph.issuer2rp[_session['iss']] _nonce = _session['auth_request']['nonce'] _iss = _session['iss'] _aud = client.client_id idval = { 'nonce': _nonce, 'sub': 'EndUserSubject', 'iss': _iss, 'aud': _aud } _github_id = iss_id('github') client.client_get("service_context").keyjar.import_jwks( GITHUB_KEY.export_jwks(issuer_id=_github_id), _github_id) idts = IdToken(**idval) _signed_jwt = idts.to_jwt( key=GITHUB_KEY.get_signing_key('rsa', issuer_id=_github_id), algorithm="RS256", lifetime=300) _info = { "access_token": "accessTok", "id_token": _signed_jwt, "token_type": "Bearer", "expires_in": 3600, 'refresh_token': 'refreshing' } at = AccessTokenResponse(**_info) _url = "https://github.com/token" with responses.RequestsMock() as rsps: rsps.add("POST", _url, body=at.to_json(), adding_headers={"Content-Type": "application/json"}, status=200) client.client_get("service",'accesstoken').endpoint = _url _response = AuthorizationResponse(code='access_code', state=res['state']) auth_response = self.rph.finalize_auth(client, _session['iss'], _response.to_dict()) token_resp = self.rph.get_access_and_id_token(auth_response, client=client) _url = "https://github.com/token" with responses.RequestsMock() as rsps: rsps.add("GET", _url, body='{"sub":"EndUserSubject"}', adding_headers={"Content-Type": "application/json"}, status=200) client.client_get("service",'userinfo').endpoint = _url self.rph.get_user_info(res['state'], client, token_resp['access_token']) self.state = res['state'] def test_init_authorization(self): _session = self.rph.get_session_information(self.state) client = self.rph.issuer2rp[_session['iss']] res = self.rph.init_authorization( client, req_args={'scope': ['openid', 'email']}) part = urlsplit(res['url']) _qp = parse_qs(part.query) assert _qp['scope'] == ['openid email'] def test_refresh_access_token(self): _session = self.rph.get_session_information(self.state) client = self.rph.issuer2rp[_session['iss']] _info = { "access_token": "2nd_accessTok", "token_type": "Bearer", "expires_in": 3600 } at = AccessTokenResponse(**_info) _url = "https://github.com/token" with responses.RequestsMock() as rsps: rsps.add("POST", _url, body=at.to_json(), adding_headers={"Content-Type": "application/json"}, status=200) client.client_get("service",'refresh_token').endpoint = _url res = self.rph.refresh_access_token(self.state, client, 'openid email') assert res['access_token'] == '2nd_accessTok' def test_get_user_info(self): _session = self.rph.get_session_information(self.state) client = self.rph.issuer2rp[_session['iss']] _url = "https://github.com/userinfo" with responses.RequestsMock() as rsps: rsps.add("GET", _url, body='{"sub":"EndUserSubject", "mail":"foo@example.com"}', adding_headers={"Content-Type": "application/json"}, status=200) client.client_get("service",'userinfo').endpoint = _url resp = self.rph.get_user_info(self.state, client) assert set(resp.keys()) == {'sub', 'mail'} assert resp['mail'] == 'foo@example.com' def test_has_active_authentication(self): assert self.rph.has_active_authentication(self.state) def test_get_valid_access_token(self): (token, expires_at) = self.rph.get_valid_access_token(self.state) assert token == 'accessTok' assert expires_at > 0 class MockResponse(): def __init__(self, status_code, text, headers=None): self.status_code = status_code self.text = text self.headers = headers or {} class MockOP(object): def __init__(self, issuer, keyjar=None): self.keyjar = keyjar self.issuer = issuer self.state = '' self.nonce = '' self.get_response = {} self.register_get_response('default', 'OK', 200) self.post_response = {} self.register_post_response('default', 'OK', 200) def register_get_response(self, path, data, status_code=200, headers=None): _headers = headers or {} self.get_response[path] = MockResponse(status_code, data, _headers) def register_post_response(self, path, data, status_code=200, headers=None): _headers = headers or {} self.post_response[path] = MockResponse(status_code, data, _headers) def __call__(self, url, method="GET", data=None, headers=None, **kwargs): if method == 'GET': p = urlparse(url) try: _resp = self.get_response[p.path] except KeyError: _resp = self.get_response['default'] if callable(_resp.text): _data = _resp.text(data) _resp = MockResponse(_resp.status_code, _data, _resp.headers) return _resp elif method == 'POST': p = urlparse(url) try: _resp = self.post_response[p.path] except KeyError: _resp = self.post_response['default'] if callable(_resp.text): _data = _resp.text(data) _resp = MockResponse(_resp.status_code, _data, _resp.headers) return _resp def construct_access_token_response(nonce, issuer, client_id, key_jar): _aud = client_id idval = { 'nonce': nonce, 'sub': 'EndUserSubject', 'iss': issuer, 'aud': _aud } idts = IdToken(**idval) _signed_jwt = idts.to_jwt( key=key_jar.get_signing_key('rsa', issuer_id=issuer), algorithm="RS256", lifetime=300) _info = { "access_token": "accessTok", "id_token": _signed_jwt, "token_type": "Bearer", "expires_in": 3600 } return AccessTokenResponse(**_info) def registration_callback(data): _req = json.loads(data) # add client_id and client_secret _req['client_id'] = 'client1' _req['client_secret'] = "ClientSecretString" return json.dumps(_req) class TestRPHandlerWithMockOP(object): @pytest.fixture(autouse=True) def rphandler_setup(self): self.issuer = 'https://github.com/login/oauth/authorize' self.mock_op = MockOP(issuer=self.issuer) self.rph = RPHandler(BASE_URL, client_configs=CLIENT_CONFIG, http_lib=self.mock_op, keyjar=KeyJar()) def test_finalize(self): auth_query = self.rph.begin(issuer_id='github') # The authorization query is sent and after successful authentication client = self.rph.get_client_from_session_key( state=auth_query['state']) # register a response p = urlparse( CLIENT_CONFIG['github']['provider_info']['authorization_endpoint']) self.mock_op.register_get_response(p.path, 'Redirect', 302) _ = client.http(auth_query['url']) # the user is redirected back to the RP with a positive response auth_response = AuthorizationResponse(code='access_code', state=auth_query['state']) # need session information and the client instance _session = self.rph.get_session_information(auth_response['state']) client = self.rph.get_client_from_session_key( state=auth_response['state']) # Faking resp = construct_access_token_response( _session['auth_request']['nonce'], issuer=self.issuer, client_id=CLIENT_CONFIG['github']['client_id'], key_jar=GITHUB_KEY) p = urlparse( CLIENT_CONFIG['github']['provider_info']['token_endpoint']) self.mock_op.register_post_response( p.path, resp.to_json(), 200, {'content-type': "application/json"} ) _info = OpenIDSchema(sub='EndUserSubject', given_name='Diana', family_name='Krall', occupation='Jazz pianist') p = urlparse( CLIENT_CONFIG['github']['provider_info']['userinfo_endpoint']) self.mock_op.register_get_response( p.path, _info.to_json(), 200, {'content-type': "application/json"}) _github_id = iss_id('github') client.client_get("service_context").keyjar.import_jwks(GITHUB_KEY.export_jwks( issuer_id=_github_id), _github_id) # do the rest (= get access token and user info) # assume code flow resp = self.rph.finalize(_session['iss'], auth_response.to_dict()) assert set(resp.keys()) == {'userinfo', 'state', 'token', 'id_token'} def test_dynamic_setup(self): user_id = 'acct:foobar@example.com' _link = Link(rel="http://openid.net/specs/connect/1.0/issuer", href="https://server.example.com") webfinger_response = JRD(subject=user_id, links=[_link]) self.mock_op.register_get_response( '/.well-known/webfinger', webfinger_response.to_json(), 200, {'content-type': "application/json"}) resp = { "authorization_endpoint": "https://server.example.com/connect/authorize", "issuer": "https://server.example.com", "subject_types_supported": ['public'], "token_endpoint": "https://server.example.com/connect/token", "token_endpoint_auth_methods_supported": ["client_secret_basic", "private_key_jwt"], "userinfo_endpoint": "https://server.example.com/connect/user", "check_id_endpoint": "https://server.example.com/connect/check_id", "refresh_session_endpoint": "https://server.example.com/connect/refresh_session", "end_session_endpoint": "https://server.example.com/connect/end_session", "jwks_uri": "https://server.example.com/jwk.json", "registration_endpoint": "https://server.example.com/connect/register", "scopes_supported": ["openid", "profile", "email", "address", "phone"], "response_types_supported": ["code", "code id_token", "token id_token"], "acrs_supported": ["1", "2", "http://id.incommon.org/assurance/bronze"], "user_id_types_supported": ["public", "pairwise"], "userinfo_algs_supported": ["HS256", "RS256", "A128CBC", "A128KW", "RSA1_5"], "id_token_signing_alg_values_supported": ["HS256", "RS256", "A128CBC", "A128KW", "RSA1_5"], "request_object_algs_supported": ["HS256", "RS256", "A128CBC", "A128KW", "RSA1_5"] } pcr = ProviderConfigurationResponse(**resp) self.mock_op.register_get_response( '/.well-known/openid-configuration', pcr.to_json(), 200, {'content-type': "application/json"}) self.mock_op.register_post_response( '/connect/register', registration_callback, 200, {'content-type': "application/json"}) auth_query = self.rph.begin(user_id=user_id) assert auth_query
[ "roland@catalogix.se" ]
roland@catalogix.se
5bddc4a24c9f1f81abfd9f8431cff8753669e5fb
1779f1d096d4af6d3112e39ad36c63ff4b04ae00
/vision/detection/det_fluorescence/nuclei_pred_to_dic_masks.py
5d1bec9fc10469122dc3c10eb77553ac31fa8ba2
[]
no_license
10erick-cpu/RL_Mixing_Colours
eb753f7b6b309cf54fe41f74f993dfada83d7867
a11756d6988422929a452dc1e19ccf6b051f0832
refs/heads/master
2023-07-27T22:38:34.299006
2021-09-09T16:16:33
2021-09-09T16:16:33
398,141,652
0
0
null
null
null
null
UTF-8
Python
false
false
10,165
py
from collections import deque import matplotlib.pyplot as plt import torch from torch import no_grad import numpy as np from utils.file_management.naming_strategies import MetadataParser, CsvNamingStrategy from utils.helper_functions.img_utils import rgb2gray, gray2rgb from utils.helper_functions.torch_utils import training_device from utils.helper_functions.filesystem_utils import Folder from vision.detection.detection_datasets.fl_multimask_dataset import GeneratedImagesetDataset from vision.detection.model_setup.detection_utils import draw_detection, threshold_mask from vision.detection.model_setup.model_setup import get_transform from vision.detection.model_setup.mrcnn_wrapper import ModelConfig, MRCNNDetector from vision.prediction.settings.model_configurations import Raw, Sigmoid from vision.prediction.settings.training_configuration import TrainParams COLORS = [16, 32, 64, 96, 128, 160, 192, 220, 255] def get_detector(model_id, checkpoint_folder): detection_config = ModelConfig() detection_config.BOX_HEAD_NMS = 0.25 detection_config.BOX_HEAD_OBJ_TH = 0.5 detection_config.RPN_NMS_THRESH = 0.7 detector = MRCNNDetector(model_id, cp_folder=checkpoint_folder).load(detection_config) detector.model = detector.model.to(training_device()) detector.model.eval() return detector def get_predictor(predictor_params: TrainParams): predictor = predictor_params.get_model() predictor.load(predictor_params) predictor.eval() return predictor.to(training_device()) def find_image_sets(base_folder, naming_strategy, subdirs=False): parser = MetadataParser(naming_strategy) metadata = parser.extract_from( base_folder.make_file_provider(extensions=['tif', 'tiff', 'png'], include_subdirs=subdirs)) image_sets = naming_strategy.identify_image_sets(metadata) return image_sets def test(image_set): raw_instance_l1 = get_predictor(Raw.Instance.l1()) sm_instance_l1 = get_predictor(Sigmoid.Instance.l1()) sm_batch_l1 = get_predictor(Sigmoid.Batch.l1()) sm_instance_bce = get_predictor(Sigmoid.Instance.bce()) for im in image_set: img = torch.from_numpy(rgb2gray(im.dic)).float().unsqueeze(0).unsqueeze(0).to(training_device()) r_inst_l1 = raw_instance_l1.to(training_device())(img).cpu().numpy().squeeze() sm_inst_l1 = sm_instance_l1.to(training_device())(img).to("cpu").cpu().numpy().squeeze() sm_btch_l1 = sm_batch_l1.to(training_device())(img).to("cpu").cpu().numpy().squeeze() sm_inst_bce = sm_instance_bce.to(training_device())(img).to("cpu").cpu().numpy().squeeze() f, ax = plt.subplots(1, 6, sharex=True, sharey=True, figsize=(30, 20)) ax[0].imshow(im.dic, cmap="gray") ax[0].set_title("brightfield") ax[1].imshow(im.calcein, cmap="gray") ax[1].set_title("ground truth") ax[2].imshow(sm_inst_l1, cmap="gray") ax[2].set_title("sigmoid_instance_l1") ax[3].imshow(sm_inst_bce, cmap="gray") ax[3].set_title("sigmoid_instance_bce") ax[4].imshow(sm_btch_l1, cmap="gray") ax[4].set_title("sigmoid_batch_l1") ax[5].imshow(r_inst_l1, cmap="gray") ax[5].set_title("raw_instance_l1") for i in range(6): ax[i].axis("off") import seaborn as sns sns.despine(f) plt.tight_layout() out = Folder("/home/mrd/Desktop/comparison_predictors/sidebyside", create=True) f.savefig(out.get_file_path(f"{np.random.randint(0, 10000)}.png"), bbox_inches='tight', dpi=200) plt.close(f) @no_grad() def nuclei_prediction_to_masks(detector, image_sets, predictor=None, target_channel_name="hoechst", output_folder=None, override=False, do_output=False, center_mrcnn_input=True, max_dets=10): # output_folder = None #test(image_sets) #raise EOFError image_sets = deque(image_sets) total_count = len(image_sets) count = 0 for idx in range(total_count): count += 1 ims = image_sets.popleft() print("Processing {}/{}".format(idx + 1, total_count)) dic_meta = ims.channels["dic"] if output_folder and do_output: folder_name = dic_meta['base.fn'].item().split(".")[0].replace("_type=DIC", "") target_dir = output_folder.make_sub_folder(folder_name, create=False) if target_dir.exists(): if not override: print("skip folder", target_dir) continue else: target_dir.make_dir() else: target_dir = None dic = ims.dic dic = gray2rgb(dic) if predictor is not None: predictor_in = torch.from_numpy(rgb2gray(dic)).float().unsqueeze(0).unsqueeze(0).to(training_device()) detection_target = predictor(predictor_in).to("cpu") else: detection_target = ims.image(target_channel_name) detection_target = rgb2gray(detection_target) detection_target = torch.from_numpy(detection_target) if len(detection_target.shape) == 2: detection_target = detection_target.unsqueeze(0).unsqueeze(0) elif len(detection_target.shape) == 3: detection_target = detection_target.unsqueeze(0) detection_target = detection_target.float() # detection_target = (detection_target - detection_target.mean()) / detection_target.std() detection_target = (detection_target - detection_target.min()) \ / (detection_target.max() - detection_target.min()) if center_mrcnn_input: detection_target = (detection_target - detection_target.mean()) / detection_target.std() scores, boxes, masks, multimask_out = detector.detect_and_build_mask(detection_target, mask_threshold=0.5) color_overlay = np.zeros((*detection_target.squeeze().shape, 3), dtype=np.uint8) det_count = 0 confidence_th = 0.5 for idx, mask in enumerate(masks): if scores[idx] < confidence_th: continue det_count += 1 mask = threshold_mask(mask, 0.5) color_overlay = draw_detection(color_overlay, mask, boxes[idx], color=np.random.choice(COLORS, size=3, replace=False)) print(f"{det_count}/{len(boxes)} valid detections") f, ax = plt.subplots(2, 2, sharex=True, sharey=True, figsize=(14, 8)) ax[0][0].imshow(dic, cmap="gray") ax[0][1].imshow(detection_target.squeeze().numpy(), cmap="gray") ax[1][0].imshow(dic, cmap="gray") ax[1][0].imshow(color_overlay, alpha=0.3) ax[1][1].imshow(detection_target.squeeze().numpy(), cmap="gray") ax[1][1].imshow(color_overlay, alpha=0.3) obj_meta = ims._clone_channel('dic') obj_meta['type'] = "multimask" ims.assign_channel("multimask", multimask_out.numpy().squeeze(), obj_meta) # for i in range(masks.shape[2]): # obj_meta = ims._clone_channel('dic') # object_id = str(i) # obj_meta['o-id'] = object_id # ims.assign_channel("obj-mask#" + object_id, masks[:, :, i], obj_meta) # # try: # import seaborn as sns sns.despine(f) plt.tight_layout() if target_dir: _, out_dir = ims.persist(CsvNamingStrategy(), target_dir) f.savefig(out_dir.get_file_path(target_dir.name + "_debug.png")) else: plt.show() plt.close(f) if count > max_dets: break def test2(): ims = CsvNamingStrategy().find_image_sets(Folder("./test_output"), subdirs=True) ds = GeneratedImagesetDataset(ims, transforms=get_transform(train=True)) for img, mask in ds: print(img.shape) print(mask['masks'].shape) def generate_dataset(predictor, detector, dataset_folder, output_dir): sets = CsvNamingStrategy().find_image_sets(dataset_folder, subdirs=True) nuclei_prediction_to_masks(detector, sets, predictor=predictor, target_channel_name="hoechst", output_folder=output_dir, do_output=True, center_mrcnn_input=True) if __name__ == '__main__': # f = "/mnt/unix_data/datastorage/ztz_datasets/01_clean_ds_v2/calcein/train_test_split/test/fullres" calcein_base = "/mnt/unix_data/datastorage/ztz_datasets/01_clean_ds_v2/calcein/train_test_split/{}/fullres" hoechst_base = "/mnt/unix_data/datastorage/ztz_datasets/01_clean_ds_v2/190305_IBIDI_JIMT1_CT_HOE/train_test_split/{}/fullres" calcein_test = Folder(calcein_base.format("test")) calcein_train = Folder(calcein_base.format("train")) calcein_val = Folder(calcein_base.format("val")) hoechst_test = Folder(hoechst_base.format("test")) hoechst_train = Folder(hoechst_base.format("train")) hoechst_val = Folder(hoechst_base.format("val")) predictor_cfg = Sigmoid.Instance.l1() predictor = get_predictor(predictor_cfg) from vision.detection.det_fluorescence.train_fl_detection import model_id, model_checkpoint_folder detector = get_detector(model_id, model_checkpoint_folder) base = Folder("./generated_datasets/sigmoid_instance_l1_thesis", create=True) #base = Folder("./test_output/sigmoid_instance_bce", create=True) out_calcein_base = base.make_sub_folder("calcein") out_hoechst_base = base.make_sub_folder("hoechst") calcein = True hoechst = True if calcein: for name, f in zip(['test'], [calcein_test, calcein_val, calcein_train]): out_folder = out_calcein_base.make_sub_folder(name) print("Process folder", f, "out", out_folder) generate_dataset(predictor, detector, f, out_folder) if hoechst: for name, f in zip(['test'], [hoechst_test, hoechst_val, hoechst_train]): out_folder = out_hoechst_base.make_sub_folder(name) print("Process folder", f, "out", out_folder) generate_dataset(predictor, detector, f, out_folder)
[ "leonelerick59@gmail.com" ]
leonelerick59@gmail.com
38c044bb60b460c78920194f21612c7d6e3a6ecd
5054c805be8bf94d660b806dc7ee5a9f426d49bc
/posthog/api/test/test_organization_invites.py
84c62acdade45cf112112b9e93f3c0f014a056bf
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
BElluu/posthog
31a121ee1e690ee5d88cb268a3cd922031dcbee4
1e207230ba285c64ea8e7f58fd1f78ef7d7c160a
refs/heads/master
2022-11-29T09:37:13.072632
2022-07-06T16:38:37
2022-07-06T16:38:37
254,587,554
0
0
null
2020-04-10T08:48:41
2020-04-10T08:48:41
null
UTF-8
Python
false
false
11,182
py
import random from unittest.mock import ANY, patch from django.core import mail from rest_framework import status from posthog.models.instance_setting import set_instance_setting from posthog.models.organization import Organization, OrganizationInvite, OrganizationMembership from posthog.test.base import APIBaseTest NAME_SEEDS = ["John", "Jane", "Alice", "Bob", ""] class TestOrganizationInvitesAPI(APIBaseTest): def helper_generate_bulk_invite_payload(self, count: int): payload = [] for i in range(0, count): payload.append( { "target_email": f"test+{random.randint(1000000, 9999999)}@posthog.com", "first_name": NAME_SEEDS[i % len(NAME_SEEDS)], }, ) return payload # Listing invites def test_cant_list_invites_for_an_alien_organization(self): org = Organization.objects.create(name="Alien Org") invite = OrganizationInvite.objects.create(target_email="siloed@posthog.com", organization=org) response = self.client.get(f"/api/organizations/{org.id}/invites/") self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) self.assertEqual(response.json(), self.permission_denied_response()) # Even though there's no retrieve for invites, permissions are validated first response = self.client.get(f"/api/organizations/{org.id}/invites/{invite.id}") self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) self.assertEqual(response.json(), self.permission_denied_response()) # Creating invites @patch("posthoganalytics.capture") def test_add_organization_invite_email_required(self, mock_capture): response = self.client.post("/api/organizations/@current/invites/") self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) response_data = response.json() self.assertDictEqual( response_data, { "type": "validation_error", "code": "required", "detail": "This field is required.", "attr": "target_email", }, ) mock_capture.assert_not_called() @patch("posthoganalytics.capture") def test_add_organization_invite_with_email(self, mock_capture): set_instance_setting("EMAIL_HOST", "localhost") email = "x@x.com" with self.settings(EMAIL_ENABLED=True, SITE_URL="http://test.posthog.com"): response = self.client.post("/api/organizations/@current/invites/", {"target_email": email}) self.assertEqual(response.status_code, status.HTTP_201_CREATED) self.assertTrue(OrganizationInvite.objects.exists()) response_data = response.json() invite_id = response_data.pop("id") response_data.pop("created_at") response_data.pop("updated_at") self.assertDictEqual( response_data, { "target_email": email, "first_name": "", "created_by": { "id": self.user.id, "uuid": str(self.user.uuid), "distinct_id": self.user.distinct_id, "email": self.user.email, "first_name": self.user.first_name, }, "is_expired": False, "emailing_attempt_made": True, "message": None, }, ) capture_props = { "name_provided": False, "current_invite_count": 1, "current_member_count": 1, "email_available": True, "is_bulk": False, } # Assert capture call for invitee mock_capture.assert_any_call( f"invite_{invite_id}", "user invited", properties=capture_props, groups={"instance": ANY, "organization": str(self.team.organization_id)}, ) # Assert capture call for inviting party mock_capture.assert_any_call( self.user.distinct_id, "team invite executed", properties=capture_props, groups={"instance": ANY, "organization": str(self.team.organization_id), "project": str(self.team.uuid)}, ) self.assertEqual(mock_capture.call_count, 2) # Assert invite email is sent self.assertEqual(len(mail.outbox), 1) self.assertListEqual(mail.outbox[0].to, [email]) self.assertEqual(mail.outbox[0].reply_to, [self.user.email]) # Reply-To is set to the inviting user def test_can_create_invites_for_the_same_email_multiple_times(self): email = "x@posthog.com" count = OrganizationInvite.objects.count() for _ in range(0, 2): response = self.client.post("/api/organizations/@current/invites/", {"target_email": email}) self.assertEqual(response.status_code, status.HTTP_201_CREATED) obj = OrganizationInvite.objects.get(id=response.json()["id"]) self.assertEqual(obj.target_email, email) self.assertEqual(obj.created_by, self.user) self.assertEqual(OrganizationInvite.objects.count(), count + 2) def test_cannot_create_invite_for_another_org(self): another_org = Organization.objects.create(name="Another Org") count = OrganizationInvite.objects.count() email = "x@posthog.com" response = self.client.post(f"/api/organizations/{another_org.id}/invites/", {"target_email": email}) self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) self.assertEqual(response.json(), self.permission_denied_response()) self.assertEqual(OrganizationInvite.objects.count(), count) # Bulk create invites @patch("posthoganalytics.capture") def test_allow_bulk_creating_invites(self, mock_capture): set_instance_setting("EMAIL_HOST", "localhost") count = OrganizationInvite.objects.count() payload = self.helper_generate_bulk_invite_payload(7) with self.settings(EMAIL_ENABLED=True, SITE_URL="http://test.posthog.com"): response = self.client.post("/api/organizations/@current/invites/bulk/", payload, format="json",) self.assertEqual(response.status_code, status.HTTP_201_CREATED) response_data = response.json() self.assertEqual(OrganizationInvite.objects.count(), count + 7) self.assertEqual(len(response_data), 7) # Check objects are properly saved and response matches for i, item in enumerate(response_data): instance = OrganizationInvite.objects.get(id=item["id"]) self.assertEqual(instance.target_email, payload[i]["target_email"]) self.assertEqual(instance.target_email, item["target_email"]) self.assertEqual(instance.first_name, payload[i]["first_name"]) self.assertEqual(instance.first_name, item["first_name"]) # Emails should be sent self.assertEqual(len(mail.outbox), 7) # Assert capture was called mock_capture.assert_any_call( self.user.distinct_id, "bulk invite executed", properties={ "invitee_count": 7, "name_count": sum(1 for user in payload if user["first_name"]), "current_invite_count": 7, "current_member_count": 1, "email_available": True, }, groups={"instance": ANY, "organization": str(self.team.organization_id), "project": str(self.team.uuid),}, ) # Assert capture call for invitee mock_capture.assert_any_call( f"invite_{OrganizationInvite.objects.last().id}", # type: ignore "user invited", properties={ "name_provided": True, "current_invite_count": 7, "current_member_count": 1, "email_available": True, "is_bulk": True, }, groups={"instance": ANY, "organization": str(self.team.organization_id)}, ) def test_maximum_20_invites_per_request(self): count = OrganizationInvite.objects.count() payload = self.helper_generate_bulk_invite_payload(21) with self.settings(EMAIL_ENABLED=True, EMAIL_HOST="localhost", SITE_URL="http://test.posthog.com"): response = self.client.post("/api/organizations/@current/invites/bulk/", payload, format="json",) self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) self.assertEqual( response.json(), { "type": "validation_error", "code": "max_length", "detail": "A maximum of 20 invites can be sent in a single request.", "attr": None, }, ) # No invites created self.assertEqual(OrganizationInvite.objects.count(), count) # No emails should be sent self.assertEqual(len(mail.outbox), 0) def test_invites_are_create_atomically(self): count = OrganizationInvite.objects.count() payload = self.helper_generate_bulk_invite_payload(5) payload[4]["target_email"] = None with self.settings(EMAIL_ENABLED=True, EMAIL_HOST="localhost", SITE_URL="http://test.posthog.com"): response = self.client.post("/api/organizations/@current/invites/bulk/", payload, format="json",) self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) # No invites created self.assertEqual(OrganizationInvite.objects.count(), count) # No emails should be sent self.assertEqual(len(mail.outbox), 0) def test_cannot_bulk_create_invites_for_another_organization(self): another_org = Organization.objects.create() count = OrganizationInvite.objects.count() payload = self.helper_generate_bulk_invite_payload(3) with self.settings(EMAIL_ENABLED=True, EMAIL_HOST="localhost", SITE_URL="http://test.posthog.com"): response = self.client.post(f"/api/organizations/{another_org.id}/invites/bulk/", payload, format="json",) self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) self.assertEqual(response.json(), self.permission_denied_response()) # No invites created self.assertEqual(OrganizationInvite.objects.count(), count) # No emails should be sent self.assertEqual(len(mail.outbox), 0) # Deleting invites def test_delete_organization_invite_if_plain_member(self): self.organization_membership.level = OrganizationMembership.Level.MEMBER self.organization_membership.save() invite = OrganizationInvite.objects.create(organization=self.organization) response = self.client.delete(f"/api/organizations/@current/invites/{invite.id}") self.assertEqual(response.content, b"") # Empty response self.assertEqual(response.status_code, status.HTTP_204_NO_CONTENT) self.assertFalse(OrganizationInvite.objects.exists())
[ "noreply@github.com" ]
BElluu.noreply@github.com
bf007bb81f11cfe79bb76beb682830892485ab52
59381d3e69e4a288cdeb4aeecc2e9c84a28759b2
/selvbetjening/core/events/options/dynamic_selections.py
e66fa08346ab04030a31a9418ef20403633524f7
[ "MIT" ]
permissive
animekita/selvbetjening
88cb75164f8ab0b3341a6ba4dd85d425c601ee4d
fee63d178fbd5ce2976c04d3a4b2dde6d8691892
refs/heads/master
2021-07-05T01:10:59.900369
2015-09-17T15:15:29
2015-09-17T15:15:29
4,826,342
0
1
MIT
2021-06-10T17:35:22
2012-06-28T22:17:15
Python
UTF-8
Python
false
false
11,619
py
from collections import OrderedDict from django import forms from django.db.models import Count, Q import operator from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ungettext_lazy from selvbetjening.core.events.options.scope import SCOPE from selvbetjening.core.events.options.typemanager import type_manager_factory from selvbetjening.core.events.models import Selection, Option, AttendState def dynamic_statistics(event): """ Returns public statistics for all options where in_scope_view_public == True """ options = Option.objects.filter(group__event=event).filter(in_scope_view_public=True).\ exclude(selection__attendee__state=AttendState.waiting).distinct().\ annotate(confirmed_selections_count=Count('selection__pk')).\ order_by('-group__is_special', 'group__order', 'order') return options def dynamic_selections(scope, attendee, option_group=None, as_dict=False, as_group_dict=False): return _dynamic_selections(scope, attendee.event, attendee=attendee, option_group=option_group, as_dict=as_dict, as_group_dict=as_group_dict) def dynamic_options(scope, event, option_group=None, as_dict=False, as_group_dict=False): return _dynamic_selections(scope, event, option_group=option_group, as_dict=as_dict, as_group_dict=as_group_dict) def _dynamic_selections(scope, event, attendee=None, option_group=None, as_dict=False, as_group_dict=False): """ Generates a list of options and selections for an event. This function respects scoping. Returns a list of (option, selection) tuples clustered in option groups and ordered according to option group and option ordering. If attendee is None then selection is always None If as_dict is True then it is returned as an ordered dictionary with option.pk as key. If as_group_dict is True then it is returned as an ordered dictionary with option_group.pk as key. """ assert not (as_dict and as_group_dict) # get options options = Option.objects.filter(group__event=event).select_related('group') if not scope == SCOPE.SADMIN: scope_filters = [Q(**{scope: True})] if scope == SCOPE.EDIT_MANAGE_WAITING or \ scope == SCOPE.EDIT_MANAGE_ACCEPTED or \ scope == SCOPE.EDIT_MANAGE_ATTENDED: scope_filters.append(Q(in_scope_view_manage=True)) if scope == SCOPE.EDIT_REGISTRATION: scope_filters.append(Q(in_scope_view_registration=True)) options = options.filter(reduce(operator.or_, scope_filters)) # Creates Q(..) | Q(..) | Q(..) if option_group is not None: options = options.filter(group=option_group) options = options.order_by('-group__is_special', 'group__order', 'order') # append selections if attendee is not None: selections = Selection.objects.filter(attendee=attendee)\ .filter(option__in=options)\ .select_related('option', 'option__group', 'suboption') else: selections = [] # format result result = OrderedDict() for option in options: result[option.pk] = [option, None] for selection in selections: result[selection.option.pk][1] = selection if as_dict: return result elif as_group_dict: group_result = OrderedDict() for item in result.values(): group_result.setdefault(item[0].group.pk, []) group_result[item[0].group.pk].append(item) return group_result else: return result.values() def _pack_id(namespace, id): return '%s_%s' % (namespace, id) def _unpack_id(packed_id): return packed_id.split('_') def dynamic_selections_formset_factory(scope, event, *args, **kwargs): form_classes = [] for option_group_pk, options in dynamic_options(scope, event, as_group_dict=True).items(): form_classes.append(dynamic_selections_form_factory(scope, options[0][0].group, *args, options=[option[0] for option in options], **kwargs)) def init(self, *args, **kwargs): if 'instance' in kwargs: kwargs['attendee'] = kwargs['instance'] if 'attendee' in kwargs: # prefetch kwargs['selections'] = kwargs['attendee'].selection_set.all().select_related('option') self.instances = [form_class(*args, **kwargs) for form_class in form_classes] def is_valid(self): return all([instance.is_valid() for instance in self.instances]) def save(self, *args, **kwargs): for instance in self.instances: instance.save(*args, **kwargs) def iter(self): return self.instances.__iter__() def len(self): return self.instances.__len__() def getitem(self, key): return self.instances[key] @staticmethod def is_empty(): return all([form_class.is_empty() for form_class in form_classes]) fields = { '__init__': init, 'save': save, 'is_valid': is_valid, '__iter__': iter, '__len__': len, '__getitem__': getitem, 'is_empty': is_empty } return type('OptionGroupSelectionsFormSet', (object,), fields) def dynamic_selections_form_factory(scope, option_group_instance, helper_factory=None, options=None): if options is None: options = dynamic_options(scope, option_group_instance.event, option_group=option_group_instance) options = [option[0] for option in options] # TODO use selections from dynamic options def init(self, *args, **kwargs): self.attendee = kwargs.pop('attendee', None) self.attendee = kwargs.pop('instance', self.attendee) self.user = kwargs.pop('user') if self.attendee is not None: self.user = self.attendee.user # force the usage of attendee.user if self.attendee is not None: initial = {} selections = kwargs.pop('selections', None) if selections is None: selections = self.attendee.selection_set.all().select_related('option') for selection in selections: field_id = _pack_id('option', selection.option.pk) if field_id in self.type_widgets: initial[field_id] = self.type_widgets[field_id].initial_value(selection) kwargs['initial'] = initial super(forms.Form, self).__init__(*args, **kwargs) for field_id, type_widget in self.type_widgets.items(): if hasattr(type_widget, 'update_choices'): type_widget.update_choices(self.user, self.attendee) self.fields[field_id].choices = type_widget.choices if self.attendee is not None and not type_widget.is_editable(self.attendee): self.fields[field_id].widget.attrs['disabled'] = "disabled" def save(self, *args, **kwargs): attendee = kwargs.pop('attendee', self.attendee) assert attendee is not None for key, save_callback in self.save_callbacks.items(): save_callback(attendee, self.cleaned_data.get(key, None)) def clean_callback(field_id, related_field, type_manager_clean_callback): def inner(self): # If we have a related field, then erase the value if the related field is not selected. if related_field is not None: # Related field is readonly and is not set "initially" if related_field in self.readonly and not self.initial.get(related_field, False): return None if related_field not in self.readonly and not self.cleaned_data.get(related_field, False): return None return type_manager_clean_callback(self.cleaned_data.get(field_id, None)) return inner @staticmethod def is_empty(): return len(options) == 0 def clean(self): cleaned_data = super(forms.Form, self).clean() if scope == SCOPE.SADMIN: # Do not enforce max/min for admin return cleaned_data if option_group_instance.minimum_selected <= 0 and option_group_instance.maximum_selected <= 0: return cleaned_data selected = 0 for option in options: field_id = _pack_id('option', option.pk) if getattr(option, scope): # field is editable value = cleaned_data.get(field_id, None) else: value = self.initial.get(field_id, None) selected += 1 if self._selected_callbacks[field_id](value) else 0 if option_group_instance.minimum_selected > 0 and selected < option_group_instance.minimum_selected: raise forms.ValidationError(ungettext_lazy('You must select at least %d option.', 'You must select at least %d options.', option_group_instance.minimum_selected) % option_group_instance.minimum_selected) if 0 < option_group_instance.maximum_selected < selected: raise forms.ValidationError(ungettext_lazy('You must select at most %d option.', 'You must select at most %d options.', option_group_instance.maximum_selected) % option_group_instance.maximum_selected) return cleaned_data fields = { '__init__': init, 'save': save, 'is_empty': is_empty, 'clean': clean, 'save_callbacks': {}, '_selected_callbacks': {}, 'type_widgets': {}, 'readonly': [] } for option in options: widget = type_manager_factory(option).get_widget(scope, option) field_id = _pack_id('option', option.pk) related_field = None attrs = None if option.depends_on is not None: related_field = _pack_id('option', option.depends_on.pk) attrs = {'data-depends-on': related_field} fields[field_id] = widget.get_field(attrs=attrs) fields['_selected_callbacks'][field_id] = widget.selected_callback if scope == SCOPE.SADMIN or getattr(option, scope): # The edit scope bit is set fields['clean_%s' % field_id] = clean_callback(field_id, related_field, widget.clean_callback) fields['save_callbacks'][field_id] = widget.save_callback else: # The edit bit is not set, this is a view only option fields['clean_%s' % field_id] = lambda self: None fields['save_callbacks'][field_id] = lambda attendee, value: None if not hasattr(fields[field_id].widget, 'CANT_DISABLE'): fields[field_id].widget.attrs['disabled'] = 'disabled' fields[field_id].required = False # If we don't do this Django will err because of missing POST data fields['readonly'].append(field_id) fields['type_widgets'][field_id] = widget if helper_factory is not None: fields['helper'] = helper_factory(option_group_instance, [_pack_id('option', option.pk) for option in options]) return type('OptionGroupSelectionsForm', (forms.Form,), fields)
[ "casper@svenningjensen.dk" ]
casper@svenningjensen.dk
fc83d9a049d663d70a7fd53e2c1f4a20d99684a5
b42850bc3e36bbd1683070393582617f2b3cd8e6
/Retake_22_08_2020/project/everland.py
1356a49f74400af83924dd1bd987fe8f49f82ac0
[]
no_license
marianidchenko/Python_OOP
aecca18be6df3850c0efbf2fa6d25bf3ff53ae96
547c12cbdad5b8c16fa55bba6c03b71db181ad2b
refs/heads/main
2023-07-09T05:42:43.863681
2021-08-14T14:55:51
2021-08-14T14:55:51
381,572,168
0
0
null
null
null
null
UTF-8
Python
false
false
1,637
py
from project.rooms.room import Room class Everland: def __init__(self): self.rooms = [] def add_room(self, room: Room): self.rooms.append(room) def get_monthly_consumptions(self): monthly_consumptions = 0 for room in self.rooms: monthly_consumptions += room.expenses + room.room_cost return f"Monthly consumption: {monthly_consumptions:.2f}$." def pay(self): result = [] rooms_to_remove = [] for room in self.rooms: total_owed = room.expenses + room.room_cost if room.budget >= total_owed: room.budget -= total_owed result.append(f"{room.family_name} paid {total_owed:.2f}$ and have {room.budget:.2f}$ left.") else: result.append(f"{room.family_name} does not have enough budget and must leave the hotel.") rooms_to_remove.append(room) self.rooms = [x for x in self.rooms if x not in rooms_to_remove] return '\n'.join(result) def status(self): result = [f"Total population: {[x.members_count for x in self.rooms]}"] for room in self.rooms: result.append(f"{room.family_name} with {room.members_count} members. Budget: {room.budget:.2f}$, Expenses: {room.expenses:.2f}$") for i, child in enumerate(room.children): result.append(f"--- Child {i} monthly cost: {child.cost*30:.2f}$") for appliance in room.appliances: result.append(f"--- Appliances monthly cost: {appliance.get_monthly_expenses():.2f}$") return '\n'.join(result)
[ "marianidchenko@gmail.com" ]
marianidchenko@gmail.com
1ad00a97483019c6d76ac8f0be7b02e12ffb761f
451ca000022a55a7e0c2f296216973c6bb712b53
/tests/test_dataset.py
a59b8b10ba6f196213b99fd6d0a2a53ebb6e7d07
[ "MIT" ]
permissive
StaminaTang/d3rlpy
305482dfa12daaa6304be9dbe3c8b35073c71232
dea36543a652e6eb088d27bd00e1ad5bced087fa
refs/heads/master
2023-02-25T07:11:09.754278
2021-02-01T14:09:23
2021-02-01T14:09:23
null
0
0
null
null
null
null
UTF-8
Python
false
false
18,551
py
import numpy as np import pytest import os from collections import deque from sklearn.model_selection import train_test_split from d3rlpy.dataset import MDPDataset, Episode, Transition, TransitionMiniBatch from d3rlpy.dataset import compute_lambda_return, _check_discrete_action @pytest.mark.parametrize("data_size", [100]) def test_check_discrete_action(data_size): # discrete action with int32 discrete_actions = np.random.randint(100, size=data_size) assert _check_discrete_action(discrete_actions) # discrete action with float32 assert _check_discrete_action(np.array(discrete_actions, dtype=np.float32)) # continuous action continuous_actions = np.random.random(data_size) assert not _check_discrete_action(continuous_actions) @pytest.mark.parametrize("data_size", [100]) @pytest.mark.parametrize("observation_size", [4]) @pytest.mark.parametrize("action_size", [2]) def test_check_discrete_action_with_mdp_dataset( data_size, observation_size, action_size ): observations = np.random.random((data_size, observation_size)).astype("f4") rewards = np.random.random(data_size) terminals = np.random.randint(2, size=data_size) # check discrete_action discrete_actions = np.random.randint(action_size, size=data_size) dataset = MDPDataset(observations, discrete_actions, rewards, terminals) assert dataset.is_action_discrete() # check continuous action continuous_actions = np.random.random((data_size, action_size)) dataset = MDPDataset(observations, continuous_actions, rewards, terminals) assert not dataset.is_action_discrete() @pytest.mark.parametrize("data_size", [100]) @pytest.mark.parametrize("observation_size", [4]) @pytest.mark.parametrize("action_size", [2]) @pytest.mark.parametrize("n_episodes", [4]) @pytest.mark.parametrize("discrete_action", [True, False]) def test_mdp_dataset( data_size, observation_size, action_size, n_episodes, discrete_action ): observations = np.random.random((data_size, observation_size)).astype("f4") rewards = np.random.uniform(-10.0, 10.0, size=data_size).astype("f4") n_steps = data_size // n_episodes terminals = np.array(([0] * (n_steps - 1) + [1]) * n_episodes) if discrete_action: actions = np.random.randint(action_size, size=data_size) ref_action_size = np.max(actions) + 1 else: actions = np.random.random((data_size, action_size)).astype("f4") ref_action_size = action_size dataset = MDPDataset( observations=observations, actions=actions, rewards=rewards, terminals=terminals, discrete_action=discrete_action, ) # check MDPDataset methods assert np.all(dataset.observations == observations) assert np.all(dataset.actions == actions) assert np.all(dataset.rewards == rewards) assert np.all(dataset.terminals == terminals) assert dataset.size() == n_episodes assert dataset.get_action_size() == action_size assert dataset.get_observation_shape() == (observation_size,) assert dataset.is_action_discrete() == discrete_action # check stats ref_returns = [] for i in range(n_episodes): episode_return = 0.0 for j in range(1, n_steps): episode_return += rewards[j + i * n_steps] ref_returns.append(episode_return) stats = dataset.compute_stats() return_stats = stats["return"] assert np.allclose(return_stats["mean"], np.mean(ref_returns)) assert np.allclose(return_stats["std"], np.std(ref_returns)) assert np.allclose(return_stats["min"], np.min(ref_returns)) assert np.allclose(return_stats["max"], np.max(ref_returns)) reward_stats = stats["reward"] assert np.allclose(reward_stats["mean"], np.mean(rewards)) assert np.allclose(reward_stats["std"], np.std(rewards)) assert np.allclose(reward_stats["min"], np.min(rewards)) assert np.allclose(reward_stats["max"], np.max(rewards)) observation_stats = stats["observation"] assert np.all(observation_stats["mean"] == np.mean(observations, axis=0)) assert np.all(observation_stats["std"] == np.std(observations, axis=0)) if discrete_action: freqs, action_ids = stats["action"]["histogram"] assert np.sum(freqs) == data_size assert list(action_ids) == [i for i in range(action_size)] else: action_stats = stats["action"] assert np.all(action_stats["mean"] == np.mean(actions, axis=0)) assert np.all(action_stats["std"] == np.std(actions, axis=0)) assert np.all(action_stats["min"] == np.min(actions, axis=0)) assert np.all(action_stats["max"] == np.max(actions, axis=0)) assert len(action_stats["histogram"]) == action_size for freqs, _ in action_stats["histogram"]: assert np.sum(freqs) == data_size # check episodes exported from dataset episodes = dataset.episodes assert len(episodes) == n_episodes for i, e in enumerate(dataset.episodes): assert isinstance(e, Episode) assert e.size() == n_steps - 1 head = i * n_steps tail = head + n_steps assert np.all(e.observations == observations[head:tail]) assert np.all(e.actions == actions[head:tail]) assert np.all(e.rewards == rewards[head:tail]) assert e.get_observation_shape() == (observation_size,) assert e.get_action_size() == ref_action_size # check list-like behaviors assert len(dataset) == n_episodes assert dataset[0] is dataset.episodes[0] for i, episode in enumerate(dataset.episodes): assert isinstance(episode, Episode) assert episode is dataset.episodes[i] # check append dataset.append(observations, actions, rewards, terminals) assert len(dataset) == 2 * n_episodes assert dataset.observations.shape == (2 * data_size, observation_size) assert dataset.rewards.shape == (2 * data_size,) assert dataset.terminals.shape == (2 * data_size,) if discrete_action: assert dataset.actions.shape == (2 * data_size,) else: assert dataset.actions.shape == (2 * data_size, action_size) # check extend another_dataset = MDPDataset( observations, actions, rewards, terminals, discrete_action=discrete_action, ) dataset.extend(another_dataset) assert len(dataset) == 3 * n_episodes assert dataset.observations.shape == (3 * data_size, observation_size) assert dataset.rewards.shape == (3 * data_size,) assert dataset.terminals.shape == (3 * data_size,) if discrete_action: assert dataset.actions.shape == (3 * data_size,) else: assert dataset.actions.shape == (3 * data_size, action_size) # check clip_reward dataset.clip_reward(-1.0, 1.0) assert rewards[rewards > 1.0].sum() != 0 assert rewards[rewards < -1.0].sum() != 0 assert dataset.rewards[dataset.rewards > 1.0].sum() == 0 assert dataset.rewards[dataset.rewards < -1.0].sum() == 0 # check dump and load dataset.dump(os.path.join("test_data", "dataset.h5")) new_dataset = MDPDataset.load(os.path.join("test_data", "dataset.h5")) assert np.all(dataset.observations == new_dataset.observations) assert np.all(dataset.actions == new_dataset.actions) assert np.all(dataset.rewards == new_dataset.rewards) assert np.all(dataset.terminals == new_dataset.terminals) assert dataset.discrete_action == new_dataset.discrete_action assert len(dataset) == len(new_dataset) @pytest.mark.parametrize("data_size", [100]) @pytest.mark.parametrize("observation_size", [4]) @pytest.mark.parametrize("action_size", [2]) def test_episode(data_size, observation_size, action_size): observations = np.random.random((data_size, observation_size)).astype("f4") actions = np.random.random((data_size, action_size)).astype("f4") rewards = np.random.random(data_size).astype("f4") episode = Episode( observation_shape=(observation_size,), action_size=action_size, observations=observations, actions=actions, rewards=rewards, ) # check Episode methods assert np.all(episode.observations == observations) assert np.all(episode.actions == actions) assert np.all(episode.rewards == rewards) assert episode.size() == data_size - 1 assert episode.get_observation_shape() == (observation_size,) assert episode.get_action_size() == action_size assert episode.compute_return() == np.sum(rewards[1:]) # check transitions exported from episode assert len(episode.transitions) == data_size - 1 for i, t in enumerate(episode.transitions): assert isinstance(t, Transition) assert t.get_observation_shape() == (observation_size,) assert t.get_action_size() == action_size assert np.all(t.observation == observations[i]) assert np.all(t.action == actions[i]) assert np.allclose(t.reward, rewards[i]) assert np.all(t.next_observation == observations[i + 1]) assert np.all(t.next_action == actions[i + 1]) assert np.allclose(t.next_reward, rewards[i + 1]) assert t.terminal == (1.0 if (i == data_size - 2) else 0.0) # check forward pointers count = 1 transition = episode[0] while transition.next_transition: transition = transition.next_transition count += 1 assert count == data_size - 1 # check backward pointers count = 1 transition = episode[-1] while transition.prev_transition: transition = transition.prev_transition count += 1 assert count == data_size - 1 # check list-like bahaviors assert len(episode) == data_size - 1 assert episode[0] is episode.transitions[0] for i, transition in enumerate(episode): assert isinstance(transition, Transition) assert transition is episode.transitions[i] @pytest.mark.parametrize("data_size", [100]) @pytest.mark.parametrize("observation_size", [100]) @pytest.mark.parametrize("action_size", [2]) def test_episode_terminals(data_size, observation_size, action_size): observations = np.random.random((data_size, observation_size)).astype("f4") actions = np.random.random((data_size, action_size)).astype("f4") rewards = np.random.random(data_size).astype("f4") # check default terminals = np.zeros(data_size, dtype=np.float32) terminals[49] = 1.0 terminals[-1] = 1.0 dataset1 = MDPDataset(observations, actions, rewards, terminals) assert len(dataset1.episodes) == 2 assert np.all(dataset1.terminals == dataset1.episode_terminals) assert dataset1.episodes[0].terminal assert dataset1.episodes[0][-1].terminal # check non-terminal episode terminals = np.zeros(data_size, dtype=np.float32) terminals[-1] = 1.0 episode_terminals = np.zeros(data_size, dtype=np.float32) episode_terminals[49] = 1.0 episode_terminals[-1] = 1.0 dataset2 = MDPDataset( observations, actions, rewards, terminals, episode_terminals ) assert len(dataset2.episodes) == 2 assert not np.all(dataset2.terminals == dataset2.episode_terminals) assert not dataset2.episodes[0].terminal assert not dataset2.episodes[0][-1].terminal # check extend dataset1.extend(dataset2) assert len(dataset1) == 4 assert not dataset1.episodes[2].terminal assert dataset1.episodes[3].terminal @pytest.mark.parametrize("data_size", [100]) @pytest.mark.parametrize("observation_shape", [(100,), (4, 84, 84)]) @pytest.mark.parametrize("action_size", [2]) @pytest.mark.parametrize("n_frames", [1, 4]) @pytest.mark.parametrize("n_steps", [1, 3]) @pytest.mark.parametrize("gamma", [0.99]) @pytest.mark.parametrize("discrete_action", [False, True]) def test_transition_minibatch( data_size, observation_shape, action_size, n_frames, n_steps, gamma, discrete_action, ): if len(observation_shape) == 3: observations = np.random.randint( 256, size=(data_size, *observation_shape), dtype=np.uint8 ) else: observations = np.random.random( (data_size,) + observation_shape ).astype("f4") if discrete_action: actions = np.random.randint(action_size, size=data_size) else: actions = np.random.random((data_size, action_size)).astype("f4") rewards = np.random.random((data_size, 1)).astype("f4") episode = Episode( observation_shape=observation_shape, action_size=action_size, observations=observations, actions=actions, rewards=rewards, ) if len(observation_shape) == 3: n_channels = n_frames * observation_shape[0] image_size = observation_shape[1:] batched_observation_shape = (data_size - 1, n_channels, *image_size) else: batched_observation_shape = (data_size - 1, *observation_shape) batch = TransitionMiniBatch(episode.transitions, n_frames, n_steps, gamma) assert batch.observations.shape == batched_observation_shape assert batch.next_observations.shape == batched_observation_shape for i, t in enumerate(episode.transitions): observation = batch.observations[i] next_observation = batch.next_observations[i] n = int(batch.n_steps[i][0]) print(i) assert n == min(data_size - i - 1, n_steps) if n_frames > 1 and len(observation_shape) == 3: # create padded observations for check stacking pad = ((n_frames - 1, 0), (0, 0), (0, 0), (0, 0)) padded_observations = np.pad(observations, pad, "edge") # check frame stacking head_index = i tail_index = head_index + n_frames window = padded_observations[head_index:tail_index] next_window = padded_observations[head_index + n : tail_index + n] ref_observation = np.vstack(window) ref_next_observation = np.vstack(next_window) assert observation.shape == ref_observation.shape assert next_observation.shape == ref_next_observation.shape assert np.all(observation == ref_observation) assert np.all(next_observation == ref_next_observation) else: next_t = t for _ in range(n - 1): next_t = next_t.next_transition assert np.allclose(observation, t.observation) assert np.allclose(next_observation, next_t.next_observation) next_reward = 0.0 next_action = 0.0 terminal = 0.0 next_t = t for j in range(n): next_reward += next_t.next_reward * gamma ** j next_action = next_t.next_action terminal = next_t.terminal next_t = next_t.next_transition assert np.all(batch.actions[i] == t.action) assert np.all(batch.rewards[i][0] == t.reward) assert np.all(batch.next_actions[i] == next_action) assert np.allclose(batch.next_rewards[i][0], next_reward) assert np.all(batch.terminals[i][0] == terminal) # check list-like behavior assert len(batch) == data_size - 1 assert batch[0] is episode.transitions[0] for i, transition in enumerate(batch): assert isinstance(transition, Transition) assert transition is episode.transitions[i] @pytest.mark.parametrize("data_size", [100]) @pytest.mark.parametrize("observation_shape", [(100,), (4, 84, 84)]) @pytest.mark.parametrize("action_size", [2]) @pytest.mark.parametrize("n_frames", [1, 4]) @pytest.mark.parametrize("gamma", [0.99]) @pytest.mark.parametrize("lam", [0.95]) def test_compute_lambda_return( data_size, observation_shape, action_size, n_frames, gamma, lam ): if len(observation_shape) == 3: observations = np.random.randint( 256, size=(data_size, *observation_shape), dtype=np.uint8 ) else: observations = np.random.random( (data_size,) + observation_shape ).astype("f4") actions = np.random.random((data_size, action_size)).astype("f4") rewards = np.random.random((data_size, 1)).astype("f4") episode = Episode( observation_shape=observation_shape, action_size=action_size, observations=observations, actions=actions, rewards=rewards, ) class DummyAlgo: def predict_value(self, observations): batch_size = observations.shape[0] return np.mean(observations.reshape((batch_size, -1)), axis=1) algo = DummyAlgo() transitions = episode.transitions transition = transitions[3] # compute reference naively t = transition observations = [] returns = [] R = 0.0 for i in range(data_size): observation = TransitionMiniBatch([t], n_frames).next_observations[0] observations.append(observation) R += (gamma ** i) * t.next_reward returns.append(R) t = t.next_transition if t is None: break values = algo.predict_value(np.array(observations)) values[-1] = 0.0 gammas = gamma ** (np.arange(len(observations)) + 1) returns += gammas * values lambdas = lam ** np.arange(len(observations)) ref_lambda_return = (1.0 - lam) * np.sum(lambdas[:-1] * returns[:-1]) ref_lambda_return += lambdas[-1] * returns[-1] # compute lambda return lambda_return = compute_lambda_return( transition, algo, gamma, lam, n_frames ) assert np.allclose(ref_lambda_return, lambda_return) @pytest.mark.parametrize("data_size", [100]) @pytest.mark.parametrize("observation_size", [4]) @pytest.mark.parametrize("action_size", [2]) @pytest.mark.parametrize("n_episodes", [10]) @pytest.mark.parametrize("test_size", [0.2]) def test_dataset_with_sklearn( data_size, observation_size, action_size, n_episodes, test_size ): observations = np.random.random((data_size, observation_size)).astype("f4") actions = np.random.random((data_size, action_size)) rewards = np.random.random(data_size) n_steps = data_size // n_episodes terminals = np.array(([0] * (n_steps - 1) + [1]) * n_episodes) dataset = MDPDataset(observations, actions, rewards, terminals) # check compatibility with train_test_split train_episodes, test_episodes = train_test_split( dataset, test_size=test_size ) assert len(train_episodes) == int(n_episodes * (1.0 - test_size)) assert len(test_episodes) == int(n_episodes * test_size)
[ "takuma.seno@gmail.com" ]
takuma.seno@gmail.com
72ad5a472eabffc145e2b07652c5f9b17d06717d
1508b3e3f56e750e38db4334343beedcbb2f9c95
/318/kel.py
708fb80bd9f9411fded135560d22aed7500f9137
[]
no_license
kellyseeme/pythonexample
3bb325e31c677160c1abd6c3f314f7ef3af55daa
3eab43cdfa5c59a0f4553de84c9de21e5ded44bb
refs/heads/master
2021-01-21T13:52:43.076697
2016-05-30T06:32:37
2016-05-30T06:32:37
51,348,486
0
0
null
null
null
null
UTF-8
Python
false
false
225
py
#!/usr/bin/env python from multiprocessing import Pool class calculate(object): def run(self): def f(x): return x*x p = Pool() return p.map(f,[1,2,3]) c1 = calculate() print c1.run()
[ "root@python.(none)" ]
root@python.(none)
5b05bd4fc2a322b216ae791dd0c8a890a6ad8f42
2b167e29ba07e9f577c20c54cb943861d0ccfa69
/numerical_analysis_backup/small-scale-multiobj/pareto2/arch5_pod100_old2/pareto3_0.py
f485b95797c5da4248e1e6822e5815b276913e33
[]
no_license
LiYan1988/kthOld_OFC
17aeeed21e195d1a9a3262ec2e67d6b1d3f9ff0f
b1237577ea68ad735a65981bf29584ebd889132b
refs/heads/master
2021-01-11T17:27:25.574431
2017-01-23T05:32:35
2017-01-23T05:32:35
79,773,237
0
0
null
null
null
null
UTF-8
Python
false
false
2,373
py
# -*- coding: utf-8 -*- """ Created on Thu Aug 4 15:15:10 2016 @author: li optimize both throughput and connections """ #import sys #sys.path.insert(0, '/home/li/Dropbox/KTH/numerical_analysis/ILPs') import csv from gurobipy import * import numpy as np from arch5_decomposition_new import Arch5_decompose np.random.seed(2010) num_cores=3 num_slots=80 i = 0 time_limit_routing = 1200 # 1000 time_limit_sa = 108 # 10800 filename = 'traffic_matrix_old_'+str(i)+'.csv' # print filename tm = [] with open(filename) as f: reader = csv.reader(f) for idx, row in enumerate(reader): row = [float(u) for u in row] tm.append(row) tm = np.array(tm) #%% arch2 betav = np.array([8e-4, 1e-3, 2e-3, 4e-3]) connection_ub = [] throughput_ub = [] obj_ub = [] connection_lb = [] throughput_lb = [] obj_lb = [] connection_he = [] throughput_he = [] obj_he = [] for beta in betav: m = Arch5_decompose(tm, num_slots=num_slots, num_cores=num_cores, alpha=1,beta=beta) m.create_model_routing(mipfocus=1,timelimit=1800,mipgap=0.01, method=2) connection_ub.append(m.connection_ub_) throughput_ub.append(m.throughput_ub_) obj_ub.append(m.obj_ub_) m.create_model_sa(mipfocus=1,timelimit=10800,mipgap=0.01, method=2, SubMIPNodes=2000, heuristics=0.8) connection_lb.append(m.connection_lb_) throughput_lb.append(m.throughput_lb_) obj_lb.append(m.obj_lb_) m.write_result_csv('cnklist_lb_%d_%.2e.csv'%(i,beta), m.cnklist_lb) connection_lb.append(0) throughput_lb.append(0) obj_lb.append(0) m.heuristic() connection_he.append(m.obj_heuristic_connection_) throughput_he.append(m.obj_heuristic_throughput_) obj_he.append(m.obj_heuristic_) m.write_result_csv('cnklist_heuristic_%d_%.2e.csv'%(i,beta), m.cnklist_heuristic_) result = np.array([betav, connection_ub,throughput_ub,obj_ub, connection_lb,throughput_lb,obj_lb, connection_he,throughput_he,obj_he]).T file_name = "result_pareto_arch5_old_3_{}.csv".format(i) with open(file_name, 'w') as f: writer = csv.writer(f, delimiter=',') writer.writerow(['beta', 'connection_ub', 'throughput_ub', 'obj_ub', 'connection_lb', 'throughput_lb', 'obj_lb', 'connection_he', 'throughput_he', 'obj_he']) writer.writerows(result)
[ "li.yan.ly414@gmail.com" ]
li.yan.ly414@gmail.com
0716345cc1f94f9b90b84d98fe7119f124f585ca
3851d5eafcc5fd240a06a7d95a925518412cafa0
/Django_Code/gs28/manage.py
6958a0c33875a18d13b1a5e12ec180f46bd0220e
[]
no_license
Ikshansaleem/DjangoandRest
c0fafaecde13570ffd1d5f08019e04e1212cc2f3
0ccc620ca609b4ab99a9efa650b5893ba65de3c5
refs/heads/master
2023-01-31T04:37:57.746016
2020-12-10T06:27:24
2020-12-10T06:27:24
320,180,735
0
0
null
null
null
null
UTF-8
Python
false
false
645
py
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'gs28.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " "available on your PYTHONPATH environment variable? Did you " "forget to activate a virtual environment?" ) from exc execute_from_command_line(sys.argv) if __name__ == '__main__': main()
[ "ikshan3108@gmail.com" ]
ikshan3108@gmail.com
240e2ace0249c7ce9fc65739b1d3a3f3488491cd
a94757526253f3a3ae4b65b662316e3b03b271e9
/week10/Similar_String_Groups.py
fa1c9ac411bb77fca9663c66e116dfcec5876acd
[]
no_license
RRoundTable/CPPS
3e30f4d9c48aa9c85d74db6696c6d458fa38523a
fb679053ee89c15e2844fda1d705d46778ea1c0d
refs/heads/master
2021-07-06T07:19:43.806752
2020-12-15T10:59:08
2020-12-15T10:59:08
214,435,381
1
2
null
2020-02-06T14:53:13
2019-10-11T12:50:22
Python
UTF-8
Python
false
false
2,608
py
''' link: https://leetcode.com/problems/similar-string-groups/ Two strings X and Y are similar if we can swap two letters (in different positions) of X, so that it equals Y. For example, "tars" and "rats" are similar (swapping at positions 0 and 2), and "rats" and "arts" are similar, but "star" is not similar to "tars", "rats", or "arts". Together, these form two connected groups by similarity: {"tars", "rats", "arts"} and {"star"}. Notice that "tars" and "arts" are in the same group even though they are not similar. Formally, each group is such that a word is in the group if and only if it is similar to at least one other word in the group. We are given a list A of strings. Every string in A is an anagram of every other string in A. How many groups are there? Example 1: Input: A = ["tars","rats","arts","star"] Output: 2 Constraints: 1 <= A.length <= 2000 1 <= A[i].length <= 1000 A.length * A[i].length <= 20000 All words in A consist of lowercase letters only. All words in A have the same length and are anagrams of each other. The judging time limit has been increased for this question. ''' from collections import defaultdict from itertools import combinations class Solution: def numSimilarGroups(self, A: List[str]) -> int: ''' if N < W ^ 2: O(N^2*W)/O(N) else: O(N*W^3)/O(N^2 W) ''' A = list(set(A)) n, w = len(A), len(A[0]) def compare(a, b): count = 0 for i in range(len(b)): if count > 2: return False if a[i] != b[i]: count += 1 if count == 2: return True def find(x): while x != union[x]: x = union[x] return x union = list(range(len(A))) if n < w * w: for i in range(len(A)): for j in range(i+1, len(A)): if find(i) == find(j):continue if compare(A[i], A[j]): union[find(i)] = find(j) else: d = defaultdict(lambda: set()) for i, word in enumerate(A): L = list(word) for l1, l2 in combinations(range(w), 2): L[l1], L[l2] = L[l2], L[l1] d["".join(L)].add(i) L[l1], L[l2] = L[l2], L[l1] for i1, word in enumerate(A): for i2 in d[word]: union[find(i1)] = find(i2) union = [find(u) for u in union] return len(set(union))
[ "ryu071511@gmail.com" ]
ryu071511@gmail.com
cab4f24e669a87cef9633c9f0867231e26c396d9
8051c8863119bc2b5e5b3107ce9c47ab12616e63
/Python/Programmers/Level_2_더_맵게.py
bb3a43d9979c2aa6cdba8c853e1a403e60ff9b7a
[]
no_license
Sunghwan-DS/TIL
c01f6f4c84f3e2d85e16893bbe95c7f1b6270c77
6d29f6451f9b17bc0acc67de0e520f912dd0fa74
refs/heads/master
2021-07-11T16:23:58.077011
2021-03-12T02:28:26
2021-03-12T02:28:26
234,990,431
0
0
null
null
null
null
UTF-8
Python
false
false
1,525
py
# def solution(scoville, K): # if sum(scoville) < K: # return -1 # # scoville.sort() # scoville.insert(0, 0) # answer = 0 # print("초기조건:", scoville) # # while scoville[1] < K: # scoville[1], scoville[-1] = scoville[-1], scoville[1] # min_s = scoville.pop(-1) # target_idx = 1 # # # # scoville[-1] = scoville[-1] * 2 + min_s # # target_idx = len(scoville) - 1 # while True: # if scoville[target_idx] > scoville[target_idx * 2] or scoville[target_idx] > scoville[target_idx * 2 + 1]: # if scoville[target_idx * 2] >= scoville[target_idx * 2 + 1]: # scoville[target_idx], scoville[target_idx * 2 + 1] = scoville[target_idx * 2 + 1], scoville[target_idx] # target_idx = target_idx * 2 + 1 # else: # scoville[target_idx], scoville[target_idx * 2] = scoville[target_idx * 2], scoville[target_idx] # target_idx *= 2 # else: # break # answer += 1 # print(scoville) # return answer import heapq def solution(scoville, K): if sum(scoville) < K: return -1 answer = 0 scoville.sort() print(scoville) while scoville[0] < K: min_s = heapq.heappop(scoville) min2_s = heapq.heappop(scoville) heapq.heappush(scoville, min_s + min2_s * 2) answer += 1 print(scoville) return answer print(solution([1, 3], 7))
[ "jeonsung02@gmail.com" ]
jeonsung02@gmail.com
647da38fb44d8093a50e7d9b5329705dcb442bf3
a3cc7286d4a319cb76f3a44a593c4a18e5ddc104
/lib/googlecloudsdk/third_party/apis/compute/beta/compute_beta_client.py
d741004a7a50adf19f44d18a1aedd76cf241d74c
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
jordanistan/Google-Cloud-SDK
f2c6bb7abc2f33b9dfaec5de792aa1be91154099
42b9d7914c36a30d1e4b84ae2925df7edeca9962
refs/heads/master
2023-09-01T01:24:53.495537
2023-08-22T01:12:23
2023-08-22T01:12:23
127,072,491
0
1
NOASSERTION
2023-08-22T01:12:24
2018-03-28T02:31:19
Python
UTF-8
Python
false
false
455,574
py
"""Generated client library for compute version beta.""" # NOTE: This file is autogenerated and should not be edited by hand. from apitools.base.py import base_api from googlecloudsdk.third_party.apis.compute.beta import compute_beta_messages as messages class ComputeBeta(base_api.BaseApiClient): """Generated client library for service compute version beta.""" MESSAGES_MODULE = messages BASE_URL = u'https://www.googleapis.com/compute/beta/' _PACKAGE = u'compute' _SCOPES = [u'https://www.googleapis.com/auth/cloud-platform', u'https://www.googleapis.com/auth/compute', u'https://www.googleapis.com/auth/compute.readonly', u'https://www.googleapis.com/auth/devstorage.full_control', u'https://www.googleapis.com/auth/devstorage.read_only', u'https://www.googleapis.com/auth/devstorage.read_write'] _VERSION = u'beta' _CLIENT_ID = '1042881264118.apps.googleusercontent.com' _CLIENT_SECRET = 'x_Tw5K8nnjoRAqULM9PFAC2b' _USER_AGENT = 'x_Tw5K8nnjoRAqULM9PFAC2b' _CLIENT_CLASS_NAME = u'ComputeBeta' _URL_VERSION = u'beta' _API_KEY = None def __init__(self, url='', credentials=None, get_credentials=True, http=None, model=None, log_request=False, log_response=False, credentials_args=None, default_global_params=None, additional_http_headers=None): """Create a new compute handle.""" url = url or self.BASE_URL super(ComputeBeta, self).__init__( url, credentials=credentials, get_credentials=get_credentials, http=http, model=model, log_request=log_request, log_response=log_response, credentials_args=credentials_args, default_global_params=default_global_params, additional_http_headers=additional_http_headers) self.acceleratorTypes = self.AcceleratorTypesService(self) self.addresses = self.AddressesService(self) self.autoscalers = self.AutoscalersService(self) self.backendBuckets = self.BackendBucketsService(self) self.backendServices = self.BackendServicesService(self) self.diskTypes = self.DiskTypesService(self) self.disks = self.DisksService(self) self.firewalls = self.FirewallsService(self) self.forwardingRules = self.ForwardingRulesService(self) self.globalAddresses = self.GlobalAddressesService(self) self.globalForwardingRules = self.GlobalForwardingRulesService(self) self.globalOperations = self.GlobalOperationsService(self) self.healthChecks = self.HealthChecksService(self) self.httpHealthChecks = self.HttpHealthChecksService(self) self.httpsHealthChecks = self.HttpsHealthChecksService(self) self.images = self.ImagesService(self) self.instanceGroupManagers = self.InstanceGroupManagersService(self) self.instanceGroups = self.InstanceGroupsService(self) self.instanceTemplates = self.InstanceTemplatesService(self) self.instances = self.InstancesService(self) self.interconnectAttachments = self.InterconnectAttachmentsService(self) self.interconnectLocations = self.InterconnectLocationsService(self) self.interconnects = self.InterconnectsService(self) self.licenseCodes = self.LicenseCodesService(self) self.licenses = self.LicensesService(self) self.machineTypes = self.MachineTypesService(self) self.networks = self.NetworksService(self) self.projects = self.ProjectsService(self) self.regionAutoscalers = self.RegionAutoscalersService(self) self.regionBackendServices = self.RegionBackendServicesService(self) self.regionCommitments = self.RegionCommitmentsService(self) self.regionInstanceGroupManagers = self.RegionInstanceGroupManagersService(self) self.regionInstanceGroups = self.RegionInstanceGroupsService(self) self.regionOperations = self.RegionOperationsService(self) self.regions = self.RegionsService(self) self.routers = self.RoutersService(self) self.routes = self.RoutesService(self) self.securityPolicies = self.SecurityPoliciesService(self) self.snapshots = self.SnapshotsService(self) self.sslCertificates = self.SslCertificatesService(self) self.sslPolicies = self.SslPoliciesService(self) self.subnetworks = self.SubnetworksService(self) self.targetHttpProxies = self.TargetHttpProxiesService(self) self.targetHttpsProxies = self.TargetHttpsProxiesService(self) self.targetInstances = self.TargetInstancesService(self) self.targetPools = self.TargetPoolsService(self) self.targetSslProxies = self.TargetSslProxiesService(self) self.targetTcpProxies = self.TargetTcpProxiesService(self) self.targetVpnGateways = self.TargetVpnGatewaysService(self) self.urlMaps = self.UrlMapsService(self) self.vpnTunnels = self.VpnTunnelsService(self) self.zoneOperations = self.ZoneOperationsService(self) self.zones = self.ZonesService(self) class AcceleratorTypesService(base_api.BaseApiService): """Service class for the acceleratorTypes resource.""" _NAME = u'acceleratorTypes' def __init__(self, client): super(ComputeBeta.AcceleratorTypesService, self).__init__(client) self._upload_configs = { } def AggregatedList(self, request, global_params=None): """Retrieves an aggregated list of accelerator types. Args: request: (ComputeAcceleratorTypesAggregatedListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (AcceleratorTypeAggregatedList) The response message. """ config = self.GetMethodConfig('AggregatedList') return self._RunMethod( config, request, global_params=global_params) AggregatedList.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.acceleratorTypes.aggregatedList', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/aggregated/acceleratorTypes', request_field='', request_type_name=u'ComputeAcceleratorTypesAggregatedListRequest', response_type_name=u'AcceleratorTypeAggregatedList', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified accelerator type. Get a list of available accelerator types by making a list() request. Args: request: (ComputeAcceleratorTypesGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (AcceleratorType) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.acceleratorTypes.get', ordered_params=[u'project', u'zone', u'acceleratorType'], path_params=[u'acceleratorType', u'project', u'zone'], query_params=[], relative_path=u'projects/{project}/zones/{zone}/acceleratorTypes/{acceleratorType}', request_field='', request_type_name=u'ComputeAcceleratorTypesGetRequest', response_type_name=u'AcceleratorType', supports_download=False, ) def List(self, request, global_params=None): """Retrieves a list of accelerator types available to the specified project. Args: request: (ComputeAcceleratorTypesListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (AcceleratorTypeList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.acceleratorTypes.list', ordered_params=[u'project', u'zone'], path_params=[u'project', u'zone'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/zones/{zone}/acceleratorTypes', request_field='', request_type_name=u'ComputeAcceleratorTypesListRequest', response_type_name=u'AcceleratorTypeList', supports_download=False, ) class AddressesService(base_api.BaseApiService): """Service class for the addresses resource.""" _NAME = u'addresses' def __init__(self, client): super(ComputeBeta.AddressesService, self).__init__(client) self._upload_configs = { } def AggregatedList(self, request, global_params=None): """Retrieves an aggregated list of addresses. Args: request: (ComputeAddressesAggregatedListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (AddressAggregatedList) The response message. """ config = self.GetMethodConfig('AggregatedList') return self._RunMethod( config, request, global_params=global_params) AggregatedList.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.addresses.aggregatedList', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/aggregated/addresses', request_field='', request_type_name=u'ComputeAddressesAggregatedListRequest', response_type_name=u'AddressAggregatedList', supports_download=False, ) def Delete(self, request, global_params=None): """Deletes the specified address resource. Args: request: (ComputeAddressesDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.addresses.delete', ordered_params=[u'project', u'region', u'address'], path_params=[u'address', u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/addresses/{address}', request_field='', request_type_name=u'ComputeAddressesDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified address resource. Args: request: (ComputeAddressesGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Address) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.addresses.get', ordered_params=[u'project', u'region', u'address'], path_params=[u'address', u'project', u'region'], query_params=[], relative_path=u'projects/{project}/regions/{region}/addresses/{address}', request_field='', request_type_name=u'ComputeAddressesGetRequest', response_type_name=u'Address', supports_download=False, ) def Insert(self, request, global_params=None): """Creates an address resource in the specified project using the data included in the request. Args: request: (ComputeAddressesInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.addresses.insert', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/addresses', request_field=u'address', request_type_name=u'ComputeAddressesInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves a list of addresses contained within the specified region. Args: request: (ComputeAddressesListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (AddressList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.addresses.list', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/regions/{region}/addresses', request_field='', request_type_name=u'ComputeAddressesListRequest', response_type_name=u'AddressList', supports_download=False, ) def SetLabels(self, request, global_params=None): """Sets the labels on an Address. To learn more about labels, read the Labeling Resources documentation. Args: request: (ComputeAddressesSetLabelsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetLabels') return self._RunMethod( config, request, global_params=global_params) SetLabels.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.addresses.setLabels', ordered_params=[u'project', u'region', u'resource'], path_params=[u'project', u'region', u'resource'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/addresses/{resource}/setLabels', request_field=u'regionSetLabelsRequest', request_type_name=u'ComputeAddressesSetLabelsRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeAddressesTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.addresses.testIamPermissions', ordered_params=[u'project', u'region', u'resource'], path_params=[u'project', u'region', u'resource'], query_params=[], relative_path=u'projects/{project}/regions/{region}/addresses/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeAddressesTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class AutoscalersService(base_api.BaseApiService): """Service class for the autoscalers resource.""" _NAME = u'autoscalers' def __init__(self, client): super(ComputeBeta.AutoscalersService, self).__init__(client) self._upload_configs = { } def AggregatedList(self, request, global_params=None): """Retrieves an aggregated list of autoscalers. Args: request: (ComputeAutoscalersAggregatedListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (AutoscalerAggregatedList) The response message. """ config = self.GetMethodConfig('AggregatedList') return self._RunMethod( config, request, global_params=global_params) AggregatedList.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.autoscalers.aggregatedList', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/aggregated/autoscalers', request_field='', request_type_name=u'ComputeAutoscalersAggregatedListRequest', response_type_name=u'AutoscalerAggregatedList', supports_download=False, ) def Delete(self, request, global_params=None): """Deletes the specified autoscaler. Args: request: (ComputeAutoscalersDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.autoscalers.delete', ordered_params=[u'project', u'zone', u'autoscaler'], path_params=[u'autoscaler', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/autoscalers/{autoscaler}', request_field='', request_type_name=u'ComputeAutoscalersDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified autoscaler resource. Get a list of available autoscalers by making a list() request. Args: request: (ComputeAutoscalersGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Autoscaler) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.autoscalers.get', ordered_params=[u'project', u'zone', u'autoscaler'], path_params=[u'autoscaler', u'project', u'zone'], query_params=[], relative_path=u'projects/{project}/zones/{zone}/autoscalers/{autoscaler}', request_field='', request_type_name=u'ComputeAutoscalersGetRequest', response_type_name=u'Autoscaler', supports_download=False, ) def Insert(self, request, global_params=None): """Creates an autoscaler in the specified project using the data included in the request. Args: request: (ComputeAutoscalersInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.autoscalers.insert', ordered_params=[u'project', u'zone'], path_params=[u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/autoscalers', request_field=u'autoscaler', request_type_name=u'ComputeAutoscalersInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves a list of autoscalers contained within the specified zone. Args: request: (ComputeAutoscalersListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (AutoscalerList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.autoscalers.list', ordered_params=[u'project', u'zone'], path_params=[u'project', u'zone'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/zones/{zone}/autoscalers', request_field='', request_type_name=u'ComputeAutoscalersListRequest', response_type_name=u'AutoscalerList', supports_download=False, ) def Patch(self, request, global_params=None): """Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Args: request: (ComputeAutoscalersPatchRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Patch') return self._RunMethod( config, request, global_params=global_params) Patch.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PATCH', method_id=u'compute.autoscalers.patch', ordered_params=[u'project', u'zone'], path_params=[u'project', u'zone'], query_params=[u'autoscaler', u'requestId'], relative_path=u'projects/{project}/zones/{zone}/autoscalers', request_field=u'autoscalerResource', request_type_name=u'ComputeAutoscalersPatchRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeAutoscalersTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.autoscalers.testIamPermissions', ordered_params=[u'project', u'zone', u'resource'], path_params=[u'project', u'resource', u'zone'], query_params=[], relative_path=u'projects/{project}/zones/{zone}/autoscalers/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeAutoscalersTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) def Update(self, request, global_params=None): """Updates an autoscaler in the specified project using the data included in the request. Args: request: (ComputeAutoscalersUpdateRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Update') return self._RunMethod( config, request, global_params=global_params) Update.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PUT', method_id=u'compute.autoscalers.update', ordered_params=[u'project', u'zone'], path_params=[u'project', u'zone'], query_params=[u'autoscaler', u'requestId'], relative_path=u'projects/{project}/zones/{zone}/autoscalers', request_field=u'autoscalerResource', request_type_name=u'ComputeAutoscalersUpdateRequest', response_type_name=u'Operation', supports_download=False, ) class BackendBucketsService(base_api.BaseApiService): """Service class for the backendBuckets resource.""" _NAME = u'backendBuckets' def __init__(self, client): super(ComputeBeta.BackendBucketsService, self).__init__(client) self._upload_configs = { } def AddSignedUrlKey(self, request, global_params=None): """Adds the given Signed URL Key to the backend bucket. Args: request: (ComputeBackendBucketsAddSignedUrlKeyRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('AddSignedUrlKey') return self._RunMethod( config, request, global_params=global_params) AddSignedUrlKey.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.backendBuckets.addSignedUrlKey', ordered_params=[u'project', u'backendBucket'], path_params=[u'backendBucket', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/backendBuckets/{backendBucket}/addSignedUrlKey', request_field=u'signedUrlKey', request_type_name=u'ComputeBackendBucketsAddSignedUrlKeyRequest', response_type_name=u'Operation', supports_download=False, ) def Delete(self, request, global_params=None): """Deletes the specified BackendBucket resource. Args: request: (ComputeBackendBucketsDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.backendBuckets.delete', ordered_params=[u'project', u'backendBucket'], path_params=[u'backendBucket', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/backendBuckets/{backendBucket}', request_field='', request_type_name=u'ComputeBackendBucketsDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def DeleteSignedUrlKey(self, request, global_params=None): """Deletes the given Signed URL Key from the backend bucket. Args: request: (ComputeBackendBucketsDeleteSignedUrlKeyRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('DeleteSignedUrlKey') return self._RunMethod( config, request, global_params=global_params) DeleteSignedUrlKey.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.backendBuckets.deleteSignedUrlKey', ordered_params=[u'project', u'backendBucket', u'keyName'], path_params=[u'backendBucket', u'project'], query_params=[u'keyName', u'requestId'], relative_path=u'projects/{project}/global/backendBuckets/{backendBucket}/deleteSignedUrlKey', request_field='', request_type_name=u'ComputeBackendBucketsDeleteSignedUrlKeyRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified BackendBucket resource. Get a list of available backend buckets by making a list() request. Args: request: (ComputeBackendBucketsGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (BackendBucket) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.backendBuckets.get', ordered_params=[u'project', u'backendBucket'], path_params=[u'backendBucket', u'project'], query_params=[], relative_path=u'projects/{project}/global/backendBuckets/{backendBucket}', request_field='', request_type_name=u'ComputeBackendBucketsGetRequest', response_type_name=u'BackendBucket', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a BackendBucket resource in the specified project using the data included in the request. Args: request: (ComputeBackendBucketsInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.backendBuckets.insert', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/backendBuckets', request_field=u'backendBucket', request_type_name=u'ComputeBackendBucketsInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of BackendBucket resources available to the specified project. Args: request: (ComputeBackendBucketsListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (BackendBucketList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.backendBuckets.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/backendBuckets', request_field='', request_type_name=u'ComputeBackendBucketsListRequest', response_type_name=u'BackendBucketList', supports_download=False, ) def Patch(self, request, global_params=None): """Updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Args: request: (ComputeBackendBucketsPatchRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Patch') return self._RunMethod( config, request, global_params=global_params) Patch.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PATCH', method_id=u'compute.backendBuckets.patch', ordered_params=[u'project', u'backendBucket'], path_params=[u'backendBucket', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/backendBuckets/{backendBucket}', request_field=u'backendBucketResource', request_type_name=u'ComputeBackendBucketsPatchRequest', response_type_name=u'Operation', supports_download=False, ) def Update(self, request, global_params=None): """Updates the specified BackendBucket resource with the data included in the request. Args: request: (ComputeBackendBucketsUpdateRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Update') return self._RunMethod( config, request, global_params=global_params) Update.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PUT', method_id=u'compute.backendBuckets.update', ordered_params=[u'project', u'backendBucket'], path_params=[u'backendBucket', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/backendBuckets/{backendBucket}', request_field=u'backendBucketResource', request_type_name=u'ComputeBackendBucketsUpdateRequest', response_type_name=u'Operation', supports_download=False, ) class BackendServicesService(base_api.BaseApiService): """Service class for the backendServices resource.""" _NAME = u'backendServices' def __init__(self, client): super(ComputeBeta.BackendServicesService, self).__init__(client) self._upload_configs = { } def AddSignedUrlKey(self, request, global_params=None): """Adds the given Signed URL Key to the specified backend service. Args: request: (ComputeBackendServicesAddSignedUrlKeyRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('AddSignedUrlKey') return self._RunMethod( config, request, global_params=global_params) AddSignedUrlKey.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.backendServices.addSignedUrlKey', ordered_params=[u'project', u'backendService'], path_params=[u'backendService', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/backendServices/{backendService}/addSignedUrlKey', request_field=u'signedUrlKey', request_type_name=u'ComputeBackendServicesAddSignedUrlKeyRequest', response_type_name=u'Operation', supports_download=False, ) def AggregatedList(self, request, global_params=None): """Retrieves the list of all BackendService resources, regional and global, available to the specified project. Args: request: (ComputeBackendServicesAggregatedListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (BackendServiceAggregatedList) The response message. """ config = self.GetMethodConfig('AggregatedList') return self._RunMethod( config, request, global_params=global_params) AggregatedList.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.backendServices.aggregatedList', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/aggregated/backendServices', request_field='', request_type_name=u'ComputeBackendServicesAggregatedListRequest', response_type_name=u'BackendServiceAggregatedList', supports_download=False, ) def Delete(self, request, global_params=None): """Deletes the specified BackendService resource. Args: request: (ComputeBackendServicesDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.backendServices.delete', ordered_params=[u'project', u'backendService'], path_params=[u'backendService', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/backendServices/{backendService}', request_field='', request_type_name=u'ComputeBackendServicesDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def DeleteSignedUrlKey(self, request, global_params=None): """Deletes the given Signed URL Key from the specified backend service. Args: request: (ComputeBackendServicesDeleteSignedUrlKeyRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('DeleteSignedUrlKey') return self._RunMethod( config, request, global_params=global_params) DeleteSignedUrlKey.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.backendServices.deleteSignedUrlKey', ordered_params=[u'project', u'backendService', u'keyName'], path_params=[u'backendService', u'project'], query_params=[u'keyName', u'requestId'], relative_path=u'projects/{project}/global/backendServices/{backendService}/deleteSignedUrlKey', request_field='', request_type_name=u'ComputeBackendServicesDeleteSignedUrlKeyRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified BackendService resource. Get a list of available backend services by making a list() request. Args: request: (ComputeBackendServicesGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (BackendService) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.backendServices.get', ordered_params=[u'project', u'backendService'], path_params=[u'backendService', u'project'], query_params=[], relative_path=u'projects/{project}/global/backendServices/{backendService}', request_field='', request_type_name=u'ComputeBackendServicesGetRequest', response_type_name=u'BackendService', supports_download=False, ) def GetHealth(self, request, global_params=None): """Gets the most recent health check results for this BackendService. Args: request: (ComputeBackendServicesGetHealthRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (BackendServiceGroupHealth) The response message. """ config = self.GetMethodConfig('GetHealth') return self._RunMethod( config, request, global_params=global_params) GetHealth.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.backendServices.getHealth', ordered_params=[u'project', u'backendService'], path_params=[u'backendService', u'project'], query_params=[], relative_path=u'projects/{project}/global/backendServices/{backendService}/getHealth', request_field=u'resourceGroupReference', request_type_name=u'ComputeBackendServicesGetHealthRequest', response_type_name=u'BackendServiceGroupHealth', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a backend service. Read Restrictions and Guidelines for more information. Args: request: (ComputeBackendServicesInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.backendServices.insert', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/backendServices', request_field=u'backendService', request_type_name=u'ComputeBackendServicesInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of BackendService resources available to the specified project. Args: request: (ComputeBackendServicesListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (BackendServiceList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.backendServices.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/backendServices', request_field='', request_type_name=u'ComputeBackendServicesListRequest', response_type_name=u'BackendServiceList', supports_download=False, ) def Patch(self, request, global_params=None): """Patches the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Args: request: (ComputeBackendServicesPatchRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Patch') return self._RunMethod( config, request, global_params=global_params) Patch.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PATCH', method_id=u'compute.backendServices.patch', ordered_params=[u'project', u'backendService'], path_params=[u'backendService', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/backendServices/{backendService}', request_field=u'backendServiceResource', request_type_name=u'ComputeBackendServicesPatchRequest', response_type_name=u'Operation', supports_download=False, ) def SetSecurityPolicy(self, request, global_params=None): """Sets the security policy for the specified backend service. Args: request: (ComputeBackendServicesSetSecurityPolicyRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetSecurityPolicy') return self._RunMethod( config, request, global_params=global_params) SetSecurityPolicy.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.backendServices.setSecurityPolicy', ordered_params=[u'project', u'backendService'], path_params=[u'backendService', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/backendServices/{backendService}/setSecurityPolicy', request_field=u'securityPolicyReference', request_type_name=u'ComputeBackendServicesSetSecurityPolicyRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeBackendServicesTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.backendServices.testIamPermissions', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/backendServices/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeBackendServicesTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) def Update(self, request, global_params=None): """Updates the specified BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. Args: request: (ComputeBackendServicesUpdateRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Update') return self._RunMethod( config, request, global_params=global_params) Update.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PUT', method_id=u'compute.backendServices.update', ordered_params=[u'project', u'backendService'], path_params=[u'backendService', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/backendServices/{backendService}', request_field=u'backendServiceResource', request_type_name=u'ComputeBackendServicesUpdateRequest', response_type_name=u'Operation', supports_download=False, ) class DiskTypesService(base_api.BaseApiService): """Service class for the diskTypes resource.""" _NAME = u'diskTypes' def __init__(self, client): super(ComputeBeta.DiskTypesService, self).__init__(client) self._upload_configs = { } def AggregatedList(self, request, global_params=None): """Retrieves an aggregated list of disk types. Args: request: (ComputeDiskTypesAggregatedListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (DiskTypeAggregatedList) The response message. """ config = self.GetMethodConfig('AggregatedList') return self._RunMethod( config, request, global_params=global_params) AggregatedList.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.diskTypes.aggregatedList', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/aggregated/diskTypes', request_field='', request_type_name=u'ComputeDiskTypesAggregatedListRequest', response_type_name=u'DiskTypeAggregatedList', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified disk type. Get a list of available disk types by making a list() request. Args: request: (ComputeDiskTypesGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (DiskType) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.diskTypes.get', ordered_params=[u'project', u'zone', u'diskType'], path_params=[u'diskType', u'project', u'zone'], query_params=[], relative_path=u'projects/{project}/zones/{zone}/diskTypes/{diskType}', request_field='', request_type_name=u'ComputeDiskTypesGetRequest', response_type_name=u'DiskType', supports_download=False, ) def List(self, request, global_params=None): """Retrieves a list of disk types available to the specified project. Args: request: (ComputeDiskTypesListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (DiskTypeList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.diskTypes.list', ordered_params=[u'project', u'zone'], path_params=[u'project', u'zone'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/zones/{zone}/diskTypes', request_field='', request_type_name=u'ComputeDiskTypesListRequest', response_type_name=u'DiskTypeList', supports_download=False, ) class DisksService(base_api.BaseApiService): """Service class for the disks resource.""" _NAME = u'disks' def __init__(self, client): super(ComputeBeta.DisksService, self).__init__(client) self._upload_configs = { } def AggregatedList(self, request, global_params=None): """Retrieves an aggregated list of persistent disks. Args: request: (ComputeDisksAggregatedListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (DiskAggregatedList) The response message. """ config = self.GetMethodConfig('AggregatedList') return self._RunMethod( config, request, global_params=global_params) AggregatedList.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.disks.aggregatedList', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/aggregated/disks', request_field='', request_type_name=u'ComputeDisksAggregatedListRequest', response_type_name=u'DiskAggregatedList', supports_download=False, ) def CreateSnapshot(self, request, global_params=None): """Creates a snapshot of a specified persistent disk. Args: request: (ComputeDisksCreateSnapshotRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('CreateSnapshot') return self._RunMethod( config, request, global_params=global_params) CreateSnapshot.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.disks.createSnapshot', ordered_params=[u'project', u'zone', u'disk'], path_params=[u'disk', u'project', u'zone'], query_params=[u'guestFlush', u'requestId'], relative_path=u'projects/{project}/zones/{zone}/disks/{disk}/createSnapshot', request_field=u'snapshot', request_type_name=u'ComputeDisksCreateSnapshotRequest', response_type_name=u'Operation', supports_download=False, ) def Delete(self, request, global_params=None): """Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots. Args: request: (ComputeDisksDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.disks.delete', ordered_params=[u'project', u'zone', u'disk'], path_params=[u'disk', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/disks/{disk}', request_field='', request_type_name=u'ComputeDisksDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns a specified persistent disk. Get a list of available persistent disks by making a list() request. Args: request: (ComputeDisksGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Disk) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.disks.get', ordered_params=[u'project', u'zone', u'disk'], path_params=[u'disk', u'project', u'zone'], query_params=[], relative_path=u'projects/{project}/zones/{zone}/disks/{disk}', request_field='', request_type_name=u'ComputeDisksGetRequest', response_type_name=u'Disk', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a persistent disk in the specified project using the data in the request. You can create a disk with a sourceImage, a sourceSnapshot, or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property. Args: request: (ComputeDisksInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.disks.insert', ordered_params=[u'project', u'zone'], path_params=[u'project', u'zone'], query_params=[u'requestId', u'sourceImage'], relative_path=u'projects/{project}/zones/{zone}/disks', request_field=u'disk', request_type_name=u'ComputeDisksInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves a list of persistent disks contained within the specified zone. Args: request: (ComputeDisksListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (DiskList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.disks.list', ordered_params=[u'project', u'zone'], path_params=[u'project', u'zone'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/zones/{zone}/disks', request_field='', request_type_name=u'ComputeDisksListRequest', response_type_name=u'DiskList', supports_download=False, ) def Resize(self, request, global_params=None): """Resizes the specified persistent disk. You can only increase the size of the disk. Args: request: (ComputeDisksResizeRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Resize') return self._RunMethod( config, request, global_params=global_params) Resize.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.disks.resize', ordered_params=[u'project', u'zone', u'disk'], path_params=[u'disk', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/disks/{disk}/resize', request_field=u'disksResizeRequest', request_type_name=u'ComputeDisksResizeRequest', response_type_name=u'Operation', supports_download=False, ) def SetLabels(self, request, global_params=None): """Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation. Args: request: (ComputeDisksSetLabelsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetLabels') return self._RunMethod( config, request, global_params=global_params) SetLabels.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.disks.setLabels', ordered_params=[u'project', u'zone', u'resource'], path_params=[u'project', u'resource', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/disks/{resource}/setLabels', request_field=u'zoneSetLabelsRequest', request_type_name=u'ComputeDisksSetLabelsRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeDisksTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.disks.testIamPermissions', ordered_params=[u'project', u'zone', u'resource'], path_params=[u'project', u'resource', u'zone'], query_params=[], relative_path=u'projects/{project}/zones/{zone}/disks/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeDisksTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class FirewallsService(base_api.BaseApiService): """Service class for the firewalls resource.""" _NAME = u'firewalls' def __init__(self, client): super(ComputeBeta.FirewallsService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): """Deletes the specified firewall. Args: request: (ComputeFirewallsDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.firewalls.delete', ordered_params=[u'project', u'firewall'], path_params=[u'firewall', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/firewalls/{firewall}', request_field='', request_type_name=u'ComputeFirewallsDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified firewall. Args: request: (ComputeFirewallsGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Firewall) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.firewalls.get', ordered_params=[u'project', u'firewall'], path_params=[u'firewall', u'project'], query_params=[], relative_path=u'projects/{project}/global/firewalls/{firewall}', request_field='', request_type_name=u'ComputeFirewallsGetRequest', response_type_name=u'Firewall', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a firewall rule in the specified project using the data included in the request. Args: request: (ComputeFirewallsInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.firewalls.insert', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/firewalls', request_field=u'firewall', request_type_name=u'ComputeFirewallsInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of firewall rules available to the specified project. Args: request: (ComputeFirewallsListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (FirewallList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.firewalls.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/firewalls', request_field='', request_type_name=u'ComputeFirewallsListRequest', response_type_name=u'FirewallList', supports_download=False, ) def Patch(self, request, global_params=None): """Updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Args: request: (ComputeFirewallsPatchRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Patch') return self._RunMethod( config, request, global_params=global_params) Patch.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PATCH', method_id=u'compute.firewalls.patch', ordered_params=[u'project', u'firewall'], path_params=[u'firewall', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/firewalls/{firewall}', request_field=u'firewallResource', request_type_name=u'ComputeFirewallsPatchRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeFirewallsTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.firewalls.testIamPermissions', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/firewalls/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeFirewallsTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) def Update(self, request, global_params=None): """Updates the specified firewall rule with the data included in the request. The PUT method can only update the following fields of firewall rule: allowed, description, sourceRanges, sourceTags, targetTags. Args: request: (ComputeFirewallsUpdateRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Update') return self._RunMethod( config, request, global_params=global_params) Update.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PUT', method_id=u'compute.firewalls.update', ordered_params=[u'project', u'firewall'], path_params=[u'firewall', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/firewalls/{firewall}', request_field=u'firewallResource', request_type_name=u'ComputeFirewallsUpdateRequest', response_type_name=u'Operation', supports_download=False, ) class ForwardingRulesService(base_api.BaseApiService): """Service class for the forwardingRules resource.""" _NAME = u'forwardingRules' def __init__(self, client): super(ComputeBeta.ForwardingRulesService, self).__init__(client) self._upload_configs = { } def AggregatedList(self, request, global_params=None): """Retrieves an aggregated list of forwarding rules. Args: request: (ComputeForwardingRulesAggregatedListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (ForwardingRuleAggregatedList) The response message. """ config = self.GetMethodConfig('AggregatedList') return self._RunMethod( config, request, global_params=global_params) AggregatedList.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.forwardingRules.aggregatedList', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/aggregated/forwardingRules', request_field='', request_type_name=u'ComputeForwardingRulesAggregatedListRequest', response_type_name=u'ForwardingRuleAggregatedList', supports_download=False, ) def Delete(self, request, global_params=None): """Deletes the specified ForwardingRule resource. Args: request: (ComputeForwardingRulesDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.forwardingRules.delete', ordered_params=[u'project', u'region', u'forwardingRule'], path_params=[u'forwardingRule', u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/forwardingRules/{forwardingRule}', request_field='', request_type_name=u'ComputeForwardingRulesDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified ForwardingRule resource. Args: request: (ComputeForwardingRulesGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (ForwardingRule) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.forwardingRules.get', ordered_params=[u'project', u'region', u'forwardingRule'], path_params=[u'forwardingRule', u'project', u'region'], query_params=[], relative_path=u'projects/{project}/regions/{region}/forwardingRules/{forwardingRule}', request_field='', request_type_name=u'ComputeForwardingRulesGetRequest', response_type_name=u'ForwardingRule', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a ForwardingRule resource in the specified project and region using the data included in the request. Args: request: (ComputeForwardingRulesInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.forwardingRules.insert', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/forwardingRules', request_field=u'forwardingRule', request_type_name=u'ComputeForwardingRulesInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves a list of ForwardingRule resources available to the specified project and region. Args: request: (ComputeForwardingRulesListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (ForwardingRuleList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.forwardingRules.list', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/regions/{region}/forwardingRules', request_field='', request_type_name=u'ComputeForwardingRulesListRequest', response_type_name=u'ForwardingRuleList', supports_download=False, ) def SetLabels(self, request, global_params=None): """Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation. Args: request: (ComputeForwardingRulesSetLabelsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetLabels') return self._RunMethod( config, request, global_params=global_params) SetLabels.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.forwardingRules.setLabels', ordered_params=[u'project', u'region', u'resource'], path_params=[u'project', u'region', u'resource'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/forwardingRules/{resource}/setLabels', request_field=u'regionSetLabelsRequest', request_type_name=u'ComputeForwardingRulesSetLabelsRequest', response_type_name=u'Operation', supports_download=False, ) def SetTarget(self, request, global_params=None): """Changes target URL for forwarding rule. The new target should be of the same type as the old target. Args: request: (ComputeForwardingRulesSetTargetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetTarget') return self._RunMethod( config, request, global_params=global_params) SetTarget.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.forwardingRules.setTarget', ordered_params=[u'project', u'region', u'forwardingRule'], path_params=[u'forwardingRule', u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget', request_field=u'targetReference', request_type_name=u'ComputeForwardingRulesSetTargetRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeForwardingRulesTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.forwardingRules.testIamPermissions', ordered_params=[u'project', u'region', u'resource'], path_params=[u'project', u'region', u'resource'], query_params=[], relative_path=u'projects/{project}/regions/{region}/forwardingRules/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeForwardingRulesTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class GlobalAddressesService(base_api.BaseApiService): """Service class for the globalAddresses resource.""" _NAME = u'globalAddresses' def __init__(self, client): super(ComputeBeta.GlobalAddressesService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): """Deletes the specified address resource. Args: request: (ComputeGlobalAddressesDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.globalAddresses.delete', ordered_params=[u'project', u'address'], path_params=[u'address', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/addresses/{address}', request_field='', request_type_name=u'ComputeGlobalAddressesDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified address resource. Get a list of available addresses by making a list() request. Args: request: (ComputeGlobalAddressesGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Address) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.globalAddresses.get', ordered_params=[u'project', u'address'], path_params=[u'address', u'project'], query_params=[], relative_path=u'projects/{project}/global/addresses/{address}', request_field='', request_type_name=u'ComputeGlobalAddressesGetRequest', response_type_name=u'Address', supports_download=False, ) def Insert(self, request, global_params=None): """Creates an address resource in the specified project using the data included in the request. Args: request: (ComputeGlobalAddressesInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.globalAddresses.insert', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/addresses', request_field=u'address', request_type_name=u'ComputeGlobalAddressesInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves a list of global addresses. Args: request: (ComputeGlobalAddressesListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (AddressList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.globalAddresses.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/addresses', request_field='', request_type_name=u'ComputeGlobalAddressesListRequest', response_type_name=u'AddressList', supports_download=False, ) def SetLabels(self, request, global_params=None): """Sets the labels on a GlobalAddress. To learn more about labels, read the Labeling Resources documentation. Args: request: (ComputeGlobalAddressesSetLabelsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetLabels') return self._RunMethod( config, request, global_params=global_params) SetLabels.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.globalAddresses.setLabels', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/addresses/{resource}/setLabels', request_field=u'globalSetLabelsRequest', request_type_name=u'ComputeGlobalAddressesSetLabelsRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeGlobalAddressesTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.globalAddresses.testIamPermissions', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/addresses/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeGlobalAddressesTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class GlobalForwardingRulesService(base_api.BaseApiService): """Service class for the globalForwardingRules resource.""" _NAME = u'globalForwardingRules' def __init__(self, client): super(ComputeBeta.GlobalForwardingRulesService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): """Deletes the specified GlobalForwardingRule resource. Args: request: (ComputeGlobalForwardingRulesDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.globalForwardingRules.delete', ordered_params=[u'project', u'forwardingRule'], path_params=[u'forwardingRule', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/forwardingRules/{forwardingRule}', request_field='', request_type_name=u'ComputeGlobalForwardingRulesDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified GlobalForwardingRule resource. Get a list of available forwarding rules by making a list() request. Args: request: (ComputeGlobalForwardingRulesGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (ForwardingRule) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.globalForwardingRules.get', ordered_params=[u'project', u'forwardingRule'], path_params=[u'forwardingRule', u'project'], query_params=[], relative_path=u'projects/{project}/global/forwardingRules/{forwardingRule}', request_field='', request_type_name=u'ComputeGlobalForwardingRulesGetRequest', response_type_name=u'ForwardingRule', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a GlobalForwardingRule resource in the specified project using the data included in the request. Args: request: (ComputeGlobalForwardingRulesInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.globalForwardingRules.insert', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/forwardingRules', request_field=u'forwardingRule', request_type_name=u'ComputeGlobalForwardingRulesInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves a list of GlobalForwardingRule resources available to the specified project. Args: request: (ComputeGlobalForwardingRulesListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (ForwardingRuleList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.globalForwardingRules.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/forwardingRules', request_field='', request_type_name=u'ComputeGlobalForwardingRulesListRequest', response_type_name=u'ForwardingRuleList', supports_download=False, ) def SetLabels(self, request, global_params=None): """Sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation. Args: request: (ComputeGlobalForwardingRulesSetLabelsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetLabels') return self._RunMethod( config, request, global_params=global_params) SetLabels.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.globalForwardingRules.setLabels', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/forwardingRules/{resource}/setLabels', request_field=u'globalSetLabelsRequest', request_type_name=u'ComputeGlobalForwardingRulesSetLabelsRequest', response_type_name=u'Operation', supports_download=False, ) def SetTarget(self, request, global_params=None): """Changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target. Args: request: (ComputeGlobalForwardingRulesSetTargetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetTarget') return self._RunMethod( config, request, global_params=global_params) SetTarget.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.globalForwardingRules.setTarget', ordered_params=[u'project', u'forwardingRule'], path_params=[u'forwardingRule', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/forwardingRules/{forwardingRule}/setTarget', request_field=u'targetReference', request_type_name=u'ComputeGlobalForwardingRulesSetTargetRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeGlobalForwardingRulesTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.globalForwardingRules.testIamPermissions', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/forwardingRules/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeGlobalForwardingRulesTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class GlobalOperationsService(base_api.BaseApiService): """Service class for the globalOperations resource.""" _NAME = u'globalOperations' def __init__(self, client): super(ComputeBeta.GlobalOperationsService, self).__init__(client) self._upload_configs = { } def AggregatedList(self, request, global_params=None): """Retrieves an aggregated list of all operations. Args: request: (ComputeGlobalOperationsAggregatedListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (OperationAggregatedList) The response message. """ config = self.GetMethodConfig('AggregatedList') return self._RunMethod( config, request, global_params=global_params) AggregatedList.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.globalOperations.aggregatedList', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/aggregated/operations', request_field='', request_type_name=u'ComputeGlobalOperationsAggregatedListRequest', response_type_name=u'OperationAggregatedList', supports_download=False, ) def Delete(self, request, global_params=None): """Deletes the specified Operations resource. Args: request: (ComputeGlobalOperationsDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (ComputeGlobalOperationsDeleteResponse) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.globalOperations.delete', ordered_params=[u'project', u'operation'], path_params=[u'operation', u'project'], query_params=[], relative_path=u'projects/{project}/global/operations/{operation}', request_field='', request_type_name=u'ComputeGlobalOperationsDeleteRequest', response_type_name=u'ComputeGlobalOperationsDeleteResponse', supports_download=False, ) def Get(self, request, global_params=None): """Retrieves the specified Operations resource. Get a list of operations by making a list() request. Args: request: (ComputeGlobalOperationsGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.globalOperations.get', ordered_params=[u'project', u'operation'], path_params=[u'operation', u'project'], query_params=[], relative_path=u'projects/{project}/global/operations/{operation}', request_field='', request_type_name=u'ComputeGlobalOperationsGetRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves a list of Operation resources contained within the specified project. Args: request: (ComputeGlobalOperationsListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (OperationList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.globalOperations.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/operations', request_field='', request_type_name=u'ComputeGlobalOperationsListRequest', response_type_name=u'OperationList', supports_download=False, ) class HealthChecksService(base_api.BaseApiService): """Service class for the healthChecks resource.""" _NAME = u'healthChecks' def __init__(self, client): super(ComputeBeta.HealthChecksService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): """Deletes the specified HealthCheck resource. Args: request: (ComputeHealthChecksDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.healthChecks.delete', ordered_params=[u'project', u'healthCheck'], path_params=[u'healthCheck', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/healthChecks/{healthCheck}', request_field='', request_type_name=u'ComputeHealthChecksDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified HealthCheck resource. Get a list of available health checks by making a list() request. Args: request: (ComputeHealthChecksGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (HealthCheck) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.healthChecks.get', ordered_params=[u'project', u'healthCheck'], path_params=[u'healthCheck', u'project'], query_params=[], relative_path=u'projects/{project}/global/healthChecks/{healthCheck}', request_field='', request_type_name=u'ComputeHealthChecksGetRequest', response_type_name=u'HealthCheck', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a HealthCheck resource in the specified project using the data included in the request. Args: request: (ComputeHealthChecksInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.healthChecks.insert', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/healthChecks', request_field=u'healthCheck', request_type_name=u'ComputeHealthChecksInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of HealthCheck resources available to the specified project. Args: request: (ComputeHealthChecksListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (HealthCheckList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.healthChecks.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/healthChecks', request_field='', request_type_name=u'ComputeHealthChecksListRequest', response_type_name=u'HealthCheckList', supports_download=False, ) def Patch(self, request, global_params=None): """Updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Args: request: (ComputeHealthChecksPatchRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Patch') return self._RunMethod( config, request, global_params=global_params) Patch.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PATCH', method_id=u'compute.healthChecks.patch', ordered_params=[u'project', u'healthCheck'], path_params=[u'healthCheck', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/healthChecks/{healthCheck}', request_field=u'healthCheckResource', request_type_name=u'ComputeHealthChecksPatchRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeHealthChecksTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.healthChecks.testIamPermissions', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/healthChecks/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeHealthChecksTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) def Update(self, request, global_params=None): """Updates a HealthCheck resource in the specified project using the data included in the request. Args: request: (ComputeHealthChecksUpdateRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Update') return self._RunMethod( config, request, global_params=global_params) Update.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PUT', method_id=u'compute.healthChecks.update', ordered_params=[u'project', u'healthCheck'], path_params=[u'healthCheck', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/healthChecks/{healthCheck}', request_field=u'healthCheckResource', request_type_name=u'ComputeHealthChecksUpdateRequest', response_type_name=u'Operation', supports_download=False, ) class HttpHealthChecksService(base_api.BaseApiService): """Service class for the httpHealthChecks resource.""" _NAME = u'httpHealthChecks' def __init__(self, client): super(ComputeBeta.HttpHealthChecksService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): """Deletes the specified HttpHealthCheck resource. Args: request: (ComputeHttpHealthChecksDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.httpHealthChecks.delete', ordered_params=[u'project', u'httpHealthCheck'], path_params=[u'httpHealthCheck', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/httpHealthChecks/{httpHealthCheck}', request_field='', request_type_name=u'ComputeHttpHealthChecksDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified HttpHealthCheck resource. Get a list of available HTTP health checks by making a list() request. Args: request: (ComputeHttpHealthChecksGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (HttpHealthCheck) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.httpHealthChecks.get', ordered_params=[u'project', u'httpHealthCheck'], path_params=[u'httpHealthCheck', u'project'], query_params=[], relative_path=u'projects/{project}/global/httpHealthChecks/{httpHealthCheck}', request_field='', request_type_name=u'ComputeHttpHealthChecksGetRequest', response_type_name=u'HttpHealthCheck', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a HttpHealthCheck resource in the specified project using the data included in the request. Args: request: (ComputeHttpHealthChecksInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.httpHealthChecks.insert', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/httpHealthChecks', request_field=u'httpHealthCheck', request_type_name=u'ComputeHttpHealthChecksInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of HttpHealthCheck resources available to the specified project. Args: request: (ComputeHttpHealthChecksListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (HttpHealthCheckList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.httpHealthChecks.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/httpHealthChecks', request_field='', request_type_name=u'ComputeHttpHealthChecksListRequest', response_type_name=u'HttpHealthCheckList', supports_download=False, ) def Patch(self, request, global_params=None): """Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Args: request: (ComputeHttpHealthChecksPatchRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Patch') return self._RunMethod( config, request, global_params=global_params) Patch.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PATCH', method_id=u'compute.httpHealthChecks.patch', ordered_params=[u'project', u'httpHealthCheck'], path_params=[u'httpHealthCheck', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/httpHealthChecks/{httpHealthCheck}', request_field=u'httpHealthCheckResource', request_type_name=u'ComputeHttpHealthChecksPatchRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeHttpHealthChecksTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.httpHealthChecks.testIamPermissions', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/httpHealthChecks/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeHttpHealthChecksTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) def Update(self, request, global_params=None): """Updates a HttpHealthCheck resource in the specified project using the data included in the request. Args: request: (ComputeHttpHealthChecksUpdateRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Update') return self._RunMethod( config, request, global_params=global_params) Update.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PUT', method_id=u'compute.httpHealthChecks.update', ordered_params=[u'project', u'httpHealthCheck'], path_params=[u'httpHealthCheck', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/httpHealthChecks/{httpHealthCheck}', request_field=u'httpHealthCheckResource', request_type_name=u'ComputeHttpHealthChecksUpdateRequest', response_type_name=u'Operation', supports_download=False, ) class HttpsHealthChecksService(base_api.BaseApiService): """Service class for the httpsHealthChecks resource.""" _NAME = u'httpsHealthChecks' def __init__(self, client): super(ComputeBeta.HttpsHealthChecksService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): """Deletes the specified HttpsHealthCheck resource. Args: request: (ComputeHttpsHealthChecksDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.httpsHealthChecks.delete', ordered_params=[u'project', u'httpsHealthCheck'], path_params=[u'httpsHealthCheck', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}', request_field='', request_type_name=u'ComputeHttpsHealthChecksDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified HttpsHealthCheck resource. Get a list of available HTTPS health checks by making a list() request. Args: request: (ComputeHttpsHealthChecksGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (HttpsHealthCheck) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.httpsHealthChecks.get', ordered_params=[u'project', u'httpsHealthCheck'], path_params=[u'httpsHealthCheck', u'project'], query_params=[], relative_path=u'projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}', request_field='', request_type_name=u'ComputeHttpsHealthChecksGetRequest', response_type_name=u'HttpsHealthCheck', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a HttpsHealthCheck resource in the specified project using the data included in the request. Args: request: (ComputeHttpsHealthChecksInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.httpsHealthChecks.insert', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/httpsHealthChecks', request_field=u'httpsHealthCheck', request_type_name=u'ComputeHttpsHealthChecksInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of HttpsHealthCheck resources available to the specified project. Args: request: (ComputeHttpsHealthChecksListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (HttpsHealthCheckList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.httpsHealthChecks.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/httpsHealthChecks', request_field='', request_type_name=u'ComputeHttpsHealthChecksListRequest', response_type_name=u'HttpsHealthCheckList', supports_download=False, ) def Patch(self, request, global_params=None): """Updates a HttpsHealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Args: request: (ComputeHttpsHealthChecksPatchRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Patch') return self._RunMethod( config, request, global_params=global_params) Patch.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PATCH', method_id=u'compute.httpsHealthChecks.patch', ordered_params=[u'project', u'httpsHealthCheck'], path_params=[u'httpsHealthCheck', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}', request_field=u'httpsHealthCheckResource', request_type_name=u'ComputeHttpsHealthChecksPatchRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeHttpsHealthChecksTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.httpsHealthChecks.testIamPermissions', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/httpsHealthChecks/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeHttpsHealthChecksTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) def Update(self, request, global_params=None): """Updates a HttpsHealthCheck resource in the specified project using the data included in the request. Args: request: (ComputeHttpsHealthChecksUpdateRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Update') return self._RunMethod( config, request, global_params=global_params) Update.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PUT', method_id=u'compute.httpsHealthChecks.update', ordered_params=[u'project', u'httpsHealthCheck'], path_params=[u'httpsHealthCheck', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/httpsHealthChecks/{httpsHealthCheck}', request_field=u'httpsHealthCheckResource', request_type_name=u'ComputeHttpsHealthChecksUpdateRequest', response_type_name=u'Operation', supports_download=False, ) class ImagesService(base_api.BaseApiService): """Service class for the images resource.""" _NAME = u'images' def __init__(self, client): super(ComputeBeta.ImagesService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): """Deletes the specified image. Args: request: (ComputeImagesDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.images.delete', ordered_params=[u'project', u'image'], path_params=[u'image', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/images/{image}', request_field='', request_type_name=u'ComputeImagesDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Deprecate(self, request, global_params=None): """Sets the deprecation status of an image. If an empty request body is given, clears the deprecation status instead. Args: request: (ComputeImagesDeprecateRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Deprecate') return self._RunMethod( config, request, global_params=global_params) Deprecate.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.images.deprecate', ordered_params=[u'project', u'image'], path_params=[u'image', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/images/{image}/deprecate', request_field=u'deprecationStatus', request_type_name=u'ComputeImagesDeprecateRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified image. Get a list of available images by making a list() request. Args: request: (ComputeImagesGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Image) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.images.get', ordered_params=[u'project', u'image'], path_params=[u'image', u'project'], query_params=[], relative_path=u'projects/{project}/global/images/{image}', request_field='', request_type_name=u'ComputeImagesGetRequest', response_type_name=u'Image', supports_download=False, ) def GetFromFamily(self, request, global_params=None): """Returns the latest image that is part of an image family and is not deprecated. Args: request: (ComputeImagesGetFromFamilyRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Image) The response message. """ config = self.GetMethodConfig('GetFromFamily') return self._RunMethod( config, request, global_params=global_params) GetFromFamily.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.images.getFromFamily', ordered_params=[u'project', u'family'], path_params=[u'family', u'project'], query_params=[], relative_path=u'projects/{project}/global/images/family/{family}', request_field='', request_type_name=u'ComputeImagesGetFromFamilyRequest', response_type_name=u'Image', supports_download=False, ) def Insert(self, request, global_params=None): """Creates an image in the specified project using the data included in the request. Args: request: (ComputeImagesInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.images.insert', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'forceCreate', u'requestId'], relative_path=u'projects/{project}/global/images', request_field=u'image', request_type_name=u'ComputeImagesInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. Args: request: (ComputeImagesListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (ImageList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.images.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/images', request_field='', request_type_name=u'ComputeImagesListRequest', response_type_name=u'ImageList', supports_download=False, ) def SetLabels(self, request, global_params=None): """Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation. Args: request: (ComputeImagesSetLabelsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetLabels') return self._RunMethod( config, request, global_params=global_params) SetLabels.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.images.setLabels', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/images/{resource}/setLabels', request_field=u'globalSetLabelsRequest', request_type_name=u'ComputeImagesSetLabelsRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeImagesTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.images.testIamPermissions', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/images/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeImagesTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class InstanceGroupManagersService(base_api.BaseApiService): """Service class for the instanceGroupManagers resource.""" _NAME = u'instanceGroupManagers' def __init__(self, client): super(ComputeBeta.InstanceGroupManagersService, self).__init__(client) self._upload_configs = { } def AbandonInstances(self, request, global_params=None): """Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request. Args: request: (ComputeInstanceGroupManagersAbandonInstancesRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('AbandonInstances') return self._RunMethod( config, request, global_params=global_params) AbandonInstances.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instanceGroupManagers.abandonInstances', ordered_params=[u'project', u'zone', u'instanceGroupManager'], path_params=[u'instanceGroupManager', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/abandonInstances', request_field=u'instanceGroupManagersAbandonInstancesRequest', request_type_name=u'ComputeInstanceGroupManagersAbandonInstancesRequest', response_type_name=u'Operation', supports_download=False, ) def AggregatedList(self, request, global_params=None): """Retrieves the list of managed instance groups and groups them by zone. Args: request: (ComputeInstanceGroupManagersAggregatedListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (InstanceGroupManagerAggregatedList) The response message. """ config = self.GetMethodConfig('AggregatedList') return self._RunMethod( config, request, global_params=global_params) AggregatedList.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.instanceGroupManagers.aggregatedList', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/aggregated/instanceGroupManagers', request_field='', request_type_name=u'ComputeInstanceGroupManagersAggregatedListRequest', response_type_name=u'InstanceGroupManagerAggregatedList', supports_download=False, ) def Delete(self, request, global_params=None): """Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information. Args: request: (ComputeInstanceGroupManagersDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.instanceGroupManagers.delete', ordered_params=[u'project', u'zone', u'instanceGroupManager'], path_params=[u'instanceGroupManager', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}', request_field='', request_type_name=u'ComputeInstanceGroupManagersDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def DeleteInstances(self, request, global_params=None): """Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request. Args: request: (ComputeInstanceGroupManagersDeleteInstancesRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('DeleteInstances') return self._RunMethod( config, request, global_params=global_params) DeleteInstances.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instanceGroupManagers.deleteInstances', ordered_params=[u'project', u'zone', u'instanceGroupManager'], path_params=[u'instanceGroupManager', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/deleteInstances', request_field=u'instanceGroupManagersDeleteInstancesRequest', request_type_name=u'ComputeInstanceGroupManagersDeleteInstancesRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns all of the details about the specified managed instance group. Get a list of available managed instance groups by making a list() request. Args: request: (ComputeInstanceGroupManagersGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (InstanceGroupManager) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.instanceGroupManagers.get', ordered_params=[u'project', u'zone', u'instanceGroupManager'], path_params=[u'instanceGroupManager', u'project', u'zone'], query_params=[], relative_path=u'projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}', request_field='', request_type_name=u'ComputeInstanceGroupManagersGetRequest', response_type_name=u'InstanceGroupManager', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit. Args: request: (ComputeInstanceGroupManagersInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instanceGroupManagers.insert', ordered_params=[u'project', u'zone'], path_params=[u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instanceGroupManagers', request_field=u'instanceGroupManager', request_type_name=u'ComputeInstanceGroupManagersInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves a list of managed instance groups that are contained within the specified project and zone. Args: request: (ComputeInstanceGroupManagersListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (InstanceGroupManagerList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.instanceGroupManagers.list', ordered_params=[u'project', u'zone'], path_params=[u'project', u'zone'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/zones/{zone}/instanceGroupManagers', request_field='', request_type_name=u'ComputeInstanceGroupManagersListRequest', response_type_name=u'InstanceGroupManagerList', supports_download=False, ) def ListManagedInstances(self, request, global_params=None): """Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. Args: request: (ComputeInstanceGroupManagersListManagedInstancesRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (InstanceGroupManagersListManagedInstancesResponse) The response message. """ config = self.GetMethodConfig('ListManagedInstances') return self._RunMethod( config, request, global_params=global_params) ListManagedInstances.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instanceGroupManagers.listManagedInstances', ordered_params=[u'project', u'zone', u'instanceGroupManager'], path_params=[u'instanceGroupManager', u'project', u'zone'], query_params=[u'filter', u'maxResults', u'order_by', u'pageToken'], relative_path=u'projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances', request_field='', request_type_name=u'ComputeInstanceGroupManagersListManagedInstancesRequest', response_type_name=u'InstanceGroupManagersListManagedInstancesResponse', supports_download=False, ) def Patch(self, request, global_params=None): """Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Args: request: (ComputeInstanceGroupManagersPatchRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Patch') return self._RunMethod( config, request, global_params=global_params) Patch.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PATCH', method_id=u'compute.instanceGroupManagers.patch', ordered_params=[u'project', u'zone', u'instanceGroupManager'], path_params=[u'instanceGroupManager', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}', request_field=u'instanceGroupManagerResource', request_type_name=u'ComputeInstanceGroupManagersPatchRequest', response_type_name=u'Operation', supports_download=False, ) def RecreateInstances(self, request, global_params=None): """Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request. Args: request: (ComputeInstanceGroupManagersRecreateInstancesRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('RecreateInstances') return self._RunMethod( config, request, global_params=global_params) RecreateInstances.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instanceGroupManagers.recreateInstances', ordered_params=[u'project', u'zone', u'instanceGroupManager'], path_params=[u'instanceGroupManager', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/recreateInstances', request_field=u'instanceGroupManagersRecreateInstancesRequest', request_type_name=u'ComputeInstanceGroupManagersRecreateInstancesRequest', response_type_name=u'Operation', supports_download=False, ) def Resize(self, request, global_params=None): """Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. Args: request: (ComputeInstanceGroupManagersResizeRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Resize') return self._RunMethod( config, request, global_params=global_params) Resize.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instanceGroupManagers.resize', ordered_params=[u'project', u'zone', u'instanceGroupManager', u'size'], path_params=[u'instanceGroupManager', u'project', u'zone'], query_params=[u'requestId', u'size'], relative_path=u'projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resize', request_field='', request_type_name=u'ComputeInstanceGroupManagersResizeRequest', response_type_name=u'Operation', supports_download=False, ) def ResizeAdvanced(self, request, global_params=None): """Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method. If you increase the size of the instance group, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. Args: request: (ComputeInstanceGroupManagersResizeAdvancedRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('ResizeAdvanced') return self._RunMethod( config, request, global_params=global_params) ResizeAdvanced.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instanceGroupManagers.resizeAdvanced', ordered_params=[u'project', u'zone', u'instanceGroupManager'], path_params=[u'instanceGroupManager', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resizeAdvanced', request_field=u'instanceGroupManagersResizeAdvancedRequest', request_type_name=u'ComputeInstanceGroupManagersResizeAdvancedRequest', response_type_name=u'Operation', supports_download=False, ) def SetAutoHealingPolicies(self, request, global_params=None): """Modifies the autohealing policies. Args: request: (ComputeInstanceGroupManagersSetAutoHealingPoliciesRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetAutoHealingPolicies') return self._RunMethod( config, request, global_params=global_params) SetAutoHealingPolicies.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instanceGroupManagers.setAutoHealingPolicies', ordered_params=[u'project', u'zone', u'instanceGroupManager'], path_params=[u'instanceGroupManager', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies', request_field=u'instanceGroupManagersSetAutoHealingRequest', request_type_name=u'ComputeInstanceGroupManagersSetAutoHealingPoliciesRequest', response_type_name=u'Operation', supports_download=False, ) def SetInstanceTemplate(self, request, global_params=None): """Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you recreate them. Args: request: (ComputeInstanceGroupManagersSetInstanceTemplateRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetInstanceTemplate') return self._RunMethod( config, request, global_params=global_params) SetInstanceTemplate.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instanceGroupManagers.setInstanceTemplate', ordered_params=[u'project', u'zone', u'instanceGroupManager'], path_params=[u'instanceGroupManager', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate', request_field=u'instanceGroupManagersSetInstanceTemplateRequest', request_type_name=u'ComputeInstanceGroupManagersSetInstanceTemplateRequest', response_type_name=u'Operation', supports_download=False, ) def SetTargetPools(self, request, global_params=None): """Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group. Args: request: (ComputeInstanceGroupManagersSetTargetPoolsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetTargetPools') return self._RunMethod( config, request, global_params=global_params) SetTargetPools.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instanceGroupManagers.setTargetPools', ordered_params=[u'project', u'zone', u'instanceGroupManager'], path_params=[u'instanceGroupManager', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setTargetPools', request_field=u'instanceGroupManagersSetTargetPoolsRequest', request_type_name=u'ComputeInstanceGroupManagersSetTargetPoolsRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeInstanceGroupManagersTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instanceGroupManagers.testIamPermissions', ordered_params=[u'project', u'zone', u'resource'], path_params=[u'project', u'resource', u'zone'], query_params=[], relative_path=u'projects/{project}/zones/{zone}/instanceGroupManagers/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeInstanceGroupManagersTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) def Update(self, request, global_params=None): """Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method. Args: request: (ComputeInstanceGroupManagersUpdateRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Update') return self._RunMethod( config, request, global_params=global_params) Update.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PUT', method_id=u'compute.instanceGroupManagers.update', ordered_params=[u'project', u'zone', u'instanceGroupManager'], path_params=[u'instanceGroupManager', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}', request_field=u'instanceGroupManagerResource', request_type_name=u'ComputeInstanceGroupManagersUpdateRequest', response_type_name=u'Operation', supports_download=False, ) class InstanceGroupsService(base_api.BaseApiService): """Service class for the instanceGroups resource.""" _NAME = u'instanceGroups' def __init__(self, client): super(ComputeBeta.InstanceGroupsService, self).__init__(client) self._upload_configs = { } def AddInstances(self, request, global_params=None): """Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information. Args: request: (ComputeInstanceGroupsAddInstancesRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('AddInstances') return self._RunMethod( config, request, global_params=global_params) AddInstances.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instanceGroups.addInstances', ordered_params=[u'project', u'zone', u'instanceGroup'], path_params=[u'instanceGroup', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances', request_field=u'instanceGroupsAddInstancesRequest', request_type_name=u'ComputeInstanceGroupsAddInstancesRequest', response_type_name=u'Operation', supports_download=False, ) def AggregatedList(self, request, global_params=None): """Retrieves the list of instance groups and sorts them by zone. Args: request: (ComputeInstanceGroupsAggregatedListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (InstanceGroupAggregatedList) The response message. """ config = self.GetMethodConfig('AggregatedList') return self._RunMethod( config, request, global_params=global_params) AggregatedList.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.instanceGroups.aggregatedList', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/aggregated/instanceGroups', request_field='', request_type_name=u'ComputeInstanceGroupsAggregatedListRequest', response_type_name=u'InstanceGroupAggregatedList', supports_download=False, ) def Delete(self, request, global_params=None): """Deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information. Args: request: (ComputeInstanceGroupsDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.instanceGroups.delete', ordered_params=[u'project', u'zone', u'instanceGroup'], path_params=[u'instanceGroup', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}', request_field='', request_type_name=u'ComputeInstanceGroupsDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified instance group. Get a list of available instance groups by making a list() request. Args: request: (ComputeInstanceGroupsGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (InstanceGroup) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.instanceGroups.get', ordered_params=[u'project', u'zone', u'instanceGroup'], path_params=[u'instanceGroup', u'project', u'zone'], query_params=[], relative_path=u'projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}', request_field='', request_type_name=u'ComputeInstanceGroupsGetRequest', response_type_name=u'InstanceGroup', supports_download=False, ) def Insert(self, request, global_params=None): """Creates an instance group in the specified project using the parameters that are included in the request. Args: request: (ComputeInstanceGroupsInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instanceGroups.insert', ordered_params=[u'project', u'zone'], path_params=[u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instanceGroups', request_field=u'instanceGroup', request_type_name=u'ComputeInstanceGroupsInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of instance groups that are located in the specified project and zone. Args: request: (ComputeInstanceGroupsListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (InstanceGroupList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.instanceGroups.list', ordered_params=[u'project', u'zone'], path_params=[u'project', u'zone'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/zones/{zone}/instanceGroups', request_field='', request_type_name=u'ComputeInstanceGroupsListRequest', response_type_name=u'InstanceGroupList', supports_download=False, ) def ListInstances(self, request, global_params=None): """Lists the instances in the specified instance group. Args: request: (ComputeInstanceGroupsListInstancesRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (InstanceGroupsListInstances) The response message. """ config = self.GetMethodConfig('ListInstances') return self._RunMethod( config, request, global_params=global_params) ListInstances.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instanceGroups.listInstances', ordered_params=[u'project', u'zone', u'instanceGroup'], path_params=[u'instanceGroup', u'project', u'zone'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances', request_field=u'instanceGroupsListInstancesRequest', request_type_name=u'ComputeInstanceGroupsListInstancesRequest', response_type_name=u'InstanceGroupsListInstances', supports_download=False, ) def RemoveInstances(self, request, global_params=None): """Removes one or more instances from the specified instance group, but does not delete those instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted. Args: request: (ComputeInstanceGroupsRemoveInstancesRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('RemoveInstances') return self._RunMethod( config, request, global_params=global_params) RemoveInstances.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instanceGroups.removeInstances', ordered_params=[u'project', u'zone', u'instanceGroup'], path_params=[u'instanceGroup', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances', request_field=u'instanceGroupsRemoveInstancesRequest', request_type_name=u'ComputeInstanceGroupsRemoveInstancesRequest', response_type_name=u'Operation', supports_download=False, ) def SetNamedPorts(self, request, global_params=None): """Sets the named ports for the specified instance group. Args: request: (ComputeInstanceGroupsSetNamedPortsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetNamedPorts') return self._RunMethod( config, request, global_params=global_params) SetNamedPorts.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instanceGroups.setNamedPorts', ordered_params=[u'project', u'zone', u'instanceGroup'], path_params=[u'instanceGroup', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts', request_field=u'instanceGroupsSetNamedPortsRequest', request_type_name=u'ComputeInstanceGroupsSetNamedPortsRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeInstanceGroupsTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instanceGroups.testIamPermissions', ordered_params=[u'project', u'zone', u'resource'], path_params=[u'project', u'resource', u'zone'], query_params=[], relative_path=u'projects/{project}/zones/{zone}/instanceGroups/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeInstanceGroupsTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class InstanceTemplatesService(base_api.BaseApiService): """Service class for the instanceTemplates resource.""" _NAME = u'instanceTemplates' def __init__(self, client): super(ComputeBeta.InstanceTemplatesService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): """Deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It's not possible to delete templates which are in use by an instance group. Args: request: (ComputeInstanceTemplatesDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.instanceTemplates.delete', ordered_params=[u'project', u'instanceTemplate'], path_params=[u'instanceTemplate', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/instanceTemplates/{instanceTemplate}', request_field='', request_type_name=u'ComputeInstanceTemplatesDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified instance template. Get a list of available instance templates by making a list() request. Args: request: (ComputeInstanceTemplatesGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (InstanceTemplate) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.instanceTemplates.get', ordered_params=[u'project', u'instanceTemplate'], path_params=[u'instanceTemplate', u'project'], query_params=[], relative_path=u'projects/{project}/global/instanceTemplates/{instanceTemplate}', request_field='', request_type_name=u'ComputeInstanceTemplatesGetRequest', response_type_name=u'InstanceTemplate', supports_download=False, ) def Insert(self, request, global_params=None): """Creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template. Args: request: (ComputeInstanceTemplatesInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instanceTemplates.insert', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/instanceTemplates', request_field=u'instanceTemplate', request_type_name=u'ComputeInstanceTemplatesInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves a list of instance templates that are contained within the specified project and zone. Args: request: (ComputeInstanceTemplatesListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (InstanceTemplateList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.instanceTemplates.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/instanceTemplates', request_field='', request_type_name=u'ComputeInstanceTemplatesListRequest', response_type_name=u'InstanceTemplateList', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeInstanceTemplatesTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instanceTemplates.testIamPermissions', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/instanceTemplates/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeInstanceTemplatesTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class InstancesService(base_api.BaseApiService): """Service class for the instances resource.""" _NAME = u'instances' def __init__(self, client): super(ComputeBeta.InstancesService, self).__init__(client) self._upload_configs = { } def AddAccessConfig(self, request, global_params=None): """Adds an access config to an instance's network interface. Args: request: (ComputeInstancesAddAccessConfigRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('AddAccessConfig') return self._RunMethod( config, request, global_params=global_params) AddAccessConfig.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instances.addAccessConfig', ordered_params=[u'project', u'zone', u'instance', u'networkInterface'], path_params=[u'instance', u'project', u'zone'], query_params=[u'networkInterface', u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instances/{instance}/addAccessConfig', request_field=u'accessConfig', request_type_name=u'ComputeInstancesAddAccessConfigRequest', response_type_name=u'Operation', supports_download=False, ) def AggregatedList(self, request, global_params=None): """Retrieves aggregated list of instances. Args: request: (ComputeInstancesAggregatedListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (InstanceAggregatedList) The response message. """ config = self.GetMethodConfig('AggregatedList') return self._RunMethod( config, request, global_params=global_params) AggregatedList.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.instances.aggregatedList', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/aggregated/instances', request_field='', request_type_name=u'ComputeInstancesAggregatedListRequest', response_type_name=u'InstanceAggregatedList', supports_download=False, ) def AttachDisk(self, request, global_params=None): """Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance. Args: request: (ComputeInstancesAttachDiskRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('AttachDisk') return self._RunMethod( config, request, global_params=global_params) AttachDisk.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instances.attachDisk', ordered_params=[u'project', u'zone', u'instance'], path_params=[u'instance', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instances/{instance}/attachDisk', request_field=u'attachedDisk', request_type_name=u'ComputeInstancesAttachDiskRequest', response_type_name=u'Operation', supports_download=False, ) def Delete(self, request, global_params=None): """Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance. Args: request: (ComputeInstancesDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.instances.delete', ordered_params=[u'project', u'zone', u'instance'], path_params=[u'instance', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instances/{instance}', request_field='', request_type_name=u'ComputeInstancesDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def DeleteAccessConfig(self, request, global_params=None): """Deletes an access config from an instance's network interface. Args: request: (ComputeInstancesDeleteAccessConfigRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('DeleteAccessConfig') return self._RunMethod( config, request, global_params=global_params) DeleteAccessConfig.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instances.deleteAccessConfig', ordered_params=[u'project', u'zone', u'instance', u'accessConfig', u'networkInterface'], path_params=[u'instance', u'project', u'zone'], query_params=[u'accessConfig', u'networkInterface', u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instances/{instance}/deleteAccessConfig', request_field='', request_type_name=u'ComputeInstancesDeleteAccessConfigRequest', response_type_name=u'Operation', supports_download=False, ) def DetachDisk(self, request, global_params=None): """Detaches a disk from an instance. Args: request: (ComputeInstancesDetachDiskRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('DetachDisk') return self._RunMethod( config, request, global_params=global_params) DetachDisk.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instances.detachDisk', ordered_params=[u'project', u'zone', u'instance', u'deviceName'], path_params=[u'instance', u'project', u'zone'], query_params=[u'deviceName', u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instances/{instance}/detachDisk', request_field='', request_type_name=u'ComputeInstancesDetachDiskRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified Instance resource. Get a list of available instances by making a list() request. Args: request: (ComputeInstancesGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Instance) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.instances.get', ordered_params=[u'project', u'zone', u'instance'], path_params=[u'instance', u'project', u'zone'], query_params=[], relative_path=u'projects/{project}/zones/{zone}/instances/{instance}', request_field='', request_type_name=u'ComputeInstancesGetRequest', response_type_name=u'Instance', supports_download=False, ) def GetSerialPortOutput(self, request, global_params=None): """Returns the specified instance's serial port output. Args: request: (ComputeInstancesGetSerialPortOutputRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (SerialPortOutput) The response message. """ config = self.GetMethodConfig('GetSerialPortOutput') return self._RunMethod( config, request, global_params=global_params) GetSerialPortOutput.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.instances.getSerialPortOutput', ordered_params=[u'project', u'zone', u'instance'], path_params=[u'instance', u'project', u'zone'], query_params=[u'port', u'start'], relative_path=u'projects/{project}/zones/{zone}/instances/{instance}/serialPort', request_field='', request_type_name=u'ComputeInstancesGetSerialPortOutputRequest', response_type_name=u'SerialPortOutput', supports_download=False, ) def Insert(self, request, global_params=None): """Creates an instance resource in the specified project using the data included in the request. Args: request: (ComputeInstancesInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instances.insert', ordered_params=[u'project', u'zone'], path_params=[u'project', u'zone'], query_params=[u'requestId', u'sourceInstanceTemplate'], relative_path=u'projects/{project}/zones/{zone}/instances', request_field=u'instance', request_type_name=u'ComputeInstancesInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of instances contained within the specified zone. Args: request: (ComputeInstancesListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (InstanceList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.instances.list', ordered_params=[u'project', u'zone'], path_params=[u'project', u'zone'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/zones/{zone}/instances', request_field='', request_type_name=u'ComputeInstancesListRequest', response_type_name=u'InstanceList', supports_download=False, ) def ListReferrers(self, request, global_params=None): """Retrieves the list of referrers to instances contained within the specified zone. Args: request: (ComputeInstancesListReferrersRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (InstanceListReferrers) The response message. """ config = self.GetMethodConfig('ListReferrers') return self._RunMethod( config, request, global_params=global_params) ListReferrers.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.instances.listReferrers', ordered_params=[u'project', u'zone', u'instance'], path_params=[u'instance', u'project', u'zone'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/zones/{zone}/instances/{instance}/referrers', request_field='', request_type_name=u'ComputeInstancesListReferrersRequest', response_type_name=u'InstanceListReferrers', supports_download=False, ) def Reset(self, request, global_params=None): """Performs a reset on the instance. For more information, see Resetting an instance. Args: request: (ComputeInstancesResetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Reset') return self._RunMethod( config, request, global_params=global_params) Reset.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instances.reset', ordered_params=[u'project', u'zone', u'instance'], path_params=[u'instance', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instances/{instance}/reset', request_field='', request_type_name=u'ComputeInstancesResetRequest', response_type_name=u'Operation', supports_download=False, ) def SetDeletionProtection(self, request, global_params=None): """Sets deletion protection on the instance. Args: request: (ComputeInstancesSetDeletionProtectionRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetDeletionProtection') return self._RunMethod( config, request, global_params=global_params) SetDeletionProtection.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instances.setDeletionProtection', ordered_params=[u'project', u'zone', u'resource'], path_params=[u'project', u'resource', u'zone'], query_params=[u'deletionProtection', u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instances/{resource}/setDeletionProtection', request_field='', request_type_name=u'ComputeInstancesSetDeletionProtectionRequest', response_type_name=u'Operation', supports_download=False, ) def SetDiskAutoDelete(self, request, global_params=None): """Sets the auto-delete flag for a disk attached to an instance. Args: request: (ComputeInstancesSetDiskAutoDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetDiskAutoDelete') return self._RunMethod( config, request, global_params=global_params) SetDiskAutoDelete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instances.setDiskAutoDelete', ordered_params=[u'project', u'zone', u'instance', u'autoDelete', u'deviceName'], path_params=[u'instance', u'project', u'zone'], query_params=[u'autoDelete', u'deviceName', u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete', request_field='', request_type_name=u'ComputeInstancesSetDiskAutoDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def SetLabels(self, request, global_params=None): """Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation. Args: request: (ComputeInstancesSetLabelsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetLabels') return self._RunMethod( config, request, global_params=global_params) SetLabels.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instances.setLabels', ordered_params=[u'project', u'zone', u'instance'], path_params=[u'instance', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instances/{instance}/setLabels', request_field=u'instancesSetLabelsRequest', request_type_name=u'ComputeInstancesSetLabelsRequest', response_type_name=u'Operation', supports_download=False, ) def SetMachineResources(self, request, global_params=None): """Changes the number and/or type of accelerator for a stopped instance to the values specified in the request. Args: request: (ComputeInstancesSetMachineResourcesRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetMachineResources') return self._RunMethod( config, request, global_params=global_params) SetMachineResources.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instances.setMachineResources', ordered_params=[u'project', u'zone', u'instance'], path_params=[u'instance', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instances/{instance}/setMachineResources', request_field=u'instancesSetMachineResourcesRequest', request_type_name=u'ComputeInstancesSetMachineResourcesRequest', response_type_name=u'Operation', supports_download=False, ) def SetMachineType(self, request, global_params=None): """Changes the machine type for a stopped instance to the machine type specified in the request. Args: request: (ComputeInstancesSetMachineTypeRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetMachineType') return self._RunMethod( config, request, global_params=global_params) SetMachineType.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instances.setMachineType', ordered_params=[u'project', u'zone', u'instance'], path_params=[u'instance', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instances/{instance}/setMachineType', request_field=u'instancesSetMachineTypeRequest', request_type_name=u'ComputeInstancesSetMachineTypeRequest', response_type_name=u'Operation', supports_download=False, ) def SetMetadata(self, request, global_params=None): """Sets metadata for the specified instance to the data included in the request. Args: request: (ComputeInstancesSetMetadataRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetMetadata') return self._RunMethod( config, request, global_params=global_params) SetMetadata.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instances.setMetadata', ordered_params=[u'project', u'zone', u'instance'], path_params=[u'instance', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instances/{instance}/setMetadata', request_field=u'metadata', request_type_name=u'ComputeInstancesSetMetadataRequest', response_type_name=u'Operation', supports_download=False, ) def SetMinCpuPlatform(self, request, global_params=None): """Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform. Args: request: (ComputeInstancesSetMinCpuPlatformRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetMinCpuPlatform') return self._RunMethod( config, request, global_params=global_params) SetMinCpuPlatform.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instances.setMinCpuPlatform', ordered_params=[u'project', u'zone', u'instance'], path_params=[u'instance', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform', request_field=u'instancesSetMinCpuPlatformRequest', request_type_name=u'ComputeInstancesSetMinCpuPlatformRequest', response_type_name=u'Operation', supports_download=False, ) def SetScheduling(self, request, global_params=None): """Sets an instance's scheduling options. Args: request: (ComputeInstancesSetSchedulingRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetScheduling') return self._RunMethod( config, request, global_params=global_params) SetScheduling.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instances.setScheduling', ordered_params=[u'project', u'zone', u'instance'], path_params=[u'instance', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instances/{instance}/setScheduling', request_field=u'scheduling', request_type_name=u'ComputeInstancesSetSchedulingRequest', response_type_name=u'Operation', supports_download=False, ) def SetServiceAccount(self, request, global_params=None): """Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance. Args: request: (ComputeInstancesSetServiceAccountRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetServiceAccount') return self._RunMethod( config, request, global_params=global_params) SetServiceAccount.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instances.setServiceAccount', ordered_params=[u'project', u'zone', u'instance'], path_params=[u'instance', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount', request_field=u'instancesSetServiceAccountRequest', request_type_name=u'ComputeInstancesSetServiceAccountRequest', response_type_name=u'Operation', supports_download=False, ) def SetTags(self, request, global_params=None): """Sets tags for the specified instance to the data included in the request. Args: request: (ComputeInstancesSetTagsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetTags') return self._RunMethod( config, request, global_params=global_params) SetTags.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instances.setTags', ordered_params=[u'project', u'zone', u'instance'], path_params=[u'instance', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instances/{instance}/setTags', request_field=u'tags', request_type_name=u'ComputeInstancesSetTagsRequest', response_type_name=u'Operation', supports_download=False, ) def Start(self, request, global_params=None): """Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance. Args: request: (ComputeInstancesStartRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Start') return self._RunMethod( config, request, global_params=global_params) Start.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instances.start', ordered_params=[u'project', u'zone', u'instance'], path_params=[u'instance', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instances/{instance}/start', request_field='', request_type_name=u'ComputeInstancesStartRequest', response_type_name=u'Operation', supports_download=False, ) def StartWithEncryptionKey(self, request, global_params=None): """Starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance. Args: request: (ComputeInstancesStartWithEncryptionKeyRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('StartWithEncryptionKey') return self._RunMethod( config, request, global_params=global_params) StartWithEncryptionKey.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instances.startWithEncryptionKey', ordered_params=[u'project', u'zone', u'instance'], path_params=[u'instance', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey', request_field=u'instancesStartWithEncryptionKeyRequest', request_type_name=u'ComputeInstancesStartWithEncryptionKeyRequest', response_type_name=u'Operation', supports_download=False, ) def Stop(self, request, global_params=None): """Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance. Args: request: (ComputeInstancesStopRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Stop') return self._RunMethod( config, request, global_params=global_params) Stop.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instances.stop', ordered_params=[u'project', u'zone', u'instance'], path_params=[u'instance', u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instances/{instance}/stop', request_field='', request_type_name=u'ComputeInstancesStopRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeInstancesTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instances.testIamPermissions', ordered_params=[u'project', u'zone', u'resource'], path_params=[u'project', u'resource', u'zone'], query_params=[], relative_path=u'projects/{project}/zones/{zone}/instances/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeInstancesTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) def UpdateAccessConfig(self, request, global_params=None): """Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Args: request: (ComputeInstancesUpdateAccessConfigRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('UpdateAccessConfig') return self._RunMethod( config, request, global_params=global_params) UpdateAccessConfig.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.instances.updateAccessConfig', ordered_params=[u'project', u'zone', u'instance', u'networkInterface'], path_params=[u'instance', u'project', u'zone'], query_params=[u'networkInterface', u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instances/{instance}/updateAccessConfig', request_field=u'accessConfig', request_type_name=u'ComputeInstancesUpdateAccessConfigRequest', response_type_name=u'Operation', supports_download=False, ) def UpdateNetworkInterface(self, request, global_params=None): """Updates an instance's network interface. This method follows PATCH semantics. Args: request: (ComputeInstancesUpdateNetworkInterfaceRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('UpdateNetworkInterface') return self._RunMethod( config, request, global_params=global_params) UpdateNetworkInterface.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PATCH', method_id=u'compute.instances.updateNetworkInterface', ordered_params=[u'project', u'zone', u'instance', u'networkInterface'], path_params=[u'instance', u'project', u'zone'], query_params=[u'networkInterface', u'requestId'], relative_path=u'projects/{project}/zones/{zone}/instances/{instance}/updateNetworkInterface', request_field=u'networkInterfaceResource', request_type_name=u'ComputeInstancesUpdateNetworkInterfaceRequest', response_type_name=u'Operation', supports_download=False, ) class InterconnectAttachmentsService(base_api.BaseApiService): """Service class for the interconnectAttachments resource.""" _NAME = u'interconnectAttachments' def __init__(self, client): super(ComputeBeta.InterconnectAttachmentsService, self).__init__(client) self._upload_configs = { } def AggregatedList(self, request, global_params=None): """Retrieves an aggregated list of interconnect attachments. Args: request: (ComputeInterconnectAttachmentsAggregatedListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (InterconnectAttachmentAggregatedList) The response message. """ config = self.GetMethodConfig('AggregatedList') return self._RunMethod( config, request, global_params=global_params) AggregatedList.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.interconnectAttachments.aggregatedList', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/aggregated/interconnectAttachments', request_field='', request_type_name=u'ComputeInterconnectAttachmentsAggregatedListRequest', response_type_name=u'InterconnectAttachmentAggregatedList', supports_download=False, ) def Delete(self, request, global_params=None): """Deletes the specified interconnect attachment. Args: request: (ComputeInterconnectAttachmentsDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.interconnectAttachments.delete', ordered_params=[u'project', u'region', u'interconnectAttachment'], path_params=[u'interconnectAttachment', u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}', request_field='', request_type_name=u'ComputeInterconnectAttachmentsDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified interconnect attachment. Args: request: (ComputeInterconnectAttachmentsGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (InterconnectAttachment) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.interconnectAttachments.get', ordered_params=[u'project', u'region', u'interconnectAttachment'], path_params=[u'interconnectAttachment', u'project', u'region'], query_params=[], relative_path=u'projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}', request_field='', request_type_name=u'ComputeInterconnectAttachmentsGetRequest', response_type_name=u'InterconnectAttachment', supports_download=False, ) def Insert(self, request, global_params=None): """Creates an InterconnectAttachment in the specified project using the data included in the request. Args: request: (ComputeInterconnectAttachmentsInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.interconnectAttachments.insert', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/interconnectAttachments', request_field=u'interconnectAttachment', request_type_name=u'ComputeInterconnectAttachmentsInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of interconnect attachments contained within the specified region. Args: request: (ComputeInterconnectAttachmentsListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (InterconnectAttachmentList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.interconnectAttachments.list', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/regions/{region}/interconnectAttachments', request_field='', request_type_name=u'ComputeInterconnectAttachmentsListRequest', response_type_name=u'InterconnectAttachmentList', supports_download=False, ) def SetLabels(self, request, global_params=None): """Sets the labels on an InterconnectAttachment. To learn more about labels, read the Labeling Resources documentation. Args: request: (ComputeInterconnectAttachmentsSetLabelsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetLabels') return self._RunMethod( config, request, global_params=global_params) SetLabels.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.interconnectAttachments.setLabels', ordered_params=[u'project', u'region', u'resource'], path_params=[u'project', u'region', u'resource'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/interconnectAttachments/{resource}/setLabels', request_field=u'regionSetLabelsRequest', request_type_name=u'ComputeInterconnectAttachmentsSetLabelsRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeInterconnectAttachmentsTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.interconnectAttachments.testIamPermissions', ordered_params=[u'project', u'region', u'resource'], path_params=[u'project', u'region', u'resource'], query_params=[], relative_path=u'projects/{project}/regions/{region}/interconnectAttachments/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeInterconnectAttachmentsTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class InterconnectLocationsService(base_api.BaseApiService): """Service class for the interconnectLocations resource.""" _NAME = u'interconnectLocations' def __init__(self, client): super(ComputeBeta.InterconnectLocationsService, self).__init__(client) self._upload_configs = { } def Get(self, request, global_params=None): """Returns the details for the specified interconnect location. Get a list of available interconnect locations by making a list() request. Args: request: (ComputeInterconnectLocationsGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (InterconnectLocation) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.interconnectLocations.get', ordered_params=[u'project', u'interconnectLocation'], path_params=[u'interconnectLocation', u'project'], query_params=[], relative_path=u'projects/{project}/global/interconnectLocations/{interconnectLocation}', request_field='', request_type_name=u'ComputeInterconnectLocationsGetRequest', response_type_name=u'InterconnectLocation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of interconnect locations available to the specified project. Args: request: (ComputeInterconnectLocationsListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (InterconnectLocationList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.interconnectLocations.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/interconnectLocations', request_field='', request_type_name=u'ComputeInterconnectLocationsListRequest', response_type_name=u'InterconnectLocationList', supports_download=False, ) class InterconnectsService(base_api.BaseApiService): """Service class for the interconnects resource.""" _NAME = u'interconnects' def __init__(self, client): super(ComputeBeta.InterconnectsService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): """Deletes the specified interconnect. Args: request: (ComputeInterconnectsDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.interconnects.delete', ordered_params=[u'project', u'interconnect'], path_params=[u'interconnect', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/interconnects/{interconnect}', request_field='', request_type_name=u'ComputeInterconnectsDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified interconnect. Get a list of available interconnects by making a list() request. Args: request: (ComputeInterconnectsGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Interconnect) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.interconnects.get', ordered_params=[u'project', u'interconnect'], path_params=[u'interconnect', u'project'], query_params=[], relative_path=u'projects/{project}/global/interconnects/{interconnect}', request_field='', request_type_name=u'ComputeInterconnectsGetRequest', response_type_name=u'Interconnect', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a Interconnect in the specified project using the data included in the request. Args: request: (ComputeInterconnectsInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.interconnects.insert', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/interconnects', request_field=u'interconnect', request_type_name=u'ComputeInterconnectsInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of interconnect available to the specified project. Args: request: (ComputeInterconnectsListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (InterconnectList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.interconnects.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/interconnects', request_field='', request_type_name=u'ComputeInterconnectsListRequest', response_type_name=u'InterconnectList', supports_download=False, ) def Patch(self, request, global_params=None): """Updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Args: request: (ComputeInterconnectsPatchRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Patch') return self._RunMethod( config, request, global_params=global_params) Patch.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PATCH', method_id=u'compute.interconnects.patch', ordered_params=[u'project', u'interconnect'], path_params=[u'interconnect', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/interconnects/{interconnect}', request_field=u'interconnectResource', request_type_name=u'ComputeInterconnectsPatchRequest', response_type_name=u'Operation', supports_download=False, ) def SetLabels(self, request, global_params=None): """Sets the labels on an Interconnect. To learn more about labels, read the Labeling Resources documentation. Args: request: (ComputeInterconnectsSetLabelsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetLabels') return self._RunMethod( config, request, global_params=global_params) SetLabels.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.interconnects.setLabels', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/interconnects/{resource}/setLabels', request_field=u'globalSetLabelsRequest', request_type_name=u'ComputeInterconnectsSetLabelsRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeInterconnectsTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.interconnects.testIamPermissions', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/interconnects/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeInterconnectsTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class LicenseCodesService(base_api.BaseApiService): """Service class for the licenseCodes resource.""" _NAME = u'licenseCodes' def __init__(self, client): super(ComputeBeta.LicenseCodesService, self).__init__(client) self._upload_configs = { } def Get(self, request, global_params=None): """Return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code. Args: request: (ComputeLicenseCodesGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (LicenseCode) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.licenseCodes.get', ordered_params=[u'project', u'licenseCode'], path_params=[u'licenseCode', u'project'], query_params=[], relative_path=u'projects/{project}/global/licenseCodes/{licenseCode}', request_field='', request_type_name=u'ComputeLicenseCodesGetRequest', response_type_name=u'LicenseCode', supports_download=False, ) class LicensesService(base_api.BaseApiService): """Service class for the licenses resource.""" _NAME = u'licenses' def __init__(self, client): super(ComputeBeta.LicensesService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): """Deletes the specified license. Args: request: (ComputeLicensesDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.licenses.delete', ordered_params=[u'project', u'license'], path_params=[u'license', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/licenses/{license}', request_field='', request_type_name=u'ComputeLicensesDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified License resource. Args: request: (ComputeLicensesGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (License) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.licenses.get', ordered_params=[u'project', u'license'], path_params=[u'license', u'project'], query_params=[], relative_path=u'projects/{project}/global/licenses/{license}', request_field='', request_type_name=u'ComputeLicensesGetRequest', response_type_name=u'License', supports_download=False, ) def Insert(self, request, global_params=None): """Create a License resource in the specified project. Args: request: (ComputeLicensesInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.licenses.insert', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/licenses', request_field=u'license', request_type_name=u'ComputeLicensesInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 8. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. Args: request: (ComputeLicensesListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (LicensesListResponse) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.licenses.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/licenses', request_field='', request_type_name=u'ComputeLicensesListRequest', response_type_name=u'LicensesListResponse', supports_download=False, ) class MachineTypesService(base_api.BaseApiService): """Service class for the machineTypes resource.""" _NAME = u'machineTypes' def __init__(self, client): super(ComputeBeta.MachineTypesService, self).__init__(client) self._upload_configs = { } def AggregatedList(self, request, global_params=None): """Retrieves an aggregated list of machine types. Args: request: (ComputeMachineTypesAggregatedListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (MachineTypeAggregatedList) The response message. """ config = self.GetMethodConfig('AggregatedList') return self._RunMethod( config, request, global_params=global_params) AggregatedList.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.machineTypes.aggregatedList', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/aggregated/machineTypes', request_field='', request_type_name=u'ComputeMachineTypesAggregatedListRequest', response_type_name=u'MachineTypeAggregatedList', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified machine type. Get a list of available machine types by making a list() request. Args: request: (ComputeMachineTypesGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (MachineType) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.machineTypes.get', ordered_params=[u'project', u'zone', u'machineType'], path_params=[u'machineType', u'project', u'zone'], query_params=[], relative_path=u'projects/{project}/zones/{zone}/machineTypes/{machineType}', request_field='', request_type_name=u'ComputeMachineTypesGetRequest', response_type_name=u'MachineType', supports_download=False, ) def List(self, request, global_params=None): """Retrieves a list of machine types available to the specified project. Args: request: (ComputeMachineTypesListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (MachineTypeList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.machineTypes.list', ordered_params=[u'project', u'zone'], path_params=[u'project', u'zone'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/zones/{zone}/machineTypes', request_field='', request_type_name=u'ComputeMachineTypesListRequest', response_type_name=u'MachineTypeList', supports_download=False, ) class NetworksService(base_api.BaseApiService): """Service class for the networks resource.""" _NAME = u'networks' def __init__(self, client): super(ComputeBeta.NetworksService, self).__init__(client) self._upload_configs = { } def AddPeering(self, request, global_params=None): """Adds a peering to the specified network. Args: request: (ComputeNetworksAddPeeringRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('AddPeering') return self._RunMethod( config, request, global_params=global_params) AddPeering.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.networks.addPeering', ordered_params=[u'project', u'network'], path_params=[u'network', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/networks/{network}/addPeering', request_field=u'networksAddPeeringRequest', request_type_name=u'ComputeNetworksAddPeeringRequest', response_type_name=u'Operation', supports_download=False, ) def Delete(self, request, global_params=None): """Deletes the specified network. Args: request: (ComputeNetworksDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.networks.delete', ordered_params=[u'project', u'network'], path_params=[u'network', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/networks/{network}', request_field='', request_type_name=u'ComputeNetworksDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified network. Get a list of available networks by making a list() request. Args: request: (ComputeNetworksGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Network) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.networks.get', ordered_params=[u'project', u'network'], path_params=[u'network', u'project'], query_params=[], relative_path=u'projects/{project}/global/networks/{network}', request_field='', request_type_name=u'ComputeNetworksGetRequest', response_type_name=u'Network', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a network in the specified project using the data included in the request. Args: request: (ComputeNetworksInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.networks.insert', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/networks', request_field=u'network', request_type_name=u'ComputeNetworksInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of networks available to the specified project. Args: request: (ComputeNetworksListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (NetworkList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.networks.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/networks', request_field='', request_type_name=u'ComputeNetworksListRequest', response_type_name=u'NetworkList', supports_download=False, ) def Patch(self, request, global_params=None): """Patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode. Args: request: (ComputeNetworksPatchRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Patch') return self._RunMethod( config, request, global_params=global_params) Patch.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PATCH', method_id=u'compute.networks.patch', ordered_params=[u'project', u'network'], path_params=[u'network', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/networks/{network}', request_field=u'networkResource', request_type_name=u'ComputeNetworksPatchRequest', response_type_name=u'Operation', supports_download=False, ) def RemovePeering(self, request, global_params=None): """Removes a peering from the specified network. Args: request: (ComputeNetworksRemovePeeringRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('RemovePeering') return self._RunMethod( config, request, global_params=global_params) RemovePeering.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.networks.removePeering', ordered_params=[u'project', u'network'], path_params=[u'network', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/networks/{network}/removePeering', request_field=u'networksRemovePeeringRequest', request_type_name=u'ComputeNetworksRemovePeeringRequest', response_type_name=u'Operation', supports_download=False, ) def SwitchToCustomMode(self, request, global_params=None): """Switches the network mode from auto subnet mode to custom subnet mode. Args: request: (ComputeNetworksSwitchToCustomModeRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SwitchToCustomMode') return self._RunMethod( config, request, global_params=global_params) SwitchToCustomMode.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.networks.switchToCustomMode', ordered_params=[u'project', u'network'], path_params=[u'network', u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/networks/{network}/switchToCustomMode', request_field='', request_type_name=u'ComputeNetworksSwitchToCustomModeRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeNetworksTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.networks.testIamPermissions', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/networks/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeNetworksTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class ProjectsService(base_api.BaseApiService): """Service class for the projects resource.""" _NAME = u'projects' def __init__(self, client): super(ComputeBeta.ProjectsService, self).__init__(client) self._upload_configs = { } def DisableXpnHost(self, request, global_params=None): """Disable this project as a shared VPC host project. Args: request: (ComputeProjectsDisableXpnHostRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('DisableXpnHost') return self._RunMethod( config, request, global_params=global_params) DisableXpnHost.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.projects.disableXpnHost', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/disableXpnHost', request_field='', request_type_name=u'ComputeProjectsDisableXpnHostRequest', response_type_name=u'Operation', supports_download=False, ) def DisableXpnResource(self, request, global_params=None): """Disable a serivce resource (a.k.a service project) associated with this host project. Args: request: (ComputeProjectsDisableXpnResourceRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('DisableXpnResource') return self._RunMethod( config, request, global_params=global_params) DisableXpnResource.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.projects.disableXpnResource', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/disableXpnResource', request_field=u'projectsDisableXpnResourceRequest', request_type_name=u'ComputeProjectsDisableXpnResourceRequest', response_type_name=u'Operation', supports_download=False, ) def EnableXpnHost(self, request, global_params=None): """Enable this project as a shared VPC host project. Args: request: (ComputeProjectsEnableXpnHostRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('EnableXpnHost') return self._RunMethod( config, request, global_params=global_params) EnableXpnHost.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.projects.enableXpnHost', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/enableXpnHost', request_field='', request_type_name=u'ComputeProjectsEnableXpnHostRequest', response_type_name=u'Operation', supports_download=False, ) def EnableXpnResource(self, request, global_params=None): """Enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project. Args: request: (ComputeProjectsEnableXpnResourceRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('EnableXpnResource') return self._RunMethod( config, request, global_params=global_params) EnableXpnResource.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.projects.enableXpnResource', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/enableXpnResource', request_field=u'projectsEnableXpnResourceRequest', request_type_name=u'ComputeProjectsEnableXpnResourceRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified Project resource. Args: request: (ComputeProjectsGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Project) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.projects.get', ordered_params=[u'project'], path_params=[u'project'], query_params=[], relative_path=u'projects/{project}', request_field='', request_type_name=u'ComputeProjectsGetRequest', response_type_name=u'Project', supports_download=False, ) def GetXpnHost(self, request, global_params=None): """Get the shared VPC host project that this project links to. May be empty if no link exists. Args: request: (ComputeProjectsGetXpnHostRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Project) The response message. """ config = self.GetMethodConfig('GetXpnHost') return self._RunMethod( config, request, global_params=global_params) GetXpnHost.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.projects.getXpnHost', ordered_params=[u'project'], path_params=[u'project'], query_params=[], relative_path=u'projects/{project}/getXpnHost', request_field='', request_type_name=u'ComputeProjectsGetXpnHostRequest', response_type_name=u'Project', supports_download=False, ) def GetXpnResources(self, request, global_params=None): """Get service resources (a.k.a service project) associated with this host project. Args: request: (ComputeProjectsGetXpnResourcesRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (ProjectsGetXpnResources) The response message. """ config = self.GetMethodConfig('GetXpnResources') return self._RunMethod( config, request, global_params=global_params) GetXpnResources.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.projects.getXpnResources', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'order_by', u'pageToken'], relative_path=u'projects/{project}/getXpnResources', request_field='', request_type_name=u'ComputeProjectsGetXpnResourcesRequest', response_type_name=u'ProjectsGetXpnResources', supports_download=False, ) def ListXpnHosts(self, request, global_params=None): """List all shared VPC host projects visible to the user in an organization. Args: request: (ComputeProjectsListXpnHostsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (XpnHostList) The response message. """ config = self.GetMethodConfig('ListXpnHosts') return self._RunMethod( config, request, global_params=global_params) ListXpnHosts.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.projects.listXpnHosts', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'order_by', u'pageToken'], relative_path=u'projects/{project}/listXpnHosts', request_field=u'projectsListXpnHostsRequest', request_type_name=u'ComputeProjectsListXpnHostsRequest', response_type_name=u'XpnHostList', supports_download=False, ) def MoveDisk(self, request, global_params=None): """Moves a persistent disk from one zone to another. Args: request: (ComputeProjectsMoveDiskRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('MoveDisk') return self._RunMethod( config, request, global_params=global_params) MoveDisk.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.projects.moveDisk', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/moveDisk', request_field=u'diskMoveRequest', request_type_name=u'ComputeProjectsMoveDiskRequest', response_type_name=u'Operation', supports_download=False, ) def MoveInstance(self, request, global_params=None): """Moves an instance and its attached persistent disks from one zone to another. Args: request: (ComputeProjectsMoveInstanceRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('MoveInstance') return self._RunMethod( config, request, global_params=global_params) MoveInstance.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.projects.moveInstance', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/moveInstance', request_field=u'instanceMoveRequest', request_type_name=u'ComputeProjectsMoveInstanceRequest', response_type_name=u'Operation', supports_download=False, ) def SetCommonInstanceMetadata(self, request, global_params=None): """Sets metadata common to all instances within the specified project using the data included in the request. Args: request: (ComputeProjectsSetCommonInstanceMetadataRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetCommonInstanceMetadata') return self._RunMethod( config, request, global_params=global_params) SetCommonInstanceMetadata.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.projects.setCommonInstanceMetadata', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/setCommonInstanceMetadata', request_field=u'metadata', request_type_name=u'ComputeProjectsSetCommonInstanceMetadataRequest', response_type_name=u'Operation', supports_download=False, ) def SetDefaultNetworkTier(self, request, global_params=None): """Sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field. Args: request: (ComputeProjectsSetDefaultNetworkTierRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetDefaultNetworkTier') return self._RunMethod( config, request, global_params=global_params) SetDefaultNetworkTier.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.projects.setDefaultNetworkTier', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/setDefaultNetworkTier', request_field=u'projectsSetDefaultNetworkTierRequest', request_type_name=u'ComputeProjectsSetDefaultNetworkTierRequest', response_type_name=u'Operation', supports_download=False, ) def SetUsageExportBucket(self, request, global_params=None): """Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled. Args: request: (ComputeProjectsSetUsageExportBucketRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetUsageExportBucket') return self._RunMethod( config, request, global_params=global_params) SetUsageExportBucket.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.projects.setUsageExportBucket', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/setUsageExportBucket', request_field=u'usageExportLocation', request_type_name=u'ComputeProjectsSetUsageExportBucketRequest', response_type_name=u'Operation', supports_download=False, ) class RegionAutoscalersService(base_api.BaseApiService): """Service class for the regionAutoscalers resource.""" _NAME = u'regionAutoscalers' def __init__(self, client): super(ComputeBeta.RegionAutoscalersService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): """Deletes the specified autoscaler. Args: request: (ComputeRegionAutoscalersDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.regionAutoscalers.delete', ordered_params=[u'project', u'region', u'autoscaler'], path_params=[u'autoscaler', u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/autoscalers/{autoscaler}', request_field='', request_type_name=u'ComputeRegionAutoscalersDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified autoscaler. Args: request: (ComputeRegionAutoscalersGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Autoscaler) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.regionAutoscalers.get', ordered_params=[u'project', u'region', u'autoscaler'], path_params=[u'autoscaler', u'project', u'region'], query_params=[], relative_path=u'projects/{project}/regions/{region}/autoscalers/{autoscaler}', request_field='', request_type_name=u'ComputeRegionAutoscalersGetRequest', response_type_name=u'Autoscaler', supports_download=False, ) def Insert(self, request, global_params=None): """Creates an autoscaler in the specified project using the data included in the request. Args: request: (ComputeRegionAutoscalersInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.regionAutoscalers.insert', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/autoscalers', request_field=u'autoscaler', request_type_name=u'ComputeRegionAutoscalersInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves a list of autoscalers contained within the specified region. Args: request: (ComputeRegionAutoscalersListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (RegionAutoscalerList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.regionAutoscalers.list', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/regions/{region}/autoscalers', request_field='', request_type_name=u'ComputeRegionAutoscalersListRequest', response_type_name=u'RegionAutoscalerList', supports_download=False, ) def Patch(self, request, global_params=None): """Updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Args: request: (ComputeRegionAutoscalersPatchRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Patch') return self._RunMethod( config, request, global_params=global_params) Patch.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PATCH', method_id=u'compute.regionAutoscalers.patch', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'autoscaler', u'requestId'], relative_path=u'projects/{project}/regions/{region}/autoscalers', request_field=u'autoscalerResource', request_type_name=u'ComputeRegionAutoscalersPatchRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeRegionAutoscalersTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.regionAutoscalers.testIamPermissions', ordered_params=[u'project', u'region', u'resource'], path_params=[u'project', u'region', u'resource'], query_params=[], relative_path=u'projects/{project}/regions/{region}/autoscalers/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeRegionAutoscalersTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) def Update(self, request, global_params=None): """Updates an autoscaler in the specified project using the data included in the request. Args: request: (ComputeRegionAutoscalersUpdateRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Update') return self._RunMethod( config, request, global_params=global_params) Update.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PUT', method_id=u'compute.regionAutoscalers.update', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'autoscaler', u'requestId'], relative_path=u'projects/{project}/regions/{region}/autoscalers', request_field=u'autoscalerResource', request_type_name=u'ComputeRegionAutoscalersUpdateRequest', response_type_name=u'Operation', supports_download=False, ) class RegionBackendServicesService(base_api.BaseApiService): """Service class for the regionBackendServices resource.""" _NAME = u'regionBackendServices' def __init__(self, client): super(ComputeBeta.RegionBackendServicesService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): """Deletes the specified regional BackendService resource. Args: request: (ComputeRegionBackendServicesDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.regionBackendServices.delete', ordered_params=[u'project', u'region', u'backendService'], path_params=[u'backendService', u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/backendServices/{backendService}', request_field='', request_type_name=u'ComputeRegionBackendServicesDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified regional BackendService resource. Args: request: (ComputeRegionBackendServicesGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (BackendService) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.regionBackendServices.get', ordered_params=[u'project', u'region', u'backendService'], path_params=[u'backendService', u'project', u'region'], query_params=[], relative_path=u'projects/{project}/regions/{region}/backendServices/{backendService}', request_field='', request_type_name=u'ComputeRegionBackendServicesGetRequest', response_type_name=u'BackendService', supports_download=False, ) def GetHealth(self, request, global_params=None): """Gets the most recent health check results for this regional BackendService. Args: request: (ComputeRegionBackendServicesGetHealthRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (BackendServiceGroupHealth) The response message. """ config = self.GetMethodConfig('GetHealth') return self._RunMethod( config, request, global_params=global_params) GetHealth.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.regionBackendServices.getHealth', ordered_params=[u'project', u'region', u'backendService'], path_params=[u'backendService', u'project', u'region'], query_params=[], relative_path=u'projects/{project}/regions/{region}/backendServices/{backendService}/getHealth', request_field=u'resourceGroupReference', request_type_name=u'ComputeRegionBackendServicesGetHealthRequest', response_type_name=u'BackendServiceGroupHealth', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a regional BackendService resource in the specified project using the data included in the request. There are several restrictions and guidelines to keep in mind when creating a regional backend service. Read Restrictions and Guidelines for more information. Args: request: (ComputeRegionBackendServicesInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.regionBackendServices.insert', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/backendServices', request_field=u'backendService', request_type_name=u'ComputeRegionBackendServicesInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of regional BackendService resources available to the specified project in the given region. Args: request: (ComputeRegionBackendServicesListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (BackendServiceList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.regionBackendServices.list', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/regions/{region}/backendServices', request_field='', request_type_name=u'ComputeRegionBackendServicesListRequest', response_type_name=u'BackendServiceList', supports_download=False, ) def Patch(self, request, global_params=None): """Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Args: request: (ComputeRegionBackendServicesPatchRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Patch') return self._RunMethod( config, request, global_params=global_params) Patch.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PATCH', method_id=u'compute.regionBackendServices.patch', ordered_params=[u'project', u'region', u'backendService'], path_params=[u'backendService', u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/backendServices/{backendService}', request_field=u'backendServiceResource', request_type_name=u'ComputeRegionBackendServicesPatchRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeRegionBackendServicesTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.regionBackendServices.testIamPermissions', ordered_params=[u'project', u'region', u'resource'], path_params=[u'project', u'region', u'resource'], query_params=[], relative_path=u'projects/{project}/regions/{region}/backendServices/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeRegionBackendServicesTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) def Update(self, request, global_params=None): """Updates the specified regional BackendService resource with the data included in the request. There are several restrictions and guidelines to keep in mind when updating a backend service. Read Restrictions and Guidelines for more information. Args: request: (ComputeRegionBackendServicesUpdateRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Update') return self._RunMethod( config, request, global_params=global_params) Update.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PUT', method_id=u'compute.regionBackendServices.update', ordered_params=[u'project', u'region', u'backendService'], path_params=[u'backendService', u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/backendServices/{backendService}', request_field=u'backendServiceResource', request_type_name=u'ComputeRegionBackendServicesUpdateRequest', response_type_name=u'Operation', supports_download=False, ) class RegionCommitmentsService(base_api.BaseApiService): """Service class for the regionCommitments resource.""" _NAME = u'regionCommitments' def __init__(self, client): super(ComputeBeta.RegionCommitmentsService, self).__init__(client) self._upload_configs = { } def AggregatedList(self, request, global_params=None): """Retrieves an aggregated list of commitments. Args: request: (ComputeRegionCommitmentsAggregatedListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (CommitmentAggregatedList) The response message. """ config = self.GetMethodConfig('AggregatedList') return self._RunMethod( config, request, global_params=global_params) AggregatedList.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.regionCommitments.aggregatedList', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/aggregated/commitments', request_field='', request_type_name=u'ComputeRegionCommitmentsAggregatedListRequest', response_type_name=u'CommitmentAggregatedList', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified commitment resource. Get a list of available commitments by making a list() request. Args: request: (ComputeRegionCommitmentsGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Commitment) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.regionCommitments.get', ordered_params=[u'project', u'region', u'commitment'], path_params=[u'commitment', u'project', u'region'], query_params=[], relative_path=u'projects/{project}/regions/{region}/commitments/{commitment}', request_field='', request_type_name=u'ComputeRegionCommitmentsGetRequest', response_type_name=u'Commitment', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a commitment in the specified project using the data included in the request. Args: request: (ComputeRegionCommitmentsInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.regionCommitments.insert', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/commitments', request_field=u'commitment', request_type_name=u'ComputeRegionCommitmentsInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves a list of commitments contained within the specified region. Args: request: (ComputeRegionCommitmentsListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (CommitmentList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.regionCommitments.list', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/regions/{region}/commitments', request_field='', request_type_name=u'ComputeRegionCommitmentsListRequest', response_type_name=u'CommitmentList', supports_download=False, ) class RegionInstanceGroupManagersService(base_api.BaseApiService): """Service class for the regionInstanceGroupManagers resource.""" _NAME = u'regionInstanceGroupManagers' def __init__(self, client): super(ComputeBeta.RegionInstanceGroupManagersService, self).__init__(client) self._upload_configs = { } def AbandonInstances(self, request, global_params=None): """Schedules a group action to remove the specified instances from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request. Args: request: (ComputeRegionInstanceGroupManagersAbandonInstancesRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('AbandonInstances') return self._RunMethod( config, request, global_params=global_params) AbandonInstances.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.regionInstanceGroupManagers.abandonInstances', ordered_params=[u'project', u'region', u'instanceGroupManager'], path_params=[u'instanceGroupManager', u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances', request_field=u'regionInstanceGroupManagersAbandonInstancesRequest', request_type_name=u'ComputeRegionInstanceGroupManagersAbandonInstancesRequest', response_type_name=u'Operation', supports_download=False, ) def Delete(self, request, global_params=None): """Deletes the specified managed instance group and all of the instances in that group. Args: request: (ComputeRegionInstanceGroupManagersDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.regionInstanceGroupManagers.delete', ordered_params=[u'project', u'region', u'instanceGroupManager'], path_params=[u'instanceGroupManager', u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}', request_field='', request_type_name=u'ComputeRegionInstanceGroupManagersDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def DeleteInstances(self, request, global_params=None): """Schedules a group action to delete the specified instances in the managed instance group. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request. Args: request: (ComputeRegionInstanceGroupManagersDeleteInstancesRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('DeleteInstances') return self._RunMethod( config, request, global_params=global_params) DeleteInstances.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.regionInstanceGroupManagers.deleteInstances', ordered_params=[u'project', u'region', u'instanceGroupManager'], path_params=[u'instanceGroupManager', u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances', request_field=u'regionInstanceGroupManagersDeleteInstancesRequest', request_type_name=u'ComputeRegionInstanceGroupManagersDeleteInstancesRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns all of the details about the specified managed instance group. Args: request: (ComputeRegionInstanceGroupManagersGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (InstanceGroupManager) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.regionInstanceGroupManagers.get', ordered_params=[u'project', u'region', u'instanceGroupManager'], path_params=[u'instanceGroupManager', u'project', u'region'], query_params=[], relative_path=u'projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}', request_field='', request_type_name=u'ComputeRegionInstanceGroupManagersGetRequest', response_type_name=u'InstanceGroupManager', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a managed instance group using the information that you specify in the request. After the group is created, it schedules an action to create instances in the group using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A regional managed instance group can contain up to 2000 instances. Args: request: (ComputeRegionInstanceGroupManagersInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.regionInstanceGroupManagers.insert', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/instanceGroupManagers', request_field=u'instanceGroupManager', request_type_name=u'ComputeRegionInstanceGroupManagersInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of managed instance groups that are contained within the specified region. Args: request: (ComputeRegionInstanceGroupManagersListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (RegionInstanceGroupManagerList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.regionInstanceGroupManagers.list', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/regions/{region}/instanceGroupManagers', request_field='', request_type_name=u'ComputeRegionInstanceGroupManagersListRequest', response_type_name=u'RegionInstanceGroupManagerList', supports_download=False, ) def ListManagedInstances(self, request, global_params=None): """Lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. Args: request: (ComputeRegionInstanceGroupManagersListManagedInstancesRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (RegionInstanceGroupManagersListInstancesResponse) The response message. """ config = self.GetMethodConfig('ListManagedInstances') return self._RunMethod( config, request, global_params=global_params) ListManagedInstances.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.regionInstanceGroupManagers.listManagedInstances', ordered_params=[u'project', u'region', u'instanceGroupManager'], path_params=[u'instanceGroupManager', u'project', u'region'], query_params=[u'filter', u'maxResults', u'order_by', u'pageToken'], relative_path=u'projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances', request_field='', request_type_name=u'ComputeRegionInstanceGroupManagersListManagedInstancesRequest', response_type_name=u'RegionInstanceGroupManagersListInstancesResponse', supports_download=False, ) def Patch(self, request, global_params=None): """Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Args: request: (ComputeRegionInstanceGroupManagersPatchRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Patch') return self._RunMethod( config, request, global_params=global_params) Patch.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PATCH', method_id=u'compute.regionInstanceGroupManagers.patch', ordered_params=[u'project', u'region', u'instanceGroupManager'], path_params=[u'instanceGroupManager', u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}', request_field=u'instanceGroupManagerResource', request_type_name=u'ComputeRegionInstanceGroupManagersPatchRequest', response_type_name=u'Operation', supports_download=False, ) def RecreateInstances(self, request, global_params=None): """Schedules a group action to recreate the specified instances in the managed instance group. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the action is scheduled even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request. Args: request: (ComputeRegionInstanceGroupManagersRecreateInstancesRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('RecreateInstances') return self._RunMethod( config, request, global_params=global_params) RecreateInstances.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.regionInstanceGroupManagers.recreateInstances', ordered_params=[u'project', u'region', u'instanceGroupManager'], path_params=[u'instanceGroupManager', u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances', request_field=u'regionInstanceGroupManagersRecreateRequest', request_type_name=u'ComputeRegionInstanceGroupManagersRecreateInstancesRequest', response_type_name=u'Operation', supports_download=False, ) def Resize(self, request, global_params=None): """Changes the intended size for the managed instance group. If you increase the size, the group schedules actions to create new instances using the current instance template. If you decrease the size, the group schedules delete actions on one or more instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. Args: request: (ComputeRegionInstanceGroupManagersResizeRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Resize') return self._RunMethod( config, request, global_params=global_params) Resize.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.regionInstanceGroupManagers.resize', ordered_params=[u'project', u'region', u'instanceGroupManager', u'size'], path_params=[u'instanceGroupManager', u'project', u'region'], query_params=[u'requestId', u'size'], relative_path=u'projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize', request_field='', request_type_name=u'ComputeRegionInstanceGroupManagersResizeRequest', response_type_name=u'Operation', supports_download=False, ) def SetAutoHealingPolicies(self, request, global_params=None): """Modifies the autohealing policy for the instances in this managed instance group. Args: request: (ComputeRegionInstanceGroupManagersSetAutoHealingPoliciesRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetAutoHealingPolicies') return self._RunMethod( config, request, global_params=global_params) SetAutoHealingPolicies.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.regionInstanceGroupManagers.setAutoHealingPolicies', ordered_params=[u'project', u'region', u'instanceGroupManager'], path_params=[u'instanceGroupManager', u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setAutoHealingPolicies', request_field=u'regionInstanceGroupManagersSetAutoHealingRequest', request_type_name=u'ComputeRegionInstanceGroupManagersSetAutoHealingPoliciesRequest', response_type_name=u'Operation', supports_download=False, ) def SetInstanceTemplate(self, request, global_params=None): """Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected. Args: request: (ComputeRegionInstanceGroupManagersSetInstanceTemplateRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetInstanceTemplate') return self._RunMethod( config, request, global_params=global_params) SetInstanceTemplate.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.regionInstanceGroupManagers.setInstanceTemplate', ordered_params=[u'project', u'region', u'instanceGroupManager'], path_params=[u'instanceGroupManager', u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate', request_field=u'regionInstanceGroupManagersSetTemplateRequest', request_type_name=u'ComputeRegionInstanceGroupManagersSetInstanceTemplateRequest', response_type_name=u'Operation', supports_download=False, ) def SetTargetPools(self, request, global_params=None): """Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected. Args: request: (ComputeRegionInstanceGroupManagersSetTargetPoolsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetTargetPools') return self._RunMethod( config, request, global_params=global_params) SetTargetPools.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.regionInstanceGroupManagers.setTargetPools', ordered_params=[u'project', u'region', u'instanceGroupManager'], path_params=[u'instanceGroupManager', u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools', request_field=u'regionInstanceGroupManagersSetTargetPoolsRequest', request_type_name=u'ComputeRegionInstanceGroupManagersSetTargetPoolsRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeRegionInstanceGroupManagersTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.regionInstanceGroupManagers.testIamPermissions', ordered_params=[u'project', u'region', u'resource'], path_params=[u'project', u'region', u'resource'], query_params=[], relative_path=u'projects/{project}/regions/{region}/instanceGroupManagers/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeRegionInstanceGroupManagersTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) def Update(self, request, global_params=None): """Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listmanagedinstances method. Args: request: (ComputeRegionInstanceGroupManagersUpdateRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Update') return self._RunMethod( config, request, global_params=global_params) Update.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PUT', method_id=u'compute.regionInstanceGroupManagers.update', ordered_params=[u'project', u'region', u'instanceGroupManager'], path_params=[u'instanceGroupManager', u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}', request_field=u'instanceGroupManagerResource', request_type_name=u'ComputeRegionInstanceGroupManagersUpdateRequest', response_type_name=u'Operation', supports_download=False, ) class RegionInstanceGroupsService(base_api.BaseApiService): """Service class for the regionInstanceGroups resource.""" _NAME = u'regionInstanceGroups' def __init__(self, client): super(ComputeBeta.RegionInstanceGroupsService, self).__init__(client) self._upload_configs = { } def Get(self, request, global_params=None): """Returns the specified instance group resource. Args: request: (ComputeRegionInstanceGroupsGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (InstanceGroup) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.regionInstanceGroups.get', ordered_params=[u'project', u'region', u'instanceGroup'], path_params=[u'instanceGroup', u'project', u'region'], query_params=[], relative_path=u'projects/{project}/regions/{region}/instanceGroups/{instanceGroup}', request_field='', request_type_name=u'ComputeRegionInstanceGroupsGetRequest', response_type_name=u'InstanceGroup', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of instance group resources contained within the specified region. Args: request: (ComputeRegionInstanceGroupsListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (RegionInstanceGroupList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.regionInstanceGroups.list', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/regions/{region}/instanceGroups', request_field='', request_type_name=u'ComputeRegionInstanceGroupsListRequest', response_type_name=u'RegionInstanceGroupList', supports_download=False, ) def ListInstances(self, request, global_params=None): """Lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running. Args: request: (ComputeRegionInstanceGroupsListInstancesRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (RegionInstanceGroupsListInstances) The response message. """ config = self.GetMethodConfig('ListInstances') return self._RunMethod( config, request, global_params=global_params) ListInstances.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.regionInstanceGroups.listInstances', ordered_params=[u'project', u'region', u'instanceGroup'], path_params=[u'instanceGroup', u'project', u'region'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/listInstances', request_field=u'regionInstanceGroupsListInstancesRequest', request_type_name=u'ComputeRegionInstanceGroupsListInstancesRequest', response_type_name=u'RegionInstanceGroupsListInstances', supports_download=False, ) def SetNamedPorts(self, request, global_params=None): """Sets the named ports for the specified regional instance group. Args: request: (ComputeRegionInstanceGroupsSetNamedPortsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetNamedPorts') return self._RunMethod( config, request, global_params=global_params) SetNamedPorts.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.regionInstanceGroups.setNamedPorts', ordered_params=[u'project', u'region', u'instanceGroup'], path_params=[u'instanceGroup', u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/instanceGroups/{instanceGroup}/setNamedPorts', request_field=u'regionInstanceGroupsSetNamedPortsRequest', request_type_name=u'ComputeRegionInstanceGroupsSetNamedPortsRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeRegionInstanceGroupsTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.regionInstanceGroups.testIamPermissions', ordered_params=[u'project', u'region', u'resource'], path_params=[u'project', u'region', u'resource'], query_params=[], relative_path=u'projects/{project}/regions/{region}/instanceGroups/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeRegionInstanceGroupsTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class RegionOperationsService(base_api.BaseApiService): """Service class for the regionOperations resource.""" _NAME = u'regionOperations' def __init__(self, client): super(ComputeBeta.RegionOperationsService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): """Deletes the specified region-specific Operations resource. Args: request: (ComputeRegionOperationsDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (ComputeRegionOperationsDeleteResponse) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.regionOperations.delete', ordered_params=[u'project', u'region', u'operation'], path_params=[u'operation', u'project', u'region'], query_params=[], relative_path=u'projects/{project}/regions/{region}/operations/{operation}', request_field='', request_type_name=u'ComputeRegionOperationsDeleteRequest', response_type_name=u'ComputeRegionOperationsDeleteResponse', supports_download=False, ) def Get(self, request, global_params=None): """Retrieves the specified region-specific Operations resource. Args: request: (ComputeRegionOperationsGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.regionOperations.get', ordered_params=[u'project', u'region', u'operation'], path_params=[u'operation', u'project', u'region'], query_params=[], relative_path=u'projects/{project}/regions/{region}/operations/{operation}', request_field='', request_type_name=u'ComputeRegionOperationsGetRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves a list of Operation resources contained within the specified region. Args: request: (ComputeRegionOperationsListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (OperationList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.regionOperations.list', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/regions/{region}/operations', request_field='', request_type_name=u'ComputeRegionOperationsListRequest', response_type_name=u'OperationList', supports_download=False, ) class RegionsService(base_api.BaseApiService): """Service class for the regions resource.""" _NAME = u'regions' def __init__(self, client): super(ComputeBeta.RegionsService, self).__init__(client) self._upload_configs = { } def Get(self, request, global_params=None): """Returns the specified Region resource. Get a list of available regions by making a list() request. Args: request: (ComputeRegionsGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Region) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.regions.get', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[], relative_path=u'projects/{project}/regions/{region}', request_field='', request_type_name=u'ComputeRegionsGetRequest', response_type_name=u'Region', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of region resources available to the specified project. Args: request: (ComputeRegionsListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (RegionList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.regions.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/regions', request_field='', request_type_name=u'ComputeRegionsListRequest', response_type_name=u'RegionList', supports_download=False, ) class RoutersService(base_api.BaseApiService): """Service class for the routers resource.""" _NAME = u'routers' def __init__(self, client): super(ComputeBeta.RoutersService, self).__init__(client) self._upload_configs = { } def AggregatedList(self, request, global_params=None): """Retrieves an aggregated list of routers. Args: request: (ComputeRoutersAggregatedListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (RouterAggregatedList) The response message. """ config = self.GetMethodConfig('AggregatedList') return self._RunMethod( config, request, global_params=global_params) AggregatedList.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.routers.aggregatedList', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/aggregated/routers', request_field='', request_type_name=u'ComputeRoutersAggregatedListRequest', response_type_name=u'RouterAggregatedList', supports_download=False, ) def Delete(self, request, global_params=None): """Deletes the specified Router resource. Args: request: (ComputeRoutersDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.routers.delete', ordered_params=[u'project', u'region', u'router'], path_params=[u'project', u'region', u'router'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/routers/{router}', request_field='', request_type_name=u'ComputeRoutersDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified Router resource. Get a list of available routers by making a list() request. Args: request: (ComputeRoutersGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Router) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.routers.get', ordered_params=[u'project', u'region', u'router'], path_params=[u'project', u'region', u'router'], query_params=[], relative_path=u'projects/{project}/regions/{region}/routers/{router}', request_field='', request_type_name=u'ComputeRoutersGetRequest', response_type_name=u'Router', supports_download=False, ) def GetRouterStatus(self, request, global_params=None): """Retrieves runtime information of the specified router. Args: request: (ComputeRoutersGetRouterStatusRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (RouterStatusResponse) The response message. """ config = self.GetMethodConfig('GetRouterStatus') return self._RunMethod( config, request, global_params=global_params) GetRouterStatus.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.routers.getRouterStatus', ordered_params=[u'project', u'region', u'router'], path_params=[u'project', u'region', u'router'], query_params=[], relative_path=u'projects/{project}/regions/{region}/routers/{router}/getRouterStatus', request_field='', request_type_name=u'ComputeRoutersGetRouterStatusRequest', response_type_name=u'RouterStatusResponse', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a Router resource in the specified project and region using the data included in the request. Args: request: (ComputeRoutersInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.routers.insert', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/routers', request_field=u'router', request_type_name=u'ComputeRoutersInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves a list of Router resources available to the specified project. Args: request: (ComputeRoutersListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (RouterList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.routers.list', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/regions/{region}/routers', request_field='', request_type_name=u'ComputeRoutersListRequest', response_type_name=u'RouterList', supports_download=False, ) def Patch(self, request, global_params=None): """Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. Args: request: (ComputeRoutersPatchRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Patch') return self._RunMethod( config, request, global_params=global_params) Patch.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PATCH', method_id=u'compute.routers.patch', ordered_params=[u'project', u'region', u'router'], path_params=[u'project', u'region', u'router'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/routers/{router}', request_field=u'routerResource', request_type_name=u'ComputeRoutersPatchRequest', response_type_name=u'Operation', supports_download=False, ) def Preview(self, request, global_params=None): """Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router. Args: request: (ComputeRoutersPreviewRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (RoutersPreviewResponse) The response message. """ config = self.GetMethodConfig('Preview') return self._RunMethod( config, request, global_params=global_params) Preview.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.routers.preview', ordered_params=[u'project', u'region', u'router'], path_params=[u'project', u'region', u'router'], query_params=[], relative_path=u'projects/{project}/regions/{region}/routers/{router}/preview', request_field=u'routerResource', request_type_name=u'ComputeRoutersPreviewRequest', response_type_name=u'RoutersPreviewResponse', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeRoutersTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.routers.testIamPermissions', ordered_params=[u'project', u'region', u'resource'], path_params=[u'project', u'region', u'resource'], query_params=[], relative_path=u'projects/{project}/regions/{region}/routers/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeRoutersTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) def Update(self, request, global_params=None): """Updates the specified Router resource with the data included in the request. Args: request: (ComputeRoutersUpdateRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Update') return self._RunMethod( config, request, global_params=global_params) Update.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PUT', method_id=u'compute.routers.update', ordered_params=[u'project', u'region', u'router'], path_params=[u'project', u'region', u'router'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/routers/{router}', request_field=u'routerResource', request_type_name=u'ComputeRoutersUpdateRequest', response_type_name=u'Operation', supports_download=False, ) class RoutesService(base_api.BaseApiService): """Service class for the routes resource.""" _NAME = u'routes' def __init__(self, client): super(ComputeBeta.RoutesService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): """Deletes the specified Route resource. Args: request: (ComputeRoutesDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.routes.delete', ordered_params=[u'project', u'route'], path_params=[u'project', u'route'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/routes/{route}', request_field='', request_type_name=u'ComputeRoutesDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified Route resource. Get a list of available routes by making a list() request. Args: request: (ComputeRoutesGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Route) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.routes.get', ordered_params=[u'project', u'route'], path_params=[u'project', u'route'], query_params=[], relative_path=u'projects/{project}/global/routes/{route}', request_field='', request_type_name=u'ComputeRoutesGetRequest', response_type_name=u'Route', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a Route resource in the specified project using the data included in the request. Args: request: (ComputeRoutesInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.routes.insert', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/routes', request_field=u'route', request_type_name=u'ComputeRoutesInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of Route resources available to the specified project. Args: request: (ComputeRoutesListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (RouteList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.routes.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/routes', request_field='', request_type_name=u'ComputeRoutesListRequest', response_type_name=u'RouteList', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeRoutesTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.routes.testIamPermissions', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/routes/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeRoutesTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class SecurityPoliciesService(base_api.BaseApiService): """Service class for the securityPolicies resource.""" _NAME = u'securityPolicies' def __init__(self, client): super(ComputeBeta.SecurityPoliciesService, self).__init__(client) self._upload_configs = { } def AddRule(self, request, global_params=None): """Inserts a rule into a security policy. Args: request: (ComputeSecurityPoliciesAddRuleRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('AddRule') return self._RunMethod( config, request, global_params=global_params) AddRule.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.securityPolicies.addRule', ordered_params=[u'project', u'securityPolicy'], path_params=[u'project', u'securityPolicy'], query_params=[], relative_path=u'projects/{project}/global/securityPolicies/{securityPolicy}/addRule', request_field=u'securityPolicyRule', request_type_name=u'ComputeSecurityPoliciesAddRuleRequest', response_type_name=u'Operation', supports_download=False, ) def Delete(self, request, global_params=None): """Deletes the specified policy. Args: request: (ComputeSecurityPoliciesDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.securityPolicies.delete', ordered_params=[u'project', u'securityPolicy'], path_params=[u'project', u'securityPolicy'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/securityPolicies/{securityPolicy}', request_field='', request_type_name=u'ComputeSecurityPoliciesDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """List all of the ordered rules present in a single specified policy. Args: request: (ComputeSecurityPoliciesGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (SecurityPolicy) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.securityPolicies.get', ordered_params=[u'project', u'securityPolicy'], path_params=[u'project', u'securityPolicy'], query_params=[], relative_path=u'projects/{project}/global/securityPolicies/{securityPolicy}', request_field='', request_type_name=u'ComputeSecurityPoliciesGetRequest', response_type_name=u'SecurityPolicy', supports_download=False, ) def GetRule(self, request, global_params=None): """Gets a rule at the specified priority. Args: request: (ComputeSecurityPoliciesGetRuleRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (SecurityPolicyRule) The response message. """ config = self.GetMethodConfig('GetRule') return self._RunMethod( config, request, global_params=global_params) GetRule.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.securityPolicies.getRule', ordered_params=[u'project', u'securityPolicy'], path_params=[u'project', u'securityPolicy'], query_params=[u'priority'], relative_path=u'projects/{project}/global/securityPolicies/{securityPolicy}/getRule', request_field='', request_type_name=u'ComputeSecurityPoliciesGetRuleRequest', response_type_name=u'SecurityPolicyRule', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a new policy in the specified project using the data included in the request. Args: request: (ComputeSecurityPoliciesInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.securityPolicies.insert', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/securityPolicies', request_field=u'securityPolicy', request_type_name=u'ComputeSecurityPoliciesInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """List all the policies that have been configured for the specified project. Args: request: (ComputeSecurityPoliciesListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (SecurityPolicyList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.securityPolicies.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/securityPolicies', request_field='', request_type_name=u'ComputeSecurityPoliciesListRequest', response_type_name=u'SecurityPolicyList', supports_download=False, ) def Patch(self, request, global_params=None): """Patches the specified policy with the data included in the request. Args: request: (ComputeSecurityPoliciesPatchRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Patch') return self._RunMethod( config, request, global_params=global_params) Patch.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PATCH', method_id=u'compute.securityPolicies.patch', ordered_params=[u'project', u'securityPolicy'], path_params=[u'project', u'securityPolicy'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/securityPolicies/{securityPolicy}', request_field=u'securityPolicyResource', request_type_name=u'ComputeSecurityPoliciesPatchRequest', response_type_name=u'Operation', supports_download=False, ) def PatchRule(self, request, global_params=None): """Patches a rule at the specified priority. Args: request: (ComputeSecurityPoliciesPatchRuleRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('PatchRule') return self._RunMethod( config, request, global_params=global_params) PatchRule.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.securityPolicies.patchRule', ordered_params=[u'project', u'securityPolicy'], path_params=[u'project', u'securityPolicy'], query_params=[u'priority'], relative_path=u'projects/{project}/global/securityPolicies/{securityPolicy}/patchRule', request_field=u'securityPolicyRule', request_type_name=u'ComputeSecurityPoliciesPatchRuleRequest', response_type_name=u'Operation', supports_download=False, ) def RemoveRule(self, request, global_params=None): """Deletes a rule at the specified priority. Args: request: (ComputeSecurityPoliciesRemoveRuleRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('RemoveRule') return self._RunMethod( config, request, global_params=global_params) RemoveRule.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.securityPolicies.removeRule', ordered_params=[u'project', u'securityPolicy'], path_params=[u'project', u'securityPolicy'], query_params=[u'priority'], relative_path=u'projects/{project}/global/securityPolicies/{securityPolicy}/removeRule', request_field='', request_type_name=u'ComputeSecurityPoliciesRemoveRuleRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeSecurityPoliciesTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.securityPolicies.testIamPermissions', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/securityPolicies/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeSecurityPoliciesTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class SnapshotsService(base_api.BaseApiService): """Service class for the snapshots resource.""" _NAME = u'snapshots' def __init__(self, client): super(ComputeBeta.SnapshotsService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): """Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot. For more information, see Deleting snaphots. Args: request: (ComputeSnapshotsDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.snapshots.delete', ordered_params=[u'project', u'snapshot'], path_params=[u'project', u'snapshot'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/snapshots/{snapshot}', request_field='', request_type_name=u'ComputeSnapshotsDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified Snapshot resource. Get a list of available snapshots by making a list() request. Args: request: (ComputeSnapshotsGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Snapshot) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.snapshots.get', ordered_params=[u'project', u'snapshot'], path_params=[u'project', u'snapshot'], query_params=[], relative_path=u'projects/{project}/global/snapshots/{snapshot}', request_field='', request_type_name=u'ComputeSnapshotsGetRequest', response_type_name=u'Snapshot', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of Snapshot resources contained within the specified project. Args: request: (ComputeSnapshotsListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (SnapshotList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.snapshots.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/snapshots', request_field='', request_type_name=u'ComputeSnapshotsListRequest', response_type_name=u'SnapshotList', supports_download=False, ) def SetLabels(self, request, global_params=None): """Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation. Args: request: (ComputeSnapshotsSetLabelsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetLabels') return self._RunMethod( config, request, global_params=global_params) SetLabels.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.snapshots.setLabels', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/snapshots/{resource}/setLabels', request_field=u'globalSetLabelsRequest', request_type_name=u'ComputeSnapshotsSetLabelsRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeSnapshotsTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.snapshots.testIamPermissions', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/snapshots/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeSnapshotsTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class SslCertificatesService(base_api.BaseApiService): """Service class for the sslCertificates resource.""" _NAME = u'sslCertificates' def __init__(self, client): super(ComputeBeta.SslCertificatesService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): """Deletes the specified SslCertificate resource. Args: request: (ComputeSslCertificatesDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.sslCertificates.delete', ordered_params=[u'project', u'sslCertificate'], path_params=[u'project', u'sslCertificate'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/sslCertificates/{sslCertificate}', request_field='', request_type_name=u'ComputeSslCertificatesDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified SslCertificate resource. Get a list of available SSL certificates by making a list() request. Args: request: (ComputeSslCertificatesGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (SslCertificate) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.sslCertificates.get', ordered_params=[u'project', u'sslCertificate'], path_params=[u'project', u'sslCertificate'], query_params=[], relative_path=u'projects/{project}/global/sslCertificates/{sslCertificate}', request_field='', request_type_name=u'ComputeSslCertificatesGetRequest', response_type_name=u'SslCertificate', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a SslCertificate resource in the specified project using the data included in the request. Args: request: (ComputeSslCertificatesInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.sslCertificates.insert', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/sslCertificates', request_field=u'sslCertificate', request_type_name=u'ComputeSslCertificatesInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of SslCertificate resources available to the specified project. Args: request: (ComputeSslCertificatesListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (SslCertificateList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.sslCertificates.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/sslCertificates', request_field='', request_type_name=u'ComputeSslCertificatesListRequest', response_type_name=u'SslCertificateList', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeSslCertificatesTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.sslCertificates.testIamPermissions', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/sslCertificates/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeSslCertificatesTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class SslPoliciesService(base_api.BaseApiService): """Service class for the sslPolicies resource.""" _NAME = u'sslPolicies' def __init__(self, client): super(ComputeBeta.SslPoliciesService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): """Deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use by any TargetHttpsProxy or TargetSslProxy resources. Args: request: (ComputeSslPoliciesDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.sslPolicies.delete', ordered_params=[u'project', u'sslPolicy'], path_params=[u'project', u'sslPolicy'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/sslPolicies/{sslPolicy}', request_field='', request_type_name=u'ComputeSslPoliciesDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """List all of the ordered rules present in a single specified policy. Args: request: (ComputeSslPoliciesGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (SslPolicy) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.sslPolicies.get', ordered_params=[u'project', u'sslPolicy'], path_params=[u'project', u'sslPolicy'], query_params=[], relative_path=u'projects/{project}/global/sslPolicies/{sslPolicy}', request_field='', request_type_name=u'ComputeSslPoliciesGetRequest', response_type_name=u'SslPolicy', supports_download=False, ) def Insert(self, request, global_params=None): """Returns the specified SSL policy resource. Get a list of available SSL policies by making a list() request. Args: request: (ComputeSslPoliciesInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.sslPolicies.insert', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/sslPolicies', request_field=u'sslPolicy', request_type_name=u'ComputeSslPoliciesInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """List all the SSL policies that have been configured for the specified project. Args: request: (ComputeSslPoliciesListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (SslPoliciesList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.sslPolicies.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/sslPolicies', request_field='', request_type_name=u'ComputeSslPoliciesListRequest', response_type_name=u'SslPoliciesList', supports_download=False, ) def ListAvailableFeatures(self, request, global_params=None): """Lists all features that can be specified in the SSL policy when using custom profile. Args: request: (ComputeSslPoliciesListAvailableFeaturesRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (SslPoliciesListAvailableFeaturesResponse) The response message. """ config = self.GetMethodConfig('ListAvailableFeatures') return self._RunMethod( config, request, global_params=global_params) ListAvailableFeatures.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.sslPolicies.listAvailableFeatures', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/sslPolicies/listAvailableFeatures', request_field='', request_type_name=u'ComputeSslPoliciesListAvailableFeaturesRequest', response_type_name=u'SslPoliciesListAvailableFeaturesResponse', supports_download=False, ) def Patch(self, request, global_params=None): """Patches the specified SSL policy with the data included in the request. Args: request: (ComputeSslPoliciesPatchRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Patch') return self._RunMethod( config, request, global_params=global_params) Patch.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PATCH', method_id=u'compute.sslPolicies.patch', ordered_params=[u'project', u'sslPolicy'], path_params=[u'project', u'sslPolicy'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/sslPolicies/{sslPolicy}', request_field=u'sslPolicyResource', request_type_name=u'ComputeSslPoliciesPatchRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeSslPoliciesTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.sslPolicies.testIamPermissions', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/sslPolicies/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeSslPoliciesTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class SubnetworksService(base_api.BaseApiService): """Service class for the subnetworks resource.""" _NAME = u'subnetworks' def __init__(self, client): super(ComputeBeta.SubnetworksService, self).__init__(client) self._upload_configs = { } def AggregatedList(self, request, global_params=None): """Retrieves an aggregated list of subnetworks. Args: request: (ComputeSubnetworksAggregatedListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (SubnetworkAggregatedList) The response message. """ config = self.GetMethodConfig('AggregatedList') return self._RunMethod( config, request, global_params=global_params) AggregatedList.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.subnetworks.aggregatedList', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/aggregated/subnetworks', request_field='', request_type_name=u'ComputeSubnetworksAggregatedListRequest', response_type_name=u'SubnetworkAggregatedList', supports_download=False, ) def Delete(self, request, global_params=None): """Deletes the specified subnetwork. Args: request: (ComputeSubnetworksDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.subnetworks.delete', ordered_params=[u'project', u'region', u'subnetwork'], path_params=[u'project', u'region', u'subnetwork'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/subnetworks/{subnetwork}', request_field='', request_type_name=u'ComputeSubnetworksDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def ExpandIpCidrRange(self, request, global_params=None): """Expands the IP CIDR range of the subnetwork to a specified value. Args: request: (ComputeSubnetworksExpandIpCidrRangeRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('ExpandIpCidrRange') return self._RunMethod( config, request, global_params=global_params) ExpandIpCidrRange.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.subnetworks.expandIpCidrRange', ordered_params=[u'project', u'region', u'subnetwork'], path_params=[u'project', u'region', u'subnetwork'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/subnetworks/{subnetwork}/expandIpCidrRange', request_field=u'subnetworksExpandIpCidrRangeRequest', request_type_name=u'ComputeSubnetworksExpandIpCidrRangeRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified subnetwork. Get a list of available subnetworks list() request. Args: request: (ComputeSubnetworksGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Subnetwork) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.subnetworks.get', ordered_params=[u'project', u'region', u'subnetwork'], path_params=[u'project', u'region', u'subnetwork'], query_params=[], relative_path=u'projects/{project}/regions/{region}/subnetworks/{subnetwork}', request_field='', request_type_name=u'ComputeSubnetworksGetRequest', response_type_name=u'Subnetwork', supports_download=False, ) def GetIamPolicy(self, request, global_params=None): """Gets the access control policy for a resource. May be empty if no such policy or resource exists. Args: request: (ComputeSubnetworksGetIamPolicyRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Policy) The response message. """ config = self.GetMethodConfig('GetIamPolicy') return self._RunMethod( config, request, global_params=global_params) GetIamPolicy.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.subnetworks.getIamPolicy', ordered_params=[u'project', u'region', u'resource'], path_params=[u'project', u'region', u'resource'], query_params=[], relative_path=u'projects/{project}/regions/{region}/subnetworks/{resource}/getIamPolicy', request_field='', request_type_name=u'ComputeSubnetworksGetIamPolicyRequest', response_type_name=u'Policy', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a subnetwork in the specified project using the data included in the request. Args: request: (ComputeSubnetworksInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.subnetworks.insert', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/subnetworks', request_field=u'subnetwork', request_type_name=u'ComputeSubnetworksInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves a list of subnetworks available to the specified project. Args: request: (ComputeSubnetworksListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (SubnetworkList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.subnetworks.list', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/regions/{region}/subnetworks', request_field='', request_type_name=u'ComputeSubnetworksListRequest', response_type_name=u'SubnetworkList', supports_download=False, ) def Patch(self, request, global_params=None): """Patches the specified subnetwork with the data included in the request. Only the following fields within the subnetwork resource can be specified in the request: secondary_ip_range and allow_subnet_cidr_routes_overlap. It is also mandatory to specify the current fingeprint of the subnetwork resource being patched. Args: request: (ComputeSubnetworksPatchRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Patch') return self._RunMethod( config, request, global_params=global_params) Patch.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PATCH', method_id=u'compute.subnetworks.patch', ordered_params=[u'project', u'region', u'subnetwork'], path_params=[u'project', u'region', u'subnetwork'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/subnetworks/{subnetwork}', request_field=u'subnetworkResource', request_type_name=u'ComputeSubnetworksPatchRequest', response_type_name=u'Operation', supports_download=False, ) def SetIamPolicy(self, request, global_params=None): """Sets the access control policy on the specified resource. Replaces any existing policy. Args: request: (ComputeSubnetworksSetIamPolicyRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Policy) The response message. """ config = self.GetMethodConfig('SetIamPolicy') return self._RunMethod( config, request, global_params=global_params) SetIamPolicy.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.subnetworks.setIamPolicy', ordered_params=[u'project', u'region', u'resource'], path_params=[u'project', u'region', u'resource'], query_params=[], relative_path=u'projects/{project}/regions/{region}/subnetworks/{resource}/setIamPolicy', request_field=u'policy', request_type_name=u'ComputeSubnetworksSetIamPolicyRequest', response_type_name=u'Policy', supports_download=False, ) def SetPrivateIpGoogleAccess(self, request, global_params=None): """Set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access. Args: request: (ComputeSubnetworksSetPrivateIpGoogleAccessRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetPrivateIpGoogleAccess') return self._RunMethod( config, request, global_params=global_params) SetPrivateIpGoogleAccess.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.subnetworks.setPrivateIpGoogleAccess', ordered_params=[u'project', u'region', u'subnetwork'], path_params=[u'project', u'region', u'subnetwork'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/subnetworks/{subnetwork}/setPrivateIpGoogleAccess', request_field=u'subnetworksSetPrivateIpGoogleAccessRequest', request_type_name=u'ComputeSubnetworksSetPrivateIpGoogleAccessRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeSubnetworksTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.subnetworks.testIamPermissions', ordered_params=[u'project', u'region', u'resource'], path_params=[u'project', u'region', u'resource'], query_params=[], relative_path=u'projects/{project}/regions/{region}/subnetworks/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeSubnetworksTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class TargetHttpProxiesService(base_api.BaseApiService): """Service class for the targetHttpProxies resource.""" _NAME = u'targetHttpProxies' def __init__(self, client): super(ComputeBeta.TargetHttpProxiesService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): """Deletes the specified TargetHttpProxy resource. Args: request: (ComputeTargetHttpProxiesDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.targetHttpProxies.delete', ordered_params=[u'project', u'targetHttpProxy'], path_params=[u'project', u'targetHttpProxy'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/targetHttpProxies/{targetHttpProxy}', request_field='', request_type_name=u'ComputeTargetHttpProxiesDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified TargetHttpProxy resource. Get a list of available target HTTP proxies by making a list() request. Args: request: (ComputeTargetHttpProxiesGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TargetHttpProxy) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.targetHttpProxies.get', ordered_params=[u'project', u'targetHttpProxy'], path_params=[u'project', u'targetHttpProxy'], query_params=[], relative_path=u'projects/{project}/global/targetHttpProxies/{targetHttpProxy}', request_field='', request_type_name=u'ComputeTargetHttpProxiesGetRequest', response_type_name=u'TargetHttpProxy', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a TargetHttpProxy resource in the specified project using the data included in the request. Args: request: (ComputeTargetHttpProxiesInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetHttpProxies.insert', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/targetHttpProxies', request_field=u'targetHttpProxy', request_type_name=u'ComputeTargetHttpProxiesInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of TargetHttpProxy resources available to the specified project. Args: request: (ComputeTargetHttpProxiesListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TargetHttpProxyList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.targetHttpProxies.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/targetHttpProxies', request_field='', request_type_name=u'ComputeTargetHttpProxiesListRequest', response_type_name=u'TargetHttpProxyList', supports_download=False, ) def SetUrlMap(self, request, global_params=None): """Changes the URL map for TargetHttpProxy. Args: request: (ComputeTargetHttpProxiesSetUrlMapRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetUrlMap') return self._RunMethod( config, request, global_params=global_params) SetUrlMap.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetHttpProxies.setUrlMap', ordered_params=[u'project', u'targetHttpProxy'], path_params=[u'project', u'targetHttpProxy'], query_params=[u'requestId'], relative_path=u'projects/{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap', request_field=u'urlMapReference', request_type_name=u'ComputeTargetHttpProxiesSetUrlMapRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeTargetHttpProxiesTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetHttpProxies.testIamPermissions', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/targetHttpProxies/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeTargetHttpProxiesTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class TargetHttpsProxiesService(base_api.BaseApiService): """Service class for the targetHttpsProxies resource.""" _NAME = u'targetHttpsProxies' def __init__(self, client): super(ComputeBeta.TargetHttpsProxiesService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): """Deletes the specified TargetHttpsProxy resource. Args: request: (ComputeTargetHttpsProxiesDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.targetHttpsProxies.delete', ordered_params=[u'project', u'targetHttpsProxy'], path_params=[u'project', u'targetHttpsProxy'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}', request_field='', request_type_name=u'ComputeTargetHttpsProxiesDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified TargetHttpsProxy resource. Get a list of available target HTTPS proxies by making a list() request. Args: request: (ComputeTargetHttpsProxiesGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TargetHttpsProxy) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.targetHttpsProxies.get', ordered_params=[u'project', u'targetHttpsProxy'], path_params=[u'project', u'targetHttpsProxy'], query_params=[], relative_path=u'projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}', request_field='', request_type_name=u'ComputeTargetHttpsProxiesGetRequest', response_type_name=u'TargetHttpsProxy', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a TargetHttpsProxy resource in the specified project using the data included in the request. Args: request: (ComputeTargetHttpsProxiesInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetHttpsProxies.insert', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/targetHttpsProxies', request_field=u'targetHttpsProxy', request_type_name=u'ComputeTargetHttpsProxiesInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of TargetHttpsProxy resources available to the specified project. Args: request: (ComputeTargetHttpsProxiesListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TargetHttpsProxyList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.targetHttpsProxies.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/targetHttpsProxies', request_field='', request_type_name=u'ComputeTargetHttpsProxiesListRequest', response_type_name=u'TargetHttpsProxyList', supports_download=False, ) def SetQuicOverride(self, request, global_params=None): """Sets the QUIC override policy for TargetHttpsProxy. Args: request: (ComputeTargetHttpsProxiesSetQuicOverrideRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetQuicOverride') return self._RunMethod( config, request, global_params=global_params) SetQuicOverride.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetHttpsProxies.setQuicOverride', ordered_params=[u'project', u'targetHttpsProxy'], path_params=[u'project', u'targetHttpsProxy'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}/setQuicOverride', request_field=u'targetHttpsProxiesSetQuicOverrideRequest', request_type_name=u'ComputeTargetHttpsProxiesSetQuicOverrideRequest', response_type_name=u'Operation', supports_download=False, ) def SetSslCertificates(self, request, global_params=None): """Replaces SslCertificates for TargetHttpsProxy. Args: request: (ComputeTargetHttpsProxiesSetSslCertificatesRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetSslCertificates') return self._RunMethod( config, request, global_params=global_params) SetSslCertificates.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetHttpsProxies.setSslCertificates', ordered_params=[u'project', u'targetHttpsProxy'], path_params=[u'project', u'targetHttpsProxy'], query_params=[u'requestId'], relative_path=u'projects/{project}/targetHttpsProxies/{targetHttpsProxy}/setSslCertificates', request_field=u'targetHttpsProxiesSetSslCertificatesRequest', request_type_name=u'ComputeTargetHttpsProxiesSetSslCertificatesRequest', response_type_name=u'Operation', supports_download=False, ) def SetSslPolicy(self, request, global_params=None): """Sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the HTTPS proxy load balancer. They do not affect the connection between the load balancer and the backends. Args: request: (ComputeTargetHttpsProxiesSetSslPolicyRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetSslPolicy') return self._RunMethod( config, request, global_params=global_params) SetSslPolicy.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetHttpsProxies.setSslPolicy', ordered_params=[u'project', u'targetHttpsProxy'], path_params=[u'project', u'targetHttpsProxy'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/targetHttpsProxies/{targetHttpsProxy}/setSslPolicy', request_field=u'sslPolicyReference', request_type_name=u'ComputeTargetHttpsProxiesSetSslPolicyRequest', response_type_name=u'Operation', supports_download=False, ) def SetUrlMap(self, request, global_params=None): """Changes the URL map for TargetHttpsProxy. Args: request: (ComputeTargetHttpsProxiesSetUrlMapRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetUrlMap') return self._RunMethod( config, request, global_params=global_params) SetUrlMap.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetHttpsProxies.setUrlMap', ordered_params=[u'project', u'targetHttpsProxy'], path_params=[u'project', u'targetHttpsProxy'], query_params=[u'requestId'], relative_path=u'projects/{project}/targetHttpsProxies/{targetHttpsProxy}/setUrlMap', request_field=u'urlMapReference', request_type_name=u'ComputeTargetHttpsProxiesSetUrlMapRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeTargetHttpsProxiesTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetHttpsProxies.testIamPermissions', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/targetHttpsProxies/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeTargetHttpsProxiesTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class TargetInstancesService(base_api.BaseApiService): """Service class for the targetInstances resource.""" _NAME = u'targetInstances' def __init__(self, client): super(ComputeBeta.TargetInstancesService, self).__init__(client) self._upload_configs = { } def AggregatedList(self, request, global_params=None): """Retrieves an aggregated list of target instances. Args: request: (ComputeTargetInstancesAggregatedListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TargetInstanceAggregatedList) The response message. """ config = self.GetMethodConfig('AggregatedList') return self._RunMethod( config, request, global_params=global_params) AggregatedList.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.targetInstances.aggregatedList', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/aggregated/targetInstances', request_field='', request_type_name=u'ComputeTargetInstancesAggregatedListRequest', response_type_name=u'TargetInstanceAggregatedList', supports_download=False, ) def Delete(self, request, global_params=None): """Deletes the specified TargetInstance resource. Args: request: (ComputeTargetInstancesDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.targetInstances.delete', ordered_params=[u'project', u'zone', u'targetInstance'], path_params=[u'project', u'targetInstance', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/targetInstances/{targetInstance}', request_field='', request_type_name=u'ComputeTargetInstancesDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified TargetInstance resource. Get a list of available target instances by making a list() request. Args: request: (ComputeTargetInstancesGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TargetInstance) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.targetInstances.get', ordered_params=[u'project', u'zone', u'targetInstance'], path_params=[u'project', u'targetInstance', u'zone'], query_params=[], relative_path=u'projects/{project}/zones/{zone}/targetInstances/{targetInstance}', request_field='', request_type_name=u'ComputeTargetInstancesGetRequest', response_type_name=u'TargetInstance', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a TargetInstance resource in the specified project and zone using the data included in the request. Args: request: (ComputeTargetInstancesInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetInstances.insert', ordered_params=[u'project', u'zone'], path_params=[u'project', u'zone'], query_params=[u'requestId'], relative_path=u'projects/{project}/zones/{zone}/targetInstances', request_field=u'targetInstance', request_type_name=u'ComputeTargetInstancesInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves a list of TargetInstance resources available to the specified project and zone. Args: request: (ComputeTargetInstancesListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TargetInstanceList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.targetInstances.list', ordered_params=[u'project', u'zone'], path_params=[u'project', u'zone'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/zones/{zone}/targetInstances', request_field='', request_type_name=u'ComputeTargetInstancesListRequest', response_type_name=u'TargetInstanceList', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeTargetInstancesTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetInstances.testIamPermissions', ordered_params=[u'project', u'zone', u'resource'], path_params=[u'project', u'resource', u'zone'], query_params=[], relative_path=u'projects/{project}/zones/{zone}/targetInstances/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeTargetInstancesTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class TargetPoolsService(base_api.BaseApiService): """Service class for the targetPools resource.""" _NAME = u'targetPools' def __init__(self, client): super(ComputeBeta.TargetPoolsService, self).__init__(client) self._upload_configs = { } def AddHealthCheck(self, request, global_params=None): """Adds health check URLs to a target pool. Args: request: (ComputeTargetPoolsAddHealthCheckRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('AddHealthCheck') return self._RunMethod( config, request, global_params=global_params) AddHealthCheck.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetPools.addHealthCheck', ordered_params=[u'project', u'region', u'targetPool'], path_params=[u'project', u'region', u'targetPool'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck', request_field=u'targetPoolsAddHealthCheckRequest', request_type_name=u'ComputeTargetPoolsAddHealthCheckRequest', response_type_name=u'Operation', supports_download=False, ) def AddInstance(self, request, global_params=None): """Adds an instance to a target pool. Args: request: (ComputeTargetPoolsAddInstanceRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('AddInstance') return self._RunMethod( config, request, global_params=global_params) AddInstance.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetPools.addInstance', ordered_params=[u'project', u'region', u'targetPool'], path_params=[u'project', u'region', u'targetPool'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/targetPools/{targetPool}/addInstance', request_field=u'targetPoolsAddInstanceRequest', request_type_name=u'ComputeTargetPoolsAddInstanceRequest', response_type_name=u'Operation', supports_download=False, ) def AggregatedList(self, request, global_params=None): """Retrieves an aggregated list of target pools. Args: request: (ComputeTargetPoolsAggregatedListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TargetPoolAggregatedList) The response message. """ config = self.GetMethodConfig('AggregatedList') return self._RunMethod( config, request, global_params=global_params) AggregatedList.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.targetPools.aggregatedList', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/aggregated/targetPools', request_field='', request_type_name=u'ComputeTargetPoolsAggregatedListRequest', response_type_name=u'TargetPoolAggregatedList', supports_download=False, ) def Delete(self, request, global_params=None): """Deletes the specified target pool. Args: request: (ComputeTargetPoolsDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.targetPools.delete', ordered_params=[u'project', u'region', u'targetPool'], path_params=[u'project', u'region', u'targetPool'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/targetPools/{targetPool}', request_field='', request_type_name=u'ComputeTargetPoolsDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified target pool. Get a list of available target pools by making a list() request. Args: request: (ComputeTargetPoolsGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TargetPool) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.targetPools.get', ordered_params=[u'project', u'region', u'targetPool'], path_params=[u'project', u'region', u'targetPool'], query_params=[], relative_path=u'projects/{project}/regions/{region}/targetPools/{targetPool}', request_field='', request_type_name=u'ComputeTargetPoolsGetRequest', response_type_name=u'TargetPool', supports_download=False, ) def GetHealth(self, request, global_params=None): """Gets the most recent health check results for each IP for the instance that is referenced by the given target pool. Args: request: (ComputeTargetPoolsGetHealthRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TargetPoolInstanceHealth) The response message. """ config = self.GetMethodConfig('GetHealth') return self._RunMethod( config, request, global_params=global_params) GetHealth.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetPools.getHealth', ordered_params=[u'project', u'region', u'targetPool'], path_params=[u'project', u'region', u'targetPool'], query_params=[], relative_path=u'projects/{project}/regions/{region}/targetPools/{targetPool}/getHealth', request_field=u'instanceReference', request_type_name=u'ComputeTargetPoolsGetHealthRequest', response_type_name=u'TargetPoolInstanceHealth', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a target pool in the specified project and region using the data included in the request. Args: request: (ComputeTargetPoolsInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetPools.insert', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/targetPools', request_field=u'targetPool', request_type_name=u'ComputeTargetPoolsInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves a list of target pools available to the specified project and region. Args: request: (ComputeTargetPoolsListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TargetPoolList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.targetPools.list', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/regions/{region}/targetPools', request_field='', request_type_name=u'ComputeTargetPoolsListRequest', response_type_name=u'TargetPoolList', supports_download=False, ) def RemoveHealthCheck(self, request, global_params=None): """Removes health check URL from a target pool. Args: request: (ComputeTargetPoolsRemoveHealthCheckRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('RemoveHealthCheck') return self._RunMethod( config, request, global_params=global_params) RemoveHealthCheck.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetPools.removeHealthCheck', ordered_params=[u'project', u'region', u'targetPool'], path_params=[u'project', u'region', u'targetPool'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck', request_field=u'targetPoolsRemoveHealthCheckRequest', request_type_name=u'ComputeTargetPoolsRemoveHealthCheckRequest', response_type_name=u'Operation', supports_download=False, ) def RemoveInstance(self, request, global_params=None): """Removes instance URL from a target pool. Args: request: (ComputeTargetPoolsRemoveInstanceRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('RemoveInstance') return self._RunMethod( config, request, global_params=global_params) RemoveInstance.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetPools.removeInstance', ordered_params=[u'project', u'region', u'targetPool'], path_params=[u'project', u'region', u'targetPool'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/targetPools/{targetPool}/removeInstance', request_field=u'targetPoolsRemoveInstanceRequest', request_type_name=u'ComputeTargetPoolsRemoveInstanceRequest', response_type_name=u'Operation', supports_download=False, ) def SetBackup(self, request, global_params=None): """Changes a backup target pool's configurations. Args: request: (ComputeTargetPoolsSetBackupRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetBackup') return self._RunMethod( config, request, global_params=global_params) SetBackup.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetPools.setBackup', ordered_params=[u'project', u'region', u'targetPool'], path_params=[u'project', u'region', u'targetPool'], query_params=[u'failoverRatio', u'requestId'], relative_path=u'projects/{project}/regions/{region}/targetPools/{targetPool}/setBackup', request_field=u'targetReference', request_type_name=u'ComputeTargetPoolsSetBackupRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeTargetPoolsTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetPools.testIamPermissions', ordered_params=[u'project', u'region', u'resource'], path_params=[u'project', u'region', u'resource'], query_params=[], relative_path=u'projects/{project}/regions/{region}/targetPools/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeTargetPoolsTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class TargetSslProxiesService(base_api.BaseApiService): """Service class for the targetSslProxies resource.""" _NAME = u'targetSslProxies' def __init__(self, client): super(ComputeBeta.TargetSslProxiesService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): """Deletes the specified TargetSslProxy resource. Args: request: (ComputeTargetSslProxiesDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.targetSslProxies.delete', ordered_params=[u'project', u'targetSslProxy'], path_params=[u'project', u'targetSslProxy'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/targetSslProxies/{targetSslProxy}', request_field='', request_type_name=u'ComputeTargetSslProxiesDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified TargetSslProxy resource. Get a list of available target SSL proxies by making a list() request. Args: request: (ComputeTargetSslProxiesGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TargetSslProxy) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.targetSslProxies.get', ordered_params=[u'project', u'targetSslProxy'], path_params=[u'project', u'targetSslProxy'], query_params=[], relative_path=u'projects/{project}/global/targetSslProxies/{targetSslProxy}', request_field='', request_type_name=u'ComputeTargetSslProxiesGetRequest', response_type_name=u'TargetSslProxy', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a TargetSslProxy resource in the specified project using the data included in the request. Args: request: (ComputeTargetSslProxiesInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetSslProxies.insert', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/targetSslProxies', request_field=u'targetSslProxy', request_type_name=u'ComputeTargetSslProxiesInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of TargetSslProxy resources available to the specified project. Args: request: (ComputeTargetSslProxiesListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TargetSslProxyList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.targetSslProxies.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/targetSslProxies', request_field='', request_type_name=u'ComputeTargetSslProxiesListRequest', response_type_name=u'TargetSslProxyList', supports_download=False, ) def SetBackendService(self, request, global_params=None): """Changes the BackendService for TargetSslProxy. Args: request: (ComputeTargetSslProxiesSetBackendServiceRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetBackendService') return self._RunMethod( config, request, global_params=global_params) SetBackendService.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetSslProxies.setBackendService', ordered_params=[u'project', u'targetSslProxy'], path_params=[u'project', u'targetSslProxy'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/targetSslProxies/{targetSslProxy}/setBackendService', request_field=u'targetSslProxiesSetBackendServiceRequest', request_type_name=u'ComputeTargetSslProxiesSetBackendServiceRequest', response_type_name=u'Operation', supports_download=False, ) def SetProxyHeader(self, request, global_params=None): """Changes the ProxyHeaderType for TargetSslProxy. Args: request: (ComputeTargetSslProxiesSetProxyHeaderRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetProxyHeader') return self._RunMethod( config, request, global_params=global_params) SetProxyHeader.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetSslProxies.setProxyHeader', ordered_params=[u'project', u'targetSslProxy'], path_params=[u'project', u'targetSslProxy'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/targetSslProxies/{targetSslProxy}/setProxyHeader', request_field=u'targetSslProxiesSetProxyHeaderRequest', request_type_name=u'ComputeTargetSslProxiesSetProxyHeaderRequest', response_type_name=u'Operation', supports_download=False, ) def SetSslCertificates(self, request, global_params=None): """Changes SslCertificates for TargetSslProxy. Args: request: (ComputeTargetSslProxiesSetSslCertificatesRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetSslCertificates') return self._RunMethod( config, request, global_params=global_params) SetSslCertificates.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetSslProxies.setSslCertificates', ordered_params=[u'project', u'targetSslProxy'], path_params=[u'project', u'targetSslProxy'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/targetSslProxies/{targetSslProxy}/setSslCertificates', request_field=u'targetSslProxiesSetSslCertificatesRequest', request_type_name=u'ComputeTargetSslProxiesSetSslCertificatesRequest', response_type_name=u'Operation', supports_download=False, ) def SetSslPolicy(self, request, global_params=None): """Sets the SSL policy for TargetSslProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the SSL proxy load balancer. They do not affect the connection between the load balancer and the backends. Args: request: (ComputeTargetSslProxiesSetSslPolicyRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetSslPolicy') return self._RunMethod( config, request, global_params=global_params) SetSslPolicy.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetSslProxies.setSslPolicy', ordered_params=[u'project', u'targetSslProxy'], path_params=[u'project', u'targetSslProxy'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/targetSslProxies/{targetSslProxy}/setSslPolicy', request_field=u'sslPolicyReference', request_type_name=u'ComputeTargetSslProxiesSetSslPolicyRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeTargetSslProxiesTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetSslProxies.testIamPermissions', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/targetSslProxies/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeTargetSslProxiesTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class TargetTcpProxiesService(base_api.BaseApiService): """Service class for the targetTcpProxies resource.""" _NAME = u'targetTcpProxies' def __init__(self, client): super(ComputeBeta.TargetTcpProxiesService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): """Deletes the specified TargetTcpProxy resource. Args: request: (ComputeTargetTcpProxiesDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.targetTcpProxies.delete', ordered_params=[u'project', u'targetTcpProxy'], path_params=[u'project', u'targetTcpProxy'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/targetTcpProxies/{targetTcpProxy}', request_field='', request_type_name=u'ComputeTargetTcpProxiesDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified TargetTcpProxy resource. Get a list of available target TCP proxies by making a list() request. Args: request: (ComputeTargetTcpProxiesGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TargetTcpProxy) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.targetTcpProxies.get', ordered_params=[u'project', u'targetTcpProxy'], path_params=[u'project', u'targetTcpProxy'], query_params=[], relative_path=u'projects/{project}/global/targetTcpProxies/{targetTcpProxy}', request_field='', request_type_name=u'ComputeTargetTcpProxiesGetRequest', response_type_name=u'TargetTcpProxy', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a TargetTcpProxy resource in the specified project using the data included in the request. Args: request: (ComputeTargetTcpProxiesInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetTcpProxies.insert', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/targetTcpProxies', request_field=u'targetTcpProxy', request_type_name=u'ComputeTargetTcpProxiesInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of TargetTcpProxy resources available to the specified project. Args: request: (ComputeTargetTcpProxiesListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TargetTcpProxyList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.targetTcpProxies.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/targetTcpProxies', request_field='', request_type_name=u'ComputeTargetTcpProxiesListRequest', response_type_name=u'TargetTcpProxyList', supports_download=False, ) def SetBackendService(self, request, global_params=None): """Changes the BackendService for TargetTcpProxy. Args: request: (ComputeTargetTcpProxiesSetBackendServiceRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetBackendService') return self._RunMethod( config, request, global_params=global_params) SetBackendService.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetTcpProxies.setBackendService', ordered_params=[u'project', u'targetTcpProxy'], path_params=[u'project', u'targetTcpProxy'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/targetTcpProxies/{targetTcpProxy}/setBackendService', request_field=u'targetTcpProxiesSetBackendServiceRequest', request_type_name=u'ComputeTargetTcpProxiesSetBackendServiceRequest', response_type_name=u'Operation', supports_download=False, ) def SetProxyHeader(self, request, global_params=None): """Changes the ProxyHeaderType for TargetTcpProxy. Args: request: (ComputeTargetTcpProxiesSetProxyHeaderRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetProxyHeader') return self._RunMethod( config, request, global_params=global_params) SetProxyHeader.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetTcpProxies.setProxyHeader', ordered_params=[u'project', u'targetTcpProxy'], path_params=[u'project', u'targetTcpProxy'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/targetTcpProxies/{targetTcpProxy}/setProxyHeader', request_field=u'targetTcpProxiesSetProxyHeaderRequest', request_type_name=u'ComputeTargetTcpProxiesSetProxyHeaderRequest', response_type_name=u'Operation', supports_download=False, ) class TargetVpnGatewaysService(base_api.BaseApiService): """Service class for the targetVpnGateways resource.""" _NAME = u'targetVpnGateways' def __init__(self, client): super(ComputeBeta.TargetVpnGatewaysService, self).__init__(client) self._upload_configs = { } def AggregatedList(self, request, global_params=None): """Retrieves an aggregated list of target VPN gateways. Args: request: (ComputeTargetVpnGatewaysAggregatedListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TargetVpnGatewayAggregatedList) The response message. """ config = self.GetMethodConfig('AggregatedList') return self._RunMethod( config, request, global_params=global_params) AggregatedList.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.targetVpnGateways.aggregatedList', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/aggregated/targetVpnGateways', request_field='', request_type_name=u'ComputeTargetVpnGatewaysAggregatedListRequest', response_type_name=u'TargetVpnGatewayAggregatedList', supports_download=False, ) def Delete(self, request, global_params=None): """Deletes the specified target VPN gateway. Args: request: (ComputeTargetVpnGatewaysDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.targetVpnGateways.delete', ordered_params=[u'project', u'region', u'targetVpnGateway'], path_params=[u'project', u'region', u'targetVpnGateway'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}', request_field='', request_type_name=u'ComputeTargetVpnGatewaysDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified target VPN gateway. Get a list of available target VPN gateways by making a list() request. Args: request: (ComputeTargetVpnGatewaysGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TargetVpnGateway) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.targetVpnGateways.get', ordered_params=[u'project', u'region', u'targetVpnGateway'], path_params=[u'project', u'region', u'targetVpnGateway'], query_params=[], relative_path=u'projects/{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}', request_field='', request_type_name=u'ComputeTargetVpnGatewaysGetRequest', response_type_name=u'TargetVpnGateway', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a target VPN gateway in the specified project and region using the data included in the request. Args: request: (ComputeTargetVpnGatewaysInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetVpnGateways.insert', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/targetVpnGateways', request_field=u'targetVpnGateway', request_type_name=u'ComputeTargetVpnGatewaysInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves a list of target VPN gateways available to the specified project and region. Args: request: (ComputeTargetVpnGatewaysListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TargetVpnGatewayList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.targetVpnGateways.list', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/regions/{region}/targetVpnGateways', request_field='', request_type_name=u'ComputeTargetVpnGatewaysListRequest', response_type_name=u'TargetVpnGatewayList', supports_download=False, ) def SetLabels(self, request, global_params=None): """Sets the labels on a TargetVpnGateway. To learn more about labels, read the Labeling Resources documentation. Args: request: (ComputeTargetVpnGatewaysSetLabelsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetLabels') return self._RunMethod( config, request, global_params=global_params) SetLabels.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetVpnGateways.setLabels', ordered_params=[u'project', u'region', u'resource'], path_params=[u'project', u'region', u'resource'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/targetVpnGateways/{resource}/setLabels', request_field=u'regionSetLabelsRequest', request_type_name=u'ComputeTargetVpnGatewaysSetLabelsRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeTargetVpnGatewaysTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.targetVpnGateways.testIamPermissions', ordered_params=[u'project', u'region', u'resource'], path_params=[u'project', u'region', u'resource'], query_params=[], relative_path=u'projects/{project}/regions/{region}/targetVpnGateways/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeTargetVpnGatewaysTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class UrlMapsService(base_api.BaseApiService): """Service class for the urlMaps resource.""" _NAME = u'urlMaps' def __init__(self, client): super(ComputeBeta.UrlMapsService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): """Deletes the specified UrlMap resource. Args: request: (ComputeUrlMapsDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.urlMaps.delete', ordered_params=[u'project', u'urlMap'], path_params=[u'project', u'urlMap'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/urlMaps/{urlMap}', request_field='', request_type_name=u'ComputeUrlMapsDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified UrlMap resource. Get a list of available URL maps by making a list() request. Args: request: (ComputeUrlMapsGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (UrlMap) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.urlMaps.get', ordered_params=[u'project', u'urlMap'], path_params=[u'project', u'urlMap'], query_params=[], relative_path=u'projects/{project}/global/urlMaps/{urlMap}', request_field='', request_type_name=u'ComputeUrlMapsGetRequest', response_type_name=u'UrlMap', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a UrlMap resource in the specified project using the data included in the request. Args: request: (ComputeUrlMapsInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.urlMaps.insert', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/urlMaps', request_field=u'urlMap', request_type_name=u'ComputeUrlMapsInsertRequest', response_type_name=u'Operation', supports_download=False, ) def InvalidateCache(self, request, global_params=None): """Initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap. Args: request: (ComputeUrlMapsInvalidateCacheRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('InvalidateCache') return self._RunMethod( config, request, global_params=global_params) InvalidateCache.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.urlMaps.invalidateCache', ordered_params=[u'project', u'urlMap'], path_params=[u'project', u'urlMap'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/urlMaps/{urlMap}/invalidateCache', request_field=u'cacheInvalidationRule', request_type_name=u'ComputeUrlMapsInvalidateCacheRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of UrlMap resources available to the specified project. Args: request: (ComputeUrlMapsListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (UrlMapList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.urlMaps.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/global/urlMaps', request_field='', request_type_name=u'ComputeUrlMapsListRequest', response_type_name=u'UrlMapList', supports_download=False, ) def Patch(self, request, global_params=None): """Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Args: request: (ComputeUrlMapsPatchRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Patch') return self._RunMethod( config, request, global_params=global_params) Patch.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PATCH', method_id=u'compute.urlMaps.patch', ordered_params=[u'project', u'urlMap'], path_params=[u'project', u'urlMap'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/urlMaps/{urlMap}', request_field=u'urlMapResource', request_type_name=u'ComputeUrlMapsPatchRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeUrlMapsTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.urlMaps.testIamPermissions', ordered_params=[u'project', u'resource'], path_params=[u'project', u'resource'], query_params=[], relative_path=u'projects/{project}/global/urlMaps/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeUrlMapsTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) def Update(self, request, global_params=None): """Updates the specified UrlMap resource with the data included in the request. Args: request: (ComputeUrlMapsUpdateRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Update') return self._RunMethod( config, request, global_params=global_params) Update.method_config = lambda: base_api.ApiMethodInfo( http_method=u'PUT', method_id=u'compute.urlMaps.update', ordered_params=[u'project', u'urlMap'], path_params=[u'project', u'urlMap'], query_params=[u'requestId'], relative_path=u'projects/{project}/global/urlMaps/{urlMap}', request_field=u'urlMapResource', request_type_name=u'ComputeUrlMapsUpdateRequest', response_type_name=u'Operation', supports_download=False, ) def Validate(self, request, global_params=None): """Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap. Args: request: (ComputeUrlMapsValidateRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (UrlMapsValidateResponse) The response message. """ config = self.GetMethodConfig('Validate') return self._RunMethod( config, request, global_params=global_params) Validate.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.urlMaps.validate', ordered_params=[u'project', u'urlMap'], path_params=[u'project', u'urlMap'], query_params=[], relative_path=u'projects/{project}/global/urlMaps/{urlMap}/validate', request_field=u'urlMapsValidateRequest', request_type_name=u'ComputeUrlMapsValidateRequest', response_type_name=u'UrlMapsValidateResponse', supports_download=False, ) class VpnTunnelsService(base_api.BaseApiService): """Service class for the vpnTunnels resource.""" _NAME = u'vpnTunnels' def __init__(self, client): super(ComputeBeta.VpnTunnelsService, self).__init__(client) self._upload_configs = { } def AggregatedList(self, request, global_params=None): """Retrieves an aggregated list of VPN tunnels. Args: request: (ComputeVpnTunnelsAggregatedListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (VpnTunnelAggregatedList) The response message. """ config = self.GetMethodConfig('AggregatedList') return self._RunMethod( config, request, global_params=global_params) AggregatedList.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.vpnTunnels.aggregatedList', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/aggregated/vpnTunnels', request_field='', request_type_name=u'ComputeVpnTunnelsAggregatedListRequest', response_type_name=u'VpnTunnelAggregatedList', supports_download=False, ) def Delete(self, request, global_params=None): """Deletes the specified VpnTunnel resource. Args: request: (ComputeVpnTunnelsDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.vpnTunnels.delete', ordered_params=[u'project', u'region', u'vpnTunnel'], path_params=[u'project', u'region', u'vpnTunnel'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/vpnTunnels/{vpnTunnel}', request_field='', request_type_name=u'ComputeVpnTunnelsDeleteRequest', response_type_name=u'Operation', supports_download=False, ) def Get(self, request, global_params=None): """Returns the specified VpnTunnel resource. Get a list of available VPN tunnels by making a list() request. Args: request: (ComputeVpnTunnelsGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (VpnTunnel) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.vpnTunnels.get', ordered_params=[u'project', u'region', u'vpnTunnel'], path_params=[u'project', u'region', u'vpnTunnel'], query_params=[], relative_path=u'projects/{project}/regions/{region}/vpnTunnels/{vpnTunnel}', request_field='', request_type_name=u'ComputeVpnTunnelsGetRequest', response_type_name=u'VpnTunnel', supports_download=False, ) def Insert(self, request, global_params=None): """Creates a VpnTunnel resource in the specified project and region using the data included in the request. Args: request: (ComputeVpnTunnelsInsertRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Insert') return self._RunMethod( config, request, global_params=global_params) Insert.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.vpnTunnels.insert', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/vpnTunnels', request_field=u'vpnTunnel', request_type_name=u'ComputeVpnTunnelsInsertRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves a list of VpnTunnel resources contained in the specified project and region. Args: request: (ComputeVpnTunnelsListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (VpnTunnelList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.vpnTunnels.list', ordered_params=[u'project', u'region'], path_params=[u'project', u'region'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/regions/{region}/vpnTunnels', request_field='', request_type_name=u'ComputeVpnTunnelsListRequest', response_type_name=u'VpnTunnelList', supports_download=False, ) def SetLabels(self, request, global_params=None): """Sets the labels on a VpnTunnel. To learn more about labels, read the Labeling Resources documentation. Args: request: (ComputeVpnTunnelsSetLabelsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('SetLabels') return self._RunMethod( config, request, global_params=global_params) SetLabels.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.vpnTunnels.setLabels', ordered_params=[u'project', u'region', u'resource'], path_params=[u'project', u'region', u'resource'], query_params=[u'requestId'], relative_path=u'projects/{project}/regions/{region}/vpnTunnels/{resource}/setLabels', request_field=u'regionSetLabelsRequest', request_type_name=u'ComputeVpnTunnelsSetLabelsRequest', response_type_name=u'Operation', supports_download=False, ) def TestIamPermissions(self, request, global_params=None): """Returns permissions that a caller has on the specified resource. Args: request: (ComputeVpnTunnelsTestIamPermissionsRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (TestPermissionsResponse) The response message. """ config = self.GetMethodConfig('TestIamPermissions') return self._RunMethod( config, request, global_params=global_params) TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo( http_method=u'POST', method_id=u'compute.vpnTunnels.testIamPermissions', ordered_params=[u'project', u'region', u'resource'], path_params=[u'project', u'region', u'resource'], query_params=[], relative_path=u'projects/{project}/regions/{region}/vpnTunnels/{resource}/testIamPermissions', request_field=u'testPermissionsRequest', request_type_name=u'ComputeVpnTunnelsTestIamPermissionsRequest', response_type_name=u'TestPermissionsResponse', supports_download=False, ) class ZoneOperationsService(base_api.BaseApiService): """Service class for the zoneOperations resource.""" _NAME = u'zoneOperations' def __init__(self, client): super(ComputeBeta.ZoneOperationsService, self).__init__(client) self._upload_configs = { } def Delete(self, request, global_params=None): """Deletes the specified zone-specific Operations resource. Args: request: (ComputeZoneOperationsDeleteRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (ComputeZoneOperationsDeleteResponse) The response message. """ config = self.GetMethodConfig('Delete') return self._RunMethod( config, request, global_params=global_params) Delete.method_config = lambda: base_api.ApiMethodInfo( http_method=u'DELETE', method_id=u'compute.zoneOperations.delete', ordered_params=[u'project', u'zone', u'operation'], path_params=[u'operation', u'project', u'zone'], query_params=[], relative_path=u'projects/{project}/zones/{zone}/operations/{operation}', request_field='', request_type_name=u'ComputeZoneOperationsDeleteRequest', response_type_name=u'ComputeZoneOperationsDeleteResponse', supports_download=False, ) def Get(self, request, global_params=None): """Retrieves the specified zone-specific Operations resource. Args: request: (ComputeZoneOperationsGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Operation) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.zoneOperations.get', ordered_params=[u'project', u'zone', u'operation'], path_params=[u'operation', u'project', u'zone'], query_params=[], relative_path=u'projects/{project}/zones/{zone}/operations/{operation}', request_field='', request_type_name=u'ComputeZoneOperationsGetRequest', response_type_name=u'Operation', supports_download=False, ) def List(self, request, global_params=None): """Retrieves a list of Operation resources contained within the specified zone. Args: request: (ComputeZoneOperationsListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (OperationList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.zoneOperations.list', ordered_params=[u'project', u'zone'], path_params=[u'project', u'zone'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/zones/{zone}/operations', request_field='', request_type_name=u'ComputeZoneOperationsListRequest', response_type_name=u'OperationList', supports_download=False, ) class ZonesService(base_api.BaseApiService): """Service class for the zones resource.""" _NAME = u'zones' def __init__(self, client): super(ComputeBeta.ZonesService, self).__init__(client) self._upload_configs = { } def Get(self, request, global_params=None): """Returns the specified Zone resource. Get a list of available zones by making a list() request. Args: request: (ComputeZonesGetRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (Zone) The response message. """ config = self.GetMethodConfig('Get') return self._RunMethod( config, request, global_params=global_params) Get.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.zones.get', ordered_params=[u'project', u'zone'], path_params=[u'project', u'zone'], query_params=[], relative_path=u'projects/{project}/zones/{zone}', request_field='', request_type_name=u'ComputeZonesGetRequest', response_type_name=u'Zone', supports_download=False, ) def List(self, request, global_params=None): """Retrieves the list of Zone resources available to the specified project. Args: request: (ComputeZonesListRequest) input message global_params: (StandardQueryParameters, default: None) global arguments Returns: (ZoneList) The response message. """ config = self.GetMethodConfig('List') return self._RunMethod( config, request, global_params=global_params) List.method_config = lambda: base_api.ApiMethodInfo( http_method=u'GET', method_id=u'compute.zones.list', ordered_params=[u'project'], path_params=[u'project'], query_params=[u'filter', u'maxResults', u'orderBy', u'pageToken'], relative_path=u'projects/{project}/zones', request_field='', request_type_name=u'ComputeZonesListRequest', response_type_name=u'ZoneList', supports_download=False, )
[ "jordan.robison@gmail.com" ]
jordan.robison@gmail.com
385d36b5fee83969ac145aefc9965f04e2273e19
d348cc04a8e4bd8b16e6663b19b1545da4ac6f05
/average_link.py
ec4984257cd5a9ecee0157cef44578166f082b15
[]
no_license
vam-sin/Agglomerative-Clustering
1225254aeca1aae9812ad8e4286895c186349e45
1ccb58af7b4f729f08338faae0ca571c64d53d67
refs/heads/master
2020-05-04T11:08:24.565854
2019-04-02T15:09:38
2019-04-02T15:09:38
179,101,583
1
0
null
null
null
null
UTF-8
Python
false
false
4,066
py
import numpy as np from Bio import SeqIO import random from collections import defaultdict from Levenshtein import distance import plotly.plotly as py import plotly.figure_factory as ff import matplotlib.pyplot as plt import scipy.cluster.hierarchy as sch import scipy.spatial as scs import math # Making the dataset lists = [] for record in SeqIO.parse("DNASequences.fasta", "fasta"): lists.append(record) # Loading the proximity matrix f = open("prox_first.bin", 'rb') d = np.load(f) f.close() print("Distances Matrix Loaded") # Functions def min_in_matrix(X): min = math.inf min_i = 0 min_j = 0 for i in range(len(X)): for j in range(len(X[i])): if i != j and min > X[i][j]: min = X[i][j] min_i = i min_j = j return min_i,min_j,min def check_inf(X): for i in range(len(X)): for j in range(len(X[i])): if X[i][j]!=math.inf: return 1 return 0 def marked(Z): for i in range(len(Z)): if Z[i]==0: return 1 return 0 def average_link(X): iterator=0 Z = [] # New Linkage matrix clusters = {} # keeps track of the clusters count_clusters = {} for j in range(len(X)): count_clusters[j] = 1 while check_inf(X): min_i,min_j,min = min_in_matrix(X) # Adding to the Linkage matrix if min_i in clusters and min_j in clusters: Z.append([clusters[min_i],clusters[min_j],min,count_clusters[clusters[min_i]]+count_clusters[clusters[min_j]]]) elif min_i in clusters: a = count_clusters[clusters[min_i]]+1 Z.append([clusters[min_i],min_j,min,a]) elif min_j in clusters: a = 1+count_clusters[clusters[min_j]] Z.append([min_i,clusters[min_j],min,a]) else: Z.append([min_i,min_j,min,2]) # Updating the rest of the array for i in range(len(X)): if i !=min_i and i!=min_j: dist = 0 a = 0 # Total points in both clusters combined # Find a if min_i in clusters and min_j in clusters: a = count_clusters[clusters[min_i]] + count_clusters[clusters[min_j]] elif min_i in clusters: a = count_clusters[clusters[min_i]] + count_clusters[min_j] elif min_j in clusters: a = count_clusters[min_i] + count_clusters[clusters[min_j]] else: a = 2 # Find total distance # if check_inf_row(X[i]): if min_i in clusters: dist+=X[i][min_i]*count_clusters[clusters[min_i]] else: dist+=X[i][min_i] if min_j in clusters: dist+=X[min_j][i]*count_clusters[clusters[min_j]] else: dist+=X[min_j][i] dist = dist/float(a) X[min_j][i] = X[i][min_j] = float(dist) # Updating the clusters counts and clusters clusters[min_j] = len(X)+iterator iterator+=1 count_clusters[clusters[min_j]] = 1 if min_i in clusters and min_j in clusters: count_clusters[clusters[min_j]] = count_clusters[clusters[min_i]] + count_clusters[clusters[min_j]] elif min_i in clusters: count_clusters[clusters[min_j]] = count_clusters[clusters[min_i]] + 1 elif min_j in clusters: count_clusters[clusters[min_j]] = count_clusters[clusters[min_j]] + 1 else: count_clusters[clusters[min_j]] = 2 # removing one of the data points for i in range(len(X)): X[min_i][i]=X[i][min_i] = math.inf return X,Z for i in range(len(d)): d[i][i] = math.inf # average_link d_average, Zdash_average = average_link(d) Zdash_average = np.array(Zdash_average,dtype='float64') sch.dendrogram(Zdash_average) plt.savefig('average.png') plt.show() print("Average Generated")
[ "vamsinallapareddy@gmail.com" ]
vamsinallapareddy@gmail.com
174e9986a5f9a4ed60b9f16b51c97810e0abb5f5
4dda92393e178a45b4be36b4e322ac8d99ad19b4
/src/generative_playground/utils/respawner.py
6ecccaa5a6d1134d8c696e678d8304776a23ae18
[ "MIT" ]
permissive
JGU-dev/generative_playground
6567c7eaea4a09c95902c9a8dbc0af479294c8aa
5c336dfbd14235e4fd97b21778842a650e733275
refs/heads/master
2022-03-25T06:11:37.121235
2019-12-29T16:00:21
2019-12-29T16:00:21
null
0
0
null
null
null
null
UTF-8
Python
false
false
238
py
import sys, subprocess print("respawner starting with ", sys.argv[1:]) counter = 0 while True: print('spawning, iteration', counter) retval = subprocess.run(sys.argv[1:]) if retval.returncode <0: break counter += 1
[ "egor.kraev@gmail.com" ]
egor.kraev@gmail.com
19f4123007138dc7bd44b039e59e487ecc1d1cc4
244ecfc2017a48c70b74556be8c188e7a4815848
/res/scripts/client/gui/prb_control/events_dispatcher.py
d37acaded62ca0d80f4308c70ca839626e39f0ab
[]
no_license
webiumsk/WOT-0.9.12
c1e1259411ba1e6c7b02cd6408b731419d3174e5
5be5fd9186f335e7bae88c9761c378ff5fbf5351
refs/heads/master
2021-01-10T01:38:36.523788
2015-11-18T11:33:37
2015-11-18T11:33:37
46,414,438
1
0
null
null
null
null
WINDOWS-1250
Python
false
false
20,705
py
# 2015.11.18 11:52:35 Střední Evropa (běžný čas) # Embedded file name: scripts/client/gui/prb_control/events_dispatcher.py from collections import namedtuple import weakref from constants import PREBATTLE_TYPE, QUEUE_TYPE from debug_utils import LOG_ERROR, LOG_DEBUG from gui.Scaleform.daapi.settings.views import VIEW_ALIAS from gui.Scaleform.framework import ViewTypes from gui.Scaleform.framework.managers.containers import POP_UP_CRITERIA from gui.Scaleform.genConsts.FALLOUT_ALIASES import FALLOUT_ALIASES from gui.Scaleform.genConsts.PREBATTLE_ALIASES import PREBATTLE_ALIASES from gui.Scaleform.genConsts.CYBER_SPORT_ALIASES import CYBER_SPORT_ALIASES from gui.Scaleform.locale.CHAT import CHAT from gui.Scaleform.locale.MENU import MENU from gui.Scaleform.locale.RES_ICONS import RES_ICONS from gui.app_loader.decorators import sf_lobby from gui.prb_control.settings import CTRL_ENTITY_TYPE, FUNCTIONAL_FLAG from gui.shared import g_eventBus, events, EVENT_BUS_SCOPE, utils from gui.shared.events import ChannelManagementEvent, PreBattleChannelEvent from messenger.ext import channel_num_gen from messenger.ext.channel_num_gen import SPECIAL_CLIENT_WINDOWS from messenger.m_constants import LAZY_CHANNEL TOOLTIP_PRB_DATA = namedtuple('TOOLTIP_PRB_DATA', ('tooltipId', 'label')) _CarouselItemCtx = namedtuple('_CarouselItemCtx', ['label', 'canClose', 'isNotified', 'icon', 'order', 'criteria', 'viewType', 'openHandler', 'readyData', 'tooltipData']) _defCarouselItemCtx = _CarouselItemCtx(label=None, canClose=False, isNotified=False, icon=None, order=channel_num_gen.getOrder4Prebattle(), criteria=None, viewType=ViewTypes.WINDOW, openHandler=None, readyData=None, tooltipData=None) _LOCKED_SCREENS = (PREBATTLE_ALIASES.TRAINING_ROOM_VIEW_PY, PREBATTLE_ALIASES.TRAINING_LIST_VIEW_PY) class EventDispatcher(object): def __init__(self): super(EventDispatcher, self).__init__() self.__loadingEvent = None return @sf_lobby def app(self): return None def init(self, dispatcher): self._setPrebattleDispatcher(dispatcher) app = self.app if app and app.containerManager: app.containerManager.onViewAddedToContainer += self.__onViewAddedToContainer def fini(self): self._setPrebattleDispatcher(None) self.__loadingEvent = None app = self.app if app and app.containerManager: app.containerManager.onViewAddedToContainer -= self.__onViewAddedToContainer return def isTrainingLoaded(self): return self.__getLoadedEvent() in _LOCKED_SCREENS or self.__loadingEvent in _LOCKED_SCREENS def updateUI(self): self._fireEvent(events.FightButtonEvent(events.FightButtonEvent.FIGHT_BUTTON_UPDATE)) def loadHangar(self): self._fireLoadEvent(VIEW_ALIAS.LOBBY_HANGAR) def loadBattleQueue(self): self._fireLoadEvent(VIEW_ALIAS.BATTLE_QUEUE) def loadTrainingList(self): self.removeTrainingFromCarousel(False) self.addTrainingToCarousel() self._showTrainingList() def loadTrainingRoom(self): self.removeTrainingFromCarousel() self.addTrainingToCarousel(False) self._showTrainingRoom() def loadCompany(self): self.addCompanyToCarousel() self.showCompanyWindow() def loadBattleSessionWindow(self, prbType): self.addSpecBattleToCarousel(prbType) self.showBattleSessionWindow() def loadBattleSessionList(self): self._fireShowEvent(PREBATTLE_ALIASES.BATTLE_SESSION_LIST_WINDOW_PY) def loadUnit(self, prbType, flags = FUNCTIONAL_FLAG.UNDEFINED): self.__addUnitToCarousel(prbType) self.showUnitWindow(prbType, flags) def loadSquad(self, ctx = None, isTeamReady = False): self.__addSquadToCarousel(isTeamReady) self.__showSquadWindow(ctx and ctx.get('showInvitesWindow', False)) def loadPreArenaUnit(self, prbType, modeFlags = 0): utils.showInvitationInWindowsBar() self.app.containerManager.clear() self.showUnitPreArenaWindow(prbType, modeFlags) def loadPreArenaUnitFromUnit(self, prbType, modeFlags = 0): self._closeUnitWindow() self.removeUnitFromCarousel(prbType) self.loadPreArenaUnit(prbType, modeFlags) def loadUnitFromPreArenaUnit(self, prbType): self.loadHangar() self.loadUnit(prbType) def loadSandboxQueue(self): self._fireShowEvent(VIEW_ALIAS.SANDBOX_QUEUE_DIALOG) def startOffbattleTutorial(self): g_eventBus.handleEvent(events.TutorialEvent(events.TutorialEvent.START_TRAINING, settingsID='OFFBATTLE', reloadIfRun=True, restoreIfRun=True, isStopForced=True), scope=EVENT_BUS_SCOPE.GLOBAL) def unloadBattleSessionWindow(self, prbType): self._closeBattleSessionWindow() self.removeSpecBattleFromCarousel(prbType) self.requestToDestroyPrbChannel(prbType) def unloadTrainingRoom(self): self.removeTrainingFromCarousel() self.requestToDestroyPrbChannel(PREBATTLE_TYPE.TRAINING) def unloadUnit(self, prbType): self._closeUnitWindow() self.removeUnitFromCarousel(prbType) self.requestToDestroyPrbChannel(PREBATTLE_TYPE.UNIT) def unloadPreArenaUnit(self): self.loadHangar() self.requestToDestroyPrbChannel(PREBATTLE_TYPE.UNIT) def unloadCompany(self): self._fireHideEvent(events.HideWindowEvent.HIDE_COMPANY_WINDOW) self.removeCompanyFromCarousel() self.requestToDestroyPrbChannel(PREBATTLE_TYPE.COMPANY) def unloadSandboxQueue(self): self._fireHideEvent(events.HideWindowEvent.HIDE_SANDBOX_QUEUE_DIALOG) def removeTrainingFromCarousel(self, isList = True): clientType = SPECIAL_CLIENT_WINDOWS.TRAINING_LIST if isList else SPECIAL_CLIENT_WINDOWS.TRAINING_ROOM clientID = channel_num_gen.getClientID4SpecialWindow(clientType) if not clientID: LOG_ERROR('Client ID not found', 'removeTrainingToCarousel') return self._handleRemoveRequest(clientID) def addTrainingToCarousel(self, isList = True): if isList: clientType = SPECIAL_CLIENT_WINDOWS.TRAINING_LIST alias = PREBATTLE_ALIASES.TRAINING_LIST_VIEW_PY handler = self._showTrainingList else: clientType = SPECIAL_CLIENT_WINDOWS.TRAINING_ROOM alias = PREBATTLE_ALIASES.TRAINING_ROOM_VIEW_PY handler = self._returnToTrainingRoom clientID = channel_num_gen.getClientID4SpecialWindow(clientType) if not clientID: LOG_ERROR('Client ID not found', 'addTrainingToCarousel') return currCarouselItemCtx = _defCarouselItemCtx._replace(label=MENU.HEADERBUTTONS_BATTLE_TYPES_TRAINING, criteria={POP_UP_CRITERIA.VIEW_ALIAS: alias}, viewType=ViewTypes.LOBBY_SUB, openHandler=handler) self._handleAddPreBattleRequest(clientID, currCarouselItemCtx._asdict()) def removeSquadFromCarousel(self): clientID = channel_num_gen.getClientID4Prebattle(PREBATTLE_TYPE.SQUAD) if not clientID: LOG_ERROR('Client ID not found', '_removeSquadFromCarousel') return self._handleRemoveRequest(clientID) def addCompanyToCarousel(self): clientID = self.__getClientIDForCompany() if not clientID: LOG_ERROR('Client ID not found', 'addCompanyToCarousel') return currCarouselItemCtx = _defCarouselItemCtx._replace(label=CHAT.CHANNELS_TEAM, criteria={POP_UP_CRITERIA.VIEW_ALIAS: PREBATTLE_ALIASES.COMPANY_WINDOW_PY}, openHandler=self.showCompanyWindow) self._handleAddPreBattleRequest(clientID, currCarouselItemCtx._asdict()) def removeCompanyFromCarousel(self): clientID = channel_num_gen.getClientID4Prebattle(PREBATTLE_TYPE.COMPANY) if not clientID: LOG_ERROR('Client ID not found', 'removeCompanyFromCarousel') return self._handleRemoveRequest(clientID) def addSpecBattleToCarousel(self, prbType): clientID = channel_num_gen.getClientID4Prebattle(prbType) if not clientID: LOG_ERROR('Client ID not found', 'addSpecBattleToCarousel') return if prbType is PREBATTLE_TYPE.CLAN: label = CHAT.CHANNELS_CLAN elif prbType is PREBATTLE_TYPE.TOURNAMENT: label = CHAT.CHANNELS_TOURNAMENT else: LOG_ERROR('Prebattle type is not valid', prbType) return currCarouselItemCtx = _defCarouselItemCtx._replace(label=label, criteria={POP_UP_CRITERIA.VIEW_ALIAS: PREBATTLE_ALIASES.BATTLE_SESSION_ROOM_WINDOW_PY}, openHandler=self.showBattleSessionWindow) self._handleAddPreBattleRequest(clientID, currCarouselItemCtx._asdict()) def addSpecBattlesToCarousel(self): clientID = channel_num_gen.getClientID4LazyChannel(LAZY_CHANNEL.SPECIAL_BATTLES) if not clientID: LOG_ERROR('Client ID not found', 'addSpecBattlesToCarousel') return currCarouselItemCtx = _defCarouselItemCtx._replace(label=LAZY_CHANNEL.SPECIAL_BATTLES, order=channel_num_gen.getOrder4LazyChannel(LAZY_CHANNEL.SPECIAL_BATTLES), isNotified=True, criteria={POP_UP_CRITERIA.VIEW_ALIAS: PREBATTLE_ALIASES.BATTLE_SESSION_LIST_WINDOW_PY}, openHandler=self.loadBattleSessionList) self._fireEvent(ChannelManagementEvent(clientID, PreBattleChannelEvent.REQUEST_TO_ADD, currCarouselItemCtx._asdict())) def removeSpecBattleFromCarousel(self, prbType): clientID = channel_num_gen.getClientID4Prebattle(prbType) if not clientID: LOG_ERROR('Client ID not found', '_removeSpecBattleFromCarousel') return self._handleRemoveRequest(clientID) def removeSpecBattlesFromCarousel(self): clientID = channel_num_gen.getClientID4LazyChannel(LAZY_CHANNEL.SPECIAL_BATTLES) if not clientID: LOG_ERROR('Client ID not found', 'removeSpecBattlesFromCarousel') return self._fireEvent(ChannelManagementEvent(clientID, PreBattleChannelEvent.REQUEST_TO_REMOVE)) def showUnitWindow(self, prbType, flags = FUNCTIONAL_FLAG.UNDEFINED): if prbType in (PREBATTLE_TYPE.SORTIE, PREBATTLE_TYPE.FORT_BATTLE): from gui.Scaleform.genConsts.FORTIFICATION_ALIASES import FORTIFICATION_ALIASES self._fireEvent(events.LoadViewEvent(FORTIFICATION_ALIASES.FORT_BATTLE_ROOM_WINDOW_ALIAS, ctx={'flags': flags})) else: self._fireShowEvent(CYBER_SPORT_ALIASES.CYBER_SPORT_WINDOW_PY) def showUnitPreArenaWindow(self, prbType, modeFlags = 0): self._fireShowEvent(CYBER_SPORT_ALIASES.CS_RESPAWN_PY) def showSwitchPeripheryWindow(self, ctx): g_eventBus.handleEvent(events.LoadViewEvent(VIEW_ALIAS.SWITCH_PERIPHERY_WINDOW, ctx=ctx), scope=EVENT_BUS_SCOPE.LOBBY) def removeUnitFromCarousel(self, prbType): clientID = channel_num_gen.getClientID4Prebattle(prbType) if not clientID: LOG_ERROR('Client ID not found', 'removeUnitFromCarousel', prbType) return self._handleRemoveRequest(clientID) def setUnitProgressInCarousel(self, prbType, isInProgress): clientID = channel_num_gen.getClientID4Prebattle(prbType) if not clientID: LOG_ERROR('Client ID not found', 'setUnitProgressInCarousel', prbType) return self._fireEvent(events.ChannelManagementEvent(clientID, events.ChannelManagementEvent.REQUEST_TO_CHANGE, {'key': 'isInProgress', 'value': isInProgress, 'isShowByReq': isInProgress, 'showIfClosed': True})) def showUnitProgressInCarousel(self, prbType): self._showUnitProgress(prbType, True) def hideUnitProgressInCarousel(self, prbType): self._showUnitProgress(prbType, False) def requestToDestroyPrbChannel(self, prbType): self._fireEvent(events.MessengerEvent(events.MessengerEvent.PRB_CHANNEL_CTRL_REQUEST_DESTROY, {'prbType': prbType})) def fireAutoInviteReceived(self, invite): self._fireEvent(events.AutoInviteEvent(invite, events.AutoInviteEvent.INVITE_RECEIVED)) @classmethod def showParentControlNotification(cls): from gui import game_control, DialogsInterface DialogsInterface.showDialog(game_control.g_instance.gameSession.getParentControlNotificationMeta(), lambda *args: None) def __showSquadWindow(self, showInvitesWindow = False): self._fireShowEvent(PREBATTLE_ALIASES.SQUAD_WINDOW_PY) if showInvitesWindow: self._fireEvent(events.LoadViewEvent(PREBATTLE_ALIASES.SEND_INVITES_WINDOW_PY, ctx={'prbName': 'squad', 'ctrlType': CTRL_ENTITY_TYPE.UNIT})) def showCompanyWindow(self): self._fireShowEvent(PREBATTLE_ALIASES.COMPANY_WINDOW_PY, self.__getCompanyWindowContext()) def showBattleSessionWindow(self): self._fireShowEvent(PREBATTLE_ALIASES.BATTLE_SESSION_ROOM_WINDOW_PY) def setSquadTeamReadyInCarousel(self, prbType, isTeamReady): clientID = channel_num_gen.getClientID4Prebattle(prbType) if not clientID: LOG_ERROR('Client ID not found', 'setSquadTeamReadyInCarousel', prbType) return readyData = self.__getReadyPrbData(isTeamReady) g_eventBus.handleEvent(events.ChannelManagementEvent(clientID, events.ChannelManagementEvent.REQUEST_TO_CHANGE, {'key': 'readyData', 'value': readyData, 'isShowByReq': False, 'showIfClosed': True}), scope=EVENT_BUS_SCOPE.LOBBY) g_eventBus.handleEvent(events.ChannelManagementEvent(clientID, events.ChannelManagementEvent.REQUEST_TO_CHANGE, {'key': 'tooltipData', 'value': self.__getTooltipPrbData(CHAT.CHANNELS_SQUADREADY_TOOLTIP if isTeamReady else CHAT.CHANNELS_SQUADNOTREADY_TOOLTIP), 'isShowByReq': False, 'showIfClosed': True}), scope=EVENT_BUS_SCOPE.LOBBY) def loadFallout(self): self.addFalloutToCarousel() def unloadFallout(self): self.removeFalloutFromCarousel() self._fireHideEvent(events.HideWindowEvent.HIDE_FALLOUT_WINDOW) def addFalloutToCarousel(self): clientID = channel_num_gen.getClientID4PreQueue(QUEUE_TYPE.EVENT_BATTLES) if not clientID: LOG_ERROR('Client ID not found', 'addFalloutToCarousel') return currCarouselItemCtx = _defCarouselItemCtx._replace(label='#fallout:channel/label', criteria={POP_UP_CRITERIA.VIEW_ALIAS: 'falloutBattleSelectorWindow'}, openHandler=self.showFalloutWindow) self._handleAddPreBattleRequest(clientID, currCarouselItemCtx._asdict()) def removeFalloutFromCarousel(self): clientID = channel_num_gen.getClientID4PreQueue(QUEUE_TYPE.EVENT_BATTLES) if not clientID: LOG_ERROR('Client ID not found', 'removeFalloutFromCarousel') return self._handleRemoveRequest(clientID) def showFalloutWindow(self): self._fireShowEvent(FALLOUT_ALIASES.FALLOUT_BATTLE_SELECTOR_WINDOW) def _showUnitProgress(self, prbType, show): clientID = channel_num_gen.getClientID4Prebattle(prbType) if not clientID: LOG_ERROR('Client ID not found', '_showUnitStatus', prbType) return self._fireEvent(events.ChannelManagementEvent(clientID, events.ChannelManagementEvent.REQUEST_TO_SHOW, {'show': show})) def _showTrainingRoom(self): self._fireLoadEvent(PREBATTLE_ALIASES.TRAINING_ROOM_VIEW_PY) def _returnToTrainingRoom(self): if self.__prbDispatcher is not None: functional = self.__prbDispatcher.getPrbFunctional() if functional: functional.doAction() return def _fireEvent(self, event, scope = EVENT_BUS_SCOPE.LOBBY): g_eventBus.handleEvent(event, scope) def _fireHideEvent(self, event): self._fireEvent(events.HideWindowEvent(event)) def _fireShowEvent(self, eventName, arg = None): if arg is None: self._fireEvent(events.LoadViewEvent(eventName)) else: self._fireEvent(events.LoadViewEvent(eventName, ctx=arg)) return def _fireLoadEvent(self, eventName): if self.__getLoadedEvent() == eventName: LOG_DEBUG('View already is loaded', eventName) return if self.__loadingEvent: LOG_DEBUG('View is still loading. It is ignored', self.__loadingEvent, eventName) else: self.__loadingEvent = eventName self._fireEvent(events.LoadViewEvent(eventName)) def _handleRemoveRequest(self, clientID): self._fireEvent(ChannelManagementEvent(clientID, PreBattleChannelEvent.REQUEST_TO_REMOVE_PRE_BATTLE_CHANNEL)) def _handleAddPreBattleRequest(self, clientID, carouselItemCtx): self._fireEvent(ChannelManagementEvent(clientID, PreBattleChannelEvent.REQUEST_TO_ADD_PRE_BATTLE_CHANNEL, carouselItemCtx)) def _closeBattleSessionWindow(self): self._fireHideEvent(events.HideWindowEvent.HIDE_BATTLE_SESSION_WINDOW) def _closeUnitWindow(self): self._fireHideEvent(events.HideWindowEvent.HIDE_UNIT_WINDOW) def _setPrebattleDispatcher(self, prbDispatcher): if prbDispatcher is not None: self.__prbDispatcher = weakref.proxy(prbDispatcher) else: self.__prbDispatcher = None return def _showTrainingList(self): self._fireLoadEvent(PREBATTLE_ALIASES.TRAINING_LIST_VIEW_PY) def __getReadyPrbData(self, isReady): return {'isReady': isReady} def __getTooltipPrbData(self, tooltipId, label = ''): return TOOLTIP_PRB_DATA(tooltipId=tooltipId, label=label)._asdict() def __getCompanyWindowContext(self): return {'clientID': self.__getClientIDForCompany()} def __getClientIDForCompany(self): return channel_num_gen.getClientID4Prebattle(PREBATTLE_TYPE.COMPANY) def __onViewAddedToContainer(self, _, pyEntity): settings = pyEntity.settings if settings.event == self.__loadingEvent: self.__loadingEvent = None if settings.type == ViewTypes.LOBBY_SUB: self.updateUI() return def __getLoadedEvent(self): app = self.app if app and app.containerManager: container = app.containerManager.getContainer(ViewTypes.LOBBY_SUB) if container: view = container.getView() if view: return view.settings.event return None def __addUnitToCarousel(self, prbType): clientID = channel_num_gen.getClientID4Prebattle(prbType) if not clientID: LOG_ERROR('Client ID not found', 'addUnitToCarousel') return if prbType in (PREBATTLE_TYPE.SORTIE, PREBATTLE_TYPE.FORT_BATTLE): from gui.Scaleform.locale.FORTIFICATIONS import FORTIFICATIONS from gui.Scaleform.genConsts.FORTIFICATION_ALIASES import FORTIFICATION_ALIASES label = FORTIFICATIONS.SORTIE_INTROVIEW_TITLE criteria = {POP_UP_CRITERIA.VIEW_ALIAS: FORTIFICATION_ALIASES.FORT_BATTLE_ROOM_WINDOW_ALIAS} else: from gui.Scaleform.locale.CYBERSPORT import CYBERSPORT label = CYBERSPORT.WINDOW_TITLE criteria = {POP_UP_CRITERIA.VIEW_ALIAS: CYBER_SPORT_ALIASES.CYBER_SPORT_WINDOW_PY} currCarouselItemCtx = _defCarouselItemCtx._replace(label=label, criteria=criteria, viewType=ViewTypes.WINDOW, openHandler=lambda : self.showUnitWindow(prbType)) self._handleAddPreBattleRequest(clientID, currCarouselItemCtx._asdict()) def __addSquadToCarousel(self, isTeamReady = False): clientID = channel_num_gen.getClientID4Prebattle(PREBATTLE_TYPE.SQUAD) if not clientID: LOG_ERROR('Client ID not found', 'addSquadToCarousel') return currCarouselItemCtx = _defCarouselItemCtx._replace(label=CHAT.CHANNELS_SQUAD, icon=RES_ICONS.MAPS_ICONS_MESSENGER_SQUAD_ICON, criteria={POP_UP_CRITERIA.VIEW_ALIAS: PREBATTLE_ALIASES.SQUAD_WINDOW_PY}, openHandler=self.__showSquadWindow, readyData=self.__getReadyPrbData(isTeamReady), tooltipData=self.__getTooltipPrbData(CHAT.CHANNELS_SQUADREADY_TOOLTIP if isTeamReady else CHAT.CHANNELS_SQUADNOTREADY_TOOLTIP)) self._handleAddPreBattleRequest(clientID, currCarouselItemCtx._asdict()) g_eventDispatcher = EventDispatcher() # okay decompyling c:\Users\PC\wotsources\files\originals\res\scripts\client\gui\prb_control\events_dispatcher.pyc # decompiled 1 files: 1 okay, 0 failed, 0 verify failed # 2015.11.18 11:52:35 Střední Evropa (běžný čas)
[ "info@webium.sk" ]
info@webium.sk
709e7d7e6a11dab702e42a85f82a7a56192f8430
649bd422025e421d86025743eac324c9b882a2e8
/exam/1_three-dimensional_atomic_system/dump/phasetrans/temp98_5500.py
ba1119e82689dc9b4a1fe068f5e423d1a0bd5312
[]
no_license
scheuclu/atom_class
36ddee1f6a5995872e858add151c5942c109847c
0c9a8c63d9b38898c1869fe8983126cef17662cd
refs/heads/master
2021-01-21T10:52:28.448221
2017-03-07T23:04:41
2017-03-07T23:04:41
83,489,471
0
0
null
null
null
null
UTF-8
Python
false
false
68,804
py
ITEM: TIMESTEP 5500 ITEM: NUMBER OF ATOMS 2048 ITEM: BOX BOUNDS pp pp pp 2.0544667101332337e-01 4.6994553328978242e+01 2.0544667101332337e-01 4.6994553328978242e+01 2.0544667101332337e-01 4.6994553328978242e+01 ITEM: ATOMS id type xs ys zs 8 1 0.127544 0.0698994 0.0579198 35 1 0.0630352 0.131209 0.0707746 130 1 0.0662126 0.0709103 0.123638 165 1 0.1324 0.13737 0.125524 1027 1 0.0626128 0.49927 0.0620424 97 1 -0.000201684 0.378632 0.00624324 1183 1 0.93456 0.497622 0.184209 12 1 0.248676 0.0675048 0.0541892 39 1 0.189282 0.128721 0.0544049 43 1 0.312089 0.12804 0.0632718 134 1 0.181162 0.0692267 0.124987 138 1 0.308357 0.0655386 0.11386 169 1 0.252078 0.123292 0.129181 106 1 0.319595 0.436745 0.00300758 267 1 0.309312 -0.00285901 0.310103 49 1 0.496733 0.117374 0.0031666 16 1 0.373477 0.0595223 0.0582101 47 1 0.425979 0.123175 0.0658801 142 1 0.435466 0.0611429 0.125878 173 1 0.373711 0.123319 0.129551 177 1 0.504421 0.118379 0.125159 101 1 0.130793 0.379065 -0.000309698 20 1 0.505274 0.0577814 0.0657803 1309 1 0.880251 0.49082 0.246614 157 1 0.86986 0.00160894 0.118714 24 1 0.623414 0.0551684 0.0463509 51 1 0.569438 0.12487 0.0569553 146 1 0.567742 0.0617365 0.125047 181 1 0.624464 0.116563 0.117704 1409 1 0.993889 0.496391 0.37251 141 1 0.371105 5.90988e-05 0.128078 28 1 0.748037 0.0599962 0.0628608 55 1 0.685826 0.115748 0.0618739 59 1 0.816949 0.127445 0.0629392 150 1 0.681589 0.0631938 0.124405 154 1 0.813479 0.0653472 0.118267 185 1 0.746331 0.135598 0.124388 1439 1 0.944227 0.497581 0.442718 1283 1 0.0478426 0.500466 0.317056 161 1 0.996544 0.128354 0.121426 4 1 0.0070568 0.0638295 0.0656212 32 1 0.879564 0.0635941 0.0560105 63 1 0.935693 0.122019 0.0563539 158 1 0.935345 0.0571423 0.121224 189 1 0.87771 0.123908 0.124965 263 1 0.191531 0.0048593 0.319927 281 1 0.751618 0.00656147 0.237977 287 1 0.947335 -0.00506938 0.306907 1153 1 0.00300344 0.496203 0.125055 70 1 0.185742 0.327028 0.00036551 259 1 0.068278 0.0113402 0.315943 1055 1 0.935966 0.480508 0.0637062 40 1 0.123081 0.193077 0.055864 67 1 0.0697177 0.259662 0.0677784 72 1 0.132163 0.322351 0.0611591 162 1 0.0643923 0.192359 0.13067 194 1 0.0674546 0.313403 0.125983 197 1 0.12229 0.262829 0.127266 68 1 0.0012776 0.30324 0.0658558 494 1 0.442917 0.439706 0.37313 44 1 0.254604 0.184901 0.0609992 71 1 0.181062 0.252699 0.064293 75 1 0.302132 0.250795 0.056714 76 1 0.244195 0.313115 0.0590401 166 1 0.193834 0.191603 0.123309 170 1 0.309349 0.181391 0.128968 198 1 0.184175 0.313618 0.138334 201 1 0.252361 0.253716 0.126873 202 1 0.309757 0.315067 0.128756 151 1 0.6914 0.00590807 0.184275 139 1 0.301887 0.00237776 0.187298 638 1 0.933805 0.437756 0.502102 513 1 0.998464 0.00553194 0.495431 174 1 0.436815 0.18984 0.125632 48 1 0.363604 0.186148 0.0608175 79 1 0.443532 0.247754 0.0628278 80 1 0.372862 0.308976 0.0566341 205 1 0.365991 0.247428 0.117822 206 1 0.438071 0.301453 0.131194 209 1 0.502835 0.243224 0.126564 52 1 0.496067 0.181146 0.0684063 1429 1 0.621476 0.502313 0.369514 1289 1 0.248454 0.493242 0.255614 84 1 0.506485 0.303456 0.066552 56 1 0.621511 0.187792 0.0687622 83 1 0.564084 0.248103 0.0679011 88 1 0.623891 0.31279 0.0568991 178 1 0.557432 0.181389 0.124608 210 1 0.565352 0.316608 0.125661 213 1 0.610925 0.246904 0.130687 495 1 0.44327 0.373538 0.435194 60 1 0.747576 0.19066 0.0661163 87 1 0.681586 0.247556 0.0589665 91 1 0.807583 0.247978 0.0538548 92 1 0.742694 0.304174 0.060045 182 1 0.687779 0.191678 0.119912 186 1 0.81825 0.196398 0.126086 214 1 0.681721 0.303761 0.1254 217 1 0.749924 0.246885 0.12408 218 1 0.822963 0.308975 0.121352 34 1 0.059438 0.203354 0.00354161 129 1 0.0100369 0.00946668 0.125322 405 1 0.629546 0.00137782 0.366493 606 1 0.935844 0.316812 0.498738 496 1 0.367225 0.439309 0.435471 193 1 0.00816963 0.251882 0.12866 36 1 1.001 0.190055 0.0656804 64 1 0.881543 0.185203 0.0629458 95 1 0.93091 0.25349 0.0515586 96 1 0.888717 0.316967 0.0548674 190 1 0.938746 0.17948 0.125953 221 1 0.88546 0.249072 0.12281 222 1 0.942701 0.309474 0.126044 407 1 0.692198 0.00227495 0.425354 1029 1 0.127907 0.500479 -0.000286254 99 1 0.0645388 0.372834 0.0651504 104 1 0.122808 0.432189 0.0624931 226 1 0.0630891 0.441447 0.133142 229 1 0.120902 0.365785 0.133934 225 1 0.00216658 0.37246 0.12424 90 1 0.813958 0.315896 -0.00353207 625 1 0.5046 0.374774 0.502042 103 1 0.186054 0.378828 0.0721364 107 1 0.307067 0.377442 0.0694958 108 1 0.246503 0.44113 0.0602444 230 1 0.178627 0.438852 0.119795 233 1 0.25059 0.374136 0.129614 234 1 0.300399 0.443845 0.126041 1287 1 0.183119 0.497483 0.317746 493 1 0.37707 0.373494 0.372859 111 1 0.444318 0.362868 0.0743694 112 1 0.380505 0.432215 0.0626621 237 1 0.377355 0.368432 0.127817 238 1 0.433049 0.434538 0.132955 241 1 0.501228 0.369468 0.1268 116 1 0.49601 0.427356 0.0538517 115 1 0.556906 0.368284 0.0644371 120 1 0.627259 0.430338 0.0611633 242 1 0.56339 0.437405 0.121109 245 1 0.620516 0.371354 0.117098 119 1 0.6857 0.371019 0.0597504 123 1 0.817153 0.370753 0.0555844 124 1 0.755297 0.436874 0.062695 246 1 0.689713 0.435483 0.128063 249 1 0.755666 0.372873 0.120324 250 1 0.814679 0.432548 0.121313 159 1 0.95025 0.0143703 0.185299 542 1 0.934609 0.0551991 0.49845 100 1 0.00812801 0.431395 0.0690877 127 1 0.945477 0.369282 0.0688509 128 1 0.881942 0.419602 0.058668 253 1 0.881561 0.368669 0.121946 254 1 0.944368 0.436051 0.128264 31 1 0.936604 0.000808076 0.057722 500 1 0.495997 0.43817 0.433831 565 1 0.634397 0.126888 0.493555 145 1 0.499952 0.0114401 0.136302 136 1 0.122847 0.065798 0.18618 163 1 0.0687483 0.132434 0.182974 258 1 0.0665405 0.0715607 0.252008 264 1 0.130165 0.0687912 0.322995 291 1 0.0738985 0.12762 0.321217 293 1 0.133669 0.123325 0.246758 132 1 0.00800813 0.0713984 0.181494 140 1 0.248425 0.0590136 0.184706 167 1 0.195957 0.135455 0.186705 171 1 0.310123 0.121309 0.190804 262 1 0.190422 0.0692028 0.249493 266 1 0.301765 0.0569989 0.248903 268 1 0.250773 0.0689475 0.320429 295 1 0.190048 0.130201 0.31338 297 1 0.250264 0.137312 0.250375 299 1 0.314949 0.129459 0.311961 275 1 0.568636 0.00985281 0.309614 144 1 0.362197 0.060949 0.180742 175 1 0.433288 0.121123 0.186124 270 1 0.422932 0.0606162 0.244433 272 1 0.371539 0.0628482 0.318099 301 1 0.369006 0.12169 0.249596 303 1 0.434455 0.12788 0.304906 305 1 0.505112 0.121172 0.249201 148 1 0.499634 0.0665014 0.198035 276 1 0.500509 0.0506575 0.313772 512 1 0.873239 0.434839 0.435348 152 1 0.635725 0.0658574 0.189394 179 1 0.562746 0.126876 0.18811 274 1 0.563527 0.0696477 0.245349 280 1 0.617752 0.0724252 0.321694 307 1 0.553993 0.118254 0.311729 309 1 0.622996 0.130068 0.246617 1413 1 0.125014 0.499829 0.383127 602 1 0.813462 0.31297 0.497527 511 1 0.948509 0.382565 0.431643 156 1 0.754534 0.0716528 0.178583 183 1 0.686889 0.126814 0.184595 187 1 0.811376 0.124276 0.183462 278 1 0.689357 0.0668346 0.252667 282 1 0.810175 0.0713624 0.251819 284 1 0.744645 0.0763644 0.310368 311 1 0.67311 0.130787 0.318142 313 1 0.748303 0.127929 0.250461 315 1 0.814716 0.1225 0.315192 50 1 0.567956 0.18557 0.00796657 260 1 -0.000761798 0.0619507 0.314608 289 1 0.99689 0.121898 0.251172 160 1 0.876828 0.0585571 0.181507 191 1 0.932519 0.119387 0.188329 286 1 0.947512 0.0593504 0.25096 288 1 0.871069 0.0681829 0.308042 317 1 0.879433 0.129118 0.246948 319 1 0.939794 0.122622 0.307748 510 1 0.926823 0.433712 0.373681 168 1 0.125827 0.190202 0.188083 195 1 0.068333 0.251731 0.18997 200 1 0.122469 0.316141 0.19703 290 1 0.0693767 0.181773 0.256761 296 1 0.12951 0.197551 0.314589 322 1 0.0601125 0.30675 0.255756 323 1 0.0646434 0.252088 0.321566 325 1 0.124585 0.254545 0.257437 328 1 0.129343 0.317499 0.316894 292 1 0.00116549 0.191762 0.307152 324 1 0.0063616 0.316242 0.318134 196 1 0.0170532 0.317234 0.191566 172 1 0.250493 0.194592 0.183531 199 1 0.190418 0.247934 0.183543 203 1 0.318995 0.253116 0.186965 294 1 0.181351 0.188384 0.252546 298 1 0.311498 0.192712 0.243764 300 1 0.2519 0.184358 0.31832 326 1 0.193298 0.31991 0.255653 327 1 0.185712 0.255699 0.311575 329 1 0.237509 0.250288 0.243171 330 1 0.319856 0.319909 0.246056 331 1 0.30973 0.247521 0.311427 332 1 0.25421 0.319498 0.317833 204 1 0.244435 0.312228 0.189556 176 1 0.371537 0.189699 0.185481 207 1 0.438285 0.246646 0.187457 208 1 0.379837 0.313571 0.186418 302 1 0.426426 0.190725 0.247813 304 1 0.369626 0.190637 0.314532 333 1 0.3699 0.256633 0.254898 334 1 0.437146 0.317052 0.248405 335 1 0.433905 0.252704 0.309561 336 1 0.378076 0.32087 0.306213 212 1 0.511041 0.307633 0.181603 308 1 0.499883 0.185061 0.317902 180 1 0.499743 0.177904 0.191008 337 1 0.497814 0.247249 0.249868 340 1 0.50169 0.321743 0.308561 184 1 0.625874 0.191756 0.185425 211 1 0.560327 0.243315 0.194094 216 1 0.619487 0.316419 0.18541 306 1 0.557741 0.187437 0.249783 312 1 0.616003 0.183417 0.320321 338 1 0.558933 0.313567 0.246168 339 1 0.566155 0.25252 0.312289 341 1 0.621267 0.250735 0.249222 344 1 0.62986 0.314534 0.315677 314 1 0.812088 0.184373 0.244493 188 1 0.745709 0.194742 0.183861 215 1 0.684117 0.24959 0.194201 219 1 0.814456 0.246247 0.18746 220 1 0.758001 0.30695 0.177217 310 1 0.683551 0.183237 0.2525 316 1 0.741902 0.188853 0.31187 342 1 0.69358 0.309752 0.247186 343 1 0.675013 0.249294 0.314862 345 1 0.743275 0.248238 0.252436 346 1 0.806666 0.305648 0.244286 347 1 0.823403 0.241741 0.309816 348 1 0.750989 0.311846 0.317467 164 1 0.00267856 0.182193 0.1908 321 1 0.996183 0.251059 0.247652 192 1 0.877144 0.190736 0.187372 223 1 0.941381 0.249606 0.186015 224 1 0.874658 0.299359 0.193409 318 1 0.942036 0.191808 0.251264 320 1 0.881029 0.179764 0.31319 349 1 0.87468 0.245354 0.248068 350 1 0.932968 0.316186 0.252453 351 1 0.932195 0.246886 0.312202 352 1 0.874825 0.309195 0.312757 573 1 0.870443 0.119738 0.501219 227 1 0.0686663 0.379476 0.193474 232 1 0.124494 0.445355 0.191236 354 1 0.071135 0.445874 0.255173 355 1 0.0687077 0.383234 0.318623 357 1 0.127686 0.381453 0.2615 360 1 0.124147 0.444457 0.31954 228 1 0.00439868 0.436267 0.191241 353 1 0.0085882 0.369496 0.252468 356 1 0.996141 0.440077 0.310745 37 1 0.110828 0.127405 0.0056864 231 1 0.188205 0.376493 0.198154 235 1 0.310307 0.380158 0.188839 236 1 0.23906 0.435629 0.187037 358 1 0.17789 0.438544 0.253114 359 1 0.185745 0.372553 0.320394 361 1 0.252504 0.380815 0.252845 362 1 0.314651 0.441298 0.249074 363 1 0.312706 0.377745 0.310296 364 1 0.244699 0.432459 0.314893 86 1 0.686661 0.313267 0.00178494 491 1 0.315715 0.376015 0.43554 1179 1 0.811491 0.49625 0.176944 239 1 0.445093 0.374226 0.191607 240 1 0.372302 0.441678 0.186971 365 1 0.373093 0.386965 0.252628 366 1 0.427103 0.442451 0.251223 367 1 0.437384 0.380456 0.313096 368 1 0.370738 0.437994 0.31766 369 1 0.494005 0.375886 0.254171 372 1 0.501269 0.435114 0.311812 1177 1 0.747981 0.497118 0.120231 509 1 0.869394 0.37116 0.371874 507 1 0.801594 0.385543 0.436313 244 1 0.506149 0.436428 0.185836 243 1 0.562362 0.37168 0.181669 248 1 0.6187 0.439077 0.177591 370 1 0.563462 0.44414 0.248263 371 1 0.55803 0.373797 0.318361 373 1 0.626592 0.376951 0.250074 376 1 0.62827 0.438304 0.300489 569 1 0.742483 0.13095 0.49081 283 1 0.814581 -0.000952394 0.307643 1565 1 0.871414 0.500812 0.496704 502 1 0.683032 0.438054 0.370855 247 1 0.695558 0.373675 0.183721 251 1 0.8276 0.37167 0.1868 252 1 0.753969 0.440822 0.183478 374 1 0.693436 0.440824 0.241179 375 1 0.687409 0.384291 0.301987 377 1 0.761429 0.37365 0.239689 378 1 0.812858 0.434782 0.248431 379 1 0.815973 0.370938 0.302297 380 1 0.755662 0.441229 0.304206 395 1 0.309249 0.00682129 0.434954 526 1 0.441665 0.0539797 0.49553 131 1 0.0701573 0.0034673 0.180055 255 1 0.939822 0.367614 0.186298 256 1 0.885204 0.431317 0.183494 381 1 0.880084 0.377857 0.246252 382 1 0.940993 0.430925 0.243402 383 1 0.935534 0.376613 0.311107 384 1 0.872714 0.435775 0.307013 508 1 0.737387 0.449671 0.438672 23 1 0.679203 0.000429644 0.0621676 530 1 0.567432 0.0557133 0.491318 386 1 0.0664305 0.0632279 0.3847 392 1 0.123452 0.0673598 0.441754 419 1 0.0701823 0.127702 0.448515 421 1 0.130339 0.138471 0.381442 1297 1 0.493121 0.498325 0.24786 27 1 0.811025 0.00106688 0.057157 390 1 0.184135 0.065676 0.384274 394 1 0.315037 0.0640635 0.376054 396 1 0.249757 0.064963 0.441064 423 1 0.189191 0.127643 0.452801 425 1 0.249197 0.132326 0.386044 427 1 0.31627 0.11479 0.443178 398 1 0.442309 0.0803161 0.370765 400 1 0.381127 0.062978 0.433206 429 1 0.374999 0.12457 0.377009 431 1 0.427963 0.12614 0.437126 433 1 0.502453 0.131804 0.374648 517 1 0.128909 0.00509638 0.503466 391 1 0.191919 -0.00115118 0.449911 155 1 0.813463 0.00614649 0.176471 404 1 0.502141 0.0581198 0.437529 402 1 0.560773 0.0617335 0.378033 408 1 0.629141 0.058 0.430145 435 1 0.571045 0.127835 0.443561 437 1 0.619906 0.12579 0.378654 409 1 0.748058 0.00890635 0.366141 1169 1 0.496828 0.496396 0.127687 503 1 0.683779 0.37637 0.43777 406 1 0.690085 0.073715 0.371528 410 1 0.817286 0.0590891 0.377278 412 1 0.743641 0.0709272 0.432517 439 1 0.690902 0.138237 0.428627 441 1 0.757566 0.125175 0.375394 443 1 0.816272 0.125315 0.439943 279 1 0.691788 0.0063409 0.309673 487 1 0.189331 0.393415 0.450677 492 1 0.258386 0.437965 0.4444 417 1 0.00345025 0.127812 0.384541 388 1 0.000792584 0.067197 0.43926 414 1 0.931155 0.055382 0.36801 416 1 0.878977 0.0605839 0.435468 445 1 0.867676 0.13065 0.375052 447 1 0.942795 0.13167 0.43762 506 1 0.80628 0.442565 0.376316 1181 1 0.873315 0.486076 0.124376 147 1 0.554621 0.00221033 0.197667 633 1 0.75043 0.387738 0.497768 418 1 0.0713035 0.196752 0.382384 424 1 0.123727 0.197129 0.445894 450 1 0.0605454 0.320803 0.382839 451 1 0.0619672 0.259667 0.451747 453 1 0.13301 0.259583 0.380892 456 1 0.125242 0.315644 0.441129 452 1 0.99861 0.312223 0.437905 420 1 1.00229 0.20361 0.439645 449 1 0.995914 0.257801 0.374558 489 1 0.250452 0.3806 0.379732 626 1 0.556772 0.445905 0.495067 29 1 0.869682 0.00325733 -0.00143928 1165 1 0.375362 0.492248 0.114072 504 1 0.619411 0.443274 0.438707 422 1 0.191483 0.194409 0.377466 426 1 0.315169 0.194865 0.380748 428 1 0.244586 0.189564 0.437667 454 1 0.186708 0.31872 0.387835 455 1 0.195924 0.25332 0.443918 457 1 0.258823 0.253247 0.375162 458 1 0.316887 0.316151 0.379178 459 1 0.314764 0.247333 0.439192 460 1 0.257937 0.316571 0.43427 486 1 0.189095 0.441906 0.378778 497 1 0.503488 0.37127 0.379072 430 1 0.434751 0.188441 0.384901 432 1 0.377834 0.190812 0.44422 461 1 0.373169 0.249328 0.378244 462 1 0.440282 0.320021 0.36927 463 1 0.449649 0.246057 0.440821 464 1 0.384186 0.305831 0.4436 436 1 0.507414 0.184416 0.443399 468 1 0.511495 0.315298 0.445548 465 1 0.499979 0.259289 0.375371 7 1 0.178094 0.00699562 0.0626412 498 1 0.554473 0.437779 0.377417 440 1 0.623829 0.194457 0.439856 466 1 0.565945 0.313582 0.373812 472 1 0.622875 0.311914 0.447945 469 1 0.627181 0.257527 0.388549 434 1 0.556545 0.198045 0.377105 467 1 0.565441 0.252785 0.447141 490 1 0.311133 0.445878 0.371005 501 1 0.63393 0.369059 0.373606 470 1 0.691446 0.313144 0.386568 442 1 0.810025 0.191841 0.381757 471 1 0.690298 0.25656 0.442441 444 1 0.752113 0.200823 0.443726 473 1 0.755495 0.25463 0.375105 476 1 0.747643 0.317064 0.441157 438 1 0.682428 0.193556 0.37336 474 1 0.81239 0.308943 0.371949 475 1 0.826958 0.251793 0.436595 54 1 0.682424 0.185133 0.00803547 285 1 0.877156 0.0036337 0.241683 499 1 0.569841 0.380762 0.432023 85 1 0.621791 0.24793 2.36764e-06 14 1 0.437391 0.0597524 0.00121637 479 1 0.937917 0.253646 0.439836 478 1 0.934226 0.319846 0.380263 477 1 0.884698 0.244224 0.374771 480 1 0.865085 0.331674 0.439698 446 1 0.943643 0.184674 0.37299 448 1 0.879264 0.185826 0.439701 1423 1 0.434524 0.499947 0.43145 481 1 0.998383 0.381595 0.375231 505 1 0.755551 0.371469 0.370337 484 1 0.999944 0.440435 0.446426 74 1 0.307885 0.321131 0.00141745 570 1 0.811903 0.190044 0.498286 485 1 0.126851 0.385206 0.382538 488 1 0.124095 0.44522 0.438 483 1 0.0544854 0.378236 0.435642 482 1 0.0637936 0.441882 0.376138 1051 1 0.815479 0.491641 0.0553475 1425 1 0.499616 0.497785 0.362363 385 1 1.0044 0.00327636 0.371402 533 1 0.624736 0.00276833 0.504375 1171 1 0.561962 0.503563 0.178358 257 1 0.0152481 0.00591638 0.246805 11 1 0.308102 0.00265926 0.0581738 1039 1 0.441876 0.500658 0.074259 277 1 0.630287 0.0111143 0.250555 1043 1 0.554645 0.49892 0.0635942 153 1 0.74839 0.0026414 0.124139 15 1 0.434319 0.00813118 0.0690863 261 1 0.123842 -0.00165421 0.247075 1047 1 0.68114 0.496291 0.0602976 622 1 0.434727 0.437692 0.498887 135 1 0.187196 -0.00253458 0.185628 137 1 0.246399 0.0100155 0.110883 1045 1 0.620651 0.497043 0.00358654 534 1 0.683962 0.065187 0.490844 1411 1 0.0565641 0.498901 0.437846 1163 1 0.310802 0.497952 0.184585 89 1 0.750213 0.247556 -0.00217759 389 1 0.129665 0.00366079 0.383958 133 1 0.124428 0.00786112 0.118516 1041 1 0.487149 0.491657 0.000342221 1545 1 0.256346 0.495139 0.501223 1301 1 0.630254 0.497434 0.243533 1305 1 0.758339 0.498167 0.246074 538 1 0.802582 0.0518439 0.497348 118 1 0.679589 0.433456 0.000495162 1025 1 1.00015 0.492957 0.00375025 121 1 0.746417 0.377449 0.00131346 613 1 0.121037 0.373292 0.499414 630 1 0.674312 0.43922 0.497274 46 1 0.446871 0.178033 0.00483045 102 1 0.185602 0.441252 0.00568223 110 1 0.435557 0.431243 0.00179094 57 1 0.742943 0.123336 0.00589652 98 1 0.0615544 0.434909 0.000888518 82 1 0.561432 0.311785 0.0066822 629 1 0.620474 0.379114 0.496273 514 1 0.0579965 0.0547264 0.495306 554 1 0.316658 0.186931 0.498491 61 1 0.871141 0.118846 0.000968289 561 1 0.493751 0.120775 0.498717 69 1 0.122556 0.258411 0.00147143 66 1 0.0603354 0.310196 0.00736508 520 1 0.126074 0.0658146 0.562778 547 1 0.0613846 0.124451 0.562119 642 1 0.057702 0.0507517 0.636844 677 1 0.122191 0.13612 0.627037 673 1 0.00310285 0.119659 0.634806 996 1 0.00196625 0.438509 0.94129 516 1 0.992088 0.060244 0.565786 126 1 0.937638 0.439855 0.993347 524 1 0.24838 0.0682345 0.567663 551 1 0.188205 0.125857 0.565454 555 1 0.311578 0.1228 0.557883 646 1 0.17047 0.0644852 0.627659 650 1 0.316606 0.0613385 0.620382 681 1 0.262613 0.130828 0.625556 1931 1 0.308845 0.491005 0.939503 125 1 0.878099 0.374317 0.994496 1024 1 0.878842 0.438877 0.932102 1023 1 0.939711 0.379844 0.937145 531 1 0.563822 0.000712733 0.569351 911 1 0.440519 0.000668168 0.935551 528 1 0.371708 0.0555496 0.56167 559 1 0.435802 0.120875 0.568765 654 1 0.438229 0.0646647 0.625167 685 1 0.37519 0.119686 0.625386 532 1 0.496953 0.0563209 0.559825 634 1 0.813388 0.446477 0.500219 1695 1 0.93686 0.495148 0.691055 73 1 0.23886 0.256297 0.999322 1022 1 0.939824 0.436334 0.881506 689 1 0.503737 0.122398 0.626835 536 1 0.634168 0.0588086 0.568008 563 1 0.562522 0.110019 0.55953 658 1 0.567559 0.0605379 0.624823 693 1 0.628943 0.129658 0.631901 1021 1 0.876995 0.379104 0.874835 1683 1 0.564284 0.492705 0.699299 545 1 0.00343181 0.125511 0.501002 1815 1 0.689811 0.499196 0.820069 540 1 0.744237 0.0679786 0.555005 567 1 0.688025 0.125343 0.575949 571 1 0.812875 0.115797 0.55771 662 1 0.695152 0.0564404 0.621366 666 1 0.813302 0.0532061 0.621488 697 1 0.767096 0.131384 0.619929 1947 1 0.811314 0.500104 0.936099 1927 1 0.186548 0.495139 0.930753 577 1 1.00222 0.25808 0.505676 544 1 0.875051 0.0559689 0.555998 575 1 0.936054 0.117777 0.560731 670 1 0.931013 0.0617538 0.620247 701 1 0.878535 0.129262 0.621207 518 1 0.187675 0.0635633 0.508676 589 1 0.378908 0.246924 0.507079 1547 1 0.307417 0.500808 0.560315 552 1 0.130233 0.190434 0.570299 579 1 0.0615756 0.255329 0.576195 584 1 0.118003 0.31184 0.565121 674 1 0.0576662 0.187961 0.625576 706 1 0.0594524 0.320671 0.626294 709 1 0.126078 0.247889 0.629647 548 1 0.995788 0.17742 0.569286 580 1 0.996959 0.318475 0.56669 705 1 0.998578 0.251937 0.618567 78 1 0.436288 0.310559 0.996457 678 1 0.194084 0.188113 0.626755 556 1 0.250281 0.182914 0.567453 583 1 0.182262 0.253865 0.565901 587 1 0.303117 0.248404 0.559848 588 1 0.243802 0.322776 0.563215 682 1 0.317307 0.187392 0.626824 710 1 0.181245 0.318696 0.623322 713 1 0.251616 0.247336 0.616902 714 1 0.312129 0.314181 0.615935 597 1 0.630635 0.248767 0.503871 560 1 0.364934 0.186701 0.564696 591 1 0.438978 0.243466 0.567042 592 1 0.367746 0.3142 0.56021 686 1 0.432541 0.185663 0.62142 717 1 0.36562 0.250723 0.62144 718 1 0.440672 0.306042 0.625542 596 1 0.500122 0.314203 0.56762 721 1 0.500101 0.241103 0.619493 598 1 0.686641 0.31626 0.507917 605 1 0.881135 0.256451 0.502234 564 1 0.492571 0.176286 0.561919 568 1 0.628345 0.181688 0.568896 595 1 0.560676 0.247903 0.574014 600 1 0.619362 0.316844 0.565124 690 1 0.560182 0.188627 0.631641 722 1 0.565703 0.316522 0.61871 725 1 0.631808 0.246858 0.625839 572 1 0.747986 0.175892 0.554317 599 1 0.690039 0.251271 0.563394 603 1 0.819723 0.249023 0.555172 604 1 0.749673 0.308866 0.5636 694 1 0.688511 0.182791 0.627326 698 1 0.815195 0.201305 0.622896 726 1 0.680427 0.309697 0.62936 729 1 0.743092 0.244365 0.625013 730 1 0.807006 0.302738 0.629831 576 1 0.878185 0.188413 0.559536 607 1 0.942916 0.251402 0.564094 608 1 0.870289 0.315302 0.558203 702 1 0.941894 0.190124 0.631164 733 1 0.877493 0.249764 0.637707 734 1 0.929118 0.313235 0.629036 94 1 0.932526 0.31086 0.989343 574 1 0.934625 0.188167 0.498603 611 1 0.058885 0.386173 0.555184 616 1 0.114199 0.459581 0.563628 738 1 0.0600252 0.446542 0.629685 741 1 0.114921 0.378054 0.622897 737 1 0.999079 0.384402 0.622886 612 1 0.00616743 0.44774 0.565153 923 1 0.819198 0.00161804 0.938731 615 1 0.178234 0.376207 0.561894 619 1 0.315377 0.383577 0.56235 620 1 0.245144 0.437718 0.564344 742 1 0.180868 0.44831 0.61564 745 1 0.247993 0.379536 0.627043 746 1 0.31634 0.43546 0.621478 1823 1 0.933774 0.492193 0.813123 1555 1 0.555119 0.497891 0.557923 546 1 0.0549985 0.187248 0.510404 623 1 0.438402 0.372547 0.570858 624 1 0.38717 0.437712 0.564104 749 1 0.374224 0.374431 0.62176 750 1 0.43708 0.436849 0.622949 753 1 0.496502 0.379931 0.630972 628 1 0.493158 0.43544 0.559057 515 1 0.0597688 0.00226042 0.562489 1923 1 0.0596243 0.49791 0.938245 1945 1 0.749264 0.492903 0.87328 65 1 0.99875 0.2544 1.00103 621 1 0.378496 0.382423 0.500989 1937 1 0.498079 0.501745 0.877029 627 1 0.564749 0.377916 0.559188 632 1 0.623076 0.443787 0.556985 754 1 0.5633 0.431871 0.626392 757 1 0.624064 0.383805 0.629863 631 1 0.681641 0.37932 0.568941 635 1 0.809739 0.375228 0.559216 636 1 0.755019 0.450919 0.569345 758 1 0.68697 0.448453 0.63748 761 1 0.745437 0.379185 0.625032 762 1 0.808072 0.430707 0.630593 618 1 0.323626 0.439631 0.500995 41 1 0.245119 0.129449 0.985014 562 1 0.570692 0.185847 0.513479 1811 1 0.564141 0.493076 0.814593 639 1 0.929607 0.385473 0.563725 640 1 0.86641 0.433142 0.574974 765 1 0.860052 0.368386 0.631054 766 1 0.93664 0.439236 0.628368 1015 1 0.690916 0.364127 0.937785 648 1 0.122854 0.0489808 0.691584 675 1 0.0697524 0.122631 0.691696 770 1 0.0543085 0.0619362 0.744743 776 1 0.11641 0.0691725 0.807034 803 1 0.0606199 0.130994 0.808109 805 1 0.127727 0.135392 0.751495 801 1 0.999527 0.124375 0.744014 773 1 0.129209 0.00353445 0.756933 775 1 0.183873 0.00616887 0.81704 652 1 0.253205 0.056341 0.692332 679 1 0.178332 0.123034 0.690214 683 1 0.322145 0.126767 0.69868 774 1 0.189315 0.0547288 0.750562 778 1 0.321592 0.0626524 0.748318 780 1 0.245475 0.0615944 0.815603 807 1 0.187878 0.134312 0.814337 809 1 0.252767 0.116866 0.747715 811 1 0.313436 0.121179 0.827596 617 1 0.253591 0.379752 0.499203 1019 1 0.822641 0.375703 0.938003 1014 1 0.683996 0.431338 0.88069 1017 1 0.752283 0.371688 0.878294 656 1 0.382671 0.0649395 0.68782 687 1 0.437956 0.127389 0.690858 782 1 0.433192 0.0585633 0.75313 784 1 0.367925 0.0674788 0.815709 813 1 0.381215 0.127727 0.758998 815 1 0.445855 0.117809 0.813569 799 1 0.93835 0.00449123 0.817285 788 1 0.500327 0.0511941 0.808667 817 1 0.501687 0.12378 0.740914 660 1 0.495048 0.0629782 0.686629 664 1 0.628843 0.0576577 0.682857 691 1 0.567889 0.121335 0.693621 786 1 0.555513 0.0559035 0.73813 792 1 0.631412 0.0570401 0.82217 819 1 0.563116 0.117531 0.80369 821 1 0.629406 0.123284 0.756704 2 1 0.0575974 0.0627741 1.00216 601 1 0.750781 0.256807 0.505326 668 1 0.757751 0.0610059 0.677972 695 1 0.692663 0.112252 0.689411 699 1 0.822901 0.117144 0.693806 790 1 0.689933 0.0598453 0.754888 794 1 0.804071 0.0563543 0.755696 796 1 0.747947 0.0672567 0.814607 823 1 0.686482 0.121817 0.825474 825 1 0.749988 0.127417 0.746905 827 1 0.813607 0.128288 0.813385 771 1 0.0673433 0.00515856 0.812461 1809 1 0.508283 0.492457 0.758096 519 1 0.192792 0.00150651 0.568466 558 1 0.440728 0.184407 0.498785 1020 1 0.749602 0.430402 0.939164 566 1 0.683514 0.191665 0.50161 644 1 0.990762 0.0541628 0.691682 1567 1 0.928769 0.494131 0.566695 772 1 1.00087 0.0744113 0.818191 672 1 0.88054 0.0557661 0.691106 703 1 0.940433 0.127922 0.686855 798 1 0.937386 0.0630022 0.757526 800 1 0.878896 0.0585634 0.818502 829 1 0.875519 0.121453 0.761801 831 1 0.945264 0.129085 0.812134 707 1 0.06499 0.250453 0.679462 680 1 0.131526 0.188515 0.686681 712 1 0.123051 0.312219 0.684598 802 1 0.0667319 0.187803 0.735536 808 1 0.130987 0.189807 0.808632 834 1 0.0591291 0.30901 0.743773 835 1 0.0571613 0.257053 0.809206 837 1 0.13138 0.245603 0.744792 840 1 0.11747 0.311549 0.804107 836 1 0.995741 0.316847 0.811763 804 1 0.995964 0.188305 0.80891 676 1 0.00307559 0.184022 0.686371 708 1 0.997215 0.314485 0.683136 684 1 0.255446 0.18422 0.686682 711 1 0.198679 0.252791 0.689945 715 1 0.316419 0.248432 0.683839 716 1 0.245893 0.322682 0.678811 806 1 0.196314 0.186951 0.748403 810 1 0.315074 0.186747 0.756133 812 1 0.257037 0.191869 0.81759 838 1 0.190189 0.320971 0.745464 839 1 0.18774 0.248097 0.81546 841 1 0.252839 0.242022 0.753852 842 1 0.291727 0.307894 0.747575 843 1 0.320607 0.246537 0.820169 844 1 0.249638 0.323785 0.813951 688 1 0.373786 0.190728 0.691791 719 1 0.43643 0.246586 0.678737 720 1 0.366832 0.307404 0.679507 814 1 0.429012 0.194488 0.746886 816 1 0.3806 0.186997 0.820689 845 1 0.367131 0.264875 0.75176 846 1 0.431457 0.311424 0.765067 847 1 0.435265 0.24785 0.81869 848 1 0.357742 0.315445 0.812805 849 1 0.492273 0.26171 0.746616 852 1 0.504963 0.307575 0.81371 692 1 0.498461 0.195208 0.693067 820 1 0.491804 0.184427 0.805071 724 1 0.507849 0.309851 0.675592 728 1 0.626636 0.313624 0.686039 696 1 0.62316 0.179245 0.695612 723 1 0.570893 0.258023 0.682098 818 1 0.562041 0.190893 0.753463 824 1 0.630721 0.181643 0.813051 850 1 0.564346 0.308954 0.753008 851 1 0.562581 0.248612 0.810682 853 1 0.626912 0.252053 0.74587 856 1 0.632626 0.308685 0.816002 700 1 0.757526 0.191269 0.685575 727 1 0.687962 0.243515 0.682827 731 1 0.806405 0.25333 0.695541 732 1 0.740212 0.305581 0.689641 822 1 0.680199 0.185904 0.751601 826 1 0.818056 0.186688 0.754034 828 1 0.744952 0.180827 0.8128 854 1 0.686794 0.316618 0.750462 855 1 0.685024 0.248911 0.808725 857 1 0.743871 0.245059 0.749792 858 1 0.810879 0.306922 0.766207 859 1 0.815965 0.245502 0.821884 860 1 0.743989 0.300633 0.821536 833 1 0.997191 0.250938 0.744078 704 1 0.874612 0.184519 0.689796 735 1 0.937707 0.261444 0.693898 736 1 0.867838 0.314137 0.697728 830 1 0.940464 0.189945 0.740841 832 1 0.882554 0.195143 0.818403 861 1 0.874718 0.25426 0.751917 862 1 0.943328 0.31436 0.750361 863 1 0.939886 0.25271 0.801736 864 1 0.888907 0.31309 0.811907 1799 1 0.187024 0.499999 0.808196 739 1 0.0625195 0.38043 0.682172 744 1 0.12067 0.444348 0.681579 866 1 0.0674746 0.438311 0.740806 867 1 0.0618652 0.372325 0.81586 869 1 0.126909 0.37308 0.744625 872 1 0.121688 0.427917 0.806824 868 1 0.00468013 0.436884 0.806928 740 1 0.0022192 0.433832 0.688381 865 1 0.995379 0.375427 0.757228 105 1 0.250452 0.378022 0.995227 1685 1 0.620144 0.49913 0.623846 1929 1 0.24971 0.499566 0.864217 743 1 0.177829 0.378984 0.677638 747 1 0.319092 0.371889 0.68885 748 1 0.248964 0.440615 0.688565 870 1 0.181304 0.432243 0.739742 871 1 0.182996 0.366886 0.812479 873 1 0.250968 0.38665 0.749392 874 1 0.307454 0.440057 0.748585 875 1 0.30625 0.383533 0.80685 876 1 0.240326 0.434083 0.813313 585 1 0.245056 0.246674 0.507299 1018 1 0.814252 0.433015 0.878119 45 1 0.376782 0.12893 0.999573 751 1 0.43733 0.374178 0.688675 752 1 0.378046 0.435042 0.68017 877 1 0.375964 0.380314 0.753306 878 1 0.439012 0.442761 0.746308 879 1 0.435766 0.38051 0.814848 880 1 0.373625 0.44826 0.811402 884 1 0.492482 0.431211 0.817459 881 1 0.501739 0.363087 0.741691 756 1 0.50091 0.4415 0.679958 755 1 0.567875 0.371655 0.690441 760 1 0.62913 0.44615 0.690924 882 1 0.575236 0.429494 0.756028 883 1 0.559902 0.370951 0.820166 885 1 0.630216 0.374381 0.754598 888 1 0.623921 0.438404 0.819755 663 1 0.689866 0.00245595 0.687737 1033 1 0.247616 0.49262 0.991561 1010 1 0.55105 0.437229 0.881244 593 1 0.497017 0.249857 0.509188 759 1 0.691631 0.380729 0.692689 763 1 0.80371 0.366318 0.693073 764 1 0.75594 0.446787 0.697959 886 1 0.685318 0.440961 0.763265 887 1 0.68522 0.379161 0.821675 889 1 0.749653 0.36507 0.757581 890 1 0.81794 0.429696 0.756491 891 1 0.815171 0.368801 0.815107 892 1 0.75032 0.426776 0.81241 767 1 0.943546 0.378936 0.692719 768 1 0.870102 0.430311 0.690773 893 1 0.880513 0.377269 0.754965 894 1 0.931357 0.441346 0.747426 895 1 0.937846 0.382301 0.817291 896 1 0.873686 0.433264 0.813314 609 1 0.997108 0.379498 0.49795 898 1 0.0583921 0.0622105 0.876194 904 1 0.121186 0.0624089 0.937535 931 1 0.0592865 0.12641 0.929944 933 1 0.12257 0.134945 0.869161 93 1 0.867698 0.254832 0.996688 902 1 0.17676 0.0669239 0.871953 906 1 0.317215 0.0561014 0.879214 908 1 0.253776 0.0631079 0.928499 935 1 0.183336 0.130109 0.930989 937 1 0.250183 0.129902 0.871918 939 1 0.320489 0.119325 0.928668 1819 1 0.813598 0.491455 0.811126 550 1 0.187993 0.188751 0.51073 910 1 0.444971 0.0601296 0.872027 912 1 0.384239 0.0650468 0.933896 941 1 0.383049 0.122079 0.874363 943 1 0.443112 0.114561 0.93313 945 1 0.516749 0.125617 0.872144 557 1 0.375367 0.127358 0.505362 1941 1 0.616404 0.494725 0.881168 916 1 0.504734 0.0547296 0.932888 914 1 0.564372 0.0517465 0.868244 920 1 0.618411 0.0557659 0.940359 947 1 0.560834 0.120992 0.941741 949 1 0.616165 0.123043 0.87171 10 1 0.321088 0.0623487 0.993405 901 1 0.127948 -0.00159499 0.868358 918 1 0.693965 0.0509998 0.876292 922 1 0.804464 0.0582489 0.870269 924 1 0.755237 0.0712842 0.943228 951 1 0.684598 0.120535 0.932422 953 1 0.752211 0.120825 0.876086 955 1 0.816645 0.123921 0.938342 114 1 0.560846 0.430342 0.990744 1807 1 0.439491 0.501505 0.817884 929 1 0.998333 0.132524 0.873347 900 1 0.00527342 0.0522126 0.934697 926 1 0.939254 0.0613671 0.88213 928 1 0.876684 0.0601399 0.93072 957 1 0.886309 0.132203 0.871122 959 1 0.932634 0.12787 0.938326 42 1 0.309084 0.188689 0.991723 930 1 0.0548703 0.196207 0.863923 936 1 0.116042 0.191187 0.943292 962 1 0.0572036 0.304019 0.872214 963 1 0.0575446 0.260787 0.934568 965 1 0.116991 0.247864 0.871375 968 1 0.119613 0.316319 0.944074 961 1 0.993902 0.253023 0.875864 932 1 0.00755291 0.187585 0.93907 594 1 0.562208 0.310077 0.514405 549 1 0.127292 0.126863 0.507507 934 1 0.195951 0.190879 0.875979 938 1 0.316471 0.195057 0.881004 940 1 0.253507 0.192929 0.934719 966 1 0.184279 0.32114 0.883456 967 1 0.185487 0.245211 0.935403 969 1 0.248911 0.259669 0.872031 970 1 0.306406 0.313002 0.879099 971 1 0.307611 0.252486 0.939173 972 1 0.247377 0.311498 0.940456 973 1 0.377858 0.244939 0.879727 944 1 0.374281 0.176719 0.935735 942 1 0.445988 0.176714 0.874319 976 1 0.371617 0.30896 0.93603 975 1 0.434208 0.234556 0.942484 974 1 0.436856 0.306984 0.882777 980 1 0.501053 0.30507 0.934187 789 1 0.624231 0.00821414 0.749268 586 1 0.315188 0.317657 0.498147 1687 1 0.690783 0.49507 0.702213 651 1 0.320045 0.00130693 0.690407 977 1 0.50185 0.244229 0.8814 948 1 0.509468 0.184039 0.942564 946 1 0.564459 0.188638 0.869285 984 1 0.626809 0.306747 0.948693 978 1 0.56909 0.306883 0.884745 981 1 0.629346 0.24552 0.866875 979 1 0.561887 0.250484 0.938028 952 1 0.617793 0.188245 0.937567 1559 1 0.689551 0.498379 0.571429 987 1 0.812453 0.240406 0.925063 985 1 0.74577 0.237851 0.874479 950 1 0.688558 0.18606 0.883404 956 1 0.749358 0.181693 0.936308 988 1 0.74541 0.306435 0.936264 986 1 0.810971 0.312731 0.873604 982 1 0.689473 0.307434 0.880096 954 1 0.808674 0.18072 0.868828 983 1 0.680537 0.246489 0.940624 1013 1 0.62101 0.382254 0.877 964 1 0.00187513 0.323267 0.936735 991 1 0.942086 0.2467 0.943717 958 1 0.943216 0.18915 0.884476 992 1 0.879779 0.310585 0.927829 990 1 0.939332 0.318491 0.877399 989 1 0.881086 0.257694 0.871175 960 1 0.876307 0.19538 0.943331 993 1 0.00335655 0.377818 0.876583 1016 1 0.627859 0.441245 0.939828 58 1 0.814477 0.186875 0.996741 994 1 0.0638994 0.438773 0.871955 995 1 0.0681109 0.382059 0.931478 1000 1 0.123775 0.442053 0.941114 997 1 0.122302 0.37232 0.872542 1011 1 0.564362 0.372616 0.936889 1679 1 0.435529 0.495321 0.684822 1004 1 0.241682 0.439085 0.935838 1003 1 0.309534 0.379949 0.939438 1001 1 0.24467 0.38137 0.872101 999 1 0.18221 0.385155 0.936217 1002 1 0.310504 0.445036 0.870991 998 1 0.175464 0.44042 0.867514 769 1 1.00266 -0.00183566 0.756477 1935 1 0.434383 0.493917 0.939101 1012 1 0.496063 0.436645 0.933251 1008 1 0.378185 0.430154 0.935523 1006 1 0.432819 0.439236 0.876794 1009 1 0.501181 0.36452 0.87177 1005 1 0.370676 0.371778 0.880701 1007 1 0.444635 0.374564 0.932457 38 1 0.192757 0.188218 0.998301 33 1 0.998148 0.130844 0.989176 1795 1 0.0712527 0.49062 0.809539 590 1 0.439103 0.313372 0.509877 117 1 0.620952 0.374522 0.997753 581 1 0.113895 0.243262 0.507904 6 1 0.193713 0.0653662 0.991038 25 1 0.754414 0.0013686 0.996946 1053 1 0.869293 0.491787 1.00262 30 1 0.947402 0.0636159 0.997169 18 1 0.556747 0.0466383 0.996478 122 1 0.812593 0.427225 0.995671 53 1 0.630453 0.125696 0.993143 582 1 0.181941 0.315526 0.503456 614 1 0.179936 0.453772 0.511398 637 1 0.869739 0.383189 0.510209 22 1 0.689857 0.0547697 0.991573 81 1 0.501302 0.242187 0.992123 62 1 0.943172 0.188407 0.997982 578 1 0.0581599 0.317136 0.510021 77 1 0.375363 0.241901 0.99441 113 1 0.499319 0.367036 0.992028 610 1 0.0613892 0.444702 0.505354 109 1 0.37015 0.363474 0.9962 553 1 0.25725 0.129488 0.501513 26 1 0.809058 0.0638109 0.996256 1037 1 0.374583 0.499848 0.995617 5 1 0.122764 0.00180072 0.99444 522 1 0.311206 0.0604424 0.506566 1032 1 0.119955 0.561178 0.0608376 1059 1 0.0627924 0.626465 0.0548761 1154 1 0.062366 0.566323 0.121142 1189 1 0.128689 0.620354 0.133177 1028 1 0.989166 0.55028 0.0650397 1113 1 0.749727 0.750413 0.0119907 1577 1 0.256121 0.624671 0.494221 1299 1 0.572293 0.5036 0.301139 1036 1 0.251612 0.570168 0.0486442 1063 1 0.185782 0.623499 0.054389 1067 1 0.313535 0.625326 0.0662524 1158 1 0.186091 0.566889 0.122541 1162 1 0.310499 0.572242 0.132435 1193 1 0.247193 0.628308 0.13085 1081 1 0.746724 0.620598 0.00372379 13 1 0.376038 0.995603 -2.36662e-06 1157 1 0.12707 0.501531 0.123405 1433 1 0.756363 0.510504 0.369607 1285 1 0.123824 0.503452 0.256351 1040 1 0.364146 0.55607 0.0605077 1071 1 0.434681 0.619216 0.0629721 1166 1 0.425235 0.56203 0.125203 1197 1 0.375451 0.625417 0.123527 1175 1 0.689927 0.506585 0.182352 1173 1 0.63256 0.505548 0.124079 1102 1 0.425792 0.80947 0.000127788 1038 1 0.428769 0.55815 0.00768458 1578 1 0.310232 0.698773 0.499831 413 1 0.872951 0.990445 0.372134 1044 1 0.494326 0.564649 0.0709956 1201 1 0.500818 0.624176 0.128178 1048 1 0.628381 0.566336 0.0624928 1075 1 0.559761 0.622851 0.0571112 1170 1 0.558575 0.573132 0.127 1205 1 0.616395 0.626788 0.124866 1110 1 0.685808 0.806089 0.00219582 1074 1 0.558688 0.689669 0.00510249 1661 1 0.869065 0.872214 0.490535 1303 1 0.694638 0.503554 0.307364 1117 1 0.877483 0.754222 0.00064838 1079 1 0.68798 0.632547 0.068865 1052 1 0.741735 0.553168 0.0593568 1083 1 0.805074 0.615611 0.0663958 1174 1 0.690666 0.559231 0.12033 1178 1 0.809442 0.549151 0.110094 1209 1 0.747814 0.620743 0.119634 269 1 0.370724 0.997312 0.239656 1538 1 0.0608911 0.565278 0.489299 1078 1 0.689604 0.691667 0.00492501 1161 1 0.243009 0.504064 0.119315 1185 1 0.996853 0.617985 0.129948 1421 1 0.369868 0.49885 0.374734 1056 1 0.877104 0.547542 0.0597211 1087 1 0.949923 0.625026 0.0634233 1182 1 0.929279 0.55303 0.129841 1213 1 0.883139 0.617592 0.112375 1069 1 0.375962 0.620155 0.0029658 1082 1 0.812091 0.682741 0.00802894 1064 1 0.128897 0.682965 0.0629495 1091 1 0.0742695 0.757694 0.0658282 1096 1 0.139688 0.811551 0.0696078 1186 1 0.0643728 0.69097 0.12366 1218 1 0.0633151 0.804374 0.128345 1221 1 0.122586 0.750052 0.135884 1217 1 1.00103 0.751464 0.126346 1092 1 0.00388573 0.810528 0.0670636 3 1 0.0627023 0.99758 0.0627213 1574 1 0.18509 0.68727 0.489817 1068 1 0.251917 0.684907 0.0544494 1095 1 0.185118 0.745108 0.0643627 1099 1 0.308707 0.740695 0.0619546 1100 1 0.253952 0.804945 0.0543222 1190 1 0.183277 0.686524 0.126152 1194 1 0.317505 0.688451 0.126508 1222 1 0.19664 0.807668 0.127218 1225 1 0.251666 0.750076 0.125925 1226 1 0.303409 0.806585 0.125964 1105 1 0.499314 0.74816 0.00672466 1629 1 0.873682 0.758802 0.497148 387 1 0.0649068 0.996133 0.432183 1072 1 0.377542 0.69118 0.0665587 1103 1 0.433075 0.750354 0.0625274 1104 1 0.376214 0.805994 0.0619138 1198 1 0.441288 0.683614 0.129698 1229 1 0.375144 0.740772 0.129816 1230 1 0.428612 0.814277 0.125119 1108 1 0.496422 0.813159 0.061578 1293 1 0.371004 0.500014 0.241514 1601 1 0.00157607 0.759903 0.494129 1094 1 0.19419 0.806375 -0.000288705 1233 1 0.499331 0.754244 0.126928 1076 1 0.496481 0.690946 0.0645167 1080 1 0.625268 0.682887 0.0598657 1107 1 0.54823 0.755021 0.0651796 1112 1 0.615311 0.821604 0.0594314 1202 1 0.554274 0.686116 0.12484 1234 1 0.559187 0.818142 0.127973 1237 1 0.612397 0.748285 0.121737 1129 1 0.249202 0.865577 -0.00379367 1084 1 0.75106 0.692857 0.0689867 1111 1 0.685635 0.751986 0.063632 1115 1 0.8193 0.739747 0.0612372 1116 1 0.765564 0.807576 0.0605404 1206 1 0.694084 0.686407 0.127486 1210 1 0.808308 0.686672 0.125682 1238 1 0.688439 0.803681 0.124757 1241 1 0.754828 0.759093 0.1287 1242 1 0.816247 0.815058 0.123915 1106 1 0.56198 0.80879 0.00308778 1060 1 0.00545602 0.691409 0.0609058 1088 1 0.880946 0.689146 0.0659795 1119 1 0.943777 0.75683 0.0559836 1120 1 0.87231 0.817226 0.0663961 1214 1 0.942928 0.683106 0.115421 1245 1 0.87043 0.752871 0.118914 1246 1 0.939474 0.821013 0.111364 1101 1 0.372544 0.751661 -0.00307779 17 1 0.491596 0.996237 0.00178274 537 1 0.735661 0.990962 0.49716 1123 1 0.0634364 0.868539 0.0728485 1128 1 0.130351 0.933131 0.0658407 1250 1 0.0670869 0.936017 0.129296 1253 1 0.130071 0.877954 0.122725 1662 1 0.92821 0.935546 0.499445 1249 1 0.00657582 0.877092 0.127256 1614 1 0.436781 0.813814 0.493132 1541 1 0.118118 0.505015 0.491707 1127 1 0.189013 0.875977 0.058195 1131 1 0.309879 0.862362 0.0605307 1132 1 0.252114 0.933715 0.058602 1254 1 0.188214 0.942964 0.120122 1257 1 0.247941 0.879165 0.124526 1258 1 0.30197 0.939625 0.120893 1090 1 0.077969 0.81942 -0.000746096 1031 1 0.188892 0.503711 0.0608666 1550 1 0.433033 0.56974 0.494215 401 1 0.507976 0.993708 0.373524 1135 1 0.420781 0.876748 0.061672 1136 1 0.373195 0.941495 0.0629013 1261 1 0.358091 0.88003 0.129302 1262 1 0.435268 0.9331 0.1166 1265 1 0.493265 0.874192 0.121603 143 1 0.426322 0.995981 0.18281 1654 1 0.685856 0.934297 0.497163 1645 1 0.371209 0.871038 0.499309 1295 1 0.433979 0.502137 0.308656 1140 1 0.494022 0.94964 0.0690126 1139 1 0.560405 0.877936 0.0698944 1144 1 0.620917 0.930528 0.0618424 1266 1 0.561566 0.945767 0.134132 1269 1 0.619803 0.880784 0.13008 1537 1 0.997174 0.500203 0.500477 1505 1 0.999086 0.871776 0.374176 1143 1 0.690879 0.871244 0.0636625 1147 1 0.813749 0.882677 0.0684629 1148 1 0.760028 0.940653 0.0719564 1270 1 0.692197 0.933876 0.122885 1273 1 0.744196 0.861291 0.120569 1274 1 0.810549 0.9367 0.128783 1634 1 0.070104 0.93619 0.492957 1533 1 0.876903 0.872558 0.37903 1142 1 0.690337 0.937771 0.00930018 1593 1 0.75353 0.612564 0.500761 541 1 0.867251 1.00242 0.495646 1291 1 0.311142 0.496959 0.31437 1124 1 0.00674713 0.939256 0.0701021 1151 1 0.944049 0.883325 0.0588671 1152 1 0.887961 0.933926 0.0663354 1277 1 0.875395 0.874869 0.135099 1278 1 0.940174 0.947606 0.131935 1534 1 0.947888 0.936791 0.377342 1070 1 0.433827 0.680439 0.0047282 1160 1 0.130922 0.555665 0.186065 1187 1 0.067216 0.618769 0.188744 1282 1 0.0499984 0.564963 0.245277 1288 1 0.104308 0.563087 0.32201 1315 1 0.0610031 0.62808 0.310385 1317 1 0.119982 0.619059 0.253988 1313 1 0.995887 0.624115 0.246037 1284 1 0.998834 0.567017 0.313633 1156 1 0.99951 0.560824 0.183003 1026 1 0.0535003 0.561085 -0.0024887 1164 1 0.25182 0.569553 0.188031 1191 1 0.194023 0.620192 0.194029 1195 1 0.310263 0.631458 0.195577 1286 1 0.182494 0.555855 0.254319 1290 1 0.307608 0.559386 0.252086 1292 1 0.250317 0.562261 0.313616 1319 1 0.185546 0.623485 0.311548 1321 1 0.253807 0.62888 0.255406 1323 1 0.312793 0.626128 0.311408 1427 1 0.5683 0.502634 0.426449 393 1 0.252516 0.993419 0.375841 1168 1 0.371453 0.57135 0.188347 1199 1 0.439945 0.622091 0.191247 1294 1 0.432935 0.562091 0.248614 1296 1 0.371337 0.565209 0.308035 1325 1 0.373032 0.629736 0.252634 1327 1 0.440114 0.62336 0.302307 1085 1 0.882356 0.624962 0.0159241 1329 1 0.505582 0.635438 0.252861 1172 1 0.488932 0.559045 0.18645 1300 1 0.497919 0.560912 0.302765 1176 1 0.619841 0.562935 0.177561 1203 1 0.558346 0.633589 0.190425 1298 1 0.56094 0.568448 0.237342 1304 1 0.619468 0.5713 0.309439 1331 1 0.553131 0.625409 0.312767 1333 1 0.628214 0.626925 0.244447 1180 1 0.756912 0.564264 0.178807 1207 1 0.688435 0.620931 0.18508 1211 1 0.817054 0.618299 0.170912 1302 1 0.694869 0.556978 0.248982 1306 1 0.813872 0.563947 0.242163 1308 1 0.753629 0.562204 0.308162 1335 1 0.696002 0.632488 0.299198 1337 1 0.746388 0.622157 0.238249 1339 1 0.8095 0.618594 0.305687 1535 1 0.937493 0.886968 0.436574 1184 1 0.878194 0.571974 0.192166 1215 1 0.940635 0.619854 0.185554 1310 1 0.937459 0.560949 0.243676 1312 1 0.878439 0.557883 0.300188 1341 1 0.870163 0.628213 0.245422 1343 1 0.9324 0.621693 0.303022 265 1 0.250368 0.992146 0.245649 1192 1 0.1276 0.682596 0.187539 1219 1 0.0658778 0.746185 0.191815 1224 1 0.127868 0.810567 0.193328 1314 1 0.0670885 0.688985 0.251905 1320 1 0.120577 0.690253 0.314199 1346 1 0.071457 0.815865 0.247969 1347 1 0.0595278 0.753766 0.312484 1349 1 0.126274 0.749382 0.253439 1352 1 0.128845 0.816744 0.312425 1188 1 0.00474479 0.68942 0.178816 1220 1 0.00510446 0.812821 0.18624 1316 1 1.00019 0.686761 0.312893 1196 1 0.246904 0.688266 0.192556 1223 1 0.18842 0.745184 0.191193 1227 1 0.30776 0.749627 0.198064 1228 1 0.251091 0.808744 0.190959 1318 1 0.183805 0.685465 0.254614 1322 1 0.31281 0.68769 0.250991 1324 1 0.237774 0.68222 0.317656 1350 1 0.189033 0.807286 0.252681 1351 1 0.181772 0.745573 0.317413 1353 1 0.251497 0.741635 0.256781 1355 1 0.312657 0.748992 0.3207 1356 1 0.242291 0.822022 0.315075 1354 1 0.306424 0.810873 0.252211 1200 1 0.378951 0.687905 0.187706 1231 1 0.438958 0.752039 0.184156 1232 1 0.36535 0.813523 0.178855 1326 1 0.42755 0.70091 0.259453 1328 1 0.373813 0.680132 0.316802 1357 1 0.369329 0.756064 0.251874 1358 1 0.431355 0.819827 0.245987 1359 1 0.432594 0.766189 0.311539 1360 1 0.36727 0.817414 0.304661 1332 1 0.494528 0.692579 0.327603 1361 1 0.498086 0.753995 0.248203 1364 1 0.501219 0.817585 0.310177 1204 1 0.497563 0.694855 0.18749 1236 1 0.493457 0.818904 0.185092 1208 1 0.626302 0.690058 0.178231 1235 1 0.568868 0.753906 0.188475 1330 1 0.558622 0.696777 0.25136 1336 1 0.624683 0.683496 0.314446 1363 1 0.556867 0.747189 0.319688 1365 1 0.618694 0.753931 0.256321 1368 1 0.622029 0.810249 0.313357 1240 1 0.624945 0.808518 0.188544 1362 1 0.5588 0.819759 0.24345 1212 1 0.749331 0.693517 0.180673 1239 1 0.69542 0.752078 0.188767 1243 1 0.822798 0.752267 0.185687 1244 1 0.756906 0.813407 0.188186 1334 1 0.686349 0.701274 0.24568 1338 1 0.816698 0.687031 0.234104 1340 1 0.751891 0.696336 0.31261 1366 1 0.692033 0.806111 0.251074 1367 1 0.687195 0.753092 0.315857 1369 1 0.759232 0.746546 0.243243 1370 1 0.812367 0.818255 0.248325 1371 1 0.816302 0.751437 0.301862 1372 1 0.756282 0.809388 0.310906 1348 1 0.992928 0.81386 0.31011 1345 1 0.992508 0.755516 0.251189 1216 1 0.88195 0.693665 0.175764 1247 1 0.936256 0.749126 0.188925 1248 1 0.882015 0.811941 0.176877 1342 1 0.940373 0.679182 0.236085 1373 1 0.878855 0.758131 0.250657 1374 1 0.933941 0.809556 0.238821 1375 1 0.933128 0.753152 0.309849 1376 1 0.871595 0.81935 0.3185 1344 1 0.878462 0.687127 0.301811 1536 1 0.864379 0.938324 0.436204 1251 1 0.0687797 0.87949 0.199804 1256 1 0.125615 0.943756 0.183775 1378 1 0.0678155 0.938107 0.25684 1379 1 0.0653832 0.873139 0.32047 1381 1 0.135826 0.878129 0.251757 1384 1 0.122694 0.936429 0.317845 1252 1 0.00307566 0.940213 0.188955 1377 1 0.991354 0.872332 0.250735 1149 1 0.872899 0.878113 0.00168957 1437 1 0.879249 0.501668 0.37746 1050 1 0.805258 0.558444 0.000237114 1530 1 0.808335 0.932213 0.372666 1255 1 0.185765 0.870464 0.184735 1259 1 0.305383 0.87462 0.192923 1260 1 0.245264 0.938134 0.186193 1382 1 0.180717 0.945888 0.250533 1383 1 0.184181 0.884973 0.327972 1385 1 0.243226 0.875928 0.247561 1386 1 0.31326 0.937423 0.250756 1387 1 0.302633 0.877422 0.307623 1388 1 0.2391 0.938514 0.313418 1415 1 0.197665 0.506745 0.438124 1054 1 0.930249 0.556249 0.00276167 1167 1 0.430839 0.500366 0.185719 1263 1 0.434441 0.878406 0.185755 1264 1 0.371128 0.938962 0.18121 1389 1 0.364899 0.869108 0.24477 1390 1 0.439112 0.931124 0.254292 1391 1 0.425276 0.876903 0.308756 1392 1 0.365675 0.930441 0.312449 1396 1 0.510567 0.946247 0.311017 1393 1 0.502987 0.874352 0.251438 1268 1 0.48307 0.944441 0.187562 1267 1 0.56834 0.877354 0.188116 1272 1 0.630228 0.944701 0.188945 1394 1 0.563002 0.94437 0.246003 1395 1 0.562206 0.874588 0.31402 1397 1 0.625696 0.87812 0.248091 1400 1 0.622641 0.936242 0.303851 1585 1 0.503839 0.619817 0.497627 411 1 0.804473 0.995103 0.433368 1637 1 0.131181 0.883789 0.498674 1605 1 0.129168 0.747893 0.494277 1271 1 0.691541 0.873412 0.185459 1275 1 0.806187 0.877744 0.188696 1276 1 0.751519 0.93935 0.189881 1398 1 0.690114 0.938854 0.241475 1399 1 0.680944 0.863629 0.308075 1401 1 0.750941 0.869379 0.251688 1402 1 0.810623 0.941605 0.245 1403 1 0.808548 0.874755 0.318256 1404 1 0.750575 0.936918 0.30128 149 1 0.620824 0.99485 0.126969 1532 1 0.75348 0.931679 0.433316 397 1 0.369174 0.999877 0.371043 1380 1 0.994262 0.931988 0.30488 1279 1 0.946982 0.877897 0.178359 1280 1 0.874643 0.938497 0.185506 1405 1 0.879915 0.866565 0.248189 1406 1 0.929953 0.935627 0.244651 1407 1 0.932195 0.871744 0.30687 1408 1 0.866336 0.929633 0.307777 19 1 0.564631 0.995927 0.0618671 1514 1 0.314524 0.937741 0.376991 529 1 0.49719 0.992628 0.493321 1410 1 0.0486927 0.568918 0.381078 1416 1 0.131018 0.563135 0.437579 1443 1 0.0511744 0.63213 0.437875 1445 1 0.110442 0.620725 0.381317 1441 1 0.996182 0.634106 0.376366 271 1 0.423131 0.998519 0.313291 1449 1 0.247363 0.618025 0.381987 1451 1 0.311149 0.622696 0.431442 1420 1 0.258237 0.560736 0.440586 1447 1 0.186217 0.622809 0.435462 1414 1 0.184007 0.564051 0.370316 1418 1 0.307457 0.558084 0.375458 1519 1 0.436343 0.872285 0.436353 1531 1 0.808044 0.86163 0.428673 1527 1 0.686398 0.881039 0.436222 1513 1 0.254248 0.873326 0.379643 1526 1 0.685388 0.932688 0.361602 1424 1 0.369818 0.560206 0.442066 1455 1 0.435883 0.62652 0.437391 1422 1 0.442829 0.557731 0.370816 1453 1 0.381497 0.631889 0.379188 1428 1 0.503162 0.555019 0.424503 1528 1 0.625548 0.948739 0.437687 1311 1 0.933369 0.503889 0.30461 1516 1 0.256432 0.937537 0.438996 1457 1 0.489472 0.62927 0.374516 1461 1 0.622297 0.62555 0.36711 1426 1 0.554811 0.560498 0.361147 1432 1 0.620269 0.567694 0.429859 1459 1 0.556765 0.618521 0.435785 1520 1 0.376164 0.946391 0.438491 1524 1 0.50023 0.929904 0.43452 1581 1 0.365733 0.629161 0.493057 1522 1 0.569555 0.937705 0.370614 1430 1 0.684166 0.568976 0.362001 1463 1 0.681378 0.615305 0.427566 1436 1 0.75632 0.562206 0.433538 1434 1 0.82206 0.563484 0.370809 1465 1 0.746809 0.622243 0.363938 1467 1 0.818769 0.626849 0.424704 1468 1 0.749147 0.666609 0.439112 1419 1 0.315442 0.505753 0.442385 1 1 0.00288998 0.997982 0.00277522 1529 1 0.743854 0.86454 0.378287 1417 1 0.248807 0.501571 0.365746 1412 1 0.989711 0.566635 0.43933 399 1 0.443927 0.98934 0.430852 1626 1 0.811086 0.805733 0.502711 1515 1 0.31463 0.875832 0.435887 1440 1 0.879707 0.557638 0.439505 1469 1 0.875807 0.627603 0.363826 1471 1 0.929917 0.632603 0.437182 1438 1 0.939337 0.565771 0.373889 1448 1 0.111594 0.684235 0.437403 1480 1 0.124727 0.815399 0.440962 1475 1 0.0541139 0.764426 0.435768 1477 1 0.123469 0.746216 0.382914 1474 1 0.0671091 0.811788 0.373312 1442 1 0.0614711 0.695993 0.375794 1473 1 0.00358075 0.752268 0.371042 1521 1 0.498932 0.873974 0.372552 1525 1 0.62477 0.868234 0.377928 1446 1 0.177309 0.684076 0.385021 1482 1 0.318162 0.817118 0.372353 1479 1 0.188986 0.754308 0.437173 1481 1 0.255077 0.75555 0.371397 1483 1 0.307618 0.754362 0.436889 1450 1 0.307813 0.695174 0.378039 1484 1 0.248432 0.812549 0.436753 1478 1 0.18227 0.809949 0.372643 1452 1 0.251964 0.682345 0.432902 1431 1 0.683492 0.510874 0.43495 1523 1 0.575063 0.872681 0.435811 1517 1 0.374683 0.881871 0.379507 1488 1 0.362586 0.807706 0.439261 1487 1 0.432535 0.748549 0.438262 1486 1 0.435135 0.81186 0.380102 1454 1 0.432593 0.694118 0.373433 1485 1 0.378417 0.754358 0.372212 1456 1 0.373037 0.700358 0.442551 1489 1 0.497271 0.751188 0.385901 1492 1 0.508026 0.809405 0.444157 1460 1 0.492045 0.681478 0.438608 1511 1 0.183742 0.874947 0.434511 1493 1 0.626436 0.751485 0.386033 1496 1 0.617207 0.804018 0.452518 1458 1 0.561729 0.681952 0.383379 1464 1 0.623745 0.678483 0.438057 1491 1 0.549356 0.739684 0.43764 1490 1 0.560599 0.811597 0.373802 1518 1 0.434343 0.937944 0.372816 1494 1 0.684657 0.808453 0.379627 1462 1 0.689092 0.685316 0.376588 1500 1 0.746861 0.814751 0.4519 1497 1 0.746747 0.751929 0.375493 1495 1 0.688474 0.749781 0.444183 1466 1 0.816835 0.694987 0.367663 1499 1 0.803175 0.748836 0.439279 1498 1 0.813524 0.803048 0.378958 1586 1 0.556912 0.682566 0.498726 1444 1 0.999843 0.694376 0.431011 1476 1 0.997175 0.821135 0.431987 1501 1 0.875646 0.754043 0.374016 1502 1 0.937959 0.811625 0.368448 1472 1 0.871423 0.698134 0.444114 1470 1 0.934911 0.69632 0.364106 1504 1 0.873875 0.814723 0.432019 1503 1 0.934784 0.752551 0.435264 1109 1 0.619287 0.749771 0.0132118 1510 1 0.185117 0.94662 0.383624 1508 1 0.00856028 0.942966 0.436121 1512 1 0.128773 0.938448 0.436273 1507 1 0.0643773 0.876365 0.434816 1509 1 0.12328 0.871447 0.379252 1506 1 0.0610473 0.93641 0.37128 415 1 0.939868 0.994307 0.434755 1569 1 1.00161 0.635913 0.500616 1118 1 0.933645 0.819124 0.00591955 1042 1 0.554072 0.558832 0.00858486 1573 1 0.128139 0.619189 0.497874 1646 1 0.445273 0.929088 0.501431 1558 1 0.684163 0.564279 0.499351 1307 1 0.821493 0.507788 0.306248 1630 1 0.938864 0.819046 0.499163 403 1 0.562635 0.995242 0.433654 1121 1 0.00481354 0.866675 0.00218927 1155 1 0.0571199 0.506253 0.189787 1553 1 0.487097 0.510332 0.495024 1562 1 0.811894 0.556992 0.500176 1642 1 0.316139 0.933521 0.501727 1159 1 0.193243 0.504398 0.183215 1035 1 0.306031 0.50147 0.0564813 1281 1 0.99568 0.501082 0.248277 1549 1 0.381298 0.507096 0.500629 1435 1 0.810831 0.499967 0.437338 273 1 0.482528 1.00257 0.248038 1077 1 0.62268 0.619612 0.00471687 1138 1 0.55837 0.9302 0.00657399 1126 1 0.189154 0.944363 0.00659374 1570 1 0.0661968 0.694056 0.496315 1557 1 0.619431 0.504599 0.496218 1597 1 0.867455 0.626508 0.493116 1598 1 0.931183 0.691825 0.498402 1134 1 0.43469 0.935966 0.00579813 1058 1 0.0702832 0.693719 0.00636792 1650 1 0.570376 0.939811 0.492466 525 1 0.380363 1.0008 0.496856 1649 1 0.502937 0.866672 0.498755 1046 1 0.683365 0.564527 0.00817348 1062 1 0.187932 0.686644 0.00308953 1073 1 0.495514 0.626464 0.00875983 1544 1 0.129086 0.567609 0.559936 1571 1 0.0646054 0.629379 0.557875 1666 1 0.0520594 0.572054 0.617326 1701 1 0.112807 0.631548 0.622492 1697 1 1.0001 0.632381 0.621535 1540 1 0.993259 0.570143 0.559634 1561 1 0.734836 0.500821 0.502784 1543 1 0.192167 0.509826 0.566727 1548 1 0.251769 0.566388 0.564232 1575 1 0.19037 0.62777 0.555272 1579 1 0.314575 0.629135 0.560132 1670 1 0.193832 0.578523 0.623429 1674 1 0.317109 0.569986 0.628261 1705 1 0.249999 0.635805 0.626703 535 1 0.685207 0.993207 0.564647 897 1 0.996487 0.996363 0.870364 1552 1 0.380776 0.561749 0.560681 1583 1 0.42675 0.630515 0.557817 1678 1 0.435147 0.566263 0.62447 1709 1 0.378734 0.627881 0.626977 1713 1 0.502395 0.627133 0.628987 1556 1 0.49701 0.56521 0.556948 1560 1 0.615025 0.561542 0.55978 1587 1 0.568298 0.627198 0.567891 1682 1 0.566884 0.558528 0.624152 1717 1 0.622831 0.620364 0.62679 649 1 0.257076 0.99504 0.625015 1673 1 0.261747 0.50156 0.624996 2045 1 0.872492 0.86923 0.875142 1093 1 0.137107 0.75248 1.00207 1564 1 0.747529 0.562629 0.561488 1591 1 0.689523 0.62611 0.574468 1595 1 0.807307 0.620401 0.553725 1686 1 0.693313 0.562746 0.633387 1690 1 0.814056 0.560287 0.631529 1721 1 0.756843 0.61966 0.626011 1590 1 0.692735 0.675974 0.504565 653 1 0.372373 0.99729 0.618328 913 1 0.506498 0.99917 0.868326 1793 1 1.00209 0.499379 0.752208 641 1 0.990165 0.993355 0.625793 1568 1 0.867986 0.568229 0.556986 1599 1 0.929351 0.635205 0.556484 1694 1 0.93055 0.57041 0.615104 1725 1 0.875325 0.627612 0.618172 1563 1 0.814987 0.504942 0.56905 1576 1 0.126336 0.68661 0.563008 1603 1 0.0674098 0.746689 0.566428 1608 1 0.13321 0.805714 0.564198 1698 1 0.062148 0.6935 0.626986 1730 1 0.0679963 0.818565 0.623363 1733 1 0.126893 0.754647 0.632593 1604 1 0.00900066 0.805759 0.56236 521 1 0.255306 0.997872 0.503047 1622 1 0.68717 0.804529 0.509327 1580 1 0.254299 0.686842 0.567702 1607 1 0.190507 0.734669 0.563268 1611 1 0.30933 0.7527 0.568059 1612 1 0.251276 0.818165 0.564163 1702 1 0.18344 0.684317 0.629554 1706 1 0.318742 0.685594 0.62557 1734 1 0.187161 0.817858 0.633396 1737 1 0.245591 0.749696 0.628033 1738 1 0.318375 0.806462 0.625162 671 1 0.935146 0.996732 0.691872 1613 1 0.369393 0.754407 0.503254 1584 1 0.365385 0.686252 0.563187 1615 1 0.440683 0.757197 0.560272 1616 1 0.370885 0.809399 0.562589 1710 1 0.441279 0.695064 0.619567 1741 1 0.378407 0.752058 0.620714 1742 1 0.43282 0.810531 0.622579 1620 1 0.497997 0.810759 0.561836 1745 1 0.502829 0.747761 0.61861 1588 1 0.502264 0.686089 0.556545 785 1 0.498425 0.998267 0.74849 1653 1 0.625939 0.870652 0.507334 1714 1 0.56438 0.684929 0.633881 1592 1 0.628506 0.681133 0.562212 1619 1 0.558811 0.738528 0.558661 1624 1 0.624977 0.810193 0.5673 1746 1 0.557779 0.809479 0.617133 1749 1 0.621615 0.741592 0.622904 919 1 0.688126 0.998199 0.940288 645 1 0.125291 0.995575 0.619172 1667 1 0.0530114 0.501146 0.687942 903 1 0.188063 0.99704 0.93503 1098 1 0.304698 0.809003 0.994016 1596 1 0.748665 0.682278 0.567814 1623 1 0.686879 0.747502 0.562791 1627 1 0.814461 0.744589 0.560345 1628 1 0.749711 0.803562 0.56223 1718 1 0.685928 0.685201 0.625696 1722 1 0.811762 0.681067 0.627165 1750 1 0.689344 0.811662 0.623183 1753 1 0.760222 0.743332 0.624431 1754 1 0.819696 0.803885 0.623747 791 1 0.6768 0.989149 0.809014 1951 1 0.933589 0.502433 0.941524 1610 1 0.304737 0.819805 0.501381 1572 1 0.00377294 0.691694 0.56675 1729 1 0.00853102 0.7598 0.632397 1600 1 0.866809 0.68062 0.559882 1631 1 0.946771 0.75504 0.556343 1632 1 0.885759 0.809854 0.563516 1726 1 0.942756 0.696761 0.615362 1757 1 0.880608 0.741314 0.618697 1758 1 0.944102 0.817243 0.622768 797 1 0.877852 0.999166 0.75902 1125 1 0.130026 0.878615 1.00113 1665 1 0.991425 0.506918 0.627884 1122 1 0.0585977 0.935045 0.998635 1803 1 0.310187 0.505729 0.807719 1635 1 0.0744424 0.874353 0.562294 1640 1 0.124876 0.944867 0.548626 1762 1 0.0596342 0.936901 0.623526 1765 1 0.122567 0.875071 0.630573 1761 1 0.0103151 0.869987 0.629351 1689 1 0.746373 0.504018 0.629258 1639 1 0.185562 0.882487 0.561977 1643 1 0.308226 0.877074 0.564466 1644 1 0.247596 0.933023 0.563794 1766 1 0.178115 0.938495 0.620476 1769 1 0.247371 0.874595 0.629151 1770 1 0.321402 0.933965 0.630541 1621 1 0.617036 0.742616 0.50793 661 1 0.628094 0.997931 0.618952 1617 1 0.498357 0.745523 0.500556 927 1 0.94441 0.995305 0.93214 647 1 0.191963 0.997634 0.686279 781 1 0.376453 0.997117 0.756324 1647 1 0.431245 0.864572 0.556285 1648 1 0.372268 0.93402 0.558414 1773 1 0.370863 0.865341 0.619643 1774 1 0.426609 0.925388 0.617649 1652 1 0.506179 0.934165 0.555656 1086 1 0.943495 0.696 1.00153 2046 1 0.937154 0.932449 0.865992 793 1 0.74793 0.992921 0.742942 1777 1 0.499964 0.8704 0.616861 1651 1 0.561301 0.870441 0.561058 1656 1 0.622899 0.939872 0.560936 1778 1 0.570118 0.929311 0.626399 1781 1 0.626312 0.871271 0.626956 9 1 0.247969 0.997277 1.00131 1582 1 0.441036 0.686563 0.501007 1655 1 0.692647 0.865084 0.564771 1659 1 0.818406 0.862039 0.559678 1660 1 0.744249 0.932256 0.559023 1782 1 0.679734 0.933504 0.628085 1785 1 0.756273 0.86801 0.620942 1786 1 0.809291 0.929099 0.613103 1625 1 0.746896 0.745041 0.509344 921 1 0.761764 0.99106 0.882733 1939 1 0.556083 0.509656 0.946997 1589 1 0.623039 0.621929 0.502294 1137 1 0.496295 0.875513 1.00083 909 1 0.376787 0.994194 0.882823 1636 1 0.0053715 0.940908 0.559947 1663 1 0.942757 0.873807 0.568241 1664 1 0.868953 0.935754 0.560234 1789 1 0.871536 0.86566 0.616905 1790 1 0.930954 0.930051 0.627669 1671 1 0.197721 0.50714 0.684603 1672 1 0.12133 0.577107 0.686981 1699 1 0.0587839 0.627013 0.684406 1794 1 0.0620365 0.559753 0.757512 1800 1 0.121842 0.559498 0.810355 1827 1 0.0433459 0.621962 0.8156 1829 1 0.134258 0.622589 0.752551 1668 1 0.978643 0.568882 0.684397 1057 1 -0.00173425 0.630803 1.00094 2017 1 0.00440305 0.878087 0.871452 1676 1 0.257036 0.569011 0.682614 1703 1 0.186557 0.633619 0.687731 1707 1 0.326778 0.625802 0.689959 1798 1 0.189366 0.561431 0.74672 1802 1 0.317699 0.561465 0.748303 1804 1 0.248058 0.563851 0.815091 1831 1 0.182585 0.618481 0.814669 1833 1 0.247371 0.616773 0.750111 1835 1 0.317894 0.61685 0.801292 899 1 0.0647432 0.995597 0.933668 2047 1 0.929702 0.876741 0.937486 1030 1 0.193895 0.568654 0.989512 1680 1 0.381738 0.564124 0.690925 1711 1 0.438429 0.62456 0.690086 1806 1 0.442109 0.552897 0.747165 1808 1 0.380051 0.554107 0.817007 1837 1 0.384087 0.62353 0.751674 1839 1 0.444775 0.612637 0.814293 1812 1 0.504865 0.55905 0.812618 1841 1 0.488588 0.630538 0.745719 1684 1 0.50602 0.557634 0.683154 1688 1 0.62529 0.566976 0.692395 1715 1 0.556325 0.626673 0.697302 1810 1 0.560113 0.559789 0.756229 1816 1 0.619337 0.559102 0.81502 1843 1 0.552065 0.627298 0.813969 1845 1 0.610854 0.625939 0.758501 2028 1 0.254502 0.939337 0.938276 1693 1 0.876278 0.501917 0.621193 2048 1 0.86277 0.933585 0.936831 1817 1 0.748878 0.508395 0.758096 1692 1 0.751298 0.568292 0.690158 1719 1 0.688483 0.627683 0.691811 1723 1 0.818383 0.621217 0.686614 1814 1 0.682412 0.562543 0.752364 1818 1 0.821242 0.561807 0.748119 1820 1 0.75242 0.567926 0.813218 1847 1 0.687232 0.6178 0.818935 1849 1 0.75491 0.625958 0.746165 1851 1 0.817912 0.622348 0.8144 1130 1 0.317176 0.930052 0.997416 779 1 0.307577 0.991871 0.806238 1594 1 0.810224 0.685425 0.501416 1825 1 -0.00217772 0.624928 0.742232 1796 1 0.98542 0.558274 0.813996 1696 1 0.88001 0.554035 0.687013 1727 1 0.931336 0.633727 0.67164 1822 1 0.935398 0.557841 0.752015 1824 1 0.872671 0.560994 0.814675 1853 1 0.878254 0.62638 0.753297 1855 1 0.942147 0.626617 0.816854 795 1 0.811618 0.994505 0.811711 1704 1 0.121611 0.681447 0.684939 1731 1 0.0663332 0.749449 0.697038 1736 1 0.127072 0.809055 0.690896 1826 1 0.077147 0.690503 0.756101 1832 1 0.127229 0.688292 0.81717 1858 1 0.0622621 0.816635 0.758568 1859 1 0.0754959 0.750976 0.810369 1861 1 0.131208 0.753547 0.750379 1864 1 0.131272 0.808837 0.807279 1700 1 0.00381116 0.693198 0.69051 1732 1 0.998472 0.818729 0.69939 1860 1 0.00968 0.81135 0.822966 1740 1 0.258243 0.809827 0.68354 1708 1 0.255402 0.683266 0.693525 1735 1 0.188102 0.747466 0.695067 1739 1 0.313624 0.744563 0.681186 1830 1 0.198239 0.679133 0.752053 1834 1 0.324227 0.687967 0.74154 1836 1 0.255103 0.679469 0.804798 1862 1 0.185579 0.811148 0.752108 1863 1 0.191546 0.746465 0.811208 1865 1 0.249792 0.750155 0.744217 1866 1 0.317758 0.813701 0.745726 1867 1 0.309436 0.743362 0.808912 1868 1 0.246419 0.814227 0.814654 1744 1 0.376627 0.810908 0.687173 1712 1 0.381253 0.694538 0.676577 1743 1 0.443274 0.752374 0.682461 1838 1 0.436705 0.69126 0.738247 1840 1 0.374756 0.686589 0.811764 1869 1 0.378345 0.747314 0.745692 1870 1 0.430808 0.811654 0.749208 1871 1 0.432641 0.750663 0.809199 1872 1 0.371363 0.80923 0.810104 1716 1 0.496107 0.683657 0.679301 1844 1 0.496751 0.688292 0.807782 1748 1 0.50042 0.814832 0.683393 1876 1 0.498726 0.80915 0.813555 1873 1 0.498995 0.752222 0.746883 1720 1 0.622883 0.683536 0.688599 1747 1 0.558301 0.746481 0.684665 1752 1 0.629809 0.799546 0.679381 1842 1 0.559217 0.687875 0.752012 1848 1 0.622612 0.688067 0.812262 1874 1 0.569697 0.806484 0.740542 1875 1 0.555849 0.75577 0.801334 1877 1 0.628424 0.74701 0.74175 1880 1 0.634524 0.816418 0.797123 1724 1 0.751839 0.681205 0.678537 1751 1 0.696827 0.740342 0.685599 1755 1 0.813063 0.751728 0.685836 1756 1 0.758382 0.806681 0.680494 1846 1 0.681373 0.676377 0.755241 1850 1 0.813953 0.681135 0.751168 1852 1 0.750886 0.669726 0.814228 1878 1 0.687432 0.805295 0.740482 1879 1 0.695845 0.745477 0.808195 1881 1 0.753832 0.743073 0.748153 1882 1 0.820041 0.815184 0.74524 1883 1 0.807924 0.740264 0.816903 1884 1 0.754024 0.806035 0.813608 1828 1 0.00820868 0.697806 0.814223 1857 1 0.00562405 0.756998 0.752605 1728 1 0.866071 0.691832 0.689157 1759 1 0.942363 0.751354 0.698033 1760 1 0.878396 0.810007 0.678855 1854 1 0.940351 0.677193 0.74324 1856 1 0.881107 0.677175 0.824103 1885 1 0.868336 0.750249 0.750179 1886 1 0.941617 0.805983 0.757468 1887 1 0.934135 0.743568 0.807402 1888 1 0.871277 0.808187 0.819833 1066 1 0.322686 0.68765 1.00113 1763 1 0.0683446 0.876024 0.692085 1768 1 0.125594 0.943178 0.680857 1890 1 0.0631503 0.940047 0.750208 1891 1 0.0723919 0.873523 0.81407 1893 1 0.12847 0.874531 0.748085 1896 1 0.135016 0.938895 0.812846 1892 1 0.00330663 0.934893 0.817858 659 1 0.559233 0.996033 0.683128 1767 1 0.182328 0.88311 0.690364 1771 1 0.316379 0.876055 0.684478 1772 1 0.252847 0.936599 0.686919 1894 1 0.188428 0.935954 0.750124 1895 1 0.188602 0.877547 0.809175 1897 1 0.25009 0.868222 0.737882 1898 1 0.310121 0.92583 0.750802 1899 1 0.319485 0.871029 0.810323 1900 1 0.253952 0.927979 0.814891 1675 1 0.321517 0.502887 0.690644 2043 1 0.811526 0.877066 0.938938 1775 1 0.432863 0.875038 0.685912 1776 1 0.374963 0.93562 0.698089 1901 1 0.381643 0.871641 0.748485 1902 1 0.446603 0.939053 0.742818 1903 1 0.431386 0.863543 0.819727 1904 1 0.38421 0.934896 0.82138 2039 1 0.689925 0.877908 0.937168 1780 1 0.502826 0.930114 0.684656 1905 1 0.502374 0.868763 0.74455 1908 1 0.4991 0.927835 0.811379 1779 1 0.56581 0.868492 0.68343 1784 1 0.621128 0.942371 0.68438 1906 1 0.56215 0.932784 0.745281 1907 1 0.562993 0.868733 0.803884 1909 1 0.629163 0.873775 0.738594 1912 1 0.619445 0.926792 0.803944 2037 1 0.628772 0.877611 0.86734 1911 1 0.693856 0.871736 0.797171 1783 1 0.700017 0.869416 0.685386 1787 1 0.822215 0.880949 0.680006 1788 1 0.755297 0.930952 0.679653 1910 1 0.680374 0.943259 0.744007 1913 1 0.75181 0.882112 0.743631 1914 1 0.811903 0.940429 0.753677 1915 1 0.817419 0.878418 0.810253 1916 1 0.749466 0.93929 0.817208 1602 1 0.0740498 0.817448 0.503534 1764 1 0.00123988 0.936038 0.695758 1889 1 0.00834403 0.875458 0.757704 1791 1 0.937518 0.862985 0.686553 1792 1 0.875762 0.942524 0.69498 1917 1 0.871793 0.871736 0.744468 1918 1 0.934135 0.927079 0.742237 1919 1 0.938448 0.864422 0.810045 1920 1 0.88052 0.930842 0.805199 1797 1 0.114291 0.50935 0.737042 1922 1 0.0566162 0.557525 0.876654 1928 1 0.121879 0.566515 0.934043 1955 1 0.0612661 0.625465 0.946086 1957 1 0.115494 0.624039 0.866832 1953 1 -0.00191817 0.630907 0.891308 2035 1 0.566583 0.857508 0.934331 1691 1 0.812358 0.507448 0.690876 1551 1 0.442953 0.507328 0.564859 2029 1 0.376579 0.877113 0.87558 907 1 0.315644 0.999642 0.942438 1930 1 0.330941 0.567137 0.878213 1926 1 0.186315 0.554726 0.87026 1963 1 0.329853 0.62787 0.940774 1961 1 0.251851 0.626845 0.874478 1932 1 0.256005 0.56102 0.930902 1959 1 0.189208 0.624025 0.9328 539 1 0.812598 0.996066 0.559716 2041 1 0.747985 0.886698 0.876915 2044 1 0.75143 0.935287 0.943577 1965 1 0.384603 0.62027 0.868782 1934 1 0.441101 0.554423 0.881873 1936 1 0.381181 0.566401 0.938011 1967 1 0.437782 0.62529 0.947226 1969 1 0.501153 0.61668 0.881042 1940 1 0.491175 0.560013 0.954571 2038 1 0.68352 0.939441 0.873267 2040 1 0.622626 0.929624 0.936647 1633 1 0.00638236 0.883868 0.499101 783 1 0.437072 0.993211 0.814517 1938 1 0.563218 0.562364 0.873717 1944 1 0.628311 0.55779 0.942184 1971 1 0.56278 0.62367 0.936982 1973 1 0.622917 0.626072 0.871938 667 1 0.809173 0.992446 0.676051 2034 1 0.559723 0.922797 0.861207 1669 1 0.112041 0.516752 0.630647 2042 1 0.817816 0.936399 0.869553 2033 1 0.502218 0.865702 0.874118 1942 1 0.67527 0.558555 0.877666 1946 1 0.812958 0.560982 0.875965 1977 1 0.752566 0.619622 0.879916 1979 1 0.818686 0.623676 0.947082 1948 1 0.746595 0.558557 0.939568 1975 1 0.678675 0.622233 0.932802 2022 1 0.187766 0.938499 0.873302 1657 1 0.751698 0.869966 0.511091 1681 1 0.500159 0.501079 0.617584 2026 1 0.316136 0.941817 0.883121 1924 1 0.994093 0.566263 0.936823 1950 1 0.937129 0.564617 0.881561 1981 1 0.875188 0.622265 0.88167 1983 1 0.933641 0.626925 0.947629 1952 1 0.87553 0.557009 0.936959 1145 1 0.749644 0.869571 1.00206 1801 1 0.252385 0.508632 0.74405 2027 1 0.316879 0.8763 0.931251 1960 1 0.131582 0.678969 0.936555 1989 1 0.131964 0.752235 0.881383 1954 1 0.0673113 0.692222 0.878594 1987 1 0.0774415 0.756093 0.940246 1986 1 0.0776712 0.814436 0.870564 1992 1 0.138052 0.818246 0.93742 1988 1 0.00441555 0.812861 0.928932 1985 1 0.0160951 0.749801 0.874571 2025 1 0.252981 0.882938 0.879018 1995 1 0.318571 0.739744 0.941472 1958 1 0.187733 0.68664 0.870199 1994 1 0.313186 0.815669 0.875545 1991 1 0.190781 0.74737 0.935298 1990 1 0.187416 0.82374 0.876232 1993 1 0.248768 0.743887 0.868252 1964 1 0.250311 0.691291 0.926577 1962 1 0.31204 0.682843 0.872195 1996 1 0.246126 0.809424 0.929149 657 1 0.498104 0.990616 0.618712 2023 1 0.191208 0.880424 0.941666 1998 1 0.432602 0.802629 0.882033 1966 1 0.436195 0.69306 0.871346 1968 1 0.386109 0.690615 0.939707 1999 1 0.444248 0.749796 0.937568 2000 1 0.371648 0.809062 0.938324 1997 1 0.367475 0.741742 0.866706 2001 1 0.500159 0.745891 0.872536 787 1 0.574408 0.989343 0.813932 1821 1 0.871922 0.501732 0.754632 1972 1 0.498604 0.681453 0.934767 2004 1 0.493572 0.803363 0.955248 1976 1 0.625232 0.695 0.947741 2005 1 0.638736 0.744133 0.876488 2003 1 0.557106 0.748244 0.945435 2008 1 0.629199 0.812472 0.925936 2002 1 0.565405 0.811818 0.869784 1970 1 0.570877 0.694704 0.884504 1943 1 0.687067 0.499089 0.939285 2030 1 0.45127 0.942707 0.878915 2007 1 0.678348 0.750174 0.947904 1974 1 0.685622 0.679478 0.870699 2009 1 0.757416 0.747575 0.885612 1978 1 0.810818 0.678455 0.888299 2006 1 0.699359 0.815118 0.867506 2011 1 0.820571 0.741356 0.944216 1980 1 0.743508 0.695665 0.948184 2010 1 0.810998 0.812088 0.877868 2012 1 0.744677 0.810253 0.941445 905 1 0.25463 0.995193 0.873419 2031 1 0.438791 0.873576 0.934496 1133 1 0.366094 0.867362 0.99376 643 1 0.0592849 0.996877 0.691727 2015 1 0.946519 0.751566 0.929192 2014 1 0.947075 0.818081 0.874234 1956 1 0.00717387 0.701367 0.946521 2016 1 0.885103 0.807056 0.936759 1982 1 0.938124 0.69182 0.875438 2013 1 0.873241 0.747408 0.870592 1984 1 0.879062 0.689381 0.95072 2020 1 0.998196 0.936453 0.937031 527 1 0.436133 0.994949 0.557676 2024 1 0.124185 0.931818 0.928598 2018 1 0.0708769 0.939913 0.866865 2021 1 0.130508 0.875364 0.866483 2019 1 0.0657342 0.880299 0.927133 2036 1 0.50226 0.924765 0.937413 2032 1 0.377028 0.934489 0.941682 915 1 0.55632 0.991839 0.931806 523 1 0.314597 0.996157 0.5634 925 1 0.877018 0.995887 0.874055 1065 1 0.25244 0.632807 0.98842 1539 1 0.0516764 0.5098 0.557992 669 1 0.879044 0.996848 0.629069 1542 1 0.185421 0.560626 0.500893 1677 1 0.376678 0.506604 0.630256 777 1 0.242084 0.988264 0.759736 1061 1 0.125306 0.626834 0.998496 1933 1 0.377028 0.497987 0.876206 1925 1 0.119283 0.499344 0.878976 1949 1 0.86995 0.500874 0.874003 1546 1 0.307933 0.562317 0.505315 665 1 0.747644 0.997833 0.618989 1618 1 0.563403 0.811005 0.513662 21 1 0.62366 0.987686 0.99584 1034 1 0.310462 0.566671 0.994831 1813 1 0.619281 0.505362 0.753807 1921 1 0.990924 0.504234 0.881364 917 1 0.622101 0.992474 0.880237 655 1 0.435772 0.997241 0.688772 1805 1 0.379631 0.499437 0.750273 543 1 0.937695 0.991346 0.564341 1606 1 0.188162 0.817395 0.504303 1146 1 0.810443 0.940338 0.99675 1554 1 0.563093 0.560015 0.505079 1638 1 0.197016 0.940194 0.504733 1097 1 0.250396 0.745189 0.9902 1114 1 0.814956 0.806976 0.987846 1049 1 0.739963 0.500544 0.999075 1609 1 0.242477 0.753843 0.503041 1141 1 0.621657 0.86856 0.990703 1089 1 0.0175743 0.765025 0.997461 1150 1 0.934022 0.937098 0.995218 1641 1 0.250477 0.882736 0.500721 1658 1 0.803783 0.934241 0.504092 1566 1 0.933974 0.569691 0.503159
[ "scheuclu@gmail.com" ]
scheuclu@gmail.com
665a85b8cfcc9e0244dfb2ef9b10d85932d06f4b
d1236e327bc750a845b46edd78e6dae63c157b86
/facade_pattern/screen.py
1cbc5a4ed7a6ac4f1658fdcfd78d14b7741916fd
[]
no_license
EricMontague/Head-First-Design-Patterns-In-Python
12cc14c592d8728c6fc5677d4d6e641a94df4e3f
296edada143336f88e8b2d066f5fc99c95ecfcc7
refs/heads/master
2022-12-31T05:12:24.719241
2020-10-07T21:51:20
2020-10-07T21:51:20
298,710,997
0
0
null
null
null
null
UTF-8
Python
false
false
294
py
class Screen: def __init__(self, description): self._description = description def up(self): print(f"{self._description} going up") def down(self): print(f"{self._description} going down") def __str__(self): return self._description
[ "eric.g.montague@gmail.com" ]
eric.g.montague@gmail.com
b45528580f4af8d8d3c16993d6064bf18a6718cc
e56214188faae8ebfb36a463e34fc8324935b3c2
/intersight/models/top_system_all_of.py
ec02983ac7c44e1bf5c268b50e6c0879f1294d33
[ "Apache-2.0" ]
permissive
CiscoUcs/intersight-python
866d6c63e0cb8c33440771efd93541d679bb1ecc
a92fccb1c8df4332ba1f05a0e784efbb4f2efdc4
refs/heads/master
2021-11-07T12:54:41.888973
2021-10-25T16:15:50
2021-10-25T16:15:50
115,440,875
25
18
Apache-2.0
2020-03-02T16:19:49
2017-12-26T17:14:03
Python
UTF-8
Python
false
false
13,069
py
# coding: utf-8 """ Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advanced ways than the prior generations of tools. Cisco Intersight provides an integrated and intuitive management experience for resources in the traditional data center as well as at the edge. With flexible deployment options to address complex security needs, getting started with Intersight is quick and easy. Cisco Intersight has deep integration with Cisco UCS and HyperFlex systems allowing for remote deployment, configuration, and ongoing maintenance. The model-based deployment works for a single system in a remote location or hundreds of systems in a data center and enables rapid, standardized configuration and deployment. It also streamlines maintaining those systems whether you are working with small or very large configurations. # noqa: E501 The version of the OpenAPI document: 1.0.9-1295 Contact: intersight@cisco.com Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from intersight.configuration import Configuration class TopSystemAllOf(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ openapi_types = { 'ipv4_address': 'str', 'ipv6_address': 'str', 'mode': 'str', 'name': 'str', 'time_zone': 'str', 'compute_blades': 'list[ComputeBlade]', 'compute_rack_units': 'list[ComputeRackUnit]', 'management_controller': 'ManagementController', 'network_elements': 'list[NetworkElement]', 'registered_device': 'AssetDeviceRegistration' } attribute_map = { 'ipv4_address': 'Ipv4Address', 'ipv6_address': 'Ipv6Address', 'mode': 'Mode', 'name': 'Name', 'time_zone': 'TimeZone', 'compute_blades': 'ComputeBlades', 'compute_rack_units': 'ComputeRackUnits', 'management_controller': 'ManagementController', 'network_elements': 'NetworkElements', 'registered_device': 'RegisteredDevice' } def __init__(self, ipv4_address=None, ipv6_address=None, mode=None, name=None, time_zone=None, compute_blades=None, compute_rack_units=None, management_controller=None, network_elements=None, registered_device=None, local_vars_configuration=None): # noqa: E501 """TopSystemAllOf - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration self._ipv4_address = None self._ipv6_address = None self._mode = None self._name = None self._time_zone = None self._compute_blades = None self._compute_rack_units = None self._management_controller = None self._network_elements = None self._registered_device = None self.discriminator = None if ipv4_address is not None: self.ipv4_address = ipv4_address if ipv6_address is not None: self.ipv6_address = ipv6_address if mode is not None: self.mode = mode if name is not None: self.name = name if time_zone is not None: self.time_zone = time_zone if compute_blades is not None: self.compute_blades = compute_blades if compute_rack_units is not None: self.compute_rack_units = compute_rack_units if management_controller is not None: self.management_controller = management_controller if network_elements is not None: self.network_elements = network_elements if registered_device is not None: self.registered_device = registered_device @property def ipv4_address(self): """Gets the ipv4_address of this TopSystemAllOf. # noqa: E501 The IPv4 address of system. # noqa: E501 :return: The ipv4_address of this TopSystemAllOf. # noqa: E501 :rtype: str """ return self._ipv4_address @ipv4_address.setter def ipv4_address(self, ipv4_address): """Sets the ipv4_address of this TopSystemAllOf. The IPv4 address of system. # noqa: E501 :param ipv4_address: The ipv4_address of this TopSystemAllOf. # noqa: E501 :type: str """ self._ipv4_address = ipv4_address @property def ipv6_address(self): """Gets the ipv6_address of this TopSystemAllOf. # noqa: E501 The IPv6 address of system. # noqa: E501 :return: The ipv6_address of this TopSystemAllOf. # noqa: E501 :rtype: str """ return self._ipv6_address @ipv6_address.setter def ipv6_address(self, ipv6_address): """Sets the ipv6_address of this TopSystemAllOf. The IPv6 address of system. # noqa: E501 :param ipv6_address: The ipv6_address of this TopSystemAllOf. # noqa: E501 :type: str """ self._ipv6_address = ipv6_address @property def mode(self): """Gets the mode of this TopSystemAllOf. # noqa: E501 :return: The mode of this TopSystemAllOf. # noqa: E501 :rtype: str """ return self._mode @mode.setter def mode(self, mode): """Sets the mode of this TopSystemAllOf. :param mode: The mode of this TopSystemAllOf. # noqa: E501 :type: str """ self._mode = mode @property def name(self): """Gets the name of this TopSystemAllOf. # noqa: E501 :return: The name of this TopSystemAllOf. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this TopSystemAllOf. :param name: The name of this TopSystemAllOf. # noqa: E501 :type: str """ self._name = name @property def time_zone(self): """Gets the time_zone of this TopSystemAllOf. # noqa: E501 The operational timezone of the system, empty indicates no timezone has been set specifically. # noqa: E501 :return: The time_zone of this TopSystemAllOf. # noqa: E501 :rtype: str """ return self._time_zone @time_zone.setter def time_zone(self, time_zone): """Sets the time_zone of this TopSystemAllOf. The operational timezone of the system, empty indicates no timezone has been set specifically. # noqa: E501 :param time_zone: The time_zone of this TopSystemAllOf. # noqa: E501 :type: str """ self._time_zone = time_zone @property def compute_blades(self): """Gets the compute_blades of this TopSystemAllOf. # noqa: E501 A reference to a computeBlade resource. When the $expand query parameter is specified, the referenced resource is returned inline. # noqa: E501 :return: The compute_blades of this TopSystemAllOf. # noqa: E501 :rtype: list[ComputeBlade] """ return self._compute_blades @compute_blades.setter def compute_blades(self, compute_blades): """Sets the compute_blades of this TopSystemAllOf. A reference to a computeBlade resource. When the $expand query parameter is specified, the referenced resource is returned inline. # noqa: E501 :param compute_blades: The compute_blades of this TopSystemAllOf. # noqa: E501 :type: list[ComputeBlade] """ self._compute_blades = compute_blades @property def compute_rack_units(self): """Gets the compute_rack_units of this TopSystemAllOf. # noqa: E501 A reference to a computeRackUnit resource. When the $expand query parameter is specified, the referenced resource is returned inline. # noqa: E501 :return: The compute_rack_units of this TopSystemAllOf. # noqa: E501 :rtype: list[ComputeRackUnit] """ return self._compute_rack_units @compute_rack_units.setter def compute_rack_units(self, compute_rack_units): """Sets the compute_rack_units of this TopSystemAllOf. A reference to a computeRackUnit resource. When the $expand query parameter is specified, the referenced resource is returned inline. # noqa: E501 :param compute_rack_units: The compute_rack_units of this TopSystemAllOf. # noqa: E501 :type: list[ComputeRackUnit] """ self._compute_rack_units = compute_rack_units @property def management_controller(self): """Gets the management_controller of this TopSystemAllOf. # noqa: E501 :return: The management_controller of this TopSystemAllOf. # noqa: E501 :rtype: ManagementController """ return self._management_controller @management_controller.setter def management_controller(self, management_controller): """Sets the management_controller of this TopSystemAllOf. :param management_controller: The management_controller of this TopSystemAllOf. # noqa: E501 :type: ManagementController """ self._management_controller = management_controller @property def network_elements(self): """Gets the network_elements of this TopSystemAllOf. # noqa: E501 A reference to a networkElement resource. When the $expand query parameter is specified, the referenced resource is returned inline. # noqa: E501 :return: The network_elements of this TopSystemAllOf. # noqa: E501 :rtype: list[NetworkElement] """ return self._network_elements @network_elements.setter def network_elements(self, network_elements): """Sets the network_elements of this TopSystemAllOf. A reference to a networkElement resource. When the $expand query parameter is specified, the referenced resource is returned inline. # noqa: E501 :param network_elements: The network_elements of this TopSystemAllOf. # noqa: E501 :type: list[NetworkElement] """ self._network_elements = network_elements @property def registered_device(self): """Gets the registered_device of this TopSystemAllOf. # noqa: E501 :return: The registered_device of this TopSystemAllOf. # noqa: E501 :rtype: AssetDeviceRegistration """ return self._registered_device @registered_device.setter def registered_device(self, registered_device): """Sets the registered_device of this TopSystemAllOf. :param registered_device: The registered_device of this TopSystemAllOf. # noqa: E501 :type: AssetDeviceRegistration """ self._registered_device = registered_device def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.openapi_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 pprint.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""" if not isinstance(other, TopSystemAllOf): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, TopSystemAllOf): return True return self.to_dict() != other.to_dict()
[ "ucs-build@github.com" ]
ucs-build@github.com
a6f52906d319e6ac298f0c74898e58f12778ca34
4d892dc51e2dda0fcce246ac608fc4e0ce98c52b
/FirstStepsInPython/Basics/Lab6 Nested Loops/03. Combinations.py
decabc50ed97c774f38521b558b51d2bf60acf67
[ "MIT" ]
permissive
inovei6un/SoftUni-Studies-1
510088ce65e2907c2755a15e427fd156909157f0
3837c2ea0cd782d3f79353e61945c08a53cd4a95
refs/heads/main
2023-08-14T16:44:15.823962
2021-10-03T17:30:48
2021-10-03T17:30:48
null
0
0
null
null
null
null
UTF-8
Python
false
false
213
py
num = int(input()) counter = 0 for x1 in range(0, num + 1): for x2 in range(0, num + 1): for x3 in range(0, num + 1): if (x1 + x2 + x3) == num: counter += 1 print(counter)
[ "lazar_off@yahoo.com" ]
lazar_off@yahoo.com
8e6dfd9314f2e7e039efeb9bd4b6210d0c8c14e0
ae65873c3584cef7139066b224daad04410af6d2
/NestedList.py
c2c204a177c6612160c5c7fd71373586bc565716
[]
no_license
rajatkashyap/Python
2240c7472d07803c460c7a55d570e20694b694f9
f74c85c65b0e209a5f7ab25b653d42835222faaf
refs/heads/master
2022-06-25T19:20:52.847498
2022-06-08T14:40:45
2022-06-08T14:40:45
145,714,257
0
0
null
2022-04-25T00:18:37
2018-08-22T13:39:14
Python
UTF-8
Python
false
false
308
py
i=int(raw_input()) l=[] for x in range(i): a=raw_input() b=float(raw_input()) l.append([a,b]) #l1=[[input(),float(input())] for x in range(i)] #print l1 scores = sorted({s[1] for s in l}) result = sorted(s[0] for s in l if s[1] == scores[1]) print '\n'.join(result) #print result
[ "rajatkashyap@Rajats-MBP.T-mobile.com" ]
rajatkashyap@Rajats-MBP.T-mobile.com
f752427116cf14f7650884c3dbad47ed6984b31c
fb7efe44f4d9f30d623f880d0eb620f3a81f0fbd
/tools/perf/page_sets/tough_texture_upload_cases.py
033db97946706c90be33819ef2fa3d6d8b28aa75
[ "LGPL-2.0-or-later", "BSD-3-Clause", "Apache-2.0", "LGPL-2.0-only", "MIT", "LicenseRef-scancode-unknown", "LicenseRef-scancode-unknown-license-reference", "LGPL-2.1-only" ]
permissive
wzyy2/chromium-browser
2644b0daf58f8b3caee8a6c09a2b448b2dfe059c
eb905f00a0f7e141e8d6c89be8fb26192a88c4b7
refs/heads/master
2022-11-23T20:25:08.120045
2018-01-16T06:41:26
2018-01-16T06:41:26
117,618,467
3
2
BSD-3-Clause
2022-11-20T22:03:57
2018-01-16T02:09:10
null
UTF-8
Python
false
false
1,424
py
# Copyright 2014 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. from telemetry.page import page as page_module from telemetry import story class ToughTextureUploadCasesPage(page_module.Page): def __init__(self, url, page_set): super( ToughTextureUploadCasesPage, self).__init__( url=url, page_set=page_set, name=url.split('/')[-1]) def RunPageInteractions(self, action_runner): with action_runner.CreateInteraction('Animation'): action_runner.Wait(10) class ToughTextureUploadCasesPageSet(story.StorySet): """ Description: A collection of texture upload performance tests """ def __init__(self): super(ToughTextureUploadCasesPageSet, self).__init__() urls_list = [ 'file://tough_texture_upload_cases/background_color_animation.html', # pylint: disable=line-too-long 'file://tough_texture_upload_cases/background_color_animation_with_gradient.html', 'file://tough_texture_upload_cases/small_texture_uploads.html', 'file://tough_texture_upload_cases/medium_texture_uploads.html', 'file://tough_texture_upload_cases/large_texture_uploads.html', 'file://tough_texture_upload_cases/extra_large_texture_uploads.html', ] for url in urls_list: self.AddStory(ToughTextureUploadCasesPage(url, self))
[ "jacob-chen@iotwrt.com" ]
jacob-chen@iotwrt.com
87350879e430763b0a21b7d99fa26c027d3973d5
993ef8924418866f932396a58e3ad0c2a940ddd3
/Production/python/PrivateSamples/EMJ_UL16APV_mMed-2500_mDark-6_kappa-1p32_aligned-down_cff.py
c09c3e7926a2a683f6eaecb2c41c5bacc0183d0b
[]
no_license
TreeMaker/TreeMaker
48d81f6c95a17828dbb599d29c15137cd6ef009a
15dd7fe9e9e6f97d9e52614c900c27d200a6c45f
refs/heads/Run2_UL
2023-07-07T15:04:56.672709
2023-07-03T16:43:17
2023-07-03T16:43:17
29,192,343
16
92
null
2023-07-03T16:43:28
2015-01-13T13:59:30
Python
UTF-8
Python
false
false
1,991
py
import FWCore.ParameterSet.Config as cms maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) ) readFiles = cms.untracked.vstring() secFiles = cms.untracked.vstring() source = cms.Source ("PoolSource",fileNames = readFiles, secondaryFileNames = secFiles) readFiles.extend( [ 'root://cmseos.fnal.gov///store/group/lpcsusyhad/ExoEMJAnalysis2020/Signal.Oct.2021/UL16APV/step4_MINIAODv2_mMed-2500_mDark-6_kappa-1p32_aligned-down_n-500_part-1.root', 'root://cmseos.fnal.gov///store/group/lpcsusyhad/ExoEMJAnalysis2020/Signal.Oct.2021/UL16APV/step4_MINIAODv2_mMed-2500_mDark-6_kappa-1p32_aligned-down_n-500_part-10.root', 'root://cmseos.fnal.gov///store/group/lpcsusyhad/ExoEMJAnalysis2020/Signal.Oct.2021/UL16APV/step4_MINIAODv2_mMed-2500_mDark-6_kappa-1p32_aligned-down_n-500_part-2.root', 'root://cmseos.fnal.gov///store/group/lpcsusyhad/ExoEMJAnalysis2020/Signal.Oct.2021/UL16APV/step4_MINIAODv2_mMed-2500_mDark-6_kappa-1p32_aligned-down_n-500_part-3.root', 'root://cmseos.fnal.gov///store/group/lpcsusyhad/ExoEMJAnalysis2020/Signal.Oct.2021/UL16APV/step4_MINIAODv2_mMed-2500_mDark-6_kappa-1p32_aligned-down_n-500_part-4.root', 'root://cmseos.fnal.gov///store/group/lpcsusyhad/ExoEMJAnalysis2020/Signal.Oct.2021/UL16APV/step4_MINIAODv2_mMed-2500_mDark-6_kappa-1p32_aligned-down_n-500_part-5.root', 'root://cmseos.fnal.gov///store/group/lpcsusyhad/ExoEMJAnalysis2020/Signal.Oct.2021/UL16APV/step4_MINIAODv2_mMed-2500_mDark-6_kappa-1p32_aligned-down_n-500_part-6.root', 'root://cmseos.fnal.gov///store/group/lpcsusyhad/ExoEMJAnalysis2020/Signal.Oct.2021/UL16APV/step4_MINIAODv2_mMed-2500_mDark-6_kappa-1p32_aligned-down_n-500_part-7.root', 'root://cmseos.fnal.gov///store/group/lpcsusyhad/ExoEMJAnalysis2020/Signal.Oct.2021/UL16APV/step4_MINIAODv2_mMed-2500_mDark-6_kappa-1p32_aligned-down_n-500_part-8.root', 'root://cmseos.fnal.gov///store/group/lpcsusyhad/ExoEMJAnalysis2020/Signal.Oct.2021/UL16APV/step4_MINIAODv2_mMed-2500_mDark-6_kappa-1p32_aligned-down_n-500_part-9.root', ] )
[ "enochnotsocool@gmail.com" ]
enochnotsocool@gmail.com
662bcebd1c7043cefd580e5dda9e0b107b76de69
33f8e35b33d4f64d737b9b4239204d2c7d669f7e
/leapp/views/subcription.py
e1710c8afdf48fa2748a089da5cd8f146323080d
[]
no_license
Emad-ahmed/EmailSenderWebsite
872fd6b8ed0766d9a5bfe2cc1afff2bfdbc071c7
e6acc443211acdc53869510661b6178f63f2ad73
refs/heads/main
2023-06-25T17:48:35.765922
2021-07-08T06:31:59
2021-07-08T06:31:59
384,022,670
0
0
null
null
null
null
UTF-8
Python
false
false
277
py
from django.shortcuts import render from django.views import View # Create your views here. class SubcriptionView(View): def get(self, request): mydata = { 'subscription': 'active' } return render(request, 'subscription.html', mydata)
[ "amadahmed1234678@gmail.com" ]
amadahmed1234678@gmail.com
ad99f3146a98393b269f70c8806e9022691ec639
c57376701537dc6969939c3afb51d542d670db61
/Numpy/10_Xu-li-data-su-dung-Numpy/9_Tuong-quan-Sepallength-Petallength.py
fa216982379d73b542d85191febe912c74f5e532
[]
no_license
dangnam739/Learn_Python_Begin
d3f5f24504b3c703de4e981abb432f3734558e5d
81764172475f26374a3e21d150395a99e8a183e6
refs/heads/master
2021-07-15T19:13:58.156215
2020-08-21T06:38:04
2020-08-21T06:38:04
200,081,663
0
0
null
null
null
null
UTF-8
Python
false
false
417
py
#Cau 9: tim moi tuong quan giuwa sepallength(cot 1) va petallength(cot 3) import numpy as np iris_2d = np.genfromtxt('iris.csv', delimiter=',', dtype=float, usecols=[0, 1, 2, 3]) #Cach 1: dung ham corrcoef tu numpy out = np.corrcoef(iris_2d[:, 0], iris_2d[:, 2])[0,1] print(out) #Cach 2: dung ham pearsonr tu scipy from scipy.stats.stats import pearsonr out = pearsonr(iris_2d[:, 0], iris_2d[:, 2])[0] print(out)
[ "47108512+ChrisZangNam@users.noreply.github.com" ]
47108512+ChrisZangNam@users.noreply.github.com
98bbad055766dde226dadd52b65c212f7cd94bc9
5ec06dab1409d790496ce082dacb321392b32fe9
/clients/python-flask/generated/openapi_server/models/com_adobe_cq_social_calendar_servlets_time_zone_servlet_info.py
4705252b57fa0690f21c882f27a71d10c9493c11
[ "Apache-2.0" ]
permissive
shinesolutions/swagger-aem-osgi
e9d2385f44bee70e5bbdc0d577e99a9f2525266f
c2f6e076971d2592c1cbd3f70695c679e807396b
refs/heads/master
2022-10-29T13:07:40.422092
2021-04-09T07:46:03
2021-04-09T07:46:03
190,217,155
3
3
Apache-2.0
2022-10-05T03:26:20
2019-06-04T14:23:28
null
UTF-8
Python
false
false
5,145
py
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from openapi_server.models.base_model_ import Model from openapi_server.models.com_adobe_cq_social_calendar_servlets_time_zone_servlet_properties import ComAdobeCqSocialCalendarServletsTimeZoneServletProperties # noqa: F401,E501 from openapi_server import util class ComAdobeCqSocialCalendarServletsTimeZoneServletInfo(Model): """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). Do not edit the class manually. """ def __init__(self, pid: str=None, title: str=None, description: str=None, properties: ComAdobeCqSocialCalendarServletsTimeZoneServletProperties=None): # noqa: E501 """ComAdobeCqSocialCalendarServletsTimeZoneServletInfo - a model defined in OpenAPI :param pid: The pid of this ComAdobeCqSocialCalendarServletsTimeZoneServletInfo. # noqa: E501 :type pid: str :param title: The title of this ComAdobeCqSocialCalendarServletsTimeZoneServletInfo. # noqa: E501 :type title: str :param description: The description of this ComAdobeCqSocialCalendarServletsTimeZoneServletInfo. # noqa: E501 :type description: str :param properties: The properties of this ComAdobeCqSocialCalendarServletsTimeZoneServletInfo. # noqa: E501 :type properties: ComAdobeCqSocialCalendarServletsTimeZoneServletProperties """ self.openapi_types = { 'pid': str, 'title': str, 'description': str, 'properties': ComAdobeCqSocialCalendarServletsTimeZoneServletProperties } self.attribute_map = { 'pid': 'pid', 'title': 'title', 'description': 'description', 'properties': 'properties' } self._pid = pid self._title = title self._description = description self._properties = properties @classmethod def from_dict(cls, dikt) -> 'ComAdobeCqSocialCalendarServletsTimeZoneServletInfo': """Returns the dict as a model :param dikt: A dict. :type: dict :return: The comAdobeCqSocialCalendarServletsTimeZoneServletInfo of this ComAdobeCqSocialCalendarServletsTimeZoneServletInfo. # noqa: E501 :rtype: ComAdobeCqSocialCalendarServletsTimeZoneServletInfo """ return util.deserialize_model(dikt, cls) @property def pid(self) -> str: """Gets the pid of this ComAdobeCqSocialCalendarServletsTimeZoneServletInfo. :return: The pid of this ComAdobeCqSocialCalendarServletsTimeZoneServletInfo. :rtype: str """ return self._pid @pid.setter def pid(self, pid: str): """Sets the pid of this ComAdobeCqSocialCalendarServletsTimeZoneServletInfo. :param pid: The pid of this ComAdobeCqSocialCalendarServletsTimeZoneServletInfo. :type pid: str """ self._pid = pid @property def title(self) -> str: """Gets the title of this ComAdobeCqSocialCalendarServletsTimeZoneServletInfo. :return: The title of this ComAdobeCqSocialCalendarServletsTimeZoneServletInfo. :rtype: str """ return self._title @title.setter def title(self, title: str): """Sets the title of this ComAdobeCqSocialCalendarServletsTimeZoneServletInfo. :param title: The title of this ComAdobeCqSocialCalendarServletsTimeZoneServletInfo. :type title: str """ self._title = title @property def description(self) -> str: """Gets the description of this ComAdobeCqSocialCalendarServletsTimeZoneServletInfo. :return: The description of this ComAdobeCqSocialCalendarServletsTimeZoneServletInfo. :rtype: str """ return self._description @description.setter def description(self, description: str): """Sets the description of this ComAdobeCqSocialCalendarServletsTimeZoneServletInfo. :param description: The description of this ComAdobeCqSocialCalendarServletsTimeZoneServletInfo. :type description: str """ self._description = description @property def properties(self) -> ComAdobeCqSocialCalendarServletsTimeZoneServletProperties: """Gets the properties of this ComAdobeCqSocialCalendarServletsTimeZoneServletInfo. :return: The properties of this ComAdobeCqSocialCalendarServletsTimeZoneServletInfo. :rtype: ComAdobeCqSocialCalendarServletsTimeZoneServletProperties """ return self._properties @properties.setter def properties(self, properties: ComAdobeCqSocialCalendarServletsTimeZoneServletProperties): """Sets the properties of this ComAdobeCqSocialCalendarServletsTimeZoneServletInfo. :param properties: The properties of this ComAdobeCqSocialCalendarServletsTimeZoneServletInfo. :type properties: ComAdobeCqSocialCalendarServletsTimeZoneServletProperties """ self._properties = properties
[ "cliffano@gmail.com" ]
cliffano@gmail.com
471c7653b0647a0c5a036552877062a532af9262
77311ad9622a7d8b88707d7cee3f44de7c8860cb
/res/scripts/client/gui/shared/gui_items/dossier/achievements/handofdeathachievement.py
b4dde0ec5ab4cca88dd1f0162a9554600461124e
[]
no_license
webiumsk/WOT-0.9.14-CT
9b193191505a4560df4e872e022eebf59308057e
cfe0b03e511d02c36ce185f308eb48f13ecc05ca
refs/heads/master
2021-01-10T02:14:10.830715
2016-02-14T11:59:59
2016-02-14T11:59:59
51,606,676
0
0
null
null
null
null
WINDOWS-1250
Python
false
false
832
py
# 2016.02.14 12:41:38 Střední Evropa (běžný čas) # Embedded file name: scripts/client/gui/shared/gui_items/dossier/achievements/HandOfDeathAchievement.py from dossiers2.ui.achievements import ACHIEVEMENT_BLOCK as _AB from abstract import SeriesAchievement class HandOfDeathAchievement(SeriesAchievement): def __init__(self, dossier, value = None): super(HandOfDeathAchievement, self).__init__('handOfDeath', _AB.SINGLE, dossier, value) def _getCounterRecordNames(self): return ((_AB.TOTAL, 'killingSeries'), (_AB.TOTAL, 'maxKillingSeries')) # okay decompyling c:\Users\PC\wotsources\files\originals\res\scripts\client\gui\shared\gui_items\dossier\achievements\handofdeathachievement.pyc # decompiled 1 files: 1 okay, 0 failed, 0 verify failed # 2016.02.14 12:41:38 Střední Evropa (běžný čas)
[ "info@webium.sk" ]
info@webium.sk
94ebcfc404c31b585404c1fe589095b751eceede
2eb3487fc70b806674cc0b92e7113f63c54ade08
/testing.py
55681a7bb373c8d669592acc3b7d274282828b2b
[]
no_license
foryourselfand/informatics_lab4
34d4dfdb996c37cf20da3a5176e37077c2d15249
0adb16985c19795b7bbf2bdb6b265ebe716af80a
refs/heads/master
2020-09-01T01:03:28.659326
2019-11-18T17:58:18
2019-11-18T17:58:18
218,835,598
0
0
null
null
null
null
UTF-8
Python
false
false
530
py
from inout import IO from converter import FromJsonToProtoConverter def main(): io = IO() converter = FromJsonToProtoConverter() timetable_input = io.get_input_timetable() timetable_output = converter.convert(timetable_input) # print(timetable_output) io.write_output_timetable(timetable_output) timetable_serialized = io.get_serialized_timetable() # print(timetable_serialized) print(timetable_output == timetable_serialized) io.speed_test() if __name__ == '__main__': main()
[ "foryourselfand@gmail.com" ]
foryourselfand@gmail.com
5a7c2839089386462220c4728d49c8cc96fd0ffd
acac4b642cdaae8fa85cafbaf856212f9984bdf9
/python_object_extractor/substitutions.py
a706af8f8b5c3f84314efca26a34d3b3d9000f17
[ "MIT" ]
permissive
ali1rathore/python-object-extractor
bfa0f7cf3b3d1d5d7b81c7c54c2962d83657e517
e66c47c840c8c99d9706e299ecf499df361926c2
refs/heads/master
2020-08-04T04:16:20.489242
2019-02-24T22:08:41
2019-02-24T22:08:41
null
0
0
null
null
null
null
UTF-8
Python
false
false
5,753
py
import inspect from typing import Dict, List, Set, Optional, Iterable from python_object_extractor.attributes import AttributesAccessChain from python_object_extractor.attributes import extract_attributes_access_chains from python_object_extractor.exceptions import PythonObjectExtractorException from python_object_extractor.imports import ObjectImport from python_object_extractor.imports import ObjectImportsGroupped from python_object_extractor.modules import get_module_by_name from python_object_extractor.references import ObjectReference class NoAccessedModuleObjects(PythonObjectExtractorException): def __init__( self, imported_module_name: str, source: str, ): super().__init__( f"object refers to imported module but does not access any of its " f"members, imported module: '{imported_module_name}', " f"object source:\n{source}" ) def _extract_imported_objects_access_chains( source: str, imported_objects_names: Set[str], ) -> List[AttributesAccessChain]: access_chains = extract_attributes_access_chains(source) return [ x for x in access_chains if x.object_name in imported_objects_names ] def _find_first_non_module_index( module_name: str, object_name: str, access_chain: List[str], ) -> Optional[int]: if module_name == object_name: object_full_name = module_name else: object_full_name = f"{module_name}.{object_name}" module = get_module_by_name(module_name) try: the_object = getattr(module, object_name) except AttributeError: the_object = get_module_by_name(object_full_name) if not inspect.ismodule(the_object): return 0 if not access_chain: return subindex = _find_first_non_module_index( object_full_name, access_chain[0], access_chain[1:], ) if subindex is not None: return subindex + 1 def substitute_accesses_to_imported_modules( source: str, imports: List[ObjectImport], ) -> List[ObjectImport]: alias_to_imports = { (x.alias or x.object_reference.object_name): x for x in imports } access_chains = _extract_imported_objects_access_chains( source=source, imported_objects_names=set(alias_to_imports.keys()), ) results = set(imports) for access_chain in access_chains: original_import = alias_to_imports[access_chain.object_name] new_reference = maybe_make_import_substitution( imported_module_name=original_import.object_reference.module_name, imported_object_name=original_import.object_reference.object_name, access_chain=access_chain.sequence, source=source, ) if new_reference: original_import.access_chain = access_chain.sequence results.remove(original_import) results.add(ObjectImport( object_reference=new_reference, alias=None, substituted=original_import, )) return list(results) def maybe_make_import_substitution( imported_module_name: str, imported_object_name: str, access_chain: List[str], source: str, ) -> Optional[ObjectReference]: idx = _find_first_non_module_index( module_name=imported_module_name, object_name=imported_object_name, access_chain=access_chain, ) if idx is None: imported_module_name = "{}.{}.{}".format( imported_module_name, imported_object_name, ".".join(access_chain), ) raise NoAccessedModuleObjects(imported_module_name, source) if idx == 0: return idx -= 1 new_subpath = access_chain[:idx] new_module_name_path = [imported_module_name, ] if imported_module_name != imported_object_name: new_module_name_path.append(imported_object_name) new_module_name_path.extend(new_subpath) new_module_name = ".".join(new_module_name_path) new_object_name = access_chain[idx] return ObjectReference( module_name=new_module_name, object_name=new_object_name, ) def substitute_aliases_of_imports( imports: Iterable[ObjectImport], references_to_aliases: Dict[ObjectReference, str], ) -> List[ObjectImport]: results = [] for imported_object in imports: imported_alias = ( imported_object.alias or imported_object.object_reference.object_name ) substituted_alias = references_to_aliases.get( imported_object.object_reference, ) if substituted_alias and imported_alias != substituted_alias: imported_object = ObjectImport( object_reference=imported_object.object_reference, alias=substituted_alias, substituted=imported_object, ) results.append(imported_object) return results def substitute_aliases_of_groupped_imports( groupped_imports: List[ObjectImportsGroupped], references_to_aliases: Dict[ObjectReference, str], ) -> None: for item in groupped_imports: if item.stdlib: item.stdlib = substitute_aliases_of_imports( item.stdlib, references_to_aliases, ) if item.third_party: item.third_party = substitute_aliases_of_imports( item.third_party, references_to_aliases, ) if item.project: item.project = substitute_aliases_of_imports( item.project, references_to_aliases, )
[ "oblovatniy@gmail.com" ]
oblovatniy@gmail.com
20e19af0cb679491df4f0179aacc547a6adb16b2
625f2f86f2b2e07cb35204d9b3232427bf462a09
/HIRun2018PbPb/L1T/L1Ntuple_Pythia8_AllQCDPhoton15_Hydjet_Quenched_Cymbal5Ev8_SK1212/crabConfig.py
b64926fe63684d20622521fc7fa158ffd7313f4f
[]
no_license
ttrk/production
abb84c423a076fd9966276b7ed4350936c755e0b
f8a64c9c38de215802799365f0f7a99e1ee78276
refs/heads/master
2023-02-08T23:48:56.355141
2023-01-26T08:46:22
2023-01-26T08:46:22
52,877,406
0
2
null
null
null
null
UTF-8
Python
false
false
1,767
py
from WMCore.Configuration import Configuration config = Configuration() config.section_("General") config.General.requestName = "L1Ntuple_Pythia8_AllQCDPhoton15_Hydjet_Quenched_Cymbal5Ev8_SK1212" config.General.transferLogs = False config.section_("JobType") config.JobType.pluginName = "Analysis" config.JobType.psetName = "l1Ntuple_RAW2DIGI.py" config.JobType.maxMemoryMB = 2500 # request high memory machines, 2500 is the maximum guaranteed number. config.JobType.maxJobRuntimeMin = 2750 # request longer runtime, ~47 hours. 2750 is the maximum guaranteed number. ## Software # CMSSW_10_2_1, l1t-integration-v99.0 # This integration contains the new L1 EG bypass flags : https://github.com/cms-l1t-offline/cmssw/pull/708 # https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideL1TStage2Instructions?rev=140#Environment_Setup_with_Integrati ## Driver # https://twiki.cern.ch/twiki/bin/view/CMS/L1HITaskForce?rev=42#Offline_SW_setup # l1Ntuple_RAW2DIGI.py is created after calling ./createConfigs.sh # Samples are listed here : https://twiki.cern.ch/twiki/bin/view/CMS/PbPb5TeV2018PrivateMC?rev=19#Tunes config.section_("Data") config.Data.inputDataset = "/Pythia8_AllQCDPhoton15_Hydjet_Quenched_Cymbal5Ev8/clindsey-RAWSIM_20180630-d863108fee469c130ddd2763f36829bb/USER" config.Data.inputDBS = "phys03" config.Data.splitting = "FileBased" config.Data.unitsPerJob = 120 config.Data.totalUnits = -1 config.Data.publication = False config.Data.outputDatasetTag = "L1Ntuple_egHOverEcut_EB1_EE1_egEtaCut24_SK1212" config.Data.outLFNDirBase = "/store/user/katatar/HIRun2018PbPb/L1T/" config.section_("Site") config.Site.storageSite = "T2_US_MIT" config.Site.whitelist = ["T2_US_MIT"] config.section_("Debug") config.Debug.extraJDL = ["+CMS_ALLOW_OVERFLOW=False"]
[ "tatark@mit.edu" ]
tatark@mit.edu
6cfb11fd5ed1ef1359d61db18fbbb8fce9c6937c
ee974d693ca4c4156121f8cb385328b52eaac07c
/insightface/src/align/align_megaface.py
3c72359a2891be91019ca6823668870e9bf13c69
[ "MIT" ]
permissive
ngonhi/Attendance_Check_System_with_Face_Recognition
f4531cc4dee565d0e45c02217f73f3eda412b414
92ff88cbc0c740ad48e149033efd38137c9be88d
refs/heads/main
2023-03-12T07:03:25.302649
2021-02-26T15:37:33
2021-02-26T15:37:33
341,493,686
1
0
null
null
null
null
UTF-8
Python
false
false
130
py
version https://git-lfs.github.com/spec/v1 oid sha256:2bb6d2c41848e33065bda3ace8e5bb9cde68ae11c4953056ed6f06f786f35245 size 10062
[ "Nqk180998!" ]
Nqk180998!
cab0faaf8cbfa90afa125c95d28f00e49cda4abc
64cdb9e8fdcde8a71a16ce17cd822441d9533936
/_swea/d4/1865_동철이의일분배.py
8d88a9dbf686174790d59eec94820c2da8ca8d8c
[]
no_license
heecheol1508/algorithm-problem
fa42769f0f2f2300e4e463c5731e0246d7b7643c
6849b355e15f8a538c9a071b0783d1789316d29d
refs/heads/main
2023-07-20T23:46:07.037975
2021-08-31T12:47:33
2021-08-31T12:47:33
302,830,420
0
0
null
null
null
null
UTF-8
Python
false
false
2,944
py
# # ################################ ver.1 # # import sys # # sys.stdin = open("input.txt", "r") # # # def solve(k): # global ans # if k == N : # val = 1 # for i in range(N): # val *= mat[i][perm[i]] # if val > ans: # ans = val # else: # for i in range(k, N): # perm[k], perm[i] = perm[i], perm[k] # solve(k + 1) # perm[k], perm[i] = perm[i], perm[k] # # # TC = int(input()) # for tc in range(1, TC + 1): # N = int(input()) # # mat = [0.0] * N # for i in range(N): # mat[i] = list(map(lambda x: int(x)/100, input().split())) # # ans = 0 # perm = [x for x in range(N)] # solve(0) # print("#%d %.6f" % (tc, ans * 100)) # # # ################################ ver.2 # # import sys # # import time # # sys.stdin = open("input.txt", "r") # # # # st = time.time() # # def solve(k): # global ans # global cnt # cnt += 1 # if k == N : # val = 1 # for i in range(N): # val *= mat[i][perm[i]] # if val > ans: # ans = val # else: # for i in range(k, N): # perm[k], perm[i] = perm[i], perm[k] # val = 1 # for j in range(k + 1): # val *= mat[j][perm[j]] # if val > ans: # solve(k + 1) # perm[k], perm[i] = perm[i], perm[k] # # # # for tc in range(1, int(input()) + 1): # N = int(input()) # # mat = [0.0] * N # for i in range(N): # mat[i] = list(map(lambda x: int(x) / 100, input().split())) # # cnt = 0 # ans = 0 # perm = [x for x in range(N)] # solve(0) # print("#%d %.6f" % (tc, ans * 100)) # # # print("#%d %.6f" % (tc, ans * 100), cnt) # # # # print(time.time() - st) # # ################################ ver.3 import sys # import time sys.stdin = open("input.txt", "r") # # st = time.time() def grid_ans(): global ans val = 1 chk = [0] * N for i in range(N): tmaxi = 0 for j in range(N): if not chk[j] and tmaxi < mat[i][j]: tmaxi = j chk[tmaxi] = 1 val *= mat[i][tmaxi] ans = val def solve(k, val): global ans global cnt cnt += 1 if k == N: if val > ans: ans = val else: for i in range(k, N): perm[k], perm[i] = perm[i], perm[k] if val * mat[k][perm[k]] > ans: solve(k + 1, val * mat[k][perm[k]]) perm[k], perm[i] = perm[i], perm[k] for tc in range(1, int(input()) + 1): N = int(input()) mat = [0] * N for i in range(N): mat[i] = list(map(lambda x: int(x)/100, input().split())) cnt = 0 ans = 0 perm = [x for x in range(N)] grid_ans() solve(0, 1) print("#%d %.6f" % (tc, ans * 100)) # print("#%d %.6f" % (tc, ans * 100), cnt) # print(time.time() - st)
[ "heecheol1508@gmail.com" ]
heecheol1508@gmail.com
7990115461cd14cba0e698790d6ce6b1d3ff43c5
8968a2696cea58d7b04cb59c2525e89cf6f88a0a
/train_mlbert_en_plus_sv.py
170193242a33f4be050b6475c701fedfbd89f373
[]
no_license
Vottivott/swedsquad
a739c7aa938a5db381e2bda9e047c8db93390a90
5ed279f166d26b45228501012fbb8817d1c5ae11
refs/heads/master
2020-09-26T21:02:36.342548
2020-02-09T01:39:38
2020-02-09T01:39:38
226,342,459
0
0
null
null
null
null
UTF-8
Python
false
false
987
py
import run_squad args = """--model_type bert --model_name_or_path bert-base-multilingual-cased --do_train --train_file original_plus_confident_translated_train_no_impossible.json --predict_file confident_translated_dev_no_impossible.json --learning_rate 3e-5 --num_train_epochs 2 --max_seq_length 384 --doc_stride 128 --output_dir ml_bert_en_plus_sv --per_gpu_eval_batch_size=3 --per_gpu_train_batch_size=3 --overwrite_cache --save_steps=2000 """.split() # --eval_all_checkpoints import os import __main__ as main print("Script: " + os.path.basename(main.__file__)) print(args) results = run_squad.main(args) import json import datetime date = datetime.datetime.now().strftime("%I.%M.%S.%f %p on %B %d, %Y") outname = "results " + os.path.basename(main.__file__)[:-3] + " " + date with open(outname + ".json", "w") as out: json.dump(results, out) print(args) print("Script: " + os.path.basename(main.__file__))
[ "hannes.von.essen@gmail.com" ]
hannes.von.essen@gmail.com
089414c504cc26930fa000d737ddcd9717f10394
50948d4cb10dcb1cc9bc0355918478fb2841322a
/azure-mgmt-network/azure/mgmt/network/v2017_10_01/models/express_route_service_provider_py3.py
0741f9964bc0eeb80c778d26a8aa0b432f94461d
[ "MIT" ]
permissive
xiafu-msft/azure-sdk-for-python
de9cd680b39962702b629a8e94726bb4ab261594
4d9560cfd519ee60667f3cc2f5295a58c18625db
refs/heads/master
2023-08-12T20:36:24.284497
2019-05-22T00:55:16
2019-05-22T00:55:16
187,986,993
1
0
MIT
2020-10-02T01:17:02
2019-05-22T07:33:46
Python
UTF-8
Python
false
false
2,490
py
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- from .resource_py3 import Resource class ExpressRouteServiceProvider(Resource): """A ExpressRouteResourceProvider object. Variables are only populated by the server, and will be ignored when sending a request. :param id: Resource ID. :type id: str :ivar name: Resource name. :vartype name: str :ivar type: Resource type. :vartype type: str :param location: Resource location. :type location: str :param tags: Resource tags. :type tags: dict[str, str] :param peering_locations: Get a list of peering locations. :type peering_locations: list[str] :param bandwidths_offered: Gets bandwidths offered. :type bandwidths_offered: list[~azure.mgmt.network.v2017_10_01.models.ExpressRouteServiceProviderBandwidthsOffered] :param provisioning_state: Gets the provisioning state of the resource. :type provisioning_state: str """ _validation = { 'name': {'readonly': True}, 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'peering_locations': {'key': 'properties.peeringLocations', 'type': '[str]'}, 'bandwidths_offered': {'key': 'properties.bandwidthsOffered', 'type': '[ExpressRouteServiceProviderBandwidthsOffered]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } def __init__(self, *, id: str=None, location: str=None, tags=None, peering_locations=None, bandwidths_offered=None, provisioning_state: str=None, **kwargs) -> None: super(ExpressRouteServiceProvider, self).__init__(id=id, location=location, tags=tags, **kwargs) self.peering_locations = peering_locations self.bandwidths_offered = bandwidths_offered self.provisioning_state = provisioning_state
[ "noreply@github.com" ]
xiafu-msft.noreply@github.com
d19c95cc3477fbfb2cc7512698ec60452a67a34a
abc4a73e5f93ebf90be946b95ef215e32c823353
/colour/models/rgb/ycocg.py
47ab9224b921f2a4ab1488ab30e8875b5d8d1d84
[ "BSD-3-Clause" ]
permissive
OmarWagih1/colour
69f5108e83ec443551c5593c066bcd4e3596060f
bdc880a2783ff523dafb19f1233212dd03a639bd
refs/heads/develop
2021-04-14T20:30:29.635916
2020-07-26T05:46:00
2020-07-26T05:46:00
249,263,927
0
0
BSD-3-Clause
2020-03-22T20:11:06
2020-03-22T20:11:06
null
UTF-8
Python
false
false
2,601
py
# -*- coding: utf-8 -*- """ YCoCg Colour Encoding ====================== Defines the *YCoCg* colour encoding related transformations: - :func:`colour.RGB_to_YCoCg` - :func:`colour.YCoCg_to_RGB` References ---------- - :cite:`Malvar2003` : Malvar, H., & Sullivan, G. (2003). YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range. https://www.microsoft.com/en-us/research/wp-content/uploads/2016/06/\ Malvar_Sullivan_YCoCg-R_JVT-I014r3-2.pdf """ from __future__ import division, unicode_literals import numpy as np from colour.utilities import dot_vector __author__ = 'Colour Developers' __copyright__ = 'Copyright (C) 2013-2020 - Colour Developers' __license__ = 'New BSD License - https://opensource.org/licenses/BSD-3-Clause' __maintainer__ = 'Colour Developers' __email__ = 'colour-developers@colour-science.org' __status__ = 'Development' __all__ = [ 'RGB_TO_YCOCG_MATRIX', 'YCOCG_TO_RGB_MATRIX', 'RGB_to_YCoCg', 'YCoCg_to_RGB', ] RGB_TO_YCOCG_MATRIX = np.array([ [1 / 4, 1 / 2, 1 / 4], [1 / 2, 0, -1 / 2], [-1 / 4, 1 / 2, -1 / 4], ]) """ *R'G'B'* colourspace to *YCoCg* colour encoding matrix. RGB_TO_YCOCG_MATRIX : array_like, (3, 3) """ YCOCG_TO_RGB_MATRIX = np.array([ [1, 1, -1], [1, 0, 1], [1, -1, -1], ]) """ *YCoCg* colour encoding to *R'G'B'* colourspace matrix. YCOCG_TO_RGB_MATRIX : array_like, (3, 3) """ def RGB_to_YCoCg(RGB): """ Converts an array of *R'G'B'* values to the corresponding *YCoCg* colour encoding values array. Parameters ---------- RGB : array_like Input *R'G'B'* array. Returns ------- ndarray *YCoCg* colour encoding array. References ---------- :cite:`Malvar2003` Examples -------- >>> RGB_to_YCoCg(np.array([1.0, 1.0, 1.0])) array([ 1., 0., 0.]) >>> RGB_to_YCoCg(np.array([0.75, 0.5, 0.5])) array([ 0.5625, 0.125 , -0.0625]) """ return dot_vector(RGB_TO_YCOCG_MATRIX, RGB) def YCoCg_to_RGB(YCoCg): """ Converts an array of *YCoCg* colour encoding values to the corresponding *R'G'B'* values array. Parameters ---------- YCoCg : array_like *YCoCg* colour encoding array. Returns ------- ndarray Output *R'G'B'* array. References ---------- :cite:`Malvar2003` Examples -------- >>> YCoCg_to_RGB(np.array([1.0, 0.0, 0.0])) array([ 1., 1., 1.]) >>> YCoCg_to_RGB(np.array([0.5625, 0.125, -0.0625])) array([ 0.75, 0.5 , 0.5 ]) """ return dot_vector(YCOCG_TO_RGB_MATRIX, YCoCg)
[ "thomas.mansencal@gmail.com" ]
thomas.mansencal@gmail.com
4c54d59e42900cfb57b6bc8ccdda606828c9490e
177cf1fb99de1a09ac92507f336c49dbb4dd05ae
/scrape/spatula/pages.py
da2191049105f8c599a51f046e5f85ca8fdf23bc
[ "CC0-1.0", "LicenseRef-scancode-public-domain" ]
permissive
brianhlin/people
9574746c37d850ac3aa6b629be598293497cd67b
1e62124c24feafe26437c344aa5a5bb1de00c740
refs/heads/main
2023-02-19T05:17:18.351344
2021-01-08T20:38:22
2021-01-08T20:38:22
328,417,651
0
0
null
2021-01-10T15:41:06
2021-01-10T15:41:05
null
UTF-8
Python
false
false
3,186
py
import lxml.html from .sources import URL class Page: source = None dependencies = {} def _fetch_data(self, scraper): # process dependencies first for val, dep in self.dependencies.items(): dep._fetch_data(scraper) setattr(self, val, dep.get_data()) if not self.source: if hasattr(self, "get_source_from_input"): self.source = self.get_source_from_input() else: raise Exception( f"{self.__class__.__name__} has no source or get_source_from_input" ) print(f"fetching {self.source} for {self.__class__.__name__}") data = self.source.get_data(scraper) self.set_raw_data(data) def __init__(self, input_val=None): """ a Page can be instantiated with a url & options (TBD) needed to fetch it """ self.input = input_val # TODO: special case, maybe __url__ or something? if isinstance(input_val, dict) and "url" in input_val: self.source = URL(input_val["url"]) if hasattr(input_val, "url"): self.source = URL(input_val.url) def set_raw_data(self, raw_data): """ callback to handle raw data returned by grabbing the URL """ self.raw_data = raw_data def get_data(self): """ return data extracted from this page and this page alone """ raise NotImplementedError() class HtmlPage(Page): def set_raw_data(self, raw_data): super().set_raw_data(raw_data) self.root = lxml.html.fromstring(raw_data) if hasattr(self.source, "url"): self.root.make_links_absolute(self.source.url) class ListPage(Page): class SkipItem(Exception): pass def skip(self): raise self.SkipItem() # TODO # class CSVListPage(ListPage): # def get_data(self): # print(self.raw_data) # for item in items: # try: # item = self.process_item(item) # except self.SkipItem: # continue # yield item # def process_item(self, item): # return item class HtmlListPage(ListPage, HtmlPage): """ Simplification for HTML pages that get a list of items and process them. When overriding the class, instead of providing get_data, one must only provide a selector and a process_item function. """ selector = None # common for a list page to only work on one URL, in which case it is more clear # to set it as a property def __init__(self, url=None): """ a Page can be instantiated with a url & options (TBD) needed to fetch it """ if url is not None: self.url = url def get_data(self): if not self.selector: raise NotImplementedError("must either provide selector or override scrape") items = self.selector.match(self.root) for item in items: try: item = self.process_item(item) except self.SkipItem: continue yield item def process_item(self, item): return item
[ "dev@jamesturk.net" ]
dev@jamesturk.net
a75b54c62dc1b03dc4355d30db6af0896bd501f9
6de1fdf1de71e82e0a1af2ac4f6647444c986641
/django/phishmon/phishmon/views.py
ef3a471dd64f50c3a34fc42f281f4edebf468be1
[]
no_license
Epul-94/proyecto
43fc3597800c0058176232487eace4830768b602
8955f3c2c477734568e399db2a37f66e177baa6c
refs/heads/master
2020-03-19T05:25:01.837551
2018-06-03T18:15:22
2018-06-03T18:15:22
135,928,444
0
0
null
null
null
null
UTF-8
Python
false
false
818
py
from django.http import HttpResponse from django.shortcuts import render from .models import Codigoestadohistorico, SitiosPhishing, Ipwhois, Email def home(request): return render(request,"index.html") def monito(request): sph = SitiosPhishing.objects.all.filter(estatus='no reportado').order_by('id_sitio').first() print sph # ceh = Codigoestadohistorico.objects.order_by('') # return render(request,"monitor.html",{'Codigoestadohistorico':ceh, 'SitiosPhishing': sph, 'Ipwhois': ipwho, 'Email':email}) return render(request, "monitor.html".{'SitiosPhishing':sph}) def historico(request): return render(request,"historico.html") def reportes(request): return render(request,"reportes.html") def verifica(request): return render(request,"verifica.html") def monito_list(request): return render(request, )
[ "root@debian" ]
root@debian
0cccbf0a4dcf64cd3c945f7cc81b9807fb27b8cb
ca7aa979e7059467e158830b76673f5b77a0f5a3
/Python_codes/p03700/s833680310.py
fa2a25e2949cdb3ab5391ac4d929463210e52564
[]
no_license
Aasthaengg/IBMdataset
7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901
f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8
refs/heads/main
2023-04-22T10:22:44.763102
2021-05-13T17:27:22
2021-05-13T17:27:22
367,112,348
0
0
null
null
null
null
UTF-8
Python
false
false
339
py
n, a, b = map(int, input().split()) h = [int(input()) for _ in range(n)] l = 0 r = 10 ** 10 c = a - b while l + 1 != r: m = (l + r) // 2 tmp = 0 for i in range(n): if h[i] > b * m: tmp += ((h[i] - b * m) // c + (1 if (h[i] - b * m) % c else 0)) if tmp > m: l = m else: r = m print(r)
[ "66529651+Aastha2104@users.noreply.github.com" ]
66529651+Aastha2104@users.noreply.github.com
443c0cd2ecc6702824402355487e2b3df269ce6a
e3365bc8fa7da2753c248c2b8a5c5e16aef84d9f
/indices/lycurgu.py
fdc054334b5dadbd551701ab864def514d4d888a
[]
no_license
psdh/WhatsintheVector
e8aabacc054a88b4cb25303548980af9a10c12a8
a24168d068d9c69dc7a0fd13f606c080ae82e2a6
refs/heads/master
2021-01-25T10:34:22.651619
2015-09-23T11:54:06
2015-09-23T11:54:06
42,749,205
2
3
null
2015-09-23T11:54:07
2015-09-18T22:06:38
Python
UTF-8
Python
false
false
279
py
ii = [('SadlMLP.py', 8), ('WilkJMC3.py', 3), ('WilkJMC2.py', 1), ('CookGHP2.py', 1), ('MarrFDI2.py', 5), ('LandWPA.py', 2), ('WestJIT2.py', 3), ('FerrSDO2.py', 1), ('GodwWLN.py', 2), ('BentJRP.py', 1), ('WilbRLW3.py', 1), ('JacoWHI.py', 1), ('SadlMLP2.py', 2), ('WaylFEP.py', 2)]
[ "prabhjyotsingh95@gmail.com" ]
prabhjyotsingh95@gmail.com
64daf39edee03462cd72b0132960043675cf120d
18d51ac0a6ca14c8221c26f0dacd8d3721ca28e9
/prset2-2.py
b59271f810016dca44f4f63a3ee620b00d033379
[]
no_license
mahakalai/mahak
05f96d52880ed7b2e5eb70dd1dbf14fc533236e8
613be9df7743ef59b1f0e07b7df987d29bb23ec7
refs/heads/master
2020-04-15T05:01:58.541930
2019-07-15T16:28:32
2019-07-15T16:28:32
164,406,486
0
2
null
null
null
null
UTF-8
Python
false
false
219
py
n,q=map(int,input().split()) l=[int(x) for x in input().split()] l1=[] for i in range(0,q): l2=[int(x) for x in input().split()] l1.append(l2) for i in range(0,q): m=l1[i][0] n=l1[i][1] l3=l[m-1:n] print(sum(l3))
[ "noreply@github.com" ]
mahakalai.noreply@github.com
1cf0614c2d36b96c0fe09b5e2261b03e65a76372
d037002f9d2b383ef84686bbb9843dac8ee4bed7
/tutorials/DuelingDQN/arguments.py
6adb435909f0337931676055ae5982b241dd9146
[ "MIT" ]
permissive
ICSL-hanyang/Code_With_RL
4edb23ca24c246bb8ec75fcf445d3c68d6c40b6d
1378996e6bf6da0a96e9c59f1163a635c20b3c06
refs/heads/main
2023-08-15T18:37:57.689950
2021-10-18T07:31:59
2021-10-18T07:31:59
392,944,467
0
0
null
2021-08-05T07:20:57
2021-08-05T07:20:56
null
UTF-8
Python
false
false
2,577
py
# Copyright (c) 2021: Zhiyuan Nan (namjw@hanyang.ac.kr). # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. import argparse import torch as T device = T.device('cuda:0' if T.cuda.is_available() else 'cpu') def get_args(): parser = argparse.ArgumentParser("Deep Q Network") parser.add_argument("--device", default=device, help="GPU or CPU") parser.add_argument("--seed", type=int, default=123, help="random seed") parser.add_argument("--env-name", type=str, default="CartPole-v0", help="name of the scenario script") parser.add_argument("--render", type=bool, default=False, help="") parser.add_argument("--time-steps", type=int, default=3000000, help="number of time steps") parser.add_argument("--episode", type=int, default=int(1e6), help="number of episode") parser.add_argument("--critic-lr", type=float, default=1e-3, help="learning rate of critic") parser.add_argument("--hidden-size", type=int, default=128, help="hidden layer units") parser.add_argument("--update-rate", type=int, default=100, help="update rate") parser.add_argument("--max_epsilon", type=float, default=1.0, help="max epsilon") parser.add_argument("--min_epsilon", type=float, default=0.1, help="min epsilon") parser.add_argument("--epsilon_decay", type=float, default=0.0005, help="epsilon decay") parser.add_argument("--gamma", type=float, default=0.99, help="discount factor") parser.add_argument("--tau", type=float, default=0.01, help="parameter for updating the target network") parser.add_argument("--buffer-size", type=int, default=1000, help="number of transitions can be stored in buffer") parser.add_argument("--batch-size", type=int, default=32, help="number of episodes to optimize at the same time") parser.add_argument("--save-dir", type=str, default="./model", help="directory in which training state and model should be saved") parser.add_argument("--save-rate", type=int, default=2000, help="save model once every time this many episodes are completed") parser.add_argument("--model-dir", type=str, default="", help="directory in which training state and model are loaded") parser.add_argument("--evaluate-episodes", type=int, default=10, help="number of episodes for evaluating") parser.add_argument("--evaluate", type=bool, default=False, help="whether to evaluate the model") parser.add_argument("--evaluate-rate", type=int, default=1000, help="how often to evaluate model") return parser.parse_args()
[ "nzy1414117007@gmail.com" ]
nzy1414117007@gmail.com
86754c7633d599806713c66152b4c042dba9c6b3
f07a42f652f46106dee4749277d41c302e2b7406
/Data Set/bug-fixing-5/454dbbb27b55d17c57de7b4ba986b1162a9bf813-<test_symlog>-bug.py
4b4a1cace6659e962a753cb7c52ea165e8431b91
[]
no_license
wsgan001/PyFPattern
e0fe06341cc5d51b3ad0fe29b84098d140ed54d1
cc347e32745f99c0cd95e79a18ddacc4574d7faa
refs/heads/main
2023-08-25T23:48:26.112133
2021-10-23T14:11:22
2021-10-23T14:11:22
null
0
0
null
null
null
null
UTF-8
Python
false
false
331
py
@image_comparison(baseline_images=['symlog']) def test_symlog(): x = np.array([0, 1, 2, 4, 6, 9, 12, 24]) y = np.array([1000000, 500000, 100000, 100, 5, 0, 0, 0]) fig = plt.figure() ax = fig.add_subplot(111) ax.plot(x, y) ax.set_yscale('symlog') ax.set_xscale = 'linear' ax.set_ylim((- 1), 10000000)
[ "dg1732004@smail.nju.edu.cn" ]
dg1732004@smail.nju.edu.cn
da1cf67d7273f6617e8896ca137a04c77be4e01a
9ed964c0fb14494e9685f13570d42aa7aebefa6f
/selfdrive/controls/lib/lateral_mpc/libmpc_py.py
3f92090935c4d1e26f9b2090e4c90b4eeb68c404
[ "MIT" ]
permissive
pjlao307/chffrplus
144d5e8da242d04692b9d949b8774ed809f568a9
dae0dd09d88a87db81ce2fd48f52580eb7b73cc3
refs/heads/release
2021-07-15T06:16:33.734692
2017-10-19T03:35:26
2017-10-19T03:35:26
107,692,678
0
0
null
2017-10-20T15:09:08
2017-10-20T15:09:07
null
UTF-8
Python
false
false
681
py
import os import subprocess from cffi import FFI mpc_dir = os.path.dirname(os.path.abspath(__file__)) libmpc_fn = os.path.join(mpc_dir, "libcommampc.so") subprocess.check_output(["make", "-j4"], cwd=mpc_dir) ffi = FFI() ffi.cdef(""" typedef struct { double x, y, psi, delta, t; } state_t; typedef struct { double x[50]; double y[50]; double psi[50]; double delta[50]; } log_t; void init(); void run_mpc(state_t * x0, log_t * solution, double l_poly[4], double r_poly[4], double p_poly[4], double l_prob, double r_prob, double p_prob, double curvature_factor, double v_ref, double lane_width); """) libmpc = ffi.dlopen(libmpc_fn)
[ "user@comma.ai" ]
user@comma.ai
7f666ea7c97ea37ab15a3f83444aeac9d6483d87
f07a42f652f46106dee4749277d41c302e2b7406
/Data Set/bug-fixing-1/88c5c8b3ed1440435a8aeac8186d7ecfc83b97ab-<resize_image_with_pad>-bug.py
60f58affe758c27a4a06caf6b205f7d10b4abe93
[]
no_license
wsgan001/PyFPattern
e0fe06341cc5d51b3ad0fe29b84098d140ed54d1
cc347e32745f99c0cd95e79a18ddacc4574d7faa
refs/heads/main
2023-08-25T23:48:26.112133
2021-10-23T14:11:22
2021-10-23T14:11:22
null
0
0
null
null
null
null
UTF-8
Python
false
false
3,712
py
@tf_export('image.resize_image_with_pad') def resize_image_with_pad(image, target_height, target_width, method=ResizeMethod.BILINEAR): "Resizes and pads an image to a target width and height.\n\n Resizes an image to a target width and height by keeping\n the aspect ratio the same without distortion. If the target\n dimensions don't match the image dimensions, the image\n is resized and then padded with zeroes to match requested\n dimensions.\n\n Args:\n image: 4-D Tensor of shape `[batch, height, width, channels]` or\n 3-D Tensor of shape `[height, width, channels]`.\n target_height: Target height.\n target_width: Target width.\n method: Method to use for resizing image. See `resize_images()`\n\n Raises:\n ValueError: if `target_height` or `target_width` are zero or negative.\n\n Returns:\n Resized and padded image.\n If `images` was 4-D, a 4-D float Tensor of shape\n `[batch, new_height, new_width, channels]`.\n If `images` was 3-D, a 3-D float Tensor of shape\n `[new_height, new_width, channels]`.\n " with ops.name_scope(None, 'resize_image_with_pad', [image]): image = ops.convert_to_tensor(image, name='image') image_shape = image.get_shape() is_batch = True if (image_shape.ndims == 3): is_batch = False image = array_ops.expand_dims(image, 0) elif (image_shape.ndims is None): is_batch = False image = array_ops.expand_dims(image, 0) image.set_shape(([None] * 4)) elif (image_shape.ndims != 4): raise ValueError("'image' must have either 3 or 4 dimensions.") assert_ops = _CheckAtLeast3DImage(image, require_static=False) assert_ops += _assert((target_width > 0), ValueError, 'target_width must be > 0.') assert_ops += _assert((target_height > 0), ValueError, 'target_height must be > 0.') image = control_flow_ops.with_dependencies(assert_ops, image) def max_(x, y): if (_is_tensor(x) or _is_tensor(y)): return math_ops.maximum(x, y) else: return max(x, y) (_, height, width, _) = _ImageDimensions(image, rank=4) f_height = math_ops.cast(height, dtype=dtypes.float64) f_width = math_ops.cast(width, dtype=dtypes.float64) f_target_height = math_ops.cast(target_height, dtype=dtypes.float64) f_target_width = math_ops.cast(target_width, dtype=dtypes.float64) ratio = max_((f_width / f_target_width), (f_height / f_target_height)) resized_height_float = (f_height / ratio) resized_width_float = (f_width / ratio) resized_height = math_ops.cast(math_ops.floor(resized_height_float), dtype=dtypes.int32) resized_width = math_ops.cast(math_ops.floor(resized_width_float), dtype=dtypes.int32) padding_height = ((f_target_height - resized_height_float) / 2) padding_width = ((f_target_width - resized_width_float) / 2) f_padding_height = math_ops.floor(padding_height) f_padding_width = math_ops.floor(padding_width) p_height = max_(0, math_ops.cast(f_padding_height, dtype=dtypes.int32)) p_width = max_(0, math_ops.cast(f_padding_width, dtype=dtypes.int32)) resized = resize_images(image, [resized_height, resized_width], method) padded = pad_to_bounding_box(resized, p_height, p_width, target_height, target_width) if (padded.get_shape().ndims is None): raise ValueError('padded contains no shape.') _ImageDimensions(padded, rank=4) if (not is_batch): padded = array_ops.squeeze(padded, squeeze_dims=[0]) return padded
[ "dg1732004@smail.nju.edu.cn" ]
dg1732004@smail.nju.edu.cn
bc981ca8ee42a2e8cd3057d7c0311152534a8dc6
eb2df6020f5759feee3d6d78c5f8c78999454a09
/scheduled_jobs/niagara4/run_read_meter_points.py
2030f6978f6ebbf395d95c11893cb82798b3433b
[]
no_license
mywork-dragon/dave-energy
7a08f855d245c2d90a9c13aa85fc3b9f28ae9294
4b3430be6ef6957389ab05be3a17a0245f5d6662
refs/heads/master
2023-07-28T02:55:26.791724
2021-09-06T11:44:30
2021-09-06T11:44:30
365,872,455
0
0
null
null
null
null
UTF-8
Python
false
false
863
py
import traceback from config import logger from scheduled_jobs.niagara4.run import Run from scheduled_jobs.niagara4.n4_events_handler import N4EventHandler from common import slack class RunReadMeterPoints(Run): def get_n4_points_sql(self): return '''select pt.id as point_id, pt.path as point_path, pt.name as point_name, ast.name as asset_name, at.name as asset_type_name, pt.tag as tag_name from asset ast INNER JOIN point pt ON ast.id = pt.asset_id INNER JOIN asset_type at ON ast.asset_type_id = at.id where ast.building_id = %s and at.name in ('HVAC', 'Meter') and pt.tag in ('METER', 'METER_EXPORT') ''' if __name__ == '__main__': run_every = RunReadMeterPoints() run_every.copy_n4_values()
[ "dragonblueyounger@gmail.com" ]
dragonblueyounger@gmail.com
4a8bb0e72be3d9bd3f3ae6317741f6c2b5cce534
971c5ae1d87cdfbb97723485c3d76c17395b82b0
/x86-semantics/semantics_using_uifs/z3EquivFormulas/x86-movlhps_xmm_xmm.py
86a53322a07dadd89753423c03078be47b7b8212
[ "NCSA" ]
permissive
mewbak/binary-decompilation
7d0bf64d6cd01bfa5f5fc912d74a85ce81124959
f58da4c53cd823edc4bbbad6b647dbcefd7e64f8
refs/heads/master
2020-04-16T06:08:14.983946
2019-01-06T17:21:50
2019-01-06T17:21:50
165,334,058
1
0
NOASSERTION
2019-01-12T01:42:16
2019-01-12T01:42:16
null
UTF-8
Python
false
false
4,029
py
from z3 import * import proverUtils # Declarations CF = BitVec('CF', 1) PF = BitVec('PF', 1) AF = BitVec('AF', 1) ZF = BitVec('ZF', 1) SF = BitVec('SF', 1) OF = BitVec('OF', 1) RAX = BitVec('RAX', 64) RCX = BitVec('RCX', 64) RDX = BitVec('RDX', 64) ZERO1 = BitVecVal(0, 1) ONE1 = BitVecVal(1, 1) cf = (CF == ONE1) pf = (PF == ONE1) af = (AF == ONE1) zf = (ZF == ONE1) sf = (SF == ONE1) of = (OF == ONE1) undef = BitVecVal(0, 1) cvt_int32_to_single = Function('cvt_int32_to_single', IntSort(), Float32()) # Uninterpreted binary function declaration add_double = Function('add_double', BitVecSort(64), BitVecSort(64), BitVecSort(64)) add_single = Function('add_single', BitVecSort(32), BitVecSort(32), BitVecSort(32)) sub_double = Function('sub_double', BitVecSort(64), BitVecSort(64), BitVecSort(64)) sub_single = Function('sub_single', BitVecSort(32), BitVecSort(32), BitVecSort(32)) mul_double = Function('mul_double', BitVecSort(64), BitVecSort(64), BitVecSort(64)) mul_single = Function('mul_single', BitVecSort(32), BitVecSort(32), BitVecSort(32)) div_double = Function('div_double', BitVecSort(64), BitVecSort(64), BitVecSort(64)) div_single = Function('div_single', BitVecSort(32), BitVecSort(32), BitVecSort(32)) maxcmp_double = Function('maxcmp_double', BitVecSort(64), BitVecSort(64), BitVecSort(1)) maxcmp_single = Function('maxcmp_single', BitVecSort(32), BitVecSort(32), BitVecSort(1)) mincmp_double = Function('mincmp_double', BitVecSort(64), BitVecSort(64), BitVecSort(1)) mincmp_single = Function('mincmp_single', BitVecSort(32), BitVecSort(32), BitVecSort(1)) # Uninterpreted binary function declaration approx_reciprocal_double = Function('approx_reciprocal_double', BitVecSort(64), BitVecSort(64)) approx_reciprocal_single = Function('approx_reciprocal_single', BitVecSort(32), BitVecSort(32)) sqrt_double = Function('sqrt_double', BitVecSort(64), BitVecSort(64)) sqrt_single = Function('sqrt_single', BitVecSort(32), BitVecSort(32)) approx_reciprocal_sqrt_double = Function('approx_reciprocal_sqrt_double_double', BitVecSort(64), BitVecSort(64)) approx_reciprocal_sqrt_single = Function('approx_reciprocal_sqrt_double_single', BitVecSort(32), BitVecSort(32)) cvt_single_to_double = Function('cvt_single_to_double', BitVecSort(32), BitVecSort(64)) cvt_single_to_int32 = Function('cvt_single_to_int32', BitVecSort(32), BitVecSort(32)) cvt_single_to_int64 = Function('cvt_single_to_int64', BitVecSort(32), BitVecSort(64)) cvt_int32_to_single = Function('cvt_int32_to_single', BitVecSort(32), BitVecSort(32)) cvt_int32_to_double = Function('cvt_int32_to_double', BitVecSort(32), BitVecSort(64)) # Uninterpreted ternary function declaration vfmadd132_double = Function('vfmadd132_double', BitVecSort(64), BitVecSort(64), BitVecSort(64), BitVecSort(64)) vfmadd132_single = Function('vfmadd132_single', BitVecSort(32), BitVecSort(32), BitVecSort(32), BitVecSort(32)) vfmsub132_double = Function('vfmsub132_double', BitVecSort(64), BitVecSort(64), BitVecSort(64), BitVecSort(64)) vfmsub132_single = Function('vfmsub132_single', BitVecSort(32), BitVecSort(32), BitVecSort(32), BitVecSort(32)) vfnmadd132_double = Function('vfnmadd132_double', BitVecSort(64), BitVecSort(64), BitVecSort(64), BitVecSort(64)) vfnmadd132_single = Function('vfnmadd132_single', BitVecSort(32), BitVecSort(32), BitVecSort(32), BitVecSort(32)) vfnmsub132_double = Function('vfnmsub132_double', BitVecSort(64), BitVecSort(64), BitVecSort(64), BitVecSort(64)) vfnmsub132_single = Function('vfnmsub132_single', BitVecSort(32), BitVecSort(32), BitVecSort(32), BitVecSort(32)) print('' + 'Opcode:movlhps_xmm_xmm' + '') R1 = BitVec('R1', 256) R2 = BitVec('R2', 256) PK_R2 = (Concat(Extract( R2.size() - 0 - 1, R2.size() - 128, R2 ) , Concat(Extract( R1.size() - 192 - 1, R1.size() - 256, R1 ) , Extract( R2.size() - 192 - 1, R2.size() - 256, R2 ) )) ) PS_R2 = (Concat((Extract (255, 128, ((R2)))), (Concat((Extract (63, 0, ((R1)))), (Extract (63, 0, ((R2)))))))) proverUtils.prove( PK_R2 == PS_R2 )
[ "sdasgup3@illinois.edu" ]
sdasgup3@illinois.edu
a3dd7063c42f87059ff0734aa6184d0fe693d10a
c02369e1ebeb99f1d59b767fe180a383759ce38e
/object_conversions/python/conversion_to_histo.py
d79173836980faf7c6c14a48a54432aeb4f41b8b
[]
no_license
jbsauvan/L1T-Utilities
0ed51b88ab31963463277eae85c8b7fccc595f17
4600200f990f63e9d5f5b401b282d7adb37b2f4d
refs/heads/master
2021-01-16T20:50:38.979533
2016-07-13T13:51:32
2016-07-13T13:51:32
62,325,564
0
0
null
2016-06-30T16:17:27
2016-06-30T16:17:27
null
UTF-8
Python
false
false
792
py
from rootpy.plotting import Hist2D # 'function' must be able to take an array of (2D) array as input def function2th2(function, binsx, binsy, titlex='', titley=''): histo = Hist2D(*(binsx+binsy)) histo.SetXTitle(titlex) histo.SetYTitle(titley) # Prepare array of inputs, one entry for each bin values = [] for bx in histo.bins_range(0): x = histo.GetXaxis().GetBinCenter(bx) for by in histo.bins_range(1): y = histo.GetYaxis().GetBinCenter(by) values.append([x,y]) # Call function for each value results = function(values) for result,value in zip(results, values): bx = histo.GetXaxis().FindBin(value[0]) by = histo.GetYaxis().FindBin(value[1]) histo[bx,by].value = result return histo
[ "jean-baptiste.sauvan@cern.ch" ]
jean-baptiste.sauvan@cern.ch
fd07c7d1bdc76fcbee5db9d0e881bf4321f4f0ab
33d95a2e5222f1ab9993480a8bdc354aa6dc672f
/game/migrations/0005_darkdieroll_fate_points.py
3ee7161af0d937ac468c2220d2fb67e60fcce10f
[]
no_license
JackSnowdon/die-master
ab3eb7b1dbbe8b16031515c09b843aaba879aef5
d0af9fb8d6851904d466165d190dc9ec3700f2fd
refs/heads/master
2023-07-29T13:20:18.171612
2020-06-19T18:27:56
2020-06-19T18:27:56
265,283,325
0
0
null
2021-09-22T19:14:04
2020-05-19T15:16:26
Python
UTF-8
Python
false
false
533
py
# Generated by Django 3.0.6 on 2020-06-02 16:41 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('game', '0004_auto_20200522_1754'), ] operations = [ migrations.AddField( model_name='darkdieroll', name='fate_points', field=models.PositiveIntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100)]), ), ]
[ "jacksnowdondrums@gmail.com" ]
jacksnowdondrums@gmail.com
4d8a740f2425a882dbbcd033a0b302aa265db11d
3fe272eea1c91cc5719704265eab49534176ff0d
/scripts/field/lightning_tuto_13_0.py
40c852ba5cc3187275d8a0d5513fed44b2a3ff09
[ "MIT" ]
permissive
Bratah123/v203.4
e72be4843828def05592298df44b081515b7ca68
9cd3f31fb2ef251de2c5968c75aeebae9c66d37a
refs/heads/master
2023-02-15T06:15:51.770849
2021-01-06T05:45:59
2021-01-06T05:45:59
316,366,462
1
0
MIT
2020-12-18T17:01:25
2020-11-27T00:50:26
Java
UTF-8
Python
false
false
502
py
# Created by MechAviv # ID :: [910141060] # Hidden Street : The Frenzy sm.reservedEffect("Effect/Direction8.img/lightningTutorial2/Scene4") sm.sendDelay(10000) sm.setTemporarySkillSet(0) sm.setInGameDirectionMode(False, True, False, False) # Unhandled User Effect [PlaySoundWithMuteBGM] Packet: 23 11 00 4D 69 6E 69 47 61 6D 65 2E 69 6D 67 2F 4F 70 65 6E # Unhandled Message [47] Packet: 2F 01 00 00 00 B0 83 08 00 00 00 00 00 2E 02 00 00 00 00 00 80 05 BB 46 E6 17 02 00 00 sm.warp(910141030, 0)
[ "pokesmurfuwu@gmail.com" ]
pokesmurfuwu@gmail.com
66f5818bf49f9b2f75b321768a98f06eedf0e493
b7f3edb5b7c62174bed808079c3b21fb9ea51d52
/components/viz/service/frame_sinks/DEPS
93c434996fdedd3564cd4da8b83f221ddc3502d0
[ "BSD-3-Clause" ]
permissive
otcshare/chromium-src
26a7372773b53b236784c51677c566dc0ad839e4
64bee65c921db7e78e25d08f1e98da2668b57be5
refs/heads/webml
2023-03-21T03:20:15.377034
2020-11-16T01:40:14
2020-11-16T01:40:14
209,262,645
18
21
BSD-3-Clause
2023-03-23T06:20:07
2019-09-18T08:52:07
null
UTF-8
Python
false
false
555
# Please consult components/viz/README.md about allowable dependencies. include_rules = [ "+cc/base", "+cc/scheduler", "+components/viz/service/display", "+components/viz/service/display_embedder", "+components/viz/service/hit_test", "+components/viz/service/surfaces", "+gpu/ipc/common", "+mojo/public", ] specific_include_rules = { ".*unittest\.cc": [ "+third_party/khronos/GLES2", ], "external_begin_frame_source_android.cc": [ "+components/viz/service/service_jni_headers/ExternalBeginFrameSourceAndroid_jni.h", ], }
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
5639d463d2f4c33b95fd48aa52bd71d7e45ddf75
f576f0ea3725d54bd2551883901b25b863fe6688
/sdk/eventhub/azure-mgmt-eventhub/generated_samples/schema_registry_delete.py
5bd620cf6b1f8f12b53fc5ec98efd552c094664b
[ "MIT", "LicenseRef-scancode-generic-cla", "LGPL-2.1-or-later" ]
permissive
Azure/azure-sdk-for-python
02e3838e53a33d8ba27e9bcc22bd84e790e4ca7c
c2ca191e736bb06bfbbbc9493e8325763ba990bb
refs/heads/main
2023-09-06T09:30:13.135012
2023-09-06T01:08:06
2023-09-06T01:08:06
4,127,088
4,046
2,755
MIT
2023-09-14T21:48:49
2012-04-24T16:46:12
Python
UTF-8
Python
false
false
1,639
py
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from azure.identity import DefaultAzureCredential from azure.mgmt.eventhub import EventHubManagementClient """ # PREREQUISITES pip install azure-identity pip install azure-mgmt-eventhub # USAGE python schema_registry_delete.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET. For more info about how to get the value, please see: https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal """ def main(): client = EventHubManagementClient( credential=DefaultAzureCredential(), subscription_id="e8baea74-64ce-459b-bee3-5aa4c47b3ae3", ) response = client.schema_registry.delete( resource_group_name="alitest", namespace_name="ali-ua-test-eh-system-1", schema_group_name="testSchemaGroup1", ) print(response) # x-ms-original-file: specification/eventhub/resource-manager/Microsoft.EventHub/stable/2021-11-01/examples/SchemaRegistry/SchemaRegistryDelete.json if __name__ == "__main__": main()
[ "noreply@github.com" ]
Azure.noreply@github.com
1372dd8b5bb2b49800e661ea8d623914fb688d43
f5fbdd32b189428dfa15a6545cb4eeca3103f75d
/ScriptLsts/CountryCodes/SaintVincentAndGrenadines.lst
2f1842d725edb90d6cfa6a9db77f1af9c033c957
[ "WTFPL" ]
permissive
bast69/piholeparser
711bbbf3498e5ec3edda62210fb9f97dd7ea9638
55ba208a6ad3e83d2c7c3823c41fede64b6a9f34
refs/heads/master
2023-05-04T23:06:04.511010
2021-05-25T03:37:53
2021-05-25T03:37:53
223,371,653
1
0
WTFPL
2019-11-25T10:19:22
2019-11-22T09:41:43
Shell
UTF-8
Python
false
false
3
lst
vc
[ "sam@deathbybandaid.net" ]
sam@deathbybandaid.net
35135a73f723dbed0d3c25b356fcb0f60b41890f
d039da1c0b99e2642d3c354de9faa6f427141ee3
/problems/leetcode/LargestRectangleinHistogram.py
8bcff46e2f705aa31b50d539325cc64efb60c878
[ "MIT" ]
permissive
qicst23/pyshua
5a3e317823d0620d2034adfe345eddd6a722c7ff
4ae7bb8b626f233ebc2267024ba67dcfe49051ed
refs/heads/master
2016-09-15T20:26:16.694738
2013-12-15T04:50:04
2013-12-15T04:50:04
15,198,867
2
1
null
null
null
null
UTF-8
Python
false
false
974
py
from problems.leetcode.LeetcodeProblem import LeetcodeProblem class LargestRectangleinHistogram(LeetcodeProblem): def solve(self, height): height.append(0) n = len(height) res = 0 stack = [] i = 0 while i < n: if not stack or height[i] >= height[stack[-1]]: stack.append(i) i += 1 else: h = height[stack.pop()] w = i - (stack[-1] if stack else -1) - 1 area = h * w if res < area: res = area return res def verify(self, original_input, input, s1, s2): return s1 == s2 def input(self): from Parser import parseIntArray return parseIntArray(open(self.inputPath)) def output(self): from Parser import parseOneInt for o in parseOneInt(open(self.outputPath)): yield o[0] problem = LargestRectangleinHistogram
[ "baidingding7@gmail.com" ]
baidingding7@gmail.com
54732a91ba0583ea31a7d6dc03a547a7e4f68903
a8769709aeb7299fa3757f0e7bba5c617eb8cfe3
/lesson-3/k8s/lib/python2.7/site-packages/kubernetes/client/models/v1beta1_subject_access_review_spec.py
2f6dce1443e4553f42d2bd0340beaeed063f3616
[ "Apache-2.0" ]
permissive
simox-83/workshop-k8s
2ac5e8b282bb7c3337acc726a7d972717bf649cc
04cb18e8b5925a3cfd84ca316952a6cb64960b31
refs/heads/master
2020-03-31T20:52:21.421995
2018-10-11T14:43:08
2018-10-11T14:43:08
152,558,678
0
0
Apache-2.0
2018-10-11T08:37:20
2018-10-11T08:37:20
null
UTF-8
Python
false
false
8,264
py
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.11.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class V1beta1SubjectAccessReviewSpec(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'extra': 'dict(str, list[str])', 'group': 'list[str]', 'non_resource_attributes': 'V1beta1NonResourceAttributes', 'resource_attributes': 'V1beta1ResourceAttributes', 'uid': 'str', 'user': 'str' } attribute_map = { 'extra': 'extra', 'group': 'group', 'non_resource_attributes': 'nonResourceAttributes', 'resource_attributes': 'resourceAttributes', 'uid': 'uid', 'user': 'user' } def __init__(self, extra=None, group=None, non_resource_attributes=None, resource_attributes=None, uid=None, user=None): """ V1beta1SubjectAccessReviewSpec - a model defined in Swagger """ self._extra = None self._group = None self._non_resource_attributes = None self._resource_attributes = None self._uid = None self._user = None self.discriminator = None if extra is not None: self.extra = extra if group is not None: self.group = group if non_resource_attributes is not None: self.non_resource_attributes = non_resource_attributes if resource_attributes is not None: self.resource_attributes = resource_attributes if uid is not None: self.uid = uid if user is not None: self.user = user @property def extra(self): """ Gets the extra of this V1beta1SubjectAccessReviewSpec. Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. :return: The extra of this V1beta1SubjectAccessReviewSpec. :rtype: dict(str, list[str]) """ return self._extra @extra.setter def extra(self, extra): """ Sets the extra of this V1beta1SubjectAccessReviewSpec. Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. :param extra: The extra of this V1beta1SubjectAccessReviewSpec. :type: dict(str, list[str]) """ self._extra = extra @property def group(self): """ Gets the group of this V1beta1SubjectAccessReviewSpec. Groups is the groups you're testing for. :return: The group of this V1beta1SubjectAccessReviewSpec. :rtype: list[str] """ return self._group @group.setter def group(self, group): """ Sets the group of this V1beta1SubjectAccessReviewSpec. Groups is the groups you're testing for. :param group: The group of this V1beta1SubjectAccessReviewSpec. :type: list[str] """ self._group = group @property def non_resource_attributes(self): """ Gets the non_resource_attributes of this V1beta1SubjectAccessReviewSpec. NonResourceAttributes describes information for a non-resource access request :return: The non_resource_attributes of this V1beta1SubjectAccessReviewSpec. :rtype: V1beta1NonResourceAttributes """ return self._non_resource_attributes @non_resource_attributes.setter def non_resource_attributes(self, non_resource_attributes): """ Sets the non_resource_attributes of this V1beta1SubjectAccessReviewSpec. NonResourceAttributes describes information for a non-resource access request :param non_resource_attributes: The non_resource_attributes of this V1beta1SubjectAccessReviewSpec. :type: V1beta1NonResourceAttributes """ self._non_resource_attributes = non_resource_attributes @property def resource_attributes(self): """ Gets the resource_attributes of this V1beta1SubjectAccessReviewSpec. ResourceAuthorizationAttributes describes information for a resource access request :return: The resource_attributes of this V1beta1SubjectAccessReviewSpec. :rtype: V1beta1ResourceAttributes """ return self._resource_attributes @resource_attributes.setter def resource_attributes(self, resource_attributes): """ Sets the resource_attributes of this V1beta1SubjectAccessReviewSpec. ResourceAuthorizationAttributes describes information for a resource access request :param resource_attributes: The resource_attributes of this V1beta1SubjectAccessReviewSpec. :type: V1beta1ResourceAttributes """ self._resource_attributes = resource_attributes @property def uid(self): """ Gets the uid of this V1beta1SubjectAccessReviewSpec. UID information about the requesting user. :return: The uid of this V1beta1SubjectAccessReviewSpec. :rtype: str """ return self._uid @uid.setter def uid(self, uid): """ Sets the uid of this V1beta1SubjectAccessReviewSpec. UID information about the requesting user. :param uid: The uid of this V1beta1SubjectAccessReviewSpec. :type: str """ self._uid = uid @property def user(self): """ Gets the user of this V1beta1SubjectAccessReviewSpec. User is the user you're testing for. If you specify \"User\" but not \"Group\", then is it interpreted as \"What if User were not a member of any groups :return: The user of this V1beta1SubjectAccessReviewSpec. :rtype: str """ return self._user @user.setter def user(self, user): """ Sets the user of this V1beta1SubjectAccessReviewSpec. User is the user you're testing for. If you specify \"User\" but not \"Group\", then is it interpreted as \"What if User were not a member of any groups :param user: The user of this V1beta1SubjectAccessReviewSpec. :type: str """ self._user = user 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 """ if not isinstance(other, V1beta1SubjectAccessReviewSpec): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """ Returns true if both objects are not equal """ return not self == other
[ "simone.dandreta@concur.com" ]
simone.dandreta@concur.com
f06390f4aa8e80e49b7ba4a92cfa1fc42113c66f
d9f4b0a788d39655e29993756aedf3f11bf9086c
/practice/solve.py
68ce083b81ffb14c0b63464e482f038cccf4df83
[]
no_license
OmarTahoun/competitive-programming
07a9123f195c87945c6e56b1d0a3c6fba805d946
3b3a4348817fce6637d7bd675ce6f62a4fe69cc8
refs/heads/master
2021-08-07T02:45:20.752603
2020-04-30T09:50:40
2020-04-30T09:50:40
164,177,184
0
0
null
null
null
null
UTF-8
Python
false
false
1,159
py
#!/usr/bin/python3 import json import argparse import shutil import subprocess def create_file(id, lang): id = id.strip() lang = lang.strip() problem = problems[int(id.strip())] if(lang.lower() == "cpp"): file_name = problem[0] +"."+ lang.lower() path = r"../Code Forces/CPP/"+file_name default_path = r"../Code Forces/CPP/default.cpp" shutil.copyfile(default_path, path) print(file_name) list_files = subprocess.run(["subl", path], stdout=subprocess.DEVNULL) else: file_name = problem[0] +"."+ lang.lower() path = r"../Code Forces/PY/"+file_name print(file_name) list_files = subprocess.run(["subl", path], stdout=subprocess.DEVNULL) def main(): parser = argparse.ArgumentParser(description="testing") parser.add_argument('-id', dest="id", help = "the id of the problem to update", type = str, required=True) parser.add_argument('-l', dest="lang", help = "the Language the problem was solved with", type = str, required=True) args = parser.parse_args() create_file(args.id, args.lang) if __name__ == '__main__': with open("problems.js", "r") as f: problems = json.load(f) main()
[ "omaraiz489@gmail.com" ]
omaraiz489@gmail.com