content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
def import_class(path):
"""
Import a class from a dot-delimited module path. Accepts both dot and
colon seperators for the class portion of the path.
ex::
import_class('package.module.ClassName')
or
import_class('package.module:ClassName')
"""
if ':' in path:
module_path, class_name = str(path).split(':')
else:
module_path, class_name = str(path).rsplit('.', 1)
module = __import__(module_path, fromlist=[class_name], level=0)
return getattr(module, class_name)
| def import_class(path):
"""
Import a class from a dot-delimited module path. Accepts both dot and
colon seperators for the class portion of the path.
ex::
import_class('package.module.ClassName')
or
import_class('package.module:ClassName')
"""
if ':' in path:
(module_path, class_name) = str(path).split(':')
else:
(module_path, class_name) = str(path).rsplit('.', 1)
module = __import__(module_path, fromlist=[class_name], level=0)
return getattr(module, class_name) |
answerDict = {
"New York" : "albany",
"California" : "sacramento",
"Alabama" : "montgomery",
"Ohio": "columbus",
"Utah": "salt lake city"
}
def checkAnswer(answer):
resultsDict = {}
for k,v in answer.items():
if answerDict[k] == v:
resultsDict[k] = True
else:
resultsDict[k] = False
return resultsDict
#print(checkAnswer({"New York": "albany","Utah": "salt lake city"})) | answer_dict = {'New York': 'albany', 'California': 'sacramento', 'Alabama': 'montgomery', 'Ohio': 'columbus', 'Utah': 'salt lake city'}
def check_answer(answer):
results_dict = {}
for (k, v) in answer.items():
if answerDict[k] == v:
resultsDict[k] = True
else:
resultsDict[k] = False
return resultsDict |
# this will create a 60 GB dummy asset file for testing the upload via
# the admin GUI.
LARGE_FILE_SIZE = 60 * 1024**3 # this is 60 GB
with open("xxxxxxl_asset_file.zip", "wb") as dummy_file:
dummy_file.seek(int(LARGE_FILE_SIZE) - 1)
dummy_file.write(b"\0")
| large_file_size = 60 * 1024 ** 3
with open('xxxxxxl_asset_file.zip', 'wb') as dummy_file:
dummy_file.seek(int(LARGE_FILE_SIZE) - 1)
dummy_file.write(b'\x00') |
class Solution:
def calculate(self, s: str) -> int:
stack = []
zero = ord('0')
operand = 0
res = 0
sign = 1
for ch in s:
if ch.isdigit():
operand = operand * 10 + ord(ch) - zero
elif ch == '+':
res += sign * operand
sign = 1
operand = 0
elif ch == '-':
res += sign * operand
sign = -1
operand = 0
elif ch == '(':
stack.append((sign, res))
sign = 1
res = 0
elif ch == ')':
prev_sign, prev_res = stack.pop()
res = prev_sign * (res + sign * operand) + prev_res
operand = 0
return res + sign * operand
| class Solution:
def calculate(self, s: str) -> int:
stack = []
zero = ord('0')
operand = 0
res = 0
sign = 1
for ch in s:
if ch.isdigit():
operand = operand * 10 + ord(ch) - zero
elif ch == '+':
res += sign * operand
sign = 1
operand = 0
elif ch == '-':
res += sign * operand
sign = -1
operand = 0
elif ch == '(':
stack.append((sign, res))
sign = 1
res = 0
elif ch == ')':
(prev_sign, prev_res) = stack.pop()
res = prev_sign * (res + sign * operand) + prev_res
operand = 0
return res + sign * operand |
"""Assorted class utilities and tools"""
class AttrDisplay:
def __repr__(self):
"""
Get representation object.
Returns
-------
str
Object representation.
"""
return "{}".format({key: value for key, value in self.__dict__.items() if not key.startswith('_') and value is not None})
if __name__ == "__main__":
pass
| """Assorted class utilities and tools"""
class Attrdisplay:
def __repr__(self):
"""
Get representation object.
Returns
-------
str
Object representation.
"""
return '{}'.format({key: value for (key, value) in self.__dict__.items() if not key.startswith('_') and value is not None})
if __name__ == '__main__':
pass |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Requires python 3.6+
#######################################################################################################################
# Global variables
# Can be reassigned by the settings from the configuration file
#######################################################################################################################
CONFIG_PATH = 'gitmon.conf' # main configuration file
DATA_PATH = 'data.json' # where to save data
UPDATE_INTERVAL = 0 # data check interval in minutes. '0' == one time only
GITHUB_BASE_URL = 'https://api.github.com/repos' # github base url
APP_LOGS_TYPE = 'console' # app logs type: none, file, console
APP_LOGS_FILE = 'gitmon.log' # app logs file
LOGGER = None # logger object. See setup.setup_log()
OPTIONS = {} # options, loaded from configuration file
| config_path = 'gitmon.conf'
data_path = 'data.json'
update_interval = 0
github_base_url = 'https://api.github.com/repos'
app_logs_type = 'console'
app_logs_file = 'gitmon.log'
logger = None
options = {} |
def swap(i, j, arr):
temp = arr[i]
arr[i] = arr[j]
arr[j] = temp
def quicksort(arr, low, high):
if(low < high):
p = partition(arr, low, high);
quicksort(arr, low, p-1);
quicksort(arr, p+1, high);
def partition(arr, low, high):
pivot = arr[low]
i = low
j = high
while(i < j):
while(arr[i] <= pivot and i < high):
i += 1
while(arr[j] > pivot):
j -= 1
if i < j:
swap(i, j, arr)
swap(low, j, arr)
return j
arr = [65, 70, 75, 80, 85, 60, 55, 50, 45]
quicksort(arr, 0, len(arr)-1)
print(arr)
| def swap(i, j, arr):
temp = arr[i]
arr[i] = arr[j]
arr[j] = temp
def quicksort(arr, low, high):
if low < high:
p = partition(arr, low, high)
quicksort(arr, low, p - 1)
quicksort(arr, p + 1, high)
def partition(arr, low, high):
pivot = arr[low]
i = low
j = high
while i < j:
while arr[i] <= pivot and i < high:
i += 1
while arr[j] > pivot:
j -= 1
if i < j:
swap(i, j, arr)
swap(low, j, arr)
return j
arr = [65, 70, 75, 80, 85, 60, 55, 50, 45]
quicksort(arr, 0, len(arr) - 1)
print(arr) |
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'} |
class EDGARQueryError(Exception):
"""
This error is thrown when a query receives a response that is not a 200 response.
"""
def __str__(self):
return "An error occured while making the query."
class EDGARFieldError(Exception):
"""
This error is thrown when an invalid field is given to an endpoint.
"""
def __init__(self, endpoint, field):
self.endpoint = endpoint
self.field = field
def __str__(self):
return "Field {field} not found in endpoint {endpoint}".format(
field=self.field, endpoint=self.endpoint
)
class CIKError(Exception):
"""
This error is thrown when an invalid CIK is given.
"""
def __init__(self, cik):
self.cik = cik
def __str__(self):
return "CIK {cik} not valid.".format(cik=self.cik)
class FilingTypeError(Exception):
"""This error is thrown when an invalid filing type is given. """
def __str__(self):
return "The filing type given is not valid. " \
"Filing type must be in valid filing type from FilingType class"
| class Edgarqueryerror(Exception):
"""
This error is thrown when a query receives a response that is not a 200 response.
"""
def __str__(self):
return 'An error occured while making the query.'
class Edgarfielderror(Exception):
"""
This error is thrown when an invalid field is given to an endpoint.
"""
def __init__(self, endpoint, field):
self.endpoint = endpoint
self.field = field
def __str__(self):
return 'Field {field} not found in endpoint {endpoint}'.format(field=self.field, endpoint=self.endpoint)
class Cikerror(Exception):
"""
This error is thrown when an invalid CIK is given.
"""
def __init__(self, cik):
self.cik = cik
def __str__(self):
return 'CIK {cik} not valid.'.format(cik=self.cik)
class Filingtypeerror(Exception):
"""This error is thrown when an invalid filing type is given. """
def __str__(self):
return 'The filing type given is not valid. Filing type must be in valid filing type from FilingType class' |
#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) |
# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def isSymmetric(self, root):
"""
:type root: TreeNode
:rtype: bool
"""
queue = []
queue.append(root)
queueFront, queueBack = 1, 0
while queueBack < queueFront:
increase = 0
while queueBack < queueFront:
node = queue[queueBack]
queueBack += 1
if node:
queue.append(node.left)
queue.append(node.right)
increase += 2
queueFront += increase
for index in range((queueFront-queueBack)/2):
first, last = queue[queueBack+index], queue[queueFront-index-1]
if (first and last and first.val != last.val) or ((not first) ^ (not last)):
return False
return True | class Solution(object):
def is_symmetric(self, root):
"""
:type root: TreeNode
:rtype: bool
"""
queue = []
queue.append(root)
(queue_front, queue_back) = (1, 0)
while queueBack < queueFront:
increase = 0
while queueBack < queueFront:
node = queue[queueBack]
queue_back += 1
if node:
queue.append(node.left)
queue.append(node.right)
increase += 2
queue_front += increase
for index in range((queueFront - queueBack) / 2):
(first, last) = (queue[queueBack + index], queue[queueFront - index - 1])
if first and last and (first.val != last.val) or (not first) ^ (not last):
return False
return True |
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') |
# -*- coding: utf-8 -*-
"""Collection of useful http error for the Api"""
class GKJsonApiException(Exception):
"""Base exception class for unknown errors"""
title = 'Unknown error'
status = '500'
source = None
def __init__(self, detail, source=None, title=None, status=None, code=None, id_=None, links=None, meta=None):
"""Initialize a jsonapi exception
:param dict source: the source of the error
:param str detail: the detail of the error
"""
self.detail = detail
self.source = source
self.code = code
self.id = id_
self.links = links or {}
self.meta = meta or {}
if title is not None:
self.title = title
if status is not None:
self.status = status
def to_dict(self):
"""Return values of each fields of an jsonapi error"""
error_dict = {}
for field in ('status', 'source', 'title', 'detail', 'id', 'code', 'links', 'meta'):
if getattr(self, field, None):
error_dict.update({field: getattr(self, field)})
return error_dict
class GKUnprocessableEntity(GKJsonApiException):
title = "Unprocessable Entity"
status = '422'
| """Collection of useful http error for the Api"""
class Gkjsonapiexception(Exception):
"""Base exception class for unknown errors"""
title = 'Unknown error'
status = '500'
source = None
def __init__(self, detail, source=None, title=None, status=None, code=None, id_=None, links=None, meta=None):
"""Initialize a jsonapi exception
:param dict source: the source of the error
:param str detail: the detail of the error
"""
self.detail = detail
self.source = source
self.code = code
self.id = id_
self.links = links or {}
self.meta = meta or {}
if title is not None:
self.title = title
if status is not None:
self.status = status
def to_dict(self):
"""Return values of each fields of an jsonapi error"""
error_dict = {}
for field in ('status', 'source', 'title', 'detail', 'id', 'code', 'links', 'meta'):
if getattr(self, field, None):
error_dict.update({field: getattr(self, field)})
return error_dict
class Gkunprocessableentity(GKJsonApiException):
title = 'Unprocessable Entity'
status = '422' |
# 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 |
"""HTML related constants.
"""
SCRIPT_START_TAG: str = '<script type="text/javascript">'
SCRIPT_END_TAG: str = '</script>'
| """HTML related constants.
"""
script_start_tag: str = '<script type="text/javascript">'
script_end_tag: str = '</script>' |
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) |
#!/usr/bin/python2.7
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
A collection of Web browser user agent strings.
Culled from actual apache log file.
"""
# The key value is a simplified name you use in scripts. The value is the
# actual user agent string.
USER_AGENTS = {
'atw_crawl': 'FAST-WebCrawler/3.6 (atw-crawler at fast dot no; http://fast.no/support/crawler.asp)',
'becomebot': 'Mozilla/5.0 (compatible; BecomeBot/3.0; MSIE 6.0 compatible; +http://www.become.com/site_owners.html)',
'cern': 'CERN-LineMode/2.15 libwww/2.17b3',
'chrome_mac': "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_5; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 Safari/534.10",
'dfind': 'DFind',
'epiphany16': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060418 Epiphany/1.6.1 (Ubuntu) (Ubuntu package 1.0.8)',
'firefox10_fed': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060202 Fedora/1.0.7-1.2.fc4 Firefox/1.0.7',
'firefox10_ldeb': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20060424 Firefox/1.0.4 (Debian package 1.0.4-2sarge6)',
'firefox10_lmand': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050921 Firefox/1.0.7 Mandriva/1.0.6-15mdk (2006.0)',
'firefox10_w_de': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.10) Gecko/20050717 Firefox/1.0.6',
'firefox10_w': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7',
'firefox15_ldeb': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.3) Gecko/20060326 Firefox/1.5.0.3 (Debian-1.5.dfsg+1.5.0.3-2)',
'firefox15_l': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2',
'firefox15_lpango': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.2) Gecko/20060419 Fedora/1.5.0.2-1.2.fc5 Firefox/1.5.0.2 pango-text',
'firefox15_w_fr': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3',
'firefox15_w_gb': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3',
'firefox15_w_goog': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3; Google-TR-3) Gecko/20060426 Firefox/1.5.0.3',
'firefox15_w_it': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3',
'firefox15_w': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3',
'firefox15_w_ru': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3',
'firefox_36_64': "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101203 Gentoo Firefox/3.6.12",
'galeon1': 'Mozilla/5.0 Galeon/1.2.1 (X11; Linux i686; U;) Gecko/0',
'gecko': 'TinyBrowser/2.0 (TinyBrowser Comment) Gecko/20201231',
'gigabot': 'Gigabot/2.0; http://www.gigablast.com/spider.html',
'googlebot': 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)',
'jeeves': 'Mozilla/2.0 (compatible; Ask Jeeves/Teoma; +http://sp.ask.com/docs/about/tech_crawling.html)',
'konqueror1': 'Mozilla/5.0 (compatible; Konqueror/3.0; i686 Linux; 20020919)',
'konqueror2': 'Mozilla/5.0 (compatible; Konqueror/3.1-rc4; i686 Linux; 20020504)',
'konqueror3': 'Mozilla/5.0 (compatible; Konqueror/3.5; Linux; i686; en_US) KHTML/3.5.2 (like Gecko) (Debian)',
'konqueror': 'Mozilla/5.0 (compatible; Konqueror/3.0.0-10; Linux)',
'links': 'Links (2.0; Linux 2.4.18-6mdkenterprise i686; 80x36)',
'lwp': 'lwp-trivial/1.41',
'lynx': 'Lynx/2.8.5dev.3 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6c',
'motorola': 'MOT-V600/0B.09.3AR MIB/2.2 Profile/MIDP-2.0 Configuration/CLDC-1.0',
'mozilla10': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0) Gecko/00200203',
'mozilla5_irix': 'Mozilla/5.25 Netscape/5.0 (X11; U; IRIX 6.3 IP32)',
'mozilla5': 'Mozilla/5.0',
'mozilla5_w': 'Mozilla/5.001 (windows; U; NT4.0; en-us) Gecko/25250101',
'mozilla9': 'Mozilla/9.876 (X11; U; Linux 2.2.12-20 i686, en) Gecko/25250101 Netscape/5.432b1 (C-MindSpring)',
'mozilla_mac': 'Mozilla/4.72 (Macintosh; I; PPC)',
'mozilla_w_de': 'Mozilla/5.0 (Windows; U; Win 9x 4.90; de-AT; rv:1.7.8) Gecko/20050511',
'mscontrol': 'Microsoft URL Control - 6.00.8862',
'msie4_w95': 'Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)',
'msie501_nt': 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)',
'msie501_w98': 'Mozilla/4.0 (compatible; MSIE 5.01; Windows 98)',
'msie50_nt': 'Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 5.0)',
'msie50_w98': 'Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)',
'msie51_mac': 'Mozilla/4.0 (compatible; MSIE 5.14; Mac_PowerPC)',
'msie55_nt': 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461)',
'msie5_w2k': 'Mozilla/5.0 (compatible; MSIE 5.01; Win2000)',
'msie6_2': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312469)',
'msie6_98': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)',
'msie6': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)',
'msie6_net2_sp1': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)',
'msie6_net_infopath': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; .NET CLR 1.1.4322; InfoPath.1)',
'msie6_net': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727)',
'msie6_net_mp': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MathPlayer 2.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)',
'msie6_net_sp1_2': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50215)',
'msie6_net_sp1_maxthon': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.1.4322)',
'msie6_net_sp1': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)',
'msie6_net_sp1_naver': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Naver Desktop Search)',
'msie6_net_ypc2': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.2.0; FunWebProducts; .NET CLR 1.0.3705; yplus 5.1.02b)',
'msie6_net_ypc': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.2.0; FunWebProducts; .NET CLR 1.0.3705)',
'msie6_nt': 'Mozilla/4.0 (compatible; MSIE 6.01; Windows NT 5.0)',
'msie6_sp1': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)',
'msie6_w98_crazy': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Crazy Browser 1.0.5)',
'msie6_w98': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90)',
'msnbot': 'msnbot/1.0 (+http://search.msn.com/msnbot.htm)',
'mz5mac_ja': 'Mozilla/5.001 (Macintosh; N; PPC; ja) Gecko/25250101 MegaCorpBrowser/1.0 (MegaCorp, Inc.)',
'netscape4_en': 'Mozilla/4.76 [en] (X11; U; Linux 2.4.17 i686)',
'netscape6_w': 'Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; VaioUSSum01) Gecko/20010131 Netscape6/6.01',
'netscape8_w': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20060127 Netscape/8.1',
'nextgen1': 'NextGenSearchBot 1 (for information visit http://www.zoominfo.com/NextGenSearchBot)',
'opera6_l': 'Opera/6.0 (Linux 2.4.18-6mdk i686; U) [en]',
'opera6_w': 'Opera/6.04 (Windows XP; U) [en]',
'opera7_w': 'Opera/7.0 (Windows NT 5.1; U) [en]',
'python': 'Python/2.4 (X11; U; Linux i686; en-US)',
'safari_intel': 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/418 (KHTML, like Gecko) Safari/417.9.3',
'safari_ppc': 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/418 (KHTML, like Gecko) Safari/417.9.2',
'slurp': 'Mozilla/3.0 (Slurp/si; slurp@inktomi.com; http://www.inktomi.com/slurp.html)',
'slysearch': 'SlySearch/1.3 (http://www.slysearch.com)',
'surveybot': 'SurveyBot/2.3 (Whois Source)',
'syntryx': 'Syntryx ANT Scout Chassis Pheromone; Mozilla/4.0 compatible crawler',
'wget_rh': 'Wget/1.10.2 (Red Hat modified)',
'wget': 'Wget/1.10.2',
'yahoo': 'Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)',
'zyborg': 'Mozilla/4.0 compatible ZyBorg/1.0 Dead Link Checker (wn.dlc@looksmart.net; http://www.WISEnutbot.com)',
}
def get_useragents():
"""Return a list of possible user-agent keywords."""
return sorted(USER_AGENTS.keys())
| """
A collection of Web browser user agent strings.
Culled from actual apache log file.
"""
user_agents = {'atw_crawl': 'FAST-WebCrawler/3.6 (atw-crawler at fast dot no; http://fast.no/support/crawler.asp)', 'becomebot': 'Mozilla/5.0 (compatible; BecomeBot/3.0; MSIE 6.0 compatible; +http://www.become.com/site_owners.html)', 'cern': 'CERN-LineMode/2.15 libwww/2.17b3', 'chrome_mac': 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_5; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 Safari/534.10', 'dfind': 'DFind', 'epiphany16': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060418 Epiphany/1.6.1 (Ubuntu) (Ubuntu package 1.0.8)', 'firefox10_fed': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060202 Fedora/1.0.7-1.2.fc4 Firefox/1.0.7', 'firefox10_ldeb': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20060424 Firefox/1.0.4 (Debian package 1.0.4-2sarge6)', 'firefox10_lmand': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050921 Firefox/1.0.7 Mandriva/1.0.6-15mdk (2006.0)', 'firefox10_w_de': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.10) Gecko/20050717 Firefox/1.0.6', 'firefox10_w': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7', 'firefox15_ldeb': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.3) Gecko/20060326 Firefox/1.5.0.3 (Debian-1.5.dfsg+1.5.0.3-2)', 'firefox15_l': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2', 'firefox15_lpango': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.2) Gecko/20060419 Fedora/1.5.0.2-1.2.fc5 Firefox/1.5.0.2 pango-text', 'firefox15_w_fr': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3', 'firefox15_w_gb': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3', 'firefox15_w_goog': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3; Google-TR-3) Gecko/20060426 Firefox/1.5.0.3', 'firefox15_w_it': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3', 'firefox15_w': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3', 'firefox15_w_ru': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3', 'firefox_36_64': 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101203 Gentoo Firefox/3.6.12', 'galeon1': 'Mozilla/5.0 Galeon/1.2.1 (X11; Linux i686; U;) Gecko/0', 'gecko': 'TinyBrowser/2.0 (TinyBrowser Comment) Gecko/20201231', 'gigabot': 'Gigabot/2.0; http://www.gigablast.com/spider.html', 'googlebot': 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)', 'jeeves': 'Mozilla/2.0 (compatible; Ask Jeeves/Teoma; +http://sp.ask.com/docs/about/tech_crawling.html)', 'konqueror1': 'Mozilla/5.0 (compatible; Konqueror/3.0; i686 Linux; 20020919)', 'konqueror2': 'Mozilla/5.0 (compatible; Konqueror/3.1-rc4; i686 Linux; 20020504)', 'konqueror3': 'Mozilla/5.0 (compatible; Konqueror/3.5; Linux; i686; en_US) KHTML/3.5.2 (like Gecko) (Debian)', 'konqueror': 'Mozilla/5.0 (compatible; Konqueror/3.0.0-10; Linux)', 'links': 'Links (2.0; Linux 2.4.18-6mdkenterprise i686; 80x36)', 'lwp': 'lwp-trivial/1.41', 'lynx': 'Lynx/2.8.5dev.3 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6c', 'motorola': 'MOT-V600/0B.09.3AR MIB/2.2 Profile/MIDP-2.0 Configuration/CLDC-1.0', 'mozilla10': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0) Gecko/00200203', 'mozilla5_irix': 'Mozilla/5.25 Netscape/5.0 (X11; U; IRIX 6.3 IP32)', 'mozilla5': 'Mozilla/5.0', 'mozilla5_w': 'Mozilla/5.001 (windows; U; NT4.0; en-us) Gecko/25250101', 'mozilla9': 'Mozilla/9.876 (X11; U; Linux 2.2.12-20 i686, en) Gecko/25250101 Netscape/5.432b1 (C-MindSpring)', 'mozilla_mac': 'Mozilla/4.72 (Macintosh; I; PPC)', 'mozilla_w_de': 'Mozilla/5.0 (Windows; U; Win 9x 4.90; de-AT; rv:1.7.8) Gecko/20050511', 'mscontrol': 'Microsoft URL Control - 6.00.8862', 'msie4_w95': 'Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)', 'msie501_nt': 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)', 'msie501_w98': 'Mozilla/4.0 (compatible; MSIE 5.01; Windows 98)', 'msie50_nt': 'Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 5.0)', 'msie50_w98': 'Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)', 'msie51_mac': 'Mozilla/4.0 (compatible; MSIE 5.14; Mac_PowerPC)', 'msie55_nt': 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461)', 'msie5_w2k': 'Mozilla/5.0 (compatible; MSIE 5.01; Win2000)', 'msie6_2': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312469)', 'msie6_98': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)', 'msie6': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)', 'msie6_net2_sp1': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)', 'msie6_net_infopath': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; .NET CLR 1.1.4322; InfoPath.1)', 'msie6_net': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727)', 'msie6_net_mp': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MathPlayer 2.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)', 'msie6_net_sp1_2': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50215)', 'msie6_net_sp1_maxthon': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.1.4322)', 'msie6_net_sp1': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)', 'msie6_net_sp1_naver': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Naver Desktop Search)', 'msie6_net_ypc2': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.2.0; FunWebProducts; .NET CLR 1.0.3705; yplus 5.1.02b)', 'msie6_net_ypc': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.2.0; FunWebProducts; .NET CLR 1.0.3705)', 'msie6_nt': 'Mozilla/4.0 (compatible; MSIE 6.01; Windows NT 5.0)', 'msie6_sp1': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)', 'msie6_w98_crazy': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Crazy Browser 1.0.5)', 'msie6_w98': 'Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90)', 'msnbot': 'msnbot/1.0 (+http://search.msn.com/msnbot.htm)', 'mz5mac_ja': 'Mozilla/5.001 (Macintosh; N; PPC; ja) Gecko/25250101 MegaCorpBrowser/1.0 (MegaCorp, Inc.)', 'netscape4_en': 'Mozilla/4.76 [en] (X11; U; Linux 2.4.17 i686)', 'netscape6_w': 'Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; VaioUSSum01) Gecko/20010131 Netscape6/6.01', 'netscape8_w': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20060127 Netscape/8.1', 'nextgen1': 'NextGenSearchBot 1 (for information visit http://www.zoominfo.com/NextGenSearchBot)', 'opera6_l': 'Opera/6.0 (Linux 2.4.18-6mdk i686; U) [en]', 'opera6_w': 'Opera/6.04 (Windows XP; U) [en]', 'opera7_w': 'Opera/7.0 (Windows NT 5.1; U) [en]', 'python': 'Python/2.4 (X11; U; Linux i686; en-US)', 'safari_intel': 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/418 (KHTML, like Gecko) Safari/417.9.3', 'safari_ppc': 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/418 (KHTML, like Gecko) Safari/417.9.2', 'slurp': 'Mozilla/3.0 (Slurp/si; slurp@inktomi.com; http://www.inktomi.com/slurp.html)', 'slysearch': 'SlySearch/1.3 (http://www.slysearch.com)', 'surveybot': 'SurveyBot/2.3 (Whois Source)', 'syntryx': 'Syntryx ANT Scout Chassis Pheromone; Mozilla/4.0 compatible crawler', 'wget_rh': 'Wget/1.10.2 (Red Hat modified)', 'wget': 'Wget/1.10.2', 'yahoo': 'Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp)', 'zyborg': 'Mozilla/4.0 compatible ZyBorg/1.0 Dead Link Checker (wn.dlc@looksmart.net; http://www.WISEnutbot.com)'}
def get_useragents():
"""Return a list of possible user-agent keywords."""
return sorted(USER_AGENTS.keys()) |
#
# 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 |
# -*- coding: utf-8 -*-
"""
Time penalties for Digiroad 2.0.
Created on Thu Apr 26 13:50:03 2018
@author: Henrikki Tenkanen
"""
penalties = {
# Rush hour penalties for different road types ('rt')
'r': {
'rt12' : 12.195 / 60,
'rt3' : 11.199 / 60,
'rt456': 10.633 / 60,
'median': 2.022762
},
# Midday penalties for different road types ('rt')
'm': {
'rt12' : 9.979 / 60,
'rt3' : 6.650 / 60,
'rt456': 7.752 / 60,
'median': 1.667750
},
# Average penalties for different road types ('rt')
'avg': {
'rt12' : 11.311 / 60,
'rt3' : 9.439 / 60,
'rt456': 9.362 / 60,
'median': 1.884662
},
} | """
Time penalties for Digiroad 2.0.
Created on Thu Apr 26 13:50:03 2018
@author: Henrikki Tenkanen
"""
penalties = {'r': {'rt12': 12.195 / 60, 'rt3': 11.199 / 60, 'rt456': 10.633 / 60, 'median': 2.022762}, 'm': {'rt12': 9.979 / 60, 'rt3': 6.65 / 60, 'rt456': 7.752 / 60, 'median': 1.66775}, 'avg': {'rt12': 11.311 / 60, 'rt3': 9.439 / 60, 'rt456': 9.362 / 60, 'median': 1.884662}} |
# 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))) |
# Test for breakage in the co_lnotab decoder
locals()
dict
def foo():
locals()
"""
"""
locals()
| locals()
dict
def foo():
locals()
'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n '
locals() |
"""
General config file for Bot Server
"""
token = '<YOUR-BOT-TOKEN>'
telegram_base_url = 'https://api.telegram.org/bot{}/'
timeout = 100
model_download_url = '<MODEL-DOWNLOAD-URL>'
model_zip = 'pipeline_models.zip'
model_folder = '/pipeline_models'
CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
CELERY_BROKER_URL = 'redis://localhost:6379/0'
| """
General config file for Bot Server
"""
token = '<YOUR-BOT-TOKEN>'
telegram_base_url = 'https://api.telegram.org/bot{}/'
timeout = 100
model_download_url = '<MODEL-DOWNLOAD-URL>'
model_zip = 'pipeline_models.zip'
model_folder = '/pipeline_models'
celery_result_backend = 'redis://localhost:6379/0'
celery_broker_url = 'redis://localhost:6379/0' |
'''
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() |
EXPECTED_TABULATED_HTML = """
<table>
<thead>
<tr>
<th>category</th>
<th>date</th>
<th>downloads</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">2.6</td>
<td align="left">2018-08-15</td>
<td align="right">51</td>
</tr>
<tr>
<td align="left">2.7</td>
<td align="left">2018-08-15</td>
<td align="right">63,749</td>
</tr>
<tr>
<td align="left">3.2</td>
<td align="left">2018-08-15</td>
<td align="right">2</td>
</tr>
<tr>
<td align="left">3.3</td>
<td align="left">2018-08-15</td>
<td align="right">40</td>
</tr>
<tr>
<td align="left">3.4</td>
<td align="left">2018-08-15</td>
<td align="right">6,095</td>
</tr>
<tr>
<td align="left">3.5</td>
<td align="left">2018-08-15</td>
<td align="right">20,358</td>
</tr>
<tr>
<td align="left">3.6</td>
<td align="left">2018-08-15</td>
<td align="right">35,274</td>
</tr>
<tr>
<td align="left">3.7</td>
<td align="left">2018-08-15</td>
<td align="right">6,595</td>
</tr>
<tr>
<td align="left">3.8</td>
<td align="left">2018-08-15</td>
<td align="right">3</td>
</tr>
<tr>
<td align="left">null</td>
<td align="left">2018-08-15</td>
<td align="right">1,019</td>
</tr>
</tbody>
</table>
"""
EXPECTED_TABULATED_MD = """
| category | date | downloads |
| -------- | ---------- | --------: |
| 2.6 | 2018-08-15 | 51 |
| 2.7 | 2018-08-15 | 63,749 |
| 3.2 | 2018-08-15 | 2 |
| 3.3 | 2018-08-15 | 40 |
| 3.4 | 2018-08-15 | 6,095 |
| 3.5 | 2018-08-15 | 20,358 |
| 3.6 | 2018-08-15 | 35,274 |
| 3.7 | 2018-08-15 | 6,595 |
| 3.8 | 2018-08-15 | 3 |
| null | 2018-08-15 | 1,019 |
"""
EXPECTED_TABULATED_RST = """
.. table::
========== ============ ===========
category date downloads
========== ============ ===========
2.6 2018-08-15 51
2.7 2018-08-15 63,749
3.2 2018-08-15 2
3.3 2018-08-15 40
3.4 2018-08-15 6,095
3.5 2018-08-15 20,358
3.6 2018-08-15 35,274
3.7 2018-08-15 6,595
3.8 2018-08-15 3
null 2018-08-15 1,019
========== ============ ===========
""" # noqa: W291
EXPECTED_TABULATED_TSV = """
"category"\t"date"\t"downloads"
"2.6"\t"2018-08-15"\t51
"2.7"\t"2018-08-15"\t63,749
"3.2"\t"2018-08-15"\t2
"3.3"\t"2018-08-15"\t40
"3.4"\t"2018-08-15"\t6,095
"3.5"\t"2018-08-15"\t20,358
"3.6"\t"2018-08-15"\t35,274
"3.7"\t"2018-08-15"\t6,595
"3.8"\t"2018-08-15"\t3
"null"\t"2018-08-15"\t1,019
""" # noqa: W291
| expected_tabulated_html = '\n<table>\n <thead>\n <tr>\n <th>category</th>\n <th>date</th>\n <th>downloads</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td align="left">2.6</td>\n <td align="left">2018-08-15</td>\n <td align="right">51</td>\n </tr>\n <tr>\n <td align="left">2.7</td>\n <td align="left">2018-08-15</td>\n <td align="right">63,749</td>\n </tr>\n <tr>\n <td align="left">3.2</td>\n <td align="left">2018-08-15</td>\n <td align="right">2</td>\n </tr>\n <tr>\n <td align="left">3.3</td>\n <td align="left">2018-08-15</td>\n <td align="right">40</td>\n </tr>\n <tr>\n <td align="left">3.4</td>\n <td align="left">2018-08-15</td>\n <td align="right">6,095</td>\n </tr>\n <tr>\n <td align="left">3.5</td>\n <td align="left">2018-08-15</td>\n <td align="right">20,358</td>\n </tr>\n <tr>\n <td align="left">3.6</td>\n <td align="left">2018-08-15</td>\n <td align="right">35,274</td>\n </tr>\n <tr>\n <td align="left">3.7</td>\n <td align="left">2018-08-15</td>\n <td align="right">6,595</td>\n </tr>\n <tr>\n <td align="left">3.8</td>\n <td align="left">2018-08-15</td>\n <td align="right">3</td>\n </tr>\n <tr>\n <td align="left">null</td>\n <td align="left">2018-08-15</td>\n <td align="right">1,019</td>\n </tr>\n </tbody>\n</table>\n '
expected_tabulated_md = '\n| category | date | downloads |\n| -------- | ---------- | --------: |\n| 2.6 | 2018-08-15 | 51 |\n| 2.7 | 2018-08-15 | 63,749 |\n| 3.2 | 2018-08-15 | 2 |\n| 3.3 | 2018-08-15 | 40 |\n| 3.4 | 2018-08-15 | 6,095 |\n| 3.5 | 2018-08-15 | 20,358 |\n| 3.6 | 2018-08-15 | 35,274 |\n| 3.7 | 2018-08-15 | 6,595 |\n| 3.8 | 2018-08-15 | 3 |\n| null | 2018-08-15 | 1,019 |\n'
expected_tabulated_rst = '\n.. table::\n\n ========== ============ ===========\n category date downloads \n ========== ============ ===========\n 2.6 2018-08-15 51 \n 2.7 2018-08-15 63,749 \n 3.2 2018-08-15 2 \n 3.3 2018-08-15 40 \n 3.4 2018-08-15 6,095 \n 3.5 2018-08-15 20,358 \n 3.6 2018-08-15 35,274 \n 3.7 2018-08-15 6,595 \n 3.8 2018-08-15 3 \n null 2018-08-15 1,019 \n ========== ============ ===========\n'
expected_tabulated_tsv = '\n"category"\t"date"\t"downloads"\n"2.6"\t"2018-08-15"\t51\n"2.7"\t"2018-08-15"\t63,749\n"3.2"\t"2018-08-15"\t2\n"3.3"\t"2018-08-15"\t40\n"3.4"\t"2018-08-15"\t6,095\n"3.5"\t"2018-08-15"\t20,358\n"3.6"\t"2018-08-15"\t35,274\n"3.7"\t"2018-08-15"\t6,595\n"3.8"\t"2018-08-15"\t3\n"null"\t"2018-08-15"\t1,019\n' |
# 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) |
"""
Chaos 'probes' module.
This module contains *probes* that collect state from an indy-node pool.
By design, chaostoolkit runs an experiment if and only if 'steady state' is met.
Steady state is composed of one or more '*probes*'. *Probes* gather and return
system state data. An experiment defines a 'tolerance' (predicate) for each
*probe* that must be true before the next *probe* is executed. All *probes* must
pass the tolerance test before the system is considered to be in a steady state.
When the steady state is met, the 'method' of the experiment will execute. An
experiment's 'method' is composed of a list of one or more 'actions' that
introduce 'chaos' (change state, impede traffic, induce faults, etc.) into the
distributed system.
Actions are executed in the order they are declared. Faults, failures, and
exceptions encountered while executing an action do NOT cause an experiment to
fail.
All chaostoolkit cares about is if the steady state hypothesis is met before and
after the method executes. However, a chaos engineer may consider a 'succeeded'
result a failure if one or more of the actions encountered an exception,
failure, etc.
Each action's results are logged in the experiment's 'journal'. Manually or
programmatically inspecting an experiment's journal may be required to decide if
an experiment truely 'succeeded' or 'failed'.
Actions applied to a system (changes, faults, etc.) should not cause
predicatable failure. The purpose of an experiment is to introduce chaos to
expose weakness/vulnerability, bottlenecks/inefficiency, etc. without causing
systemic failure. If systemic failure is the result, either a bug exists or the
experiment is too aggressive.
Things to consider when adding or modifying probes:
1. Actions and *probes* could/may be used outside of Chaos experiments for other
kinds of integration or systems testing. Therefore, *probes* should
be written in a way they can reused outside of the context of the
chaostoolkit.
"""
| """
Chaos 'probes' module.
This module contains *probes* that collect state from an indy-node pool.
By design, chaostoolkit runs an experiment if and only if 'steady state' is met.
Steady state is composed of one or more '*probes*'. *Probes* gather and return
system state data. An experiment defines a 'tolerance' (predicate) for each
*probe* that must be true before the next *probe* is executed. All *probes* must
pass the tolerance test before the system is considered to be in a steady state.
When the steady state is met, the 'method' of the experiment will execute. An
experiment's 'method' is composed of a list of one or more 'actions' that
introduce 'chaos' (change state, impede traffic, induce faults, etc.) into the
distributed system.
Actions are executed in the order they are declared. Faults, failures, and
exceptions encountered while executing an action do NOT cause an experiment to
fail.
All chaostoolkit cares about is if the steady state hypothesis is met before and
after the method executes. However, a chaos engineer may consider a 'succeeded'
result a failure if one or more of the actions encountered an exception,
failure, etc.
Each action's results are logged in the experiment's 'journal'. Manually or
programmatically inspecting an experiment's journal may be required to decide if
an experiment truely 'succeeded' or 'failed'.
Actions applied to a system (changes, faults, etc.) should not cause
predicatable failure. The purpose of an experiment is to introduce chaos to
expose weakness/vulnerability, bottlenecks/inefficiency, etc. without causing
systemic failure. If systemic failure is the result, either a bug exists or the
experiment is too aggressive.
Things to consider when adding or modifying probes:
1. Actions and *probes* could/may be used outside of Chaos experiments for other
kinds of integration or systems testing. Therefore, *probes* should
be written in a way they can reused outside of the context of the
chaostoolkit.
""" |
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)) |
class Node(object):
"""docstring for Node"""
def __init__(self, value):
self.value = value
self.edges = []
class Edge(object):
"""docstring for Edge"""
def __init__(self, value, node_from, node_to):
self.value = value
self.node_from = node_from
self.node_to = node_to
class Graph(object):
"""docstring for Graph"""
def __init__(self, nodes=[], edges=[]):
self.nodes = nodes
self.edges = edges
def insert_node(self, new_node_value):
"""Creates a new node with the given value and
inserts it into the graph's list of nodes"""
new_node = Node(new_node_value)
self.nodes.append(new_node)
def insert_edge(self, new_edge_value, node_from_val, node_to_val):
"""Creates a new edge with a given value between nodes with the specified values.
If no nodes exist with the given values, new nodes are created.
The new edge is then added to the graph's list of edges,
as well as the individual node's list of edges"""
from_found = None
to_found = None
for node in self.nodes:
if node_from_val == node.value:
from_found = node
if node_to_val == node.value:
to_found = node
if from_found is None:
from_found = Node(node_from_val)
self.nodes.append(from_found)
if to_found is None:
to_found = Node(node_to_val)
self.nodes.append(to_found)
new_edge = Edge(new_edge_value, from_found, to_found)
from_found.edges.append(new_edge)
to_found.edges.append(new_edge)
self.edges.append(new_edge)
def get_edge_list(self):
"""Returns a list of tuples, each representing an edge,
that contain the edge value, the value of the origin node,
and the value of the destination node"""
edge_list = []
for edge in self.edges:
edge_list.append((edge.value, edge.node_from.value, edge.node_to.value))
return edge_list
def get_adjacency_list(self):
"""Returns a list of lists, list indices
represent each node in the graph.
Each sublist contains tuples
for each outbound edge from the node.
The tuples store the value of the connected node,
and the value of the edge."""
adjacency_list = []
for node in self.nodes:
sublist = []
for edge in node.edges:
if edge.node_to != node:
sublist.append((edge.node_to.value, edge.value))
if sublist:
adjacency_list.append(sublist)
else:
adjacency_list.append(None)
return adjacency_list
def get_adjacenty_matrix(self):
"""Returns a list of lists, forming a matrix
where the row represents the origin node and
the column represents the destination node.
If an edge exists between the origin and the destination,
it's value is added to the appropriate position within the matrix"""
adjacency_matrix = []
for node in self.nodes:
matrix_row = []
counter = 1
for subnode in self.nodes:
for edge in node.edges:
if edge.node_to == subnode and edge.node_from == node:
matrix_row.append(edge.value)
if len(matrix_row) < counter:
matrix_row.append(0)
counter += 1
adjacency_matrix.append(matrix_row)
return adjacency_matrix
def dfs(self, start_node_num):
"""Outputs a list of numbers corresponding to the traversed nodes
in a Depth First Search.
ARGUMENTS: start_node_num is the starting node number (integer)
RETURN: a list of the node values (integers)."""
start_node = self.find_node(start_node_num)
return self.dfs_helper(start_node, visited=[])
def bfs(self, start_node_num):
"""TODO: Create an iterative implementation of Breadth First Search
iterating through a node's edges. The output should be a list of
numbers corresponding to the traversed nodes.
ARGUMENTS: start_node_num is the node number (integer)
RETURN: a list of the node values (integers)."""
ret_list = [start_node_num]
for node_value in ret_list:
node = self.find_node(node_value)
for edge in node.edges:
if edge.node_from == node and edge.node_to.value not in ret_list:
ret_list.append(edge.node_to.value)
return ret_list
def dfs_helper(self, start_node, visited):
"""TODO: Write the helper function for a recursive implementation
of Depth First Search iterating through a node's edges. The
output should be a list of numbers corresponding to the
values of the traversed nodes.
ARGUMENTS: start_node is the starting Node
Because this is recursive, we pass in the set of visited node
values.
RETURN: a list of the traversed node values (integers).
"""
if start_node:
visited.append(start_node.value)
for edge in start_node.edges:
if edge.node_from == start_node and edge.node_to.value not in visited:
visited = self.dfs_helper(edge.node_to, visited)
return visited
def find_node(self, node_value):
"""input: value
output: first node in the graph with given value"""
for node in self.nodes:
if node_value == node.value:
return node
return None
| class Node(object):
"""docstring for Node"""
def __init__(self, value):
self.value = value
self.edges = []
class Edge(object):
"""docstring for Edge"""
def __init__(self, value, node_from, node_to):
self.value = value
self.node_from = node_from
self.node_to = node_to
class Graph(object):
"""docstring for Graph"""
def __init__(self, nodes=[], edges=[]):
self.nodes = nodes
self.edges = edges
def insert_node(self, new_node_value):
"""Creates a new node with the given value and
inserts it into the graph's list of nodes"""
new_node = node(new_node_value)
self.nodes.append(new_node)
def insert_edge(self, new_edge_value, node_from_val, node_to_val):
"""Creates a new edge with a given value between nodes with the specified values.
If no nodes exist with the given values, new nodes are created.
The new edge is then added to the graph's list of edges,
as well as the individual node's list of edges"""
from_found = None
to_found = None
for node in self.nodes:
if node_from_val == node.value:
from_found = node
if node_to_val == node.value:
to_found = node
if from_found is None:
from_found = node(node_from_val)
self.nodes.append(from_found)
if to_found is None:
to_found = node(node_to_val)
self.nodes.append(to_found)
new_edge = edge(new_edge_value, from_found, to_found)
from_found.edges.append(new_edge)
to_found.edges.append(new_edge)
self.edges.append(new_edge)
def get_edge_list(self):
"""Returns a list of tuples, each representing an edge,
that contain the edge value, the value of the origin node,
and the value of the destination node"""
edge_list = []
for edge in self.edges:
edge_list.append((edge.value, edge.node_from.value, edge.node_to.value))
return edge_list
def get_adjacency_list(self):
"""Returns a list of lists, list indices
represent each node in the graph.
Each sublist contains tuples
for each outbound edge from the node.
The tuples store the value of the connected node,
and the value of the edge."""
adjacency_list = []
for node in self.nodes:
sublist = []
for edge in node.edges:
if edge.node_to != node:
sublist.append((edge.node_to.value, edge.value))
if sublist:
adjacency_list.append(sublist)
else:
adjacency_list.append(None)
return adjacency_list
def get_adjacenty_matrix(self):
"""Returns a list of lists, forming a matrix
where the row represents the origin node and
the column represents the destination node.
If an edge exists between the origin and the destination,
it's value is added to the appropriate position within the matrix"""
adjacency_matrix = []
for node in self.nodes:
matrix_row = []
counter = 1
for subnode in self.nodes:
for edge in node.edges:
if edge.node_to == subnode and edge.node_from == node:
matrix_row.append(edge.value)
if len(matrix_row) < counter:
matrix_row.append(0)
counter += 1
adjacency_matrix.append(matrix_row)
return adjacency_matrix
def dfs(self, start_node_num):
"""Outputs a list of numbers corresponding to the traversed nodes
in a Depth First Search.
ARGUMENTS: start_node_num is the starting node number (integer)
RETURN: a list of the node values (integers)."""
start_node = self.find_node(start_node_num)
return self.dfs_helper(start_node, visited=[])
def bfs(self, start_node_num):
"""TODO: Create an iterative implementation of Breadth First Search
iterating through a node's edges. The output should be a list of
numbers corresponding to the traversed nodes.
ARGUMENTS: start_node_num is the node number (integer)
RETURN: a list of the node values (integers)."""
ret_list = [start_node_num]
for node_value in ret_list:
node = self.find_node(node_value)
for edge in node.edges:
if edge.node_from == node and edge.node_to.value not in ret_list:
ret_list.append(edge.node_to.value)
return ret_list
def dfs_helper(self, start_node, visited):
"""TODO: Write the helper function for a recursive implementation
of Depth First Search iterating through a node's edges. The
output should be a list of numbers corresponding to the
values of the traversed nodes.
ARGUMENTS: start_node is the starting Node
Because this is recursive, we pass in the set of visited node
values.
RETURN: a list of the traversed node values (integers).
"""
if start_node:
visited.append(start_node.value)
for edge in start_node.edges:
if edge.node_from == start_node and edge.node_to.value not in visited:
visited = self.dfs_helper(edge.node_to, visited)
return visited
def find_node(self, node_value):
"""input: value
output: first node in the graph with given value"""
for node in self.nodes:
if node_value == node.value:
return node
return None |
'''
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' |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Oct 6 16:29:07 2017
@author: Young
"""
# Placeholder | """
Created on Fri Oct 6 16:29:07 2017
@author: Young
""" |
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 PathAnalyzerStore:
"""
Maps extensions to analyzers. To be used for storing the analyzers that should be used for specific extensions in a
directory.
"""
####################################################################################################################
# Constructor.
####################################################################################################################
def __init__(self):
# This dictionary stores the corresponding analyzer for each extension.
self._analyzers_by_extensions = {}
####################################################################################################################
# Public methods.
####################################################################################################################
def add_analyzer(self, extensions, analyzer):
for extension in extensions:
if extension in self._analyzers_by_extensions:
raise Exception(
F'Invalid configuration, an analyzer is already registered for the extension "{extension}". Do not '
'register multiple rules for the same extensions in a directory.')
self._analyzers_by_extensions[extension] = analyzer
def find_analyzer(self, extension):
return self._analyzers_by_extensions.get(extension, None)
| class Pathanalyzerstore:
"""
Maps extensions to analyzers. To be used for storing the analyzers that should be used for specific extensions in a
directory.
"""
def __init__(self):
self._analyzers_by_extensions = {}
def add_analyzer(self, extensions, analyzer):
for extension in extensions:
if extension in self._analyzers_by_extensions:
raise exception(f'Invalid configuration, an analyzer is already registered for the extension "{extension}". Do not register multiple rules for the same extensions in a directory.')
self._analyzers_by_extensions[extension] = analyzer
def find_analyzer(self, extension):
return self._analyzers_by_extensions.get(extension, None) |
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 |
"""
Monthly Backups
Description:
This script is run weekly on Sunday at 2 AM and generates weekly backups.
On Rojo we keep weekly backups going back 1 month,
we keep monthly backups going back 6 months,
and we put older backups into cold storage.
Directory Stucture:
junkinthetrunk/
backups/
weekly/
weekly.4.tar.gz --> weekly.2018-01-28.tar.gz
weekly.3.tar.gz --> weekly.2018-01-21.tar.gz
weekly.2.tar.gz --> weekly.2018-01-14.tar.gz
weekly.1.tar.gz --> weekly.2018-01-07.tar.gz
monthly/
monthly.6.tar.gz --> monthly.2018-01-07.tar.gz
monthly.5.tar.gz --> monthly.2017-12-03.tar.gz
monthly.4.tar.gz --> monthly.2017-11-05.tar.gz
monthly.3.tar.gz --> monthly.2017-10-01.tar.gz
monthly.2.tar.gz --> monthly.2017-09-03.tar.gz
monthly.1.tar.gz --> monthly.2017-08-06.tar.gz
"""
| """
Monthly Backups
Description:
This script is run weekly on Sunday at 2 AM and generates weekly backups.
On Rojo we keep weekly backups going back 1 month,
we keep monthly backups going back 6 months,
and we put older backups into cold storage.
Directory Stucture:
junkinthetrunk/
backups/
weekly/
weekly.4.tar.gz --> weekly.2018-01-28.tar.gz
weekly.3.tar.gz --> weekly.2018-01-21.tar.gz
weekly.2.tar.gz --> weekly.2018-01-14.tar.gz
weekly.1.tar.gz --> weekly.2018-01-07.tar.gz
monthly/
monthly.6.tar.gz --> monthly.2018-01-07.tar.gz
monthly.5.tar.gz --> monthly.2017-12-03.tar.gz
monthly.4.tar.gz --> monthly.2017-11-05.tar.gz
monthly.3.tar.gz --> monthly.2017-10-01.tar.gz
monthly.2.tar.gz --> monthly.2017-09-03.tar.gz
monthly.1.tar.gz --> monthly.2017-08-06.tar.gz
""" |
# -*- 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'} |
__author__ = 'Robbert Harms'
__date__ = "2015-05-04"
__maintainer__ = "Robbert Harms"
__email__ = "robbert.harms@maastrichtuniversity.nl"
class ScannerSettingsParser(object):
def get_value(self, key):
"""Read a value for a given key for all sessions in settings file.
The settings file is supposed to be given in the constructor.
Args:
key (str): The name of the key to read
Returns:
dict: A dictionary with as keys the session names and as values the requested value for the key.
"""
class InfoReader(object):
def get_read_out_time(self):
"""Get the read out time from the settings file.
The settings file is supposed to be given to the constructor.
Returns:
float: The read out time in seconds.
""" | __author__ = 'Robbert Harms'
__date__ = '2015-05-04'
__maintainer__ = 'Robbert Harms'
__email__ = 'robbert.harms@maastrichtuniversity.nl'
class Scannersettingsparser(object):
def get_value(self, key):
"""Read a value for a given key for all sessions in settings file.
The settings file is supposed to be given in the constructor.
Args:
key (str): The name of the key to read
Returns:
dict: A dictionary with as keys the session names and as values the requested value for the key.
"""
class Inforeader(object):
def get_read_out_time(self):
"""Get the read out time from the settings file.
The settings file is supposed to be given to the constructor.
Returns:
float: The read out time in seconds.
""" |
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 |
"""
RANGE:
3 parameters [start,stop,step]
Code to print the odd integers in the specified range
from 5 to -10 by assigning negative step value
"""
start = 5
stop = -10
step = -2
print("Odd numbers from 5 to -10 are: ")
for num in range(start,stop,step):
print(num)
'''
OUTPUT:
Odd numbers from 5 to -10 are:
5
3
1
-1
-3
-5
-7
-9
'''
| """
RANGE:
3 parameters [start,stop,step]
Code to print the odd integers in the specified range
from 5 to -10 by assigning negative step value
"""
start = 5
stop = -10
step = -2
print('Odd numbers from 5 to -10 are: ')
for num in range(start, stop, step):
print(num)
'\nOUTPUT:\nOdd numbers from 5 to -10 are: \n5\n3\n1\n-1\n-3\n-5\n-7\n-9\n' |
#!/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???') |
"""
Django settings for ribbon.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""
# Application definition
INSTALLED_APPS = ('rest_framework', )
| """
Django settings for ribbon.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""
installed_apps = ('rest_framework',) |
# ========================
# 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 |
# -*- coding: utf-8 -*-
# auto raise exception
def auto_raise(exception, silent):
if not silent:
raise exception
class APIError(Exception):
""" Common API Error """
class APINetworkError(APIError):
""" Failed to load API request """
class APIJSONParesError(APIError):
""" Failed to parse target """
class APISignInFailedError(APIError):
""" Failed to Sign in """
class APIServerResponseError(APIError):
""" Warning if server response only error"""
class ModelError(Exception):
""" Common Model Error """
class ModelInitError(Exception):
""" Model Initialize Error """
class APIServerResponseWarning(Warning):
""" Warning if server response with error"""
class ModelRefreshWarning(Warning):
""" Model refresh failed """
class ModelInitWarning(Warning):
""" Warning with init object """
| def auto_raise(exception, silent):
if not silent:
raise exception
class Apierror(Exception):
""" Common API Error """
class Apinetworkerror(APIError):
""" Failed to load API request """
class Apijsonpareserror(APIError):
""" Failed to parse target """
class Apisigninfailederror(APIError):
""" Failed to Sign in """
class Apiserverresponseerror(APIError):
""" Warning if server response only error"""
class Modelerror(Exception):
""" Common Model Error """
class Modeliniterror(Exception):
""" Model Initialize Error """
class Apiserverresponsewarning(Warning):
""" Warning if server response with error"""
class Modelrefreshwarning(Warning):
""" Model refresh failed """
class Modelinitwarning(Warning):
""" Warning with init object """ |
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 |
"""
Not sure how to scientifically prove this.
In order to turn all the 1 to 0, every row need to have "the same pattern". Or it is imposible.
This same pattern is means they are 1. identical 2. entirely different.
For example 101 and 101, 101 and 010.
110011 and 110011. 110011 and 001100.
Time: O(N), N is the number of element in the grid.
Space: O(N)
"""
class Solution(object):
def removeOnes(self, grid):
if not grid: return True
rowStrings = set()
for row in grid:
rowStrings.add(''.join((str(e) for e in row)))
if len(rowStrings)>2: return False
if len(rowStrings)==1: return True
s1 = rowStrings.pop()
s2 = rowStrings.pop()
for i in xrange(len(s1)):
if (s1[i]=='0' and s2[i]=='1') or (s1[i]=='1' and s2[i]=='0'): continue
return False
return True | """
Not sure how to scientifically prove this.
In order to turn all the 1 to 0, every row need to have "the same pattern". Or it is imposible.
This same pattern is means they are 1. identical 2. entirely different.
For example 101 and 101, 101 and 010.
110011 and 110011. 110011 and 001100.
Time: O(N), N is the number of element in the grid.
Space: O(N)
"""
class Solution(object):
def remove_ones(self, grid):
if not grid:
return True
row_strings = set()
for row in grid:
rowStrings.add(''.join((str(e) for e in row)))
if len(rowStrings) > 2:
return False
if len(rowStrings) == 1:
return True
s1 = rowStrings.pop()
s2 = rowStrings.pop()
for i in xrange(len(s1)):
if s1[i] == '0' and s2[i] == '1' or (s1[i] == '1' and s2[i] == '0'):
continue
return False
return True |
#
# 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) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.