content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
expected_output = {
"system_auth_control": False,
"version": 3,
"interfaces": {
"Ethernet1/2": {
"interface": "Ethernet1/2",
"pae": "authenticator",
"port_control": "not auto",
"host_mode": "double host",
"re_authentication": False,
"timeout": {
"quiet_period": 59,
"server_timeout": 29,
"supp_timeout": 29,
"tx_period": 29,
"ratelimit_period": 1,
"re_auth_period": 59,
"time_to_next_reauth": 16,
},
"re_auth_max": 1,
"max_req": 2,
"mac-auth-bypass": True,
"clients": {
"53:ab:de:ff:e5:e5": {
"client": "53:ab:de:ff:e5:e5",
"session": {
"auth_sm_state": "authenticated",
"auth_bend_sm_state": "idle",
"auth_by": "remote",
"reauth_action": "reauthenticate",
},
"auth_method": "eap",
}
},
"port_status": "authorized",
}
},
}
| expected_output = {'system_auth_control': False, 'version': 3, 'interfaces': {'Ethernet1/2': {'interface': 'Ethernet1/2', 'pae': 'authenticator', 'port_control': 'not auto', 'host_mode': 'double host', 're_authentication': False, 'timeout': {'quiet_period': 59, 'server_timeout': 29, 'supp_timeout': 29, 'tx_period': 29, 'ratelimit_period': 1, 're_auth_period': 59, 'time_to_next_reauth': 16}, 're_auth_max': 1, 'max_req': 2, 'mac-auth-bypass': True, 'clients': {'53:ab:de:ff:e5:e5': {'client': '53:ab:de:ff:e5:e5', 'session': {'auth_sm_state': 'authenticated', 'auth_bend_sm_state': 'idle', 'auth_by': 'remote', 'reauth_action': 'reauthenticate'}, 'auth_method': 'eap'}}, 'port_status': 'authorized'}}} |
# -*- coding: utf-8 -*-
# From http://www.w3.org/WAI/ER/IG/ert/iso639.htm
# ISO 639: 2-letter codes
languages = {
'aa': 'afar',
'ab': 'abkhazian',
'af': 'afrikaans',
'am': 'amharic',
'ar': 'arabic',
'as': 'assamese',
'ay': 'aymara',
'az': 'azerbaijani',
'ba': 'bashkir',
'be': 'byelorussian',
'bg': 'bulgarian',
'bh': 'bihari',
'bi': 'bislama',
'bn': 'bengali',
'bo': 'tibetan',
'br': 'breton',
'ca': 'catalan',
'co': 'corsican',
'cs': 'czech',
'cy': 'welsh',
'da': 'danish',
'de': 'german',
'dz': 'bhutani',
'el': 'greek',
'en': 'english',
'eo': 'esperanto',
'es': 'spanish',
'et': 'estonian',
'eu': 'basque',
'fa': 'persian',
'fi': 'finnish',
'fj': 'fiji',
'fo': 'faeroese',
'fr': 'french',
'fy': 'frisian',
'ga': 'irish',
'gd': 'gaelic',
'gl': 'galician',
'gn': 'guarani',
'gu': 'gujarati',
'ha': 'hausa',
'hi': 'hindi',
'hr': 'croatian',
'hu': 'hungarian',
'hy': 'armenian',
'ia': 'interlingua',
'ie': 'interlingue',
'ik': 'inupiak',
'in': 'indonesian',
'is': 'icelandic',
'it': 'italian',
'iw': 'hebrew',
'ja': 'japanese',
'ji': 'yiddish',
'jw': 'javanese',
'ka': 'georgian',
'kk': 'kazakh',
'kl': 'greenlandic',
'km': 'cambodian',
'kn': 'kannada',
'ko': 'korean',
'ks': 'kashmiri',
'ku': 'kurdish',
'ky': 'kirghiz',
'la': 'latin',
'ln': 'lingala',
'lo': 'laothian',
'lt': 'lithuanian',
'lv': 'latvian',
'mg': 'malagasy',
'mi': 'maori',
'mk': 'macedonian',
'ml': 'malayalam',
'mn': 'mongolian',
'mo': 'moldavian',
'mr': 'marathi',
'ms': 'malay',
'mt': 'maltese',
'my': 'burmese',
'na': 'nauru',
'ne': 'nepali',
'nl': 'dutch',
'no': 'norwegian',
'oc': 'occitan',
'om': 'oromo',
'or': 'oriya',
'pa': 'punjabi',
'pl': 'polish',
'ps': 'pushto',
'pt': 'portuguese',
'qu': 'quechua',
'rm': 'rhaeto-romance',
'rn': 'kirundi',
'ro': 'romanian',
'ru': 'russian',
'rw': 'kinyarwanda',
'sa': 'sanskrit',
'sd': 'sindhi',
'sg': 'sangro',
'sh': 'serbo-croatian',
'si': 'singhalese',
'sk': 'slovak',
'sl': 'slovenian',
'sm': 'samoan',
'sn': 'shona',
'so': 'somali',
'sq': 'albanian',
'sr': 'serbian',
'ss': 'siswati',
'st': 'sesotho',
'su': 'sudanese',
'sv': 'swedish',
'sw': 'swahili',
'ta': 'tamil',
'te': 'tegulu',
'tg': 'tajik',
'th': 'thai',
'ti': 'tigrinya',
'tk': 'turkmen',
'tl': 'tagalog',
'tn': 'setswana',
'to': 'tonga',
'tr': 'turkish',
'ts': 'tsonga',
'tt': 'tatar',
'tw': 'twi',
'uk': 'ukrainian',
'ur': 'urdu',
'uz': 'uzbek',
'vi': 'vietnamese',
'vo': 'volapuk',
'wo': 'wolof',
'xh': 'xhosa',
'yo': 'yoruba',
'zh': 'chinese',
'zu': 'zulu',
} | languages = {'aa': 'afar', 'ab': 'abkhazian', 'af': 'afrikaans', 'am': 'amharic', 'ar': 'arabic', 'as': 'assamese', 'ay': 'aymara', 'az': 'azerbaijani', 'ba': 'bashkir', 'be': 'byelorussian', 'bg': 'bulgarian', 'bh': 'bihari', 'bi': 'bislama', 'bn': 'bengali', 'bo': 'tibetan', 'br': 'breton', 'ca': 'catalan', 'co': 'corsican', 'cs': 'czech', 'cy': 'welsh', 'da': 'danish', 'de': 'german', 'dz': 'bhutani', 'el': 'greek', 'en': 'english', 'eo': 'esperanto', 'es': 'spanish', 'et': 'estonian', 'eu': 'basque', 'fa': 'persian', 'fi': 'finnish', 'fj': 'fiji', 'fo': 'faeroese', 'fr': 'french', 'fy': 'frisian', 'ga': 'irish', 'gd': 'gaelic', 'gl': 'galician', 'gn': 'guarani', 'gu': 'gujarati', 'ha': 'hausa', 'hi': 'hindi', 'hr': 'croatian', 'hu': 'hungarian', 'hy': 'armenian', 'ia': 'interlingua', 'ie': 'interlingue', 'ik': 'inupiak', 'in': 'indonesian', 'is': 'icelandic', 'it': 'italian', 'iw': 'hebrew', 'ja': 'japanese', 'ji': 'yiddish', 'jw': 'javanese', 'ka': 'georgian', 'kk': 'kazakh', 'kl': 'greenlandic', 'km': 'cambodian', 'kn': 'kannada', 'ko': 'korean', 'ks': 'kashmiri', 'ku': 'kurdish', 'ky': 'kirghiz', 'la': 'latin', 'ln': 'lingala', 'lo': 'laothian', 'lt': 'lithuanian', 'lv': 'latvian', 'mg': 'malagasy', 'mi': 'maori', 'mk': 'macedonian', 'ml': 'malayalam', 'mn': 'mongolian', 'mo': 'moldavian', 'mr': 'marathi', 'ms': 'malay', 'mt': 'maltese', 'my': 'burmese', 'na': 'nauru', 'ne': 'nepali', 'nl': 'dutch', 'no': 'norwegian', 'oc': 'occitan', 'om': 'oromo', 'or': 'oriya', 'pa': 'punjabi', 'pl': 'polish', 'ps': 'pushto', 'pt': 'portuguese', 'qu': 'quechua', 'rm': 'rhaeto-romance', 'rn': 'kirundi', 'ro': 'romanian', 'ru': 'russian', 'rw': 'kinyarwanda', 'sa': 'sanskrit', 'sd': 'sindhi', 'sg': 'sangro', 'sh': 'serbo-croatian', 'si': 'singhalese', 'sk': 'slovak', 'sl': 'slovenian', 'sm': 'samoan', 'sn': 'shona', 'so': 'somali', 'sq': 'albanian', 'sr': 'serbian', 'ss': 'siswati', 'st': 'sesotho', 'su': 'sudanese', 'sv': 'swedish', 'sw': 'swahili', 'ta': 'tamil', 'te': 'tegulu', 'tg': 'tajik', 'th': 'thai', 'ti': 'tigrinya', 'tk': 'turkmen', 'tl': 'tagalog', 'tn': 'setswana', 'to': 'tonga', 'tr': 'turkish', 'ts': 'tsonga', 'tt': 'tatar', 'tw': 'twi', 'uk': 'ukrainian', 'ur': 'urdu', 'uz': 'uzbek', 'vi': 'vietnamese', 'vo': 'volapuk', 'wo': 'wolof', 'xh': 'xhosa', 'yo': 'yoruba', 'zh': 'chinese', 'zu': 'zulu'} |
#FileExample2.py ----Writing data to file
#opening file in write mode
fp = open("info.dat",'w')
#Writing data to file
fp.write("Hello Suprit this is Python")
#Check message
print("Data Inserted to file Successfully!\nPlease Verify.")
| fp = open('info.dat', 'w')
fp.write('Hello Suprit this is Python')
print('Data Inserted to file Successfully!\nPlease Verify.') |
class EnvVariableFile(object):
T_WORK = '/ade/kgurupra_dte8028/oracle/work/build_run_robot1/../'
VIEW_ROOT = '/ade/kgurupra_dte8028'
BROWSERTYPE = 'firefox' ########################For OID info################################################
OID_HOST = 'slc06xgk.us.oracle.com'
OID_PORT = '15635'
OID_SSL_PORT = '22718'
OID_ADMIN = 'cn=orcladmin'
OID_ADMIN_PASSWORD = 'welcome1'
# # ########################For OHS&WG info################################################
# OHS_HOST = 'idmr2ps3.us.oracle.com'
# OHS_INSTANCE_HOME = '/scratch/amywork/ohs9743/user_projects/domains/OHSDomain_standa2'
# OHS_COMPONENT_NAME = 'standal_ohs2'
# OHS_MW_HOME = '/scratch/amywork/ohs9743'
# OHS_WL_HOME = '/scratch/amywork/ohs9743/wlserver'
# OHS_COMMON_ORACLE_HOME = '/scratch/amywork/ohs9743/oracle_common'
# OHS_ADMIN_PORT = '1111'
# OHS_LISTEN_PORT = '23191'
# OHS_SSL_LISTEN_PORT = '3333'
# OHS_WLS_PWD = 'welcome1'
# WEBGATE_ID = 'oam_12wg149'
# OHS_WG_INST_HOME = '/scratch/amywork/ohs9743/user_projects/domains/OHSDomain_standa2/config/fmwconfig/components/OHS/instances/standal_ohs2/webgate/config'
# OHS_INSTANCE_NM_START = '/scratch/amywork/ohs9743/user_projects/domains/OHSDomain_standa2/bin/startNodeManager.sh'
# OHS_INSTANCE_NM_STOP = '/scratch/amywork/ohs9743/user_projects/domains/OHSDomain_standa2/bin/stopNodeManager.sh'
# OHS_INSTANCE_BIN_START = '/scratch/amywork/ohs9743/user_projects/domains/OHSDomain_standa2/bin/startComponent.sh'
# OHS_INSTANCE_BIN_STOP = '/scratch/amywork/ohs9743/user_projects/domains/OHSDomain_standa2/bin/stopComponent.sh'
# OHS_INSTANCE_BIN_START_CMD = '/scratch/amywork/ohs9743/user_projects/domains/OHSDomain_standa2/bin/startComponent.sh standal_ohs2'
# OHS_INSTANCE_BIN_STOP_CMD = '/scratch/amywork/ohs9743/user_projects/domains/OHSDomain_standa2/bin/stopComponent.sh standal_ohs2'
# RESOURCE_URL = 'http://slc03sfc.us.oracle.com:2222/index.html'
# RESOURCE_APPURL = 'http://slc03sfc.us.oracle.com:2222/app1/pages/Sample.jsp'
#
# ########################For OAM sever info################################################
OHS_HOST = 'den00rum.us.oracle.com'
OHS_INSTANCE_HOME = '/scratch/kgurupra/A1/ohs3941/user_projects/domains/OHSDomain_standa2'
OHS_COMPONENT_NAME = 'standal_ohs2'
OHS_MW_HOME = '/scratch/kgurupra/A1/ohs3941'
OHS_WL_HOME = '/scratch/kgurupra/A1/ohs3941/wlserver'
OHS_COMMON_ORACLE_HOME = '/scratch/kgurupra/A1/ohs3941/oracle_common'
OHS_ADMIN_PORT = '1111'
OHS_LISTEN_PORT = '7777'
OHS_SSL_LISTEN_PORT = '3333'
OHS_WLS_PWD = 'welcome1'
WEBGATE_ID = 'oam_12wg3697'
OHS_WG_INST_HOME = '/scratch/kgurupra/A1/ohs3941/user_projects/domains/OHSDomain_standa2/config/fmwconfig/components/OHS/instances/standal_ohs2/webgate/config'
OHS_INSTANCE_NM_START = '/scratch/kgurupra/A1/ohs3941/user_projects/domains/OHSDomain_standa2/bin/startNodeManager.sh'
OHS_INSTANCE_NM_STOP = '/scratch/kgurupra/A1/ohs3941/user_projects/domains/OHSDomain_standa2/bin/stopNodeManager.sh'
OHS_INSTANCE_BIN_START = '/scratch/kgurupra/A1/ohs3941/user_projects/domains/OHSDomain_standa2/bin/startComponent.sh'
OHS_INSTANCE_BIN_STOP = '/scratch/kgurupra/A1/ohs3941/user_projects/domains/OHSDomain_standa2/bin/stopComponent.sh'
OHS_INSTANCE_BIN_START_CMD = '/scratch/kgurupra/A1/ohs3941/user_projects/domains/OHSDomain_standa2/bin/startComponent.sh standal_ohs2'
OHS_INSTANCE_BIN_STOP_CMD = '/scratch/kgurupra/A1/ohs3941/user_projects/domains/OHSDomain_standa2/bin/stopComponent.sh standal_ohs2'
RESOURCE_URL = 'http://den02mpu.us.oracle.com:2222/index.html'
RESOURCE_APPURL = 'http://den02mpu.us.oracle.com:2222/app1/pages/Sample.jsp'
# ########################For OHS&WG info################################################
OAM_ADMSERVER_HOST = 'den00rum.us.oracle.com'
OAM_ADMSERVER_PORT = '7001'
OAM_ADMSERVER_SSLPORT = '23009'
OAM_MNGSERVER_PORT = '14100'
OAM_MNGSERVER_SSLPORT = '20261'
OAM_MNGSERVER_NAME = 'oam_server1'
OAM_ADMIN_USER = 'weblogic'
OAM_ADMIN_PWD = 'welcome1'
OAM_WLS_USER = 'weblogic'
OAM_WLS_PWD = 'welcome1'
OAM_MW_HOME = '/scratch/kgurupra/A1/mw5470'
OAM_ORACLE_HOME = '/scratch/kgurupra/A1/mw5470/idm'
OAM_DOMAIN_HOME = '/scratch/kgurupra/A1/mw5470/user_projects/domains/WLS_IDM'
OAM_WLS_HOME = '/scratch/kgurupra/A1/mw5470/wlserver'
JKSSTORE_PATH = '/scratch/kgurupra/A1/mw5470/wlserver/server/lib/DemoTrust.jks'
WLS_CONSOLE_URL = 'den02mpu.us.oracle.com/22456/console'
OAM_CONSOLE_URL = 'den02mpu.us.oracle.com/22456/oamconsole'
OAM_ID_STORE = 'UserIdentityStore1'
# OAM_ADMSERVER_HOST = 'den02mpu.us.oracle.com'
# OAM_ADMSERVER_PORT = '22456'
# OAM_ADMSERVER_SSLPORT = '17093'
# OAM_MNGSERVER_PORT = '18180'
# OAM_MNGSERVER_SSLPORT = '21645'
# OAM_MNGSERVER_NAME = 'oam_server1'
# OAM_ADMIN_USER = 'weblogic'
# OAM_ADMIN_PWD = 'weblogic1'
# OAM_WLS_USER = 'weblogic'
# OAM_WLS_PWD = 'weblogic1'
# OAM_MW_HOME = '/scratch/aime1/work/mw2501'
# OAM_ORACLE_HOME = '/scratch/aime1/work/mw2501/idm'
# OAM_DOMAIN_HOME = '/scratch/aime1/work/mw2501/user_projects/domains/WLS_IDM'
# OAM_WLS_HOME = '/scratch/aime1/work/mw2501/wlserver'
# JKSSTORE_PATH = '/scratch/aime1/work/mw2501/wlserver/server/lib/DemoTrust.jks'
# WLS_CONSOLE_URL = 'adc00sax.us.oracle.com/18196/console'
# OAM_CONSOLE_URL = 'adc00sax.us.oracle.com/18196/oamconsole'
# OAM_ID_STORE = 'UserIdentityStore1'
# OHS_HOST = 'slc03sfc.us.oracle.com'
# OHS_INSTANCE_HOME = '/scratch/amywork/ohs9743/user_projects/domains/OHSDomain_standa2'
# OHS_COMPONENT_NAME = 'standal_ohs2'
# OHS_MW_HOME = '/scratch/amywork/ohs9743'
# OHS_WL_HOME = '/scratch/amywork/ohs9743/wlserver'
# OHS_COMMON_ORACLE_HOME = '/scratch/amywork/ohs9743/oracle_common'
# OHS_ADMIN_PORT = '1111'
# OHS_LISTEN_PORT = '2222'
# OHS_SSL_LISTEN_PORT = '3333'
# OHS_WLS_PWD = 'welcome1'
# WEBGATE_ID = 'oam_12wg149'
# OHS_WG_INST_HOME = '/scratch/amywork/ohs9743/user_projects/domains/OHSDomain_standa2/config/fmwconfig/components/OHS/instances/standal_ohs2/webgate/config'
# OHS_INSTANCE_NM_START = '/scratch/amywork/ohs9743/user_projects/domains/OHSDomain_standa2/bin/startNodeManager.sh'
# OHS_INSTANCE_NM_STOP = '/scratch/amywork/ohs9743/user_projects/domains/OHSDomain_standa2/bin/stopNodeManager.sh'
# OHS_INSTANCE_BIN_START = '/scratch/amywork/ohs9743/user_projects/domains/OHSDomain_standa2/bin/startComponent.sh'
# OHS_INSTANCE_BIN_STOP = '/scratch/amywork/ohs9743/user_projects/domains/OHSDomain_standa2/bin/stopComponent.sh'
# OHS_INSTANCE_BIN_START_CMD = '/scratch/amywork/ohs9743/user_projects/domains/OHSDomain_standa2/bin/startComponent.sh standal_ohs2'
# OHS_INSTANCE_BIN_STOP_CMD = '/scratch/amywork/ohs9743/user_projects/domains/OHSDomain_standa2/bin/stopComponent.sh standal_ohs2'
# RESOURCE_URL = 'http://slc03sfc.us.oracle.com:2222/index.html'
# RESOURCE_APPURL = 'http://slc03sfc.us.oracle.com:2222/app1/pages/Sample.jsp'
# IDENTITYPROVIDER='IDSPROFILE-OUD_Amy'
#
# ########################For OAM sever info################################################
# OAM_ADMSERVER_HOST = 'slc03sfc.us.oracle.com'
# OAM_ADMSERVER_PORT = '17416'
# OAM_ADMSERVER_SSLPORT = '22290'
# OAM_MNGSERVER_PORT = '17647'
# OAM_MNGSERVER_SSLPORT = '17493'
# OAM_MNGSERVER_NAME = 'oam_server1'
# OAM_ADMIN_USER = 'oamAdmin'
# OAM_ADMIN_PWD = 'Welcome1'
# OAM_WLS_USER = 'oamAdmin'
# OAM_WLS_PWD = 'Welcome1'
# OAM_MW_HOME = '/scratch/amywork/mw8296'
# OAM_ORACLE_HOME = '/scratch/amywork/mw8296/idm'
# OAM_DOMAIN_HOME = '/scratch/amywork/mw8296/user_projects/domains/WLS_IDM'
# OAM_WLS_HOME = '/scratch/amywork/mw8296/wlserver'
# JKSSTORE_PATH = '/scratch/amywork/mw8296/wlserver/server/lib/DemoTrust.jks'
# WLS_CONSOLE_URL = 'slc03sfc.us.oracle.com/17416/console'
# OAM_CONSOLE_URL = 'slc03sfc.us.oracle.com/17416/oamconsole'
# ########################For OHS&WG info################################################
# OHS_HOST = 'slc07jgj.us.oracle.com'
# OHS_INSTANCE_HOME = '/scratch/amywork/ohs8447/user_projects/domains/OHSDomain_standa2'
# OHS_COMPONENT_NAME = 'standal_ohs2'
# OHS_MW_HOME = '/scratch/amywork/ohs8447'
# OHS_WL_HOME = '/scratch/amywork/ohs8447/wlserver'
# OHS_COMMON_ORACLE_HOME = '/scratch/amywork/ohs8447/oracle_common'
# OHS_ADMIN_PORT = '1111'
# OHS_LISTEN_PORT = '2222'
# OHS_SSL_LISTEN_PORT = '3333'
# OHS_WLS_PWD = 'welcome1'
# WEBGATE_ID = 'ThreeLeggedWG'
# OHS_WG_INST_HOME = '/scratch/amywork/ohs8447/user_projects/domains/OHSDomain_standa2/config/fmwconfig/components/OHS/instances/standal_ohs2/webgate/config'
# OHS_INSTANCE_NM_START = '/scratch/amywork/ohs8447/user_projects/domains/OHSDomain_standa2/bin/startNodeManager.sh'
# OHS_INSTANCE_NM_STOP = '/scratch/amywork/ohs8447/user_projects/domains/OHSDomain_standa2/bin/stopNodeManager.sh'
# OHS_INSTANCE_BIN_START = '/scratch/amywork/ohs8447/user_projects/domains/OHSDomain_standa2/bin/startComponent.sh'
# OHS_INSTANCE_BIN_STOP = '/scratch/amywork/ohs8447/user_projects/domains/OHSDomain_standa2/bin/stopComponent.sh'
# OHS_INSTANCE_BIN_START_CMD = '/scratch/amywork/ohs8447/user_projects/domains/OHSDomain_standa2/bin/startComponent.sh standal_ohs2'
# OHS_INSTANCE_BIN_STOP_CMD = '/scratch/amywork/ohs8447/user_projects/domains/OHSDomain_standa2/bin/stopComponent.sh standal_ohs2'
# RESOURCE_URL = 'http://slc07jgj.us.oracle.com:2222/index.html'
# RESOURCE_APPURL = 'http://slc07jgj.us.oracle.com:2222/app1/pages/Sample.jsp'
# #
# ########################For OAM sever info################################################
# OAM_ADMSERVER_HOST = 'slc07jgj.us.oracle.com'
# OAM_ADMSERVER_PORT = '20192'
# OAM_ADMSERVER_SSLPORT = '20981'
# OAM_MNGSERVER_PORT = '20053'
# OAM_MNGSERVER_SSLPORT = '21283'
# OAM_MNGSERVER_NAME = 'oam_server1'
# OAM_ADMIN_USER = 'oamAdmin'
# OAM_ADMIN_PWD = 'Welcome1'
# OAM_WLS_USER = 'oamAdmin'
# OAM_WLS_PWD = 'Welcome1'
# OAM_MW_HOME = '/scratch/amywork/mw7624'
# OAM_ORACLE_HOME = '/scratch/amywork/mw7624/idm'
# OAM_DOMAIN_HOME = '/scratch/amywork/mw7624/user_projects/domains/WLS_IDM'
# OAM_WLS_HOME = '/scratch/amywork/mw7624/wlserver'
# JKSSTORE_PATH = '/scratch/amywork/mw7624/wlserver/server/lib/DemoTrust.jks'
# WLS_CONSOLE_URL = 'slc07jgj.us.oracle.com/20192/console'
# OAM_CONSOLE_URL = 'slc07jgj.us.oracle.com/20192/oamconsole'
# ########################For OAM sever info################################################
#
# OAM_ADMSERVER_HOST = 'den02mpu.us.oracle.com'
# OAM_ADMSERVER_PORT = '24153'
# OAM_ADMSERVER_SSLPORT = '20139'
# OAM_MNGSERVER_PORT = '21010'
# OAM_MNGSERVER_SSLPORT = '18389'
# OAM_MNGSERVER_NAME = 'oam_server1'
# OAM_ADMIN_USER = 'oamAdminUser'
# OAM_ADMIN_PWD = 'welcome1'
# OAM_WLS_USER = 'oamAdminUser'
# OAM_WLS_PWD = 'welcome1'
# OAM_MW_HOME = '/scratch/kgurupra/A1/mw8368'
# OAM_ORACLE_HOME = '/scratch/kgurupra/A1/mw8368/idm'
# OAM_DOMAIN_HOME = '/scratch/kgurupra/A1/mw8368/user_projects/domains/WLS_IDM'
# OAM_WLS_HOME = '/scratch/kgurupra/A1/mw8368/wlserver'
# JKSSTORE_PATH = '/scratch/kgurupra/A1/mw8368/wlserver/server/lib/DemoTrust.jks'
# WLS_CONSOLE_URL = 'den02mpu.us.oracle.com/24153/console'
# OAM_CONSOLE_URL = 'den02mpu.us.oracle.com/24153/oamconsole'
########################For DATABASE################################################
DATABASE_HOST = 'slc06xgk.us.oracle.com'
DATABASE_SID = 'db2647'
DATABASE_PORT = '11236'
RCU_OIM = '%RCU_OIM%'
RCU_OIM_PASSWD = '%RCU_OIM_PASSWD%'
########################FOR OUD Config################################################
OUD_HOST = '%OUD_HOST%'
OUD_PORT = '%OUD_PORT%'
OUD_ADMIN_USER = '%OUD_ADMIN_USER%'
OUD_ADMIN_PWD = '%OUD_ADMIN_PWD%'
OUD_SSL_PORT = '%OUD_SSL_PORT%'
OUD_BASE_DN = '%OUD_BASE_DN%'
########################Others################################################
FIREFOX_BIN = '/ade/kgurupra_dte8028/oracle/work/INSTALL_FIREFOX14/../firefox/firefox'
######################## For FIAT ################################################
MDC_ATTR = '/ade/kgurupra_dte2941/oracle/work/config.properties'
########################For HAPROXY LBR INFO################################################
DC1_HAPROXY_INSTALL_LOC = '/scratch/kgurupra/APR14/test_proxy1'
DC1_HAPROXY_LBR_HOST = 'slc12ldo.us.oracle.com'
DC1_HAPROXY_CONFIG_FILE = '/scratch/kgurupra/APR14/test_proxy1/haproxy/sbin/haproxy_single.cfg'
DC1_LBR_PORT = '17777'
DC1_OHS1_HOSTNAME = 'slc12ldo.us.oracle.com'
DC1_OHS1_PORT = '2222'
DC1_OHS2_HOSTNAME = 'slc09cor.us.oracle.com'
DC1_OHS2_PORT = '2222'
######################## For FIAT ################################################
MDC_ATTR = '/ade/kgurupra_dte2941/oracle/work/config.properties'
########################For DATABASE BLOCK ################################################
DC1_DB_HOSTNAME = 'slc12ldo.us.oracle.com'
DC1_DB_ORACLE_HOME = '/scratch/kgurupra/APR14/db1246'
DC1_DB_ORACLE_SID = 'db1246'
DC1_DB_GLOBAL_DB_NAME = 'db1246.us.oracle.com'
DC1_DB_DB_PORT = '15581'
DC1_DB_SYS_PASSWORD = 'welcome1'
DC1_DB_CONNECTION_STRING = 'slc12ldo.us.oracle.com:15581:db1246'
########################For RCUPHASE BLOCK ################################################
DC1_COMMON_ORACLE_HOME = '/scratch/kgurupra/APR14/mw5651/oracle_common'
DC1_DB_OAM_SCHEMANAME = 'db1246_OAM'
########################For IDM_NEXTGEN_CONFIG1 BLOCK ################################################
DC1_OAM_PROXYPORT = '5575'
DC1_WLS_USER = 'weblogic'
DC1_WLS_PWD = 'weblogic1'
DC1_WLS_DOMAIN_NAME = 'WLS_IDM'
DC1_MW_HOME = '/scratch/kgurupra/APR14/mw5651'
DC1_WL_HOME = '/scratch/kgurupra/APR14/mw5651/wlserver'
DC1_ORACLE_HOME = '/scratch/kgurupra/APR14/mw5651/idm'
DC1_WLS_DOMAIN_HOME = '/scratch/kgurupra/APR14/mw5651/user_projects/domains/WLS_IDM'
DC1_WLS_CONSOLE_PORT = '17800'
DC1_WLS_CONSOLE_SSLPORT = '17978'
DC1_HOSTNAME = 'slc12ldo.us.oracle.com'
DC1_ADMIN_SERVER_NAME = 'AdminServer'
DC1_COMMON_ORACLE_HOME = '/scratch/kgurupra/APR14/mw5651/oracle_common'
DC1_SHUTDOWN_SCRIPT = '/scratch/kgurupra/APR14/mw5651/idm/shutdown.csh'
DC1_OAM_MNGSERVER_NAME = 'oam_server1'
DC1_OAM_MNGSERVER_PORT = '15729'
DC1_OAM_MNGSERVER_SSL_PORT = '16137'
DC1_OAMPOL_MNGSERVER_NAME = 'oam_policy_mgr1'
DC1_OAMPOL_MNGSERVER_PORT = '16489'
DC1_OAMPOL_MNGSERVER_SSL_PORT = '24549'
########################For OID info################################################
########################For 11g OHS&WG info################################################
DC1_WEBT11g_WL_HOME = '/scratch/kgurupra/APR14/mw6608/wlserver_10.3'
DC1_WEBT11g_JDK_HOME = '/net/adcnas418/export/farm_fmwqa/java/linux64/jdk7u80'
########################For JRF_INSTALL ################################################
DC1_OHS12C_WGID = 'DC1WG'
DC1_WG_OHS_PORT = '2222'
DC1_OHS12C_HOSTNAME = 'slc12ldo.us.oracle.com'
DC1_RREG_OUTPUT =''
########################For JRF_INSTALL ################################################
DC1_JRF_INSTALL_JDK_HOME = '/ade_autofs/gd29_3rdparty/JDK8_MAIN_LINUX.X64.rdd/LATEST/jdk8/'
DC1_JRF_INSTALL_MW_HOME = '/scratch/kgurupra/APR14/mw4522/wlserver'
DC1_JRF_SHIPHOME = '/ade/kgurupra_dte2941/oracle/work/JRF_INSTALL/stage/fmw_12.2.1.3.0_infrastructure_generic.jar'
########################For FMW_OHS_INST1 ################################################
DC1_OHS12C_ORACLE_HOME = '/scratch/kgurupra/APR14/ohs5082'
DC1_OHS12C_INSTALL_TYPE = 'STANDALONE'
########################For FMW_OHS_INST1 ################################################
DC1_OHS12C_ORACLE_HOME = '/scratch/kgurupra/APR14/ohs5082'
DC1_OHS12C_INSTALL_TYPE = 'STANDALONE'
DC1_NODEMGR_PORT = '5556'
########################For Create_Standalone_Instance ################################################
DC1_OHS12C_WLS_USER = 'weblogic'
DC1_OHS12C_WLS_PWD = 'welcome1'
DC1_OHS12C_WLS_DOMAIN_NAME = 'OHSDomain_standa2'
DC1_OHS_INSTANCE_NAME = 'standal_ohs2'
DC1_OHS12C_WLS_DOMAIN_HOME = '/scratch/kgurupra/APR14/ohs5082/user_projects/domains/OHSDomain_standa2'
DC1_OHS12C_MW_HOME = '/scratch/kgurupra/APR14/ohs5082'
DC1_OHS12C_ADMIN_PORT = '1111'
DC1_OHS12C_LISTEN_PORT = '2222'
DC1_OHS12C_SSL_LISTEN_PORT = '3333'
######################## For FIAT ################################################
MDC_ATTR = '/ade/kgurupra_dte2941/oracle/work/config.properties'
########################For DATABASE BLOCK ################################################
DC2_DB_HOSTNAME = 'slc09cor.us.oracle.com'
DC2_DB_ORACLE_HOME = '/scratch/kgurupra/APR14/db6075'
DC2_DB_ORACLE_SID = 'db6075'
DC2_DB_GLOBAL_DB_NAME = 'db6075.us.oracle.com'
DC2_DB_DB_PORT = '11378'
DC2_DB_SYS_PASSWORD = 'welcome1'
DC2_DB_CONNECTION_STRING = 'slc09cor.us.oracle.com:11378:db6075'
########################For RCUPHASE BLOCK ################################################
DC2_COMMON_ORACLE_HOME = '/scratch/kgurupra/APR14/mw33/oracle_common'
DC2_DB_OAM_SCHEMANAME = 'db6075_OAM'
########################For IDM_NEXTGEN_CONFIG1 BLOCK ################################################
DC2_OAM_PROXYPORT = '5575'
DC2_WLS_USER = 'weblogic'
DC2_WLS_PWD = 'weblogic1'
DC2_WLS_DOMAIN_NAME = 'WLS_IDM'
DC2_MW_HOME = '/scratch/kgurupra/APR14/mw33'
DC2_WL_HOME = '/scratch/kgurupra/APR14/mw33/wlserver'
DC2_ORACLE_HOME = '/scratch/kgurupra/APR14/mw33/idm'
DC2_WLS_DOMAIN_HOME = '/scratch/kgurupra/APR14/mw33/user_projects/domains/WLS_IDM'
DC2_WLS_CONSOLE_PORT = '21226'
DC2_WLS_CONSOLE_SSLPORT = '15458'
DC2_HOSTNAME = 'slc09cor.us.oracle.com'
DC2_ADMIN_SERVER_NAME = 'AdminServer'
DC2_COMMON_ORACLE_HOME = '/scratch/kgurupra/APR14/mw33/oracle_common'
DC2_SHUTDOWN_SCRIPT = '/scratch/kgurupra/APR14/mw33/idm/shutdown.csh'
DC2_FRONT_END_PORT =''
DC2_FRONT_END_HOST =''
DC2_OAM_MNGSERVER_NAME = 'oam_server1'
DC2_OAM_MNGSERVER_PORT = '24618'
DC2_OAM_MNGSERVER_SSL_PORT = '15011'
DC2_OAMPOL_MNGSERVER_NAME = 'oam_policy_mgr1'
DC2_OAMPOL_MNGSERVER_PORT = '18230'
DC2_OAMPOL_MNGSERVER_SSL_PORT = '24786'
DC2_OAM_MNGSERVER2_NAME =''
DC2_OAM_MNGSERVER2_PORT =''
DC2_OAM_MNGSERVER2_SSL_PORT =''
DC2_OAMPOL_MNGSERVER2_NAME =''
DC2_OAMPOL_MNGSERVER2_PORT =''
DC2_OAMPOL_MNGSERVER2_SSL_PORT =''
########################For OID info################################################
DC2_OID_DOMAIN_HOME =''
DC2_OID_HOSTNAME =''
DC2_LDAP_SSL_PORT =''
DC2_LDAP_NONSSL_PORT =''
DC2_OID_INSTANCE_HOME =''
DC2_OID_ADMIN_PASSWORD =''
DC2_OID_USER =''
DC2_OID_NAMESPACE =''
########################For 11g OHS&WG info################################################
DC2_WEBT11g_WL_HOME = '/scratch/kgurupra/APR14/mw8133/wlserver_10.3'
DC2_WEBT11g_JDK_HOME = '/net/adcnas418/export/farm_fmwqa/java/linux64/jdk7u80'
########################For JRF_INSTALL ################################################
DC2_OHS12C_WGID = 'DC1WG'
DC2_WG_OHS_PORT = '2222'
DC2_OHS12C_HOSTNAME = 'slc09cor.us.oracle.com'
DC2_RREG_OUTPUT =''
########################For JRF_INSTALL ################################################
DC2_JRF_INSTALL_JDK_HOME = '/ade_autofs/gd29_3rdparty/JDK8_MAIN_LINUX.X64.rdd/LATEST/jdk8/'
DC2_JRF_INSTALL_MW_HOME = '/scratch/kgurupra/APR14/mw4522/wlserver'
DC2_JRF_SHIPHOME = '/ade/kgurupra_dte2941/oracle/work/JRF_INSTALL/stage/fmw_12.2.1.3.0_infrastructure_generic.jar'
########################For FMW_OHS_INST1 ################################################
DC2_OHS12C_ORACLE_HOME = '/scratch/kgurupra/APR14/ohs6725'
DC2_OHS12C_INSTALL_TYPE = 'STANDALONE'
########################For FMW_OHS_INST1 ################################################
DC2_OHS12C_ORACLE_HOME = '/scratch/kgurupra/APR14/ohs6725'
DC2_OHS12C_INSTALL_TYPE = 'STANDALONE'
DC2_NODEMGR_PORT = '5556'
########################For Create_Standalone_Instance ################################################
DC2_OHS12C_WLS_USER = 'weblogic'
DC2_OHS12C_WLS_PWD = 'welcome1'
DC2_OHS12C_WLS_DOMAIN_NAME = 'OHSDomain_standa2'
DC2_OHS_INSTANCE_NAME = 'standal_ohs2'
DC2_OHS12C_WLS_DOMAIN_HOME = '/scratch/kgurupra/APR14/ohs6725/user_projects/domains/OHSDomain_standa2'
DC2_OHS12C_MW_HOME = '/scratch/kgurupra/APR14/ohs6725'
DC2_OHS12C_ADMIN_PORT = '1111'
DC2_OHS12C_LISTEN_PORT = '2222'
DC2_OHS12C_SSL_LISTEN_PORT = '3333'
######################## For FIAT ################################################
MDC_ATTR = '/ade/kgurupra_dte2941/oracle/work/config.properties'
########################For DATABASE BLOCK ################################################
DC3_DB_HOSTNAME = 'slc09cor.us.oracle.com'
DC3_DB_ORACLE_HOME = '/scratch/kgurupra/APR14/db6075'
DC3_DB_ORACLE_SID = 'db6075'
DC3_DB_GLOBAL_DB_NAME = 'db6075.us.oracle.com'
DC3_DB_DB_PORT = '11378'
DC3_DB_SYS_PASSWORD = 'welcome1'
DC3_DB_CONNECTION_STRING = 'slc09cor.us.oracle.com:11378:db6075'
########################For RCUPHASE BLOCK ################################################
DC3_COMMON_ORACLE_HOME = '/scratch/kgurupra/APR14/mw33/oracle_common'
DC3_DB_OAM_SCHEMANAME = 'db6075_OAM'
########################For IDM_NEXTGEN_CONFIG1 BLOCK ################################################
DC3_OAM_PROXYPORT = '5575'
DC3_WLS_USER = 'weblogic'
DC3_WLS_PWD = 'weblogic1'
DC3_WLS_DOMAIN_NAME = 'WLS_IDM'
DC3_MW_HOME = '/scratch/kgurupra/APR14/mw33'
DC3_WL_HOME = '/scratch/kgurupra/APR14/mw33/wlserver'
DC3_ORACLE_HOME = '/scratch/kgurupra/APR14/mw33/idm'
DC3_WLS_DOMAIN_HOME = '/scratch/kgurupra/APR14/mw33/user_projects/domains/WLS_IDM'
DC3_WLS_CONSOLE_PORT = '21226'
DC3_WLS_CONSOLE_SSLPORT = '15458'
DC3_HOSTNAME = 'slc09cor.us.oracle.com'
DC3_ADMIN_SERVER_NAME = 'AdminServer'
DC3_COMMON_ORACLE_HOME = '/scratch/kgurupra/APR14/mw33/oracle_common'
DC3_SHUTDOWN_SCRIPT = '/scratch/kgurupra/APR14/mw33/idm/shutdown.csh'
DC3_FRONT_END_PORT =''
DC3_FRONT_END_HOST =''
DC3_OAM_MNGSERVER_NAME = 'oam_server1'
DC3_OAM_MNGSERVER_PORT = '24618'
DC3_OAM_MNGSERVER_SSL_PORT = '15011'
DC3_OAMPOL_MNGSERVER_NAME = 'oam_policy_mgr1'
DC3_OAMPOL_MNGSERVER_PORT = '18230'
DC3_OAMPOL_MNGSERVER_SSL_PORT = '24786'
DC3_OAM_MNGSERVER2_NAME =''
DC3_OAM_MNGSERVER2_PORT =''
DC3_OAM_MNGSERVER2_SSL_PORT =''
DC3_OAMPOL_MNGSERVER2_NAME =''
DC3_OAMPOL_MNGSERVER2_PORT =''
DC3_OAMPOL_MNGSERVER2_SSL_PORT =''
########################For OID info################################################
DC3_OID_DOMAIN_HOME =''
DC3_OID_HOSTNAME =''
DC3_LDAP_SSL_PORT =''
DC3_LDAP_NONSSL_PORT =''
DC3_OID_INSTANCE_HOME =''
DC3_OID_ADMIN_PASSWORD =''
DC3_OID_USER =''
DC3_OID_NAMESPACE =''
########################For 11g OHS&WG info################################################
DC3_WEBT11g_WL_HOME = '/scratch/kgurupra/APR14/mw8133/wlserver_10.3'
DC3_WEBT11g_JDK_HOME = '/net/adcnas418/export/farm_fmwqa/java/linux64/jdk7u80'
########################For JRF_INSTALL ################################################
DC3_OHS12C_WGID = 'DC1WG'
DC3_WG_OHS_PORT = '2222'
DC3_OHS12C_HOSTNAME = 'slc09cor.us.oracle.com'
DC3_RREG_OUTPUT =''
########################For JRF_INSTALL ################################################
DC3_JRF_INSTALL_JDK_HOME = '/ade_autofs/gd29_3rdparty/JDK8_MAIN_LINUX.X64.rdd/LATEST/jdk8/'
DC3_JRF_INSTALL_MW_HOME = '/scratch/kgurupra/APR14/mw4522/wlserver'
DC3_JRF_SHIPHOME = '/ade/kgurupra_dte2941/oracle/work/JRF_INSTALL/stage/fmw_12.2.1.3.0_infrastructure_generic.jar'
########################For FMW_OHS_INST1 ################################################
DC3_OHS12C_ORACLE_HOME = '/scratch/kgurupra/APR14/ohs6725'
DC3_OHS12C_INSTALL_TYPE = 'STANDALONE'
########################For FMW_OHS_INST1 ################################################
DC3_OHS12C_ORACLE_HOME = '/scratch/kgurupra/APR14/ohs6725'
DC3_OHS12C_INSTALL_TYPE = 'STANDALONE'
DC3_NODEMGR_PORT = '5556'
########################For Create_Standalone_Instance ################################################
DC3_OHS12C_WLS_USER = 'weblogic'
DC3_OHS12C_WLS_PWD = 'welcome1'
DC3_OHS12C_WLS_DOMAIN_NAME = 'OHSDomain_standa2'
DC3_OHS_INSTANCE_NAME = 'standal_ohs2'
DC3_OHS12C_WLS_DOMAIN_HOME = '/scratch/kgurupra/APR14/ohs6725/user_projects/domains/OHSDomain_standa2'
DC3_OHS12C_MW_HOME = '/scratch/kgurupra/APR14/ohs6725'
DC3_OHS12C_ADMIN_PORT = '1111'
DC3_OHS12C_LISTEN_PORT = '2222'
DC3_OHS12C_SSL_LISTEN_PORT = '3333'
######################## For FIAT ################################################
MDC_ATTR = '/ade/kgurupra_dte2941/oracle/work/config.properties'
######################## For FIAT ################################################
MDC_ATTR = '/ade/kgurupra_dte2941/oracle/work/config.properties'
########################For CFG_RESOURCE_WG ################################################
OHS_INSTANCE1_WLS_USER = 'weblogic'
RWG_NODEMGR_PORT = '5556'
OHS_INSTANCE1_WLS_PWD = 'welcome1'
RWG_WG1_HOSTNAME = 'slc12pcc.us.oracle.com'
RWG_WG2_HOSTNAME = 'slc12pcc.us.oracle.com'
RWG_WG3_HOSTNAME = 'slc12pcc.us.oracle.com'
RWG_WG4_HOSTNAME =''
OHS_INSTANCE1_WLS_DOMAIN_NAME = 'OHSDomain_rwg'
OHS_INSTANCE1_WLS_DOMAIN_HOME = '/scratch/kgurupra/APR14/ohs1932/user_projects/domains/OHSDomain_rwg'
OHS_INSTANCE1_MW_HOME = '/scratch/kgurupra/APR14/ohs1932'
OHS_INSTANCE1_WL_HOME = '/scratch/kgurupra/APR14/ohs1932/wlserver'
OHS_INSTANCE1_COMMON_ORACLE_HOME = '/scratch/kgurupra/APR14/ohs1932/oracle_common'
OHS_INSTANCE1_OHS_INSTANCE_NAME = 'rwg6222'
OHS_INSTANCE1_LISTEN_PORT = '6222'
OHS_INSTANCE1_SSL_LISTEN_PORT = '6223'
OHS_INSTANCE1_ADMIN_PORT = '6221'
OHS_INSTANCE1_WGID = 'WG6222'
OHS_INSTANCE1_WG_PORT = '6222'
OHS_INSTANCE2_WLS_USER = 'weblogic'
OHS_INSTANCE2_WLS_PWD = 'welcome1'
OHS_INSTANCE2_WLS_DOMAIN_NAME = 'OHSDomain_rwg'
OHS_INSTANCE2_WLS_DOMAIN_HOME = '/scratch/kgurupra/APR14/ohs1932/user_projects/domains/OHSDomain_rwg'
OHS_INSTANCE2_MW_HOME = '/scratch/kgurupra/APR14/ohs1932'
OHS_INSTANCE2_WL_HOME = '/scratch/kgurupra/APR14/ohs1932/wlserver'
OHS_INSTANCE2_COMMON_ORACLE_HOME = '/scratch/kgurupra/APR14/ohs1932/oracle_common'
OHS_INSTANCE2_OHS_INSTANCE_NAME = 'rwg7222'
OHS_INSTANCE2_LISTEN_PORT = '7222'
OHS_INSTANCE2_SSL_LISTEN_PORT = '7223'
OHS_INSTANCE2_ADMIN_PORT = '7221'
OHS_INSTANCE2_WGID = 'WG7222'
OHS_INSTANCE2_WG_PORT = '7222'
OHS_INSTANCE3_WLS_USER = 'weblogic'
OHS_INSTANCE3_WLS_PWD = 'welcome1'
OHS_INSTANCE3_WLS_DOMAIN_NAME = 'OHSDomain_rwg'
OHS_INSTANCE3_WLS_DOMAIN_HOME = '/scratch/kgurupra/APR14/ohs1932/user_projects/domains/OHSDomain_rwg'
OHS_INSTANCE3_MW_HOME = '/scratch/kgurupra/APR14/ohs1932'
OHS_INSTANCE3_WL_HOME = '/scratch/kgurupra/APR14/ohs1932/wlserver'
OHS_INSTANCE3_COMMON_ORACLE_HOME = '/scratch/kgurupra/APR14/ohs1932/oracle_common'
OHS_INSTANCE3_OHS_INSTANCE_NAME = 'rwg8222'
OHS_INSTANCE3_LISTEN_PORT = '8222'
OHS_INSTANCE3_SSL_LISTEN_PORT = '8223'
OHS_INSTANCE3_ADMIN_PORT = '8221'
OHS_INSTANCE3_WGID = 'WG8222'
OHS_INSTANCE3_WG_PORT = '8222'
OHS_INSTANCE4_WLS_USER = 'weblogic'
OHS_INSTANCE4_WLS_PWD = 'welcome1'
OHS_INSTANCE4_WLS_DOMAIN_NAME = 'OHSDomain_rwg'
OHS_INSTANCE4_WLS_DOMAIN_HOME = '/scratch/kgurupra/APR14/ohs1932/user_projects/domains/OHSDomain_rwg'
OHS_INSTANCE4_MW_HOME = '/scratch/kgurupra/APR14/ohs1932'
OHS_INSTANCE4_WL_HOME = '/scratch/kgurupra/APR14/ohs1932/wlserver'
OHS_INSTANCE4_COMMON_ORACLE_HOME = '/scratch/kgurupra/APR14/ohs1932/oracle_common'
OHS_INSTANCE4_OHS_INSTANCE_NAME = 'rwg9222'
OHS_INSTANCE4_LISTEN_PORT = '9222'
OHS_INSTANCE4_SSL_LISTEN_PORT = '9223'
OHS_INSTANCE4_ADMIN_PORT = '9221'
OHS_INSTANCE4_WGID = 'WG9222'
OHS_INSTANCE4_WG_PORT = '9222'
def __init__(self):
self.another_variable = 'another value'
| class Envvariablefile(object):
t_work = '/ade/kgurupra_dte8028/oracle/work/build_run_robot1/../'
view_root = '/ade/kgurupra_dte8028'
browsertype = 'firefox'
oid_host = 'slc06xgk.us.oracle.com'
oid_port = '15635'
oid_ssl_port = '22718'
oid_admin = 'cn=orcladmin'
oid_admin_password = 'welcome1'
ohs_host = 'den00rum.us.oracle.com'
ohs_instance_home = '/scratch/kgurupra/A1/ohs3941/user_projects/domains/OHSDomain_standa2'
ohs_component_name = 'standal_ohs2'
ohs_mw_home = '/scratch/kgurupra/A1/ohs3941'
ohs_wl_home = '/scratch/kgurupra/A1/ohs3941/wlserver'
ohs_common_oracle_home = '/scratch/kgurupra/A1/ohs3941/oracle_common'
ohs_admin_port = '1111'
ohs_listen_port = '7777'
ohs_ssl_listen_port = '3333'
ohs_wls_pwd = 'welcome1'
webgate_id = 'oam_12wg3697'
ohs_wg_inst_home = '/scratch/kgurupra/A1/ohs3941/user_projects/domains/OHSDomain_standa2/config/fmwconfig/components/OHS/instances/standal_ohs2/webgate/config'
ohs_instance_nm_start = '/scratch/kgurupra/A1/ohs3941/user_projects/domains/OHSDomain_standa2/bin/startNodeManager.sh'
ohs_instance_nm_stop = '/scratch/kgurupra/A1/ohs3941/user_projects/domains/OHSDomain_standa2/bin/stopNodeManager.sh'
ohs_instance_bin_start = '/scratch/kgurupra/A1/ohs3941/user_projects/domains/OHSDomain_standa2/bin/startComponent.sh'
ohs_instance_bin_stop = '/scratch/kgurupra/A1/ohs3941/user_projects/domains/OHSDomain_standa2/bin/stopComponent.sh'
ohs_instance_bin_start_cmd = '/scratch/kgurupra/A1/ohs3941/user_projects/domains/OHSDomain_standa2/bin/startComponent.sh standal_ohs2'
ohs_instance_bin_stop_cmd = '/scratch/kgurupra/A1/ohs3941/user_projects/domains/OHSDomain_standa2/bin/stopComponent.sh standal_ohs2'
resource_url = 'http://den02mpu.us.oracle.com:2222/index.html'
resource_appurl = 'http://den02mpu.us.oracle.com:2222/app1/pages/Sample.jsp'
oam_admserver_host = 'den00rum.us.oracle.com'
oam_admserver_port = '7001'
oam_admserver_sslport = '23009'
oam_mngserver_port = '14100'
oam_mngserver_sslport = '20261'
oam_mngserver_name = 'oam_server1'
oam_admin_user = 'weblogic'
oam_admin_pwd = 'welcome1'
oam_wls_user = 'weblogic'
oam_wls_pwd = 'welcome1'
oam_mw_home = '/scratch/kgurupra/A1/mw5470'
oam_oracle_home = '/scratch/kgurupra/A1/mw5470/idm'
oam_domain_home = '/scratch/kgurupra/A1/mw5470/user_projects/domains/WLS_IDM'
oam_wls_home = '/scratch/kgurupra/A1/mw5470/wlserver'
jksstore_path = '/scratch/kgurupra/A1/mw5470/wlserver/server/lib/DemoTrust.jks'
wls_console_url = 'den02mpu.us.oracle.com/22456/console'
oam_console_url = 'den02mpu.us.oracle.com/22456/oamconsole'
oam_id_store = 'UserIdentityStore1'
database_host = 'slc06xgk.us.oracle.com'
database_sid = 'db2647'
database_port = '11236'
rcu_oim = '%RCU_OIM%'
rcu_oim_passwd = '%RCU_OIM_PASSWD%'
oud_host = '%OUD_HOST%'
oud_port = '%OUD_PORT%'
oud_admin_user = '%OUD_ADMIN_USER%'
oud_admin_pwd = '%OUD_ADMIN_PWD%'
oud_ssl_port = '%OUD_SSL_PORT%'
oud_base_dn = '%OUD_BASE_DN%'
firefox_bin = '/ade/kgurupra_dte8028/oracle/work/INSTALL_FIREFOX14/../firefox/firefox'
mdc_attr = '/ade/kgurupra_dte2941/oracle/work/config.properties'
dc1_haproxy_install_loc = '/scratch/kgurupra/APR14/test_proxy1'
dc1_haproxy_lbr_host = 'slc12ldo.us.oracle.com'
dc1_haproxy_config_file = '/scratch/kgurupra/APR14/test_proxy1/haproxy/sbin/haproxy_single.cfg'
dc1_lbr_port = '17777'
dc1_ohs1_hostname = 'slc12ldo.us.oracle.com'
dc1_ohs1_port = '2222'
dc1_ohs2_hostname = 'slc09cor.us.oracle.com'
dc1_ohs2_port = '2222'
mdc_attr = '/ade/kgurupra_dte2941/oracle/work/config.properties'
dc1_db_hostname = 'slc12ldo.us.oracle.com'
dc1_db_oracle_home = '/scratch/kgurupra/APR14/db1246'
dc1_db_oracle_sid = 'db1246'
dc1_db_global_db_name = 'db1246.us.oracle.com'
dc1_db_db_port = '15581'
dc1_db_sys_password = 'welcome1'
dc1_db_connection_string = 'slc12ldo.us.oracle.com:15581:db1246'
dc1_common_oracle_home = '/scratch/kgurupra/APR14/mw5651/oracle_common'
dc1_db_oam_schemaname = 'db1246_OAM'
dc1_oam_proxyport = '5575'
dc1_wls_user = 'weblogic'
dc1_wls_pwd = 'weblogic1'
dc1_wls_domain_name = 'WLS_IDM'
dc1_mw_home = '/scratch/kgurupra/APR14/mw5651'
dc1_wl_home = '/scratch/kgurupra/APR14/mw5651/wlserver'
dc1_oracle_home = '/scratch/kgurupra/APR14/mw5651/idm'
dc1_wls_domain_home = '/scratch/kgurupra/APR14/mw5651/user_projects/domains/WLS_IDM'
dc1_wls_console_port = '17800'
dc1_wls_console_sslport = '17978'
dc1_hostname = 'slc12ldo.us.oracle.com'
dc1_admin_server_name = 'AdminServer'
dc1_common_oracle_home = '/scratch/kgurupra/APR14/mw5651/oracle_common'
dc1_shutdown_script = '/scratch/kgurupra/APR14/mw5651/idm/shutdown.csh'
dc1_oam_mngserver_name = 'oam_server1'
dc1_oam_mngserver_port = '15729'
dc1_oam_mngserver_ssl_port = '16137'
dc1_oampol_mngserver_name = 'oam_policy_mgr1'
dc1_oampol_mngserver_port = '16489'
dc1_oampol_mngserver_ssl_port = '24549'
dc1_webt11g_wl_home = '/scratch/kgurupra/APR14/mw6608/wlserver_10.3'
dc1_webt11g_jdk_home = '/net/adcnas418/export/farm_fmwqa/java/linux64/jdk7u80'
dc1_ohs12_c_wgid = 'DC1WG'
dc1_wg_ohs_port = '2222'
dc1_ohs12_c_hostname = 'slc12ldo.us.oracle.com'
dc1_rreg_output = ''
dc1_jrf_install_jdk_home = '/ade_autofs/gd29_3rdparty/JDK8_MAIN_LINUX.X64.rdd/LATEST/jdk8/'
dc1_jrf_install_mw_home = '/scratch/kgurupra/APR14/mw4522/wlserver'
dc1_jrf_shiphome = '/ade/kgurupra_dte2941/oracle/work/JRF_INSTALL/stage/fmw_12.2.1.3.0_infrastructure_generic.jar'
dc1_ohs12_c_oracle_home = '/scratch/kgurupra/APR14/ohs5082'
dc1_ohs12_c_install_type = 'STANDALONE'
dc1_ohs12_c_oracle_home = '/scratch/kgurupra/APR14/ohs5082'
dc1_ohs12_c_install_type = 'STANDALONE'
dc1_nodemgr_port = '5556'
dc1_ohs12_c_wls_user = 'weblogic'
dc1_ohs12_c_wls_pwd = 'welcome1'
dc1_ohs12_c_wls_domain_name = 'OHSDomain_standa2'
dc1_ohs_instance_name = 'standal_ohs2'
dc1_ohs12_c_wls_domain_home = '/scratch/kgurupra/APR14/ohs5082/user_projects/domains/OHSDomain_standa2'
dc1_ohs12_c_mw_home = '/scratch/kgurupra/APR14/ohs5082'
dc1_ohs12_c_admin_port = '1111'
dc1_ohs12_c_listen_port = '2222'
dc1_ohs12_c_ssl_listen_port = '3333'
mdc_attr = '/ade/kgurupra_dte2941/oracle/work/config.properties'
dc2_db_hostname = 'slc09cor.us.oracle.com'
dc2_db_oracle_home = '/scratch/kgurupra/APR14/db6075'
dc2_db_oracle_sid = 'db6075'
dc2_db_global_db_name = 'db6075.us.oracle.com'
dc2_db_db_port = '11378'
dc2_db_sys_password = 'welcome1'
dc2_db_connection_string = 'slc09cor.us.oracle.com:11378:db6075'
dc2_common_oracle_home = '/scratch/kgurupra/APR14/mw33/oracle_common'
dc2_db_oam_schemaname = 'db6075_OAM'
dc2_oam_proxyport = '5575'
dc2_wls_user = 'weblogic'
dc2_wls_pwd = 'weblogic1'
dc2_wls_domain_name = 'WLS_IDM'
dc2_mw_home = '/scratch/kgurupra/APR14/mw33'
dc2_wl_home = '/scratch/kgurupra/APR14/mw33/wlserver'
dc2_oracle_home = '/scratch/kgurupra/APR14/mw33/idm'
dc2_wls_domain_home = '/scratch/kgurupra/APR14/mw33/user_projects/domains/WLS_IDM'
dc2_wls_console_port = '21226'
dc2_wls_console_sslport = '15458'
dc2_hostname = 'slc09cor.us.oracle.com'
dc2_admin_server_name = 'AdminServer'
dc2_common_oracle_home = '/scratch/kgurupra/APR14/mw33/oracle_common'
dc2_shutdown_script = '/scratch/kgurupra/APR14/mw33/idm/shutdown.csh'
dc2_front_end_port = ''
dc2_front_end_host = ''
dc2_oam_mngserver_name = 'oam_server1'
dc2_oam_mngserver_port = '24618'
dc2_oam_mngserver_ssl_port = '15011'
dc2_oampol_mngserver_name = 'oam_policy_mgr1'
dc2_oampol_mngserver_port = '18230'
dc2_oampol_mngserver_ssl_port = '24786'
dc2_oam_mngserver2_name = ''
dc2_oam_mngserver2_port = ''
dc2_oam_mngserver2_ssl_port = ''
dc2_oampol_mngserver2_name = ''
dc2_oampol_mngserver2_port = ''
dc2_oampol_mngserver2_ssl_port = ''
dc2_oid_domain_home = ''
dc2_oid_hostname = ''
dc2_ldap_ssl_port = ''
dc2_ldap_nonssl_port = ''
dc2_oid_instance_home = ''
dc2_oid_admin_password = ''
dc2_oid_user = ''
dc2_oid_namespace = ''
dc2_webt11g_wl_home = '/scratch/kgurupra/APR14/mw8133/wlserver_10.3'
dc2_webt11g_jdk_home = '/net/adcnas418/export/farm_fmwqa/java/linux64/jdk7u80'
dc2_ohs12_c_wgid = 'DC1WG'
dc2_wg_ohs_port = '2222'
dc2_ohs12_c_hostname = 'slc09cor.us.oracle.com'
dc2_rreg_output = ''
dc2_jrf_install_jdk_home = '/ade_autofs/gd29_3rdparty/JDK8_MAIN_LINUX.X64.rdd/LATEST/jdk8/'
dc2_jrf_install_mw_home = '/scratch/kgurupra/APR14/mw4522/wlserver'
dc2_jrf_shiphome = '/ade/kgurupra_dte2941/oracle/work/JRF_INSTALL/stage/fmw_12.2.1.3.0_infrastructure_generic.jar'
dc2_ohs12_c_oracle_home = '/scratch/kgurupra/APR14/ohs6725'
dc2_ohs12_c_install_type = 'STANDALONE'
dc2_ohs12_c_oracle_home = '/scratch/kgurupra/APR14/ohs6725'
dc2_ohs12_c_install_type = 'STANDALONE'
dc2_nodemgr_port = '5556'
dc2_ohs12_c_wls_user = 'weblogic'
dc2_ohs12_c_wls_pwd = 'welcome1'
dc2_ohs12_c_wls_domain_name = 'OHSDomain_standa2'
dc2_ohs_instance_name = 'standal_ohs2'
dc2_ohs12_c_wls_domain_home = '/scratch/kgurupra/APR14/ohs6725/user_projects/domains/OHSDomain_standa2'
dc2_ohs12_c_mw_home = '/scratch/kgurupra/APR14/ohs6725'
dc2_ohs12_c_admin_port = '1111'
dc2_ohs12_c_listen_port = '2222'
dc2_ohs12_c_ssl_listen_port = '3333'
mdc_attr = '/ade/kgurupra_dte2941/oracle/work/config.properties'
dc3_db_hostname = 'slc09cor.us.oracle.com'
dc3_db_oracle_home = '/scratch/kgurupra/APR14/db6075'
dc3_db_oracle_sid = 'db6075'
dc3_db_global_db_name = 'db6075.us.oracle.com'
dc3_db_db_port = '11378'
dc3_db_sys_password = 'welcome1'
dc3_db_connection_string = 'slc09cor.us.oracle.com:11378:db6075'
dc3_common_oracle_home = '/scratch/kgurupra/APR14/mw33/oracle_common'
dc3_db_oam_schemaname = 'db6075_OAM'
dc3_oam_proxyport = '5575'
dc3_wls_user = 'weblogic'
dc3_wls_pwd = 'weblogic1'
dc3_wls_domain_name = 'WLS_IDM'
dc3_mw_home = '/scratch/kgurupra/APR14/mw33'
dc3_wl_home = '/scratch/kgurupra/APR14/mw33/wlserver'
dc3_oracle_home = '/scratch/kgurupra/APR14/mw33/idm'
dc3_wls_domain_home = '/scratch/kgurupra/APR14/mw33/user_projects/domains/WLS_IDM'
dc3_wls_console_port = '21226'
dc3_wls_console_sslport = '15458'
dc3_hostname = 'slc09cor.us.oracle.com'
dc3_admin_server_name = 'AdminServer'
dc3_common_oracle_home = '/scratch/kgurupra/APR14/mw33/oracle_common'
dc3_shutdown_script = '/scratch/kgurupra/APR14/mw33/idm/shutdown.csh'
dc3_front_end_port = ''
dc3_front_end_host = ''
dc3_oam_mngserver_name = 'oam_server1'
dc3_oam_mngserver_port = '24618'
dc3_oam_mngserver_ssl_port = '15011'
dc3_oampol_mngserver_name = 'oam_policy_mgr1'
dc3_oampol_mngserver_port = '18230'
dc3_oampol_mngserver_ssl_port = '24786'
dc3_oam_mngserver2_name = ''
dc3_oam_mngserver2_port = ''
dc3_oam_mngserver2_ssl_port = ''
dc3_oampol_mngserver2_name = ''
dc3_oampol_mngserver2_port = ''
dc3_oampol_mngserver2_ssl_port = ''
dc3_oid_domain_home = ''
dc3_oid_hostname = ''
dc3_ldap_ssl_port = ''
dc3_ldap_nonssl_port = ''
dc3_oid_instance_home = ''
dc3_oid_admin_password = ''
dc3_oid_user = ''
dc3_oid_namespace = ''
dc3_webt11g_wl_home = '/scratch/kgurupra/APR14/mw8133/wlserver_10.3'
dc3_webt11g_jdk_home = '/net/adcnas418/export/farm_fmwqa/java/linux64/jdk7u80'
dc3_ohs12_c_wgid = 'DC1WG'
dc3_wg_ohs_port = '2222'
dc3_ohs12_c_hostname = 'slc09cor.us.oracle.com'
dc3_rreg_output = ''
dc3_jrf_install_jdk_home = '/ade_autofs/gd29_3rdparty/JDK8_MAIN_LINUX.X64.rdd/LATEST/jdk8/'
dc3_jrf_install_mw_home = '/scratch/kgurupra/APR14/mw4522/wlserver'
dc3_jrf_shiphome = '/ade/kgurupra_dte2941/oracle/work/JRF_INSTALL/stage/fmw_12.2.1.3.0_infrastructure_generic.jar'
dc3_ohs12_c_oracle_home = '/scratch/kgurupra/APR14/ohs6725'
dc3_ohs12_c_install_type = 'STANDALONE'
dc3_ohs12_c_oracle_home = '/scratch/kgurupra/APR14/ohs6725'
dc3_ohs12_c_install_type = 'STANDALONE'
dc3_nodemgr_port = '5556'
dc3_ohs12_c_wls_user = 'weblogic'
dc3_ohs12_c_wls_pwd = 'welcome1'
dc3_ohs12_c_wls_domain_name = 'OHSDomain_standa2'
dc3_ohs_instance_name = 'standal_ohs2'
dc3_ohs12_c_wls_domain_home = '/scratch/kgurupra/APR14/ohs6725/user_projects/domains/OHSDomain_standa2'
dc3_ohs12_c_mw_home = '/scratch/kgurupra/APR14/ohs6725'
dc3_ohs12_c_admin_port = '1111'
dc3_ohs12_c_listen_port = '2222'
dc3_ohs12_c_ssl_listen_port = '3333'
mdc_attr = '/ade/kgurupra_dte2941/oracle/work/config.properties'
mdc_attr = '/ade/kgurupra_dte2941/oracle/work/config.properties'
ohs_instance1_wls_user = 'weblogic'
rwg_nodemgr_port = '5556'
ohs_instance1_wls_pwd = 'welcome1'
rwg_wg1_hostname = 'slc12pcc.us.oracle.com'
rwg_wg2_hostname = 'slc12pcc.us.oracle.com'
rwg_wg3_hostname = 'slc12pcc.us.oracle.com'
rwg_wg4_hostname = ''
ohs_instance1_wls_domain_name = 'OHSDomain_rwg'
ohs_instance1_wls_domain_home = '/scratch/kgurupra/APR14/ohs1932/user_projects/domains/OHSDomain_rwg'
ohs_instance1_mw_home = '/scratch/kgurupra/APR14/ohs1932'
ohs_instance1_wl_home = '/scratch/kgurupra/APR14/ohs1932/wlserver'
ohs_instance1_common_oracle_home = '/scratch/kgurupra/APR14/ohs1932/oracle_common'
ohs_instance1_ohs_instance_name = 'rwg6222'
ohs_instance1_listen_port = '6222'
ohs_instance1_ssl_listen_port = '6223'
ohs_instance1_admin_port = '6221'
ohs_instance1_wgid = 'WG6222'
ohs_instance1_wg_port = '6222'
ohs_instance2_wls_user = 'weblogic'
ohs_instance2_wls_pwd = 'welcome1'
ohs_instance2_wls_domain_name = 'OHSDomain_rwg'
ohs_instance2_wls_domain_home = '/scratch/kgurupra/APR14/ohs1932/user_projects/domains/OHSDomain_rwg'
ohs_instance2_mw_home = '/scratch/kgurupra/APR14/ohs1932'
ohs_instance2_wl_home = '/scratch/kgurupra/APR14/ohs1932/wlserver'
ohs_instance2_common_oracle_home = '/scratch/kgurupra/APR14/ohs1932/oracle_common'
ohs_instance2_ohs_instance_name = 'rwg7222'
ohs_instance2_listen_port = '7222'
ohs_instance2_ssl_listen_port = '7223'
ohs_instance2_admin_port = '7221'
ohs_instance2_wgid = 'WG7222'
ohs_instance2_wg_port = '7222'
ohs_instance3_wls_user = 'weblogic'
ohs_instance3_wls_pwd = 'welcome1'
ohs_instance3_wls_domain_name = 'OHSDomain_rwg'
ohs_instance3_wls_domain_home = '/scratch/kgurupra/APR14/ohs1932/user_projects/domains/OHSDomain_rwg'
ohs_instance3_mw_home = '/scratch/kgurupra/APR14/ohs1932'
ohs_instance3_wl_home = '/scratch/kgurupra/APR14/ohs1932/wlserver'
ohs_instance3_common_oracle_home = '/scratch/kgurupra/APR14/ohs1932/oracle_common'
ohs_instance3_ohs_instance_name = 'rwg8222'
ohs_instance3_listen_port = '8222'
ohs_instance3_ssl_listen_port = '8223'
ohs_instance3_admin_port = '8221'
ohs_instance3_wgid = 'WG8222'
ohs_instance3_wg_port = '8222'
ohs_instance4_wls_user = 'weblogic'
ohs_instance4_wls_pwd = 'welcome1'
ohs_instance4_wls_domain_name = 'OHSDomain_rwg'
ohs_instance4_wls_domain_home = '/scratch/kgurupra/APR14/ohs1932/user_projects/domains/OHSDomain_rwg'
ohs_instance4_mw_home = '/scratch/kgurupra/APR14/ohs1932'
ohs_instance4_wl_home = '/scratch/kgurupra/APR14/ohs1932/wlserver'
ohs_instance4_common_oracle_home = '/scratch/kgurupra/APR14/ohs1932/oracle_common'
ohs_instance4_ohs_instance_name = 'rwg9222'
ohs_instance4_listen_port = '9222'
ohs_instance4_ssl_listen_port = '9223'
ohs_instance4_admin_port = '9221'
ohs_instance4_wgid = 'WG9222'
ohs_instance4_wg_port = '9222'
def __init__(self):
self.another_variable = 'another value' |
List_of_numbers = [5,10,15,20,25]
for numbers in List_of_numbers:
print (numbers **10)
Values_list=[]
Values_list.append(numbers **10)
print(Values_list)
| list_of_numbers = [5, 10, 15, 20, 25]
for numbers in List_of_numbers:
print(numbers ** 10)
values_list = []
Values_list.append(numbers ** 10)
print(Values_list) |
q = 'a'
while(q != 'q'):
print("estou em looping")
q = input("Insira algo> ")
else:
print("fim") | q = 'a'
while q != 'q':
print('estou em looping')
q = input('Insira algo> ')
else:
print('fim') |
# cnt = int(input())
# for i in range(cnt):
# rep = int(input())
# arr = list(str(input()))
# for j in range(len(arr)):
# prt = arr[j]
# for _ in range(rep):
# print(prt,end="")
# print()
cnt = int(input())
for i in range(cnt):
(rep,arr) = map(str,input().split())
arr = list(str(arr))
for j in range(len(arr)):
prt = arr[j]
for _ in range(int(rep)):
print(prt,end="")
print() | cnt = int(input())
for i in range(cnt):
(rep, arr) = map(str, input().split())
arr = list(str(arr))
for j in range(len(arr)):
prt = arr[j]
for _ in range(int(rep)):
print(prt, end='')
print() |
class SwapUser:
def __init__(self, exposure, collateral_perc, fee_perc):
self.exposure = exposure
self.collateral = collateral_perc
self.collateral_value = collateral_perc * exposure
self.fee = fee_perc * exposure
self.is_active = True
self.is_liquidated = False
self.quantity = 0
self.entered_on = 0
self.exited_on = 0
self.liquidated_on = 0
self.profit = 0
self.entry_price = 0
self.exit_price = 0
def enter_swap(self, unix, price):
self.quantity = self.exposure / price
self.entered_on = unix
self.entry_price = price
return self.entered_on
def close_swap(self, unix, price):
self.exited_on = unix
self.exit_price = price
self.profit = self.quantity * (self.exit_price - self.entry_price)
if -1 * self.profit >= self.collateral_value:
self.is_liquidated = True
self.treasury_profit = self.fee + (self.collateral_value + self.profit)
else:
self.treasury_profit = self.fee
| class Swapuser:
def __init__(self, exposure, collateral_perc, fee_perc):
self.exposure = exposure
self.collateral = collateral_perc
self.collateral_value = collateral_perc * exposure
self.fee = fee_perc * exposure
self.is_active = True
self.is_liquidated = False
self.quantity = 0
self.entered_on = 0
self.exited_on = 0
self.liquidated_on = 0
self.profit = 0
self.entry_price = 0
self.exit_price = 0
def enter_swap(self, unix, price):
self.quantity = self.exposure / price
self.entered_on = unix
self.entry_price = price
return self.entered_on
def close_swap(self, unix, price):
self.exited_on = unix
self.exit_price = price
self.profit = self.quantity * (self.exit_price - self.entry_price)
if -1 * self.profit >= self.collateral_value:
self.is_liquidated = True
self.treasury_profit = self.fee + (self.collateral_value + self.profit)
else:
self.treasury_profit = self.fee |
class SquareGrid:
def __init__(self, width, height):
self.width = width
self.height = height
self.walls = []
def in_bounds(self, node_id):
(x, y) = node_id
return 0 <= x < self.width and 0 <= y < self.height
def passable(self, node_id):
return node_id not in self.walls
def neighbors(self, node_id):
(x, y) = node_id
results = [(x + 1, y), (x, y - 1), (x - 1, y), (x, y + 1)]
if (x + y) % 2 == 0:
results.reverse() # Aesthetics
results = filter(self.in_bounds, results)
results = filter(self.passable, results)
return results
class WeightedGrid(SquareGrid):
def __init__(self, width, height):
super().__init__(width, height)
self.weights = {}
def cost(self, from_node, to_node):
# Ignore from_node
return self.weights.get(to_node, 1)
| class Squaregrid:
def __init__(self, width, height):
self.width = width
self.height = height
self.walls = []
def in_bounds(self, node_id):
(x, y) = node_id
return 0 <= x < self.width and 0 <= y < self.height
def passable(self, node_id):
return node_id not in self.walls
def neighbors(self, node_id):
(x, y) = node_id
results = [(x + 1, y), (x, y - 1), (x - 1, y), (x, y + 1)]
if (x + y) % 2 == 0:
results.reverse()
results = filter(self.in_bounds, results)
results = filter(self.passable, results)
return results
class Weightedgrid(SquareGrid):
def __init__(self, width, height):
super().__init__(width, height)
self.weights = {}
def cost(self, from_node, to_node):
return self.weights.get(to_node, 1) |
#
# PySNMP MIB module NETSCREEN-OSPF-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/NETSCREEN-OSPF-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:10:23 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsIntersection, ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "ConstraintsUnion", "ValueRangeConstraint", "SingleValueConstraint", "ValueSizeConstraint")
netscreenVR, = mibBuilder.importSymbols("NETSCREEN-SMI", "netscreenVR")
NotificationGroup, ObjectGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ObjectGroup", "ModuleCompliance")
Bits, Integer32, MibIdentifier, NotificationType, Unsigned32, Gauge32, ModuleIdentity, TimeTicks, Counter64, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, mib_2, ObjectIdentity, IpAddress, iso = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Integer32", "MibIdentifier", "NotificationType", "Unsigned32", "Gauge32", "ModuleIdentity", "TimeTicks", "Counter64", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "mib-2", "ObjectIdentity", "IpAddress", "iso")
DisplayString, RowStatus, TextualConvention, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "RowStatus", "TextualConvention", "TruthValue")
nsOspf = ModuleIdentity((1, 3, 6, 1, 4, 1, 3224, 18, 2))
if mibBuilder.loadTexts: nsOspf.setLastUpdated('200506032022Z')
if mibBuilder.loadTexts: nsOspf.setOrganization('Juniper Networks, Inc.')
class AreaID(TextualConvention, IpAddress):
status = 'deprecated'
class RouterID(TextualConvention, IpAddress):
status = 'deprecated'
class Metric(TextualConvention, Integer32):
status = 'deprecated'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 65535)
class BigMetric(TextualConvention, Integer32):
status = 'deprecated'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 16777215)
class Status(TextualConvention, Integer32):
status = 'deprecated'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("enabled", 1), ("disabled", 2))
class PositiveInteger(TextualConvention, Integer32):
status = 'deprecated'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 2147483647)
class HelloRange(TextualConvention, Integer32):
status = 'deprecated'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(1, 65535)
class UpToMaxAge(TextualConvention, Integer32):
status = 'deprecated'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 3600)
class InterfaceIndex(TextualConvention, Integer32):
status = 'deprecated'
class DesignatedRouterPriority(TextualConvention, Integer32):
status = 'deprecated'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 255)
class TOSType(TextualConvention, Integer32):
status = 'deprecated'
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 30)
nsOspfGeneralTable = MibTable((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1), )
if mibBuilder.loadTexts: nsOspfGeneralTable.setStatus('deprecated')
nsOspfGeneralEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1), ).setIndexNames((0, "NETSCREEN-OSPF-MIB", "nsOspfGeneralVRID"))
if mibBuilder.loadTexts: nsOspfGeneralEntry.setStatus('deprecated')
nsOspfRouterId = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 1), RouterID()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfRouterId.setStatus('deprecated')
nsOspfAdminStat = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 2), Status()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfAdminStat.setStatus('deprecated')
nsOspfVersionNumber = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(2))).clone(namedValues=NamedValues(("version2", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfVersionNumber.setStatus('deprecated')
nsOspfAreaBdrRtrStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 4), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfAreaBdrRtrStatus.setStatus('deprecated')
nsOspfASBdrRtrStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 5), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfASBdrRtrStatus.setStatus('deprecated')
nsOspfExternLsaCount = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 6), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfExternLsaCount.setStatus('deprecated')
nsOspfExternLsaCksumSum = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfExternLsaCksumSum.setStatus('deprecated')
nsOspfTOSSupport = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 8), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfTOSSupport.setStatus('deprecated')
nsOspfOriginateNewLsas = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfOriginateNewLsas.setStatus('deprecated')
nsOspfRxNewLsas = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfRxNewLsas.setStatus('deprecated')
nsOspfExtLsdbLimit = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1, 2147483647)).clone(-1)).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfExtLsdbLimit.setStatus('deprecated')
nsOspfMulticastExtensions = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 12), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfMulticastExtensions.setStatus('deprecated')
nsOspfExitOverflowInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 13), PositiveInteger()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfExitOverflowInterval.setStatus('deprecated')
nsOspfDemandExtensions = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 14), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfDemandExtensions.setStatus('deprecated')
nsOspfGeneralVRID = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 15), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfGeneralVRID.setStatus('deprecated')
nsOspfAreaTable = MibTable((1, 3, 6, 1, 4, 1, 3224, 18, 2, 2), )
if mibBuilder.loadTexts: nsOspfAreaTable.setStatus('deprecated')
nsOspfAreaEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3224, 18, 2, 2, 1), ).setIndexNames((0, "NETSCREEN-OSPF-MIB", "nsOspfAreaId"), (0, "NETSCREEN-OSPF-MIB", "nsOspfAreaVRID"))
if mibBuilder.loadTexts: nsOspfAreaEntry.setStatus('deprecated')
nsOspfAreaId = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 2, 1, 1), AreaID()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfAreaId.setStatus('deprecated')
nsOspfImportAsExtern = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 2, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("importExternal", 1), ("importNoExternal", 2), ("importNssa", 3))).clone('importExternal')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfImportAsExtern.setStatus('deprecated')
nsOspfSpfRuns = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 2, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfSpfRuns.setStatus('deprecated')
nsOspfAreaBdrRtrCount = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 2, 1, 5), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfAreaBdrRtrCount.setStatus('deprecated')
nsOspfAsBdrRtrCount = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 2, 1, 6), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfAsBdrRtrCount.setStatus('deprecated')
nsOspfAreaLsaCount = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 2, 1, 7), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfAreaLsaCount.setStatus('deprecated')
nsOspfAreaLsaCksumSum = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 2, 1, 8), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfAreaLsaCksumSum.setStatus('deprecated')
nsOspfAreaSummary = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 2, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("noAreaSummary", 1), ("sendAreaSummary", 2))).clone('noAreaSummary')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfAreaSummary.setStatus('deprecated')
nsOspfAreaStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 2, 1, 10), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfAreaStatus.setStatus('deprecated')
nsOspfAreaVRID = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 2, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfAreaVRID.setStatus('deprecated')
nsOspfStubAreaTable = MibTable((1, 3, 6, 1, 4, 1, 3224, 18, 2, 3), )
if mibBuilder.loadTexts: nsOspfStubAreaTable.setStatus('deprecated')
nsOspfStubAreaEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3224, 18, 2, 3, 1), ).setIndexNames((0, "NETSCREEN-OSPF-MIB", "nsOspfStubAreaId"), (0, "NETSCREEN-OSPF-MIB", "nsOspfStubTOS"), (0, "NETSCREEN-OSPF-MIB", "nsOspfStubVRID"))
if mibBuilder.loadTexts: nsOspfStubAreaEntry.setStatus('deprecated')
nsOspfStubAreaId = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 3, 1, 1), AreaID()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfStubAreaId.setStatus('deprecated')
nsOspfStubTOS = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 3, 1, 2), TOSType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfStubTOS.setStatus('deprecated')
nsOspfStubMetric = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 3, 1, 3), BigMetric()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfStubMetric.setStatus('deprecated')
nsOspfStubStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 3, 1, 4), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfStubStatus.setStatus('deprecated')
nsOspfStubMetricType = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 3, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("nsOspfMetric", 1), ("comparableCost", 2), ("nonComparable", 3))).clone('nsOspfMetric')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfStubMetricType.setStatus('deprecated')
nsOspfStubVRID = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 3, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfStubVRID.setStatus('deprecated')
nsOspfLsdbTable = MibTable((1, 3, 6, 1, 4, 1, 3224, 18, 2, 4), )
if mibBuilder.loadTexts: nsOspfLsdbTable.setStatus('deprecated')
nsOspfLsdbEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3224, 18, 2, 4, 1), ).setIndexNames((0, "NETSCREEN-OSPF-MIB", "nsOspfLsdbAreaId"), (0, "NETSCREEN-OSPF-MIB", "nsOspfLsdbType"), (0, "NETSCREEN-OSPF-MIB", "nsOspfLsdbLsid"), (0, "NETSCREEN-OSPF-MIB", "nsOspfLsdbRouterId"), (0, "NETSCREEN-OSPF-MIB", "nsOspfLsdbVRID"))
if mibBuilder.loadTexts: nsOspfLsdbEntry.setStatus('deprecated')
nsOspfLsdbAreaId = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 4, 1, 1), AreaID()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfLsdbAreaId.setStatus('deprecated')
nsOspfLsdbType = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 4, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("routerLink", 1), ("networkLink", 2), ("summaryLink", 3), ("asSummaryLink", 4), ("asExternalLink", 5), ("multicastLink", 6), ("nssaExternalLink", 7)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfLsdbType.setStatus('deprecated')
nsOspfLsdbLsid = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 4, 1, 3), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfLsdbLsid.setStatus('deprecated')
nsOspfLsdbRouterId = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 4, 1, 4), RouterID()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfLsdbRouterId.setStatus('deprecated')
nsOspfLsdbSequence = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 4, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfLsdbSequence.setStatus('deprecated')
nsOspfLsdbAge = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 4, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfLsdbAge.setStatus('deprecated')
nsOspfLsdbChecksum = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 4, 1, 7), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfLsdbChecksum.setStatus('deprecated')
nsOspfLsdbAdvertisement = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 4, 1, 8), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfLsdbAdvertisement.setStatus('deprecated')
nsOspfLsdbVRID = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 4, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfLsdbVRID.setStatus('deprecated')
nsOspfHostTable = MibTable((1, 3, 6, 1, 4, 1, 3224, 18, 2, 6), )
if mibBuilder.loadTexts: nsOspfHostTable.setStatus('deprecated')
nsOspfHostEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3224, 18, 2, 6, 1), ).setIndexNames((0, "NETSCREEN-OSPF-MIB", "nsOspfHostIpAddress"), (0, "NETSCREEN-OSPF-MIB", "nsOspfHostTOS"), (0, "NETSCREEN-OSPF-MIB", "nsOspfHostVRID"))
if mibBuilder.loadTexts: nsOspfHostEntry.setStatus('deprecated')
nsOspfHostIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 6, 1, 1), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfHostIpAddress.setStatus('deprecated')
nsOspfHostTOS = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 6, 1, 2), TOSType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfHostTOS.setStatus('deprecated')
nsOspfHostMetric = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 6, 1, 3), Metric()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfHostMetric.setStatus('deprecated')
nsOspfHostStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 6, 1, 4), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfHostStatus.setStatus('deprecated')
nsOspfHostAreaID = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 6, 1, 5), AreaID()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfHostAreaID.setStatus('deprecated')
nsOspfHostVRID = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 6, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfHostVRID.setStatus('deprecated')
nsOspfIfTable = MibTable((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7), )
if mibBuilder.loadTexts: nsOspfIfTable.setStatus('deprecated')
nsOspfIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1), ).setIndexNames((0, "NETSCREEN-OSPF-MIB", "nsOspfIfIpAddress"), (0, "NETSCREEN-OSPF-MIB", "nsOspfAddressLessIf"), (0, "NETSCREEN-OSPF-MIB", "nsOspfIfVRID"))
if mibBuilder.loadTexts: nsOspfIfEntry.setStatus('deprecated')
nsOspfIfIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 1), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfIfIpAddress.setStatus('deprecated')
nsOspfAddressLessIf = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfAddressLessIf.setStatus('deprecated')
nsOspfIfAreaId = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 3), AreaID().clone(hexValue="00000000")).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfIfAreaId.setStatus('deprecated')
nsOspfIfType = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 5))).clone(namedValues=NamedValues(("broadcast", 1), ("nbma", 2), ("pointToPoint", 3), ("pointToMultipoint", 5)))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfIfType.setStatus('deprecated')
nsOspfIfAdminStat = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 5), Status().clone('enabled')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfIfAdminStat.setStatus('deprecated')
nsOspfIfRtrPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 6), DesignatedRouterPriority().clone(1)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfIfRtrPriority.setStatus('deprecated')
nsOspfIfTransitDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 7), UpToMaxAge().clone(1)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfIfTransitDelay.setStatus('deprecated')
nsOspfIfRetransInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 8), UpToMaxAge().clone(5)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfIfRetransInterval.setStatus('deprecated')
nsOspfIfHelloInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 9), HelloRange().clone(10)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfIfHelloInterval.setStatus('deprecated')
nsOspfIfRtrDeadInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 10), PositiveInteger().clone(40)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfIfRtrDeadInterval.setStatus('deprecated')
nsOspfIfPollInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 11), PositiveInteger().clone(120)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfIfPollInterval.setStatus('deprecated')
nsOspfIfState = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("down", 1), ("loopback", 2), ("waiting", 3), ("pointToPoint", 4), ("designatedRouter", 5), ("backupDesignatedRouter", 6), ("otherDesignatedRouter", 7))).clone('down')).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfIfState.setStatus('deprecated')
nsOspfIfDesignatedRouter = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 13), IpAddress().clone(hexValue="00000000")).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfIfDesignatedRouter.setStatus('deprecated')
nsOspfIfBackupDesignatedRouter = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 14), IpAddress().clone(hexValue="00000000")).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfIfBackupDesignatedRouter.setStatus('deprecated')
nsOspfIfEvents = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 15), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfIfEvents.setStatus('deprecated')
nsOspfIfAuthKey = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 16), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 256)).clone(hexValue="0000000000000000")).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfIfAuthKey.setStatus('deprecated')
nsOspfIfStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 17), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfIfStatus.setStatus('deprecated')
nsOspfIfMulticastForwarding = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("blocked", 1), ("multicast", 2), ("unicast", 3))).clone('blocked')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfIfMulticastForwarding.setStatus('deprecated')
nsOspfIfDemand = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 19), TruthValue().clone('false')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfIfDemand.setStatus('deprecated')
nsOspfIfAuthType = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 20), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfIfAuthType.setStatus('deprecated')
nsOspfIfVRID = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 21), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfIfVRID.setStatus('deprecated')
nsOspfIfMetricTable = MibTable((1, 3, 6, 1, 4, 1, 3224, 18, 2, 8), )
if mibBuilder.loadTexts: nsOspfIfMetricTable.setStatus('deprecated')
nsOspfIfMetricEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3224, 18, 2, 8, 1), ).setIndexNames((0, "NETSCREEN-OSPF-MIB", "nsOspfIfMetricIpAddress"), (0, "NETSCREEN-OSPF-MIB", "nsOspfIfMetricAddressLessIf"), (0, "NETSCREEN-OSPF-MIB", "nsOspfIfMetricTOS"), (0, "NETSCREEN-OSPF-MIB", "nsOspfIfMetricVRID"))
if mibBuilder.loadTexts: nsOspfIfMetricEntry.setStatus('deprecated')
nsOspfIfMetricIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 8, 1, 1), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfIfMetricIpAddress.setStatus('deprecated')
nsOspfIfMetricAddressLessIf = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 8, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfIfMetricAddressLessIf.setStatus('deprecated')
nsOspfIfMetricTOS = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 8, 1, 3), TOSType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfIfMetricTOS.setStatus('deprecated')
nsOspfIfMetricValue = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 8, 1, 4), Metric()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfIfMetricValue.setStatus('deprecated')
nsOspfIfMetricStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 8, 1, 5), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfIfMetricStatus.setStatus('deprecated')
nsOspfIfMetricVRID = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 8, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfIfMetricVRID.setStatus('deprecated')
nsOspfVirtIfTable = MibTable((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9), )
if mibBuilder.loadTexts: nsOspfVirtIfTable.setStatus('deprecated')
nsOspfVirtIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1), ).setIndexNames((0, "NETSCREEN-OSPF-MIB", "nsOspfVirtIfAreaId"), (0, "NETSCREEN-OSPF-MIB", "nsOspfVirtIfNeighbor"), (0, "NETSCREEN-OSPF-MIB", "nsOspfVirtIfVRID"))
if mibBuilder.loadTexts: nsOspfVirtIfEntry.setStatus('deprecated')
nsOspfVirtIfAreaId = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1, 1), AreaID()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfVirtIfAreaId.setStatus('deprecated')
nsOspfVirtIfNeighbor = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1, 2), RouterID()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfVirtIfNeighbor.setStatus('deprecated')
nsOspfVirtIfTransitDelay = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1, 3), UpToMaxAge().clone(1)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfVirtIfTransitDelay.setStatus('deprecated')
nsOspfVirtIfRetransInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1, 4), UpToMaxAge().clone(5)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfVirtIfRetransInterval.setStatus('deprecated')
nsOspfVirtIfHelloInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1, 5), HelloRange().clone(10)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfVirtIfHelloInterval.setStatus('deprecated')
nsOspfVirtIfRtrDeadInterval = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1, 6), PositiveInteger().clone(60)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfVirtIfRtrDeadInterval.setStatus('deprecated')
nsOspfVirtIfState = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 4))).clone(namedValues=NamedValues(("down", 1), ("pointToPoint", 4))).clone('down')).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfVirtIfState.setStatus('deprecated')
nsOspfVirtIfEvents = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfVirtIfEvents.setStatus('deprecated')
nsOspfVirtIfAuthKey = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1, 9), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 256)).clone(hexValue="0000000000000000")).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfVirtIfAuthKey.setStatus('deprecated')
nsOspfVirtIfStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1, 10), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfVirtIfStatus.setStatus('deprecated')
nsOspfVirtIfAuthType = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1, 11), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 255))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfVirtIfAuthType.setStatus('deprecated')
nsOspfVirtIfVRID = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfVirtIfVRID.setStatus('deprecated')
nsOspfNbrTable = MibTable((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10), )
if mibBuilder.loadTexts: nsOspfNbrTable.setStatus('deprecated')
nsOspfNbrEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1), ).setIndexNames((0, "NETSCREEN-OSPF-MIB", "nsOspfNbrIpAddr"), (0, "NETSCREEN-OSPF-MIB", "nsOspfNbrAddressLessIndex"), (0, "NETSCREEN-OSPF-MIB", "nsOspfNbrVRID"))
if mibBuilder.loadTexts: nsOspfNbrEntry.setStatus('deprecated')
nsOspfNbrIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1, 1), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfNbrIpAddr.setStatus('deprecated')
nsOspfNbrAddressLessIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1, 2), InterfaceIndex()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfNbrAddressLessIndex.setStatus('deprecated')
nsOspfNbrRtrId = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1, 3), RouterID().clone(hexValue="00000000")).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfNbrRtrId.setStatus('deprecated')
nsOspfNbrOptions = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfNbrOptions.setStatus('deprecated')
nsOspfNbrPriority = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1, 5), DesignatedRouterPriority().clone(1)).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfNbrPriority.setStatus('deprecated')
nsOspfNbrState = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("down", 1), ("attempt", 2), ("init", 3), ("twoWay", 4), ("exchangeStart", 5), ("exchange", 6), ("loading", 7), ("full", 8))).clone('down')).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfNbrState.setStatus('deprecated')
nsOspfNbrEvents = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfNbrEvents.setStatus('deprecated')
nsOspfNbrLsRetransQLen = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1, 8), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfNbrLsRetransQLen.setStatus('deprecated')
nsOspfNbmaNbrStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1, 9), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfNbmaNbrStatus.setStatus('deprecated')
nsOspfNbmaNbrPermanence = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("dynamic", 1), ("permanent", 2))).clone('permanent')).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfNbmaNbrPermanence.setStatus('deprecated')
nsOspfNbrHelloSuppressed = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1, 11), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfNbrHelloSuppressed.setStatus('deprecated')
nsOspfNbrVRID = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1, 12), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfNbrVRID.setStatus('deprecated')
nsOspfVirtNbrTable = MibTable((1, 3, 6, 1, 4, 1, 3224, 18, 2, 11), )
if mibBuilder.loadTexts: nsOspfVirtNbrTable.setStatus('deprecated')
nsOspfVirtNbrEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3224, 18, 2, 11, 1), ).setIndexNames((0, "NETSCREEN-OSPF-MIB", "nsOspfVirtNbrArea"), (0, "NETSCREEN-OSPF-MIB", "nsOspfVirtNbrRtrId"), (0, "NETSCREEN-OSPF-MIB", "nsOspfVirtNbrVRID"))
if mibBuilder.loadTexts: nsOspfVirtNbrEntry.setStatus('deprecated')
nsOspfVirtNbrArea = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 11, 1, 1), AreaID()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfVirtNbrArea.setStatus('deprecated')
nsOspfVirtNbrRtrId = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 11, 1, 2), RouterID()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfVirtNbrRtrId.setStatus('deprecated')
nsOspfVirtNbrIpAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 11, 1, 3), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfVirtNbrIpAddr.setStatus('deprecated')
nsOspfVirtNbrOptions = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 11, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfVirtNbrOptions.setStatus('deprecated')
nsOspfVirtNbrState = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 11, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=NamedValues(("down", 1), ("attempt", 2), ("init", 3), ("twoWay", 4), ("exchangeStart", 5), ("exchange", 6), ("loading", 7), ("full", 8)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfVirtNbrState.setStatus('deprecated')
nsOspfVirtNbrEvents = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 11, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfVirtNbrEvents.setStatus('deprecated')
nsOspfVirtNbrLsRetransQLen = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 11, 1, 7), Gauge32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfVirtNbrLsRetransQLen.setStatus('deprecated')
nsOspfVirtNbrHelloSuppressed = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 11, 1, 8), TruthValue()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfVirtNbrHelloSuppressed.setStatus('deprecated')
nsOspfVirtNbrVRID = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 11, 1, 9), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfVirtNbrVRID.setStatus('deprecated')
nsOspfExtLsdbTable = MibTable((1, 3, 6, 1, 4, 1, 3224, 18, 2, 12), )
if mibBuilder.loadTexts: nsOspfExtLsdbTable.setStatus('deprecated')
nsOspfExtLsdbEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3224, 18, 2, 12, 1), ).setIndexNames((0, "NETSCREEN-OSPF-MIB", "nsOspfExtLsdbType"), (0, "NETSCREEN-OSPF-MIB", "nsOspfExtLsdbLsid"), (0, "NETSCREEN-OSPF-MIB", "nsOspfExtLsdbRouterId"), (0, "NETSCREEN-OSPF-MIB", "nsOspfExtLsdbVRID"))
if mibBuilder.loadTexts: nsOspfExtLsdbEntry.setStatus('deprecated')
nsOspfExtLsdbType = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 12, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(5))).clone(namedValues=NamedValues(("asExternalLink", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfExtLsdbType.setStatus('deprecated')
nsOspfExtLsdbLsid = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 12, 1, 2), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfExtLsdbLsid.setStatus('deprecated')
nsOspfExtLsdbRouterId = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 12, 1, 3), RouterID()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfExtLsdbRouterId.setStatus('deprecated')
nsOspfExtLsdbSequence = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 12, 1, 4), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfExtLsdbSequence.setStatus('deprecated')
nsOspfExtLsdbAge = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 12, 1, 5), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfExtLsdbAge.setStatus('deprecated')
nsOspfExtLsdbChecksum = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 12, 1, 6), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfExtLsdbChecksum.setStatus('deprecated')
nsOspfExtLsdbAdvertisement = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 12, 1, 7), OctetString().subtype(subtypeSpec=ValueSizeConstraint(36, 36)).setFixedLength(36)).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfExtLsdbAdvertisement.setStatus('deprecated')
nsOspfExtLsdbVRID = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 12, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfExtLsdbVRID.setStatus('deprecated')
nsOspfAreaAggregateTable = MibTable((1, 3, 6, 1, 4, 1, 3224, 18, 2, 14), )
if mibBuilder.loadTexts: nsOspfAreaAggregateTable.setStatus('deprecated')
nsOspfAreaAggregateEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3224, 18, 2, 14, 1), ).setIndexNames((0, "NETSCREEN-OSPF-MIB", "nsOspfAreaAggregateAreaID"), (0, "NETSCREEN-OSPF-MIB", "nsOspfAreaAggregateLsdbType"), (0, "NETSCREEN-OSPF-MIB", "nsOspfAreaAggregateNet"), (0, "NETSCREEN-OSPF-MIB", "nsOspfAreaAggregateMask"), (0, "NETSCREEN-OSPF-MIB", "nsOspfAreaAggregateVRID"))
if mibBuilder.loadTexts: nsOspfAreaAggregateEntry.setStatus('deprecated')
nsOspfAreaAggregateAreaID = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 14, 1, 1), AreaID()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfAreaAggregateAreaID.setStatus('deprecated')
nsOspfAreaAggregateLsdbType = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 14, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(3, 7))).clone(namedValues=NamedValues(("summaryLink", 3), ("nssaExternalLink", 7)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfAreaAggregateLsdbType.setStatus('deprecated')
nsOspfAreaAggregateNet = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 14, 1, 3), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfAreaAggregateNet.setStatus('deprecated')
nsOspfAreaAggregateMask = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 14, 1, 4), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfAreaAggregateMask.setStatus('deprecated')
nsOspfAreaAggregateStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 14, 1, 5), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfAreaAggregateStatus.setStatus('deprecated')
nsOspfAreaAggregateEffect = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 14, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("advertiseMatching", 1), ("doNotAdvertiseMatching", 2))).clone('advertiseMatching')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: nsOspfAreaAggregateEffect.setStatus('deprecated')
nsOspfAreaAggregateVRID = MibTableColumn((1, 3, 6, 1, 4, 1, 3224, 18, 2, 14, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly")
if mibBuilder.loadTexts: nsOspfAreaAggregateVRID.setStatus('deprecated')
mibBuilder.exportSymbols("NETSCREEN-OSPF-MIB", nsOspfLsdbLsid=nsOspfLsdbLsid, nsOspfHostStatus=nsOspfHostStatus, nsOspfVirtIfNeighbor=nsOspfVirtIfNeighbor, nsOspfVirtIfAuthType=nsOspfVirtIfAuthType, nsOspfExtLsdbChecksum=nsOspfExtLsdbChecksum, nsOspfHostAreaID=nsOspfHostAreaID, nsOspfAreaAggregateAreaID=nsOspfAreaAggregateAreaID, nsOspfSpfRuns=nsOspfSpfRuns, nsOspfIfAdminStat=nsOspfIfAdminStat, nsOspfVirtIfTable=nsOspfVirtIfTable, nsOspfIfType=nsOspfIfType, nsOspfVirtIfStatus=nsOspfVirtIfStatus, nsOspfAreaAggregateStatus=nsOspfAreaAggregateStatus, nsOspfNbrAddressLessIndex=nsOspfNbrAddressLessIndex, nsOspfHostEntry=nsOspfHostEntry, nsOspfNbrPriority=nsOspfNbrPriority, nsOspfAreaVRID=nsOspfAreaVRID, nsOspfHostTOS=nsOspfHostTOS, nsOspfLsdbAreaId=nsOspfLsdbAreaId, nsOspfIfMetricAddressLessIf=nsOspfIfMetricAddressLessIf, nsOspfStubAreaTable=nsOspfStubAreaTable, nsOspfStubStatus=nsOspfStubStatus, DesignatedRouterPriority=DesignatedRouterPriority, nsOspfIfDemand=nsOspfIfDemand, nsOspfIfMetricEntry=nsOspfIfMetricEntry, nsOspfAreaAggregateMask=nsOspfAreaAggregateMask, AreaID=AreaID, nsOspfAreaLsaCount=nsOspfAreaLsaCount, nsOspfNbrIpAddr=nsOspfNbrIpAddr, nsOspfGeneralVRID=nsOspfGeneralVRID, nsOspfLsdbTable=nsOspfLsdbTable, nsOspfAddressLessIf=nsOspfAddressLessIf, nsOspfIfIpAddress=nsOspfIfIpAddress, Metric=Metric, nsOspfIfVRID=nsOspfIfVRID, nsOspfExtLsdbAdvertisement=nsOspfExtLsdbAdvertisement, nsOspfIfMulticastForwarding=nsOspfIfMulticastForwarding, nsOspfHostIpAddress=nsOspfHostIpAddress, nsOspfAreaAggregateEntry=nsOspfAreaAggregateEntry, nsOspfTOSSupport=nsOspfTOSSupport, nsOspfAreaAggregateEffect=nsOspfAreaAggregateEffect, nsOspfAreaId=nsOspfAreaId, PYSNMP_MODULE_ID=nsOspf, nsOspfVirtIfState=nsOspfVirtIfState, HelloRange=HelloRange, nsOspfStubMetricType=nsOspfStubMetricType, nsOspfAreaAggregateLsdbType=nsOspfAreaAggregateLsdbType, nsOspfExternLsaCksumSum=nsOspfExternLsaCksumSum, nsOspfNbrOptions=nsOspfNbrOptions, nsOspfGeneralTable=nsOspfGeneralTable, nsOspfExtLsdbVRID=nsOspfExtLsdbVRID, nsOspfStubTOS=nsOspfStubTOS, nsOspfLsdbRouterId=nsOspfLsdbRouterId, nsOspfVirtIfEvents=nsOspfVirtIfEvents, nsOspfIfMetricVRID=nsOspfIfMetricVRID, nsOspfExtLsdbLsid=nsOspfExtLsdbLsid, nsOspfLsdbAdvertisement=nsOspfLsdbAdvertisement, nsOspfMulticastExtensions=nsOspfMulticastExtensions, PositiveInteger=PositiveInteger, nsOspfIfTable=nsOspfIfTable, nsOspfLsdbEntry=nsOspfLsdbEntry, nsOspfExternLsaCount=nsOspfExternLsaCount, nsOspfOriginateNewLsas=nsOspfOriginateNewLsas, nsOspfVirtNbrIpAddr=nsOspfVirtNbrIpAddr, nsOspfVirtNbrVRID=nsOspfVirtNbrVRID, nsOspfAreaBdrRtrCount=nsOspfAreaBdrRtrCount, nsOspfVirtNbrEntry=nsOspfVirtNbrEntry, nsOspfIfEntry=nsOspfIfEntry, nsOspfIfTransitDelay=nsOspfIfTransitDelay, nsOspfIfRtrPriority=nsOspfIfRtrPriority, nsOspfExtLsdbSequence=nsOspfExtLsdbSequence, nsOspfIfAuthKey=nsOspfIfAuthKey, nsOspfAdminStat=nsOspfAdminStat, nsOspfExtLsdbType=nsOspfExtLsdbType, nsOspfVirtIfRetransInterval=nsOspfVirtIfRetransInterval, nsOspfNbrRtrId=nsOspfNbrRtrId, nsOspfLsdbSequence=nsOspfLsdbSequence, nsOspfHostVRID=nsOspfHostVRID, nsOspfExtLsdbEntry=nsOspfExtLsdbEntry, nsOspfIfMetricTable=nsOspfIfMetricTable, nsOspf=nsOspf, nsOspfNbrEntry=nsOspfNbrEntry, nsOspfAreaAggregateTable=nsOspfAreaAggregateTable, nsOspfNbmaNbrPermanence=nsOspfNbmaNbrPermanence, nsOspfIfStatus=nsOspfIfStatus, nsOspfExtLsdbTable=nsOspfExtLsdbTable, nsOspfIfRetransInterval=nsOspfIfRetransInterval, nsOspfIfMetricValue=nsOspfIfMetricValue, nsOspfStubMetric=nsOspfStubMetric, nsOspfLsdbChecksum=nsOspfLsdbChecksum, nsOspfRxNewLsas=nsOspfRxNewLsas, nsOspfIfAreaId=nsOspfIfAreaId, nsOspfRouterId=nsOspfRouterId, nsOspfExtLsdbAge=nsOspfExtLsdbAge, nsOspfHostTable=nsOspfHostTable, nsOspfLsdbVRID=nsOspfLsdbVRID, nsOspfIfRtrDeadInterval=nsOspfIfRtrDeadInterval, nsOspfVirtNbrHelloSuppressed=nsOspfVirtNbrHelloSuppressed, Status=Status, nsOspfASBdrRtrStatus=nsOspfASBdrRtrStatus, nsOspfNbrTable=nsOspfNbrTable, nsOspfVirtNbrArea=nsOspfVirtNbrArea, nsOspfNbrHelloSuppressed=nsOspfNbrHelloSuppressed, nsOspfVirtNbrTable=nsOspfVirtNbrTable, nsOspfLsdbAge=nsOspfLsdbAge, nsOspfIfMetricStatus=nsOspfIfMetricStatus, nsOspfVirtNbrState=nsOspfVirtNbrState, BigMetric=BigMetric, nsOspfVirtNbrEvents=nsOspfVirtNbrEvents, nsOspfIfHelloInterval=nsOspfIfHelloInterval, nsOspfImportAsExtern=nsOspfImportAsExtern, nsOspfIfState=nsOspfIfState, nsOspfIfAuthType=nsOspfIfAuthType, nsOspfVirtIfTransitDelay=nsOspfVirtIfTransitDelay, nsOspfStubVRID=nsOspfStubVRID, nsOspfIfPollInterval=nsOspfIfPollInterval, nsOspfDemandExtensions=nsOspfDemandExtensions, nsOspfIfMetricTOS=nsOspfIfMetricTOS, nsOspfHostMetric=nsOspfHostMetric, TOSType=TOSType, nsOspfExtLsdbLimit=nsOspfExtLsdbLimit, nsOspfAreaEntry=nsOspfAreaEntry, nsOspfVirtIfVRID=nsOspfVirtIfVRID, UpToMaxAge=UpToMaxAge, nsOspfVirtNbrOptions=nsOspfVirtNbrOptions, nsOspfVirtNbrLsRetransQLen=nsOspfVirtNbrLsRetransQLen, nsOspfIfBackupDesignatedRouter=nsOspfIfBackupDesignatedRouter, nsOspfAreaLsaCksumSum=nsOspfAreaLsaCksumSum, nsOspfVirtIfEntry=nsOspfVirtIfEntry, nsOspfNbrVRID=nsOspfNbrVRID, nsOspfVirtIfAreaId=nsOspfVirtIfAreaId, nsOspfAreaStatus=nsOspfAreaStatus, nsOspfGeneralEntry=nsOspfGeneralEntry, nsOspfStubAreaEntry=nsOspfStubAreaEntry, nsOspfNbmaNbrStatus=nsOspfNbmaNbrStatus, InterfaceIndex=InterfaceIndex, nsOspfAreaSummary=nsOspfAreaSummary, nsOspfVirtIfHelloInterval=nsOspfVirtIfHelloInterval, nsOspfNbrLsRetransQLen=nsOspfNbrLsRetransQLen, nsOspfAreaAggregateVRID=nsOspfAreaAggregateVRID, nsOspfLsdbType=nsOspfLsdbType, nsOspfAreaTable=nsOspfAreaTable, nsOspfExtLsdbRouterId=nsOspfExtLsdbRouterId, nsOspfStubAreaId=nsOspfStubAreaId, nsOspfVersionNumber=nsOspfVersionNumber, nsOspfAreaBdrRtrStatus=nsOspfAreaBdrRtrStatus, nsOspfAsBdrRtrCount=nsOspfAsBdrRtrCount, nsOspfNbrEvents=nsOspfNbrEvents, nsOspfAreaAggregateNet=nsOspfAreaAggregateNet, nsOspfVirtNbrRtrId=nsOspfVirtNbrRtrId, nsOspfIfDesignatedRouter=nsOspfIfDesignatedRouter, nsOspfVirtIfRtrDeadInterval=nsOspfVirtIfRtrDeadInterval, nsOspfIfMetricIpAddress=nsOspfIfMetricIpAddress, nsOspfExitOverflowInterval=nsOspfExitOverflowInterval, RouterID=RouterID, nsOspfNbrState=nsOspfNbrState, nsOspfVirtIfAuthKey=nsOspfVirtIfAuthKey, nsOspfIfEvents=nsOspfIfEvents)
| (integer, object_identifier, octet_string) = mibBuilder.importSymbols('ASN1', 'Integer', 'ObjectIdentifier', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_intersection, constraints_union, value_range_constraint, single_value_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsIntersection', 'ConstraintsUnion', 'ValueRangeConstraint', 'SingleValueConstraint', 'ValueSizeConstraint')
(netscreen_vr,) = mibBuilder.importSymbols('NETSCREEN-SMI', 'netscreenVR')
(notification_group, object_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ObjectGroup', 'ModuleCompliance')
(bits, integer32, mib_identifier, notification_type, unsigned32, gauge32, module_identity, time_ticks, counter64, mib_scalar, mib_table, mib_table_row, mib_table_column, counter32, mib_2, object_identity, ip_address, iso) = mibBuilder.importSymbols('SNMPv2-SMI', 'Bits', 'Integer32', 'MibIdentifier', 'NotificationType', 'Unsigned32', 'Gauge32', 'ModuleIdentity', 'TimeTicks', 'Counter64', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter32', 'mib-2', 'ObjectIdentity', 'IpAddress', 'iso')
(display_string, row_status, textual_convention, truth_value) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'RowStatus', 'TextualConvention', 'TruthValue')
ns_ospf = module_identity((1, 3, 6, 1, 4, 1, 3224, 18, 2))
if mibBuilder.loadTexts:
nsOspf.setLastUpdated('200506032022Z')
if mibBuilder.loadTexts:
nsOspf.setOrganization('Juniper Networks, Inc.')
class Areaid(TextualConvention, IpAddress):
status = 'deprecated'
class Routerid(TextualConvention, IpAddress):
status = 'deprecated'
class Metric(TextualConvention, Integer32):
status = 'deprecated'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 65535)
class Bigmetric(TextualConvention, Integer32):
status = 'deprecated'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 16777215)
class Status(TextualConvention, Integer32):
status = 'deprecated'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('enabled', 1), ('disabled', 2))
class Positiveinteger(TextualConvention, Integer32):
status = 'deprecated'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 2147483647)
class Hellorange(TextualConvention, Integer32):
status = 'deprecated'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(1, 65535)
class Uptomaxage(TextualConvention, Integer32):
status = 'deprecated'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 3600)
class Interfaceindex(TextualConvention, Integer32):
status = 'deprecated'
class Designatedrouterpriority(TextualConvention, Integer32):
status = 'deprecated'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 255)
class Tostype(TextualConvention, Integer32):
status = 'deprecated'
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 30)
ns_ospf_general_table = mib_table((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1))
if mibBuilder.loadTexts:
nsOspfGeneralTable.setStatus('deprecated')
ns_ospf_general_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1)).setIndexNames((0, 'NETSCREEN-OSPF-MIB', 'nsOspfGeneralVRID'))
if mibBuilder.loadTexts:
nsOspfGeneralEntry.setStatus('deprecated')
ns_ospf_router_id = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 1), router_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfRouterId.setStatus('deprecated')
ns_ospf_admin_stat = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 2), status()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfAdminStat.setStatus('deprecated')
ns_ospf_version_number = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(2))).clone(namedValues=named_values(('version2', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfVersionNumber.setStatus('deprecated')
ns_ospf_area_bdr_rtr_status = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 4), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfAreaBdrRtrStatus.setStatus('deprecated')
ns_ospf_as_bdr_rtr_status = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 5), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfASBdrRtrStatus.setStatus('deprecated')
ns_ospf_extern_lsa_count = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 6), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfExternLsaCount.setStatus('deprecated')
ns_ospf_extern_lsa_cksum_sum = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfExternLsaCksumSum.setStatus('deprecated')
ns_ospf_tos_support = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 8), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfTOSSupport.setStatus('deprecated')
ns_ospf_originate_new_lsas = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfOriginateNewLsas.setStatus('deprecated')
ns_ospf_rx_new_lsas = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfRxNewLsas.setStatus('deprecated')
ns_ospf_ext_lsdb_limit = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(-1, 2147483647)).clone(-1)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfExtLsdbLimit.setStatus('deprecated')
ns_ospf_multicast_extensions = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 12), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfMulticastExtensions.setStatus('deprecated')
ns_ospf_exit_overflow_interval = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 13), positive_integer()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfExitOverflowInterval.setStatus('deprecated')
ns_ospf_demand_extensions = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 14), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfDemandExtensions.setStatus('deprecated')
ns_ospf_general_vrid = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 1, 1, 15), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfGeneralVRID.setStatus('deprecated')
ns_ospf_area_table = mib_table((1, 3, 6, 1, 4, 1, 3224, 18, 2, 2))
if mibBuilder.loadTexts:
nsOspfAreaTable.setStatus('deprecated')
ns_ospf_area_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3224, 18, 2, 2, 1)).setIndexNames((0, 'NETSCREEN-OSPF-MIB', 'nsOspfAreaId'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfAreaVRID'))
if mibBuilder.loadTexts:
nsOspfAreaEntry.setStatus('deprecated')
ns_ospf_area_id = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 2, 1, 1), area_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfAreaId.setStatus('deprecated')
ns_ospf_import_as_extern = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 2, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('importExternal', 1), ('importNoExternal', 2), ('importNssa', 3))).clone('importExternal')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfImportAsExtern.setStatus('deprecated')
ns_ospf_spf_runs = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 2, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfSpfRuns.setStatus('deprecated')
ns_ospf_area_bdr_rtr_count = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 2, 1, 5), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfAreaBdrRtrCount.setStatus('deprecated')
ns_ospf_as_bdr_rtr_count = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 2, 1, 6), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfAsBdrRtrCount.setStatus('deprecated')
ns_ospf_area_lsa_count = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 2, 1, 7), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfAreaLsaCount.setStatus('deprecated')
ns_ospf_area_lsa_cksum_sum = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 2, 1, 8), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfAreaLsaCksumSum.setStatus('deprecated')
ns_ospf_area_summary = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 2, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('noAreaSummary', 1), ('sendAreaSummary', 2))).clone('noAreaSummary')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfAreaSummary.setStatus('deprecated')
ns_ospf_area_status = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 2, 1, 10), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfAreaStatus.setStatus('deprecated')
ns_ospf_area_vrid = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 2, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfAreaVRID.setStatus('deprecated')
ns_ospf_stub_area_table = mib_table((1, 3, 6, 1, 4, 1, 3224, 18, 2, 3))
if mibBuilder.loadTexts:
nsOspfStubAreaTable.setStatus('deprecated')
ns_ospf_stub_area_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3224, 18, 2, 3, 1)).setIndexNames((0, 'NETSCREEN-OSPF-MIB', 'nsOspfStubAreaId'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfStubTOS'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfStubVRID'))
if mibBuilder.loadTexts:
nsOspfStubAreaEntry.setStatus('deprecated')
ns_ospf_stub_area_id = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 3, 1, 1), area_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfStubAreaId.setStatus('deprecated')
ns_ospf_stub_tos = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 3, 1, 2), tos_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfStubTOS.setStatus('deprecated')
ns_ospf_stub_metric = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 3, 1, 3), big_metric()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfStubMetric.setStatus('deprecated')
ns_ospf_stub_status = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 3, 1, 4), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfStubStatus.setStatus('deprecated')
ns_ospf_stub_metric_type = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 3, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('nsOspfMetric', 1), ('comparableCost', 2), ('nonComparable', 3))).clone('nsOspfMetric')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfStubMetricType.setStatus('deprecated')
ns_ospf_stub_vrid = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 3, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfStubVRID.setStatus('deprecated')
ns_ospf_lsdb_table = mib_table((1, 3, 6, 1, 4, 1, 3224, 18, 2, 4))
if mibBuilder.loadTexts:
nsOspfLsdbTable.setStatus('deprecated')
ns_ospf_lsdb_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3224, 18, 2, 4, 1)).setIndexNames((0, 'NETSCREEN-OSPF-MIB', 'nsOspfLsdbAreaId'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfLsdbType'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfLsdbLsid'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfLsdbRouterId'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfLsdbVRID'))
if mibBuilder.loadTexts:
nsOspfLsdbEntry.setStatus('deprecated')
ns_ospf_lsdb_area_id = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 4, 1, 1), area_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfLsdbAreaId.setStatus('deprecated')
ns_ospf_lsdb_type = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 4, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('routerLink', 1), ('networkLink', 2), ('summaryLink', 3), ('asSummaryLink', 4), ('asExternalLink', 5), ('multicastLink', 6), ('nssaExternalLink', 7)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfLsdbType.setStatus('deprecated')
ns_ospf_lsdb_lsid = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 4, 1, 3), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfLsdbLsid.setStatus('deprecated')
ns_ospf_lsdb_router_id = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 4, 1, 4), router_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfLsdbRouterId.setStatus('deprecated')
ns_ospf_lsdb_sequence = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 4, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfLsdbSequence.setStatus('deprecated')
ns_ospf_lsdb_age = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 4, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfLsdbAge.setStatus('deprecated')
ns_ospf_lsdb_checksum = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 4, 1, 7), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfLsdbChecksum.setStatus('deprecated')
ns_ospf_lsdb_advertisement = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 4, 1, 8), octet_string().subtype(subtypeSpec=value_size_constraint(1, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfLsdbAdvertisement.setStatus('deprecated')
ns_ospf_lsdb_vrid = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 4, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfLsdbVRID.setStatus('deprecated')
ns_ospf_host_table = mib_table((1, 3, 6, 1, 4, 1, 3224, 18, 2, 6))
if mibBuilder.loadTexts:
nsOspfHostTable.setStatus('deprecated')
ns_ospf_host_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3224, 18, 2, 6, 1)).setIndexNames((0, 'NETSCREEN-OSPF-MIB', 'nsOspfHostIpAddress'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfHostTOS'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfHostVRID'))
if mibBuilder.loadTexts:
nsOspfHostEntry.setStatus('deprecated')
ns_ospf_host_ip_address = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 6, 1, 1), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfHostIpAddress.setStatus('deprecated')
ns_ospf_host_tos = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 6, 1, 2), tos_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfHostTOS.setStatus('deprecated')
ns_ospf_host_metric = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 6, 1, 3), metric()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfHostMetric.setStatus('deprecated')
ns_ospf_host_status = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 6, 1, 4), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfHostStatus.setStatus('deprecated')
ns_ospf_host_area_id = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 6, 1, 5), area_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfHostAreaID.setStatus('deprecated')
ns_ospf_host_vrid = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 6, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfHostVRID.setStatus('deprecated')
ns_ospf_if_table = mib_table((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7))
if mibBuilder.loadTexts:
nsOspfIfTable.setStatus('deprecated')
ns_ospf_if_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1)).setIndexNames((0, 'NETSCREEN-OSPF-MIB', 'nsOspfIfIpAddress'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfAddressLessIf'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfIfVRID'))
if mibBuilder.loadTexts:
nsOspfIfEntry.setStatus('deprecated')
ns_ospf_if_ip_address = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 1), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfIfIpAddress.setStatus('deprecated')
ns_ospf_address_less_if = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfAddressLessIf.setStatus('deprecated')
ns_ospf_if_area_id = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 3), area_id().clone(hexValue='00000000')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfIfAreaId.setStatus('deprecated')
ns_ospf_if_type = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 4), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 5))).clone(namedValues=named_values(('broadcast', 1), ('nbma', 2), ('pointToPoint', 3), ('pointToMultipoint', 5)))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfIfType.setStatus('deprecated')
ns_ospf_if_admin_stat = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 5), status().clone('enabled')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfIfAdminStat.setStatus('deprecated')
ns_ospf_if_rtr_priority = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 6), designated_router_priority().clone(1)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfIfRtrPriority.setStatus('deprecated')
ns_ospf_if_transit_delay = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 7), up_to_max_age().clone(1)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfIfTransitDelay.setStatus('deprecated')
ns_ospf_if_retrans_interval = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 8), up_to_max_age().clone(5)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfIfRetransInterval.setStatus('deprecated')
ns_ospf_if_hello_interval = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 9), hello_range().clone(10)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfIfHelloInterval.setStatus('deprecated')
ns_ospf_if_rtr_dead_interval = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 10), positive_integer().clone(40)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfIfRtrDeadInterval.setStatus('deprecated')
ns_ospf_if_poll_interval = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 11), positive_integer().clone(120)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfIfPollInterval.setStatus('deprecated')
ns_ospf_if_state = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=named_values(('down', 1), ('loopback', 2), ('waiting', 3), ('pointToPoint', 4), ('designatedRouter', 5), ('backupDesignatedRouter', 6), ('otherDesignatedRouter', 7))).clone('down')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfIfState.setStatus('deprecated')
ns_ospf_if_designated_router = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 13), ip_address().clone(hexValue='00000000')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfIfDesignatedRouter.setStatus('deprecated')
ns_ospf_if_backup_designated_router = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 14), ip_address().clone(hexValue='00000000')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfIfBackupDesignatedRouter.setStatus('deprecated')
ns_ospf_if_events = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 15), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfIfEvents.setStatus('deprecated')
ns_ospf_if_auth_key = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 16), octet_string().subtype(subtypeSpec=value_size_constraint(0, 256)).clone(hexValue='0000000000000000')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfIfAuthKey.setStatus('deprecated')
ns_ospf_if_status = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 17), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfIfStatus.setStatus('deprecated')
ns_ospf_if_multicast_forwarding = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('blocked', 1), ('multicast', 2), ('unicast', 3))).clone('blocked')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfIfMulticastForwarding.setStatus('deprecated')
ns_ospf_if_demand = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 19), truth_value().clone('false')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfIfDemand.setStatus('deprecated')
ns_ospf_if_auth_type = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 20), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfIfAuthType.setStatus('deprecated')
ns_ospf_if_vrid = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 7, 1, 21), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfIfVRID.setStatus('deprecated')
ns_ospf_if_metric_table = mib_table((1, 3, 6, 1, 4, 1, 3224, 18, 2, 8))
if mibBuilder.loadTexts:
nsOspfIfMetricTable.setStatus('deprecated')
ns_ospf_if_metric_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3224, 18, 2, 8, 1)).setIndexNames((0, 'NETSCREEN-OSPF-MIB', 'nsOspfIfMetricIpAddress'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfIfMetricAddressLessIf'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfIfMetricTOS'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfIfMetricVRID'))
if mibBuilder.loadTexts:
nsOspfIfMetricEntry.setStatus('deprecated')
ns_ospf_if_metric_ip_address = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 8, 1, 1), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfIfMetricIpAddress.setStatus('deprecated')
ns_ospf_if_metric_address_less_if = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 8, 1, 2), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfIfMetricAddressLessIf.setStatus('deprecated')
ns_ospf_if_metric_tos = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 8, 1, 3), tos_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfIfMetricTOS.setStatus('deprecated')
ns_ospf_if_metric_value = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 8, 1, 4), metric()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfIfMetricValue.setStatus('deprecated')
ns_ospf_if_metric_status = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 8, 1, 5), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfIfMetricStatus.setStatus('deprecated')
ns_ospf_if_metric_vrid = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 8, 1, 6), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfIfMetricVRID.setStatus('deprecated')
ns_ospf_virt_if_table = mib_table((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9))
if mibBuilder.loadTexts:
nsOspfVirtIfTable.setStatus('deprecated')
ns_ospf_virt_if_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1)).setIndexNames((0, 'NETSCREEN-OSPF-MIB', 'nsOspfVirtIfAreaId'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfVirtIfNeighbor'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfVirtIfVRID'))
if mibBuilder.loadTexts:
nsOspfVirtIfEntry.setStatus('deprecated')
ns_ospf_virt_if_area_id = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1, 1), area_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfVirtIfAreaId.setStatus('deprecated')
ns_ospf_virt_if_neighbor = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1, 2), router_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfVirtIfNeighbor.setStatus('deprecated')
ns_ospf_virt_if_transit_delay = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1, 3), up_to_max_age().clone(1)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfVirtIfTransitDelay.setStatus('deprecated')
ns_ospf_virt_if_retrans_interval = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1, 4), up_to_max_age().clone(5)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfVirtIfRetransInterval.setStatus('deprecated')
ns_ospf_virt_if_hello_interval = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1, 5), hello_range().clone(10)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfVirtIfHelloInterval.setStatus('deprecated')
ns_ospf_virt_if_rtr_dead_interval = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1, 6), positive_integer().clone(60)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfVirtIfRtrDeadInterval.setStatus('deprecated')
ns_ospf_virt_if_state = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 4))).clone(namedValues=named_values(('down', 1), ('pointToPoint', 4))).clone('down')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfVirtIfState.setStatus('deprecated')
ns_ospf_virt_if_events = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfVirtIfEvents.setStatus('deprecated')
ns_ospf_virt_if_auth_key = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1, 9), octet_string().subtype(subtypeSpec=value_size_constraint(0, 256)).clone(hexValue='0000000000000000')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfVirtIfAuthKey.setStatus('deprecated')
ns_ospf_virt_if_status = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1, 10), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfVirtIfStatus.setStatus('deprecated')
ns_ospf_virt_if_auth_type = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1, 11), integer32().subtype(subtypeSpec=value_range_constraint(0, 255))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfVirtIfAuthType.setStatus('deprecated')
ns_ospf_virt_if_vrid = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 9, 1, 12), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfVirtIfVRID.setStatus('deprecated')
ns_ospf_nbr_table = mib_table((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10))
if mibBuilder.loadTexts:
nsOspfNbrTable.setStatus('deprecated')
ns_ospf_nbr_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1)).setIndexNames((0, 'NETSCREEN-OSPF-MIB', 'nsOspfNbrIpAddr'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfNbrAddressLessIndex'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfNbrVRID'))
if mibBuilder.loadTexts:
nsOspfNbrEntry.setStatus('deprecated')
ns_ospf_nbr_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1, 1), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfNbrIpAddr.setStatus('deprecated')
ns_ospf_nbr_address_less_index = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1, 2), interface_index()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfNbrAddressLessIndex.setStatus('deprecated')
ns_ospf_nbr_rtr_id = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1, 3), router_id().clone(hexValue='00000000')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfNbrRtrId.setStatus('deprecated')
ns_ospf_nbr_options = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfNbrOptions.setStatus('deprecated')
ns_ospf_nbr_priority = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1, 5), designated_router_priority().clone(1)).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfNbrPriority.setStatus('deprecated')
ns_ospf_nbr_state = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=named_values(('down', 1), ('attempt', 2), ('init', 3), ('twoWay', 4), ('exchangeStart', 5), ('exchange', 6), ('loading', 7), ('full', 8))).clone('down')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfNbrState.setStatus('deprecated')
ns_ospf_nbr_events = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfNbrEvents.setStatus('deprecated')
ns_ospf_nbr_ls_retrans_q_len = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1, 8), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfNbrLsRetransQLen.setStatus('deprecated')
ns_ospf_nbma_nbr_status = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1, 9), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfNbmaNbrStatus.setStatus('deprecated')
ns_ospf_nbma_nbr_permanence = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1, 10), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('dynamic', 1), ('permanent', 2))).clone('permanent')).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfNbmaNbrPermanence.setStatus('deprecated')
ns_ospf_nbr_hello_suppressed = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1, 11), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfNbrHelloSuppressed.setStatus('deprecated')
ns_ospf_nbr_vrid = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 10, 1, 12), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfNbrVRID.setStatus('deprecated')
ns_ospf_virt_nbr_table = mib_table((1, 3, 6, 1, 4, 1, 3224, 18, 2, 11))
if mibBuilder.loadTexts:
nsOspfVirtNbrTable.setStatus('deprecated')
ns_ospf_virt_nbr_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3224, 18, 2, 11, 1)).setIndexNames((0, 'NETSCREEN-OSPF-MIB', 'nsOspfVirtNbrArea'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfVirtNbrRtrId'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfVirtNbrVRID'))
if mibBuilder.loadTexts:
nsOspfVirtNbrEntry.setStatus('deprecated')
ns_ospf_virt_nbr_area = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 11, 1, 1), area_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfVirtNbrArea.setStatus('deprecated')
ns_ospf_virt_nbr_rtr_id = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 11, 1, 2), router_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfVirtNbrRtrId.setStatus('deprecated')
ns_ospf_virt_nbr_ip_addr = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 11, 1, 3), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfVirtNbrIpAddr.setStatus('deprecated')
ns_ospf_virt_nbr_options = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 11, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfVirtNbrOptions.setStatus('deprecated')
ns_ospf_virt_nbr_state = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 11, 1, 5), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8))).clone(namedValues=named_values(('down', 1), ('attempt', 2), ('init', 3), ('twoWay', 4), ('exchangeStart', 5), ('exchange', 6), ('loading', 7), ('full', 8)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfVirtNbrState.setStatus('deprecated')
ns_ospf_virt_nbr_events = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 11, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfVirtNbrEvents.setStatus('deprecated')
ns_ospf_virt_nbr_ls_retrans_q_len = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 11, 1, 7), gauge32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfVirtNbrLsRetransQLen.setStatus('deprecated')
ns_ospf_virt_nbr_hello_suppressed = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 11, 1, 8), truth_value()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfVirtNbrHelloSuppressed.setStatus('deprecated')
ns_ospf_virt_nbr_vrid = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 11, 1, 9), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfVirtNbrVRID.setStatus('deprecated')
ns_ospf_ext_lsdb_table = mib_table((1, 3, 6, 1, 4, 1, 3224, 18, 2, 12))
if mibBuilder.loadTexts:
nsOspfExtLsdbTable.setStatus('deprecated')
ns_ospf_ext_lsdb_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3224, 18, 2, 12, 1)).setIndexNames((0, 'NETSCREEN-OSPF-MIB', 'nsOspfExtLsdbType'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfExtLsdbLsid'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfExtLsdbRouterId'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfExtLsdbVRID'))
if mibBuilder.loadTexts:
nsOspfExtLsdbEntry.setStatus('deprecated')
ns_ospf_ext_lsdb_type = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 12, 1, 1), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(5))).clone(namedValues=named_values(('asExternalLink', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfExtLsdbType.setStatus('deprecated')
ns_ospf_ext_lsdb_lsid = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 12, 1, 2), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfExtLsdbLsid.setStatus('deprecated')
ns_ospf_ext_lsdb_router_id = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 12, 1, 3), router_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfExtLsdbRouterId.setStatus('deprecated')
ns_ospf_ext_lsdb_sequence = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 12, 1, 4), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfExtLsdbSequence.setStatus('deprecated')
ns_ospf_ext_lsdb_age = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 12, 1, 5), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfExtLsdbAge.setStatus('deprecated')
ns_ospf_ext_lsdb_checksum = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 12, 1, 6), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfExtLsdbChecksum.setStatus('deprecated')
ns_ospf_ext_lsdb_advertisement = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 12, 1, 7), octet_string().subtype(subtypeSpec=value_size_constraint(36, 36)).setFixedLength(36)).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfExtLsdbAdvertisement.setStatus('deprecated')
ns_ospf_ext_lsdb_vrid = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 12, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfExtLsdbVRID.setStatus('deprecated')
ns_ospf_area_aggregate_table = mib_table((1, 3, 6, 1, 4, 1, 3224, 18, 2, 14))
if mibBuilder.loadTexts:
nsOspfAreaAggregateTable.setStatus('deprecated')
ns_ospf_area_aggregate_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3224, 18, 2, 14, 1)).setIndexNames((0, 'NETSCREEN-OSPF-MIB', 'nsOspfAreaAggregateAreaID'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfAreaAggregateLsdbType'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfAreaAggregateNet'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfAreaAggregateMask'), (0, 'NETSCREEN-OSPF-MIB', 'nsOspfAreaAggregateVRID'))
if mibBuilder.loadTexts:
nsOspfAreaAggregateEntry.setStatus('deprecated')
ns_ospf_area_aggregate_area_id = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 14, 1, 1), area_id()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfAreaAggregateAreaID.setStatus('deprecated')
ns_ospf_area_aggregate_lsdb_type = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 14, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(3, 7))).clone(namedValues=named_values(('summaryLink', 3), ('nssaExternalLink', 7)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfAreaAggregateLsdbType.setStatus('deprecated')
ns_ospf_area_aggregate_net = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 14, 1, 3), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfAreaAggregateNet.setStatus('deprecated')
ns_ospf_area_aggregate_mask = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 14, 1, 4), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfAreaAggregateMask.setStatus('deprecated')
ns_ospf_area_aggregate_status = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 14, 1, 5), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfAreaAggregateStatus.setStatus('deprecated')
ns_ospf_area_aggregate_effect = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 14, 1, 6), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('advertiseMatching', 1), ('doNotAdvertiseMatching', 2))).clone('advertiseMatching')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
nsOspfAreaAggregateEffect.setStatus('deprecated')
ns_ospf_area_aggregate_vrid = mib_table_column((1, 3, 6, 1, 4, 1, 3224, 18, 2, 14, 1, 7), integer32().subtype(subtypeSpec=value_range_constraint(0, 65535))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
nsOspfAreaAggregateVRID.setStatus('deprecated')
mibBuilder.exportSymbols('NETSCREEN-OSPF-MIB', nsOspfLsdbLsid=nsOspfLsdbLsid, nsOspfHostStatus=nsOspfHostStatus, nsOspfVirtIfNeighbor=nsOspfVirtIfNeighbor, nsOspfVirtIfAuthType=nsOspfVirtIfAuthType, nsOspfExtLsdbChecksum=nsOspfExtLsdbChecksum, nsOspfHostAreaID=nsOspfHostAreaID, nsOspfAreaAggregateAreaID=nsOspfAreaAggregateAreaID, nsOspfSpfRuns=nsOspfSpfRuns, nsOspfIfAdminStat=nsOspfIfAdminStat, nsOspfVirtIfTable=nsOspfVirtIfTable, nsOspfIfType=nsOspfIfType, nsOspfVirtIfStatus=nsOspfVirtIfStatus, nsOspfAreaAggregateStatus=nsOspfAreaAggregateStatus, nsOspfNbrAddressLessIndex=nsOspfNbrAddressLessIndex, nsOspfHostEntry=nsOspfHostEntry, nsOspfNbrPriority=nsOspfNbrPriority, nsOspfAreaVRID=nsOspfAreaVRID, nsOspfHostTOS=nsOspfHostTOS, nsOspfLsdbAreaId=nsOspfLsdbAreaId, nsOspfIfMetricAddressLessIf=nsOspfIfMetricAddressLessIf, nsOspfStubAreaTable=nsOspfStubAreaTable, nsOspfStubStatus=nsOspfStubStatus, DesignatedRouterPriority=DesignatedRouterPriority, nsOspfIfDemand=nsOspfIfDemand, nsOspfIfMetricEntry=nsOspfIfMetricEntry, nsOspfAreaAggregateMask=nsOspfAreaAggregateMask, AreaID=AreaID, nsOspfAreaLsaCount=nsOspfAreaLsaCount, nsOspfNbrIpAddr=nsOspfNbrIpAddr, nsOspfGeneralVRID=nsOspfGeneralVRID, nsOspfLsdbTable=nsOspfLsdbTable, nsOspfAddressLessIf=nsOspfAddressLessIf, nsOspfIfIpAddress=nsOspfIfIpAddress, Metric=Metric, nsOspfIfVRID=nsOspfIfVRID, nsOspfExtLsdbAdvertisement=nsOspfExtLsdbAdvertisement, nsOspfIfMulticastForwarding=nsOspfIfMulticastForwarding, nsOspfHostIpAddress=nsOspfHostIpAddress, nsOspfAreaAggregateEntry=nsOspfAreaAggregateEntry, nsOspfTOSSupport=nsOspfTOSSupport, nsOspfAreaAggregateEffect=nsOspfAreaAggregateEffect, nsOspfAreaId=nsOspfAreaId, PYSNMP_MODULE_ID=nsOspf, nsOspfVirtIfState=nsOspfVirtIfState, HelloRange=HelloRange, nsOspfStubMetricType=nsOspfStubMetricType, nsOspfAreaAggregateLsdbType=nsOspfAreaAggregateLsdbType, nsOspfExternLsaCksumSum=nsOspfExternLsaCksumSum, nsOspfNbrOptions=nsOspfNbrOptions, nsOspfGeneralTable=nsOspfGeneralTable, nsOspfExtLsdbVRID=nsOspfExtLsdbVRID, nsOspfStubTOS=nsOspfStubTOS, nsOspfLsdbRouterId=nsOspfLsdbRouterId, nsOspfVirtIfEvents=nsOspfVirtIfEvents, nsOspfIfMetricVRID=nsOspfIfMetricVRID, nsOspfExtLsdbLsid=nsOspfExtLsdbLsid, nsOspfLsdbAdvertisement=nsOspfLsdbAdvertisement, nsOspfMulticastExtensions=nsOspfMulticastExtensions, PositiveInteger=PositiveInteger, nsOspfIfTable=nsOspfIfTable, nsOspfLsdbEntry=nsOspfLsdbEntry, nsOspfExternLsaCount=nsOspfExternLsaCount, nsOspfOriginateNewLsas=nsOspfOriginateNewLsas, nsOspfVirtNbrIpAddr=nsOspfVirtNbrIpAddr, nsOspfVirtNbrVRID=nsOspfVirtNbrVRID, nsOspfAreaBdrRtrCount=nsOspfAreaBdrRtrCount, nsOspfVirtNbrEntry=nsOspfVirtNbrEntry, nsOspfIfEntry=nsOspfIfEntry, nsOspfIfTransitDelay=nsOspfIfTransitDelay, nsOspfIfRtrPriority=nsOspfIfRtrPriority, nsOspfExtLsdbSequence=nsOspfExtLsdbSequence, nsOspfIfAuthKey=nsOspfIfAuthKey, nsOspfAdminStat=nsOspfAdminStat, nsOspfExtLsdbType=nsOspfExtLsdbType, nsOspfVirtIfRetransInterval=nsOspfVirtIfRetransInterval, nsOspfNbrRtrId=nsOspfNbrRtrId, nsOspfLsdbSequence=nsOspfLsdbSequence, nsOspfHostVRID=nsOspfHostVRID, nsOspfExtLsdbEntry=nsOspfExtLsdbEntry, nsOspfIfMetricTable=nsOspfIfMetricTable, nsOspf=nsOspf, nsOspfNbrEntry=nsOspfNbrEntry, nsOspfAreaAggregateTable=nsOspfAreaAggregateTable, nsOspfNbmaNbrPermanence=nsOspfNbmaNbrPermanence, nsOspfIfStatus=nsOspfIfStatus, nsOspfExtLsdbTable=nsOspfExtLsdbTable, nsOspfIfRetransInterval=nsOspfIfRetransInterval, nsOspfIfMetricValue=nsOspfIfMetricValue, nsOspfStubMetric=nsOspfStubMetric, nsOspfLsdbChecksum=nsOspfLsdbChecksum, nsOspfRxNewLsas=nsOspfRxNewLsas, nsOspfIfAreaId=nsOspfIfAreaId, nsOspfRouterId=nsOspfRouterId, nsOspfExtLsdbAge=nsOspfExtLsdbAge, nsOspfHostTable=nsOspfHostTable, nsOspfLsdbVRID=nsOspfLsdbVRID, nsOspfIfRtrDeadInterval=nsOspfIfRtrDeadInterval, nsOspfVirtNbrHelloSuppressed=nsOspfVirtNbrHelloSuppressed, Status=Status, nsOspfASBdrRtrStatus=nsOspfASBdrRtrStatus, nsOspfNbrTable=nsOspfNbrTable, nsOspfVirtNbrArea=nsOspfVirtNbrArea, nsOspfNbrHelloSuppressed=nsOspfNbrHelloSuppressed, nsOspfVirtNbrTable=nsOspfVirtNbrTable, nsOspfLsdbAge=nsOspfLsdbAge, nsOspfIfMetricStatus=nsOspfIfMetricStatus, nsOspfVirtNbrState=nsOspfVirtNbrState, BigMetric=BigMetric, nsOspfVirtNbrEvents=nsOspfVirtNbrEvents, nsOspfIfHelloInterval=nsOspfIfHelloInterval, nsOspfImportAsExtern=nsOspfImportAsExtern, nsOspfIfState=nsOspfIfState, nsOspfIfAuthType=nsOspfIfAuthType, nsOspfVirtIfTransitDelay=nsOspfVirtIfTransitDelay, nsOspfStubVRID=nsOspfStubVRID, nsOspfIfPollInterval=nsOspfIfPollInterval, nsOspfDemandExtensions=nsOspfDemandExtensions, nsOspfIfMetricTOS=nsOspfIfMetricTOS, nsOspfHostMetric=nsOspfHostMetric, TOSType=TOSType, nsOspfExtLsdbLimit=nsOspfExtLsdbLimit, nsOspfAreaEntry=nsOspfAreaEntry, nsOspfVirtIfVRID=nsOspfVirtIfVRID, UpToMaxAge=UpToMaxAge, nsOspfVirtNbrOptions=nsOspfVirtNbrOptions, nsOspfVirtNbrLsRetransQLen=nsOspfVirtNbrLsRetransQLen, nsOspfIfBackupDesignatedRouter=nsOspfIfBackupDesignatedRouter, nsOspfAreaLsaCksumSum=nsOspfAreaLsaCksumSum, nsOspfVirtIfEntry=nsOspfVirtIfEntry, nsOspfNbrVRID=nsOspfNbrVRID, nsOspfVirtIfAreaId=nsOspfVirtIfAreaId, nsOspfAreaStatus=nsOspfAreaStatus, nsOspfGeneralEntry=nsOspfGeneralEntry, nsOspfStubAreaEntry=nsOspfStubAreaEntry, nsOspfNbmaNbrStatus=nsOspfNbmaNbrStatus, InterfaceIndex=InterfaceIndex, nsOspfAreaSummary=nsOspfAreaSummary, nsOspfVirtIfHelloInterval=nsOspfVirtIfHelloInterval, nsOspfNbrLsRetransQLen=nsOspfNbrLsRetransQLen, nsOspfAreaAggregateVRID=nsOspfAreaAggregateVRID, nsOspfLsdbType=nsOspfLsdbType, nsOspfAreaTable=nsOspfAreaTable, nsOspfExtLsdbRouterId=nsOspfExtLsdbRouterId, nsOspfStubAreaId=nsOspfStubAreaId, nsOspfVersionNumber=nsOspfVersionNumber, nsOspfAreaBdrRtrStatus=nsOspfAreaBdrRtrStatus, nsOspfAsBdrRtrCount=nsOspfAsBdrRtrCount, nsOspfNbrEvents=nsOspfNbrEvents, nsOspfAreaAggregateNet=nsOspfAreaAggregateNet, nsOspfVirtNbrRtrId=nsOspfVirtNbrRtrId, nsOspfIfDesignatedRouter=nsOspfIfDesignatedRouter, nsOspfVirtIfRtrDeadInterval=nsOspfVirtIfRtrDeadInterval, nsOspfIfMetricIpAddress=nsOspfIfMetricIpAddress, nsOspfExitOverflowInterval=nsOspfExitOverflowInterval, RouterID=RouterID, nsOspfNbrState=nsOspfNbrState, nsOspfVirtIfAuthKey=nsOspfVirtIfAuthKey, nsOspfIfEvents=nsOspfIfEvents) |
test_dic = {
"SERVICETYPE": {
"SC": {
"SITEVERSION": {"T33L": "1"}
},
"EC": {
"SITEVERSION": {
"T33L": "1",
"T31L": {
"BROWSERVERSION": {
"9.1": "1",
"59.0": "1"
}
},
"T32L": "1"
}
},
"TC": {
"OSVERSION": {
"10.13": "1",
"Other": {
"BROWSERVERSION": {
"52.0": "1",
}
}
}
}
}
}
| test_dic = {'SERVICETYPE': {'SC': {'SITEVERSION': {'T33L': '1'}}, 'EC': {'SITEVERSION': {'T33L': '1', 'T31L': {'BROWSERVERSION': {'9.1': '1', '59.0': '1'}}, 'T32L': '1'}}, 'TC': {'OSVERSION': {'10.13': '1', 'Other': {'BROWSERVERSION': {'52.0': '1'}}}}}} |
#
# @lc app=leetcode id=977 lang=python3
#
# [977] Squares of a Sorted Array
#
# @lc code=start
class Solution:
def sortedSquares(self, A: List[int]) -> List[int]:
newls = [item * item for item in A]
return sorted(newls)
# @lc code=end
| class Solution:
def sorted_squares(self, A: List[int]) -> List[int]:
newls = [item * item for item in A]
return sorted(newls) |
def get_firts_two_characters(string):
# 6.1.A
return string[:2]
def get_last_three_characters(string):
# 6.1.B
return string[-3:]
def print_every_two(string):
# 6.1.C
return string[::2]
def reverse(string):
# 6.1.D
return string[::-1]
def reverse_and_concact(string):
# 6.1.D
return string + reverse(string)
def str_insert_character(string, char):
# 6.2.A
new_string = ""
for i in string:
new_string += i + char
return new_string[:-1]
def str_delete_spacing(string, replace):
# 6.2.B
string = string.replace(" ", replace)
return string
def str_delete_numbers(string, char):
# 6.2.C
for i in "0123456789":
string = string.replace(i, char)
return string
def str_insert_character_every_three(string, char):
# 6.2.D
count = 0
str_format = ""
for i in string:
if (count == 3):
str_format += (char + i)
count = 0
else:
str_format += i
count += 1
return str_format
def str_delete_spacing_refactor(string, replace, max_replace):
# 6.3
string = string.replace(" ", replace, max_replace)
return string
| def get_firts_two_characters(string):
return string[:2]
def get_last_three_characters(string):
return string[-3:]
def print_every_two(string):
return string[::2]
def reverse(string):
return string[::-1]
def reverse_and_concact(string):
return string + reverse(string)
def str_insert_character(string, char):
new_string = ''
for i in string:
new_string += i + char
return new_string[:-1]
def str_delete_spacing(string, replace):
string = string.replace(' ', replace)
return string
def str_delete_numbers(string, char):
for i in '0123456789':
string = string.replace(i, char)
return string
def str_insert_character_every_three(string, char):
count = 0
str_format = ''
for i in string:
if count == 3:
str_format += char + i
count = 0
else:
str_format += i
count += 1
return str_format
def str_delete_spacing_refactor(string, replace, max_replace):
string = string.replace(' ', replace, max_replace)
return string |
#!/usr/bin/env python3
def stalinsort(x=[]):
if x == []:
return x
for i in range(len(x)-1):
if x[i] < x[i+1]:
continue
else:
x.pop(i+1)
return x
| def stalinsort(x=[]):
if x == []:
return x
for i in range(len(x) - 1):
if x[i] < x[i + 1]:
continue
else:
x.pop(i + 1)
return x |
# Author: thisHermit
ASCENDING = 1
DESCENDING = 0
N = 5
def main():
input_array = [5, 4, 3, 2, 5]
a = input_array.copy()
# sort the array
sort(a, N)
# test and show
assert a, sorted(input_array)
show(a, N)
def exchange(i, j, a, n):
a[i], a[j] = a[j], a[i]
def compare(i, j, dirr, a, n):
if dirr == (a[i] > a[j]):
exchange(i, j, a, n)
def bitonicMerge(lo, cnt, dirr, a, n):
if cnt > 1:
k = cnt // 2
for i in range(lo, lo + k):
compare(i, i+k, dirr, a, n)
bitonicMerge(lo, k, dirr, a, n)
bitonicMerge(lo + k, k, dirr, a, n)
def bitonicSort(lo, cnt, dirr, a, n):
if cnt > 1:
k = cnt // 2
# sort in ascending order
bitonicSort(lo, k, ASCENDING, a, n)
# sort in descending order
bitonicSort(lo + k, k, DESCENDING, a, n)
# Merge whole sequence in ascendin/ descending order depending on dirr
bitonicMerge(lo, cnt, dirr, a, n)
def sort(a, n):
bitonicSort(0, N, ASCENDING, a, n)
def show(a, n):
print(a)
if __name__ == '__main__':
main()
| ascending = 1
descending = 0
n = 5
def main():
input_array = [5, 4, 3, 2, 5]
a = input_array.copy()
sort(a, N)
assert a, sorted(input_array)
show(a, N)
def exchange(i, j, a, n):
(a[i], a[j]) = (a[j], a[i])
def compare(i, j, dirr, a, n):
if dirr == (a[i] > a[j]):
exchange(i, j, a, n)
def bitonic_merge(lo, cnt, dirr, a, n):
if cnt > 1:
k = cnt // 2
for i in range(lo, lo + k):
compare(i, i + k, dirr, a, n)
bitonic_merge(lo, k, dirr, a, n)
bitonic_merge(lo + k, k, dirr, a, n)
def bitonic_sort(lo, cnt, dirr, a, n):
if cnt > 1:
k = cnt // 2
bitonic_sort(lo, k, ASCENDING, a, n)
bitonic_sort(lo + k, k, DESCENDING, a, n)
bitonic_merge(lo, cnt, dirr, a, n)
def sort(a, n):
bitonic_sort(0, N, ASCENDING, a, n)
def show(a, n):
print(a)
if __name__ == '__main__':
main() |
input_data = raw_input(">")
upper_case_letters = []
lower_case_letter = []
for x in input_data:
if str(x).isalpha() and str(x).isupper():
upper_case_letters.append(str(x))
elif str(x).isalpha() and str(x).islower():
lower_case_letter.append(str(x))
print("Upper case: " + str(len(upper_case_letters)))
print("Lower case: " + str(len(lower_case_letter)))
| input_data = raw_input('>')
upper_case_letters = []
lower_case_letter = []
for x in input_data:
if str(x).isalpha() and str(x).isupper():
upper_case_letters.append(str(x))
elif str(x).isalpha() and str(x).islower():
lower_case_letter.append(str(x))
print('Upper case: ' + str(len(upper_case_letters)))
print('Lower case: ' + str(len(lower_case_letter))) |
'''
While loop - it keeps looping while a given condition is valid
'''
name = "Kevin"
age = 24
letter_index = 0
while letter_index < len(name):
print(name[letter_index])
letter_index = letter_index + 1
else:
print("Finished with the while loop")
'''
line 4 - we define the name with a string "Kevin"
line 5 - we define letter_index as 0, given that we want the first character
line 6 - define the while loop, where letter_index is less than length(number)
of characters in name, you print it out. A number would do fine here, but an error would pop out
if the name changes, say from Kevin(5 characters) to Rob (3). So we use the len function
line 7 - From there, you print out name - relative to letter index, and then you redefine letter_index
by giving it an increment of 1.
line 8 - After that, the loop repeats itself until letter_index 6,
where there is no more character to print
So as long as the condition is met in line 6, the loop will keep running operations within the while loop
If all conditions are met, we can end it with the else statement
'''
counter = 0
while counter < 10:
print(counter)
counter = counter + 2
else:
print("counter while loop ended")
'''
Same thing as above, but this time, we define counter as a number 0, and the while loop will list out all numbers
lower than 10 at a step size of 2.
'''
| """
While loop - it keeps looping while a given condition is valid
"""
name = 'Kevin'
age = 24
letter_index = 0
while letter_index < len(name):
print(name[letter_index])
letter_index = letter_index + 1
else:
print('Finished with the while loop')
'\nline 4 - we define the name with a string "Kevin"\nline 5 - we define letter_index as 0, given that we want the first character\nline 6 - define the while loop, where letter_index is less than length(number)\nof characters in name, you print it out. A number would do fine here, but an error would pop out\nif the name changes, say from Kevin(5 characters) to Rob (3). So we use the len function\n\nline 7 - From there, you print out name - relative to letter index, and then you redefine letter_index\nby giving it an increment of 1. \n\nline 8 - After that, the loop repeats itself until letter_index 6, \nwhere there is no more character to print\n\nSo as long as the condition is met in line 6, the loop will keep running operations within the while loop\n\nIf all conditions are met, we can end it with the else statement\n'
counter = 0
while counter < 10:
print(counter)
counter = counter + 2
else:
print('counter while loop ended')
'\nSame thing as above, but this time, we define counter as a number 0, and the while loop will list out all numbers\nlower than 10 at a step size of 2.\n' |
# List
transports = ["airplane", "car", "ferry"]
modes = ["air", "ground", "water"]
# Lists contain simple data (index based item) and can be edited after being assigned.
# E.g. as transport types are not as limited as in this list, it can be updated by adding or removing.
# Let's create a couple of functions for adding and removing items, and use them.
print("\nLIST DATA TYPE")
print("--------------\n") # just for formatting the output in order to keep it clean
# Adding items to the list
def add_transport(): # first parameter is for the name, second one is for the mode of the transport
global transports
global modes
message = input("Do you want to ADD a new transport? [Type yes/no]: ").lower().strip()
# validating the input by lower-casing the letters and shrinking the spaces
if message == "yes":
name = input(" Insert the transport name: ")
if name in transports:
print("\n!!! This transport is already in the list\n")
add_transport()
else:
mode = input(" Insert the transportation mode: ")
transports.append(name) # append() method is used to add a new item
modes.append(mode)
print("\nSuccessfully added!")
print("--------------\n") # just for formatting the output in order to keep it clean
add_transport()
elif message == "no":
print("--------------\n") # just for formatting the output in order to keep it clean
return
else:
print("\n!!! Please, answer properly\n")
add_transport()
add_transport() # calling the function to add a new transport
# Removing items from the list
def remove_transport(): # receives an integer as an index
global transports
global modes
message = input("Do you want to REMOVE any transport? [Type yes/no]: ").lower().strip()
# validating the input by lower-casing the letters and shrinking the spaces
if message == "yes":
print("You have the transports below:")
for number, transport in enumerate(transports, 1): # looping the enumerated list to print the items
print("", str(number) + ")", transport)
removing_index = input("Insert the number of the transport you want to delete: ")
try: # trying to convert the input into integer
index = int(removing_index)
transports.pop(index - 1) # since enumeration has started with 1, we should subtract 1
modes.pop(index - 1)
print("\nSuccessfully removed!")
print("--------------\n") # just for formatting the output in order to keep it clean
remove_transport()
except ValueError:
print("\n!!! Please, insert only numbers\n")
remove_transport()
elif message == "no":
print("--------------\n") # just for formatting the output in order to keep it clean
return
else:
print("\n!!! Please, answer properly\n")
remove_transport()
remove_transport() # calling the function to remove an existing transport
# Check the type of the transport
# zip() can be used to merge relative items of two lists according to their index.
def check_transport():
global transports
global modes
message = input("Do you want to CHECK the mode of any transport? [Type yes/no]: ").lower().strip()
# validating the input by lower-casing the letters and shrinking the spaces
if message == "yes":
print("Choose a transport to check:")
for number, transport in enumerate(transports, 1):
print("", str(number) + ")", transport)
checking_index = input("Insert the number of the transport you want to check: ")
try:
index = int(checking_index)
print("\n", transports[index-1][0].upper() + transports[index-1][1:], "moves on the", modes[index-1] + ".")
print("--------------\n") # just for formatting the output in order to keep it clean
check_transport()
except ValueError:
print("\n!!! Please, insert only numbers!\n")
check_transport()
elif message == "no":
print("--------------\n") # just for formatting the output in order to keep it clean
print(" Thank you for using this app! Good bye!")
return
else:
print("\n!!! Please, answer properly!\n")
check_transport()
check_transport() # calling the function to check the mode af a transport
| transports = ['airplane', 'car', 'ferry']
modes = ['air', 'ground', 'water']
print('\nLIST DATA TYPE')
print('--------------\n')
def add_transport():
global transports
global modes
message = input('Do you want to ADD a new transport? [Type yes/no]: ').lower().strip()
if message == 'yes':
name = input(' Insert the transport name: ')
if name in transports:
print('\n!!! This transport is already in the list\n')
add_transport()
else:
mode = input(' Insert the transportation mode: ')
transports.append(name)
modes.append(mode)
print('\nSuccessfully added!')
print('--------------\n')
add_transport()
elif message == 'no':
print('--------------\n')
return
else:
print('\n!!! Please, answer properly\n')
add_transport()
add_transport()
def remove_transport():
global transports
global modes
message = input('Do you want to REMOVE any transport? [Type yes/no]: ').lower().strip()
if message == 'yes':
print('You have the transports below:')
for (number, transport) in enumerate(transports, 1):
print('', str(number) + ')', transport)
removing_index = input('Insert the number of the transport you want to delete: ')
try:
index = int(removing_index)
transports.pop(index - 1)
modes.pop(index - 1)
print('\nSuccessfully removed!')
print('--------------\n')
remove_transport()
except ValueError:
print('\n!!! Please, insert only numbers\n')
remove_transport()
elif message == 'no':
print('--------------\n')
return
else:
print('\n!!! Please, answer properly\n')
remove_transport()
remove_transport()
def check_transport():
global transports
global modes
message = input('Do you want to CHECK the mode of any transport? [Type yes/no]: ').lower().strip()
if message == 'yes':
print('Choose a transport to check:')
for (number, transport) in enumerate(transports, 1):
print('', str(number) + ')', transport)
checking_index = input('Insert the number of the transport you want to check: ')
try:
index = int(checking_index)
print('\n', transports[index - 1][0].upper() + transports[index - 1][1:], 'moves on the', modes[index - 1] + '.')
print('--------------\n')
check_transport()
except ValueError:
print('\n!!! Please, insert only numbers!\n')
check_transport()
elif message == 'no':
print('--------------\n')
print(' Thank you for using this app! Good bye!')
return
else:
print('\n!!! Please, answer properly!\n')
check_transport()
check_transport() |
class WordDictionary:
def __init__(self):
self.list=set()
def add_word(self, word):
self.list.add(word)
def search(self, s):
if s in self.list:
return True
for i in self.list:
if len(i)!=len(s):
continue
flag=True
for index,j in enumerate(s):
if j==".":
continue
if j!=i[index]:
flag=False
break
if flag:
return True
return False | class Worddictionary:
def __init__(self):
self.list = set()
def add_word(self, word):
self.list.add(word)
def search(self, s):
if s in self.list:
return True
for i in self.list:
if len(i) != len(s):
continue
flag = True
for (index, j) in enumerate(s):
if j == '.':
continue
if j != i[index]:
flag = False
break
if flag:
return True
return False |
# Coastline harmonization with a landmask
def coastlineHarmonize(maskFile, ds, outmaskFile, outDEM, minimum, waterVal=0):
'''
This function is designed to take a coastline mask and harmonize elevation
values to it, such that no elevation values that are masked as water cells
will have elevation >0, and no land cells will have an elevation < minimum.
'''
tic1 = time.time()
# Read mask file for information
refDS = gdal.Open(maskFile, gdalconst.GA_ReadOnly)
target_ds = gdal.GetDriverByName(RasterDriver).Create(outmaskFile, ds.RasterXSize, ds.RasterYSize, 1, gdal.GDT_Byte)
DEM_ds = gdal.GetDriverByName(RasterDriver).Create(outDEM, ds.RasterXSize, ds.RasterYSize, 1, ds.GetRasterBand(1).DataType)
CopyDatasetInfo(ds, target_ds) # Copy information from input to output
CopyDatasetInfo(ds, DEM_ds) # Copy information from input to output
# Resample input to output
gdal.ReprojectImage(refDS, target_ds, refDS.GetProjection(), target_ds.GetProjection(), gdalconst.GRA_NearestNeighbour)
# Build numpy array of the mask grid and elevation grid
maskArr = BandReadAsArray(target_ds.GetRasterBand(1))
elevArr = BandReadAsArray(ds.GetRasterBand(1))
# Reassign values
ndv = ds.GetRasterBand(1).GetNoDataValue() # Obtain nodata value
mask = maskArr==1 # A boolean mask of True wherever LANDMASK=1
elevArr[elevArr==ndv] = 0 # Set Nodata cells to 0
elevArr[mask] += minimum # For all land cells, add minimum elevation
elevArr[~mask] = waterVal # ds.GetRasterBand(1).GetNoDataValue()
# Write to output
band = DEM_ds.GetRasterBand(1)
BandWriteArray(band, elevArr)
band.SetNoDataValue(ndv)
# Clean up
target_ds = refDS = DEM_ds = band = None
del maskArr, elevArr, ndv, mask
print(' DEM harmonized with landmask in %3.2f seconds.' %(time.time()-tic1))
def raster_extent(in_raster):
'''
Given a raster object, return the bounding extent [xMin, yMin, xMax, yMax]
'''
xMin, DX, xskew, yMax, yskew, DY = in_raster.GetGeoTransform()
Xsize = in_raster.RasterXSize
Ysize = in_raster.RasterYSize
xMax = xMin + (float(Xsize)*DX)
yMin = yMax + (float(Ysize)*DY)
del Xsize, Ysize, xskew, yskew, DX, DY
return [xMin, yMin, xMax, yMax]
def alter_GT(GT, regridFactor):
'''
This function will alter the resolution of a raster's affine transformation,
assuming that the extent and CRS remain unchanged.
'''
# Georeference geogrid file
GeoTransform = list(GT)
DX = GT[1]/float(regridFactor)
DY = GT[5]/float(regridFactor)
GeoTransform[1] = DX
GeoTransform[5] = DY
GeoTransformStr = ' '.join([str(item) for item in GeoTransform])
return GeoTransform, GeoTransformStr, DX, DY
# Function to reclassify values in a raster
def reclassifyRaster(array, thresholdDict):
'''
Apply a dictionary of thresholds to an array for reclassification.
This function may be made more complicated as necessary
'''
# Reclassify array using bounds and new classified values
new_arr = array.copy()
for newval, oldval in thresholdDict.iteritems():
mask = numpy.where(array==oldval)
new_arr[mask] = newval
del array
return new_arr
# Function to calculate statistics on a raster using gdalinfo command-line
def calcStats(inRaster):
print(' Calculating statistics on %s' %inRaster)
subprocess.call('gdalinfo -stats %s' %inRaster, shell=True)
def apply_threshold(array, thresholdDict):
'''
Apply a dictionary of thresholds to an array for reclassification.
This function may be made more complicated as necessary
'''
# Reclassify array using bounds and new classified values
for newval, bounds in thresholdDict.iteritems():
mask = numpy.where((array > bounds[0]) & (array <= bounds[1])) # All values between bounds[0] and bounds[1]
array[mask] = newval
return array | def coastline_harmonize(maskFile, ds, outmaskFile, outDEM, minimum, waterVal=0):
"""
This function is designed to take a coastline mask and harmonize elevation
values to it, such that no elevation values that are masked as water cells
will have elevation >0, and no land cells will have an elevation < minimum.
"""
tic1 = time.time()
ref_ds = gdal.Open(maskFile, gdalconst.GA_ReadOnly)
target_ds = gdal.GetDriverByName(RasterDriver).Create(outmaskFile, ds.RasterXSize, ds.RasterYSize, 1, gdal.GDT_Byte)
dem_ds = gdal.GetDriverByName(RasterDriver).Create(outDEM, ds.RasterXSize, ds.RasterYSize, 1, ds.GetRasterBand(1).DataType)
copy_dataset_info(ds, target_ds)
copy_dataset_info(ds, DEM_ds)
gdal.ReprojectImage(refDS, target_ds, refDS.GetProjection(), target_ds.GetProjection(), gdalconst.GRA_NearestNeighbour)
mask_arr = band_read_as_array(target_ds.GetRasterBand(1))
elev_arr = band_read_as_array(ds.GetRasterBand(1))
ndv = ds.GetRasterBand(1).GetNoDataValue()
mask = maskArr == 1
elevArr[elevArr == ndv] = 0
elevArr[mask] += minimum
elevArr[~mask] = waterVal
band = DEM_ds.GetRasterBand(1)
band_write_array(band, elevArr)
band.SetNoDataValue(ndv)
target_ds = ref_ds = dem_ds = band = None
del maskArr, elevArr, ndv, mask
print(' DEM harmonized with landmask in %3.2f seconds.' % (time.time() - tic1))
def raster_extent(in_raster):
"""
Given a raster object, return the bounding extent [xMin, yMin, xMax, yMax]
"""
(x_min, dx, xskew, y_max, yskew, dy) = in_raster.GetGeoTransform()
xsize = in_raster.RasterXSize
ysize = in_raster.RasterYSize
x_max = xMin + float(Xsize) * DX
y_min = yMax + float(Ysize) * DY
del Xsize, Ysize, xskew, yskew, DX, DY
return [xMin, yMin, xMax, yMax]
def alter_gt(GT, regridFactor):
"""
This function will alter the resolution of a raster's affine transformation,
assuming that the extent and CRS remain unchanged.
"""
geo_transform = list(GT)
dx = GT[1] / float(regridFactor)
dy = GT[5] / float(regridFactor)
GeoTransform[1] = DX
GeoTransform[5] = DY
geo_transform_str = ' '.join([str(item) for item in GeoTransform])
return (GeoTransform, GeoTransformStr, DX, DY)
def reclassify_raster(array, thresholdDict):
"""
Apply a dictionary of thresholds to an array for reclassification.
This function may be made more complicated as necessary
"""
new_arr = array.copy()
for (newval, oldval) in thresholdDict.iteritems():
mask = numpy.where(array == oldval)
new_arr[mask] = newval
del array
return new_arr
def calc_stats(inRaster):
print(' Calculating statistics on %s' % inRaster)
subprocess.call('gdalinfo -stats %s' % inRaster, shell=True)
def apply_threshold(array, thresholdDict):
"""
Apply a dictionary of thresholds to an array for reclassification.
This function may be made more complicated as necessary
"""
for (newval, bounds) in thresholdDict.iteritems():
mask = numpy.where((array > bounds[0]) & (array <= bounds[1]))
array[mask] = newval
return array |
# This program gets a numberic test score from the
# user and displays the corresponding letter grade.
# Named constants to represent the grade thresholds
A_SCORE = 90
B_SCORE = 80
C_SCORE = 70
D_SCORE = 60
# Get a test score from the user.
score = int(input('Enter your test score: '))
# Determine the grade.
if score >= A_SCORE:
print('Your grade is A.')
else:
if score >= B_SCORE:
print('Your grade is B.')
else:
if score >= C_SCORE:
print('Your grade is C.')
else:
if score >= D_SCORE:
print('Your grade is D.')
else:
print('Your grade is F.')
| a_score = 90
b_score = 80
c_score = 70
d_score = 60
score = int(input('Enter your test score: '))
if score >= A_SCORE:
print('Your grade is A.')
elif score >= B_SCORE:
print('Your grade is B.')
elif score >= C_SCORE:
print('Your grade is C.')
elif score >= D_SCORE:
print('Your grade is D.')
else:
print('Your grade is F.') |
{
'target_defaults': {
'variables': {
'deps': [
'libbrillo-<(libbase_ver)',
'libchrome-<(libbase_ver)',
'libndp',
'libshill-client',
'protobuf-lite',
],
},
},
'targets': [
{
'target_name': 'protos',
'type': 'static_library',
'variables': {
'proto_in_dir': '.',
'proto_out_dir': 'include/arc-networkd',
},
'sources': ['<(proto_in_dir)/ipc.proto'],
'includes': ['../common-mk/protoc.gypi'],
},
{
'target_name': 'arc-networkd',
'type': 'executable',
'dependencies': ['protos'],
'sources': [
'arc_ip_config.cc',
'helper_process.cc',
'ip_helper.cc',
'main.cc',
'manager.cc',
'multicast_forwarder.cc',
'multicast_socket.cc',
'ndp_handler.cc',
'neighbor_finder.cc',
'router_finder.cc',
'shill_client.cc',
],
},
],
}
| {'target_defaults': {'variables': {'deps': ['libbrillo-<(libbase_ver)', 'libchrome-<(libbase_ver)', 'libndp', 'libshill-client', 'protobuf-lite']}}, 'targets': [{'target_name': 'protos', 'type': 'static_library', 'variables': {'proto_in_dir': '.', 'proto_out_dir': 'include/arc-networkd'}, 'sources': ['<(proto_in_dir)/ipc.proto'], 'includes': ['../common-mk/protoc.gypi']}, {'target_name': 'arc-networkd', 'type': 'executable', 'dependencies': ['protos'], 'sources': ['arc_ip_config.cc', 'helper_process.cc', 'ip_helper.cc', 'main.cc', 'manager.cc', 'multicast_forwarder.cc', 'multicast_socket.cc', 'ndp_handler.cc', 'neighbor_finder.cc', 'router_finder.cc', 'shill_client.cc']}]} |
class ApplicationException(Exception):
def __init__(self, java_exception):
self.java_exception = java_exception
def message(self):
return self.java_exception.getMessage()
| class Applicationexception(Exception):
def __init__(self, java_exception):
self.java_exception = java_exception
def message(self):
return self.java_exception.getMessage() |
# def t1():
# l = []
# for i in range(10000):
# l = l + [i]
# def t2():
# l = []
# for i in range(10000):
# l.append(i)
# def t3():
# l = [i for i in range(10000)]
# def t4():
# l = list(range(10000))
#
# from timeit import Timer
#
# timer1 = Timer("t1()", "from __main__ import t1")
# print("concat ",timer1.timeit(number=100), "seconds")
# timer2 = Timer("t2()", "from __main__ import t2")
# print("append ",timer2.timeit(number=100), "seconds")
# timer3 = Timer("t3()", "from __main__ import t3")
# print("comprehension ",timer3.timeit(number=100), "seconds")
# timer4 = Timer("t4()", "from __main__ import t4")
# print("list range ",timer4.timeit(number=100), "seconds")
#
I = []
for i in range(4):
I.append({"num": i})
print(I)
I = []
a = {"num": 0}
for i in range(4):
a["num"] = i
I.append(a)
print(I)
| i = []
for i in range(4):
I.append({'num': i})
print(I)
i = []
a = {'num': 0}
for i in range(4):
a['num'] = i
I.append(a)
print(I) |
#!/usr/bin/env python3
class ProjectNameException(Exception):
pass
class MissingEnv(ProjectNameException):
pass
class CreateDirectoryException(ProjectNameException):
pass
class ConfigError(ProjectNameException):
pass
| class Projectnameexception(Exception):
pass
class Missingenv(ProjectNameException):
pass
class Createdirectoryexception(ProjectNameException):
pass
class Configerror(ProjectNameException):
pass |
# Here go your api methods.
def get_prod_list():
prod_list = db(db.products).select(
db.products.id,
db.products.name,
db.products.description,
db.products.price,
orderby=~db.products.price
).as_list()
return response.json(dict(prod_list=prod_list))
def get_rev_list():
review_list = db(db.reviews).select(
db.reviews.usr,
db.reviews.product,
db.reviews.cont,
db.reviews.num,
).as_list()
return response.json(dict(review_list=review_list))
@auth.requires_signature()
def add_review():
rev_id = db.reviews.update_or_insert(
(db.reviews.product == request.vars.product) & (db.reviews.usr == auth.user.email),
usr=auth.user.email,
cont=request.vars.cont,
product=request.vars.product,
num=request.vars.num,
)
# We return the id of the new post, so we can insert it along all the others.
return response.json(dict(rev_id=rev_id))
| def get_prod_list():
prod_list = db(db.products).select(db.products.id, db.products.name, db.products.description, db.products.price, orderby=~db.products.price).as_list()
return response.json(dict(prod_list=prod_list))
def get_rev_list():
review_list = db(db.reviews).select(db.reviews.usr, db.reviews.product, db.reviews.cont, db.reviews.num).as_list()
return response.json(dict(review_list=review_list))
@auth.requires_signature()
def add_review():
rev_id = db.reviews.update_or_insert((db.reviews.product == request.vars.product) & (db.reviews.usr == auth.user.email), usr=auth.user.email, cont=request.vars.cont, product=request.vars.product, num=request.vars.num)
return response.json(dict(rev_id=rev_id)) |
########
# BASE #
########
# Registration
NICK = 'NICK'
PASS = 'PASS'
QUIT = 'QUIT'
USER = 'USER' # Sent when registering a new user.
# Channel ops
INVITE = 'INVITE'
JOIN = 'JOIN'
KICK = 'KICK'
LIST = 'LIST'
MODE = 'MODE'
NAMES = 'NAMES'
PART = 'PART'
TOPIC = 'TOPIC'
# Server ops
ADMIN = 'ADMIN'
CONNECT = 'CONNECT'
INFO = 'INFO'
LINKS = 'LINKS'
OPER = 'OPER'
REHASH = 'REHASH'
RESTART = 'RESTART'
SERVER = 'SERVER' # Sent when registering as a server.
SQUIT = 'SQUIT'
STATS = 'STATS'
SUMMON = 'SUMMON'
TIME = 'TIME'
TRACE = 'TRACE'
VERSION = 'VERSION'
WALLOPS = 'WALLOPS'
# Sending messages
NOTICE = 'NOTICE'
PRIVMSG = 'PRIVMSG'
# User queries
WHO = 'WHO'
WHOIS = 'WHOIS'
WHOWAS = 'WHOWAS'
# Misc
ERROR = 'ERROR'
KILL = 'KILL'
PING = 'PING'
PONG = 'PONG'
# Optional
AWAY = 'AWAY'
USERS = 'USERS'
USERHOST = 'USERHOST'
ISON = 'ISON' # "Is on"
###########
# REPLIES #
###########
# 001 to 004 are sent to a user upon successful registration.
RPL_WELCOME = '001'
RPL_YOURHOST = '002'
RPL_CREATED = '003'
RPL_MYINFO = '004'
# Sent by the server to suggest an alternative server when full or refused.
RPL_BOUNCE = '005'
# Reply to the USERHOST command.
RPL_USERHOST = '302'
# Reply to the ISON command (to see if a user "is on").
RPL_ISON = '303'
# Sent to any client sending a PRIVMSG to a client which is away.
RPL_AWAY = '301'
# Acknowledgements of the AWAY command.
RPL_UNAWAY = '305'
RPL_NOWAWAY = '306'
# Replies to a WHOIS message.
RPL_WHOISUSER = '311'
RPL_WHOISSERVE = '312'
RPL_WHOISOPERATOR = '313'
RPL_WHOISIDLE = '317'
RPL_ENDOFWHOIS = '318'
RPL_WHOISCHANNELS = '319'
# Replies to WHOWAS command. See also ERR_WASNOSUCHNICK.
RPL_WHOWASUSER = '314'
RPL_ENDOFWHOWAS = '369'
# Replies to LIST command. Note that 321 is obsolete and unused.
RPL_LISTSTART = '321'
RPL_LIST = '322'
RPL_LISTEND = '323'
# Replies to MODE. I don't understand the spec of 325!
RPL_CHANNELMODEIS = '324'
RPL_UNIQOPIS = '325'
RPL_INVITELIST = '346'
RPL_ENDOFINVITELIST = '347'
RPL_EXCEPTLIST = '348'
RPL_ENDOFEXCEPTLIST = '349'
RPL_BANLIST = '367'
RPL_ENDOFBANLIST = '368'
RPL_UMODEIS = '221'
# Replies to TOPIC.
RPL_NOTOPIC = '331'
RPL_TOPIC = '332'
# Acknowledgement of INVITE command.
RPL_INVITING = '341'
# Acknowledgement of SUMMON command.
RPL_SUMMONING = '342'
# Reply to VERSION.
RPL_VERSION = '351'
# Reply to WHO.
RPL_WHOREPLY = '352'
RPL_ENDOFWHO = '315'
# Reply to NAMES.
RPL_NAMREPLY = '353'
RPL_ENDOFNAMES = '366'
# Reply to LINKS.
RPL_LINKS = '364'
RPL_ENDOFLINKS = '365'
# Reply to INFO.
RPL_INFO = '371'
RPL_ENDOFINFO = '374'
# Reply to MOTD. Also usually sent upon successful registration.
RPL_MOTDSTART = '375'
RPL_MOTD = '372'
RPL_ENDOFMOTD = '376'
# Acknowledgement of OPER.
RPL_YOUREOPER = '381'
# Acknowledgement of REHASH.
RPL_REHASHING = '382'
# Reply to SERVICE upon successful registration.
RPL_YOURESERVICE = '383'
# Reply to TIME.
RPL_TIME = '391'
# Replies to USERS.
RPL_USERSSTART = '392'
RPL_USERS = '393'
RPL_ENDOFUSERS = '394'
RPL_NOUSERS = '395'
# Replies to TRACE.
RPL_TRACELINK = '200'
RPL_TRACECONNECTING = '201'
RPL_TRACEHANDSHAKE = '202'
RPL_TRACEUNKNOWN = '203'
RPL_TRACEOPERATOR = '204'
RPL_TRACEUSER = '205'
RPL_TRACESERVER = '206'
RPL_TRACESERVICE = '207'
RPL_TRACENEWTYPE = '208'
RPL_TRACECLASS = '209'
RPL_TRACERECONNECT = '210'
RPL_TRACELOG = '261'
RPL_TRACEEND = '262'
# Reply to STATS. See also ERR_NOSUCHSERVER.
RPL_STATSLINKINFO = '211'
RPL_STATSCOMMANDS = '212'
RPL_ENDOFSTATS = '219'
RPL_STATSUPTIME = '242'
RPL_STATSOLINE = '243'
# Reply to SERVLIST.
RPL_SERVLIST = '234'
RPL_SERVLISTEND = '235'
# Reply to LUSERS.
RPL_LUSERCLIENT = '251'
RPL_LUSEROP = '252'
RPL_LUSERUNKNOWN = '253'
RPL_LUSERCHANNELS = '254'
RPL_LUSERME = '255'
# Reply to ADMIN.
RPL_ADMINME = '256'
RPL_ADMINLOC1 = '257'
RPL_ADMINLOC2 = '258'
RPL_ADMINEMAIL = '259'
# Sent when a server drops a command without processing it.
RPL_TRYAGAIN = '263'
##########
# ERRORS #
##########
ERR_NOSUCHNICK = '401'
ERR_NOSUCHSERVER = '402'
ERR_NOSUCHCHANNEL = '403'
ERR_CANNOTSENDTOCHAN = '404'
ERR_TOOMANYCHANNELS = '405'
ERR_WASNOSUCHNICK = '406'
ERR_TOOMANYTARGETS = '407'
ERR_NOSUCHSERVICE = '408'
ERR_NOORIGIN = '409'
ERR_NORECIPIENT = '411'
ERR_NOTEXTTOSEND = '412'
ERR_NOTOPLEVEL = '413'
ERR_WILDTOPLEVEL = '414'
ERR_BADMASK = '415'
ERR_UNKNOWNCOMMAND = '421'
ERR_NOMOTD = '422'
ERR_NOADMININFO = '423'
ERR_FILEERROR = '424'
ERR_NONICKNAMEGIVEN = '431'
ERR_ERRONEUSNICKNAME = '432'
ERR_NICKNAMEINUSE = '433'
ERR_NICKCOLLISION = '436'
ERR_UNAVAILRESOURCE = '437'
ERR_USERNOTINCHANNEL = '441'
ERR_NOTONCHANNEL = '442'
ERR_USERONCHANNEL = '443'
ERR_NOLOGIN = '444'
ERR_SUMMONDISABLED = '445'
ERR_USERSDISABLED = '446'
ERR_NOTREGISTERED = '451'
ERR_NEEDMOREPARAMS = '461'
ERR_ALREADYREGISTRED = '462'
ERR_NOPERMFORHOST = '463'
ERR_PASSWDMISMATCH = '464'
ERR_YOUREBANNEDCREEP = '465'
ERR_YOUWILLBEBANNED = '466'
ERR_KEYSET = '467'
ERR_CHANNELISFULL = '471'
ERR_UNKNOWNMODE = '472'
ERR_INVITEONLYCHAN = '473'
ERR_BANNEDFROMCHAN = '474'
ERR_BADCHANNELKEY = '475'
ERR_BADCHANMASK = '476'
ERR_NOCHANMODES = '477'
ERR_BANLISTFULL = '478'
ERR_NOPRIVILEGES = '481'
ERR_CHANOPRIVSNEEDED = '482'
ERR_CANTKILLSERVER = '483'
ERR_RESTRICTED = '484'
ERR_UNIQOPPRIVSNEEDED = '485'
ERR_NOOPERHOST = '491'
ERR_UMODEUNKNOWNFLAG = '501'
ERR_USERSDONTMATCH = '502'
#########
# Other #
#########
# Found in responses from freenode
# Names from https://www.alien.net.au/irc/irc2numerics.html
# Could not find in a spec.
RPL_STATSCONN = '250'
RPL_LOCALUSERS = '265'
RPL_GLOBALUSERS = '266'
RPL_CHANNEL_URL = '328'
| nick = 'NICK'
pass = 'PASS'
quit = 'QUIT'
user = 'USER'
invite = 'INVITE'
join = 'JOIN'
kick = 'KICK'
list = 'LIST'
mode = 'MODE'
names = 'NAMES'
part = 'PART'
topic = 'TOPIC'
admin = 'ADMIN'
connect = 'CONNECT'
info = 'INFO'
links = 'LINKS'
oper = 'OPER'
rehash = 'REHASH'
restart = 'RESTART'
server = 'SERVER'
squit = 'SQUIT'
stats = 'STATS'
summon = 'SUMMON'
time = 'TIME'
trace = 'TRACE'
version = 'VERSION'
wallops = 'WALLOPS'
notice = 'NOTICE'
privmsg = 'PRIVMSG'
who = 'WHO'
whois = 'WHOIS'
whowas = 'WHOWAS'
error = 'ERROR'
kill = 'KILL'
ping = 'PING'
pong = 'PONG'
away = 'AWAY'
users = 'USERS'
userhost = 'USERHOST'
ison = 'ISON'
rpl_welcome = '001'
rpl_yourhost = '002'
rpl_created = '003'
rpl_myinfo = '004'
rpl_bounce = '005'
rpl_userhost = '302'
rpl_ison = '303'
rpl_away = '301'
rpl_unaway = '305'
rpl_nowaway = '306'
rpl_whoisuser = '311'
rpl_whoisserve = '312'
rpl_whoisoperator = '313'
rpl_whoisidle = '317'
rpl_endofwhois = '318'
rpl_whoischannels = '319'
rpl_whowasuser = '314'
rpl_endofwhowas = '369'
rpl_liststart = '321'
rpl_list = '322'
rpl_listend = '323'
rpl_channelmodeis = '324'
rpl_uniqopis = '325'
rpl_invitelist = '346'
rpl_endofinvitelist = '347'
rpl_exceptlist = '348'
rpl_endofexceptlist = '349'
rpl_banlist = '367'
rpl_endofbanlist = '368'
rpl_umodeis = '221'
rpl_notopic = '331'
rpl_topic = '332'
rpl_inviting = '341'
rpl_summoning = '342'
rpl_version = '351'
rpl_whoreply = '352'
rpl_endofwho = '315'
rpl_namreply = '353'
rpl_endofnames = '366'
rpl_links = '364'
rpl_endoflinks = '365'
rpl_info = '371'
rpl_endofinfo = '374'
rpl_motdstart = '375'
rpl_motd = '372'
rpl_endofmotd = '376'
rpl_youreoper = '381'
rpl_rehashing = '382'
rpl_youreservice = '383'
rpl_time = '391'
rpl_usersstart = '392'
rpl_users = '393'
rpl_endofusers = '394'
rpl_nousers = '395'
rpl_tracelink = '200'
rpl_traceconnecting = '201'
rpl_tracehandshake = '202'
rpl_traceunknown = '203'
rpl_traceoperator = '204'
rpl_traceuser = '205'
rpl_traceserver = '206'
rpl_traceservice = '207'
rpl_tracenewtype = '208'
rpl_traceclass = '209'
rpl_tracereconnect = '210'
rpl_tracelog = '261'
rpl_traceend = '262'
rpl_statslinkinfo = '211'
rpl_statscommands = '212'
rpl_endofstats = '219'
rpl_statsuptime = '242'
rpl_statsoline = '243'
rpl_servlist = '234'
rpl_servlistend = '235'
rpl_luserclient = '251'
rpl_luserop = '252'
rpl_luserunknown = '253'
rpl_luserchannels = '254'
rpl_luserme = '255'
rpl_adminme = '256'
rpl_adminloc1 = '257'
rpl_adminloc2 = '258'
rpl_adminemail = '259'
rpl_tryagain = '263'
err_nosuchnick = '401'
err_nosuchserver = '402'
err_nosuchchannel = '403'
err_cannotsendtochan = '404'
err_toomanychannels = '405'
err_wasnosuchnick = '406'
err_toomanytargets = '407'
err_nosuchservice = '408'
err_noorigin = '409'
err_norecipient = '411'
err_notexttosend = '412'
err_notoplevel = '413'
err_wildtoplevel = '414'
err_badmask = '415'
err_unknowncommand = '421'
err_nomotd = '422'
err_noadmininfo = '423'
err_fileerror = '424'
err_nonicknamegiven = '431'
err_erroneusnickname = '432'
err_nicknameinuse = '433'
err_nickcollision = '436'
err_unavailresource = '437'
err_usernotinchannel = '441'
err_notonchannel = '442'
err_useronchannel = '443'
err_nologin = '444'
err_summondisabled = '445'
err_usersdisabled = '446'
err_notregistered = '451'
err_needmoreparams = '461'
err_alreadyregistred = '462'
err_nopermforhost = '463'
err_passwdmismatch = '464'
err_yourebannedcreep = '465'
err_youwillbebanned = '466'
err_keyset = '467'
err_channelisfull = '471'
err_unknownmode = '472'
err_inviteonlychan = '473'
err_bannedfromchan = '474'
err_badchannelkey = '475'
err_badchanmask = '476'
err_nochanmodes = '477'
err_banlistfull = '478'
err_noprivileges = '481'
err_chanoprivsneeded = '482'
err_cantkillserver = '483'
err_restricted = '484'
err_uniqopprivsneeded = '485'
err_nooperhost = '491'
err_umodeunknownflag = '501'
err_usersdontmatch = '502'
rpl_statsconn = '250'
rpl_localusers = '265'
rpl_globalusers = '266'
rpl_channel_url = '328' |
# -*- coding: utf-8 -*-
if __name__ == '__main__':
Plant = lambda x: x + 2
FFC = lambda x: 1.1 * x + 1.9
FBC = lambda y: 0.9*y - 1.8
x = 5
x_ = x
y = Plant(x)
for k in range(100):
ypre = FFC(x_)
x_ = FFC(ypre)
x_ = (x + x_) / 2
print(y, ypre)
| if __name__ == '__main__':
plant = lambda x: x + 2
ffc = lambda x: 1.1 * x + 1.9
fbc = lambda y: 0.9 * y - 1.8
x = 5
x_ = x
y = plant(x)
for k in range(100):
ypre = ffc(x_)
x_ = ffc(ypre)
x_ = (x + x_) / 2
print(y, ypre) |
def gcdIter(a, b):
'''
a, b: positive integers
returns: a positive integer, the greatest common divisor of a & b.
'''
# Your code here
gcd = 1
if a > b:
for i in range(b, 0, -1):
if a % i == 0 and b % i == 0:
gcd = i
break
else:
for i in range(a, 0, -1):
if a % i == 0 and b % i == 0:
gcd = i
break
return gcd
print(gcdIter(2, 12))
| def gcd_iter(a, b):
"""
a, b: positive integers
returns: a positive integer, the greatest common divisor of a & b.
"""
gcd = 1
if a > b:
for i in range(b, 0, -1):
if a % i == 0 and b % i == 0:
gcd = i
break
else:
for i in range(a, 0, -1):
if a % i == 0 and b % i == 0:
gcd = i
break
return gcd
print(gcd_iter(2, 12)) |
#English alphabet to be used in
#decipher/encipher calculations.
Alpha=['a','b','c','d','e','f','g',
'h','i','j','k','l','m','n',
'o','p','q','r','s','t','u',
'v','w','x','y','z']
def v_cipher(mode, text):
if(mode == "encipher"):
plainTxt = text
cipher = ""
key = input("Key:")
key = key.upper()
if(len(key) > len(plainTxt.strip())):
print("Error key is larger than the message")
exit()
keyIndex = 0
for c in plainTxt:
if(ord(c) >= 65 and ord(c) <= 90):
m = ord(key[keyIndex]) - 65
k = ord(c) - 65
cipherCharNum = (m + k) % 26
cipherChar = Alpha[cipherCharNum].upper()
cipher += cipherChar
keyIndex += 1
keyIndex %= len(key)
elif(ord(c) >= 97 and ord(c) <= 122):
m = ord(key[keyIndex]) - 65
k = ord(c) - 97
cipherCharNum = (m + k) % 26
cipherChar = Alpha[cipherCharNum]
cipher += cipherChar
keyIndex += 1
keyIndex %= len(key)
else:
cipher += c
print("Cipher:", cipher)
elif(mode == "decipher"):
cipher = text
plainTxt = ""
key = input("Key:")
key = key.upper()
if(len(key) > len(cipher.strip())):
print("Error key is larger than the cipher")
exit()
keyIndex = 0
for c in cipher:
if(ord(c) >= 65 and ord(c) <= 90):
k = ord(key[keyIndex]) - 65
cNum = ord(c) - 65
plainCharNum =(26 + cNum - k) % 26
plainTxtChar = Alpha[plainCharNum].upper()
plainTxt += plainTxtChar
keyIndex += 1
keyIndex %= len(key)
elif(ord(c) >= 97 and ord(c) <= 122):
k=ord(key[keyIndex]) - 65
cNum=ord(c) - 97
plainCharNum = (26 + cNum - k ) %26
plainTxtChar=Alpha[plainCharNum]
plainTxt += plainTxtChar
keyIndex += 1
keyIndex %= len(key)
else:
plainTxt += c
print("Message:", plainTxt)
| alpha = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
def v_cipher(mode, text):
if mode == 'encipher':
plain_txt = text
cipher = ''
key = input('Key:')
key = key.upper()
if len(key) > len(plainTxt.strip()):
print('Error key is larger than the message')
exit()
key_index = 0
for c in plainTxt:
if ord(c) >= 65 and ord(c) <= 90:
m = ord(key[keyIndex]) - 65
k = ord(c) - 65
cipher_char_num = (m + k) % 26
cipher_char = Alpha[cipherCharNum].upper()
cipher += cipherChar
key_index += 1
key_index %= len(key)
elif ord(c) >= 97 and ord(c) <= 122:
m = ord(key[keyIndex]) - 65
k = ord(c) - 97
cipher_char_num = (m + k) % 26
cipher_char = Alpha[cipherCharNum]
cipher += cipherChar
key_index += 1
key_index %= len(key)
else:
cipher += c
print('Cipher:', cipher)
elif mode == 'decipher':
cipher = text
plain_txt = ''
key = input('Key:')
key = key.upper()
if len(key) > len(cipher.strip()):
print('Error key is larger than the cipher')
exit()
key_index = 0
for c in cipher:
if ord(c) >= 65 and ord(c) <= 90:
k = ord(key[keyIndex]) - 65
c_num = ord(c) - 65
plain_char_num = (26 + cNum - k) % 26
plain_txt_char = Alpha[plainCharNum].upper()
plain_txt += plainTxtChar
key_index += 1
key_index %= len(key)
elif ord(c) >= 97 and ord(c) <= 122:
k = ord(key[keyIndex]) - 65
c_num = ord(c) - 97
plain_char_num = (26 + cNum - k) % 26
plain_txt_char = Alpha[plainCharNum]
plain_txt += plainTxtChar
key_index += 1
key_index %= len(key)
else:
plain_txt += c
print('Message:', plainTxt) |
class Match:
def __init__(self, first_team, second_team, first_team_score, second_team_score):
self.first_team = first_team
self.second_team = second_team
self.first_team_score = first_team_score
self.second_team_score = second_team_score
self.commentary = []
def __repr__(self):
return str(self.__dict__)
| class Match:
def __init__(self, first_team, second_team, first_team_score, second_team_score):
self.first_team = first_team
self.second_team = second_team
self.first_team_score = first_team_score
self.second_team_score = second_team_score
self.commentary = []
def __repr__(self):
return str(self.__dict__) |
def millis_interval(start, end):
diff = end - start
millis = diff.days * 24 * 60 * 60 * 1000
millis += diff.seconds * 1000
millis += diff.microseconds / 1000
return int(round(millis))
| def millis_interval(start, end):
diff = end - start
millis = diff.days * 24 * 60 * 60 * 1000
millis += diff.seconds * 1000
millis += diff.microseconds / 1000
return int(round(millis)) |
'''
module for calculating
factorials of large
numbers efficiently
'''
def factorial(n: int):
'''
Calculating factorial using
prime decomposition
'''
prime = [True] * (n + 1)
result = 1
for i in range (2, n + 1):
if (prime[i]):
j = 2 * i
while (j <= n):
prime[j] = False
j += i
sum = 0
num = i
while (num <= n):
sum += n // num
num *= i
result *= i ** sum
return result
'''
PyAlgo
Devansh Singh, 2021
''' | """
module for calculating
factorials of large
numbers efficiently
"""
def factorial(n: int):
"""
Calculating factorial using
prime decomposition
"""
prime = [True] * (n + 1)
result = 1
for i in range(2, n + 1):
if prime[i]:
j = 2 * i
while j <= n:
prime[j] = False
j += i
sum = 0
num = i
while num <= n:
sum += n // num
num *= i
result *= i ** sum
return result
'\nPyAlgo\nDevansh Singh, 2021\n' |
class Solution:
def frequencySort(self, s: str) -> str:
freq_dict = dict()
output = ""
for x in s:
if x in freq_dict:
freq_dict[x] += 1
else:
freq_dict[x] = 1
refined_freq = sorted(freq_dict.items(), key=operator.itemgetter(1), reverse=True)
for x in refined_freq:
output += x[0] * x[1]
return output | class Solution:
def frequency_sort(self, s: str) -> str:
freq_dict = dict()
output = ''
for x in s:
if x in freq_dict:
freq_dict[x] += 1
else:
freq_dict[x] = 1
refined_freq = sorted(freq_dict.items(), key=operator.itemgetter(1), reverse=True)
for x in refined_freq:
output += x[0] * x[1]
return output |
class Solution:
def minMeetingRooms(self, intervals: List[List[int]]) -> int:
time = []
for i in intervals:
time.append((i[0], 1))
time.append((i[1], 0))
time.sort()
count = maxCount = 0
for t in time:
if t[1] == 1:
count += 1
maxCount = max(maxCount, count)
else:
count -= 1
return maxCount
| class Solution:
def min_meeting_rooms(self, intervals: List[List[int]]) -> int:
time = []
for i in intervals:
time.append((i[0], 1))
time.append((i[1], 0))
time.sort()
count = max_count = 0
for t in time:
if t[1] == 1:
count += 1
max_count = max(maxCount, count)
else:
count -= 1
return maxCount |
class Company(object):
def __init__(self, name, title, start_date):
self.name = name
self.title = title
self.start_date = start_date
def getName(self):
return self.name
def getTitle(self):
return self.title
def getStartDate(self):
return self.start_date
| class Company(object):
def __init__(self, name, title, start_date):
self.name = name
self.title = title
self.start_date = start_date
def get_name(self):
return self.name
def get_title(self):
return self.title
def get_start_date(self):
return self.start_date |
class FastSort2():
def __init__(self, elems = []):
self._elems = elems
def FS2(self, low, high):
if low >= high:
return
i = low
pivot = self._elems[low]
for m in range(low + 1, high + 1):
if self._elems[m] < pivot:
i += 1
self._elems[i], self._elems[m] = self._elems[m], self._elems[i]
self._elems[low], self._elems[i] = self._elems[i], self._elems[low]
self.FS2(low, i-1)
self.FS2(i+1, high)
def get_res(self):
return self._elems
if __name__ == '__main__':
test = [1, 5, 8, 2, 9, 26, 98, 34, 101, 76, 34, 26]
k1 = FastSort2(test)
k1.FS2(0, len(test) - 1)
print(k1.get_res())
| class Fastsort2:
def __init__(self, elems=[]):
self._elems = elems
def fs2(self, low, high):
if low >= high:
return
i = low
pivot = self._elems[low]
for m in range(low + 1, high + 1):
if self._elems[m] < pivot:
i += 1
(self._elems[i], self._elems[m]) = (self._elems[m], self._elems[i])
(self._elems[low], self._elems[i]) = (self._elems[i], self._elems[low])
self.FS2(low, i - 1)
self.FS2(i + 1, high)
def get_res(self):
return self._elems
if __name__ == '__main__':
test = [1, 5, 8, 2, 9, 26, 98, 34, 101, 76, 34, 26]
k1 = fast_sort2(test)
k1.FS2(0, len(test) - 1)
print(k1.get_res()) |
descriptor = ' {:<30} {}'
message_help_required_tagname = descriptor.format('', 'required: provide a tag to scrape')
message_help_required_login_username = descriptor.format('', 'required: add a login username')
message_help_required_login_password = descriptor.format('', 'required: add a login password')
message_help_required_users_to_remove = descriptor.format('', 'required: add users to remove')
message_help_required_users_n_to_remove = descriptor.format('', 'required: add user numbers to remove')
message_help_required_tags_to_remove = descriptor.format('', 'required: add tags to remove')
message_help_required_tags_n_to_remove = descriptor.format('', 'required: add tag numbers to remove')
message_help_required_max = descriptor.format('', 'required: provide a max number of posts to scrape')
message_help_recommended_max = descriptor.format('', 'recommended: provide a max number of posts to scrape')
message_help_required_logged_in = descriptor.format('', 'required: you need to be logged in')
args_options = [
['--login-username', 'the login username' + '\n'
+ message_help_required_login_username],
['--login-password', 'the login password' + '\n'
+ message_help_required_login_password],
['--update-users', 'Check all previously scraped users for new posts' + '\n'
+ message_help_recommended_max],
['--top-tags', 'scrape top tags' + '\n'
+ message_help_required_tagname],
['--recent-tags', 'scrape recent tags' + '\n'
+ message_help_required_tagname],
['--max', 'maximum number of posts to scrape' + '\n'
+ message_help_required_max],
['--stories', 'scrape stories also' + '\n'
+ message_help_required_logged_in],
['--headful', 'display the browser'],
['--list-users', 'list all scraped users'],
['--list-tags', 'list all scraped tags'],
['--remove-users', 'remove user(s)' + '\n'
+ message_help_required_users_to_remove],
['--remove-users-n', 'remove user(s) by number' + '\n'
+ message_help_required_users_n_to_remove],
['--remove-all-users', 'remove all users'],
['--remove-tags', 'remove tag(s)' + '\n'
+ message_help_required_tags_to_remove],
['--remove-tags-n', 'remove tag(s) by number' + '\n'
+ message_help_required_tags_n_to_remove],
['--remove-all-tags', 'remove all tags'],
['--version', 'program version'],
['--log', 'create log file'],
['--help', 'show help']
]
def print_help():
print('usage: ' + 'igscraper' + ' [username] [options]')
print('')
print('options: ')
for i, argument in enumerate(args_options):
print(descriptor.format(argument[0], argument[1]))
| descriptor = ' {:<30} {}'
message_help_required_tagname = descriptor.format('', 'required: provide a tag to scrape')
message_help_required_login_username = descriptor.format('', 'required: add a login username')
message_help_required_login_password = descriptor.format('', 'required: add a login password')
message_help_required_users_to_remove = descriptor.format('', 'required: add users to remove')
message_help_required_users_n_to_remove = descriptor.format('', 'required: add user numbers to remove')
message_help_required_tags_to_remove = descriptor.format('', 'required: add tags to remove')
message_help_required_tags_n_to_remove = descriptor.format('', 'required: add tag numbers to remove')
message_help_required_max = descriptor.format('', 'required: provide a max number of posts to scrape')
message_help_recommended_max = descriptor.format('', 'recommended: provide a max number of posts to scrape')
message_help_required_logged_in = descriptor.format('', 'required: you need to be logged in')
args_options = [['--login-username', 'the login username' + '\n' + message_help_required_login_username], ['--login-password', 'the login password' + '\n' + message_help_required_login_password], ['--update-users', 'Check all previously scraped users for new posts' + '\n' + message_help_recommended_max], ['--top-tags', 'scrape top tags' + '\n' + message_help_required_tagname], ['--recent-tags', 'scrape recent tags' + '\n' + message_help_required_tagname], ['--max', 'maximum number of posts to scrape' + '\n' + message_help_required_max], ['--stories', 'scrape stories also' + '\n' + message_help_required_logged_in], ['--headful', 'display the browser'], ['--list-users', 'list all scraped users'], ['--list-tags', 'list all scraped tags'], ['--remove-users', 'remove user(s)' + '\n' + message_help_required_users_to_remove], ['--remove-users-n', 'remove user(s) by number' + '\n' + message_help_required_users_n_to_remove], ['--remove-all-users', 'remove all users'], ['--remove-tags', 'remove tag(s)' + '\n' + message_help_required_tags_to_remove], ['--remove-tags-n', 'remove tag(s) by number' + '\n' + message_help_required_tags_n_to_remove], ['--remove-all-tags', 'remove all tags'], ['--version', 'program version'], ['--log', 'create log file'], ['--help', 'show help']]
def print_help():
print('usage: ' + 'igscraper' + ' [username] [options]')
print('')
print('options: ')
for (i, argument) in enumerate(args_options):
print(descriptor.format(argument[0], argument[1])) |
#
# PySNMP MIB module Juniper-TSM-CONF (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Juniper-TSM-CONF
# Produced by pysmi-0.3.4 at Mon Apr 29 19:53:51 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, ConstraintsIntersection, SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsIntersection", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion")
juniAgents, = mibBuilder.importSymbols("Juniper-Agents", "juniAgents")
AgentCapabilities, ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "AgentCapabilities", "ModuleCompliance", "NotificationGroup")
Counter32, Counter64, IpAddress, Bits, Gauge32, MibScalar, MibTable, MibTableRow, MibTableColumn, iso, Unsigned32, ObjectIdentity, TimeTicks, ModuleIdentity, Integer32, MibIdentifier, NotificationType = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "Counter64", "IpAddress", "Bits", "Gauge32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "iso", "Unsigned32", "ObjectIdentity", "TimeTicks", "ModuleIdentity", "Integer32", "MibIdentifier", "NotificationType")
DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention")
juniTsmAgent = ModuleIdentity((1, 3, 6, 1, 4, 1, 4874, 5, 2, 67))
juniTsmAgent.setRevisions(('2003-10-27 22:50',))
if mibBuilder.loadTexts: juniTsmAgent.setLastUpdated('200310272250Z')
if mibBuilder.loadTexts: juniTsmAgent.setOrganization('Juniper Networks, Inc.')
juniTsmAgentV1 = AgentCapabilities((1, 3, 6, 1, 4, 1, 4874, 5, 2, 67, 1))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juniTsmAgentV1 = juniTsmAgentV1.setProductRelease('Version 1 of the Terminal Server Management (TSM) component of the\n JUNOSe SNMP agent. This version of the TSM component is supported in\n JUNOSe 5.3 and subsequent system releases.')
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juniTsmAgentV1 = juniTsmAgentV1.setStatus('current')
mibBuilder.exportSymbols("Juniper-TSM-CONF", juniTsmAgent=juniTsmAgent, PYSNMP_MODULE_ID=juniTsmAgent, juniTsmAgentV1=juniTsmAgentV1)
| (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, constraints_intersection, single_value_constraint, value_range_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsUnion')
(juni_agents,) = mibBuilder.importSymbols('Juniper-Agents', 'juniAgents')
(agent_capabilities, module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'AgentCapabilities', 'ModuleCompliance', 'NotificationGroup')
(counter32, counter64, ip_address, bits, gauge32, mib_scalar, mib_table, mib_table_row, mib_table_column, iso, unsigned32, object_identity, time_ticks, module_identity, integer32, mib_identifier, notification_type) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter32', 'Counter64', 'IpAddress', 'Bits', 'Gauge32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'iso', 'Unsigned32', 'ObjectIdentity', 'TimeTicks', 'ModuleIdentity', 'Integer32', 'MibIdentifier', 'NotificationType')
(display_string, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention')
juni_tsm_agent = module_identity((1, 3, 6, 1, 4, 1, 4874, 5, 2, 67))
juniTsmAgent.setRevisions(('2003-10-27 22:50',))
if mibBuilder.loadTexts:
juniTsmAgent.setLastUpdated('200310272250Z')
if mibBuilder.loadTexts:
juniTsmAgent.setOrganization('Juniper Networks, Inc.')
juni_tsm_agent_v1 = agent_capabilities((1, 3, 6, 1, 4, 1, 4874, 5, 2, 67, 1))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juni_tsm_agent_v1 = juniTsmAgentV1.setProductRelease('Version 1 of the Terminal Server Management (TSM) component of the\n JUNOSe SNMP agent. This version of the TSM component is supported in\n JUNOSe 5.3 and subsequent system releases.')
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juni_tsm_agent_v1 = juniTsmAgentV1.setStatus('current')
mibBuilder.exportSymbols('Juniper-TSM-CONF', juniTsmAgent=juniTsmAgent, PYSNMP_MODULE_ID=juniTsmAgent, juniTsmAgentV1=juniTsmAgentV1) |
def ready_jobs_dict_to_key(ready_jobs_list_dict):
ready_jobs_list_key = (
"ready_jobs"
+ "_cpu_credits_"
+ str(ready_jobs_list_dict["cpu_credits"])
+ "_gpu_credits_"
+ str(ready_jobs_list_dict["gpu_credits"])
)
return ready_jobs_list_key
| def ready_jobs_dict_to_key(ready_jobs_list_dict):
ready_jobs_list_key = 'ready_jobs' + '_cpu_credits_' + str(ready_jobs_list_dict['cpu_credits']) + '_gpu_credits_' + str(ready_jobs_list_dict['gpu_credits'])
return ready_jobs_list_key |
{'application':{'type':'Application',
'name':'Template',
'backgrounds': [
{'type':'Background',
'name':'standaloneBuilder',
'title':u'PythonCard standaloneBuilder',
'size':(800, 610),
'statusBar':1,
'menubar': {'type':'MenuBar',
'menus': [
{'type':'Menu',
'name':'menuFile',
'label':'&File',
'items': [
{'type':'MenuItem',
'name':'menuFileNew',
'label':'&New\tCtrl+N',
'command':'newBtn',
},
{'type':'MenuItem',
'name':'menuFileOpen',
'label':'&Open\tCtrl+O',
'command':'openBtn',
},
{'type':'MenuItem',
'name':'menuFileSave',
'label':'&Save\tCtrl+S',
'command':'saveBtn',
},
{'type':'MenuItem',
'name':'menuFileSaveAs',
'label':'Save &As...',
},
{'type':'MenuItem',
'name':'fileSep2',
'label':'-',
},
{'type':'MenuItem',
'name':'menuFileExit',
'label':'E&xit\tAlt+X',
'command':'menuFileExit',
},
]
},
{'type':'Menu',
'name':'Edit',
'label':'&Edit',
'items': [
{'type':'MenuItem',
'name':'menuEditMainScript',
'label':u'&Main script...',
'command':'EditMainScript',
},
{'type':'MenuItem',
'name':'menuEditChglog',
'label':u'&Changelog...',
'command':'editChgLog',
},
{'type':'MenuItem',
'name':'menuEditReadme',
'label':u'&README...',
'command':'editReadme',
},
{'type':'MenuItem',
'name':'menuEditSpecfile',
'label':u'&Spec file...',
'command':'editSpecFile',
},
{'type':'MenuItem',
'name':'menuEditInnoFile',
'label':u'&Inno script...',
'command':'editInnoFile',
},
{'type':'MenuItem',
'name':'menuEditProps',
'label':u'&Project properties...',
'command':'editProps',
},
{'type':'MenuItem',
'name':'editSep1',
'label':'-',
},
{'type':'MenuItem',
'name':'menuEditPrefs',
'label':u'&Preferences...',
'command':'editPrefs',
},
]
},
{'type':'Menu',
'name':'menuTools',
'label':'&Tools',
'items': [
{'type':'MenuItem',
'name':'menuToolsLogAdd',
'label':u'A&dd changelog entry...\tShift++',
'command':'menuToolsLogAdd',
},
{'type':'MenuItem',
'name':'menuToolsChkImport',
'label':u'&Check component imports',
'command':'menuToolsChkImport',
},
{'type':'MenuItem',
'name':'toolSep1',
'label':'-',
},
{'type':'MenuItem',
'name':'menuToolsAddScript',
'label':u'Add &script...',
'command':'addScript',
},
{'type':'MenuItem',
'name':'menuToolsAddResource',
'label':u'Add &resource...',
'command':'addResource',
},
{'type':'MenuItem',
'name':'menuToolsAddPixmap',
'label':u'Add &pixmap...',
'command':'addPixmap',
},
{'type':'MenuItem',
'name':'menuToolsAddOther',
'label':u'Add &other...',
'command':'addOther',
},
{'type':'MenuItem',
'name':'toolSep2',
'label':u'-',
},
{'type':'MenuItem',
'name':'menuToolsRunMain',
'label':u'Run &main script',
'command':'runMainScript',
},
{'type':'MenuItem',
'name':'toolSep3',
'label':u'-',
},
{'type':'MenuItem',
'name':'menuToolsRebuild',
'label':'R&ebuild\tCtrl+R',
'command':'rebuildCmd',
},
{'type':'MenuItem',
'name':'menuToolsRelease',
'label':u'&Release\tCtrl+M',
'command':'releaseCmd',
},
]
},
{'type':'Menu',
'name':'menuHelp',
'label':'&Help',
'items': [
{'type':'MenuItem',
'name':'menuHelpManual',
'label':u'&Manual',
'command':'menuHelpManual',
},
{'type':'MenuItem',
'name':'menuHelpAbout',
'label':u'&About standaloneBuilder...',
'command':'menuHelpAbout',
},
]
},
]
},
'strings': {
u'testString':u'This is a test string',
},
'components': [
{'type':'Button',
'name':'mainScriptEditBtn',
'position':(375, 120),
'size':(52, 25),
'actionBindings':{},
'command':'EditMainScript',
'font':{'faceName': u'Sans', 'size': 8},
'label':'Edit...',
'toolTip':'Edit the main script',
},
{'type':'StaticText',
'name':'versionString',
'position':(560, 125),
'actionBindings':{},
'text':'n/a',
},
{'type':'ImageButton',
'name':'newBtn',
'position':(5, 5),
'size':(38, 38),
'actionBindings':{},
'backgroundColor':(255, 255, 255),
'border':'3d',
'command':'newBtn',
'file':'pixmaps/new.png',
'toolTip':'Create a new project',
'userdata':'frozen',
},
{'type':'ImageButton',
'name':'openBtn',
'position':(40, 5),
'size':(38, 38),
'actionBindings':{},
'backgroundColor':(255, 255, 255),
'border':'3d',
'command':'openBtn',
'file':'pixmaps/open.png',
'toolTip':'Open an existing project',
'userdata':'frozen',
},
{'type':'ImageButton',
'name':'saveBtn',
'position':(75, 5),
'size':(38, 38),
'actionBindings':{},
'backgroundColor':(255, 255, 255),
'border':'3d',
'command':'saveBtn',
'file':'pixmaps/save.png',
'toolTip':'Save the current project',
'userdata':'frozen',
},
{'type':'ImageButton',
'name':'prefsBtn',
'position':(705, 5),
'size':(38, 38),
'actionBindings':{},
'backgroundColor':(255, 255, 255),
'border':'3d',
'command':'editPrefs',
'file':'pixmaps/prefs.png',
'toolTip':'standaloneBuilder preferences',
'userdata':'frozen',
},
{'type':'ImageButton',
'name':'quitBtn',
'position':(750, 5),
'size':(38, 38),
'actionBindings':{},
'backgroundColor':(255, 255, 255),
'border':'3d',
'command':'quitBtn',
'file':'pixmaps/exit.png',
'toolTip':'Quit the program',
'userdata':'frozen',
},
{'type':'TextField',
'name':'projectName',
'position':(95, 60),
'size':(250, -1),
'actionBindings':{},
},
{'type':'TextField',
'name':'projectIcon',
'position':(500, 60),
'size':(250, -1),
'actionBindings':{},
},
{'type':'Button',
'name':'iconBtn',
'position':(755, 60),
'size':(25, 25),
'actionBindings':{},
'label':'...',
},
{'type':'TextField',
'name':'baseDir',
'position':(95, 90),
'size':(250, -1),
'actionBindings':{},
},
{'type':'Button',
'name':'baseDirBtn',
'position':(350, 90),
'size':(25, 25),
'actionBindings':{},
'label':'...',
},
{'type':'TextField',
'name':'projectDesc',
'position':(500, 90),
'size':(250, -1),
'actionBindings':{},
},
{'type':'TextField',
'name':'mainScript',
'position':(95, 120),
'size':(250, -1),
'actionBindings':{},
},
{'type':'Button',
'name':'mainScriptBtn',
'position':(350, 120),
'size':(25, 25),
'actionBindings':{},
'label':'...',
},
{'type':'StaticBox',
'name':'StaticBox2',
'position':(5, 165),
'size':(380, 160),
'actionBindings':{},
'label':'Script files:',
},
{'type':'List',
'name':'scriptList',
'position':(15, 180),
'size':(360, 100),
'actionBindings':{},
'items':[],
},
{'type':'Button',
'name':'scriptAddBtn',
'position':(15, 285),
'actionBindings':{},
'command':'addScript',
'label':'Add...',
},
{'type':'Button',
'name':'scriptDelBtn',
'position':(100, 285),
'actionBindings':{},
'label':'Remove',
},
{'type':'Button',
'name':'scriptEditBtn',
'position':(185, 285),
'actionBindings':{},
'label':'Edit...',
},
{'type':'Button',
'name':'scriptDelAllBtn',
'position':(295, 285),
'actionBindings':{},
'label':'Clear all',
},
{'type':'StaticBox',
'name':'StaticBox3',
'position':(405, 165),
'size':(380, 160),
'actionBindings':{},
'label':'Resource files:',
},
{'type':'List',
'name':'resList',
'position':(415, 180),
'size':(360, 100),
'actionBindings':{},
'items':[],
},
{'type':'Button',
'name':'resAddBtn',
'position':(415, 285),
'actionBindings':{},
'command':'addResource',
'label':'Add..',
},
{'type':'Button',
'name':'resDelBtn',
'position':(500, 285),
'actionBindings':{},
'label':'Remove',
},
{'type':'Button',
'name':'resEditBtn',
'position':(585, 285),
'actionBindings':{},
'label':'Edit...',
},
{'type':'Button',
'name':'resDelAllBtn',
'position':(695, 285),
'actionBindings':{},
'label':'Clear all',
},
{'type':'StaticBox',
'name':'StaticBox4',
'position':(5, 325),
'size':(380, 160),
'actionBindings':{},
'label':'Pixmap files:',
},
{'type':'List',
'name':'pixmapList',
'position':(15, 340),
'size':(360, 100),
'actionBindings':{},
'items':[],
},
{'type':'Button',
'name':'pixmapAddBtn',
'position':(15, 445),
'actionBindings':{},
'command':'addPixmap',
'label':'Add...',
},
{'type':'Button',
'name':'pixmapDelBtn',
'position':(100, 445),
'actionBindings':{},
'label':'Remove',
},
{'type':'Button',
'name':'pixmapEditBtn',
'position':(185, 445),
'actionBindings':{},
'label':'Edit...',
},
{'type':'Button',
'name':'pixmapDelAllBtn',
'position':(295, 445),
'actionBindings':{},
'label':'Clear all',
},
{'type':'StaticBox',
'name':'StaticBox5',
'position':(405, 325),
'size':(380, 160),
'actionBindings':{},
'label':'Other files:',
},
{'type':'List',
'name':'otherList',
'position':(415, 340),
'size':(360, 100),
'actionBindings':{},
'items':[],
},
{'type':'Button',
'name':'docAddBtn',
'position':(415, 445),
'actionBindings':{},
'command':'addOther',
'label':'Add...',
},
{'type':'Button',
'name':'docDelBtn',
'position':(500, 445),
'actionBindings':{},
'label':'Remove',
},
{'type':'Button',
'name':'docEditBtn',
'position':(585, 445),
'actionBindings':{},
'label':'Edit...',
},
{'type':'Button',
'name':'docDelAllBtn',
'position':(695, 445),
'actionBindings':{},
'label':'Clear all',
},
{'type':'Button',
'name':'propertiesBtn',
'position':(15, 490),
'size':(85, -1),
'actionBindings':{},
'command':'editProps',
'label':'Properties...',
'toolTip':'Change your projects properties',
},
{'type':'Button',
'name':'changelogBtn',
'position':(100, 490),
'size':(85, -1),
'actionBindings':{},
'command':'editChgLog',
'label':'Changelog...',
'toolTip':'Edit the changelog file',
},
{'type':'Button',
'name':'readmeBtn',
'position':(100, 525),
'actionBindings':{},
'command':'editReadme',
'label':'README...',
'toolTip':'Edit the README file',
},
{'type':'Button',
'name':'specBtn',
'position':(185, 490),
'actionBindings':{},
'command':'editSpecFile',
'label':'Spec file...',
'toolTip':'Edit the applications spec file',
},
{'type':'Button',
'name':'innoBtn',
'position':(185, 525),
'size':(85, -1),
'actionBindings':{},
'command':'editInnoFile',
'label':'Inno script...',
'toolTip':'Edit the Inno setup script for your application',
},
{'type':'Button',
'name':'runBtn',
'position':(295, 490),
'actionBindings':{},
'command':'runMainScript',
'label':'Run...',
'toolTip':'Run the application',
},
{'type':'Button',
'name':'rebuildBtn',
'position':(695, 490),
'actionBindings':{},
'command':'rebuildCmd',
'label':'Rebuild',
'toolTip':'Rebuild the standalone version of your application',
'userdata':'frozen',
},
{'type':'Button',
'name':'releaseBtn',
'position':(695, 525),
'actionBindings':{},
'command':'releaseCmd',
'label':'Release',
'toolTip':'Make a release of your finished application',
'userdata':'frozen',
},
{'type':'StaticBox',
'name':'StaticBox1',
'position':(5, 45),
'size':(780, 115),
'actionBindings':{},
'label':'Project:',
},
{'type':'StaticText',
'name':'StaticText5',
'position':(15, 125),
'actionBindings':{},
'text':'Main script',
},
{'type':'StaticText',
'name':'StaticText4',
'position':(420, 95),
'actionBindings':{},
'text':'Description',
},
{'type':'StaticText',
'name':'StaticText9',
'position':(430, 65),
'actionBindings':{},
'text':'Icon (Win)',
},
{'type':'StaticText',
'name':'StaticText8',
'position':(500, 125),
'actionBindings':{},
'text':'Version',
},
{'type':'StaticText',
'name':'StaticText7',
'position':(15, 95),
'actionBindings':{},
'text':'Directory',
},
{'type':'StaticText',
'name':'StaticText6',
'position':(15, 65),
'actionBindings':{},
'text':'Name',
},
] # end components
} # end background
] # end backgrounds
} }
| {'application': {'type': 'Application', 'name': 'Template', 'backgrounds': [{'type': 'Background', 'name': 'standaloneBuilder', 'title': u'PythonCard standaloneBuilder', 'size': (800, 610), 'statusBar': 1, 'menubar': {'type': 'MenuBar', 'menus': [{'type': 'Menu', 'name': 'menuFile', 'label': '&File', 'items': [{'type': 'MenuItem', 'name': 'menuFileNew', 'label': '&New\tCtrl+N', 'command': 'newBtn'}, {'type': 'MenuItem', 'name': 'menuFileOpen', 'label': '&Open\tCtrl+O', 'command': 'openBtn'}, {'type': 'MenuItem', 'name': 'menuFileSave', 'label': '&Save\tCtrl+S', 'command': 'saveBtn'}, {'type': 'MenuItem', 'name': 'menuFileSaveAs', 'label': 'Save &As...'}, {'type': 'MenuItem', 'name': 'fileSep2', 'label': '-'}, {'type': 'MenuItem', 'name': 'menuFileExit', 'label': 'E&xit\tAlt+X', 'command': 'menuFileExit'}]}, {'type': 'Menu', 'name': 'Edit', 'label': '&Edit', 'items': [{'type': 'MenuItem', 'name': 'menuEditMainScript', 'label': u'&Main script...', 'command': 'EditMainScript'}, {'type': 'MenuItem', 'name': 'menuEditChglog', 'label': u'&Changelog...', 'command': 'editChgLog'}, {'type': 'MenuItem', 'name': 'menuEditReadme', 'label': u'&README...', 'command': 'editReadme'}, {'type': 'MenuItem', 'name': 'menuEditSpecfile', 'label': u'&Spec file...', 'command': 'editSpecFile'}, {'type': 'MenuItem', 'name': 'menuEditInnoFile', 'label': u'&Inno script...', 'command': 'editInnoFile'}, {'type': 'MenuItem', 'name': 'menuEditProps', 'label': u'&Project properties...', 'command': 'editProps'}, {'type': 'MenuItem', 'name': 'editSep1', 'label': '-'}, {'type': 'MenuItem', 'name': 'menuEditPrefs', 'label': u'&Preferences...', 'command': 'editPrefs'}]}, {'type': 'Menu', 'name': 'menuTools', 'label': '&Tools', 'items': [{'type': 'MenuItem', 'name': 'menuToolsLogAdd', 'label': u'A&dd changelog entry...\tShift++', 'command': 'menuToolsLogAdd'}, {'type': 'MenuItem', 'name': 'menuToolsChkImport', 'label': u'&Check component imports', 'command': 'menuToolsChkImport'}, {'type': 'MenuItem', 'name': 'toolSep1', 'label': '-'}, {'type': 'MenuItem', 'name': 'menuToolsAddScript', 'label': u'Add &script...', 'command': 'addScript'}, {'type': 'MenuItem', 'name': 'menuToolsAddResource', 'label': u'Add &resource...', 'command': 'addResource'}, {'type': 'MenuItem', 'name': 'menuToolsAddPixmap', 'label': u'Add &pixmap...', 'command': 'addPixmap'}, {'type': 'MenuItem', 'name': 'menuToolsAddOther', 'label': u'Add &other...', 'command': 'addOther'}, {'type': 'MenuItem', 'name': 'toolSep2', 'label': u'-'}, {'type': 'MenuItem', 'name': 'menuToolsRunMain', 'label': u'Run &main script', 'command': 'runMainScript'}, {'type': 'MenuItem', 'name': 'toolSep3', 'label': u'-'}, {'type': 'MenuItem', 'name': 'menuToolsRebuild', 'label': 'R&ebuild\tCtrl+R', 'command': 'rebuildCmd'}, {'type': 'MenuItem', 'name': 'menuToolsRelease', 'label': u'&Release\tCtrl+M', 'command': 'releaseCmd'}]}, {'type': 'Menu', 'name': 'menuHelp', 'label': '&Help', 'items': [{'type': 'MenuItem', 'name': 'menuHelpManual', 'label': u'&Manual', 'command': 'menuHelpManual'}, {'type': 'MenuItem', 'name': 'menuHelpAbout', 'label': u'&About standaloneBuilder...', 'command': 'menuHelpAbout'}]}]}, 'strings': {u'testString': u'This is a test string'}, 'components': [{'type': 'Button', 'name': 'mainScriptEditBtn', 'position': (375, 120), 'size': (52, 25), 'actionBindings': {}, 'command': 'EditMainScript', 'font': {'faceName': u'Sans', 'size': 8}, 'label': 'Edit...', 'toolTip': 'Edit the main script'}, {'type': 'StaticText', 'name': 'versionString', 'position': (560, 125), 'actionBindings': {}, 'text': 'n/a'}, {'type': 'ImageButton', 'name': 'newBtn', 'position': (5, 5), 'size': (38, 38), 'actionBindings': {}, 'backgroundColor': (255, 255, 255), 'border': '3d', 'command': 'newBtn', 'file': 'pixmaps/new.png', 'toolTip': 'Create a new project', 'userdata': 'frozen'}, {'type': 'ImageButton', 'name': 'openBtn', 'position': (40, 5), 'size': (38, 38), 'actionBindings': {}, 'backgroundColor': (255, 255, 255), 'border': '3d', 'command': 'openBtn', 'file': 'pixmaps/open.png', 'toolTip': 'Open an existing project', 'userdata': 'frozen'}, {'type': 'ImageButton', 'name': 'saveBtn', 'position': (75, 5), 'size': (38, 38), 'actionBindings': {}, 'backgroundColor': (255, 255, 255), 'border': '3d', 'command': 'saveBtn', 'file': 'pixmaps/save.png', 'toolTip': 'Save the current project', 'userdata': 'frozen'}, {'type': 'ImageButton', 'name': 'prefsBtn', 'position': (705, 5), 'size': (38, 38), 'actionBindings': {}, 'backgroundColor': (255, 255, 255), 'border': '3d', 'command': 'editPrefs', 'file': 'pixmaps/prefs.png', 'toolTip': 'standaloneBuilder preferences', 'userdata': 'frozen'}, {'type': 'ImageButton', 'name': 'quitBtn', 'position': (750, 5), 'size': (38, 38), 'actionBindings': {}, 'backgroundColor': (255, 255, 255), 'border': '3d', 'command': 'quitBtn', 'file': 'pixmaps/exit.png', 'toolTip': 'Quit the program', 'userdata': 'frozen'}, {'type': 'TextField', 'name': 'projectName', 'position': (95, 60), 'size': (250, -1), 'actionBindings': {}}, {'type': 'TextField', 'name': 'projectIcon', 'position': (500, 60), 'size': (250, -1), 'actionBindings': {}}, {'type': 'Button', 'name': 'iconBtn', 'position': (755, 60), 'size': (25, 25), 'actionBindings': {}, 'label': '...'}, {'type': 'TextField', 'name': 'baseDir', 'position': (95, 90), 'size': (250, -1), 'actionBindings': {}}, {'type': 'Button', 'name': 'baseDirBtn', 'position': (350, 90), 'size': (25, 25), 'actionBindings': {}, 'label': '...'}, {'type': 'TextField', 'name': 'projectDesc', 'position': (500, 90), 'size': (250, -1), 'actionBindings': {}}, {'type': 'TextField', 'name': 'mainScript', 'position': (95, 120), 'size': (250, -1), 'actionBindings': {}}, {'type': 'Button', 'name': 'mainScriptBtn', 'position': (350, 120), 'size': (25, 25), 'actionBindings': {}, 'label': '...'}, {'type': 'StaticBox', 'name': 'StaticBox2', 'position': (5, 165), 'size': (380, 160), 'actionBindings': {}, 'label': 'Script files:'}, {'type': 'List', 'name': 'scriptList', 'position': (15, 180), 'size': (360, 100), 'actionBindings': {}, 'items': []}, {'type': 'Button', 'name': 'scriptAddBtn', 'position': (15, 285), 'actionBindings': {}, 'command': 'addScript', 'label': 'Add...'}, {'type': 'Button', 'name': 'scriptDelBtn', 'position': (100, 285), 'actionBindings': {}, 'label': 'Remove'}, {'type': 'Button', 'name': 'scriptEditBtn', 'position': (185, 285), 'actionBindings': {}, 'label': 'Edit...'}, {'type': 'Button', 'name': 'scriptDelAllBtn', 'position': (295, 285), 'actionBindings': {}, 'label': 'Clear all'}, {'type': 'StaticBox', 'name': 'StaticBox3', 'position': (405, 165), 'size': (380, 160), 'actionBindings': {}, 'label': 'Resource files:'}, {'type': 'List', 'name': 'resList', 'position': (415, 180), 'size': (360, 100), 'actionBindings': {}, 'items': []}, {'type': 'Button', 'name': 'resAddBtn', 'position': (415, 285), 'actionBindings': {}, 'command': 'addResource', 'label': 'Add..'}, {'type': 'Button', 'name': 'resDelBtn', 'position': (500, 285), 'actionBindings': {}, 'label': 'Remove'}, {'type': 'Button', 'name': 'resEditBtn', 'position': (585, 285), 'actionBindings': {}, 'label': 'Edit...'}, {'type': 'Button', 'name': 'resDelAllBtn', 'position': (695, 285), 'actionBindings': {}, 'label': 'Clear all'}, {'type': 'StaticBox', 'name': 'StaticBox4', 'position': (5, 325), 'size': (380, 160), 'actionBindings': {}, 'label': 'Pixmap files:'}, {'type': 'List', 'name': 'pixmapList', 'position': (15, 340), 'size': (360, 100), 'actionBindings': {}, 'items': []}, {'type': 'Button', 'name': 'pixmapAddBtn', 'position': (15, 445), 'actionBindings': {}, 'command': 'addPixmap', 'label': 'Add...'}, {'type': 'Button', 'name': 'pixmapDelBtn', 'position': (100, 445), 'actionBindings': {}, 'label': 'Remove'}, {'type': 'Button', 'name': 'pixmapEditBtn', 'position': (185, 445), 'actionBindings': {}, 'label': 'Edit...'}, {'type': 'Button', 'name': 'pixmapDelAllBtn', 'position': (295, 445), 'actionBindings': {}, 'label': 'Clear all'}, {'type': 'StaticBox', 'name': 'StaticBox5', 'position': (405, 325), 'size': (380, 160), 'actionBindings': {}, 'label': 'Other files:'}, {'type': 'List', 'name': 'otherList', 'position': (415, 340), 'size': (360, 100), 'actionBindings': {}, 'items': []}, {'type': 'Button', 'name': 'docAddBtn', 'position': (415, 445), 'actionBindings': {}, 'command': 'addOther', 'label': 'Add...'}, {'type': 'Button', 'name': 'docDelBtn', 'position': (500, 445), 'actionBindings': {}, 'label': 'Remove'}, {'type': 'Button', 'name': 'docEditBtn', 'position': (585, 445), 'actionBindings': {}, 'label': 'Edit...'}, {'type': 'Button', 'name': 'docDelAllBtn', 'position': (695, 445), 'actionBindings': {}, 'label': 'Clear all'}, {'type': 'Button', 'name': 'propertiesBtn', 'position': (15, 490), 'size': (85, -1), 'actionBindings': {}, 'command': 'editProps', 'label': 'Properties...', 'toolTip': 'Change your projects properties'}, {'type': 'Button', 'name': 'changelogBtn', 'position': (100, 490), 'size': (85, -1), 'actionBindings': {}, 'command': 'editChgLog', 'label': 'Changelog...', 'toolTip': 'Edit the changelog file'}, {'type': 'Button', 'name': 'readmeBtn', 'position': (100, 525), 'actionBindings': {}, 'command': 'editReadme', 'label': 'README...', 'toolTip': 'Edit the README file'}, {'type': 'Button', 'name': 'specBtn', 'position': (185, 490), 'actionBindings': {}, 'command': 'editSpecFile', 'label': 'Spec file...', 'toolTip': 'Edit the applications spec file'}, {'type': 'Button', 'name': 'innoBtn', 'position': (185, 525), 'size': (85, -1), 'actionBindings': {}, 'command': 'editInnoFile', 'label': 'Inno script...', 'toolTip': 'Edit the Inno setup script for your application'}, {'type': 'Button', 'name': 'runBtn', 'position': (295, 490), 'actionBindings': {}, 'command': 'runMainScript', 'label': 'Run...', 'toolTip': 'Run the application'}, {'type': 'Button', 'name': 'rebuildBtn', 'position': (695, 490), 'actionBindings': {}, 'command': 'rebuildCmd', 'label': 'Rebuild', 'toolTip': 'Rebuild the standalone version of your application', 'userdata': 'frozen'}, {'type': 'Button', 'name': 'releaseBtn', 'position': (695, 525), 'actionBindings': {}, 'command': 'releaseCmd', 'label': 'Release', 'toolTip': 'Make a release of your finished application', 'userdata': 'frozen'}, {'type': 'StaticBox', 'name': 'StaticBox1', 'position': (5, 45), 'size': (780, 115), 'actionBindings': {}, 'label': 'Project:'}, {'type': 'StaticText', 'name': 'StaticText5', 'position': (15, 125), 'actionBindings': {}, 'text': 'Main script'}, {'type': 'StaticText', 'name': 'StaticText4', 'position': (420, 95), 'actionBindings': {}, 'text': 'Description'}, {'type': 'StaticText', 'name': 'StaticText9', 'position': (430, 65), 'actionBindings': {}, 'text': 'Icon (Win)'}, {'type': 'StaticText', 'name': 'StaticText8', 'position': (500, 125), 'actionBindings': {}, 'text': 'Version'}, {'type': 'StaticText', 'name': 'StaticText7', 'position': (15, 95), 'actionBindings': {}, 'text': 'Directory'}, {'type': 'StaticText', 'name': 'StaticText6', 'position': (15, 65), 'actionBindings': {}, 'text': 'Name'}]}]}} |
class Error(Exception):
def __init__(self, typ, start_pos, end_pos, details) -> None:
self.typ = typ
self.details = details
self.start_pos = start_pos
self.end_pos = end_pos
def __repr__(self) -> str:
return f"{self.typ} : {self.details} ({self.start_pos.idx}, {self.end_pos.idx})"
class InvalidIdentifier(Error):
def __init__(self, start_pos, end_pos, details) -> None:
super().__init__("Invalid Identifier", start_pos, end_pos, details)
| class Error(Exception):
def __init__(self, typ, start_pos, end_pos, details) -> None:
self.typ = typ
self.details = details
self.start_pos = start_pos
self.end_pos = end_pos
def __repr__(self) -> str:
return f'{self.typ} : {self.details} ({self.start_pos.idx}, {self.end_pos.idx})'
class Invalididentifier(Error):
def __init__(self, start_pos, end_pos, details) -> None:
super().__init__('Invalid Identifier', start_pos, end_pos, details) |
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
def insert(head, x):
new_node = ListNode(x)
if head is None:
head = new_node
return
last_node = head
while last_node.next:
last_node = last_node.next
last_node.next = new_node
def printList(head):
curr_node = head
while curr_node:
print(f'{curr_node.val}', "->", end=" ")
curr_node = curr_node.next
print()
def deleteNode(head, position):
prev_node = None
curr_node = head
i = 1
while curr_node and i != position:
prev_node = curr_node
curr_node = curr_node.next
i += 1
if curr_node is None:
return
prev_node.next = curr_node.next
def removeNthFromEnd(head, n):
dummy_head = ListNode(0)
dummy_head.next = head
fast = slow = dummy_head
for i in range(n):
fast = fast.next
while fast and fast.next:
fast = fast.next
slow = slow.next
slow.next = slow.next.next
return dummy_head.next
node = ListNode(8)
insert(node, 1)
insert(node, 7)
insert(node, 3)
insert(node, 9)
printList(node)
removeNthFromEnd(node, 2)
printList(node)
| class Listnode:
def __init__(self, x):
self.val = x
self.next = None
def insert(head, x):
new_node = list_node(x)
if head is None:
head = new_node
return
last_node = head
while last_node.next:
last_node = last_node.next
last_node.next = new_node
def print_list(head):
curr_node = head
while curr_node:
print(f'{curr_node.val}', '->', end=' ')
curr_node = curr_node.next
print()
def delete_node(head, position):
prev_node = None
curr_node = head
i = 1
while curr_node and i != position:
prev_node = curr_node
curr_node = curr_node.next
i += 1
if curr_node is None:
return
prev_node.next = curr_node.next
def remove_nth_from_end(head, n):
dummy_head = list_node(0)
dummy_head.next = head
fast = slow = dummy_head
for i in range(n):
fast = fast.next
while fast and fast.next:
fast = fast.next
slow = slow.next
slow.next = slow.next.next
return dummy_head.next
node = list_node(8)
insert(node, 1)
insert(node, 7)
insert(node, 3)
insert(node, 9)
print_list(node)
remove_nth_from_end(node, 2)
print_list(node) |
class Client():
def __init__(self, player):
#self.clientSocket
pass
def connect(self):
pass
def sending(self):
pass
def getting(self):
pass
def serverHandling(self):
pass | class Client:
def __init__(self, player):
pass
def connect(self):
pass
def sending(self):
pass
def getting(self):
pass
def server_handling(self):
pass |
# -*- coding: utf-8 -*-
# Scrapy settings for state_scrapper project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://docs.scrapy.org/en/latest/topics/settings.html
# https://docs.scrapy.org/en/latest/topics/downloader-middleware.html
# https://docs.scrapy.org/en/latest/topics/spider-middleware.html
BOT_NAME = 'state_scrapper'
SPIDER_MODULES = ['state_scrapper.spiders']
NEWSPIDER_MODULE = 'state_scrapper.spiders'
# Crawl responsibly by identifying yourself (and your website) on the user-agent
USER_AGENT = 'state_scrapper (+http://www.mobicrol.com)'
# Obey robots.txt rules
ROBOTSTXT_OBEY = True
# Configure maximum concurrent requests performed by Scrapy (default: 16)
#CONCURRENT_REQUESTS = 32
# Configure a delay for requests for the same website (default: 0)
# See https://docs.scrapy.org/en/latest/topics/settings.html#download-delay
# See also autothrottle settings and docs
DOWNLOAD_DELAY = 3.0
# The download delay setting will honor only one of:
CONCURRENT_REQUESTS_PER_DOMAIN = 16
#CONCURRENT_REQUESTS_PER_IP = 16
# Disable cookies (enabled by default)
#COOKIES_ENABLED = False
# Disable Telnet Console (enabled by default)
#TELNETCONSOLE_ENABLED = False
# Override the default request headers:
#DEFAULT_REQUEST_HEADERS = {
# 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
# 'Accept-Language': 'en',
#}
# Enable or disable spider middlewares
# See https://docs.scrapy.org/en/latest/topics/spider-middleware.html
#SPIDER_MIDDLEWARES = {
# 'state_scrapper.middlewares.StateScrapperSpiderMiddleware': 543,
#}
# Enable or disable downloader middlewares
# See https://docs.scrapy.org/en/latest/topics/downloader-middleware.html
#DOWNLOADER_MIDDLEWARES = {
# 'state_scrapper.middlewares.StateScrapperDownloaderMiddleware': 543,
#}
# Enable or disable extensions
# See https://docs.scrapy.org/en/latest/topics/extensions.html
#EXTENSIONS = {
# 'scrapy.extensions.telnet.TelnetConsole': None,
#}
# Configure item pipelines
# See https://docs.scrapy.org/en/latest/topics/item-pipeline.html
ITEM_PIPELINES = {
#'state_scrapper.pipelines.StateScrapperPipeline': 100,
'state_scrapper.pipelines.DuplicatesPipeline': 200,
'state_scrapper.pipelines.DatabasePipeline': 300
}
# Enable and configure the AutoThrottle extension (disabled by default)
# See https://docs.scrapy.org/en/latest/topics/autothrottle.html
#AUTOTHROTTLE_ENABLED = True
# The initial download delay
AUTOTHROTTLE_START_DELAY = 3
# The maximum download delay to be set in case of high latencies
#AUTOTHROTTLE_MAX_DELAY = 60
# The average number of requests Scrapy should be sending in parallel to
# each remote server
#AUTOTHROTTLE_TARGET_CONCURRENCY = 1.0
# Enable showing throttling stats for every response received:
#AUTOTHROTTLE_DEBUG = False
# Enable and configure HTTP caching (disabled by default)
# See https://docs.scrapy.org/en/latest/topics/downloader-middleware.html#httpcache-middleware-settings
HTTPCACHE_ENABLED = False
#HTTPCACHE_EXPIRATION_SECS = 0
#HTTPCACHE_DIR = 'httpcache'
#HTTPCACHE_IGNORE_HTTP_CODES = []
#HTTPCACHE_STORAGE = 'scrapy.extensions.httpcache.FilesystemCacheStorage'
DB_SETTINGS = {
'database': 'mobicrol_DB',
'user': 'mobicrol_admin',
'password': "X->e^QW%K{|v12~#",
'host': 'mobicrol.heliohost.org',
}
APIMAPS_SETTINGS ={
'endpoint': 'https://reverse.geocoder.ls.hereapi.com/6.2/reversegeocode.json',
#?apiKey=w0AqGhEuRk7POniPcharjnQ7uKIWgvFhJZbbaAe2hOw&mode=retrieveAddresses&prox=4.724455,-74.03006
'apiKey': 'w0AqGhEuRk7POniPcharjnQ7uKIWgvFhJZbbaAe2hOw'
}
| bot_name = 'state_scrapper'
spider_modules = ['state_scrapper.spiders']
newspider_module = 'state_scrapper.spiders'
user_agent = 'state_scrapper (+http://www.mobicrol.com)'
robotstxt_obey = True
download_delay = 3.0
concurrent_requests_per_domain = 16
item_pipelines = {'state_scrapper.pipelines.DuplicatesPipeline': 200, 'state_scrapper.pipelines.DatabasePipeline': 300}
autothrottle_start_delay = 3
httpcache_enabled = False
db_settings = {'database': 'mobicrol_DB', 'user': 'mobicrol_admin', 'password': 'X->e^QW%K{|v12~#', 'host': 'mobicrol.heliohost.org'}
apimaps_settings = {'endpoint': 'https://reverse.geocoder.ls.hereapi.com/6.2/reversegeocode.json', 'apiKey': 'w0AqGhEuRk7POniPcharjnQ7uKIWgvFhJZbbaAe2hOw'} |
n = int(input())
a = sorted(list(map(int, input().split(" "))))
while len(a) > 0:
print(len(a))
a = sorted(list(filter(lambda x: x > 0, map(lambda x: x - a[0], a))))
| n = int(input())
a = sorted(list(map(int, input().split(' '))))
while len(a) > 0:
print(len(a))
a = sorted(list(filter(lambda x: x > 0, map(lambda x: x - a[0], a)))) |
config = dict(
agent=dict(),
algo=dict(),
env=dict(
game="pong",
num_img_obs=1,
),
model=dict(),
optim=dict(),
runner=dict(
n_steps=5e6,
# log_interval_steps=1e5,
),
sampler=dict(
batch_T=20,
batch_B=32,
max_decorrelation_steps=1000,
),
)
configs = dict(
default=config
)
| config = dict(agent=dict(), algo=dict(), env=dict(game='pong', num_img_obs=1), model=dict(), optim=dict(), runner=dict(n_steps=5000000.0), sampler=dict(batch_T=20, batch_B=32, max_decorrelation_steps=1000))
configs = dict(default=config) |
class Solution:
def findGoodStrings(self, n, s1, s2, evil):
M = 10 ** 9 + 7
m = len(evil)
memo = {}
# KMP
dfa = self.failure(evil)
def dfs(i, x, bound):
if x == m:
return 0
if i == n:
return 1
if (i, x, bound) not in memo:
cnt = 0
lo = ord('a' if bound & 1 else s1[i]) # "be*" -> {"be*", "ca*", ..}, 'b' when bound bit = ?0
hi = ord('z' if bound & 2 else s2[i]) # "do*" -> {"cz*", "do*", ..}, 'd' when bound bit = 0?
for j, c in enumerate(chr(o) for o in range(lo, hi + 1)):
y = x
while y and evil[y] != c:
y = dfa[y - 1]
y += evil[y] == c
cnt = (cnt + dfs(i + 1, y, bound | (j > 0) | (j < hi - lo) << 1)) % M
memo[i, x, bound] = cnt
return memo[i, x, bound]
return dfs(0, 0, 0)
def failure(self, evil):
res = [0] * len(evil)
i, j = 1, 0
while i < len(evil):
if evil[i] == evil[j]:
res[i] = j + 1
j += 1
i += 1
elif j != 0:
j = res[j - 1]
else:
res[i] = 0
i += 1
return res
| class Solution:
def find_good_strings(self, n, s1, s2, evil):
m = 10 ** 9 + 7
m = len(evil)
memo = {}
dfa = self.failure(evil)
def dfs(i, x, bound):
if x == m:
return 0
if i == n:
return 1
if (i, x, bound) not in memo:
cnt = 0
lo = ord('a' if bound & 1 else s1[i])
hi = ord('z' if bound & 2 else s2[i])
for (j, c) in enumerate((chr(o) for o in range(lo, hi + 1))):
y = x
while y and evil[y] != c:
y = dfa[y - 1]
y += evil[y] == c
cnt = (cnt + dfs(i + 1, y, bound | (j > 0) | (j < hi - lo) << 1)) % M
memo[i, x, bound] = cnt
return memo[i, x, bound]
return dfs(0, 0, 0)
def failure(self, evil):
res = [0] * len(evil)
(i, j) = (1, 0)
while i < len(evil):
if evil[i] == evil[j]:
res[i] = j + 1
j += 1
i += 1
elif j != 0:
j = res[j - 1]
else:
res[i] = 0
i += 1
return res |
#!/usr/bin/env python
xlist = [1, 3, 5, 7, 1]
ylist = [1, 1, 1, 1, 2]
totaltrees = 1
with open('input.txt', 'r', encoding='utf-8') as input:
all_lines = input.readlines()
for i in range(5):
x = xlist[i]
y = ylist[i]
trees = 0
posx = 0
posy = 0
iterations = 1
for line in all_lines:
if y == 2 and posy % 2 == 1:
posy = posy + 1
else:
curline = ''
line = line.rstrip()
for iter in range(iterations):
curline = curline + line
linelist = list(curline)
if linelist[posx] == '#':
linelist[posx] = 'X'
trees = trees + 1
else:
linelist[posx] = 'O'
posx = posx + x
if posx >= len(curline):
iterations = iterations + 1
posy = posy + 1
totaltrees = totaltrees * trees
print('Iteration ' + str(i+1) + ' trees: ' + str(trees))
if i < 4:
print('Total trees so far: ' + str(totaltrees))
print('Total trees: ' + str(totaltrees))
| xlist = [1, 3, 5, 7, 1]
ylist = [1, 1, 1, 1, 2]
totaltrees = 1
with open('input.txt', 'r', encoding='utf-8') as input:
all_lines = input.readlines()
for i in range(5):
x = xlist[i]
y = ylist[i]
trees = 0
posx = 0
posy = 0
iterations = 1
for line in all_lines:
if y == 2 and posy % 2 == 1:
posy = posy + 1
else:
curline = ''
line = line.rstrip()
for iter in range(iterations):
curline = curline + line
linelist = list(curline)
if linelist[posx] == '#':
linelist[posx] = 'X'
trees = trees + 1
else:
linelist[posx] = 'O'
posx = posx + x
if posx >= len(curline):
iterations = iterations + 1
posy = posy + 1
totaltrees = totaltrees * trees
print('Iteration ' + str(i + 1) + ' trees: ' + str(trees))
if i < 4:
print('Total trees so far: ' + str(totaltrees))
print('Total trees: ' + str(totaltrees)) |
class PriorityQueue:
def __init__(self, arr: list = [], is_min=True):
self.arr = arr
self.minmax = min if is_min else max
self.heapify()
@staticmethod
def children(i):
return (2 * i + 1, 2 * i + 2)
@staticmethod
def parent(i):
return (i - 1) // 2
@staticmethod
def is_root(i):
return i == 0
def is_empty(self):
return self.size() == 0
def size(self):
return len(self.arr)
def compare(self, i, j):
if self.minmax(self.arr[i], self.arr[j]) == self.arr[j]:
return True
return False
def swap(self, i, j):
self.arr[i], self.arr[j] = self.arr[j], self.arr[i]
def heapify(self):
for i in range(self.size() // 2 - 1, -1, -1):
self.move_down(i)
def move_down(self, i=0):
while 2 * i + 1 < self.size():
l, r = PriorityQueue.children(i)
j = i
if self.compare(j, l):
j = l
if r < self.size() and self.compare(j, r):
j = r
if i == j:
break
self.swap(i, j)
i = j
def move_up(self, i):
while not PriorityQueue.is_root(i):
p = PriorityQueue.parent(i)
if not self.compare(p, i):
break
self.swap(p, i)
i = p
def push(self, num):
self.arr.append(num)
self.move_up(self.size() - 1)
def pop(self):
if self.is_empty():
return None
root = self.arr[0]
new_root = self.arr[-1]
self.arr[0] = new_root
self.arr.pop()
if not self.is_empty():
self.move_down()
return root
if __name__ == "__main__":
q = PriorityQueue([], False)
for i in range(10):
i = int(input())
q.push(i)
print("=============")
while not q.is_empty():
print(q.pop(), end=" ")
| class Priorityqueue:
def __init__(self, arr: list=[], is_min=True):
self.arr = arr
self.minmax = min if is_min else max
self.heapify()
@staticmethod
def children(i):
return (2 * i + 1, 2 * i + 2)
@staticmethod
def parent(i):
return (i - 1) // 2
@staticmethod
def is_root(i):
return i == 0
def is_empty(self):
return self.size() == 0
def size(self):
return len(self.arr)
def compare(self, i, j):
if self.minmax(self.arr[i], self.arr[j]) == self.arr[j]:
return True
return False
def swap(self, i, j):
(self.arr[i], self.arr[j]) = (self.arr[j], self.arr[i])
def heapify(self):
for i in range(self.size() // 2 - 1, -1, -1):
self.move_down(i)
def move_down(self, i=0):
while 2 * i + 1 < self.size():
(l, r) = PriorityQueue.children(i)
j = i
if self.compare(j, l):
j = l
if r < self.size() and self.compare(j, r):
j = r
if i == j:
break
self.swap(i, j)
i = j
def move_up(self, i):
while not PriorityQueue.is_root(i):
p = PriorityQueue.parent(i)
if not self.compare(p, i):
break
self.swap(p, i)
i = p
def push(self, num):
self.arr.append(num)
self.move_up(self.size() - 1)
def pop(self):
if self.is_empty():
return None
root = self.arr[0]
new_root = self.arr[-1]
self.arr[0] = new_root
self.arr.pop()
if not self.is_empty():
self.move_down()
return root
if __name__ == '__main__':
q = priority_queue([], False)
for i in range(10):
i = int(input())
q.push(i)
print('=============')
while not q.is_empty():
print(q.pop(), end=' ') |
# Written by Pavel Jahoda
#This class is used for evaluating and processing the results of the simulations
class Evaluation: #TODO, implement evaluation class
def __init__(self):
pass
def processResults(self,n_of_blocked_calls, n_of_dropped_calls, n_of_calls, n_of_channels_reverved):
pass
def evaluate(self):
pass
#generator class with distribution and parameters based on analyzed input data
class Generator(): #TODO create
def __init__(self):
self.dummy_return_value = 0
def generate_speed(self):
return self.dummy_return_value
def generate_station(self):
return self.dummy_return_value
def generate_position(self):
return self.dummy_return_value
def generate_duration(self):
return self.dummy_return_value
def generate_direction(self):
return self.dummy_return_value
def generate_next_initiation(self):
return Object()
def generate_next_handover(self,obj):
return Object()
def generate_next_termination(self,obj):
return Object()
# The driving and calling object
class Object():
def __init__(self, duration, speed, station, position, direction):
self.duration = duration
self.speed = speed
self.station = station
self.position = position
self.direction = direction
class Simualation():
def __init__(self):
# system clock, which will be updated outside of events
self.clock = 0
self.n_of_dropped_calls = 0
self.n_of_blocked_calls = 0
# desired number of calls in the simulation
self.n_of_calls = 100
self.n_of_channels_reverved = 0
# we will update this number until we reach our
# desired number of initiation calls
self.n_of_calls_created = 0
self.generator = Generator()
# we will have a list-like data structure that will
# keep events sorted by the simulated time
# [time of next event in seconds, type of event,
# Object(speed, call duration etc)]
# type of event -> 0: i
self.eventList = []
# how many free channels each station currently has
self.free_channels_by_station = [10 for i in range(20)]
# parameter - number of channels reserved for handovers
# when other channels are not available
def Simulate(self, n_of_channels_reverved):
self.n_of_channels_reverved = n_of_channels_reverved
# generate first initiation
self.eventList.append(self.generator.generate_next_initiation())
self.n_of_calls_created += 1
while len(self.eventList) != 0:
# update the system clock time to the time of next event
self.clock = self.eventList[0][0]
# depending on the type of the object in the event list,
# call function initiation, termination or handover
if self.eventList[0][1] == 0: # if the event is new call, generate another call
self.Initiation(self.eventList[0][2])
elif self.eventList[0][1] == 1: # handover
self.Handover(self.eventList[0][2])
else: # termination
self.Termination(self.eventList[0][2])
# after we make the call we update the event list and remove the first item
self.eventList = self.eventList[1:]
self.eventList.sort()
return self.n_of_blocked_calls, self.n_of_dropped_calls, self.n_of_calls, self.n_of_channels_reverved
def CalculateHowLongTillNextEvent(self, obj):
kmTillNextEvent = obj.position % 2 # position modulo 2
kmTillNextEvent = kmTillNextEvent + 2 if kmTillNextEvent == 0 else kmTillNextEvent
if obj.direction == 'RIGHT' and kmTillNextEvent != 2:
kmTillNextEvent = 2 - kmTillNextEvent
return kmTillNextEvent/obj.speed * 3600 # in seconds
def Initiation(self, obj):
blocked = False
if self.free_channels_by_station[obj.station] - self.n_of_channels_reverved > 0:
self.free_channels_by_station[obj.station] -= 1
else:
self.n_of_blocked_calls += 1
blocked = True
if not blocked:
# Car leaving the highway, no other handover can occur
if (obj.station == 0 and obj.direction == 'LEFT') or \
(obj.station == 19 and obj.direction == 'RIGHT'):
self.eventList.append(self.generator.generate_next_termination(obj))
else: # handover
self.eventList.append(self.generator.generate_next_handover(obj))
if self.n_of_calls_created != self.n_of_calls:
# generate next initiation
self.eventList.append(self.generator.generate_next_initiation())
self.n_of_calls_created += 1
def Termination(self, obj):
self.free_channels_by_station[obj.station] += 1
def Handover(self, obj):
# in the parameter station we use the new station that driver drives towards
# first let's free the channel used of the previous station
if obj.direction:
self.free_channels_by_station[obj.station - 1] += 1
else:
self.free_channels_by_station[obj.station + 1] += 1
if self.free_channels_by_station[obj.station] > 0:
self.free_channels_by_station[obj.station] -= 1
# Car leaving the highway, no other handover can occur
if (obj.station == 0 and obj.direction == 'LEFT') or \
(obj.station == 19 and obj.direction == 'RIGHT'):
self.eventList.append(self.generator.generate_next_termination(obj))
else: # handover
self.eventList.append(self.generator.generate_next_handover(obj))
else:
self.n_of_dropped_calls += 1
def main():
n_of_iteratins = 1 # adjust number of iterations of the simulation
evaluation = Evaluation()
print('start')
# We will run each simulation multiple times and evaluate the results at the end of the program run
for i in range(n_of_iteratins):
simulation = Simualation()
evaluation.evaluate(simulation.Simulate(0))
for i in range(n_of_iteratins):
simulation = Simualation()
evaluation.evaluate(simulation.Simulate(1))
evaluation.evaluate()
if __name__ == '__main__':
main()
| class Evaluation:
def __init__(self):
pass
def process_results(self, n_of_blocked_calls, n_of_dropped_calls, n_of_calls, n_of_channels_reverved):
pass
def evaluate(self):
pass
class Generator:
def __init__(self):
self.dummy_return_value = 0
def generate_speed(self):
return self.dummy_return_value
def generate_station(self):
return self.dummy_return_value
def generate_position(self):
return self.dummy_return_value
def generate_duration(self):
return self.dummy_return_value
def generate_direction(self):
return self.dummy_return_value
def generate_next_initiation(self):
return object()
def generate_next_handover(self, obj):
return object()
def generate_next_termination(self, obj):
return object()
class Object:
def __init__(self, duration, speed, station, position, direction):
self.duration = duration
self.speed = speed
self.station = station
self.position = position
self.direction = direction
class Simualation:
def __init__(self):
self.clock = 0
self.n_of_dropped_calls = 0
self.n_of_blocked_calls = 0
self.n_of_calls = 100
self.n_of_channels_reverved = 0
self.n_of_calls_created = 0
self.generator = generator()
self.eventList = []
self.free_channels_by_station = [10 for i in range(20)]
def simulate(self, n_of_channels_reverved):
self.n_of_channels_reverved = n_of_channels_reverved
self.eventList.append(self.generator.generate_next_initiation())
self.n_of_calls_created += 1
while len(self.eventList) != 0:
self.clock = self.eventList[0][0]
if self.eventList[0][1] == 0:
self.Initiation(self.eventList[0][2])
elif self.eventList[0][1] == 1:
self.Handover(self.eventList[0][2])
else:
self.Termination(self.eventList[0][2])
self.eventList = self.eventList[1:]
self.eventList.sort()
return (self.n_of_blocked_calls, self.n_of_dropped_calls, self.n_of_calls, self.n_of_channels_reverved)
def calculate_how_long_till_next_event(self, obj):
km_till_next_event = obj.position % 2
km_till_next_event = kmTillNextEvent + 2 if kmTillNextEvent == 0 else kmTillNextEvent
if obj.direction == 'RIGHT' and kmTillNextEvent != 2:
km_till_next_event = 2 - kmTillNextEvent
return kmTillNextEvent / obj.speed * 3600
def initiation(self, obj):
blocked = False
if self.free_channels_by_station[obj.station] - self.n_of_channels_reverved > 0:
self.free_channels_by_station[obj.station] -= 1
else:
self.n_of_blocked_calls += 1
blocked = True
if not blocked:
if obj.station == 0 and obj.direction == 'LEFT' or (obj.station == 19 and obj.direction == 'RIGHT'):
self.eventList.append(self.generator.generate_next_termination(obj))
else:
self.eventList.append(self.generator.generate_next_handover(obj))
if self.n_of_calls_created != self.n_of_calls:
self.eventList.append(self.generator.generate_next_initiation())
self.n_of_calls_created += 1
def termination(self, obj):
self.free_channels_by_station[obj.station] += 1
def handover(self, obj):
if obj.direction:
self.free_channels_by_station[obj.station - 1] += 1
else:
self.free_channels_by_station[obj.station + 1] += 1
if self.free_channels_by_station[obj.station] > 0:
self.free_channels_by_station[obj.station] -= 1
if obj.station == 0 and obj.direction == 'LEFT' or (obj.station == 19 and obj.direction == 'RIGHT'):
self.eventList.append(self.generator.generate_next_termination(obj))
else:
self.eventList.append(self.generator.generate_next_handover(obj))
else:
self.n_of_dropped_calls += 1
def main():
n_of_iteratins = 1
evaluation = evaluation()
print('start')
for i in range(n_of_iteratins):
simulation = simualation()
evaluation.evaluate(simulation.Simulate(0))
for i in range(n_of_iteratins):
simulation = simualation()
evaluation.evaluate(simulation.Simulate(1))
evaluation.evaluate()
if __name__ == '__main__':
main() |
def fetching_episode(episode_name, stream_page):
tag = "[ FETCHING ]"
print(tag, episode_name, stream_page)
def fetched_episode(episode_name, stream_url, success):
tag = "[ SUCCESS ] " if success else "[ FAILED ] "
print(tag, episode_name, stream_url, end="\n\n")
def fetching_list(anime_url):
print("Fetching episode list ;", anime_url, end="\n\n")
| def fetching_episode(episode_name, stream_page):
tag = '[ FETCHING ]'
print(tag, episode_name, stream_page)
def fetched_episode(episode_name, stream_url, success):
tag = '[ SUCCESS ] ' if success else '[ FAILED ] '
print(tag, episode_name, stream_url, end='\n\n')
def fetching_list(anime_url):
print('Fetching episode list ;', anime_url, end='\n\n') |
# definition
class OriginalException(Exception):
pass
| class Originalexception(Exception):
pass |
menu = ['deathnote', 'netflix', 'teaching']
# for i in range(len(menu)):
# print(i + 1,'. ',menu[i],sep='')
for index, item in enumerate(menu):
print(index + 1,'. ',item,sep='')
# for item in menu:
# print(item)
| menu = ['deathnote', 'netflix', 'teaching']
for (index, item) in enumerate(menu):
print(index + 1, '. ', item, sep='') |
class landShift():
def __init__(self):
self.shiftList = []
self.unwarpPts = []
def addPos(self, shift):
self.shiftList.append(shift)
if len(self.shiftList)>10:
self.shiftList = self.shiftList[1:]
def getVelocity(self):
if len(self.shiftList):
totalT = sum(self.shiftList)
aveShift = totalT / len(self.shiftList)
return aveShift
else:
return 0
def addUnwarpPts(self, pts):
self.unwarpPts = pts
def getUnwarpPts(self):
return self.unwarpPts | class Landshift:
def __init__(self):
self.shiftList = []
self.unwarpPts = []
def add_pos(self, shift):
self.shiftList.append(shift)
if len(self.shiftList) > 10:
self.shiftList = self.shiftList[1:]
def get_velocity(self):
if len(self.shiftList):
total_t = sum(self.shiftList)
ave_shift = totalT / len(self.shiftList)
return aveShift
else:
return 0
def add_unwarp_pts(self, pts):
self.unwarpPts = pts
def get_unwarp_pts(self):
return self.unwarpPts |
def swap_case(s):
returnString = ""
for character in s:
if character.islower():
returnString += character.upper()
else:
returnString += character.lower()
return returnString
| def swap_case(s):
return_string = ''
for character in s:
if character.islower():
return_string += character.upper()
else:
return_string += character.lower()
return returnString |
def no_teen_sum(a, b, c):
def fix_teen(n):
if n ==15 or n==16:
return n
if 13<=n<=19:
return 0
else:
return n
sum = fix_teen(a)+ fix_teen(b)+ fix_teen(c)
return sum
def round_sum(a, b, c):
def round10(num):
if num%10<5:
return num/10 * 10
else:
return (num/10+1)*10
sum = round10(a)+round10(b)+round10(c)
return sum
def close_far(a, b, c):
def is_close(x):
return abs(x-a)<=1
def is_far(x, y1, y2):
return abs(x-y1)>=2 and abs(x-y2)>=2
def haha(x,y):
return is_close(x) and is_far(y, x, a)
return haha(b,c) or haha(c,b)
| def no_teen_sum(a, b, c):
def fix_teen(n):
if n == 15 or n == 16:
return n
if 13 <= n <= 19:
return 0
else:
return n
sum = fix_teen(a) + fix_teen(b) + fix_teen(c)
return sum
def round_sum(a, b, c):
def round10(num):
if num % 10 < 5:
return num / 10 * 10
else:
return (num / 10 + 1) * 10
sum = round10(a) + round10(b) + round10(c)
return sum
def close_far(a, b, c):
def is_close(x):
return abs(x - a) <= 1
def is_far(x, y1, y2):
return abs(x - y1) >= 2 and abs(x - y2) >= 2
def haha(x, y):
return is_close(x) and is_far(y, x, a)
return haha(b, c) or haha(c, b) |
'''
This code is written by bidongqinxian
'''
def quick_sort(lst):
if not lst:
return []
base = lst[0]
left = quick_sort([x for x in lst[1: ] if x < base])
right = quick_sort([x for x in lst[1: ] if x >= base])
return left + [base] + right
| """
This code is written by bidongqinxian
"""
def quick_sort(lst):
if not lst:
return []
base = lst[0]
left = quick_sort([x for x in lst[1:] if x < base])
right = quick_sort([x for x in lst[1:] if x >= base])
return left + [base] + right |
K, N, F = map(int, input().split())
A = list(map(int, input().split()))
t = K * N - sum(A)
if t < 0:
print(-1)
else:
print(t)
| (k, n, f) = map(int, input().split())
a = list(map(int, input().split()))
t = K * N - sum(A)
if t < 0:
print(-1)
else:
print(t) |
_base_ = [
'../_base_/datasets/coco_detection.py',
'../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py'
]
# model settings
model = dict(
type='FCOS',
pretrained='open-mmlab://detectron/resnet50_caffe',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=False),
norm_eval=True,
style='caffe'),
neck=dict(
type='FPN',
in_channels=[256, 512, 1024, 2048],
out_channels=256,
start_level=1,
add_extra_convs=True,
extra_convs_on_inputs=False, # use P5
num_outs=5,
relu_before_extra_convs=True),
bbox_head=dict(
type='FCOSHead',
num_classes=7,
in_channels=256,
stacked_convs=4,
feat_channels=256,
strides=[8, 16, 32, 64, 128],
norm_cfg=None,
loss_cls=dict(
type='FocalLoss',
use_sigmoid=True,
gamma=2.0,
alpha=0.25,
loss_weight=1.0),
loss_bbox=dict(type='IoULoss', loss_weight=1.0),
loss_centerness=dict(
type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0)))
# training and testing settings
train_cfg = dict(
assigner=dict(
type='MaxIoUAssigner',
pos_iou_thr=0.5,
neg_iou_thr=0.4,
min_pos_iou=0,
ignore_iof_thr=-1),
allowed_border=-1,
pos_weight=-1,
debug=False)
test_cfg = dict(
nms_pre=1000,
min_bbox_size=0,
score_thr=0.05,
nms=dict(type='nms', iou_thr=0.5),
max_per_img=100)
img_norm_cfg = dict(
mean=[102.9801, 115.9465, 122.7717], std=[1.0, 1.0, 1.0], to_rgb=False)
train_pipeline = [
dict(type='LoadImageFromFile'),
dict(type='LoadAnnotations', with_bbox=True),
# dict(type='Resize', img_scale=(1333, 800), keep_ratio=True),
dict(type='RandomFlip', flip_ratio=0.5),
dict(type='Normalize', **img_norm_cfg),
dict(type='Pad', size_divisor=32),
dict(type='DefaultFormatBundle'),
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels']),
]
test_pipeline = [
dict(type='LoadImageFromFile'),
dict(
type='MultiScaleFlipAug',
img_scale=(1920, 1080),
flip=False,
transforms=[
dict(type='Resize', keep_ratio=True),
dict(type='RandomFlip'),
dict(type='Normalize', **img_norm_cfg),
dict(type='Pad', size_divisor=32),
dict(type='ImageToTensor', keys=['img']),
dict(type='Collect', keys=['img']),
])
]
dataset_type = 'IKCESTDetDataset'
data_root = '/root/vsislab-2/zq/data/IKCEST3rd_bbox_detection/'
data = dict(
samples_per_gpu=6,
workers_per_gpu=2,
train=dict(
type=dataset_type,
ann_file=data_root + 'annotations/ikcest_train_bbox_annotations.json',
img_prefix=data_root + 'train/',
pipeline=train_pipeline),
val=dict(
type=dataset_type,
ann_file=data_root + 'annotations/ikcest_val_bbox_annotations.json',
img_prefix=data_root + 'val/',
pipeline=test_pipeline),
test=dict(
type=dataset_type,
ann_file=data_root + 'annotations/ikcest_val_bbox_annotations.json',
img_prefix=data_root + 'val/',
pipeline=test_pipeline))
evaluation = dict(interval=1, metric='bbox')
# optimizer
optimizer = dict(type='SGD', lr=0.01, momentum=0.9, weight_decay=0.0001,
paramwise_cfg=dict(bias_lr_mult=2., bias_decay_mult=0.))
optimizer_config = dict(_delete_=True, grad_clip=dict(max_norm=100, norm_type=2))
# learning policy
lr_config = dict(warmup='constant')
total_epochs = 12
checkpoint_config = dict(interval=1)
# yapf:disable
log_config = dict(
interval=20,
hooks=[
dict(type='TextLoggerHook'),
# dict(type='TensorboardLoggerHook')
])
# yapf:enable
dist_params = dict(backend='nccl')
log_level = 'INFO'
load_from = None
resume_from = None
workflow = [('train', 1)]
| _base_ = ['../_base_/datasets/coco_detection.py', '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py']
model = dict(type='FCOS', pretrained='open-mmlab://detectron/resnet50_caffe', backbone=dict(type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, norm_cfg=dict(type='BN', requires_grad=False), norm_eval=True, style='caffe'), neck=dict(type='FPN', in_channels=[256, 512, 1024, 2048], out_channels=256, start_level=1, add_extra_convs=True, extra_convs_on_inputs=False, num_outs=5, relu_before_extra_convs=True), bbox_head=dict(type='FCOSHead', num_classes=7, in_channels=256, stacked_convs=4, feat_channels=256, strides=[8, 16, 32, 64, 128], norm_cfg=None, loss_cls=dict(type='FocalLoss', use_sigmoid=True, gamma=2.0, alpha=0.25, loss_weight=1.0), loss_bbox=dict(type='IoULoss', loss_weight=1.0), loss_centerness=dict(type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0)))
train_cfg = dict(assigner=dict(type='MaxIoUAssigner', pos_iou_thr=0.5, neg_iou_thr=0.4, min_pos_iou=0, ignore_iof_thr=-1), allowed_border=-1, pos_weight=-1, debug=False)
test_cfg = dict(nms_pre=1000, min_bbox_size=0, score_thr=0.05, nms=dict(type='nms', iou_thr=0.5), max_per_img=100)
img_norm_cfg = dict(mean=[102.9801, 115.9465, 122.7717], std=[1.0, 1.0, 1.0], to_rgb=False)
train_pipeline = [dict(type='LoadImageFromFile'), dict(type='LoadAnnotations', with_bbox=True), dict(type='RandomFlip', flip_ratio=0.5), dict(type='Normalize', **img_norm_cfg), dict(type='Pad', size_divisor=32), dict(type='DefaultFormatBundle'), dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels'])]
test_pipeline = [dict(type='LoadImageFromFile'), dict(type='MultiScaleFlipAug', img_scale=(1920, 1080), flip=False, transforms=[dict(type='Resize', keep_ratio=True), dict(type='RandomFlip'), dict(type='Normalize', **img_norm_cfg), dict(type='Pad', size_divisor=32), dict(type='ImageToTensor', keys=['img']), dict(type='Collect', keys=['img'])])]
dataset_type = 'IKCESTDetDataset'
data_root = '/root/vsislab-2/zq/data/IKCEST3rd_bbox_detection/'
data = dict(samples_per_gpu=6, workers_per_gpu=2, train=dict(type=dataset_type, ann_file=data_root + 'annotations/ikcest_train_bbox_annotations.json', img_prefix=data_root + 'train/', pipeline=train_pipeline), val=dict(type=dataset_type, ann_file=data_root + 'annotations/ikcest_val_bbox_annotations.json', img_prefix=data_root + 'val/', pipeline=test_pipeline), test=dict(type=dataset_type, ann_file=data_root + 'annotations/ikcest_val_bbox_annotations.json', img_prefix=data_root + 'val/', pipeline=test_pipeline))
evaluation = dict(interval=1, metric='bbox')
optimizer = dict(type='SGD', lr=0.01, momentum=0.9, weight_decay=0.0001, paramwise_cfg=dict(bias_lr_mult=2.0, bias_decay_mult=0.0))
optimizer_config = dict(_delete_=True, grad_clip=dict(max_norm=100, norm_type=2))
lr_config = dict(warmup='constant')
total_epochs = 12
checkpoint_config = dict(interval=1)
log_config = dict(interval=20, hooks=[dict(type='TextLoggerHook')])
dist_params = dict(backend='nccl')
log_level = 'INFO'
load_from = None
resume_from = None
workflow = [('train', 1)] |
#!/usr/bin/python
print("How you doing man???")
| print('How you doing man???') |
# ========================
# Information
# ========================
# Direct Link: https://www.hackerrank.com/challenges/write-a-function/problem
# Difficulty: Medium
# Max Score: 10
# Language: Python
# ========================
# Solution
# ========================
def is_leap(YEAR):
'''Checking whether year is a leap year'''
return YEAR % 4 == 0 and (YEAR % 400 == 0 or YEAR % 100 != 0)
YEAR = int(input())
print(is_leap(YEAR))
| def is_leap(YEAR):
"""Checking whether year is a leap year"""
return YEAR % 4 == 0 and (YEAR % 400 == 0 or YEAR % 100 != 0)
year = int(input())
print(is_leap(YEAR)) |
# Name: config.py
# Description: defines configurations for the various components of audio extraction and processing
class AudioConfig:
# The format to store audio in
AUDIO_FORMAT = 'mp3'
# Prefix to save audio features to
FEATURE_DESTINATION = '/features/'
# Checkpoint frequency in number of tracks processed
CHECKPOINT_FREQUENCY = 10
# Minimum required clip length for prediction
MIN_CLIP_LENGTH = 29
class DisplayConfig:
# What cmap to use when saving visual features
# Refer to https://matplotlib.org/3.3.2/api/_as_gen/matplotlib.axes.Axes.imshow.html
CMAP = "Greys"
# Defines the size of the figures created by display
FIGSIZE_WIDTH = 10
FIGSIZE_HEIGHT = 10
class FeatureExtractorConfig:
# The Librosa features supported by the CLI
SUPPORTED_FEATURES = ['chroma_stft', 'rms', 'spec_cent', 'spec_bw', 'spec_rolloff', 'zcr', 'mfcc']
NUMBER_OF_MFCC_COLS = 20
# How to aggregate the features
FEATURE_AGGREGATION = ['mean', 'min', 'max', 'std']
N_FFT = 2048
HOP_LENGTH = 1024
| class Audioconfig:
audio_format = 'mp3'
feature_destination = '/features/'
checkpoint_frequency = 10
min_clip_length = 29
class Displayconfig:
cmap = 'Greys'
figsize_width = 10
figsize_height = 10
class Featureextractorconfig:
supported_features = ['chroma_stft', 'rms', 'spec_cent', 'spec_bw', 'spec_rolloff', 'zcr', 'mfcc']
number_of_mfcc_cols = 20
feature_aggregation = ['mean', 'min', 'max', 'std']
n_fft = 2048
hop_length = 1024 |
class Solution:
def merge(self, intervals: List[List[int]]) -> List[List[int]]:
intervals.sort(key=lambda x: x[0])
res = []
for i in range(0, len(intervals)):
if not res or res[-1][1] < intervals[i][0]:
res.append(intervals[i])
else:
res[-1][1] = max(intervals[i][1], res[-1][1])
return res | class Solution:
def merge(self, intervals: List[List[int]]) -> List[List[int]]:
intervals.sort(key=lambda x: x[0])
res = []
for i in range(0, len(intervals)):
if not res or res[-1][1] < intervals[i][0]:
res.append(intervals[i])
else:
res[-1][1] = max(intervals[i][1], res[-1][1])
return res |
# -*- coding: utf-8 -*-
# Source: https://leetcode.com/problems/search-in-rotated-sorted-array/
def search(nums, left, right, target):
if left > right:
return -1
mid = int((left + right) / 2)
if nums[mid] == target:
return mid
# left --- target --- mid --- right
if nums[mid] <= nums[right]:
if target < nums[mid] or target > nums[right]:
return search(nums, left, mid-1, target)
else:
return search(nums, mid+1, right, target)
# left --- mid --- target --- right
if nums[left] <= nums[mid]:
if target > nums[mid] or target < nums[left]:
return search(nums, mid+1, right, target)
else:
return search(nums, left, mid-1, target)
def search_rotated_array(nums, target):
if len(nums) == 0:
return -1
return search(nums, 0, len(nums)-1, target)
| def search(nums, left, right, target):
if left > right:
return -1
mid = int((left + right) / 2)
if nums[mid] == target:
return mid
if nums[mid] <= nums[right]:
if target < nums[mid] or target > nums[right]:
return search(nums, left, mid - 1, target)
else:
return search(nums, mid + 1, right, target)
if nums[left] <= nums[mid]:
if target > nums[mid] or target < nums[left]:
return search(nums, mid + 1, right, target)
else:
return search(nums, left, mid - 1, target)
def search_rotated_array(nums, target):
if len(nums) == 0:
return -1
return search(nums, 0, len(nums) - 1, target) |
'''Use an IF statement inside a FOR loop to select only positive numbers.'''
def printAllPositive(numberList):
'''Print only the positive numbers in numberList.'''
for num in numberList:
if num > 0:
print(num)
printAllPositive([3, -5, 2, -1, 0, 7])
| """Use an IF statement inside a FOR loop to select only positive numbers."""
def print_all_positive(numberList):
"""Print only the positive numbers in numberList."""
for num in numberList:
if num > 0:
print(num)
print_all_positive([3, -5, 2, -1, 0, 7]) |
# The tests rely on a lot of absolute paths so this file
# configures all of that
music_folder = u'/home/rudi/music'
o_path = u'/home/rudi/throwaway/ACDC_-_Back_In_Black-sample-64kbps.ogg'
watch_path = u'/home/rudi/throwaway/watch/',
real_path1 = u'/home/rudi/throwaway/watch/unknown/unknown/ACDC_-_Back_In_Black-sample-64kbps-64kbps.ogg'
opath = u"/home/rudi/Airtime/python_apps/media-monitor2/tests/"
ppath = u"/home/rudi/Airtime/python_apps/media-monitor2/media/"
api_client_path = '/etc/airtime/api_client.cfg'
# holdover from the time we had a special config for testing
sample_config = api_client_path
real_config = api_client_path
| music_folder = u'/home/rudi/music'
o_path = u'/home/rudi/throwaway/ACDC_-_Back_In_Black-sample-64kbps.ogg'
watch_path = (u'/home/rudi/throwaway/watch/',)
real_path1 = u'/home/rudi/throwaway/watch/unknown/unknown/ACDC_-_Back_In_Black-sample-64kbps-64kbps.ogg'
opath = u'/home/rudi/Airtime/python_apps/media-monitor2/tests/'
ppath = u'/home/rudi/Airtime/python_apps/media-monitor2/media/'
api_client_path = '/etc/airtime/api_client.cfg'
sample_config = api_client_path
real_config = api_client_path |
# python3
def max_ammount(W, weights):
values = [[0 for _ in weights + [0]] for _ in range(W + 1)]
for w in range(1, W + 1):
for i, wi in enumerate(weights):
values[w][i + 1] = max([
values[w][i],
values[w - wi][i] + wi if w - wi >= 0 else 0
])
return values[-1][-1]
if __name__ == '__main__':
capacity, _ = list(map(int, input().split()))
items = list(map(int, input().split()))
print(max_ammount(capacity, items))
| def max_ammount(W, weights):
values = [[0 for _ in weights + [0]] for _ in range(W + 1)]
for w in range(1, W + 1):
for (i, wi) in enumerate(weights):
values[w][i + 1] = max([values[w][i], values[w - wi][i] + wi if w - wi >= 0 else 0])
return values[-1][-1]
if __name__ == '__main__':
(capacity, _) = list(map(int, input().split()))
items = list(map(int, input().split()))
print(max_ammount(capacity, items)) |
abcd = (1 + 2 + 3 + 4 +
5 + 6)
aaaa = (8188107138941 <=
90)
bbbb = (123 ** 456 &
780)
cccc = (123 ** 456
& 780
| 89 /
8)
| abcd = 1 + 2 + 3 + 4 + 5 + 6
aaaa = 8188107138941 <= 90
bbbb = 123 ** 456 & 780
cccc = 123 ** 456 & 780 | 89 / 8 |
def temperature_format(value):
return round(int(value) * 0.1, 1)
class OkofenDefinition:
def __init__(self, name=None):
self.domain = name
self.__datas = {}
def set(self, target, value):
self.__datas[target] = value
def get(self, target):
if target in self.__datas:
return self.__datas[target]
return None
class OkofenDefinitionHelperMixin:
def get(self, target):
return super().get(target)
| def temperature_format(value):
return round(int(value) * 0.1, 1)
class Okofendefinition:
def __init__(self, name=None):
self.domain = name
self.__datas = {}
def set(self, target, value):
self.__datas[target] = value
def get(self, target):
if target in self.__datas:
return self.__datas[target]
return None
class Okofendefinitionhelpermixin:
def get(self, target):
return super().get(target) |
def findMin(a, n):
su = 0
su = sum(a)
dp = [[0 for i in range(su + 1)]
for j in range(n + 1)]
for i in range(n + 1):
dp[i][0] = True
for j in range(1, su + 1):
dp[0][j] = False
for i in range(1, n + 1):
for j in range(1, su + 1):
dp[i][j] = dp[i - 1][j]
if a[i - 1] <= j:
dp[i][j] |= dp[i - 1][j - a[i - 1]]
diff = 1005
for j in range(su // 2, -1, -1):
if dp[n][j] == True:
diff = su - (2 * j)
break
return diff
n = int(input())
a = list(map(int,input().split()))
m = findMin(a, n)
print(((sum(a)-m)//2)+m) | def find_min(a, n):
su = 0
su = sum(a)
dp = [[0 for i in range(su + 1)] for j in range(n + 1)]
for i in range(n + 1):
dp[i][0] = True
for j in range(1, su + 1):
dp[0][j] = False
for i in range(1, n + 1):
for j in range(1, su + 1):
dp[i][j] = dp[i - 1][j]
if a[i - 1] <= j:
dp[i][j] |= dp[i - 1][j - a[i - 1]]
diff = 1005
for j in range(su // 2, -1, -1):
if dp[n][j] == True:
diff = su - 2 * j
break
return diff
n = int(input())
a = list(map(int, input().split()))
m = find_min(a, n)
print((sum(a) - m) // 2 + m) |
class AboutDialog:
def __init__(self, builder):
self._win = builder.get_object('dialog_about', target=self, include_children=True)
def run(self):
result = self._win.run()
self._win.hide()
return result | class Aboutdialog:
def __init__(self, builder):
self._win = builder.get_object('dialog_about', target=self, include_children=True)
def run(self):
result = self._win.run()
self._win.hide()
return result |
def extractChichipephCom(item):
'''
Parser for 'chichipeph.com'
'''
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or "preview" in item['title'].lower():
return None
tagmap = [
('the former wife', 'The Former Wife of Invisible Wealthy Man', 'translated'),
('villain father', 'Guide the Villain Father to Be Virtuous', 'translated'),
('bhwatp', 'Become Husband and Wife According To Pleasure', 'translated'),
('jiaochen', 'Jiaochen', 'translated'),
('pmfbs', 'Transmigration: Petite Mother of Four Big Shots', 'translated'),
('can you afford', 'Can You Afford To Raise?', 'translated'),
('PRC', 'PRC', 'translated'),
('Loiterous', 'Loiterous', 'oel'),
]
for tagname, name, tl_type in tagmap:
if tagname in item['tags']:
return buildReleaseMessageWithType(item, name, vol, chp, frag=frag, postfix=postfix, tl_type=tl_type)
return False | def extract_chichipeph_com(item):
"""
Parser for 'chichipeph.com'
"""
(vol, chp, frag, postfix) = extract_vol_chapter_fragment_postfix(item['title'])
if not (chp or vol) or 'preview' in item['title'].lower():
return None
tagmap = [('the former wife', 'The Former Wife of Invisible Wealthy Man', 'translated'), ('villain father', 'Guide the Villain Father to Be Virtuous', 'translated'), ('bhwatp', 'Become Husband and Wife According To Pleasure', 'translated'), ('jiaochen', 'Jiaochen', 'translated'), ('pmfbs', 'Transmigration: Petite Mother of Four Big Shots', 'translated'), ('can you afford', 'Can You Afford To Raise?', 'translated'), ('PRC', 'PRC', 'translated'), ('Loiterous', 'Loiterous', 'oel')]
for (tagname, name, tl_type) in tagmap:
if tagname in item['tags']:
return build_release_message_with_type(item, name, vol, chp, frag=frag, postfix=postfix, tl_type=tl_type)
return False |
#
# PySNMP MIB module PDN-IFEXT-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/PDN-IFEXT-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:30:00 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint")
ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex")
pdnIfExt, = mibBuilder.importSymbols("PDN-HEADER-MIB", "pdnIfExt")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
IpAddress, Gauge32, iso, ObjectIdentity, Unsigned32, Counter32, TimeTicks, Counter64, NotificationType, Bits, ModuleIdentity, Integer32, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "IpAddress", "Gauge32", "iso", "ObjectIdentity", "Unsigned32", "Counter32", "TimeTicks", "Counter64", "NotificationType", "Bits", "ModuleIdentity", "Integer32", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn")
DisplayString, RowStatus, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "RowStatus", "TextualConvention")
pdnIfExtConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 1))
pdnIfExtTestConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 2))
pdnIfExtTable = MibTable((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 1, 1), )
if mibBuilder.loadTexts: pdnIfExtTable.setStatus('mandatory')
pdnIfExtEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 1, 1, 1), ).setIndexNames((0, "PDN-IFEXT-MIB", "pdnIfExtIndex"))
if mibBuilder.loadTexts: pdnIfExtEntry.setStatus('mandatory')
pdnIfExtIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 1, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdnIfExtIndex.setStatus('mandatory')
pdnIfExtInOctetRollovers = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 1, 1, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdnIfExtInOctetRollovers.setStatus('mandatory')
pdnIfExtOutOctetRollovers = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 1, 1, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdnIfExtOutOctetRollovers.setStatus('mandatory')
pdnIfExtTotalUASs = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 1, 1, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdnIfExtTotalUASs.setStatus('mandatory')
pdnIfExtTestConfigTable = MibTable((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 2, 1), )
if mibBuilder.loadTexts: pdnIfExtTestConfigTable.setStatus('mandatory')
pdnIfExtTestConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 2, 1, 1), ).setIndexNames((0, "PDN-IFEXT-MIB", "pdnIfExtTestConfigIfIndex"))
if mibBuilder.loadTexts: pdnIfExtTestConfigEntry.setStatus('mandatory')
pdnIfExtTestConfigIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 2, 1, 1, 1), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdnIfExtTestConfigIfIndex.setStatus('mandatory')
pdnIfExtTestConfigNearTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 2, 1, 1, 2), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: pdnIfExtTestConfigNearTimer.setStatus('mandatory')
pdnIfExtTestConfigFarTimer = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 2, 1, 1, 3), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: pdnIfExtTestConfigFarTimer.setStatus('mandatory')
pdnIfTable = MibTable((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 1, 2), )
if mibBuilder.loadTexts: pdnIfTable.setStatus('mandatory')
pdnIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 1, 2, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "PDN-IFEXT-MIB", "pdnIfAddr"))
if mibBuilder.loadTexts: pdnIfEntry.setStatus('mandatory')
pdnIfAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 1, 2, 1, 1), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: pdnIfAddr.setStatus('mandatory')
pdnIfAddrMask = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 1, 2, 1, 2), IpAddress()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: pdnIfAddrMask.setStatus('mandatory')
pdnIfStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 1, 2, 1, 3), RowStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: pdnIfStatus.setStatus('mandatory')
mibBuilder.exportSymbols("PDN-IFEXT-MIB", pdnIfExtConfig=pdnIfExtConfig, pdnIfExtTable=pdnIfExtTable, pdnIfExtTestConfigTable=pdnIfExtTestConfigTable, pdnIfExtTestConfigEntry=pdnIfExtTestConfigEntry, pdnIfAddr=pdnIfAddr, pdnIfStatus=pdnIfStatus, pdnIfExtOutOctetRollovers=pdnIfExtOutOctetRollovers, pdnIfEntry=pdnIfEntry, pdnIfExtInOctetRollovers=pdnIfExtInOctetRollovers, pdnIfExtTotalUASs=pdnIfExtTotalUASs, pdnIfTable=pdnIfTable, pdnIfExtTestConfigNearTimer=pdnIfExtTestConfigNearTimer, pdnIfAddrMask=pdnIfAddrMask, pdnIfExtTestConfig=pdnIfExtTestConfig, pdnIfExtTestConfigIfIndex=pdnIfExtTestConfigIfIndex, pdnIfExtIndex=pdnIfExtIndex, pdnIfExtTestConfigFarTimer=pdnIfExtTestConfigFarTimer, pdnIfExtEntry=pdnIfExtEntry)
| (octet_string, object_identifier, integer) = mibBuilder.importSymbols('ASN1', 'OctetString', 'ObjectIdentifier', 'Integer')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(single_value_constraint, constraints_intersection, value_size_constraint, constraints_union, value_range_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'SingleValueConstraint', 'ConstraintsIntersection', 'ValueSizeConstraint', 'ConstraintsUnion', 'ValueRangeConstraint')
(if_index,) = mibBuilder.importSymbols('IF-MIB', 'ifIndex')
(pdn_if_ext,) = mibBuilder.importSymbols('PDN-HEADER-MIB', 'pdnIfExt')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(ip_address, gauge32, iso, object_identity, unsigned32, counter32, time_ticks, counter64, notification_type, bits, module_identity, integer32, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column) = mibBuilder.importSymbols('SNMPv2-SMI', 'IpAddress', 'Gauge32', 'iso', 'ObjectIdentity', 'Unsigned32', 'Counter32', 'TimeTicks', 'Counter64', 'NotificationType', 'Bits', 'ModuleIdentity', 'Integer32', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn')
(display_string, row_status, textual_convention) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'RowStatus', 'TextualConvention')
pdn_if_ext_config = mib_identifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 1))
pdn_if_ext_test_config = mib_identifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 2))
pdn_if_ext_table = mib_table((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 1, 1))
if mibBuilder.loadTexts:
pdnIfExtTable.setStatus('mandatory')
pdn_if_ext_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 1, 1, 1)).setIndexNames((0, 'PDN-IFEXT-MIB', 'pdnIfExtIndex'))
if mibBuilder.loadTexts:
pdnIfExtEntry.setStatus('mandatory')
pdn_if_ext_index = mib_table_column((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 1, 1, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdnIfExtIndex.setStatus('mandatory')
pdn_if_ext_in_octet_rollovers = mib_table_column((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 1, 1, 1, 2), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdnIfExtInOctetRollovers.setStatus('mandatory')
pdn_if_ext_out_octet_rollovers = mib_table_column((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 1, 1, 1, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdnIfExtOutOctetRollovers.setStatus('mandatory')
pdn_if_ext_total_ua_ss = mib_table_column((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 1, 1, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdnIfExtTotalUASs.setStatus('mandatory')
pdn_if_ext_test_config_table = mib_table((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 2, 1))
if mibBuilder.loadTexts:
pdnIfExtTestConfigTable.setStatus('mandatory')
pdn_if_ext_test_config_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 2, 1, 1)).setIndexNames((0, 'PDN-IFEXT-MIB', 'pdnIfExtTestConfigIfIndex'))
if mibBuilder.loadTexts:
pdnIfExtTestConfigEntry.setStatus('mandatory')
pdn_if_ext_test_config_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 2, 1, 1, 1), integer32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdnIfExtTestConfigIfIndex.setStatus('mandatory')
pdn_if_ext_test_config_near_timer = mib_table_column((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 2, 1, 1, 2), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
pdnIfExtTestConfigNearTimer.setStatus('mandatory')
pdn_if_ext_test_config_far_timer = mib_table_column((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 2, 1, 1, 3), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
pdnIfExtTestConfigFarTimer.setStatus('mandatory')
pdn_if_table = mib_table((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 1, 2))
if mibBuilder.loadTexts:
pdnIfTable.setStatus('mandatory')
pdn_if_entry = mib_table_row((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 1, 2, 1)).setIndexNames((0, 'IF-MIB', 'ifIndex'), (0, 'PDN-IFEXT-MIB', 'pdnIfAddr'))
if mibBuilder.loadTexts:
pdnIfEntry.setStatus('mandatory')
pdn_if_addr = mib_table_column((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 1, 2, 1, 1), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
pdnIfAddr.setStatus('mandatory')
pdn_if_addr_mask = mib_table_column((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 1, 2, 1, 2), ip_address()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
pdnIfAddrMask.setStatus('mandatory')
pdn_if_status = mib_table_column((1, 3, 6, 1, 4, 1, 1795, 2, 24, 2, 6, 12, 1, 2, 1, 3), row_status()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
pdnIfStatus.setStatus('mandatory')
mibBuilder.exportSymbols('PDN-IFEXT-MIB', pdnIfExtConfig=pdnIfExtConfig, pdnIfExtTable=pdnIfExtTable, pdnIfExtTestConfigTable=pdnIfExtTestConfigTable, pdnIfExtTestConfigEntry=pdnIfExtTestConfigEntry, pdnIfAddr=pdnIfAddr, pdnIfStatus=pdnIfStatus, pdnIfExtOutOctetRollovers=pdnIfExtOutOctetRollovers, pdnIfEntry=pdnIfEntry, pdnIfExtInOctetRollovers=pdnIfExtInOctetRollovers, pdnIfExtTotalUASs=pdnIfExtTotalUASs, pdnIfTable=pdnIfTable, pdnIfExtTestConfigNearTimer=pdnIfExtTestConfigNearTimer, pdnIfAddrMask=pdnIfAddrMask, pdnIfExtTestConfig=pdnIfExtTestConfig, pdnIfExtTestConfigIfIndex=pdnIfExtTestConfigIfIndex, pdnIfExtIndex=pdnIfExtIndex, pdnIfExtTestConfigFarTimer=pdnIfExtTestConfigFarTimer, pdnIfExtEntry=pdnIfExtEntry) |
class BinarySearch:
def __init__(self):
pass
def search(self, array, item):
# return self.recursively_search(array, item, 0, len(array)-1)
return self.interactive_search(array, item, 0, len(array)-1)
def recursively_search(self, array, item, left, right):
if(left > right):
return -1
mid = int((left+right)/2)
if(item < array[mid]):
return self.recursively_search(array, item, left, mid - 1)
elif(item > array[mid]):
return self.recursively_search(array, item, mid + 1, right)
else:
return mid
def interactive_search(self, array, item, left, right):
while(left <= right):
mid = int((left+right)/2)
if(item > array[mid]):
left = mid + 1
elif(item < array[mid]):
right = mid - 1
else:
return mid
return -1
if __name__ == '__main__':
array = [ 3, 4, 5, 7, 12, 14, 18, 21, 35, 38, 44, 53, 67]
bs = BinarySearch()
print(bs.search(array, 44)) | class Binarysearch:
def __init__(self):
pass
def search(self, array, item):
return self.interactive_search(array, item, 0, len(array) - 1)
def recursively_search(self, array, item, left, right):
if left > right:
return -1
mid = int((left + right) / 2)
if item < array[mid]:
return self.recursively_search(array, item, left, mid - 1)
elif item > array[mid]:
return self.recursively_search(array, item, mid + 1, right)
else:
return mid
def interactive_search(self, array, item, left, right):
while left <= right:
mid = int((left + right) / 2)
if item > array[mid]:
left = mid + 1
elif item < array[mid]:
right = mid - 1
else:
return mid
return -1
if __name__ == '__main__':
array = [3, 4, 5, 7, 12, 14, 18, 21, 35, 38, 44, 53, 67]
bs = binary_search()
print(bs.search(array, 44)) |
class Solution:
def makeGood(self, s: str) -> str:
ans = []
for ch in s:
if ans and ans[-1].lower() == ch.lower() and ans[-1] != ch:
ans.pop()
else:
ans.append(ch)
return ''.join(ans)
| class Solution:
def make_good(self, s: str) -> str:
ans = []
for ch in s:
if ans and ans[-1].lower() == ch.lower() and (ans[-1] != ch):
ans.pop()
else:
ans.append(ch)
return ''.join(ans) |
#-----------------------------------------------------------------------------
# Runtime: 28ms
# Memory Usage:
# Link:
#-----------------------------------------------------------------------------
class Solution:
def spiralOrder(self, matrix: [[int]]) -> [int]:
row_length = len(matrix)
if row_length <= 0:
return matrix
col_length = len(matrix[0])
matrix_length = col_length * row_length
result = []
level = 0
while True:
first_col = level
first_row = level
last_col = col_length - level - 1
last_row = row_length - level - 1
for i in range(first_col, last_col + 1):
result.append(matrix[first_row][i])
if len(result) == matrix_length: break
for i in range(first_row + 1, last_row):
result.append(matrix[i][last_col])
if len(result) == matrix_length: break
for i in range(last_col, first_col - 1, -1):
result.append(matrix[last_row][i])
if len(result) == matrix_length: break
for i in range(last_row - 1, first_row, -1):
result.append(matrix[i][first_col])
if len(result) == matrix_length: break
level += 1
return result
| class Solution:
def spiral_order(self, matrix: [[int]]) -> [int]:
row_length = len(matrix)
if row_length <= 0:
return matrix
col_length = len(matrix[0])
matrix_length = col_length * row_length
result = []
level = 0
while True:
first_col = level
first_row = level
last_col = col_length - level - 1
last_row = row_length - level - 1
for i in range(first_col, last_col + 1):
result.append(matrix[first_row][i])
if len(result) == matrix_length:
break
for i in range(first_row + 1, last_row):
result.append(matrix[i][last_col])
if len(result) == matrix_length:
break
for i in range(last_col, first_col - 1, -1):
result.append(matrix[last_row][i])
if len(result) == matrix_length:
break
for i in range(last_row - 1, first_row, -1):
result.append(matrix[i][first_col])
if len(result) == matrix_length:
break
level += 1
return result |
def load(h):
return ({'abbr': 0, 'code': 0, 'title': 'Reserved'},
{'abbr': 'surf',
'code': 1,
'title': 'Surface',
'units': 'of the Earth, which includes sea surface'},
{'abbr': 'bcld', 'code': 2, 'title': 'Cloud base level'},
{'abbr': 'tcld', 'code': 3, 'title': 'Cloud top level'},
{'abbr': 'isot', 'code': 4, 'title': '0 deg (C) isotherm level'},
{'abbr': 5,
'code': 5,
'title': 'Adiabatic condensation level',
'units': 'parcel lifted from surface'},
{'abbr': 6, 'code': 6, 'title': 'Maximum wind speed level'},
{'abbr': 7, 'code': 7, 'title': 'Tropopause level'},
{'abbr': 'tatm', 'code': 8, 'title': 'Nominal top of atmosphere'},
{'abbr': 9, 'code': 9, 'title': 'Sea bottom'},
{'abbr': 'pl',
'code': 100,
'title': 'Isobaric level pressure in hectoPascals (hPa)',
'units': '2 octets'},
{'abbr': 101,
'code': 101,
'title': 'Layer between two isobaric levels pressure of top (kPa) pressure '
'of bottom',
'units': 'kPa'},
{'abbr': 'msl', 'code': 102, 'title': 'Mean sea level 0 0'},
{'abbr': 'hmsl',
'code': 103,
'title': 'Fixed height level height above mean sea level (MSL) in meters'},
{'abbr': 104,
'code': 104,
'title': 'Layer between two height levels above msl height of top (hm) above '
'mean sea level height of bottom (hm) above mean sea level'},
{'abbr': 'hl',
'code': 105,
'title': 'Fixed height above ground height in meters',
'units': '2 octets'},
{'abbr': 'lhl',
'code': 106,
'title': 'Layer between two height levels above ground height of top (hm) '
'above ground height of bottom (hm) above ground'},
{'abbr': 107,
'code': 107,
'title': 'Sigma level sigma value in 1/10000',
'units': '2 octets'},
{'abbr': 108,
'code': 108,
'title': 'Layer between two sigma levels sigma value at top in 1/100 sigma '
'value at bottom in 1/100'},
{'abbr': 'ml',
'code': 109,
'title': 'Hybrid level level number',
'units': '2 octets'},
{'abbr': 110,
'code': 110,
'title': 'Layer between two hybrid levels level number of top level number '
'of bottom'},
{'abbr': 111,
'code': 111,
'title': 'Depth below land surface centimeters',
'units': '2 octets'},
{'abbr': 'ldl',
'code': 112,
'title': 'Layer between two depths below land surface depth of upper surface '
'(cm) depth of lower surface',
'units': 'cm'},
{'abbr': 'pt',
'code': 113,
'title': 'Isentropic (theta) level Potential Temp. degrees K',
'units': '2 octets'},
{'abbr': 114,
'code': 114,
'title': 'Layer between two isentropic levels 475K minus theta of top in '
'Deg. K 475K minus theta of bottom in Deg. K'},
{'abbr': 115,
'code': 115,
'title': 'Level at specified pressure difference from ground to level hPa',
'units': '2 octets'},
{'abbr': 116,
'code': 116,
'title': 'Layer between two levels at specified pressure differences from '
'ground to levels pressure difference from ground to top level hPa '
'pressure difference from ground to bottom level hPa'},
{'abbr': 'pv',
'code': 117,
'title': 'Potential vorticity surface 10-9 K m2 kg-1 s-1'},
{'abbr': 121,
'code': 121,
'title': 'Layer between two isobaric surfaces (high precision) 1100 hPa '
'minus pressure of top, in hPa 1100 hPa minus pressure of bottom, '
'in hPa'},
{'abbr': 125,
'code': 125,
'title': 'Height level above ground (high precision) centimeters',
'units': '2 octets'},
{'abbr': 128,
'code': 128,
'title': 'Layer between two sigma levels (high precision) 1.1 minus sigma of '
'top, in 1/1000 of sigma 1.1 minus sigma of bottom, in 1/1000 of '
'sigma'},
{'abbr': 141,
'code': 141,
'title': 'Layer between two isobaric surfaces (mixed precision) pressure of '
'top, in kPa 1100hPa minus pressure of bottom, in hPa'},
{'abbr': 'dp',
'code': 160,
'title': 'Depth below sea level meters',
'units': '2 octets'},
{'abbr': 'nd',
'code': 191,
'title': 'Northern Direction',
'units': 'SMHI Extension'},
{'abbr': 'ned',
'code': 192,
'title': 'Northern-Eastern Direction',
'units': 'SMHI Extension'},
{'abbr': 'ed',
'code': 193,
'title': 'Eastern Direction',
'units': 'SMHI Extension'},
{'abbr': 'sed',
'code': 194,
'title': 'Southern-Eastern Direction',
'units': 'SMHI Extension'},
{'abbr': 'sd',
'code': 195,
'title': 'Southern Direction',
'units': 'SMHI Extension'},
{'abbr': 'swd',
'code': 196,
'title': 'Southern-Western Direction',
'units': 'SMHI Extension'},
{'abbr': 'wd',
'code': 197,
'title': 'Western Direction',
'units': 'SMHI Extension'},
{'abbr': 'nwd',
'code': 198,
'title': 'Northern-Western Direction',
'units': 'SMHI Extension'},
{'abbr': 'atm',
'code': 200,
'title': 'Entire atmosphere considered as a single layer 0',
'units': '2 octets'},
{'abbr': 201,
'code': 201,
'title': 'Entire ocean considered as a single layer 0',
'units': '2 octets'})
| def load(h):
return ({'abbr': 0, 'code': 0, 'title': 'Reserved'}, {'abbr': 'surf', 'code': 1, 'title': 'Surface', 'units': 'of the Earth, which includes sea surface'}, {'abbr': 'bcld', 'code': 2, 'title': 'Cloud base level'}, {'abbr': 'tcld', 'code': 3, 'title': 'Cloud top level'}, {'abbr': 'isot', 'code': 4, 'title': '0 deg (C) isotherm level'}, {'abbr': 5, 'code': 5, 'title': 'Adiabatic condensation level', 'units': 'parcel lifted from surface'}, {'abbr': 6, 'code': 6, 'title': 'Maximum wind speed level'}, {'abbr': 7, 'code': 7, 'title': 'Tropopause level'}, {'abbr': 'tatm', 'code': 8, 'title': 'Nominal top of atmosphere'}, {'abbr': 9, 'code': 9, 'title': 'Sea bottom'}, {'abbr': 'pl', 'code': 100, 'title': 'Isobaric level pressure in hectoPascals (hPa)', 'units': '2 octets'}, {'abbr': 101, 'code': 101, 'title': 'Layer between two isobaric levels pressure of top (kPa) pressure of bottom', 'units': 'kPa'}, {'abbr': 'msl', 'code': 102, 'title': 'Mean sea level 0 0'}, {'abbr': 'hmsl', 'code': 103, 'title': 'Fixed height level height above mean sea level (MSL) in meters'}, {'abbr': 104, 'code': 104, 'title': 'Layer between two height levels above msl height of top (hm) above mean sea level height of bottom (hm) above mean sea level'}, {'abbr': 'hl', 'code': 105, 'title': 'Fixed height above ground height in meters', 'units': '2 octets'}, {'abbr': 'lhl', 'code': 106, 'title': 'Layer between two height levels above ground height of top (hm) above ground height of bottom (hm) above ground'}, {'abbr': 107, 'code': 107, 'title': 'Sigma level sigma value in 1/10000', 'units': '2 octets'}, {'abbr': 108, 'code': 108, 'title': 'Layer between two sigma levels sigma value at top in 1/100 sigma value at bottom in 1/100'}, {'abbr': 'ml', 'code': 109, 'title': 'Hybrid level level number', 'units': '2 octets'}, {'abbr': 110, 'code': 110, 'title': 'Layer between two hybrid levels level number of top level number of bottom'}, {'abbr': 111, 'code': 111, 'title': 'Depth below land surface centimeters', 'units': '2 octets'}, {'abbr': 'ldl', 'code': 112, 'title': 'Layer between two depths below land surface depth of upper surface (cm) depth of lower surface', 'units': 'cm'}, {'abbr': 'pt', 'code': 113, 'title': 'Isentropic (theta) level Potential Temp. degrees K', 'units': '2 octets'}, {'abbr': 114, 'code': 114, 'title': 'Layer between two isentropic levels 475K minus theta of top in Deg. K 475K minus theta of bottom in Deg. K'}, {'abbr': 115, 'code': 115, 'title': 'Level at specified pressure difference from ground to level hPa', 'units': '2 octets'}, {'abbr': 116, 'code': 116, 'title': 'Layer between two levels at specified pressure differences from ground to levels pressure difference from ground to top level hPa pressure difference from ground to bottom level hPa'}, {'abbr': 'pv', 'code': 117, 'title': 'Potential vorticity surface 10-9 K m2 kg-1 s-1'}, {'abbr': 121, 'code': 121, 'title': 'Layer between two isobaric surfaces (high precision) 1100 hPa minus pressure of top, in hPa 1100 hPa minus pressure of bottom, in hPa'}, {'abbr': 125, 'code': 125, 'title': 'Height level above ground (high precision) centimeters', 'units': '2 octets'}, {'abbr': 128, 'code': 128, 'title': 'Layer between two sigma levels (high precision) 1.1 minus sigma of top, in 1/1000 of sigma 1.1 minus sigma of bottom, in 1/1000 of sigma'}, {'abbr': 141, 'code': 141, 'title': 'Layer between two isobaric surfaces (mixed precision) pressure of top, in kPa 1100hPa minus pressure of bottom, in hPa'}, {'abbr': 'dp', 'code': 160, 'title': 'Depth below sea level meters', 'units': '2 octets'}, {'abbr': 'nd', 'code': 191, 'title': 'Northern Direction', 'units': 'SMHI Extension'}, {'abbr': 'ned', 'code': 192, 'title': 'Northern-Eastern Direction', 'units': 'SMHI Extension'}, {'abbr': 'ed', 'code': 193, 'title': 'Eastern Direction', 'units': 'SMHI Extension'}, {'abbr': 'sed', 'code': 194, 'title': 'Southern-Eastern Direction', 'units': 'SMHI Extension'}, {'abbr': 'sd', 'code': 195, 'title': 'Southern Direction', 'units': 'SMHI Extension'}, {'abbr': 'swd', 'code': 196, 'title': 'Southern-Western Direction', 'units': 'SMHI Extension'}, {'abbr': 'wd', 'code': 197, 'title': 'Western Direction', 'units': 'SMHI Extension'}, {'abbr': 'nwd', 'code': 198, 'title': 'Northern-Western Direction', 'units': 'SMHI Extension'}, {'abbr': 'atm', 'code': 200, 'title': 'Entire atmosphere considered as a single layer 0', 'units': '2 octets'}, {'abbr': 201, 'code': 201, 'title': 'Entire ocean considered as a single layer 0', 'units': '2 octets'}) |
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def __init__(self):
self.preorder_i = 0
def buildTree(self, preorder, inorder) -> TreeNode:
return self.rec(preorder, inorder, 0, len(preorder) - 1)
def rec(self, preorder, inorder, inorder_l: int, inorder_r: int) -> TreeNode:
if inorder_l > inorder_r:
return None
node = TreeNode(preorder[self.preorder_i])
center = self.preorder_i
self.preorder_i += 1
left_l = inorder_l
right_l = inorder_l
while preorder[center] != inorder[right_l]:
right_l += 1
node.left = self.rec(preorder, inorder, left_l, right_l - 1)
node.right = self.rec(preorder, inorder, right_l + 1, inorder_r)
return node
x = Solution()
y = x.buildTree([3, 9, 20, 15, 7], [9, 3, 15, 20, 7])
print('here') | class Treenode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def __init__(self):
self.preorder_i = 0
def build_tree(self, preorder, inorder) -> TreeNode:
return self.rec(preorder, inorder, 0, len(preorder) - 1)
def rec(self, preorder, inorder, inorder_l: int, inorder_r: int) -> TreeNode:
if inorder_l > inorder_r:
return None
node = tree_node(preorder[self.preorder_i])
center = self.preorder_i
self.preorder_i += 1
left_l = inorder_l
right_l = inorder_l
while preorder[center] != inorder[right_l]:
right_l += 1
node.left = self.rec(preorder, inorder, left_l, right_l - 1)
node.right = self.rec(preorder, inorder, right_l + 1, inorder_r)
return node
x = solution()
y = x.buildTree([3, 9, 20, 15, 7], [9, 3, 15, 20, 7])
print('here') |
inpt1 = int(input('enter base: '))
inpt2 = int(input('enter height: '))
inpt3 = int(input('enter hypotenus: '))
def get_area(base, height):
return 0.5 * base * height
def get_per(base, height, hypo):
return base + height + hypo
print("area of the triangle is: ")
print(get_area(inpt1, inpt2))
print()
print('the perimeter of the triangle is')
print(get_per(inpt1, inpt2, inpt3))
| inpt1 = int(input('enter base: '))
inpt2 = int(input('enter height: '))
inpt3 = int(input('enter hypotenus: '))
def get_area(base, height):
return 0.5 * base * height
def get_per(base, height, hypo):
return base + height + hypo
print('area of the triangle is: ')
print(get_area(inpt1, inpt2))
print()
print('the perimeter of the triangle is')
print(get_per(inpt1, inpt2, inpt3)) |
def __getattr__():
pass
class C1:
def __str__(self):
return ''
def foo(self):
'''
>>> class Good():
... def __str__(self):
... return 1
'''
pass
class C2:
if True:
def __str__(self):
return ''
class C3:
try:
if True:
while True:
def __str__(self):
return ''
break
except:
pass
| def __getattr__():
pass
class C1:
def __str__(self):
return ''
def foo(self):
"""
>>> class Good():
... def __str__(self):
... return 1
"""
pass
class C2:
if True:
def __str__(self):
return ''
class C3:
try:
if True:
while True:
def __str__(self):
return ''
break
except:
pass |
class Config(object):
DEBUG = False
TESTING = False
SECRET_KEY = 'AAABBBBAAAA'
SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/test.db'
class ProductionConfig(Config):
DATABASE_URI = 'mysql://user@localhost/foo'
class DevelopmentConfig(Config):
DEBUG = True
class TestingConfig(Config):
TESTING = True
| class Config(object):
debug = False
testing = False
secret_key = 'AAABBBBAAAA'
sqlalchemy_database_uri = 'sqlite:////tmp/test.db'
class Productionconfig(Config):
database_uri = 'mysql://user@localhost/foo'
class Developmentconfig(Config):
debug = True
class Testingconfig(Config):
testing = True |
#!/usr/bin/python3
'''
Finds the coincidence index for the piece of text
Does not format the text so make sure to pass in a formatted one
'''
def findCoincidenceIndex(text: str, shift: int):
shiftedText = text[:-(shift)]
text = text[shift:]
shiftedLen = len(shiftedText)
similarCount = 0
for i in range(shiftedLen):
if text[i] == shiftedText[i]:
similarCount += 1
coincidenceIndex = similarCount/shiftedLen * 26
return coincidenceIndex
'''
Check all coincidence indices.
Returns the max of the coincidence indices, and the array of indices
Does not format the input
'''
def findBestCoincidenceIndex(text: str):
textLen = len(text)
indices = []
mx = 0
shift = -1
for i in range(1, textLen - 2):
index = findCoincidenceIndex(text, i)
if (index > mx):
mx = index
shift = i
indices.append(index)
return {'bestIndex': mx, 'bestShift': shift, 'indices': indices}
'''
Checks if the coincidenceIndex of a piece of text is similar i.e within the error margin to given coincidence index. If yes, then the shift and the index is returned, otherwise false
'''
def checkCoincidenceIndex(text: str, ci: float, errorMargin: float = 0.01):
textLen = len(text)
indices = []
bestIndex = 0
shift = -1
for i in range(1, textLen - 2):
index = findCoincidenceIndex(text, i)
diff = abs(index - ci)
if (diff < errorMargin):
if diff < abs(bestIndex - ci):
bestIndex = index
shift = i
indices.append((bestIndex, i))
return {'bestIndex': bestIndex, 'bestShift': shift, 'indices': indices} if shift != -1 else False
| """
Finds the coincidence index for the piece of text
Does not format the text so make sure to pass in a formatted one
"""
def find_coincidence_index(text: str, shift: int):
shifted_text = text[:-shift]
text = text[shift:]
shifted_len = len(shiftedText)
similar_count = 0
for i in range(shiftedLen):
if text[i] == shiftedText[i]:
similar_count += 1
coincidence_index = similarCount / shiftedLen * 26
return coincidenceIndex
'\nCheck all coincidence indices.\nReturns the max of the coincidence indices, and the array of indices\nDoes not format the input\n'
def find_best_coincidence_index(text: str):
text_len = len(text)
indices = []
mx = 0
shift = -1
for i in range(1, textLen - 2):
index = find_coincidence_index(text, i)
if index > mx:
mx = index
shift = i
indices.append(index)
return {'bestIndex': mx, 'bestShift': shift, 'indices': indices}
'\nChecks if the coincidenceIndex of a piece of text is similar i.e within the error margin to given coincidence index. If yes, then the shift and the index is returned, otherwise false\n'
def check_coincidence_index(text: str, ci: float, errorMargin: float=0.01):
text_len = len(text)
indices = []
best_index = 0
shift = -1
for i in range(1, textLen - 2):
index = find_coincidence_index(text, i)
diff = abs(index - ci)
if diff < errorMargin:
if diff < abs(bestIndex - ci):
best_index = index
shift = i
indices.append((bestIndex, i))
return {'bestIndex': bestIndex, 'bestShift': shift, 'indices': indices} if shift != -1 else False |
# Default
domainFile = "domains.txt"
assets = "./assets/"
targets = assets + "targets/"
subdomains = assets + "subdomains/"
domains = assets + "domains/"
takeover = assets + "takeover/"
dto = assets = "dto/"
# Target Information
targetFields = {
"Domain" : "",
"Analysis" : {
"Subdomain" : "",
"Ping" : "",
"Dns" : ""
}
}
| domain_file = 'domains.txt'
assets = './assets/'
targets = assets + 'targets/'
subdomains = assets + 'subdomains/'
domains = assets + 'domains/'
takeover = assets + 'takeover/'
dto = assets = 'dto/'
target_fields = {'Domain': '', 'Analysis': {'Subdomain': '', 'Ping': '', 'Dns': ''}} |
count = int(input())
matrix = []
for i in range(count):
matrix.append(list(map(int, input().split())))
# matrix = [list(map(int, input().split())) for i in range(n)]
roads = 0
for row in range(len(matrix)):
for col in range(row, len(matrix)):
roads += matrix[row][col]
print(roads)
| count = int(input())
matrix = []
for i in range(count):
matrix.append(list(map(int, input().split())))
roads = 0
for row in range(len(matrix)):
for col in range(row, len(matrix)):
roads += matrix[row][col]
print(roads) |
# BUILD FILE SYNTAX: SKYLARK
SE_VERSION = '3.9.1'
ASSEMBLY_VERSION = '3.9.1.0'
| se_version = '3.9.1'
assembly_version = '3.9.1.0' |
#
# PySNMP MIB module STN-SESSION-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/STN-SESSION-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:11:40 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsUnion, ConstraintsIntersection, SingleValueConstraint, ValueRangeConstraint, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ConstraintsIntersection", "SingleValueConstraint", "ValueRangeConstraint", "ValueSizeConstraint")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
Bits, Counter32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, iso, Gauge32, MibIdentifier, TimeTicks, Integer32, Counter64, IpAddress, Unsigned32, ObjectIdentity, ModuleIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "Counter32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "iso", "Gauge32", "MibIdentifier", "TimeTicks", "Integer32", "Counter64", "IpAddress", "Unsigned32", "ObjectIdentity", "ModuleIdentity")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
stnSystems, stnNotification = mibBuilder.importSymbols("SPRING-TIDE-NETWORKS-SMI", "stnSystems", "stnNotification")
StnUserFailureType, StnConfigFailureType = mibBuilder.importSymbols("SPRING-TIDE-NETWORKS-TC", "StnUserFailureType", "StnConfigFailureType")
stnEngineCpu, stnEngineIndex, stnEngineSlot = mibBuilder.importSymbols("STN-CHASSIS-MIB", "stnEngineCpu", "stnEngineIndex", "stnEngineSlot")
stnRouterIndex, = mibBuilder.importSymbols("STN-ROUTER-MIB", "stnRouterIndex")
stnSessions = ModuleIdentity((1, 3, 6, 1, 4, 1, 3551, 2, 5))
if mibBuilder.loadTexts: stnSessions.setLastUpdated('0002160000Z')
if mibBuilder.loadTexts: stnSessions.setOrganization('Spring Tide Networks, Inc.')
if mibBuilder.loadTexts: stnSessions.setContactInfo(' Spring Tide Networks, Inc. Customer Service Postal: 3 Clock Tower Place Maynard, MA 01754 Tel: 1 888-786-4357 Email: stncs@springtidenet.com ')
if mibBuilder.loadTexts: stnSessions.setDescription('This MIB module describes Spring Tide Networks session objects.')
stnSessionObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1))
stnSessionMibConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 2))
stnSessionTrapVars = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 3))
stnSession = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1))
stnGlobalSession = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 2))
stnSessionsPpp = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 2))
stnSessionsL2tp = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 3))
stnSessionsPptp = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 4))
stnSessionsIpsec = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 5))
stnSessionsIke = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 6))
stnSessionsTelnet = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 7))
stnSessionsFtp = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 8))
stnSessionsFtpAlg = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 9))
stnSessionsConsole = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 10))
stnSessionsAggregate = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 11))
stnSessionsEncaps = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 12))
stnSessionsSecureUser = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 13))
stnSessionsRemoteConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 14))
class SessionOperStatus(TextualConvention, Integer32):
description = 'Operational status of a session.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))
namedValues = NamedValues(("unknown", 1), ("inactive", 2), ("pend-active", 3), ("active", 4), ("pend-inactive", 5))
stnSessionTable = MibTable((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 1), )
if mibBuilder.loadTexts: stnSessionTable.setStatus('current')
if mibBuilder.loadTexts: stnSessionTable.setDescription('A list of session entries.')
stnSessionEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 1, 1), ).setIndexNames((0, "STN-SESSION-MIB", "stnSessionIndex"))
if mibBuilder.loadTexts: stnSessionEntry.setStatus('current')
if mibBuilder.loadTexts: stnSessionEntry.setDescription('Entry contains information about a particular session.')
stnSessionIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 1, 1, 1), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionIndex.setStatus('current')
if mibBuilder.loadTexts: stnSessionIndex.setDescription('A sequence number that identifies a session entry in the table.')
stnSessionType = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13))).clone(namedValues=NamedValues(("unknown", 1), ("ppp", 2), ("l2tp-tunnel", 3), ("pptp-tunnel", 4), ("ipsec", 5), ("ike", 6), ("telnet", 7), ("ftp", 8), ("ftp-alg", 9), ("console", 10), ("encaps", 11), ("secure-user", 12), ("remote-config", 13)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionType.setStatus('current')
if mibBuilder.loadTexts: stnSessionType.setDescription('Indicates the session type.')
stnSessionContext = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 1, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 256))).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionContext.setStatus('current')
if mibBuilder.loadTexts: stnSessionContext.setDescription('A unique context identifier associated with the session.')
stnSessionOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 1, 1, 4), SessionOperStatus()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionOperStatus.setStatus('current')
if mibBuilder.loadTexts: stnSessionOperStatus.setDescription('The operational status of the session.')
stnSessionLastChange = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 1, 1, 5), TimeTicks()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionLastChange.setStatus('current')
if mibBuilder.loadTexts: stnSessionLastChange.setDescription('The value of sysUpTime at the time the session entered its current operational state.')
stnSessionPppTotalCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 2, 1), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionPppTotalCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionPppTotalCount.setDescription('The total number of PPP sessions since system start.')
stnSessionPppFailedCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 2, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionPppFailedCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionPppFailedCount.setDescription('The total number of failed sessions since system start.')
stnSessionPppCurrentCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 2, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionPppCurrentCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionPppCurrentCount.setDescription('The total number of current PPP sessions.')
stnSessionPppCurrentActiveCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 2, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionPppCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionPppCurrentActiveCount.setDescription('The total number of current active PPP sessions.')
stnSessionL2tpTunnelTotalCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 3, 1), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionL2tpTunnelTotalCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionL2tpTunnelTotalCount.setDescription('The total number of L2TP tunnel sessions since system start.')
stnSessionL2tpTunnelFailedCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 3, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionL2tpTunnelFailedCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionL2tpTunnelFailedCount.setDescription('The total number of failed L2TP tunnel sessions since system start.')
stnSessionL2tpTunnelCurrentCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 3, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionL2tpTunnelCurrentCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionL2tpTunnelCurrentCount.setDescription('The total number of current L2TP tunnel sessions.')
stnSessionL2tpTunnelCurrentActiveCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 3, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionL2tpTunnelCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionL2tpTunnelCurrentActiveCount.setDescription('The total number of current active L2TP tunnel sessions.')
stnSessionPptpTunnelTotalCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 4, 1), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionPptpTunnelTotalCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionPptpTunnelTotalCount.setDescription('The total number of PPTP tunnel sessions since system start.')
stnSessionPptpTunnelFailedCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 4, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionPptpTunnelFailedCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionPptpTunnelFailedCount.setDescription('The total number of failed PPTP tunnel sessions since system start.')
stnSessionPptpTunnelCurrentCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 4, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionPptpTunnelCurrentCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionPptpTunnelCurrentCount.setDescription('The total number of current PPTP tunnel sessions.')
stnSessionPptpTunnelCurrentActiveCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 4, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionPptpTunnelCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionPptpTunnelCurrentActiveCount.setDescription('The total number of current active PPTP tunnel sessions.')
stnSessionIpsecTotalCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 5, 1), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionIpsecTotalCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionIpsecTotalCount.setDescription('The total number of IPSEC sessions since system start.')
stnSessionIpsecFailedCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 5, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionIpsecFailedCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionIpsecFailedCount.setDescription('The total number of failed IPSEC sessions since system start.')
stnSessionIpsecCurrentCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 5, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionIpsecCurrentCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionIpsecCurrentCount.setDescription('The total number of current IPSEC sessions.')
stnSessionIpsecCurrentActiveCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 5, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionIpsecCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionIpsecCurrentActiveCount.setDescription('The total number of current active IPSEC sessions.')
stnSessionIkeTotalCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 6, 1), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionIkeTotalCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionIkeTotalCount.setDescription('The total number of IKE sessions since system start.')
stnSessionIkeFailedCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 6, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionIkeFailedCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionIkeFailedCount.setDescription('The total number of failed IKE sessions since system start.')
stnSessionIkeCurrentCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 6, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionIkeCurrentCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionIkeCurrentCount.setDescription('The total number of current IKE sessions.')
stnSessionIkeCurrentActiveCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 6, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionIkeCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionIkeCurrentActiveCount.setDescription('The total number of current active IKE sessions.')
stnSessionTelnetTotalCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 7, 1), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionTelnetTotalCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionTelnetTotalCount.setDescription('The total number of Telnet sessions since system start.')
stnSessionTelnetFailedCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 7, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionTelnetFailedCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionTelnetFailedCount.setDescription('The total number of failed Telnet sessions since system start.')
stnSessionTelnetCurrentCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 7, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionTelnetCurrentCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionTelnetCurrentCount.setDescription('The total number of current Telnet sessions.')
stnSessionTelnetCurrentActiveCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 7, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionTelnetCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionTelnetCurrentActiveCount.setDescription('The total number of current active Telnet sessions.')
stnSessionFtpTotalCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 8, 1), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionFtpTotalCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionFtpTotalCount.setDescription('The total number of FTP sessions since system start.')
stnSessionFtpFailedCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 8, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionFtpFailedCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionFtpFailedCount.setDescription('The total number of failed FTP sessions since system start.')
stnSessionFtpCurrentCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 8, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionFtpCurrentCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionFtpCurrentCount.setDescription('The total number of current FTP sessions.')
stnSessionFtpCurrentActiveCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 8, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionFtpCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionFtpCurrentActiveCount.setDescription('The total number of current active FTP sessions.')
stnSessionFtpAlgTotalCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 9, 1), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionFtpAlgTotalCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionFtpAlgTotalCount.setDescription('The total number of FTP-ALG sessions since system start.')
stnSessionFtpAlgFailedCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 9, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionFtpAlgFailedCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionFtpAlgFailedCount.setDescription('The total number of failed FTP-ALG sessions since system start.')
stnSessionFtpAlgCurrentCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 9, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionFtpAlgCurrentCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionFtpAlgCurrentCount.setDescription('The total number of current FTP-ALG sessions.')
stnSessionFtpAlgCurrentActiveCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 9, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionFtpAlgCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionFtpAlgCurrentActiveCount.setDescription('The total number of current active FTP-ALG sessions.')
stnSessionConsoleTotalCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 10, 1), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionConsoleTotalCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionConsoleTotalCount.setDescription('The total number of console sessions since system start.')
stnSessionConsoleFailedCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 10, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionConsoleFailedCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionConsoleFailedCount.setDescription('The total number of failed console sessions since system start.')
stnSessionConsoleCurrentCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 10, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionConsoleCurrentCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionConsoleCurrentCount.setDescription('The total number of current console sessions.')
stnSessionConsoleCurrentActiveCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 10, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionConsoleCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionConsoleCurrentActiveCount.setDescription('The total number of current active console sessions.')
stnSessionAggregateTotalCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 11, 1), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionAggregateTotalCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionAggregateTotalCount.setDescription('The total number of sessions since system start.')
stnSessionAggregateFailedCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 11, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionAggregateFailedCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionAggregateFailedCount.setDescription('The total number of failed sessions since system start.')
stnSessionAggregateCurrentCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 11, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionAggregateCurrentCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionAggregateCurrentCount.setDescription('The total number of current sessions.')
stnSessionAggregateCurrentActiveCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 11, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionAggregateCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionAggregateCurrentActiveCount.setDescription('The total number of current active sessions.')
stnSessionEncapsTotalCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 12, 1), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionEncapsTotalCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionEncapsTotalCount.setDescription('The total number of encaps sessions since system start.')
stnSessionEncapsFailedCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 12, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionEncapsFailedCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionEncapsFailedCount.setDescription('The total number of failed encaps sessions since system start.')
stnSessionEncapsCurrentCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 12, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionEncapsCurrentCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionEncapsCurrentCount.setDescription('The total number of current encaps sessions.')
stnSessionEncapsCurrentActiveCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 12, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionEncapsCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionEncapsCurrentActiveCount.setDescription('The total number of current active encaps sessions.')
stnSessionSecureUserTotalCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 13, 1), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionSecureUserTotalCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionSecureUserTotalCount.setDescription('The total number of secure user sessions since system start.')
stnSessionSecureUserFailedCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 13, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionSecureUserFailedCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionSecureUserFailedCount.setDescription('The total number of failed secure user sessions since system start.')
stnSessionSecureUserCurrentCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 13, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionSecureUserCurrentCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionSecureUserCurrentCount.setDescription('The total number of current secure user sessions.')
stnSessionSecureUserCurrentActiveCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 13, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionSecureUserCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionSecureUserCurrentActiveCount.setDescription('The total number of current active secure user sessions.')
stnSessionRemoteConfigTotalCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 14, 1), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionRemoteConfigTotalCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionRemoteConfigTotalCount.setDescription('The total number of remote config sessions since system start.')
stnSessionRemoteConfigFailedCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 14, 2), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionRemoteConfigFailedCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionRemoteConfigFailedCount.setDescription('The total number of failed remote config sessions since system start.')
stnSessionRemoteConfigCurrentCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 14, 3), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionRemoteConfigCurrentCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionRemoteConfigCurrentCount.setDescription('The total number of current remote config sessions.')
stnSessionRemoteConfigCurrentActiveCount = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 14, 4), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnSessionRemoteConfigCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts: stnSessionRemoteConfigCurrentActiveCount.setDescription('The total number of current active remote config sessions.')
stnGlobalSessionTable = MibTable((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 2, 1), )
if mibBuilder.loadTexts: stnGlobalSessionTable.setStatus('current')
if mibBuilder.loadTexts: stnGlobalSessionTable.setDescription('A list of session entries with the box.')
stnGlobalSessionEntry = MibTableRow((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 2, 1, 1), ).setIndexNames((0, "STN-SESSION-MIB", "stnGlobalSessionIndex"))
if mibBuilder.loadTexts: stnGlobalSessionEntry.setStatus('current')
if mibBuilder.loadTexts: stnGlobalSessionEntry.setDescription('Entry contains information about a particular session.')
stnGlobalSessionIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 2, 1, 1, 1), Unsigned32())
if mibBuilder.loadTexts: stnGlobalSessionIndex.setStatus('current')
if mibBuilder.loadTexts: stnGlobalSessionIndex.setDescription('A sequence number that identifies a session entry in the table.')
stnGlobalSessionOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 2, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("inactive", 1), ("active", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: stnGlobalSessionOperStatus.setStatus('current')
if mibBuilder.loadTexts: stnGlobalSessionOperStatus.setDescription('The operational status of the session.')
stnNotificationUsername = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 3, 1), DisplayString()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnNotificationUsername.setStatus('current')
if mibBuilder.loadTexts: stnNotificationUsername.setDescription("The user's name associated with the trap.")
stnNotificationUserFailureType = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 3, 2), StnUserFailureType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnNotificationUserFailureType.setStatus('current')
if mibBuilder.loadTexts: stnNotificationUserFailureType.setDescription('The type of user failure.')
stnNotificationConfigType = MibScalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 3, 3), StnConfigFailureType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: stnNotificationConfigType.setStatus('current')
if mibBuilder.loadTexts: stnNotificationConfigType.setDescription('The type of configuration failure.')
stnUserFailure = NotificationType((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 17)).setObjects(("STN-ROUTER-MIB", "stnRouterIndex"), ("STN-SESSION-MIB", "stnNotificationUsername"), ("STN-SESSION-MIB", "stnNotificationUserFailureType"), ("STN-SESSION-MIB", "stnSessionType"))
if mibBuilder.loadTexts: stnUserFailure.setStatus('current')
if mibBuilder.loadTexts: stnUserFailure.setDescription('A stnUserFailure trap signifies that the agent entity has detected that a configuration failure has occurred. The generation of this trap can be controlled by the CommandLineIfaceTraps configuration object.')
stnConfigFailure = NotificationType((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 18)).setObjects(("STN-ROUTER-MIB", "stnRouterIndex"), ("STN-SESSION-MIB", "stnNotificationUsername"), ("STN-SESSION-MIB", "stnNotificationConfigType"))
if mibBuilder.loadTexts: stnConfigFailure.setStatus('current')
if mibBuilder.loadTexts: stnConfigFailure.setDescription('A stnConfigFailure trap signifies that the agent entity has detected that a configuration failure has occurred. The generation of this trap can be controlled by the CommandLineIfaceTraps configuration object.')
stnNoFlowEntriesAvailable = NotificationType((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 57)).setObjects(("STN-CHASSIS-MIB", "stnEngineIndex"), ("STN-CHASSIS-MIB", "stnEngineSlot"), ("STN-CHASSIS-MIB", "stnEngineCpu"))
if mibBuilder.loadTexts: stnNoFlowEntriesAvailable.setStatus('current')
if mibBuilder.loadTexts: stnNoFlowEntriesAvailable.setDescription('A stnNoFlowEntriesAvailable trap signifies that the agent entity has detected that the there are no more flow entries available on the indicated slot/cpu. This can occur if too many interfaces are assigned to an engine. The generation of this trap can be controlled by the SessionTraps configuration object.')
stnNoLayerIfsAvailable = NotificationType((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 58)).setObjects(("STN-CHASSIS-MIB", "stnEngineIndex"), ("STN-CHASSIS-MIB", "stnEngineSlot"), ("STN-CHASSIS-MIB", "stnEngineCpu"))
if mibBuilder.loadTexts: stnNoLayerIfsAvailable.setStatus('current')
if mibBuilder.loadTexts: stnNoLayerIfsAvailable.setDescription('A stnNoLayerIfsAvailable trap signifies that the agent entity has detected that the there are no more layer interfaces available on the indicated slot/cpu. This can occur if too many VCs are assigned to an engine. The generation of this trap can be controlled by the SessionTraps configuration object.')
stnMaxSessionLimitExceeded = NotificationType((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 59)).setObjects(("STN-CHASSIS-MIB", "stnEngineIndex"), ("STN-CHASSIS-MIB", "stnEngineSlot"), ("STN-CHASSIS-MIB", "stnEngineCpu"))
if mibBuilder.loadTexts: stnMaxSessionLimitExceeded.setStatus('current')
if mibBuilder.loadTexts: stnMaxSessionLimitExceeded.setDescription('A stnMaxSessionLimitExceeded trap signifies that the agent entity has detected that the maximum session limit has occurred on the indicated slot/cpu. The generation of this trap can be controlled by the SessionTraps configuration object.')
stnTunnelEngineLimitExceeded = NotificationType((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 60)).setObjects(("STN-CHASSIS-MIB", "stnEngineIndex"), ("STN-CHASSIS-MIB", "stnEngineSlot"), ("STN-CHASSIS-MIB", "stnEngineCpu"))
if mibBuilder.loadTexts: stnTunnelEngineLimitExceeded.setStatus('current')
if mibBuilder.loadTexts: stnTunnelEngineLimitExceeded.setDescription('A stnTunnelEngineLimitExceeded trap signifies that the agent entity has detected that the maximum tunnel limit has occurred on the indicated slot/cpu. The generation of this trap can be controlled by the SessionTraps configuration object.')
stnCallEngineLimitExceeded = NotificationType((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 61)).setObjects(("STN-CHASSIS-MIB", "stnEngineIndex"), ("STN-CHASSIS-MIB", "stnEngineSlot"), ("STN-CHASSIS-MIB", "stnEngineCpu"))
if mibBuilder.loadTexts: stnCallEngineLimitExceeded.setStatus('current')
if mibBuilder.loadTexts: stnCallEngineLimitExceeded.setDescription('A stnCallEngineLimitExceeded trap signifies that the agent entity has detected that the maximum call limit has occurred on the indicated slot/cpu. The generation of this trap can be controlled by the SessionTraps configuration object.')
mibBuilder.exportSymbols("STN-SESSION-MIB", stnSessionOperStatus=stnSessionOperStatus, stnSessionPppCurrentCount=stnSessionPppCurrentCount, stnGlobalSessionEntry=stnGlobalSessionEntry, stnSessionsEncaps=stnSessionsEncaps, stnSessionIpsecCurrentActiveCount=stnSessionIpsecCurrentActiveCount, stnSessionTable=stnSessionTable, stnNotificationUserFailureType=stnNotificationUserFailureType, stnSessionAggregateFailedCount=stnSessionAggregateFailedCount, stnMaxSessionLimitExceeded=stnMaxSessionLimitExceeded, stnSessionType=stnSessionType, stnSessionLastChange=stnSessionLastChange, stnSessionTelnetTotalCount=stnSessionTelnetTotalCount, stnSessionPppTotalCount=stnSessionPppTotalCount, stnSessionIkeCurrentActiveCount=stnSessionIkeCurrentActiveCount, stnUserFailure=stnUserFailure, stnSessionsAggregate=stnSessionsAggregate, stnSessionsTelnet=stnSessionsTelnet, stnSessionRemoteConfigTotalCount=stnSessionRemoteConfigTotalCount, stnSessionTrapVars=stnSessionTrapVars, stnSessionsPpp=stnSessionsPpp, stnSessionEncapsCurrentCount=stnSessionEncapsCurrentCount, SessionOperStatus=SessionOperStatus, stnSessionIpsecTotalCount=stnSessionIpsecTotalCount, stnNoFlowEntriesAvailable=stnNoFlowEntriesAvailable, stnSessionFtpAlgFailedCount=stnSessionFtpAlgFailedCount, stnSessionFtpAlgCurrentActiveCount=stnSessionFtpAlgCurrentActiveCount, stnSessionEncapsFailedCount=stnSessionEncapsFailedCount, stnSessionTelnetFailedCount=stnSessionTelnetFailedCount, stnSessionRemoteConfigCurrentActiveCount=stnSessionRemoteConfigCurrentActiveCount, stnSessionPppCurrentActiveCount=stnSessionPppCurrentActiveCount, stnSessionFtpAlgCurrentCount=stnSessionFtpAlgCurrentCount, stnSessionSecureUserCurrentCount=stnSessionSecureUserCurrentCount, stnSessionTelnetCurrentActiveCount=stnSessionTelnetCurrentActiveCount, stnSessionIndex=stnSessionIndex, stnSessionIkeCurrentCount=stnSessionIkeCurrentCount, stnSessionL2tpTunnelTotalCount=stnSessionL2tpTunnelTotalCount, stnSessionFtpAlgTotalCount=stnSessionFtpAlgTotalCount, stnSessionsSecureUser=stnSessionsSecureUser, stnSessionContext=stnSessionContext, stnSession=stnSession, stnConfigFailure=stnConfigFailure, stnSessionL2tpTunnelFailedCount=stnSessionL2tpTunnelFailedCount, stnSessionPptpTunnelCurrentCount=stnSessionPptpTunnelCurrentCount, stnSessionSecureUserCurrentActiveCount=stnSessionSecureUserCurrentActiveCount, stnSessions=stnSessions, stnSessionIkeFailedCount=stnSessionIkeFailedCount, stnSessionIkeTotalCount=stnSessionIkeTotalCount, stnCallEngineLimitExceeded=stnCallEngineLimitExceeded, stnSessionSecureUserTotalCount=stnSessionSecureUserTotalCount, stnSessionEncapsTotalCount=stnSessionEncapsTotalCount, PYSNMP_MODULE_ID=stnSessions, stnSessionConsoleFailedCount=stnSessionConsoleFailedCount, stnSessionRemoteConfigCurrentCount=stnSessionRemoteConfigCurrentCount, stnSessionTelnetCurrentCount=stnSessionTelnetCurrentCount, stnSessionPptpTunnelCurrentActiveCount=stnSessionPptpTunnelCurrentActiveCount, stnSessionRemoteConfigFailedCount=stnSessionRemoteConfigFailedCount, stnSessionAggregateCurrentActiveCount=stnSessionAggregateCurrentActiveCount, stnSessionsPptp=stnSessionsPptp, stnSessionFtpTotalCount=stnSessionFtpTotalCount, stnSessionFtpCurrentCount=stnSessionFtpCurrentCount, stnSessionPptpTunnelFailedCount=stnSessionPptpTunnelFailedCount, stnSessionIpsecFailedCount=stnSessionIpsecFailedCount, stnSessionMibConformance=stnSessionMibConformance, stnSessionIpsecCurrentCount=stnSessionIpsecCurrentCount, stnSessionsL2tp=stnSessionsL2tp, stnSessionPptpTunnelTotalCount=stnSessionPptpTunnelTotalCount, stnSessionsIke=stnSessionsIke, stnSessionConsoleCurrentActiveCount=stnSessionConsoleCurrentActiveCount, stnNoLayerIfsAvailable=stnNoLayerIfsAvailable, stnSessionsIpsec=stnSessionsIpsec, stnSessionFtpFailedCount=stnSessionFtpFailedCount, stnSessionsFtp=stnSessionsFtp, stnSessionsConsole=stnSessionsConsole, stnGlobalSession=stnGlobalSession, stnSessionFtpCurrentActiveCount=stnSessionFtpCurrentActiveCount, stnGlobalSessionOperStatus=stnGlobalSessionOperStatus, stnTunnelEngineLimitExceeded=stnTunnelEngineLimitExceeded, stnSessionsFtpAlg=stnSessionsFtpAlg, stnSessionL2tpTunnelCurrentCount=stnSessionL2tpTunnelCurrentCount, stnSessionAggregateCurrentCount=stnSessionAggregateCurrentCount, stnNotificationConfigType=stnNotificationConfigType, stnSessionConsoleTotalCount=stnSessionConsoleTotalCount, stnNotificationUsername=stnNotificationUsername, stnSessionsRemoteConfig=stnSessionsRemoteConfig, stnSessionObjects=stnSessionObjects, stnSessionEntry=stnSessionEntry, stnSessionL2tpTunnelCurrentActiveCount=stnSessionL2tpTunnelCurrentActiveCount, stnGlobalSessionIndex=stnGlobalSessionIndex, stnSessionAggregateTotalCount=stnSessionAggregateTotalCount, stnSessionPppFailedCount=stnSessionPppFailedCount, stnSessionSecureUserFailedCount=stnSessionSecureUserFailedCount, stnSessionEncapsCurrentActiveCount=stnSessionEncapsCurrentActiveCount, stnGlobalSessionTable=stnGlobalSessionTable, stnSessionConsoleCurrentCount=stnSessionConsoleCurrentCount)
| (integer, octet_string, object_identifier) = mibBuilder.importSymbols('ASN1', 'Integer', 'OctetString', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_union, constraints_intersection, single_value_constraint, value_range_constraint, value_size_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ConstraintsIntersection', 'SingleValueConstraint', 'ValueRangeConstraint', 'ValueSizeConstraint')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(bits, counter32, mib_scalar, mib_table, mib_table_row, mib_table_column, notification_type, iso, gauge32, mib_identifier, time_ticks, integer32, counter64, ip_address, unsigned32, object_identity, module_identity) = mibBuilder.importSymbols('SNMPv2-SMI', 'Bits', 'Counter32', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'NotificationType', 'iso', 'Gauge32', 'MibIdentifier', 'TimeTicks', 'Integer32', 'Counter64', 'IpAddress', 'Unsigned32', 'ObjectIdentity', 'ModuleIdentity')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
(stn_systems, stn_notification) = mibBuilder.importSymbols('SPRING-TIDE-NETWORKS-SMI', 'stnSystems', 'stnNotification')
(stn_user_failure_type, stn_config_failure_type) = mibBuilder.importSymbols('SPRING-TIDE-NETWORKS-TC', 'StnUserFailureType', 'StnConfigFailureType')
(stn_engine_cpu, stn_engine_index, stn_engine_slot) = mibBuilder.importSymbols('STN-CHASSIS-MIB', 'stnEngineCpu', 'stnEngineIndex', 'stnEngineSlot')
(stn_router_index,) = mibBuilder.importSymbols('STN-ROUTER-MIB', 'stnRouterIndex')
stn_sessions = module_identity((1, 3, 6, 1, 4, 1, 3551, 2, 5))
if mibBuilder.loadTexts:
stnSessions.setLastUpdated('0002160000Z')
if mibBuilder.loadTexts:
stnSessions.setOrganization('Spring Tide Networks, Inc.')
if mibBuilder.loadTexts:
stnSessions.setContactInfo(' Spring Tide Networks, Inc. Customer Service Postal: 3 Clock Tower Place Maynard, MA 01754 Tel: 1 888-786-4357 Email: stncs@springtidenet.com ')
if mibBuilder.loadTexts:
stnSessions.setDescription('This MIB module describes Spring Tide Networks session objects.')
stn_session_objects = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1))
stn_session_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 2))
stn_session_trap_vars = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 3))
stn_session = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1))
stn_global_session = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 2))
stn_sessions_ppp = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 2))
stn_sessions_l2tp = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 3))
stn_sessions_pptp = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 4))
stn_sessions_ipsec = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 5))
stn_sessions_ike = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 6))
stn_sessions_telnet = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 7))
stn_sessions_ftp = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 8))
stn_sessions_ftp_alg = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 9))
stn_sessions_console = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 10))
stn_sessions_aggregate = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 11))
stn_sessions_encaps = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 12))
stn_sessions_secure_user = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 13))
stn_sessions_remote_config = mib_identifier((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 14))
class Sessionoperstatus(TextualConvention, Integer32):
description = 'Operational status of a session.'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5))
named_values = named_values(('unknown', 1), ('inactive', 2), ('pend-active', 3), ('active', 4), ('pend-inactive', 5))
stn_session_table = mib_table((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 1))
if mibBuilder.loadTexts:
stnSessionTable.setStatus('current')
if mibBuilder.loadTexts:
stnSessionTable.setDescription('A list of session entries.')
stn_session_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 1, 1)).setIndexNames((0, 'STN-SESSION-MIB', 'stnSessionIndex'))
if mibBuilder.loadTexts:
stnSessionEntry.setStatus('current')
if mibBuilder.loadTexts:
stnSessionEntry.setDescription('Entry contains information about a particular session.')
stn_session_index = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 1, 1, 1), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionIndex.setStatus('current')
if mibBuilder.loadTexts:
stnSessionIndex.setDescription('A sequence number that identifies a session entry in the table.')
stn_session_type = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13))).clone(namedValues=named_values(('unknown', 1), ('ppp', 2), ('l2tp-tunnel', 3), ('pptp-tunnel', 4), ('ipsec', 5), ('ike', 6), ('telnet', 7), ('ftp', 8), ('ftp-alg', 9), ('console', 10), ('encaps', 11), ('secure-user', 12), ('remote-config', 13)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionType.setStatus('current')
if mibBuilder.loadTexts:
stnSessionType.setDescription('Indicates the session type.')
stn_session_context = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 1, 1, 3), octet_string().subtype(subtypeSpec=value_size_constraint(0, 256))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionContext.setStatus('current')
if mibBuilder.loadTexts:
stnSessionContext.setDescription('A unique context identifier associated with the session.')
stn_session_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 1, 1, 4), session_oper_status()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionOperStatus.setStatus('current')
if mibBuilder.loadTexts:
stnSessionOperStatus.setDescription('The operational status of the session.')
stn_session_last_change = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 1, 1, 5), time_ticks()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionLastChange.setStatus('current')
if mibBuilder.loadTexts:
stnSessionLastChange.setDescription('The value of sysUpTime at the time the session entered its current operational state.')
stn_session_ppp_total_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 2, 1), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionPppTotalCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionPppTotalCount.setDescription('The total number of PPP sessions since system start.')
stn_session_ppp_failed_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 2, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionPppFailedCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionPppFailedCount.setDescription('The total number of failed sessions since system start.')
stn_session_ppp_current_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 2, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionPppCurrentCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionPppCurrentCount.setDescription('The total number of current PPP sessions.')
stn_session_ppp_current_active_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 2, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionPppCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionPppCurrentActiveCount.setDescription('The total number of current active PPP sessions.')
stn_session_l2tp_tunnel_total_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 3, 1), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionL2tpTunnelTotalCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionL2tpTunnelTotalCount.setDescription('The total number of L2TP tunnel sessions since system start.')
stn_session_l2tp_tunnel_failed_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 3, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionL2tpTunnelFailedCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionL2tpTunnelFailedCount.setDescription('The total number of failed L2TP tunnel sessions since system start.')
stn_session_l2tp_tunnel_current_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 3, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionL2tpTunnelCurrentCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionL2tpTunnelCurrentCount.setDescription('The total number of current L2TP tunnel sessions.')
stn_session_l2tp_tunnel_current_active_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 3, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionL2tpTunnelCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionL2tpTunnelCurrentActiveCount.setDescription('The total number of current active L2TP tunnel sessions.')
stn_session_pptp_tunnel_total_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 4, 1), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionPptpTunnelTotalCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionPptpTunnelTotalCount.setDescription('The total number of PPTP tunnel sessions since system start.')
stn_session_pptp_tunnel_failed_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 4, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionPptpTunnelFailedCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionPptpTunnelFailedCount.setDescription('The total number of failed PPTP tunnel sessions since system start.')
stn_session_pptp_tunnel_current_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 4, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionPptpTunnelCurrentCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionPptpTunnelCurrentCount.setDescription('The total number of current PPTP tunnel sessions.')
stn_session_pptp_tunnel_current_active_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 4, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionPptpTunnelCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionPptpTunnelCurrentActiveCount.setDescription('The total number of current active PPTP tunnel sessions.')
stn_session_ipsec_total_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 5, 1), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionIpsecTotalCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionIpsecTotalCount.setDescription('The total number of IPSEC sessions since system start.')
stn_session_ipsec_failed_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 5, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionIpsecFailedCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionIpsecFailedCount.setDescription('The total number of failed IPSEC sessions since system start.')
stn_session_ipsec_current_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 5, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionIpsecCurrentCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionIpsecCurrentCount.setDescription('The total number of current IPSEC sessions.')
stn_session_ipsec_current_active_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 5, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionIpsecCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionIpsecCurrentActiveCount.setDescription('The total number of current active IPSEC sessions.')
stn_session_ike_total_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 6, 1), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionIkeTotalCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionIkeTotalCount.setDescription('The total number of IKE sessions since system start.')
stn_session_ike_failed_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 6, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionIkeFailedCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionIkeFailedCount.setDescription('The total number of failed IKE sessions since system start.')
stn_session_ike_current_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 6, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionIkeCurrentCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionIkeCurrentCount.setDescription('The total number of current IKE sessions.')
stn_session_ike_current_active_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 6, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionIkeCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionIkeCurrentActiveCount.setDescription('The total number of current active IKE sessions.')
stn_session_telnet_total_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 7, 1), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionTelnetTotalCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionTelnetTotalCount.setDescription('The total number of Telnet sessions since system start.')
stn_session_telnet_failed_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 7, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionTelnetFailedCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionTelnetFailedCount.setDescription('The total number of failed Telnet sessions since system start.')
stn_session_telnet_current_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 7, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionTelnetCurrentCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionTelnetCurrentCount.setDescription('The total number of current Telnet sessions.')
stn_session_telnet_current_active_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 7, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionTelnetCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionTelnetCurrentActiveCount.setDescription('The total number of current active Telnet sessions.')
stn_session_ftp_total_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 8, 1), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionFtpTotalCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionFtpTotalCount.setDescription('The total number of FTP sessions since system start.')
stn_session_ftp_failed_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 8, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionFtpFailedCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionFtpFailedCount.setDescription('The total number of failed FTP sessions since system start.')
stn_session_ftp_current_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 8, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionFtpCurrentCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionFtpCurrentCount.setDescription('The total number of current FTP sessions.')
stn_session_ftp_current_active_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 8, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionFtpCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionFtpCurrentActiveCount.setDescription('The total number of current active FTP sessions.')
stn_session_ftp_alg_total_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 9, 1), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionFtpAlgTotalCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionFtpAlgTotalCount.setDescription('The total number of FTP-ALG sessions since system start.')
stn_session_ftp_alg_failed_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 9, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionFtpAlgFailedCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionFtpAlgFailedCount.setDescription('The total number of failed FTP-ALG sessions since system start.')
stn_session_ftp_alg_current_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 9, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionFtpAlgCurrentCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionFtpAlgCurrentCount.setDescription('The total number of current FTP-ALG sessions.')
stn_session_ftp_alg_current_active_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 9, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionFtpAlgCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionFtpAlgCurrentActiveCount.setDescription('The total number of current active FTP-ALG sessions.')
stn_session_console_total_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 10, 1), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionConsoleTotalCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionConsoleTotalCount.setDescription('The total number of console sessions since system start.')
stn_session_console_failed_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 10, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionConsoleFailedCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionConsoleFailedCount.setDescription('The total number of failed console sessions since system start.')
stn_session_console_current_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 10, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionConsoleCurrentCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionConsoleCurrentCount.setDescription('The total number of current console sessions.')
stn_session_console_current_active_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 10, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionConsoleCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionConsoleCurrentActiveCount.setDescription('The total number of current active console sessions.')
stn_session_aggregate_total_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 11, 1), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionAggregateTotalCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionAggregateTotalCount.setDescription('The total number of sessions since system start.')
stn_session_aggregate_failed_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 11, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionAggregateFailedCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionAggregateFailedCount.setDescription('The total number of failed sessions since system start.')
stn_session_aggregate_current_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 11, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionAggregateCurrentCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionAggregateCurrentCount.setDescription('The total number of current sessions.')
stn_session_aggregate_current_active_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 11, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionAggregateCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionAggregateCurrentActiveCount.setDescription('The total number of current active sessions.')
stn_session_encaps_total_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 12, 1), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionEncapsTotalCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionEncapsTotalCount.setDescription('The total number of encaps sessions since system start.')
stn_session_encaps_failed_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 12, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionEncapsFailedCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionEncapsFailedCount.setDescription('The total number of failed encaps sessions since system start.')
stn_session_encaps_current_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 12, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionEncapsCurrentCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionEncapsCurrentCount.setDescription('The total number of current encaps sessions.')
stn_session_encaps_current_active_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 12, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionEncapsCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionEncapsCurrentActiveCount.setDescription('The total number of current active encaps sessions.')
stn_session_secure_user_total_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 13, 1), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionSecureUserTotalCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionSecureUserTotalCount.setDescription('The total number of secure user sessions since system start.')
stn_session_secure_user_failed_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 13, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionSecureUserFailedCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionSecureUserFailedCount.setDescription('The total number of failed secure user sessions since system start.')
stn_session_secure_user_current_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 13, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionSecureUserCurrentCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionSecureUserCurrentCount.setDescription('The total number of current secure user sessions.')
stn_session_secure_user_current_active_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 13, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionSecureUserCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionSecureUserCurrentActiveCount.setDescription('The total number of current active secure user sessions.')
stn_session_remote_config_total_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 14, 1), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionRemoteConfigTotalCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionRemoteConfigTotalCount.setDescription('The total number of remote config sessions since system start.')
stn_session_remote_config_failed_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 14, 2), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionRemoteConfigFailedCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionRemoteConfigFailedCount.setDescription('The total number of failed remote config sessions since system start.')
stn_session_remote_config_current_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 14, 3), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionRemoteConfigCurrentCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionRemoteConfigCurrentCount.setDescription('The total number of current remote config sessions.')
stn_session_remote_config_current_active_count = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 1, 14, 4), unsigned32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnSessionRemoteConfigCurrentActiveCount.setStatus('current')
if mibBuilder.loadTexts:
stnSessionRemoteConfigCurrentActiveCount.setDescription('The total number of current active remote config sessions.')
stn_global_session_table = mib_table((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 2, 1))
if mibBuilder.loadTexts:
stnGlobalSessionTable.setStatus('current')
if mibBuilder.loadTexts:
stnGlobalSessionTable.setDescription('A list of session entries with the box.')
stn_global_session_entry = mib_table_row((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 2, 1, 1)).setIndexNames((0, 'STN-SESSION-MIB', 'stnGlobalSessionIndex'))
if mibBuilder.loadTexts:
stnGlobalSessionEntry.setStatus('current')
if mibBuilder.loadTexts:
stnGlobalSessionEntry.setDescription('Entry contains information about a particular session.')
stn_global_session_index = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 2, 1, 1, 1), unsigned32())
if mibBuilder.loadTexts:
stnGlobalSessionIndex.setStatus('current')
if mibBuilder.loadTexts:
stnGlobalSessionIndex.setDescription('A sequence number that identifies a session entry in the table.')
stn_global_session_oper_status = mib_table_column((1, 3, 6, 1, 4, 1, 3551, 2, 5, 1, 2, 1, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('inactive', 1), ('active', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
stnGlobalSessionOperStatus.setStatus('current')
if mibBuilder.loadTexts:
stnGlobalSessionOperStatus.setDescription('The operational status of the session.')
stn_notification_username = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 3, 1), display_string()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnNotificationUsername.setStatus('current')
if mibBuilder.loadTexts:
stnNotificationUsername.setDescription("The user's name associated with the trap.")
stn_notification_user_failure_type = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 3, 2), stn_user_failure_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnNotificationUserFailureType.setStatus('current')
if mibBuilder.loadTexts:
stnNotificationUserFailureType.setDescription('The type of user failure.')
stn_notification_config_type = mib_scalar((1, 3, 6, 1, 4, 1, 3551, 2, 5, 3, 3), stn_config_failure_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
stnNotificationConfigType.setStatus('current')
if mibBuilder.loadTexts:
stnNotificationConfigType.setDescription('The type of configuration failure.')
stn_user_failure = notification_type((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 17)).setObjects(('STN-ROUTER-MIB', 'stnRouterIndex'), ('STN-SESSION-MIB', 'stnNotificationUsername'), ('STN-SESSION-MIB', 'stnNotificationUserFailureType'), ('STN-SESSION-MIB', 'stnSessionType'))
if mibBuilder.loadTexts:
stnUserFailure.setStatus('current')
if mibBuilder.loadTexts:
stnUserFailure.setDescription('A stnUserFailure trap signifies that the agent entity has detected that a configuration failure has occurred. The generation of this trap can be controlled by the CommandLineIfaceTraps configuration object.')
stn_config_failure = notification_type((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 18)).setObjects(('STN-ROUTER-MIB', 'stnRouterIndex'), ('STN-SESSION-MIB', 'stnNotificationUsername'), ('STN-SESSION-MIB', 'stnNotificationConfigType'))
if mibBuilder.loadTexts:
stnConfigFailure.setStatus('current')
if mibBuilder.loadTexts:
stnConfigFailure.setDescription('A stnConfigFailure trap signifies that the agent entity has detected that a configuration failure has occurred. The generation of this trap can be controlled by the CommandLineIfaceTraps configuration object.')
stn_no_flow_entries_available = notification_type((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 57)).setObjects(('STN-CHASSIS-MIB', 'stnEngineIndex'), ('STN-CHASSIS-MIB', 'stnEngineSlot'), ('STN-CHASSIS-MIB', 'stnEngineCpu'))
if mibBuilder.loadTexts:
stnNoFlowEntriesAvailable.setStatus('current')
if mibBuilder.loadTexts:
stnNoFlowEntriesAvailable.setDescription('A stnNoFlowEntriesAvailable trap signifies that the agent entity has detected that the there are no more flow entries available on the indicated slot/cpu. This can occur if too many interfaces are assigned to an engine. The generation of this trap can be controlled by the SessionTraps configuration object.')
stn_no_layer_ifs_available = notification_type((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 58)).setObjects(('STN-CHASSIS-MIB', 'stnEngineIndex'), ('STN-CHASSIS-MIB', 'stnEngineSlot'), ('STN-CHASSIS-MIB', 'stnEngineCpu'))
if mibBuilder.loadTexts:
stnNoLayerIfsAvailable.setStatus('current')
if mibBuilder.loadTexts:
stnNoLayerIfsAvailable.setDescription('A stnNoLayerIfsAvailable trap signifies that the agent entity has detected that the there are no more layer interfaces available on the indicated slot/cpu. This can occur if too many VCs are assigned to an engine. The generation of this trap can be controlled by the SessionTraps configuration object.')
stn_max_session_limit_exceeded = notification_type((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 59)).setObjects(('STN-CHASSIS-MIB', 'stnEngineIndex'), ('STN-CHASSIS-MIB', 'stnEngineSlot'), ('STN-CHASSIS-MIB', 'stnEngineCpu'))
if mibBuilder.loadTexts:
stnMaxSessionLimitExceeded.setStatus('current')
if mibBuilder.loadTexts:
stnMaxSessionLimitExceeded.setDescription('A stnMaxSessionLimitExceeded trap signifies that the agent entity has detected that the maximum session limit has occurred on the indicated slot/cpu. The generation of this trap can be controlled by the SessionTraps configuration object.')
stn_tunnel_engine_limit_exceeded = notification_type((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 60)).setObjects(('STN-CHASSIS-MIB', 'stnEngineIndex'), ('STN-CHASSIS-MIB', 'stnEngineSlot'), ('STN-CHASSIS-MIB', 'stnEngineCpu'))
if mibBuilder.loadTexts:
stnTunnelEngineLimitExceeded.setStatus('current')
if mibBuilder.loadTexts:
stnTunnelEngineLimitExceeded.setDescription('A stnTunnelEngineLimitExceeded trap signifies that the agent entity has detected that the maximum tunnel limit has occurred on the indicated slot/cpu. The generation of this trap can be controlled by the SessionTraps configuration object.')
stn_call_engine_limit_exceeded = notification_type((1, 3, 6, 1, 4, 1, 3551, 2, 100, 0, 61)).setObjects(('STN-CHASSIS-MIB', 'stnEngineIndex'), ('STN-CHASSIS-MIB', 'stnEngineSlot'), ('STN-CHASSIS-MIB', 'stnEngineCpu'))
if mibBuilder.loadTexts:
stnCallEngineLimitExceeded.setStatus('current')
if mibBuilder.loadTexts:
stnCallEngineLimitExceeded.setDescription('A stnCallEngineLimitExceeded trap signifies that the agent entity has detected that the maximum call limit has occurred on the indicated slot/cpu. The generation of this trap can be controlled by the SessionTraps configuration object.')
mibBuilder.exportSymbols('STN-SESSION-MIB', stnSessionOperStatus=stnSessionOperStatus, stnSessionPppCurrentCount=stnSessionPppCurrentCount, stnGlobalSessionEntry=stnGlobalSessionEntry, stnSessionsEncaps=stnSessionsEncaps, stnSessionIpsecCurrentActiveCount=stnSessionIpsecCurrentActiveCount, stnSessionTable=stnSessionTable, stnNotificationUserFailureType=stnNotificationUserFailureType, stnSessionAggregateFailedCount=stnSessionAggregateFailedCount, stnMaxSessionLimitExceeded=stnMaxSessionLimitExceeded, stnSessionType=stnSessionType, stnSessionLastChange=stnSessionLastChange, stnSessionTelnetTotalCount=stnSessionTelnetTotalCount, stnSessionPppTotalCount=stnSessionPppTotalCount, stnSessionIkeCurrentActiveCount=stnSessionIkeCurrentActiveCount, stnUserFailure=stnUserFailure, stnSessionsAggregate=stnSessionsAggregate, stnSessionsTelnet=stnSessionsTelnet, stnSessionRemoteConfigTotalCount=stnSessionRemoteConfigTotalCount, stnSessionTrapVars=stnSessionTrapVars, stnSessionsPpp=stnSessionsPpp, stnSessionEncapsCurrentCount=stnSessionEncapsCurrentCount, SessionOperStatus=SessionOperStatus, stnSessionIpsecTotalCount=stnSessionIpsecTotalCount, stnNoFlowEntriesAvailable=stnNoFlowEntriesAvailable, stnSessionFtpAlgFailedCount=stnSessionFtpAlgFailedCount, stnSessionFtpAlgCurrentActiveCount=stnSessionFtpAlgCurrentActiveCount, stnSessionEncapsFailedCount=stnSessionEncapsFailedCount, stnSessionTelnetFailedCount=stnSessionTelnetFailedCount, stnSessionRemoteConfigCurrentActiveCount=stnSessionRemoteConfigCurrentActiveCount, stnSessionPppCurrentActiveCount=stnSessionPppCurrentActiveCount, stnSessionFtpAlgCurrentCount=stnSessionFtpAlgCurrentCount, stnSessionSecureUserCurrentCount=stnSessionSecureUserCurrentCount, stnSessionTelnetCurrentActiveCount=stnSessionTelnetCurrentActiveCount, stnSessionIndex=stnSessionIndex, stnSessionIkeCurrentCount=stnSessionIkeCurrentCount, stnSessionL2tpTunnelTotalCount=stnSessionL2tpTunnelTotalCount, stnSessionFtpAlgTotalCount=stnSessionFtpAlgTotalCount, stnSessionsSecureUser=stnSessionsSecureUser, stnSessionContext=stnSessionContext, stnSession=stnSession, stnConfigFailure=stnConfigFailure, stnSessionL2tpTunnelFailedCount=stnSessionL2tpTunnelFailedCount, stnSessionPptpTunnelCurrentCount=stnSessionPptpTunnelCurrentCount, stnSessionSecureUserCurrentActiveCount=stnSessionSecureUserCurrentActiveCount, stnSessions=stnSessions, stnSessionIkeFailedCount=stnSessionIkeFailedCount, stnSessionIkeTotalCount=stnSessionIkeTotalCount, stnCallEngineLimitExceeded=stnCallEngineLimitExceeded, stnSessionSecureUserTotalCount=stnSessionSecureUserTotalCount, stnSessionEncapsTotalCount=stnSessionEncapsTotalCount, PYSNMP_MODULE_ID=stnSessions, stnSessionConsoleFailedCount=stnSessionConsoleFailedCount, stnSessionRemoteConfigCurrentCount=stnSessionRemoteConfigCurrentCount, stnSessionTelnetCurrentCount=stnSessionTelnetCurrentCount, stnSessionPptpTunnelCurrentActiveCount=stnSessionPptpTunnelCurrentActiveCount, stnSessionRemoteConfigFailedCount=stnSessionRemoteConfigFailedCount, stnSessionAggregateCurrentActiveCount=stnSessionAggregateCurrentActiveCount, stnSessionsPptp=stnSessionsPptp, stnSessionFtpTotalCount=stnSessionFtpTotalCount, stnSessionFtpCurrentCount=stnSessionFtpCurrentCount, stnSessionPptpTunnelFailedCount=stnSessionPptpTunnelFailedCount, stnSessionIpsecFailedCount=stnSessionIpsecFailedCount, stnSessionMibConformance=stnSessionMibConformance, stnSessionIpsecCurrentCount=stnSessionIpsecCurrentCount, stnSessionsL2tp=stnSessionsL2tp, stnSessionPptpTunnelTotalCount=stnSessionPptpTunnelTotalCount, stnSessionsIke=stnSessionsIke, stnSessionConsoleCurrentActiveCount=stnSessionConsoleCurrentActiveCount, stnNoLayerIfsAvailable=stnNoLayerIfsAvailable, stnSessionsIpsec=stnSessionsIpsec, stnSessionFtpFailedCount=stnSessionFtpFailedCount, stnSessionsFtp=stnSessionsFtp, stnSessionsConsole=stnSessionsConsole, stnGlobalSession=stnGlobalSession, stnSessionFtpCurrentActiveCount=stnSessionFtpCurrentActiveCount, stnGlobalSessionOperStatus=stnGlobalSessionOperStatus, stnTunnelEngineLimitExceeded=stnTunnelEngineLimitExceeded, stnSessionsFtpAlg=stnSessionsFtpAlg, stnSessionL2tpTunnelCurrentCount=stnSessionL2tpTunnelCurrentCount, stnSessionAggregateCurrentCount=stnSessionAggregateCurrentCount, stnNotificationConfigType=stnNotificationConfigType, stnSessionConsoleTotalCount=stnSessionConsoleTotalCount, stnNotificationUsername=stnNotificationUsername, stnSessionsRemoteConfig=stnSessionsRemoteConfig, stnSessionObjects=stnSessionObjects, stnSessionEntry=stnSessionEntry, stnSessionL2tpTunnelCurrentActiveCount=stnSessionL2tpTunnelCurrentActiveCount, stnGlobalSessionIndex=stnGlobalSessionIndex, stnSessionAggregateTotalCount=stnSessionAggregateTotalCount, stnSessionPppFailedCount=stnSessionPppFailedCount, stnSessionSecureUserFailedCount=stnSessionSecureUserFailedCount, stnSessionEncapsCurrentActiveCount=stnSessionEncapsCurrentActiveCount, stnGlobalSessionTable=stnGlobalSessionTable, stnSessionConsoleCurrentCount=stnSessionConsoleCurrentCount) |
msg = "No Smoking here"
print(len(msg))
msg.count('o')
msg.count('s',3,5)
msg.count('n')
msg.count('N')
msg.count('O',7)
msg.count('o',7)
msg.count('o',1,7)
msg.count('o',7,15) | msg = 'No Smoking here'
print(len(msg))
msg.count('o')
msg.count('s', 3, 5)
msg.count('n')
msg.count('N')
msg.count('O', 7)
msg.count('o', 7)
msg.count('o', 1, 7)
msg.count('o', 7, 15) |
definition = [
{
"project_name" : "Project1",
"end_points": [
{
"local_development": "http://localhost:8066/",
"local_team_development": "http://192.168.5.217:8066/"
}
],
"api_end_point_partial_path": "api/"
}
]
| definition = [{'project_name': 'Project1', 'end_points': [{'local_development': 'http://localhost:8066/', 'local_team_development': 'http://192.168.5.217:8066/'}], 'api_end_point_partial_path': 'api/'}] |
print('----- range(3) -----')
print(range(3))
for x in range(3): print(x)
print('----- range(3, 10) -----')
print(range(3, 10))
for x in range(3, 10): print(x)
print('----- range(-3) -----')
print(range(-3))
for x in range(-3): print(x)
print('----- range(0,-3) -----')
print(range(0,-3))
for x in range(0,-3): print(x)
print('----- range(-3,0) -----')
print(range(-3,0))
for x in range(-3,0): print(x)
print('----- range(0,-3,-1) -----')
print(range(0,-3,-1))
for x in range(0,-3,-1): print(x)
| print('----- range(3) -----')
print(range(3))
for x in range(3):
print(x)
print('----- range(3, 10) -----')
print(range(3, 10))
for x in range(3, 10):
print(x)
print('----- range(-3) -----')
print(range(-3))
for x in range(-3):
print(x)
print('----- range(0,-3) -----')
print(range(0, -3))
for x in range(0, -3):
print(x)
print('----- range(-3,0) -----')
print(range(-3, 0))
for x in range(-3, 0):
print(x)
print('----- range(0,-3,-1) -----')
print(range(0, -3, -1))
for x in range(0, -3, -1):
print(x) |
# leetcode
class Solution:
def reverse(self, x: int) -> int:
str_x = str(x)
if str_x[:1] == "-":
isNeg = True
str_x = str_x[1:]
else:
isNeg = False
str_x = str_x[::-1]
new_x = int(str_x)
if isNeg:
new_x *= -1
if new_x < 2**31 * -1 or new_x > 2**31:
return 0
else:
return new_x
| class Solution:
def reverse(self, x: int) -> int:
str_x = str(x)
if str_x[:1] == '-':
is_neg = True
str_x = str_x[1:]
else:
is_neg = False
str_x = str_x[::-1]
new_x = int(str_x)
if isNeg:
new_x *= -1
if new_x < 2 ** 31 * -1 or new_x > 2 ** 31:
return 0
else:
return new_x |
n = input()
# Reading first list
list1 = list(map(int, input().split()))
# Reading second list then to set
set1 = set(list(map(int, input().split())))
set2 = set(list(map(int, input().split())))
count = 0
# Looping through elements in
for el in list1:
# checking the element existence Set
if el in set1:
count += 1
elif el in set2:
count -= 1
print(count) | n = input()
list1 = list(map(int, input().split()))
set1 = set(list(map(int, input().split())))
set2 = set(list(map(int, input().split())))
count = 0
for el in list1:
if el in set1:
count += 1
elif el in set2:
count -= 1
print(count) |
pairs = {1: "apple",
"orange": [2,3,5],
True:False,
None:"True",
}
print(pairs.get("orange"))
print(pairs.get(7))
print(pairs.get(12345, "not in dictionary")) | pairs = {1: 'apple', 'orange': [2, 3, 5], True: False, None: 'True'}
print(pairs.get('orange'))
print(pairs.get(7))
print(pairs.get(12345, 'not in dictionary')) |
main = [{'category': 'Transfer Limits',
'field': [{'name': 'tx_transfer_min',
'title': 'Minimum amount a user can transfer per transaction',
'note': 'Default is set to zero.'},
{'name': 'tx_transfer_max_day',
'title': 'Maximum total amount a user can transfer per day',
'note': 'Default is set to unlimited.'},
{'name': 'tx_transfer_max_month',
'title': 'Maximum total amount a user can transfer per month',
'note': 'Default is set to unlimited.'}]},
{'category': 'Withdrawal Limits',
'field': [{'name': 'tx_withdraw_min',
'title': 'Minimum amount a user can withdraw per transaction',
'note': 'Default is set to zero.'},
{'name': 'tx_withdraw_max_day',
'title': 'Maximum total amount a user can withdraw per day',
'note': 'Default is set to unlimited.'},
{'name': 'tx_withdraw_max_month',
'title': 'Maximum total amount a user can withdraw per month',
'note': 'Default is set to unlimited.'}]},
{'category': 'Deposit Limits',
'field': [{'name': 'tx_deposit_min',
'title': 'Minimum amount a user can deposit per transaction',
'note': 'Default is set to zero.'},
{'name': 'tx_deposit_max_day',
'title': 'Maximum amount a user can deposit per day',
'note': 'Default is set to unlimited.'},
{'name': 'tx_deposit_max_month',
'title': 'Maximum amount a user can deposit per month',
'note': 'Default is set to unlimited.'},
]}]
template_list = main
def choice_list():
c = []
for l in main:
for i in l['field']:
c.append([i['name'], i['name']])
t = tuple(tuple(x) for x in c)
return t
| main = [{'category': 'Transfer Limits', 'field': [{'name': 'tx_transfer_min', 'title': 'Minimum amount a user can transfer per transaction', 'note': 'Default is set to zero.'}, {'name': 'tx_transfer_max_day', 'title': 'Maximum total amount a user can transfer per day', 'note': 'Default is set to unlimited.'}, {'name': 'tx_transfer_max_month', 'title': 'Maximum total amount a user can transfer per month', 'note': 'Default is set to unlimited.'}]}, {'category': 'Withdrawal Limits', 'field': [{'name': 'tx_withdraw_min', 'title': 'Minimum amount a user can withdraw per transaction', 'note': 'Default is set to zero.'}, {'name': 'tx_withdraw_max_day', 'title': 'Maximum total amount a user can withdraw per day', 'note': 'Default is set to unlimited.'}, {'name': 'tx_withdraw_max_month', 'title': 'Maximum total amount a user can withdraw per month', 'note': 'Default is set to unlimited.'}]}, {'category': 'Deposit Limits', 'field': [{'name': 'tx_deposit_min', 'title': 'Minimum amount a user can deposit per transaction', 'note': 'Default is set to zero.'}, {'name': 'tx_deposit_max_day', 'title': 'Maximum amount a user can deposit per day', 'note': 'Default is set to unlimited.'}, {'name': 'tx_deposit_max_month', 'title': 'Maximum amount a user can deposit per month', 'note': 'Default is set to unlimited.'}]}]
template_list = main
def choice_list():
c = []
for l in main:
for i in l['field']:
c.append([i['name'], i['name']])
t = tuple((tuple(x) for x in c))
return t |
# Author: Luke Hindman
# Date: Tue Oct 24 13:10:06 MDT 2017
# Description: In-class example for user input and lists
# Create an empty grocery list
groceryList = []
# Shopping list loop
done = False
while done == False:
# Prompt the user for an item to add to the list
item = input("Please enter an item or done when finished: ")
# Check if user is done entering items,
# otherwise add the item to the grocery list
if item.lower() == "done":
done = True
else:
groceryList.append(item)
# Print the grocery list
for g in groceryList:
print ("Don't forget the " + g + "!")
| grocery_list = []
done = False
while done == False:
item = input('Please enter an item or done when finished: ')
if item.lower() == 'done':
done = True
else:
groceryList.append(item)
for g in groceryList:
print("Don't forget the " + g + '!') |
space = [[1 for _ in range(21)] for _ in range(21)]
for x in range(1,21):
for y in range(1,21):
space[x][y] = space[x-1][y] + space[x][y-1]
print(space[20][20])
| space = [[1 for _ in range(21)] for _ in range(21)]
for x in range(1, 21):
for y in range(1, 21):
space[x][y] = space[x - 1][y] + space[x][y - 1]
print(space[20][20]) |
#4.6
def computepay(h,r):
# ( 40 hours * normal rate ) + (( overtime hours ) * time-and-a-half rate)
if(h>40):
p = ( 40 * r ) + (( h - 40 ) * 1.5 * r)
return p
else:
p = h * r
return p
hours = float(input("Enter Hours: "))
rate = float(input("Enter Rate per hour: "))
pay = computepay(hours, rate)
print("Pay", pay) | def computepay(h, r):
if h > 40:
p = 40 * r + (h - 40) * 1.5 * r
return p
else:
p = h * r
return p
hours = float(input('Enter Hours: '))
rate = float(input('Enter Rate per hour: '))
pay = computepay(hours, rate)
print('Pay', pay) |
class CellCountMissingCellsException(Exception):
pass
class UnknownAtlasValue(Exception):
pass
def atlas_value_to_structure_id(atlas_value, structures_reference_df):
line = structures_reference_df[
structures_reference_df["id"] == atlas_value
]
if len(line) == 0:
raise UnknownAtlasValue(atlas_value)
structure_id = line["structure_id_path"].values[0]
return structure_id
def atlas_value_to_name(atlas_value, structures_reference_df):
line = structures_reference_df[
structures_reference_df["id"] == atlas_value
]
if len(line) == 0:
raise UnknownAtlasValue(atlas_value)
name = line["name"]
return str(name.values[0])
| class Cellcountmissingcellsexception(Exception):
pass
class Unknownatlasvalue(Exception):
pass
def atlas_value_to_structure_id(atlas_value, structures_reference_df):
line = structures_reference_df[structures_reference_df['id'] == atlas_value]
if len(line) == 0:
raise unknown_atlas_value(atlas_value)
structure_id = line['structure_id_path'].values[0]
return structure_id
def atlas_value_to_name(atlas_value, structures_reference_df):
line = structures_reference_df[structures_reference_df['id'] == atlas_value]
if len(line) == 0:
raise unknown_atlas_value(atlas_value)
name = line['name']
return str(name.values[0]) |
x = 'abc'
x = "abc"
x = r'abc'
x = 'abc' \
'def'
x = ('abc'
'def')
x = 'ab"c'
x = "ab'c"
x = '''ab'c'''
| x = 'abc'
x = 'abc'
x = 'abc'
x = 'abcdef'
x = 'abcdef'
x = 'ab"c'
x = "ab'c"
x = "ab'c" |
class DefaultConfig (object) :
root_raw_train_data = 'path to be filled' # downloaded training data root
root_raw_eval_data = 'path to be filled' # downloaded evaluation/testing data root
root_dataset_file = './dataset/' # preprocessed dataset root
root_train_volume = './dataset/train/' # preprocessed training dataset root
root_eval_volume = './dataset/eval/' # preprocessed evaluation/testing dataset root
root_exp_file = './exp/' # training exp root
root_submit_file = './submit/' # submit file root
root_pred_dcm = 'path to be filled' # prediction array root
root_pred_save = 'path to be filled' # prediction result root
root_model_param = './params.pkl' # reference model parameter root
use_gpu = True
batch_size = 2
max_epoch = 1
learning_rate = 1e-3
decay_LR = (5, 0.1)
opt = DefaultConfig() | class Defaultconfig(object):
root_raw_train_data = 'path to be filled'
root_raw_eval_data = 'path to be filled'
root_dataset_file = './dataset/'
root_train_volume = './dataset/train/'
root_eval_volume = './dataset/eval/'
root_exp_file = './exp/'
root_submit_file = './submit/'
root_pred_dcm = 'path to be filled'
root_pred_save = 'path to be filled'
root_model_param = './params.pkl'
use_gpu = True
batch_size = 2
max_epoch = 1
learning_rate = 0.001
decay_lr = (5, 0.1)
opt = default_config() |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.