content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
nombreFichero = "fases.txt";
print("Ingresa los datos solicitados");
f1 = input("Ingresa la primera frase: ");
f2 = input("Ingresa la segunda frase: ");
f3 = input("Ingresa la tercera frase: ");
fichero = open(nombreFichero, "w");
fichero.write("%s\n" % f1);
fichero.write("%s\n" % f2);
fichero.write("%s\n" % f3);
fichero.close();
print("Datos guardados correctamente");
fichero = open(nombreFichero, "a");
fichero.write("Nueva frase agregada");
fichero.close();
fichero = open(nombreFichero, "r");
result = fichero.readlines();
for x in result:
print(x);
fichero.close();
# otra forma
nombreFichero = "fases2.txt";
lineas = [];
for x in range(0,3):
frase = input("Ingresa la fresa numero %d: " % int(x+1));
lineas.append(frase+"\n");
fichero_dos = open(nombreFichero, "w");
fichero_dos.writelines(lineas);
fichero_dos.close();
fichero_dos = open(nombreFichero, "a");
fichero_dos.write(input("Ingresa una nueva frase: ") + "\n");
fichero_dos.close();
fichero_dos = open(nombreFichero, "r");
result = fichero_dos.readlines();
fichero_dos.close();
for x in range(0, len(result)):
print(str(x+1),":", result[x].rstrip());
print("Datos guardados correctamente"); | nombre_fichero = 'fases.txt'
print('Ingresa los datos solicitados')
f1 = input('Ingresa la primera frase: ')
f2 = input('Ingresa la segunda frase: ')
f3 = input('Ingresa la tercera frase: ')
fichero = open(nombreFichero, 'w')
fichero.write('%s\n' % f1)
fichero.write('%s\n' % f2)
fichero.write('%s\n' % f3)
fichero.close()
print('Datos guardados correctamente')
fichero = open(nombreFichero, 'a')
fichero.write('Nueva frase agregada')
fichero.close()
fichero = open(nombreFichero, 'r')
result = fichero.readlines()
for x in result:
print(x)
fichero.close()
nombre_fichero = 'fases2.txt'
lineas = []
for x in range(0, 3):
frase = input('Ingresa la fresa numero %d: ' % int(x + 1))
lineas.append(frase + '\n')
fichero_dos = open(nombreFichero, 'w')
fichero_dos.writelines(lineas)
fichero_dos.close()
fichero_dos = open(nombreFichero, 'a')
fichero_dos.write(input('Ingresa una nueva frase: ') + '\n')
fichero_dos.close()
fichero_dos = open(nombreFichero, 'r')
result = fichero_dos.readlines()
fichero_dos.close()
for x in range(0, len(result)):
print(str(x + 1), ':', result[x].rstrip())
print('Datos guardados correctamente') |
expected_output = {
"rollback_timer_reason": "no ISSU operation is in progress",
"rollback_timer_state": "inactive",
}
| expected_output = {'rollback_timer_reason': 'no ISSU operation is in progress', 'rollback_timer_state': 'inactive'} |
class VerificateInterface:
def __init__(self, inputfile, outputfile, correctoutput):
self.inputfile = inputfile
self.outputfile = outputfile
self.correctoutput = correctoutput
self._status = None
self._message = None
def verificate(self, isolator):
raise NotImplementedError
def get_status(self):
return self._status
def get_message(self):
return self._message | class Verificateinterface:
def __init__(self, inputfile, outputfile, correctoutput):
self.inputfile = inputfile
self.outputfile = outputfile
self.correctoutput = correctoutput
self._status = None
self._message = None
def verificate(self, isolator):
raise NotImplementedError
def get_status(self):
return self._status
def get_message(self):
return self._message |
haarcascade_frontalface_Path = "./faceApi/models/OpenCV/haarcascade_frontalface_default.xml" # for cascade method
# 8 bit Quantized version using Tensorflow ( 2.7 MB )
TFmodelFile = "./faceApi/models/OpenCV/tensorflow/TF_faceDetectorModel_uint8.pb"
TFconfigFile = "./faceApi/models/OpenCV/tensorflow/TF_faceDetectorConfig.pbtxt"
# FP16 version of the original caffe implementation ( 5.4 MB )
CAFFEmodelFile = "./faceApi/models/OpenCV/caffe/FaceDetect_Res10_300x300_ssd_iter_140000_fp16.caffemodel"
CAFFEconfigFile = "./faceApi/models/OpenCV/caffe/FaceDetect_Deploy.prototxt"
dlib_mmod_model_Path = "./faceApi/models/Dlib/mmod_human_face_detector.dat" # for Dlib MMOD
dlib_5_face_landmarks_path = './faceApi/models/Dlib/shape_predictor_5_face_landmarks.dat'
ultra_light_640_onnx_model_path = './faceApi/models/UltraLight/ultra_light_640.onnx'
ultra_light_320_onnx_model_path = './faceApi/models/UltraLight/ultra_light_320.onnx'
yoloV3FacePretrainedWeightsPath = './faceApi/models/Yolo/yolo_weights/yolov3-wider_16000.weights'
yoloV3FaceConfigFilePath = './faceApi/models/Yolo/yolo_models_config/yolov3-face.cfg'
yoloV3FaceClassesFilePath = './faceApi/models/Yolo/yolo_labels/face_classes.txt'
known_faces_encodes_npy_file_path = './faceApi/FACEDB/known_faces_encodes.npy'
known_faces_ids_npy_file_path= './faceApi/FACEDB/known_faces_ids.npy'
emotion_model_path = './faceApi/models/emotion_models/emotions_model.h5'
gender_model_path = './faceApi/models/gender_models/gender_model.h5'
faceTageModelPath = './faceApi/models/sklearn/face_model.pkl'
| haarcascade_frontalface__path = './faceApi/models/OpenCV/haarcascade_frontalface_default.xml'
t_fmodel_file = './faceApi/models/OpenCV/tensorflow/TF_faceDetectorModel_uint8.pb'
t_fconfig_file = './faceApi/models/OpenCV/tensorflow/TF_faceDetectorConfig.pbtxt'
caff_emodel_file = './faceApi/models/OpenCV/caffe/FaceDetect_Res10_300x300_ssd_iter_140000_fp16.caffemodel'
caff_econfig_file = './faceApi/models/OpenCV/caffe/FaceDetect_Deploy.prototxt'
dlib_mmod_model__path = './faceApi/models/Dlib/mmod_human_face_detector.dat'
dlib_5_face_landmarks_path = './faceApi/models/Dlib/shape_predictor_5_face_landmarks.dat'
ultra_light_640_onnx_model_path = './faceApi/models/UltraLight/ultra_light_640.onnx'
ultra_light_320_onnx_model_path = './faceApi/models/UltraLight/ultra_light_320.onnx'
yolo_v3_face_pretrained_weights_path = './faceApi/models/Yolo/yolo_weights/yolov3-wider_16000.weights'
yolo_v3_face_config_file_path = './faceApi/models/Yolo/yolo_models_config/yolov3-face.cfg'
yolo_v3_face_classes_file_path = './faceApi/models/Yolo/yolo_labels/face_classes.txt'
known_faces_encodes_npy_file_path = './faceApi/FACEDB/known_faces_encodes.npy'
known_faces_ids_npy_file_path = './faceApi/FACEDB/known_faces_ids.npy'
emotion_model_path = './faceApi/models/emotion_models/emotions_model.h5'
gender_model_path = './faceApi/models/gender_models/gender_model.h5'
face_tage_model_path = './faceApi/models/sklearn/face_model.pkl' |
# Series data
tune_series = ["open", "high", "low", "close", "volume"]
# Parameters to tune
tune_params = [
"acceleration",
"accelerationlong",
"accelerationshort",
"atr_length",
"atr_period",
"average_lenght",
"average_length",
"bb_length",
"channel_lenght",
"channel_length",
"chikou_period",
"d",
"ddof",
"ema_fast",
"ema_slow",
"er",
"fast",
"fast_period",
"fastd_period",
"fastk_period",
"fastperiod",
"high_length",
"jaw",
"k",
"k_period",
"kc_length",
"kijun",
"kijun_period",
"length",
"lensig",
"lips",
"long",
"long_period",
"lookback",
"low_length",
"lower_length",
"lower_period",
"ma_length",
"max_lookback",
"maxperiod",
"medium",
"min_lookback",
"minperiod",
"mom_length",
"mom_smooth",
"p",
"period",
"period_fast",
"period_slow",
"q",
"r1",
"r2",
"r3",
"r4",
"roc1",
"roc2",
"roc3",
"roc4",
"rsi_length",
"rsi_period",
"run_length",
"rvi_length",
"senkou",
"senkou_period",
"short",
"short_period",
"signal",
"signalperiod",
"slow",
"slow_period",
"slowd_period",
"slowk_period",
"slowperiod",
"sma1",
"sma2",
"sma3",
"sma4",
"smooth",
"smooth_k",
"stoch_period",
"swma_length",
"tclength",
"teeth",
"tenkan",
"tenkan_period",
"timeperiod",
"timeperiod1",
"timeperiod2",
"timeperiod3",
"upper_length",
"upper_period",
"width",
"wma_period",
]
talib_indicators = [
"tta.BBANDS",
"tta.DEMA",
"tta.EMA",
"tta.HT_TRENDLINE",
"tta.KAMA",
"tta.MA",
"tta.MIDPOINT",
"tta.MIDPRICE",
"tta.SAR",
"tta.SAREXT",
"tta.SMA",
"tta.T3",
"tta.TEMA",
"tta.TRIMA",
"tta.WMA",
"tta.ADX",
"tta.ADXR",
"tta.APO",
"tta.AROON",
"tta.AROONOSC",
"tta.BOP",
"tta.CCI",
"tta.CMO",
"tta.DX",
"tta.MACD",
"tta.MACDEXT",
"tta.MACDFIX",
"tta.MFI",
"tta.MINUS_DI",
"tta.MINUS_DM",
"tta.MOM",
"tta.PLUS_DI",
"tta.PLUS_DM",
"tta.PPO",
"tta.ROC",
"tta.ROCP",
"tta.ROCR",
"tta.ROCR100",
"tta.RSI",
"tta.STOCH",
"tta.STOCHF",
"tta.STOCHRSI",
"tta.TRIX",
"tta.ULTOSC",
"tta.WILLR",
"tta.AD",
"tta.ADOSC",
"tta.OBV",
"tta.HT_DCPERIOD",
"tta.HT_DCPHASE",
"tta.HT_PHASOR",
"tta.HT_SINE",
"tta.HT_TRENDMODE",
"tta.AVGPRICE",
"tta.MEDPRICE",
"tta.TYPPRICE",
"tta.WCLPRICE",
"tta.ATR",
"tta.NATR",
"tta.TRANGE",
"tta.CDL2CROWS",
"tta.CDL3BLACKCROWS",
"tta.CDL3INSIDE",
"tta.CDL3LINESTRIKE",
"tta.CDL3OUTSIDE",
"tta.CDL3STARSINSOUTH",
"tta.CDL3WHITESOLDIERS",
"tta.CDLABANDONEDBABY",
"tta.CDLADVANCEBLOCK",
"tta.CDLBELTHOLD",
"tta.CDLBREAKAWAY",
"tta.CDLCLOSINGMARUBOZU",
"tta.CDLCONCEALBABYSWALL",
"tta.CDLCOUNTERATTACK",
"tta.CDLDARKCLOUDCOVER",
"tta.CDLDOJI",
"tta.CDLDOJISTAR",
"tta.CDLDRAGONFLYDOJI",
"tta.CDLENGULFING",
"tta.CDLEVENINGDOJISTAR",
"tta.CDLEVENINGSTAR",
"tta.CDLGAPSIDESIDEWHITE",
"tta.CDLGRAVESTONEDOJI",
"tta.CDLHAMMER",
"tta.CDLHANGINGMAN",
"tta.CDLHARAMI",
"tta.CDLHARAMICROSS",
"tta.CDLHIGHWAVE",
"tta.CDLHIKKAKE",
"tta.CDLHIKKAKEMOD",
"tta.CDLHOMINGPIGEON",
"tta.CDLIDENTICAL3CROWS",
"tta.CDLINNECK",
"tta.CDLINVERTEDHAMMER",
"tta.CDLKICKING",
"tta.CDLKICKINGBYLENGTH",
"tta.CDLLADDERBOTTOM",
"tta.CDLLONGLEGGEDDOJI",
"tta.CDLLONGLINE",
"tta.CDLMARUBOZU",
"tta.CDLMATCHINGLOW",
"tta.CDLMATHOLD",
"tta.CDLMORNINGDOJISTAR",
"tta.CDLMORNINGSTAR",
"tta.CDLONNECK",
"tta.CDLPIERCING",
"tta.CDLRICKSHAWMAN",
"tta.CDLRISEFALL3METHODS",
"tta.CDLSEPARATINGLINES",
"tta.CDLSHOOTINGSTAR",
"tta.CDLSHORTLINE",
"tta.CDLSPINNINGTOP",
"tta.CDLSTALLEDPATTERN",
"tta.CDLSTICKSANDWICH",
"tta.CDLTAKURI",
"tta.CDLTASUKIGAP",
"tta.CDLTHRUSTING",
"tta.CDLTRISTAR",
"tta.CDLUNIQUE3RIVER",
"tta.CDLUPSIDEGAP2CROWS",
"tta.CDLXSIDEGAP3METHODS",
"tta.LINEARREG",
"tta.LINEARREG_ANGLE",
"tta.LINEARREG_INTERCEPT",
"tta.LINEARREG_SLOPE",
"tta.STDDEV",
"tta.TSF",
"tta.VAR",
]
pandas_ta_indicators = [
"pta.ao",
"pta.apo",
"pta.bias",
"pta.bop",
"pta.brar",
"pta.cci",
"pta.cfo",
"pta.cg",
"pta.cmo",
"pta.coppock",
"pta.cti",
"pta.dm",
"pta.er",
"pta.eri",
"pta.fisher",
"pta.inertia",
"pta.kdj",
"pta.kst",
"pta.macd",
"pta.mom",
"pta.pgo",
"pta.ppo",
"pta.psl",
"pta.qqe",
"pta.roc",
"pta.rsi",
"pta.rsx",
"pta.rvgi",
"pta.stc",
"pta.slope",
"pta.smi",
"pta.squeeze",
"pta.squeeze_pro",
"pta.stoch",
# "pta.stochf", # remove when pandas-ta development is merged
"pta.stochrsi",
"pta.td_seq",
"pta.trix",
"pta.tsi",
"pta.uo",
"pta.willr",
# "pta.alligator", # remove when pandas-ta development is merged
"pta.alma",
"pta.dema",
"pta.ema",
"pta.fwma",
"pta.hilo",
"pta.hl2",
"pta.hlc3",
# "pta.hma", # remove when pandas-ta development is merged
"pta.hwma",
"pta.ichimoku",
"pta.jma",
"pta.kama",
"pta.linreg",
# "pta.mama", # remove when pandas-ta development is merged
"pta.mcgd",
"pta.midpoint",
"pta.midprice",
"pta.ohlc4",
"pta.pwma",
"pta.rma",
"pta.sinwma",
"pta.sma",
# "pta.smma", # remove when pandas-ta development is merged
"pta.ssf",
# "pta.ssf3", # remove when pandas-ta development is merged
"pta.supertrend",
"pta.swma",
"pta.t3",
"pta.tema",
"pta.trima",
"pta.vidya",
"pta.wcp",
"pta.wma",
"pta.zlma",
"pta.entropy",
"pta.kurtosis",
"pta.mad",
"pta.median",
"pta.quantile",
"pta.skew",
"pta.stdev",
# "pta.tos_stdevall", # remove when pandas-ta development is merged
"pta.variance",
"pta.zscore",
"pta.adx",
"pta.amat",
"pta.aroon",
"pta.chop",
"pta.cksp",
"pta.decay",
"pta.decreasing",
"pta.dpo",
"pta.increasing",
"pta.psar",
"pta.qstick",
# "pta.trendflex", # remove when pandas-ta development is merged
"pta.ttm_trend",
"pta.vhf",
"pta.vortex",
"pta.aberration",
"pta.accbands",
"pta.atr",
# "pta.atrts", # remove when pandas-ta development is merged
"pta.bbands",
"pta.donchian",
"pta.hwc",
"pta.kc",
"pta.massi",
"pta.natr",
"pta.pdist",
"pta.rvi",
"pta.thermo",
"pta.true_range",
"pta.ui",
"pta.ad",
"pta.adosc",
"pta.aobv",
"pta.cmf",
"pta.efi",
"pta.eom",
"pta.kvo",
"pta.mfi",
"pta.nvi",
"pta.obv",
"pta.pvi",
"pta.pvo",
"pta.pvol",
# "pta.pvr", # needs **kwargs added to the function in pandas-ta
"pta.pvt",
"pta.vp",
"pta.vwap",
# "pta.vwma", # remove when pandas-ta development is merged
# "pta.wb_tsv", # remove when pandas-ta development is merged
]
finta_indicatrs = [
"fta.SMA",
"fta.SMM",
"fta.SSMA",
"fta.EMA",
"fta.DEMA",
"fta.TEMA",
"fta.TRIMA",
"fta.TRIX",
"fta.VAMA",
"fta.ER",
"fta.KAMA",
"fta.ZLEMA",
"fta.WMA",
"fta.HMA",
"fta.EVWMA",
"fta.VWAP",
"fta.SMMA",
# 'fta.FRAMA', # Requires even parameters (not implemented)
"fta.MACD",
"fta.PPO",
"fta.VW_MACD",
"fta.EV_MACD",
"fta.MOM",
"fta.ROC",
"fta.RSI",
"fta.IFT_RSI",
"fta.TR",
"fta.ATR",
"fta.SAR",
"fta.BBANDS",
"fta.BBWIDTH",
"fta.MOBO",
"fta.PERCENT_B",
"fta.KC",
"fta.DO",
"fta.DMI",
"fta.ADX",
"fta.PIVOT",
"fta.PIVOT_FIB",
"fta.STOCH",
"fta.STOCHD",
"fta.STOCHRSI",
"fta.WILLIAMS",
"fta.UO",
"fta.AO",
"fta.MI",
"fta.VORTEX",
"fta.KST",
"fta.TSI",
"fta.TP",
"fta.ADL",
"fta.CHAIKIN",
"fta.MFI",
"fta.OBV",
"fta.WOBV",
"fta.VZO",
"fta.PZO",
"fta.EFI",
"fta.CFI",
"fta.EBBP",
"fta.EMV",
"fta.CCI",
"fta.COPP",
"fta.BASP",
"fta.BASPN",
"fta.CMO",
"fta.CHANDELIER",
"fta.QSTICK",
# 'fta.TMF', # Not implemented
"fta.WTO",
"fta.FISH",
"fta.ICHIMOKU",
"fta.APZ",
"fta.SQZMI",
"fta.VPT",
"fta.FVE",
"fta.VFI",
"fta.MSD",
"fta.STC",
# 'fta.WAVEPM' # No attribute error
]
| tune_series = ['open', 'high', 'low', 'close', 'volume']
tune_params = ['acceleration', 'accelerationlong', 'accelerationshort', 'atr_length', 'atr_period', 'average_lenght', 'average_length', 'bb_length', 'channel_lenght', 'channel_length', 'chikou_period', 'd', 'ddof', 'ema_fast', 'ema_slow', 'er', 'fast', 'fast_period', 'fastd_period', 'fastk_period', 'fastperiod', 'high_length', 'jaw', 'k', 'k_period', 'kc_length', 'kijun', 'kijun_period', 'length', 'lensig', 'lips', 'long', 'long_period', 'lookback', 'low_length', 'lower_length', 'lower_period', 'ma_length', 'max_lookback', 'maxperiod', 'medium', 'min_lookback', 'minperiod', 'mom_length', 'mom_smooth', 'p', 'period', 'period_fast', 'period_slow', 'q', 'r1', 'r2', 'r3', 'r4', 'roc1', 'roc2', 'roc3', 'roc4', 'rsi_length', 'rsi_period', 'run_length', 'rvi_length', 'senkou', 'senkou_period', 'short', 'short_period', 'signal', 'signalperiod', 'slow', 'slow_period', 'slowd_period', 'slowk_period', 'slowperiod', 'sma1', 'sma2', 'sma3', 'sma4', 'smooth', 'smooth_k', 'stoch_period', 'swma_length', 'tclength', 'teeth', 'tenkan', 'tenkan_period', 'timeperiod', 'timeperiod1', 'timeperiod2', 'timeperiod3', 'upper_length', 'upper_period', 'width', 'wma_period']
talib_indicators = ['tta.BBANDS', 'tta.DEMA', 'tta.EMA', 'tta.HT_TRENDLINE', 'tta.KAMA', 'tta.MA', 'tta.MIDPOINT', 'tta.MIDPRICE', 'tta.SAR', 'tta.SAREXT', 'tta.SMA', 'tta.T3', 'tta.TEMA', 'tta.TRIMA', 'tta.WMA', 'tta.ADX', 'tta.ADXR', 'tta.APO', 'tta.AROON', 'tta.AROONOSC', 'tta.BOP', 'tta.CCI', 'tta.CMO', 'tta.DX', 'tta.MACD', 'tta.MACDEXT', 'tta.MACDFIX', 'tta.MFI', 'tta.MINUS_DI', 'tta.MINUS_DM', 'tta.MOM', 'tta.PLUS_DI', 'tta.PLUS_DM', 'tta.PPO', 'tta.ROC', 'tta.ROCP', 'tta.ROCR', 'tta.ROCR100', 'tta.RSI', 'tta.STOCH', 'tta.STOCHF', 'tta.STOCHRSI', 'tta.TRIX', 'tta.ULTOSC', 'tta.WILLR', 'tta.AD', 'tta.ADOSC', 'tta.OBV', 'tta.HT_DCPERIOD', 'tta.HT_DCPHASE', 'tta.HT_PHASOR', 'tta.HT_SINE', 'tta.HT_TRENDMODE', 'tta.AVGPRICE', 'tta.MEDPRICE', 'tta.TYPPRICE', 'tta.WCLPRICE', 'tta.ATR', 'tta.NATR', 'tta.TRANGE', 'tta.CDL2CROWS', 'tta.CDL3BLACKCROWS', 'tta.CDL3INSIDE', 'tta.CDL3LINESTRIKE', 'tta.CDL3OUTSIDE', 'tta.CDL3STARSINSOUTH', 'tta.CDL3WHITESOLDIERS', 'tta.CDLABANDONEDBABY', 'tta.CDLADVANCEBLOCK', 'tta.CDLBELTHOLD', 'tta.CDLBREAKAWAY', 'tta.CDLCLOSINGMARUBOZU', 'tta.CDLCONCEALBABYSWALL', 'tta.CDLCOUNTERATTACK', 'tta.CDLDARKCLOUDCOVER', 'tta.CDLDOJI', 'tta.CDLDOJISTAR', 'tta.CDLDRAGONFLYDOJI', 'tta.CDLENGULFING', 'tta.CDLEVENINGDOJISTAR', 'tta.CDLEVENINGSTAR', 'tta.CDLGAPSIDESIDEWHITE', 'tta.CDLGRAVESTONEDOJI', 'tta.CDLHAMMER', 'tta.CDLHANGINGMAN', 'tta.CDLHARAMI', 'tta.CDLHARAMICROSS', 'tta.CDLHIGHWAVE', 'tta.CDLHIKKAKE', 'tta.CDLHIKKAKEMOD', 'tta.CDLHOMINGPIGEON', 'tta.CDLIDENTICAL3CROWS', 'tta.CDLINNECK', 'tta.CDLINVERTEDHAMMER', 'tta.CDLKICKING', 'tta.CDLKICKINGBYLENGTH', 'tta.CDLLADDERBOTTOM', 'tta.CDLLONGLEGGEDDOJI', 'tta.CDLLONGLINE', 'tta.CDLMARUBOZU', 'tta.CDLMATCHINGLOW', 'tta.CDLMATHOLD', 'tta.CDLMORNINGDOJISTAR', 'tta.CDLMORNINGSTAR', 'tta.CDLONNECK', 'tta.CDLPIERCING', 'tta.CDLRICKSHAWMAN', 'tta.CDLRISEFALL3METHODS', 'tta.CDLSEPARATINGLINES', 'tta.CDLSHOOTINGSTAR', 'tta.CDLSHORTLINE', 'tta.CDLSPINNINGTOP', 'tta.CDLSTALLEDPATTERN', 'tta.CDLSTICKSANDWICH', 'tta.CDLTAKURI', 'tta.CDLTASUKIGAP', 'tta.CDLTHRUSTING', 'tta.CDLTRISTAR', 'tta.CDLUNIQUE3RIVER', 'tta.CDLUPSIDEGAP2CROWS', 'tta.CDLXSIDEGAP3METHODS', 'tta.LINEARREG', 'tta.LINEARREG_ANGLE', 'tta.LINEARREG_INTERCEPT', 'tta.LINEARREG_SLOPE', 'tta.STDDEV', 'tta.TSF', 'tta.VAR']
pandas_ta_indicators = ['pta.ao', 'pta.apo', 'pta.bias', 'pta.bop', 'pta.brar', 'pta.cci', 'pta.cfo', 'pta.cg', 'pta.cmo', 'pta.coppock', 'pta.cti', 'pta.dm', 'pta.er', 'pta.eri', 'pta.fisher', 'pta.inertia', 'pta.kdj', 'pta.kst', 'pta.macd', 'pta.mom', 'pta.pgo', 'pta.ppo', 'pta.psl', 'pta.qqe', 'pta.roc', 'pta.rsi', 'pta.rsx', 'pta.rvgi', 'pta.stc', 'pta.slope', 'pta.smi', 'pta.squeeze', 'pta.squeeze_pro', 'pta.stoch', 'pta.stochrsi', 'pta.td_seq', 'pta.trix', 'pta.tsi', 'pta.uo', 'pta.willr', 'pta.alma', 'pta.dema', 'pta.ema', 'pta.fwma', 'pta.hilo', 'pta.hl2', 'pta.hlc3', 'pta.hwma', 'pta.ichimoku', 'pta.jma', 'pta.kama', 'pta.linreg', 'pta.mcgd', 'pta.midpoint', 'pta.midprice', 'pta.ohlc4', 'pta.pwma', 'pta.rma', 'pta.sinwma', 'pta.sma', 'pta.ssf', 'pta.supertrend', 'pta.swma', 'pta.t3', 'pta.tema', 'pta.trima', 'pta.vidya', 'pta.wcp', 'pta.wma', 'pta.zlma', 'pta.entropy', 'pta.kurtosis', 'pta.mad', 'pta.median', 'pta.quantile', 'pta.skew', 'pta.stdev', 'pta.variance', 'pta.zscore', 'pta.adx', 'pta.amat', 'pta.aroon', 'pta.chop', 'pta.cksp', 'pta.decay', 'pta.decreasing', 'pta.dpo', 'pta.increasing', 'pta.psar', 'pta.qstick', 'pta.ttm_trend', 'pta.vhf', 'pta.vortex', 'pta.aberration', 'pta.accbands', 'pta.atr', 'pta.bbands', 'pta.donchian', 'pta.hwc', 'pta.kc', 'pta.massi', 'pta.natr', 'pta.pdist', 'pta.rvi', 'pta.thermo', 'pta.true_range', 'pta.ui', 'pta.ad', 'pta.adosc', 'pta.aobv', 'pta.cmf', 'pta.efi', 'pta.eom', 'pta.kvo', 'pta.mfi', 'pta.nvi', 'pta.obv', 'pta.pvi', 'pta.pvo', 'pta.pvol', 'pta.pvt', 'pta.vp', 'pta.vwap']
finta_indicatrs = ['fta.SMA', 'fta.SMM', 'fta.SSMA', 'fta.EMA', 'fta.DEMA', 'fta.TEMA', 'fta.TRIMA', 'fta.TRIX', 'fta.VAMA', 'fta.ER', 'fta.KAMA', 'fta.ZLEMA', 'fta.WMA', 'fta.HMA', 'fta.EVWMA', 'fta.VWAP', 'fta.SMMA', 'fta.MACD', 'fta.PPO', 'fta.VW_MACD', 'fta.EV_MACD', 'fta.MOM', 'fta.ROC', 'fta.RSI', 'fta.IFT_RSI', 'fta.TR', 'fta.ATR', 'fta.SAR', 'fta.BBANDS', 'fta.BBWIDTH', 'fta.MOBO', 'fta.PERCENT_B', 'fta.KC', 'fta.DO', 'fta.DMI', 'fta.ADX', 'fta.PIVOT', 'fta.PIVOT_FIB', 'fta.STOCH', 'fta.STOCHD', 'fta.STOCHRSI', 'fta.WILLIAMS', 'fta.UO', 'fta.AO', 'fta.MI', 'fta.VORTEX', 'fta.KST', 'fta.TSI', 'fta.TP', 'fta.ADL', 'fta.CHAIKIN', 'fta.MFI', 'fta.OBV', 'fta.WOBV', 'fta.VZO', 'fta.PZO', 'fta.EFI', 'fta.CFI', 'fta.EBBP', 'fta.EMV', 'fta.CCI', 'fta.COPP', 'fta.BASP', 'fta.BASPN', 'fta.CMO', 'fta.CHANDELIER', 'fta.QSTICK', 'fta.WTO', 'fta.FISH', 'fta.ICHIMOKU', 'fta.APZ', 'fta.SQZMI', 'fta.VPT', 'fta.FVE', 'fta.VFI', 'fta.MSD', 'fta.STC'] |
"""Data creating and managing."""
def file2text(filepath, verbose=True):
"""Read all lines of a file into a string.
Note that we destroy all the new line characters
and all the whitespace charecters on both ends
of the line. Note that this is very radical
for source code of programming languages or
similar.
Parameters
----------
filepath : pathlib.Path
Path to the file
verbose : bool
If True, we print the name of the file.
Returns
-------
text : str
All the text found in the input file.
"""
with filepath.open("r") as f:
texts = [line.strip() for line in f.readlines()]
texts = [x for x in texts if x and not x.isspace()]
if verbose:
print(filepath.name)
return " ".join(texts)
def folder2text(folderpath, valid_extensions=None):
"""Collect all files recursively and read into a list of strings."""
texts = []
for p in folderpath.rglob("*"):
if not p.is_file():
continue
if valid_extensions is not None and p.suffix not in valid_extensions:
continue
try:
texts.append(file2text(p))
except UnicodeDecodeError:
continue
return texts
| """Data creating and managing."""
def file2text(filepath, verbose=True):
"""Read all lines of a file into a string.
Note that we destroy all the new line characters
and all the whitespace charecters on both ends
of the line. Note that this is very radical
for source code of programming languages or
similar.
Parameters
----------
filepath : pathlib.Path
Path to the file
verbose : bool
If True, we print the name of the file.
Returns
-------
text : str
All the text found in the input file.
"""
with filepath.open('r') as f:
texts = [line.strip() for line in f.readlines()]
texts = [x for x in texts if x and (not x.isspace())]
if verbose:
print(filepath.name)
return ' '.join(texts)
def folder2text(folderpath, valid_extensions=None):
"""Collect all files recursively and read into a list of strings."""
texts = []
for p in folderpath.rglob('*'):
if not p.is_file():
continue
if valid_extensions is not None and p.suffix not in valid_extensions:
continue
try:
texts.append(file2text(p))
except UnicodeDecodeError:
continue
return texts |
class UltrasonicRegisterTypes:
CONFIG = 0
DATA = 1
UltrasonicA1 = {
UltrasonicRegisterTypes.CONFIG: 0x0C,
UltrasonicRegisterTypes.DATA: 0x0E,
}
UltrasonicA3 = {
UltrasonicRegisterTypes.CONFIG: 0x0D,
UltrasonicRegisterTypes.DATA: 0x0F,
}
UltrasonicRegisters = {
"A1": UltrasonicA1,
"A3": UltrasonicA3,
}
UltrasonicConfigSettings = {
"A1": 0xA1,
"A3": 0xA3,
}
| class Ultrasonicregistertypes:
config = 0
data = 1
ultrasonic_a1 = {UltrasonicRegisterTypes.CONFIG: 12, UltrasonicRegisterTypes.DATA: 14}
ultrasonic_a3 = {UltrasonicRegisterTypes.CONFIG: 13, UltrasonicRegisterTypes.DATA: 15}
ultrasonic_registers = {'A1': UltrasonicA1, 'A3': UltrasonicA3}
ultrasonic_config_settings = {'A1': 161, 'A3': 163} |
# coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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.
#
# Const Class
# this is a auto generated file generated by Cheetah
# Libre Office Version: 7.3
# Namespace: com.sun.star.i18n
class KCharacterType(object):
"""
Const Class
Constants to identify the character type.
Returned by XCharacterClassification.getCharacterType() and XCharacterClassification.getStringType()
See Also:
`API KCharacterType <https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star_1_1i18n_1_1KCharacterType.html>`_
"""
__ooo_ns__: str = 'com.sun.star.i18n'
__ooo_full_ns__: str = 'com.sun.star.i18n.KCharacterType'
__ooo_type_name__: str = 'const'
DIGIT = 1
"""
digit
"""
UPPER = 2
"""
upper case alpha letter
"""
LOWER = 4
"""
lower case alpha letter
"""
TITLE_CASE = 8
"""
title case alpha letter
"""
ALPHA = 14
"""
any alpha, ALPHA = UPPER | LOWER | TITLE_CASE
"""
CONTROL = 16
"""
control character
"""
PRINTABLE = 32
"""
printable character
"""
BASE_FORM = 64
"""
base form
"""
LETTER = 128
"""
any UnicodeType...._LETTER.
Note that a LETTER must not necessarily be ALPHA
"""
__all__ = ['KCharacterType']
| class Kcharactertype(object):
"""
Const Class
Constants to identify the character type.
Returned by XCharacterClassification.getCharacterType() and XCharacterClassification.getStringType()
See Also:
`API KCharacterType <https://api.libreoffice.org/docs/idl/ref/namespacecom_1_1sun_1_1star_1_1i18n_1_1KCharacterType.html>`_
"""
__ooo_ns__: str = 'com.sun.star.i18n'
__ooo_full_ns__: str = 'com.sun.star.i18n.KCharacterType'
__ooo_type_name__: str = 'const'
digit = 1
'\n digit\n '
upper = 2
'\n upper case alpha letter\n '
lower = 4
'\n lower case alpha letter\n '
title_case = 8
'\n title case alpha letter\n '
alpha = 14
'\n any alpha, ALPHA = UPPER | LOWER | TITLE_CASE\n '
control = 16
'\n control character\n '
printable = 32
'\n printable character\n '
base_form = 64
'\n base form\n '
letter = 128
'\n any UnicodeType...._LETTER.\n \n Note that a LETTER must not necessarily be ALPHA\n '
__all__ = ['KCharacterType'] |
expected_output = {
'vrf': {
'default': {
'address_family': {
'ipv6': {
'routes': {
'2001:db8:1234::8/128': {
'active': True,
'metric': 1,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::5054:ff:fef2:a625',
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:03:00'
}
}
},
'route': '2001:db8:1234::8/128',
'route_preference': 110,
'source_protocol': 'ospf',
'source_protocol_codes': 'O'
},
'2001:db8:1579::8/128': {
'active': True,
'metric': 1,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::5054:ff:fef2:a625',
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:03:00'
}
}
},
'route': '2001:db8:1579::8/128',
'route_preference': 110,
'source_protocol': 'ospf',
'source_protocol_codes': 'O'
},
'2001:db8:1981::8/128': {
'active': True,
'metric': 1,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::5054:ff:fef2:a625',
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:03:00'
}
}
},
'route': '2001:db8:1981::8/128',
'route_preference': 110,
'source_protocol': 'ospf',
'source_protocol_codes': 'O'
},
'2001:db8:2222::8/128': {
'active': True,
'metric': 1,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::5054:ff:fef2:a625',
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:03:00'
}
}
},
'route': '2001:db8:2222::8/128',
'route_preference': 110,
'source_protocol': 'ospf',
'source_protocol_codes': 'O'
},
'2001:db8:3456::8/128': {
'active': True,
'metric': 1,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::5054:ff:fef2:a625',
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:03:00'
}
}
},
'route': '2001:db8:3456::8/128',
'route_preference': 110,
'source_protocol': 'ospf',
'source_protocol_codes': 'O'
},
'2001:db8:4021::8/128': {
'active': True,
'metric': 1,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::5054:ff:fef2:a625',
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:03:00'
}
}
},
'route': '2001:db8:4021::8/128',
'route_preference': 110,
'source_protocol': 'ospf',
'source_protocol_codes': 'O'
},
'2001:db8:5354::8/128': {
'active': True,
'metric': 1,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::5054:ff:fef2:a625',
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:03:00'
}
}
},
'route': '2001:db8:5354::8/128',
'route_preference': 110,
'source_protocol': 'ospf',
'source_protocol_codes': 'O'
},
'2001:db8:5555::8/128': {
'active': True,
'metric': 1,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::5054:ff:fef2:a625',
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:03:00'
}
}
},
'route': '2001:db8:5555::8/128',
'route_preference': 110,
'source_protocol': 'ospf',
'source_protocol_codes': 'O'
},
'2001:db8:6666::8/128': {
'active': True,
'metric': 1,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::5054:ff:fef2:a625',
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:03:00'
}
}
},
'route': '2001:db8:6666::8/128',
'route_preference': 110,
'source_protocol': 'ospf',
'source_protocol_codes': 'O'
},
'2001:db8:7654::8/128': {
'active': True,
'metric': 1,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::5054:ff:fef2:a625',
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:03:00'
}
}
},
'route': '2001:db8:7654::8/128',
'route_preference': 110,
'source_protocol': 'ospf',
'source_protocol_codes': 'O'
},
'2001:db8:7777::8/128': {
'active': True,
'metric': 1,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::5054:ff:fef2:a625',
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:03:00'
}
}
},
'route': '2001:db8:7777::8/128',
'route_preference': 110,
'source_protocol': 'ospf',
'source_protocol_codes': 'O'
},
'2001:db8:9843::8/128': {
'active': True,
'metric': 1,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::5054:ff:fef2:a625',
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:03:00'
}
}
},
'route': '2001:db8:9843::8/128',
'route_preference': 110,
'source_protocol': 'ospf',
'source_protocol_codes': 'O'
},
'2001:db8:abcd::/64': {
'active': True,
'next_hop': {
'outgoing_interface': {
'GigabitEthernet0/0/0/1': {
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:07:43'
}
}
},
'route': '2001:db8:abcd::/64',
'source_protocol': 'connected',
'source_protocol_codes': 'C'
},
'2001:db8:abcd::1/128': {
'active': True,
'next_hop': {
'outgoing_interface': {
'GigabitEthernet0/0/0/1': {
'outgoing_interface': 'GigabitEthernet0/0/0/1',
'updated': '00:07:43'
}
}
},
'route': '2001:db8:abcd::1/128',
'source_protocol': 'local',
'source_protocol_codes': 'L'
},
'2001:db8:50e0:7b33:5054:ff:fe43:e2ee/128': {
'active': True,
'next_hop': {
'outgoing_interface': {
'MgmtEth0/RP0/CPU0/0': {
'outgoing_interface': 'MgmtEth0/RP0/CPU0/0',
'updated': '00:08:31'
}
}
},
'route': '2001:db8:50e0:7b33:5054:ff:fe43:e2ee/128',
'source_protocol': 'local',
'source_protocol_codes': 'L'
},
'2001:db8:50e0:7b33::/64': {
'active': True,
'next_hop': {
'outgoing_interface': {
'MgmtEth0/RP0/CPU0/0': {
'outgoing_interface': 'MgmtEth0/RP0/CPU0/0',
'updated': '00:08:31'
}
}
},
'route': '2001:db8:50e0:7b33::/64',
'source_protocol': 'connected',
'source_protocol_codes': 'C'
},
'::/0': {
'active': True,
'metric': 0,
'next_hop': {
'next_hop_list': {
1: {
'index': 1,
'next_hop': 'fe80::10ff:fe04:209e',
'outgoing_interface': 'MgmtEth0/RP0/CPU0/0',
'updated': '00:08:31'
}
}
},
'route': '::/0',
'route_preference': 2,
'source_protocol': 'application route',
'source_protocol_codes': 'a*'
}
}
},
},
'last_resort': {
'gateway': 'fe80::10ff:fe04:209e',
'to_network': '::'
},
},
}
}
| expected_output = {'vrf': {'default': {'address_family': {'ipv6': {'routes': {'2001:db8:1234::8/128': {'active': True, 'metric': 1, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::5054:ff:fef2:a625', 'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:03:00'}}}, 'route': '2001:db8:1234::8/128', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '2001:db8:1579::8/128': {'active': True, 'metric': 1, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::5054:ff:fef2:a625', 'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:03:00'}}}, 'route': '2001:db8:1579::8/128', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '2001:db8:1981::8/128': {'active': True, 'metric': 1, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::5054:ff:fef2:a625', 'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:03:00'}}}, 'route': '2001:db8:1981::8/128', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '2001:db8:2222::8/128': {'active': True, 'metric': 1, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::5054:ff:fef2:a625', 'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:03:00'}}}, 'route': '2001:db8:2222::8/128', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '2001:db8:3456::8/128': {'active': True, 'metric': 1, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::5054:ff:fef2:a625', 'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:03:00'}}}, 'route': '2001:db8:3456::8/128', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '2001:db8:4021::8/128': {'active': True, 'metric': 1, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::5054:ff:fef2:a625', 'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:03:00'}}}, 'route': '2001:db8:4021::8/128', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '2001:db8:5354::8/128': {'active': True, 'metric': 1, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::5054:ff:fef2:a625', 'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:03:00'}}}, 'route': '2001:db8:5354::8/128', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '2001:db8:5555::8/128': {'active': True, 'metric': 1, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::5054:ff:fef2:a625', 'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:03:00'}}}, 'route': '2001:db8:5555::8/128', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '2001:db8:6666::8/128': {'active': True, 'metric': 1, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::5054:ff:fef2:a625', 'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:03:00'}}}, 'route': '2001:db8:6666::8/128', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '2001:db8:7654::8/128': {'active': True, 'metric': 1, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::5054:ff:fef2:a625', 'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:03:00'}}}, 'route': '2001:db8:7654::8/128', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '2001:db8:7777::8/128': {'active': True, 'metric': 1, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::5054:ff:fef2:a625', 'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:03:00'}}}, 'route': '2001:db8:7777::8/128', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '2001:db8:9843::8/128': {'active': True, 'metric': 1, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::5054:ff:fef2:a625', 'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:03:00'}}}, 'route': '2001:db8:9843::8/128', 'route_preference': 110, 'source_protocol': 'ospf', 'source_protocol_codes': 'O'}, '2001:db8:abcd::/64': {'active': True, 'next_hop': {'outgoing_interface': {'GigabitEthernet0/0/0/1': {'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:07:43'}}}, 'route': '2001:db8:abcd::/64', 'source_protocol': 'connected', 'source_protocol_codes': 'C'}, '2001:db8:abcd::1/128': {'active': True, 'next_hop': {'outgoing_interface': {'GigabitEthernet0/0/0/1': {'outgoing_interface': 'GigabitEthernet0/0/0/1', 'updated': '00:07:43'}}}, 'route': '2001:db8:abcd::1/128', 'source_protocol': 'local', 'source_protocol_codes': 'L'}, '2001:db8:50e0:7b33:5054:ff:fe43:e2ee/128': {'active': True, 'next_hop': {'outgoing_interface': {'MgmtEth0/RP0/CPU0/0': {'outgoing_interface': 'MgmtEth0/RP0/CPU0/0', 'updated': '00:08:31'}}}, 'route': '2001:db8:50e0:7b33:5054:ff:fe43:e2ee/128', 'source_protocol': 'local', 'source_protocol_codes': 'L'}, '2001:db8:50e0:7b33::/64': {'active': True, 'next_hop': {'outgoing_interface': {'MgmtEth0/RP0/CPU0/0': {'outgoing_interface': 'MgmtEth0/RP0/CPU0/0', 'updated': '00:08:31'}}}, 'route': '2001:db8:50e0:7b33::/64', 'source_protocol': 'connected', 'source_protocol_codes': 'C'}, '::/0': {'active': True, 'metric': 0, 'next_hop': {'next_hop_list': {1: {'index': 1, 'next_hop': 'fe80::10ff:fe04:209e', 'outgoing_interface': 'MgmtEth0/RP0/CPU0/0', 'updated': '00:08:31'}}}, 'route': '::/0', 'route_preference': 2, 'source_protocol': 'application route', 'source_protocol_codes': 'a*'}}}}, 'last_resort': {'gateway': 'fe80::10ff:fe04:209e', 'to_network': '::'}}}} |
DNA_TO_RNA_MAPPER = {
'G' : 'C',
'C' : 'G',
'T' : 'A',
'A' : 'U'
}
def to_rna(dna_strand):
return ''.join([DNA_TO_RNA_MAPPER[letter] for letter in dna_strand])
| dna_to_rna_mapper = {'G': 'C', 'C': 'G', 'T': 'A', 'A': 'U'}
def to_rna(dna_strand):
return ''.join([DNA_TO_RNA_MAPPER[letter] for letter in dna_strand]) |
#program to check whether a given integer is a palindrome or not.
def is_Palindrome(n):
return str(n) == str(n)[::-1]
print(is_Palindrome(100))
print(is_Palindrome(252))
print(is_Palindrome(-838))
print(is_Palindrome('swims'))
print(is_Palindrome(1001)) | def is__palindrome(n):
return str(n) == str(n)[::-1]
print(is__palindrome(100))
print(is__palindrome(252))
print(is__palindrome(-838))
print(is__palindrome('swims'))
print(is__palindrome(1001)) |
class CardType(object):
NUMBER_CARD = 'number_card'
PLUS = 'plus'
PLUS_2 = 'plus_2'
STOP = 'stop'
CHANGE_DIRECTION = 'change_direction'
CHANGE_COLOR = 'change_color'
TAKI = 'taki'
SUPER_TAKI = 'super_taki'
| class Cardtype(object):
number_card = 'number_card'
plus = 'plus'
plus_2 = 'plus_2'
stop = 'stop'
change_direction = 'change_direction'
change_color = 'change_color'
taki = 'taki'
super_taki = 'super_taki' |
# Values.
name = "Monty"
order = [
{"qty": 1, "name": "Widget"},
{"qty": 3, "name": "Carpets"}
]
# Our home-grown template language, based on
# Python's string format syntax.
fancy_templ = """
Hello {name},
You ordered:
{{ for item in order }}
* {item[qty]} x {item[name]}
{{ endfor }}
Thank you.
"""
def format_template(template: str, values: dict) -> str:
"""
Function to process `for` loops in our own simple
template language. Use for loops as so:
{{ for item in list }}
...
{{ endfor }}
"""
loop = ""
loop_elem = ""
loop_iter = ""
in_loop = False
output = ""
for line in template.splitlines(keepends=True):
# Check if starting a loop.
if line.strip().startswith(r"{{ for"):
in_loop = True
# Strip spaces and braces, and parse the `for` statement.
parsed = line.strip("}{ \t\r\n").lstrip("for").split("in")
loop_elem = parsed[0].strip()
loop_iter = parsed[1].strip()
continue
# Check if done with a loop.
if line.strip().startswith(r"{{ endfor }}"):
# Render the contents of the loop now.
for x in values[loop_iter]:
output += loop.format(**{loop_elem: x})
# Reset and then exit the loop.
in_loop = False
loop = ""
continue
# Format the current line or load it into a loop.
if in_loop:
loop += line
else:
output += line.format(**values)
return output
# Render template with our custom function.
output = format_template(
fancy_templ,
{"name": name, "order": order}
)
print(output)
| name = 'Monty'
order = [{'qty': 1, 'name': 'Widget'}, {'qty': 3, 'name': 'Carpets'}]
fancy_templ = '\nHello {name},\nYou ordered:\n{{ for item in order }}\n* {item[qty]} x {item[name]}\n{{ endfor }}\nThank you.\n'
def format_template(template: str, values: dict) -> str:
"""
Function to process `for` loops in our own simple
template language. Use for loops as so:
{{ for item in list }}
...
{{ endfor }}
"""
loop = ''
loop_elem = ''
loop_iter = ''
in_loop = False
output = ''
for line in template.splitlines(keepends=True):
if line.strip().startswith('{{ for'):
in_loop = True
parsed = line.strip('}{ \t\r\n').lstrip('for').split('in')
loop_elem = parsed[0].strip()
loop_iter = parsed[1].strip()
continue
if line.strip().startswith('{{ endfor }}'):
for x in values[loop_iter]:
output += loop.format(**{loop_elem: x})
in_loop = False
loop = ''
continue
if in_loop:
loop += line
else:
output += line.format(**values)
return output
output = format_template(fancy_templ, {'name': name, 'order': order})
print(output) |
# The tail of the list uses its next reference to point back to the head of the
# list.
class CircularQueue:
"""Queue implementation using circular linked list for storage."""
class _Node:
"""Lightweight, nonpublic class for storing a singly linked node."""
__slot__ = '_element', '_next'
def __init__(self, element, next):
self._element = element
self._next = next
def __init__(self):
"""Create an empty queue."""
self._tail = None
self._size = 0
def __len__(self):
"""Return the number of elements in the queue."""
return self._size
def is_empty(self):
"""Return True if the queue is empty."""
return self._size == 0
def first(self):
"""Return(but do not remove) the element at the front of the queue.
Raise IndexError if the queue is empty"""
if self.is_empty():
raise IndexError
head = self._tail._next
return head._element
def dequeue(self):
if self.is_empty():
raise IndexError
oldhead = self._tail._next
if self._size == 1:
self._tail = None
else:
self._tail = oldhead._next
self._size -= 1
return oldhead._element
def enqueue(self, e):
newest = self._Node(e, None)
if self.is_empty():
newest._next = newest
else:
newest._next = self._tail._next
self._tail._next = newest
self._tail = newest
self._size += 1
def rotate(self):
"""Rotate front element to the back of the queue."""
if self._size > 0:
self._tail = self._tail._next
| class Circularqueue:
"""Queue implementation using circular linked list for storage."""
class _Node:
"""Lightweight, nonpublic class for storing a singly linked node."""
__slot__ = ('_element', '_next')
def __init__(self, element, next):
self._element = element
self._next = next
def __init__(self):
"""Create an empty queue."""
self._tail = None
self._size = 0
def __len__(self):
"""Return the number of elements in the queue."""
return self._size
def is_empty(self):
"""Return True if the queue is empty."""
return self._size == 0
def first(self):
"""Return(but do not remove) the element at the front of the queue.
Raise IndexError if the queue is empty"""
if self.is_empty():
raise IndexError
head = self._tail._next
return head._element
def dequeue(self):
if self.is_empty():
raise IndexError
oldhead = self._tail._next
if self._size == 1:
self._tail = None
else:
self._tail = oldhead._next
self._size -= 1
return oldhead._element
def enqueue(self, e):
newest = self._Node(e, None)
if self.is_empty():
newest._next = newest
else:
newest._next = self._tail._next
self._tail._next = newest
self._tail = newest
self._size += 1
def rotate(self):
"""Rotate front element to the back of the queue."""
if self._size > 0:
self._tail = self._tail._next |
#Define Class
class Student:
__name = ""
__math = 0
__science = 0
__english = 0
__grade_average = 0
__grade_status = ""
__status = True
def __init__(self, name, math, science, english):
try:
self.__name = str(name)
self.__math = float(math)
self.__science = float(science)
self.__english = float(english)
except Exception:
self.__status = False
print("Something went wrong.")
def calculate_average(self):
try:
grade_sum = self.__math + self.__science + self.__english
self.__grade_average = grade_sum / 3
self.__grade_status = ""
if(self.__grade_average >= 75):
self.__grade_status = "Passed"
else:
self.__grade_status = "Failed"
except ZeroDivisionError:
print("Zero division error had occured")
self.__status = False
except ArithmeticError:
print("Something went wrong about your numbers supplied")
self.__status = False
except OverflowError:
print("Calculation had exceeded the maximum limit")
self.__status = False
except Exception:
print("Something went wrong")
self.__status = False
def display(self):
self.calculate_average()
if self.__status:
print("\nName: {}".format(self.__name))
print("Math: {}\nScience: {}\nEnglish: {}".format(self.__math, self.__science, self.__english))
print("Average: {} ({})".format(self.__grade_average, self.__grade_status))
else:
print("Unable to calculate")
while True:
action = str(input("\nWould you like to to do \n[A] Calculate Grade\n[B] Exit Application?")).lower()
if(action == 'a'):
name = input("Enter Name:")
math = input("Enter Math Grade:")
science = input("Enter Science Grade:")
english = input("Enter English Grade")
student_instance = Student(name, math, science, english)
student_instance.display()
elif(action == 'b'):
print("Application Exited")
break
else:
continue
| class Student:
__name = ''
__math = 0
__science = 0
__english = 0
__grade_average = 0
__grade_status = ''
__status = True
def __init__(self, name, math, science, english):
try:
self.__name = str(name)
self.__math = float(math)
self.__science = float(science)
self.__english = float(english)
except Exception:
self.__status = False
print('Something went wrong.')
def calculate_average(self):
try:
grade_sum = self.__math + self.__science + self.__english
self.__grade_average = grade_sum / 3
self.__grade_status = ''
if self.__grade_average >= 75:
self.__grade_status = 'Passed'
else:
self.__grade_status = 'Failed'
except ZeroDivisionError:
print('Zero division error had occured')
self.__status = False
except ArithmeticError:
print('Something went wrong about your numbers supplied')
self.__status = False
except OverflowError:
print('Calculation had exceeded the maximum limit')
self.__status = False
except Exception:
print('Something went wrong')
self.__status = False
def display(self):
self.calculate_average()
if self.__status:
print('\nName: {}'.format(self.__name))
print('Math: {}\nScience: {}\nEnglish: {}'.format(self.__math, self.__science, self.__english))
print('Average: {} ({})'.format(self.__grade_average, self.__grade_status))
else:
print('Unable to calculate')
while True:
action = str(input('\nWould you like to to do \n[A] Calculate Grade\n[B] Exit Application?')).lower()
if action == 'a':
name = input('Enter Name:')
math = input('Enter Math Grade:')
science = input('Enter Science Grade:')
english = input('Enter English Grade')
student_instance = student(name, math, science, english)
student_instance.display()
elif action == 'b':
print('Application Exited')
break
else:
continue |
"""
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
"""
def get_rows_and_columns(sparql_results):
if type(sparql_results) is not dict:
return None
if 'head' in sparql_results and 'vars' in sparql_results['head'] and 'results' in sparql_results and 'bindings' in \
sparql_results['results']:
columns = []
for v in sparql_results['head']['vars']:
columns.append(v)
rows = []
for binding in sparql_results['results']['bindings']:
row = []
for c in columns:
if c in binding:
row.append(binding[c]['value'])
else:
row.append('-') # handle non-existent bindings for optional variables.
rows.append(row)
return {
'columns': columns,
'rows': rows
}
else:
return None
| """
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
"""
def get_rows_and_columns(sparql_results):
if type(sparql_results) is not dict:
return None
if 'head' in sparql_results and 'vars' in sparql_results['head'] and ('results' in sparql_results) and ('bindings' in sparql_results['results']):
columns = []
for v in sparql_results['head']['vars']:
columns.append(v)
rows = []
for binding in sparql_results['results']['bindings']:
row = []
for c in columns:
if c in binding:
row.append(binding[c]['value'])
else:
row.append('-')
rows.append(row)
return {'columns': columns, 'rows': rows}
else:
return None |
# Databricks notebook source
# MAGIC %md # CCU002_03-D02-patient_skinny_unassembled
# MAGIC
# MAGIC **Description** Gather together the records for each patient in primary and secondary care before they are assembled into a skinny record for CCU002. The output of this is a global temp View which is then used by **CCU002_03-D03-patient_skinny_record**
# MAGIC
# MAGIC **Author(s)** Sam Hollings, Jenny Cooper
# COMMAND ----------
# MAGIC %md
# MAGIC This notebook will make a single record for each patient with the core facts about that patient, reconciled across the main datasets (primary and secondary care):
# MAGIC
# MAGIC |Column | Content|
# MAGIC |----------------|--------------------|
# MAGIC |NHS_NUMBER_DEID | Patient NHS Number |
# MAGIC |ETHNIC | Patient Ethnicity |
# MAGIC |SEX | Patient Sex |
# MAGIC |DATE_OF_BIRTH | Patient Date of Birth (month level) |
# MAGIC |DATE_OF_DEATH | Patient Date of Death (month level) |
# MAGIC |record_id | The id of the record from which the data was drawn |
# MAGIC |dataset | The dataset from which the record comes from |
# MAGIC |primary | Whether the record refers to primary of secondary care |
# COMMAND ----------
# MAGIC %md ### Set the values for the widgets and import common functions
# COMMAND ----------
#Datasets
hes_apc_data = 'ccu002_03_hes_apc_all_years'
hes_op_data = 'ccu002_03_hes_op_all_years'
hes_ae_data = 'ccu002_03_hes_ae_all_years'
gdppr_data = 'ccu002_03_gdppr_dars_nic_391419_j3w9t'
deaths_data = 'ccu002_03_deaths_dars_nic_391419_j3w9t'
# COMMAND ----------
# MAGIC %run "/Workspaces/dars_nic_391419_j3w9t_collab/CCU002_02/CCU002_02-functions/wrang000_functions"
# COMMAND ----------
# %run "/Workspaces/dars_nic_391419_j3w9t_collab/CCU002_vacc/Data_Curation/in_progress/CCU002_vacc_functions/wrang000_functions
# COMMAND ----------
dbutils.widgets.removeAll();
# COMMAND ----------
database_name, collab_database_name, datawrang_database_name = database_widgets(database_name = 'dars_nic_391419_j3w9t', collab_database_name='dars_nic_391419_j3w9t_collab');
# COMMAND ----------
# MAGIC %md ### Get the secondary care data for each patient
# MAGIC First pull all the patient facts from HES
# COMMAND ----------
spark.sql(f"""
CREATE OR REPLACE GLOBAL TEMP VIEW curr301_patient_skinny_all_hes_apc AS
SELECT DISTINCT PERSON_ID_DEID as NHS_NUMBER_DEID,
ETHNOS as ETHNIC,
SEX,
to_date(MYDOB,'MMyyyy') as DATE_OF_BIRTH ,
NULL as DATE_OF_DEATH,
EPISTART as RECORD_DATE,
epikey as record_id,
"hes_apc" as dataset,
0 as primary,
FYEAR
FROM {datawrang_database_name}.{hes_apc_data}"""
)
# COMMAND ----------
spark.sql(f"""
CREATE OR REPLACE GLOBAL TEMP VIEW curr301_patient_skinny_all_hes_ae AS
SELECT DISTINCT PERSON_ID_DEID as NHS_NUMBER_DEID,
ETHNOS as ETHNIC,
SEX,
date_format(date_trunc("MM", date_add(ARRIVALDATE, -ARRIVALAGE_CALC*365)),"yyyy-MM-dd") as DATE_OF_BIRTH,
NULL as DATE_OF_DEATH,
ARRIVALDATE as RECORD_DATE,
COALESCE(epikey, aekey) as record_id,
"hes_ae" as dataset,
0 as primary,
FYEAR
FROM {datawrang_database_name}.{hes_ae_data}""")
# COMMAND ----------
spark.sql(f"""
CREATE OR REPLACE GLOBAL TEMP VIEW curr301_patient_skinny_all_hes_op AS
SELECT DISTINCT PERSON_ID_DEID as NHS_NUMBER_DEID,
ETHNOS as ETHNIC,
SEX,
date_format(date_trunc("MM", date_add(APPTDATE, -APPTAGE_CALC*365)),"yyyy-MM-dd") as DATE_OF_BIRTH,
NULL as DATE_OF_DEATH,
APPTDATE as RECORD_DATE,
ATTENDKEY as record_id,
'hes_op' as dataset,
0 as primary,
FYEAR
FROM {datawrang_database_name}.{hes_op_data}""")
# COMMAND ----------
# MAGIC %sql
# MAGIC CREATE OR REPLACE GLOBAL TEMP VIEW curr301_patient_skinny_all_hes as
# MAGIC SELECT NHS_NUMBER_DEID, ETHNIC, SEX, DATE_OF_BIRTH, DATE_OF_DEATH, RECORD_DATe, record_id, dataset, primary FROM global_temp.curr301_patient_skinny_all_hes_apc
# MAGIC UNION ALL
# MAGIC SELECT NHS_NUMBER_DEID, ETHNIC, SEX, DATE_OF_BIRTH, DATE_OF_DEATH, RECORD_DATe, record_id, dataset, primary FROM global_temp.curr301_patient_skinny_all_hes_ae
# MAGIC UNION ALL
# MAGIC SELECT NHS_NUMBER_DEID, ETHNIC, SEX, DATE_OF_BIRTH, DATE_OF_DEATH, RECORD_DATe, record_id, dataset, primary FROM global_temp.curr301_patient_skinny_all_hes_op
# COMMAND ----------
# MAGIC %md ## Primary care for each patient
# MAGIC Get the patients in the standard template from GDPPR
# MAGIC
# MAGIC These values are standard for a patient across the system, so its hard to assign a date, so Natasha from primary care told me they use `REPORTING_PERIOD_END_DATE` as the date for these patient features
# COMMAND ----------
spark.sql(f"""
CREATE OR REPLACE GLOBAL TEMP VIEW curr301_patient_skinny_gdppr_patients AS
SELECT NHS_NUMBER_DEID,
gdppr.ETHNIC,
gdppr.SEX,
to_date(string(YEAR_OF_BIRTH),"yyyy") as DATE_OF_BIRTH,
to_date(string(YEAR_OF_DEATH),"yyyy") as DATE_OF_DEATH,
REPORTING_PERIOD_END_DATE as RECORD_DATE, -- I got this off Natasha from Primary Care
NULL as record_id,
'GDPPR' as dataset,
1 as primary
FROM {datawrang_database_name}.{gdppr_data} as gdppr""")
# COMMAND ----------
# MAGIC %md GDPPR can also store the patient ethnicity in the `CODE` column as a SNOMED code, hence we need to bring this in as another record for the patient (but with null for the other features as they come from the generic record above)
# COMMAND ----------
spark.sql(f"""CREATE OR REPLACE GLOBAL TEMP VIEW curr301_patient_skinny_gdppr_patients_SNOMED AS
SELECT NHS_NUMBER_DEID,
eth.PrimaryCode as ETHNIC,
gdppr.SEX,
to_date(string(YEAR_OF_BIRTH),"yyyy") as DATE_OF_BIRTH,
to_date(string(YEAR_OF_DEATH),"yyyy") as DATE_OF_DEATH,
DATE as RECORD_DATE,
NULL as record_id,
'GDPPR_snomed' as dataset,
1 as primary
FROM {datawrang_database_name}.{gdppr_data} as gdppr
INNER JOIN dss_corporate.gdppr_ethnicity_mappings eth on gdppr.CODE = eth.ConceptId""")
# COMMAND ----------
# MAGIC %md ### Single death per patient
# MAGIC In the deaths table (Civil registration deaths), some unfortunate people are down as dying twice. Let's take the most recent death date.
# COMMAND ----------
# MAGIC %sql
# MAGIC CREATE OR REPLACE GLOBAL TEMP VIEW ccu002_single_patient_death AS
# MAGIC
# MAGIC SELECT *
# MAGIC FROM
# MAGIC (SELECT * , row_number() OVER (PARTITION BY DEC_CONF_NHS_NUMBER_CLEAN_DEID
# MAGIC ORDER BY REG_DATE desc, REG_DATE_OF_DEATH desc) as death_rank
# MAGIC FROM dars_nic_391419_j3w9t_collab.ccu002_deaths_dars_nic_391419_j3w9t
# MAGIC ) cte
# MAGIC WHERE death_rank = 1
# MAGIC AND DEC_CONF_NHS_NUMBER_CLEAN_DEID IS NOT NULL
# MAGIC and REG_DATE_OF_DEATH_formatted > '1900-01-01'
# MAGIC AND REG_DATE_OF_DEATH_formatted <= current_date()
# COMMAND ----------
spark.sql(F"""CREATE OR REPLACE GLOBAL TEMP VIEW curr301_patient_skinny_single_patient_death AS
SELECT *
FROM
(SELECT *,
row_number() OVER (PARTITION BY DEC_CONF_NHS_NUMBER_CLEAN_DEID
ORDER BY REG_DATE desc, REG_DATE_OF_DEATH desc,
S_UNDERLYING_COD_ICD10 desc
) as death_rank
FROM {datawrang_database_name}.{deaths_data}
) cte
WHERE death_rank = 1
AND DEC_CONF_NHS_NUMBER_CLEAN_DEID IS NOT NULL
AND REG_DATE_OF_DEATH_FORMATTED > '1900-01-01'
AND REG_DATE_OF_DEATH_FORMATTED <= current_date()
""")
# COMMAND ----------
# MAGIC %md ## Combine Primary and Secondary Care along with Deaths data
# MAGIC Flag some values as NULLs:
# MAGIC - DATE_OF_DEATH flag the following as like NULL: 'NULL', "" empty strings (or just spaces), < 1900-01-01, after the current_date(), after the record_date (the person shouldn't be set to die in the future!)
# MAGIC - DATE_OF_BIRTH flag the following as like NULL: 'NULL', "" empty strings (or just spaces), < 1900-01-01, after the current_date(), after the record_date (the person shouldn't be set to die in the future!)
# MAGIC - SEX flag the following as NULL: 'NULL', empty string, "9", "0" (9 and 0 are coded nulls, like unknown or not specified)
# MAGIC - ETHNIC flag the following as MULL: 'NULL', empty string, "9", "99", "X", "Z" - various types of coded nulls (unknown etc.)
# COMMAND ----------
# MAGIC %sql
# MAGIC CREATE OR REPLACE GLOBAL TEMP VIEW curr301_patient_skinny_unassembled AS
# MAGIC SELECT *,
# MAGIC CASE WHEN ETHNIC IS NULL or TRIM(ETHNIC) IN ("","9", "99", "X" , "Z") THEN 1 ELSE 0 END as ethnic_null,
# MAGIC CASE WHEN SEX IS NULL or TRIM(SEX) IN ("", "9", "0" ) THEN 1 ELSE 0 END as sex_null,
# MAGIC CASE WHEN DATE_OF_BIRTH IS NULL OR TRIM(DATE_OF_BIRTH) = "" OR DATE_OF_BIRTH < '1900-01-01' or DATE_OF_BIRTH > current_date() OR DATE_OF_BIRTH > RECORD_DATE THEN 1 ELSE 0 END as date_of_birth_null,
# MAGIC CASE WHEN DATE_OF_DEATH IS NULL OR TRIM(DATE_OF_DEATH) = "" OR DATE_OF_DEATH < '1900-01-01' OR DATE_OF_DEATH > current_date() OR DATE_OF_DEATH > RECORD_DATE THEN 1 ELSE 0 END as date_of_death_null,
# MAGIC CASE WHEN dataset = 'death' THEN 1 ELSE 0 END as death_table
# MAGIC FROM (
# MAGIC SELECT NHS_NUMBER_DEID,
# MAGIC ETHNIC,
# MAGIC SEX,
# MAGIC DATE_OF_BIRTH,
# MAGIC DATE_OF_DEATH,
# MAGIC RECORD_DATE,
# MAGIC record_id,
# MAGIC dataset,
# MAGIC primary,
# MAGIC care_domain
# MAGIC FROM (
# MAGIC SELECT NHS_NUMBER_DEID,
# MAGIC ETHNIC,
# MAGIC SEX,
# MAGIC DATE_OF_BIRTH,
# MAGIC DATE_OF_DEATH,
# MAGIC RECORD_DATE,
# MAGIC record_id,
# MAGIC dataset,
# MAGIC primary, 'primary' as care_domain
# MAGIC FROM global_temp.curr301_patient_skinny_gdppr_patients
# MAGIC UNION ALL
# MAGIC SELECT NHS_NUMBER_DEID,
# MAGIC ETHNIC,
# MAGIC SEX,
# MAGIC DATE_OF_BIRTH,
# MAGIC DATE_OF_DEATH,
# MAGIC RECORD_DATE,
# MAGIC record_id,
# MAGIC dataset,
# MAGIC primary, 'primary_SNOMED' as care_domain
# MAGIC FROM global_temp.curr301_patient_skinny_gdppr_patients_SNOMED
# MAGIC UNION ALL
# MAGIC SELECT NHS_NUMBER_DEID,
# MAGIC ETHNIC,
# MAGIC SEX,
# MAGIC DATE_OF_BIRTH,
# MAGIC DATE_OF_DEATH,
# MAGIC RECORD_DATE,
# MAGIC record_id,
# MAGIC dataset,
# MAGIC primary, 'secondary' as care_domain
# MAGIC FROM global_temp.curr301_patient_skinny_all_hes
# MAGIC UNION ALL
# MAGIC SELECT DEC_CONF_NHS_NUMBER_CLEAN_DEID as NHS_NUMBER_DEID,
# MAGIC Null as ETHNIC,
# MAGIC Null as SEX,
# MAGIC Null as DATE_OF_BIRTH,
# MAGIC REG_DATE_OF_DEATH_formatted as DATE_OF_DEATH,
# MAGIC REG_DATE_formatted as RECORD_DATE,
# MAGIC Null as record_id,
# MAGIC 'death' as dataset,
# MAGIC 0 as primary, 'death' as care_domain
# MAGIC FROM global_temp.curr301_patient_skinny_single_patient_death
# MAGIC ) all_patients
# MAGIC --LEFT JOIN dars_nic_391419_j3w9t.deaths_dars_nic_391419_j3w9t death on all_patients.NHS_NUMBER_DEID = death.DEC_CONF_NHS_NUMBER_CLEAN_DEID
# MAGIC )
| hes_apc_data = 'ccu002_03_hes_apc_all_years'
hes_op_data = 'ccu002_03_hes_op_all_years'
hes_ae_data = 'ccu002_03_hes_ae_all_years'
gdppr_data = 'ccu002_03_gdppr_dars_nic_391419_j3w9t'
deaths_data = 'ccu002_03_deaths_dars_nic_391419_j3w9t'
dbutils.widgets.removeAll()
(database_name, collab_database_name, datawrang_database_name) = database_widgets(database_name='dars_nic_391419_j3w9t', collab_database_name='dars_nic_391419_j3w9t_collab')
spark.sql(f"""\n CREATE OR REPLACE GLOBAL TEMP VIEW curr301_patient_skinny_all_hes_apc AS\n SELECT DISTINCT PERSON_ID_DEID as NHS_NUMBER_DEID, \n ETHNOS as ETHNIC, \n SEX, \n to_date(MYDOB,'MMyyyy') as DATE_OF_BIRTH , \n NULL as DATE_OF_DEATH, \n EPISTART as RECORD_DATE, \n epikey as record_id,\n "hes_apc" as dataset,\n 0 as primary,\n FYEAR\n FROM {datawrang_database_name}.{hes_apc_data}""")
spark.sql(f'\n CREATE OR REPLACE GLOBAL TEMP VIEW curr301_patient_skinny_all_hes_ae AS\n SELECT DISTINCT PERSON_ID_DEID as NHS_NUMBER_DEID, \n ETHNOS as ETHNIC, \n SEX, \n date_format(date_trunc("MM", date_add(ARRIVALDATE, -ARRIVALAGE_CALC*365)),"yyyy-MM-dd") as DATE_OF_BIRTH,\n NULL as DATE_OF_DEATH, \n ARRIVALDATE as RECORD_DATE, \n COALESCE(epikey, aekey) as record_id,\n "hes_ae" as dataset,\n 0 as primary,\n FYEAR\n FROM {datawrang_database_name}.{hes_ae_data}')
spark.sql(f"""\n CREATE OR REPLACE GLOBAL TEMP VIEW curr301_patient_skinny_all_hes_op AS\n SELECT DISTINCT PERSON_ID_DEID as NHS_NUMBER_DEID, \n ETHNOS as ETHNIC, \n SEX,\n date_format(date_trunc("MM", date_add(APPTDATE, -APPTAGE_CALC*365)),"yyyy-MM-dd") as DATE_OF_BIRTH,\n NULL as DATE_OF_DEATH,\n APPTDATE as RECORD_DATE,\n ATTENDKEY as record_id,\n 'hes_op' as dataset,\n 0 as primary,\n FYEAR\n FROM {datawrang_database_name}.{hes_op_data}""")
spark.sql(f"""\nCREATE OR REPLACE GLOBAL TEMP VIEW curr301_patient_skinny_gdppr_patients AS\n SELECT NHS_NUMBER_DEID, \n gdppr.ETHNIC, \n gdppr.SEX,\n to_date(string(YEAR_OF_BIRTH),"yyyy") as DATE_OF_BIRTH,\n to_date(string(YEAR_OF_DEATH),"yyyy") as DATE_OF_DEATH,\n REPORTING_PERIOD_END_DATE as RECORD_DATE, -- I got this off Natasha from Primary Care\n NULL as record_id,\n 'GDPPR' as dataset,\n 1 as primary\n FROM {datawrang_database_name}.{gdppr_data} as gdppr""")
spark.sql(f"""CREATE OR REPLACE GLOBAL TEMP VIEW curr301_patient_skinny_gdppr_patients_SNOMED AS\n SELECT NHS_NUMBER_DEID, \n eth.PrimaryCode as ETHNIC, \n gdppr.SEX,\n to_date(string(YEAR_OF_BIRTH),"yyyy") as DATE_OF_BIRTH,\n to_date(string(YEAR_OF_DEATH),"yyyy") as DATE_OF_DEATH,\n DATE as RECORD_DATE,\n NULL as record_id,\n 'GDPPR_snomed' as dataset,\n 1 as primary\n FROM {datawrang_database_name}.{gdppr_data} as gdppr\n INNER JOIN dss_corporate.gdppr_ethnicity_mappings eth on gdppr.CODE = eth.ConceptId""")
spark.sql(f"CREATE OR REPLACE GLOBAL TEMP VIEW curr301_patient_skinny_single_patient_death AS\n\nSELECT *\nFROM\n (SELECT *,\n row_number() OVER (PARTITION BY DEC_CONF_NHS_NUMBER_CLEAN_DEID \n ORDER BY REG_DATE desc, REG_DATE_OF_DEATH desc,\n S_UNDERLYING_COD_ICD10 desc \n ) as death_rank\n FROM {datawrang_database_name}.{deaths_data}\n ) cte\nWHERE death_rank = 1\nAND DEC_CONF_NHS_NUMBER_CLEAN_DEID IS NOT NULL\nAND REG_DATE_OF_DEATH_FORMATTED > '1900-01-01'\nAND REG_DATE_OF_DEATH_FORMATTED <= current_date()\n") |
def sync_consume():
while True:
print(q.get())
q.task_done()
def sync_produce():
consumer = Thread(target=sync_consume, daemon=True)
consumer.start()
for i in range(10):
q.put(i)
q.join()
sync_produce() | def sync_consume():
while True:
print(q.get())
q.task_done()
def sync_produce():
consumer = thread(target=sync_consume, daemon=True)
consumer.start()
for i in range(10):
q.put(i)
q.join()
sync_produce() |
list1 = [15, -1, 11, -5, -5, 5, 3, -1, -7, 13, -11, -11, 7, 13] # Base list
even_list = [] # Creates blank list
# Problem 3 code
for i in list1: # Iterates through list1 assigning i to the next value each time through
if i % 2 == 0: # If 'i' is divisible by 2 (even) then:
even_list.append(i) # Add the value of 'i' to a new list 'even_list'
print(even_list) # Print the value of 'even_list'
# New code
smallest = even_list[0] # Set smallest variable to the 0 index of even_list
for x in even_list: # Iterates through even_list assigning 'x' to the next value each time through
if x < smallest: # if 'x' is less than the current value of 'smallest'
smallest = x # re-assign 'smallest' to the value of x, as x is smaller
else: # else if 'x' is not less than smallest
pass # do nothing
print(smallest) # finally, print the value of smallest
| list1 = [15, -1, 11, -5, -5, 5, 3, -1, -7, 13, -11, -11, 7, 13]
even_list = []
for i in list1:
if i % 2 == 0:
even_list.append(i)
print(even_list)
smallest = even_list[0]
for x in even_list:
if x < smallest:
smallest = x
else:
pass
print(smallest) |
#* Asked in Microsoft
#? You 2 integers n and m representing an n by m grid, determine the number of ways you can get
#? from the top-left to the bottom-right of the matrix y going only right or down.
#? Example:
#? n = 2, m = 2
#? This should return 2, since the only possible routes are:
#? Right, down
#? Down, right.
#* Good Old Recursive way, slow but good for start
def num_ways(n, m):
if n == 1 or m == 1:
return 1
else:
count = 0
count += num_ways(n-1,m)
count += num_ways(n,m-1)
return count
#* Using memory stack for faster execution
#* First create a function that creates hash and passes it to the function
def num_ways_hm(n,m):
# Hash = [[0*m]*n] #! wrong
#!Note: We can create 2D array like [[0]*m]*n,
#! but under the hood python creates shallow arrays(Go on geeks for geeks for deep understanding)
#! in which every multiplied value points to one single value which is fast & memory eff. but it will work weirdly in some situations
#! Copy below 4 lines and Uncomment & execute them somewhere to see this weird phenomena(data structures) called shallow arrays in action
#! Geeks for Geeks article link (https://www.geeksforgeeks.org/python-using-2d-arrays-lists-the-right-way/)
#A = [[0]*3]*3
#print(*A,sep='\n')
#A[0][2] = 1
#print(*A,sep='\n')
#Creating arrays the right way, pretty slow, but we are using python so anyways... XD
hash = [[0 for i in range(m+1)] for j in range(n+1)]
return nw(n,m,hash)
def nw(n,m,hash):
if not hash[n][m] == 0:
return hash[n][m]
else:
if n == 1 or m == 1:
hash[n][m] = 1
#* print(*hash, sep='\n', end='\n\n') For Dynamic prog purpose
return hash[n][m]
else:
hash[n][m] += nw(n-1,m,hash)
hash[n][m] += nw(n,m-1,hash)
#* Hmmm, Got any hints for dynamic programming from these 2 steps ???
#* print(*hash, sep='\n', end='\n\n') For Dynamic Prog Purpose
return hash[n][m]
#* Summoning the all mighty dynamic programing
#? From looking at the stack from above implementation, we can see that first row and first column will be initialized as 1 and every other-
#? element will be a sum of left and top element, lets implement that
def num_ways_dy(n,m):
hash = [[1 for i in range(m)] for j in range(n)] #creating a 2D array of 1s
for i in range(1,n):
for j in range(1,m):
hash[i][j] = hash[i-1][j] + hash[i][j-1]
#? hash[i-1][j] = 0 The above element will not be needed again, so if you want to save some memory than uncomment this step
#* print(*hash, sep='\n', end='\n\n') Dynamicly created array, which will look similar to Recursively created stack
return hash[n-1][m-1]
#* Through Dynamic programing we were able to solve this problem in O(nm) time complexity which will be lowest achievable among all the logics (I guess!!!)
# print(num_ways(2,2))
# #2
# print(num_ways(3,3))
# #6 => get a pen & paper and manually solve how it has 6 ways
# print(num_ways(3, 4))
# # 10
#print(num_ways_hm(2,2))
#2
#print(num_ways_hm(3,3))
#6
#print(num_ways_hm(3, 4))
# 10
print(num_ways_dy(3,3))
# 6
print(num_ways_dy(5,10))
#715
#* We Have implemented dynamic solution so lets go for some absurd grid ;)
#print(num_ways_dy(687,959))
#OUTPUT: 2376990657380170053335691334607333533984188811812145631345039134790343911332428159642142725013610144831574663950650791844562303940291288943131712399908785320572180121301527964878686469921472563748160377794556248126136438009091645386901302323125285511796001262231197322291699018878239824629596965126202851549969922822893518436959566965967970997767013243911713063425734204847252348410514703595845536361680009281489202826487766379681533036147234992632179195481815907027828023578917041920
#* Now try solving this grid using the first simple recursive function.. XDXD Kidding!!! | def num_ways(n, m):
if n == 1 or m == 1:
return 1
else:
count = 0
count += num_ways(n - 1, m)
count += num_ways(n, m - 1)
return count
def num_ways_hm(n, m):
hash = [[0 for i in range(m + 1)] for j in range(n + 1)]
return nw(n, m, hash)
def nw(n, m, hash):
if not hash[n][m] == 0:
return hash[n][m]
elif n == 1 or m == 1:
hash[n][m] = 1
return hash[n][m]
else:
hash[n][m] += nw(n - 1, m, hash)
hash[n][m] += nw(n, m - 1, hash)
return hash[n][m]
def num_ways_dy(n, m):
hash = [[1 for i in range(m)] for j in range(n)]
for i in range(1, n):
for j in range(1, m):
hash[i][j] = hash[i - 1][j] + hash[i][j - 1]
return hash[n - 1][m - 1]
print(num_ways_dy(3, 3))
print(num_ways_dy(5, 10)) |
class Solution:
def wordBreak(self, s, wordDict):
"""
:type s: str
:type wordDict: List[str]
:rtype: bool
"""
dp = [False] * (len(s) + 1)
dp[0] = True
for i in range(0, len(s)):
if dp[i]:
for word in wordDict:
if s[i:i + len(word)] == word:
dp[i + len(word)] = True
return dp[len(s)]
if __name__ == "__main__":
print(Solution().wordBreak('leetcode', ["leet", "code"]))
print(Solution().wordBreak('applepenapple', ["apple", "pen"]))
print(Solution().wordBreak('catsandog', ["cats", "dog", "sand", "and", "cat"])) | class Solution:
def word_break(self, s, wordDict):
"""
:type s: str
:type wordDict: List[str]
:rtype: bool
"""
dp = [False] * (len(s) + 1)
dp[0] = True
for i in range(0, len(s)):
if dp[i]:
for word in wordDict:
if s[i:i + len(word)] == word:
dp[i + len(word)] = True
return dp[len(s)]
if __name__ == '__main__':
print(solution().wordBreak('leetcode', ['leet', 'code']))
print(solution().wordBreak('applepenapple', ['apple', 'pen']))
print(solution().wordBreak('catsandog', ['cats', 'dog', 'sand', 'and', 'cat'])) |
#
# PySNMP MIB module Juniper-IPsec-Tunnel-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Juniper-IPsec-Tunnel-MIB
# Produced by pysmi-0.3.4 at Wed May 1 14:03:12 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, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ConstraintsUnion, ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "ValueSizeConstraint", "ValueRangeConstraint", "SingleValueConstraint", "ConstraintsIntersection")
InterfaceIndex, = mibBuilder.importSymbols("IF-MIB", "InterfaceIndex")
juniMibs, = mibBuilder.importSymbols("Juniper-MIBs", "juniMibs")
JuniNextIfIndex, JuniName = mibBuilder.importSymbols("Juniper-TC", "JuniNextIfIndex", "JuniName")
ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup")
IpAddress, Counter64, Bits, ObjectIdentity, NotificationType, Gauge32, ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, Unsigned32, Integer32, Counter32, MibIdentifier, TimeTicks, iso = mibBuilder.importSymbols("SNMPv2-SMI", "IpAddress", "Counter64", "Bits", "ObjectIdentity", "NotificationType", "Gauge32", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Unsigned32", "Integer32", "Counter32", "MibIdentifier", "TimeTicks", "iso")
DisplayString, TextualConvention, RowStatus = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention", "RowStatus")
juniIpsecTunnelMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70))
juniIpsecTunnelMIB.setRevisions(('2004-04-06 22:26',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: juniIpsecTunnelMIB.setRevisionsDescriptions(('Initial version of this MIB module.',))
if mibBuilder.loadTexts: juniIpsecTunnelMIB.setLastUpdated('200404062226Z')
if mibBuilder.loadTexts: juniIpsecTunnelMIB.setOrganization('Juniper Networks, Inc.')
if mibBuilder.loadTexts: juniIpsecTunnelMIB.setContactInfo(' Juniper Networks, Inc. Postal: 10 Technology Park Drive Westford, MA 01886-3146 USA Tel: +1 978 589 5800 Email: mib@Juniper.net')
if mibBuilder.loadTexts: juniIpsecTunnelMIB.setDescription('The IPsec Tunnel MIB for the Juniper Networks enterprise.')
class JuniIpsecIdentityType(TextualConvention, Integer32):
description = 'The type of IPsec Phase-1 identity. The Phase-1 identity may be identified by one of the ID types defined in IPSEC DOI.'
status = 'current'
displayHint = 'd'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))
namedValues = NamedValues(("reserved", 0), ("idIpv4Addr", 1), ("idFqdn", 2), ("idUserFqdn", 3), ("idIpv4AddrSubnet", 4), ("idIpv6Addr", 5), ("idIpv6AddrSubnet", 6), ("idIpv4AddrRange", 7), ("idIpv6AddrRange", 8), ("idDn", 9), ("idDerAsn1Gn", 10), ("idKeyId", 11))
class JuniIpsecTransformType(TextualConvention, Integer32):
description = 'The transform algorithm for the IPsec tunnel.'
status = 'current'
displayHint = 'd'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10))
namedValues = NamedValues(("reserved", 0), ("ahMd5", 1), ("ahSha", 2), ("espDesMd5", 3), ("esp3DesMd5", 4), ("espDesSha", 5), ("esp3DesSha", 6), ("espNullMd5", 7), ("espNullSha", 8), ("espDesNullAuth", 9), ("esp3DesNullAuth", 10))
class JuniIpsecPfsGroup(TextualConvention, Integer32):
description = 'The perfect forward secrecy group. Group1 - 768-bit DH prime modulus group. Group2 - 1024-bit DH prime modulus group. Group5 - 1536-bit DH prime modulus group.'
status = 'current'
displayHint = 'd'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1, 2, 5))
namedValues = NamedValues(("noGroup", 0), ("group1", 1), ("group2", 2), ("group5", 5))
class JuniIpsecTunnelType(TextualConvention, Integer32):
description = 'The ipsec tunnel type.'
status = 'current'
displayHint = 'd'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(0, 1))
namedValues = NamedValues(("signaledTunnel", 0), ("manualTunnel", 1))
class Spi(TextualConvention, Unsigned32):
description = 'The type of the SPI associated with IPsec Phase-2 security associations.'
status = 'current'
displayHint = 'x'
subtypeSpec = Unsigned32.subtypeSpec + ValueRangeConstraint(0, 4294967295)
juniIpsecObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1))
juniIpsecTunnel = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1))
juniIpsecSystem = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2))
juniIpsecTunnelNextIfIndex = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 1), JuniNextIfIndex()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelNextIfIndex.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelNextIfIndex.setDescription('Coordinate ifIndex value allocation for entries in the juniIpsecTunnelIfTable. A GET of this object returns the next available ifIndex value to be used to create an entry in the associated interface table; or zero, if no valid ifIndex value is available. This object also returns a value of zero when it is the lexicographic successor of a varbind presented in an SNMP GETNEXT or GETBULK request, for which circumstance it is assumed that ifIndex allocation is unintended. Successive GETs will typically return different values, thus avoiding collisions among cooperating management clients seeking to create table entries simultaneously.')
juniIpsecTunnelInterfaceTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2), )
if mibBuilder.loadTexts: juniIpsecTunnelInterfaceTable.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelInterfaceTable.setDescription('This table contains entries of IPsec Tunnel interfaces.')
juniIpsecTunnelInterfaceEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1), ).setIndexNames((0, "Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelIfIndex"))
if mibBuilder.loadTexts: juniIpsecTunnelInterfaceEntry.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelInterfaceEntry.setDescription('Each entry describes the characteristics of a single IPsec Tunnel interface. Creating/deleting entries in this table causes corresponding entries for be created/deleted in ifTable/ifXTable/juniIfTable.')
juniIpsecTunnelIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 1), InterfaceIndex())
if mibBuilder.loadTexts: juniIpsecTunnelIfIndex.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelIfIndex.setDescription('The ifIndex of the IPsec tunnel interface. When creating entries in this table, suitable values for this object are determined by reading juniIpsecTunnelNextIfIndex.')
juniIpsecTunnelName = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelName.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelName.setDescription('The administratively assigned name for this IPsec Tunnel interface. Before configuring other tunnel attributes, IPsec tunnel has to be created with minimum attributes (tunnel name and rowStatus).')
juniIpsecTunnelType = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 3), JuniIpsecTunnelType().clone('signaledTunnel')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelType.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelType.setDescription('The configured mode for this IPsec Tunnel interface.')
juniIpsecTunnelTransportVirtualRouter = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 4), JuniName().clone('default')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelTransportVirtualRouter.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransportVirtualRouter.setDescription('The transport virtual router associated with this IPsec tunnel interface. This object need not be set when creating row entries. Note that the default when this object is not specified is the router associated with the agent acting on the management request.')
juniIpsecTunnelLocalEndPt = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 5), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelLocalEndPt.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelLocalEndPt.setDescription('The tunnel local endpoint.')
juniIpsecTunnelRemoteEndPt = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 6), IpAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelRemoteEndPt.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelRemoteEndPt.setDescription('The tunnel remote endpoint.')
juniIpsecTunnelTransformSet = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelTransformSet.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransformSet.setDescription('The transform set. It refers to a transform set that is defined in the transform set table.')
juniIpsecTunnelSrcType = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 8), JuniIpsecIdentityType().clone('idIpv4Addr')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelSrcType.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelSrcType.setDescription('The tunnel source type. The tunnel source may be identified by: 1. an IP(V4) address, or 2. a fully qualified domain name string, or 3. a user fully qualified domain name string.')
juniIpsecTunnelSrcAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 9), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelSrcAddr.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelSrcAddr.setDescription('The tunnel source IP(V4) address.')
juniIpsecTunnelSrcName = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 10), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelSrcName.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelSrcName.setDescription('The tunnel source Name.')
juniIpsecTunnelDstType = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 11), JuniIpsecIdentityType().clone('idIpv4Addr')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelDstType.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelDstType.setDescription('The tunnel destination type. The tunnel destination may be identified by: 1. an IP(V4) address, or 2. a fully qualified domain name string, or 3. a user fully qualified domain name string.')
juniIpsecTunnelDstAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 12), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelDstAddr.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelDstAddr.setDescription('The tunnel destination IP(V4) address.')
juniIpsecTunnelDstName = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 13), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelDstName.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelDstName.setDescription('The tunnel destination Name.')
juniIpsecTunnelBackupDstType = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 14), JuniIpsecIdentityType().clone('idIpv4Addr')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelBackupDstType.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelBackupDstType.setDescription('The tunnel backup destination type. The tunnel backup destination type has to be the same as the tunnel destination type The tunnel destination may be identified by: 1. an IP(V4) address, or 2. a fully qualified domain name string, 3. a user fully qualified domain name string.')
juniIpsecTunnelBackupDstAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 15), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelBackupDstAddr.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelBackupDstAddr.setDescription('The tunnel backup destination IP(V4) address.')
juniIpsecTunnelBackupDstName = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 16), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 80))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelBackupDstName.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelBackupDstName.setDescription('The tunnel backup destination Name.')
juniIpsecTunnelLocalIdType = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 17), JuniIpsecIdentityType().clone('idIpv4Addr')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelLocalIdType.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelLocalIdType.setDescription('The tunnel phase-2 local identity type. The tunnel local identity type may be identified by: 1. an IP address, or 2. an IP address subnet, or 3. an IP address range.')
juniIpsecTunnelLocalIdAddr1 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 18), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelLocalIdAddr1.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelLocalIdAddr1.setDescription('The tunnel local phase-2 identity IP address 1.')
juniIpsecTunnelLocalIdAddr2 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 19), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelLocalIdAddr2.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelLocalIdAddr2.setDescription('The tunnel local phase-2 identity IP address 2 in the case the identity type is an IP address range. The tunnel local phase-2 identity netmask in the case the identity type is an IP address subnet.')
juniIpsecTunnelRemoteIdType = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 20), JuniIpsecIdentityType().clone('idIpv4Addr')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelRemoteIdType.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelRemoteIdType.setDescription('The tunnel phase-2 remote identity type. The tunnel remote identity type may be identified by: 1. an IP address, or 2. an IP address subnet, or 3. an IP address range.')
juniIpsecTunnelRemoteIdAddr1 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 21), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelRemoteIdAddr1.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelRemoteIdAddr1.setDescription('The tunnel remote phase-2 identity IP address 1.')
juniIpsecTunnelRemoteIdAddr2 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 22), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelRemoteIdAddr2.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelRemoteIdAddr2.setDescription('The tunnel remote phase-2 identity IP address 2 in the case the identity type is an IP address range. The tunnel remote phase-2 identity netmask in the case the identity type is an IP address subnet.')
juniIpsecTunnelLifeTimeSecs = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 23), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(1800, 864000))).setUnits('seconds').setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelLifeTimeSecs.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelLifeTimeSecs.setDescription('The tunnel lifetime in seconds.')
juniIpsecTunnelLifeTimeKBs = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 24), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(102400, 4294967295))).setUnits('kilobytes').setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelLifeTimeKBs.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelLifeTimeKBs.setDescription('The tunnel lifetime in kilobytes.')
juniIpsecTunnelPfsGroup = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 25), JuniIpsecPfsGroup()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelPfsGroup.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelPfsGroup.setDescription('The tunnel perfect forward secrecty group.')
juniIpsecTunnelMtu = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 26), Unsigned32().subtype(subtypeSpec=ValueRangeConstraint(160, 9000))).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelMtu.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelMtu.setDescription('The tunnel MTU.')
juniIpsecTunnelInboundSpi1 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 27), Spi()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelInboundSpi1.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelInboundSpi1.setDescription('The tunnel inbound SPI 1.')
juniIpsecTunnelInboundTransform1 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 28), JuniIpsecTransformType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelInboundTransform1.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelInboundTransform1.setDescription('The tunnel inbound transform 1.')
juniIpsecTunnelInboundSpi2 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 29), Spi()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelInboundSpi2.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelInboundSpi2.setDescription('The tunnel inbound SPI 2.')
juniIpsecTunnelInboundTransform2 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 30), JuniIpsecTransformType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelInboundTransform2.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelInboundTransform2.setDescription('The tunnel inbound transform 2.')
juniIpsecTunnelInboundSpi3 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 31), Spi()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelInboundSpi3.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelInboundSpi3.setDescription('The tunnel inbound SPI 3.')
juniIpsecTunnelInboundTransform3 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 32), JuniIpsecTransformType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelInboundTransform3.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelInboundTransform3.setDescription('The tunnel inbound transform 3.')
juniIpsecTunnelInboundSpi4 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 33), Spi()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelInboundSpi4.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelInboundSpi4.setDescription('The tunnel inbound SPI 4.')
juniIpsecTunnelInboundTransform4 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 34), JuniIpsecTransformType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelInboundTransform4.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelInboundTransform4.setDescription('The tunnel inbound transform 4.')
juniIpsecTunnelOutboundSpi = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 35), Spi()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelOutboundSpi.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelOutboundSpi.setDescription('The tunnel outbound SPI.')
juniIpsecTunnelOutboundTransform = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 36), JuniIpsecTransformType()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelOutboundTransform.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelOutboundTransform.setDescription('The tunnel outbound transform.')
juniIpsecTunnelRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 37), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelRowStatus.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelRowStatus.setDescription('Controls creation/deletion of entries in this table according to the RowStatus textual convention, constrained to support the following values only: createAndGo destroy To create an entry in this table, the following entry objects MUST be explicitly configured: juniIpsecTunnelIfRowStatus juniIpsecTunnelName In addition, when creating an entry the following condition must hold: A value for juniIpsecTunnelIfIndex must have been determined previously, typically by reading juniIpsecTunnelNextIfIndex. Once created, the following objects may not be modified: juniIpsecTunnelName juniIpsecTunnelVirtualRouter A corresponding entry in ifTable/ifXTable/juniIfTable is created/ destroyed as a result of creating/destroying an entry in this table.')
juniIpsecTunnelStatTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3), )
if mibBuilder.loadTexts: juniIpsecTunnelStatTable.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatTable.setDescription('The IPsec tunnel interface statistics table. Describes the IPsec tunnel inbound/outbound statistics on IPsec de/encapsulation, de/encryption, and related error statistics.')
juniIpsecTunnelStatEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1), ).setIndexNames((0, "Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatIfIndex"))
if mibBuilder.loadTexts: juniIpsecTunnelStatEntry.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatEntry.setDescription('Describes the ipsec traffic statistics of the ipsec tunnel interface.')
juniIpsecTunnelStatIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 1), InterfaceIndex())
if mibBuilder.loadTexts: juniIpsecTunnelStatIfIndex.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatIfIndex.setDescription('Same value as ifIndex for the corresponding entry in Interfaces MIB ifTable.')
juniIpsecTunnelStatInbUserRecvPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 2), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatInbUserRecvPkts.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatInbUserRecvPkts.setDescription('The total number of inbound user packets (non-error) received for this IPsec tunnel.')
juniIpsecTunnelStatInbUserRecvOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 3), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatInbUserRecvOctets.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatInbUserRecvOctets.setDescription('The total number of inbound user octets (non-error) received for this IPsec tunnel.')
juniIpsecTunnelStatInbAccRecvPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 4), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatInbAccRecvPkts.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatInbAccRecvPkts.setDescription('The total number of inbound encapsulated packets received for this IPsec tunnel.')
juniIpsecTunnelStatInbAccRecvOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 5), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatInbAccRecvOctets.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatInbAccRecvOctets.setDescription('The total number of inbound encapsulated octets received for this IPsec tunnel.')
juniIpsecTunnelStatInbAuthErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatInbAuthErrs.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatInbAuthErrs.setDescription('The total number of inbound packets with authentication errors received for this IPsec tunnel.')
juniIpsecTunnelStatInbReplayErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatInbReplayErrs.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatInbReplayErrs.setDescription('The total number of inbound packets with replay errors received for this IPsec tunnel.')
juniIpsecTunnelStatInbPolicyErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatInbPolicyErrs.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatInbPolicyErrs.setDescription('The total number of inbound packets with inbound policy errors received for this IPsec tunnel.')
juniIpsecTunnelStatInbOtherRecvErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatInbOtherRecvErrs.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatInbOtherRecvErrs.setDescription('The total number of inbound packets with other Rx errors received for this IPsec tunnel.')
juniIpsecTunnelStatInbDecryptErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatInbDecryptErrs.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatInbDecryptErrs.setDescription('The total number of inbound packets with decryption errors received for this IPsec tunnel.')
juniIpsecTunnelStatInbPadErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatInbPadErrs.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatInbPadErrs.setDescription('The total number of inbound packets with pad errors received for this IPsec tunnel.')
juniIpsecTunnelStatOutbUserRecvPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 12), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatOutbUserRecvPkts.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatOutbUserRecvPkts.setDescription('The total number of outbound user packets received for this IPsec tunnel.')
juniIpsecTunnelStatOutbUserRecvOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 13), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatOutbUserRecvOctets.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatOutbUserRecvOctets.setDescription('The total number of outbound user octets received for this IPsec tunnel.')
juniIpsecTunnelStatOutbAccRecvPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 14), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatOutbAccRecvPkts.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatOutbAccRecvPkts.setDescription('The total number of encapsulated outbound packets received for this IPsec tunnel.')
juniIpsecTunnelStatOutbAccRecvOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 15), Counter64()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelStatOutbAccRecvOctets.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatOutbAccRecvOctets.setDescription('The total number of encapsulated outbound octets received for this IPsec tunnel.')
juniIpsecTunnelOutbOtherTxErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 16), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelOutbOtherTxErrs.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelOutbOtherTxErrs.setDescription('The total number of outbound packets with other TX errors for this IPsec tunnel.')
juniIpsecTunnelOutbPolicyErrs = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 17), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecTunnelOutbPolicyErrs.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelOutbPolicyErrs.setDescription('The total number of outbound packets with outbound policy errors for this IPsec tunnel.')
juniIpsecTunnelTransformSetTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4), )
if mibBuilder.loadTexts: juniIpsecTunnelTransformSetTable.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransformSetTable.setDescription('This table contains entries of IPsec transform sets defined for this router.')
juniIpsecTunnelTransformSetEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1), ).setIndexNames((0, "Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelTransformSetName"))
if mibBuilder.loadTexts: juniIpsecTunnelTransformSetEntry.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransformSetEntry.setDescription('Each entry describes a transform set that contains up to 6 IPsec transforms. The transform set name is referenced by the IPsec tunnel as its local IPsec policy.')
juniIpsecTunnelTransformSetName = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 64)))
if mibBuilder.loadTexts: juniIpsecTunnelTransformSetName.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransformSetName.setDescription('The name of the IPsec tunnel transform set.')
juniIpsecTunnelTransform1 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 2), JuniIpsecTransformType().clone('reserved')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelTransform1.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransform1.setDescription('The first IPsec transform in the transform set.')
juniIpsecTunnelTransform2 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 3), JuniIpsecTransformType().clone('reserved')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelTransform2.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransform2.setDescription('The second IPsec transform in the transform set.')
juniIpsecTunnelTransform3 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 4), JuniIpsecTransformType().clone('reserved')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelTransform3.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransform3.setDescription('The third IPsec transform in the transform set.')
juniIpsecTunnelTransform4 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 5), JuniIpsecTransformType()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelTransform4.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransform4.setDescription('The fourth IPsec transform in the transform set.')
juniIpsecTunnelTransform5 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 6), JuniIpsecTransformType().clone('reserved')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelTransform5.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransform5.setDescription('The fifth IPsec transform in the transform set.')
juniIpsecTunnelTransform6 = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 7), JuniIpsecTransformType().clone('reserved')).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelTransform6.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransform6.setDescription('The sixth IPsec transform in the transform set.')
juniIpsecTunnelTransformSetRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 8), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelTransformSetRowStatus.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransformSetRowStatus.setDescription('Controls creation/deletion of entries in this table according to the RowStatus textual convention, constrained to support the following values only: createAndGo destroy To create an entry in this table, the following entry objects MUST be explicitly configured: juniIpsecTunnelTransformSetRowStatus juniIpsecTunnelTransformSetName juniIpsecTunnelTransform1.')
juniIpsecTunnelGlobalLocalEndpointTable = MibTable((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 5), )
if mibBuilder.loadTexts: juniIpsecTunnelGlobalLocalEndpointTable.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelGlobalLocalEndpointTable.setDescription('This table contains entries of global local endpoint for the IPsec tunnel. There is one global local endpoint for each transport virtual router if configured.')
juniIpsecTunnelGlobalLocalEndpointEntry = MibTableRow((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 5, 1), ).setIndexNames((0, "Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelTransportVrRouterIdx"))
if mibBuilder.loadTexts: juniIpsecTunnelGlobalLocalEndpointEntry.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelGlobalLocalEndpointEntry.setDescription('Each entry defines the global local endpoint for the transport virtual router.')
juniIpsecTunnelTransportVrRouterIdx = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 5, 1, 1), Unsigned32())
if mibBuilder.loadTexts: juniIpsecTunnelTransportVrRouterIdx.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelTransportVrRouterIdx.setDescription('The transport virtual router for the global local endpoint.')
juniIpsecTunnelGlobalLocalEndpoint = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 5, 1, 2), IpAddress()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelGlobalLocalEndpoint.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelGlobalLocalEndpoint.setDescription('The global local endpoint for the transport virtual router.')
juniIpsecTunnelGlobalLocalEndpointRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 5, 1, 3), RowStatus()).setMaxAccess("readcreate")
if mibBuilder.loadTexts: juniIpsecTunnelGlobalLocalEndpointRowStatus.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelGlobalLocalEndpointRowStatus.setDescription('Controls creation/deletion of entries in this table according to the RowStatus textual convention, constrained to support the following values only: createAndGo destroy To create an entry in this table, the following entry objects MUST be explicitly configured: juniIpsecTunnelGlobalLocalEndpoint juniIpsecTunnelTransportVrRouterIdx Once created, the global local endpoint can not be changed unless there is no IPsec tunnel references to the local endpoint.')
juniIpsecTunnelSystemStats = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1))
juniIpsecSummaryStatsTotalTunnels = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1, 1), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecSummaryStatsTotalTunnels.setStatus('current')
if mibBuilder.loadTexts: juniIpsecSummaryStatsTotalTunnels.setDescription('The total number of tunnels')
juniIpsecSummaryStatsAdminStatusEnabled = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1, 2), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecSummaryStatsAdminStatusEnabled.setStatus('current')
if mibBuilder.loadTexts: juniIpsecSummaryStatsAdminStatusEnabled.setDescription('The total number of tunnels with administrative status enabled')
juniIpsecSummaryStatsAdminStatusDisabled = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1, 3), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecSummaryStatsAdminStatusDisabled.setStatus('current')
if mibBuilder.loadTexts: juniIpsecSummaryStatsAdminStatusDisabled.setDescription('The total number of tunnels with administrative status disabled')
juniIpsecSummaryStatsOperStatusUp = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1, 4), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecSummaryStatsOperStatusUp.setStatus('current')
if mibBuilder.loadTexts: juniIpsecSummaryStatsOperStatusUp.setDescription('The total number of tunnels with operational status up')
juniIpsecSummaryStatsOperStatusDown = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1, 5), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecSummaryStatsOperStatusDown.setStatus('current')
if mibBuilder.loadTexts: juniIpsecSummaryStatsOperStatusDown.setDescription('The total number of tunnels with operational status down')
juniIpsecSummaryStatsOperStatusNotPresent = MibScalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: juniIpsecSummaryStatsOperStatusNotPresent.setStatus('current')
if mibBuilder.loadTexts: juniIpsecSummaryStatsOperStatusNotPresent.setDescription('The total number of tunnels with operational status not-present')
juniIpsecTunnelMIBConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2))
juniIpsecTunnelMIBCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 1))
juniIpsecTunnelMIBGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 2))
juniIpsecTunnelCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 1, 1)).setObjects(("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelConfigGroup"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatsGroup"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTransformSetGroup"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecGlobalLocalEndpointGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juniIpsecTunnelCompliance = juniIpsecTunnelCompliance.setStatus('obsolete')
if mibBuilder.loadTexts: juniIpsecTunnelCompliance.setDescription('The compliance statement for SNMPv2 entities which implement the IPsec Tunnel MIB.')
juniIpsecTunnelCompliance2 = ModuleCompliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 1, 2)).setObjects(("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelConfigGroup"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatsGroup"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTransformSetGroup"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecGlobalLocalEndpointGroup"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelSystemStatsGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juniIpsecTunnelCompliance2 = juniIpsecTunnelCompliance2.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelCompliance2.setDescription('The compliance statement for SNMPv2 entities which implement the IPsec Tunnel MIB.')
juniIpsecTunnelConfigGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 2, 1)).setObjects(("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelNextIfIndex"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelName"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelType"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelTransportVirtualRouter"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelLocalEndPt"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelRemoteEndPt"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelTransformSet"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelSrcType"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelSrcAddr"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelSrcName"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelDstType"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelDstAddr"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelDstName"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelBackupDstType"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelBackupDstAddr"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelBackupDstName"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelLocalIdType"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelLocalIdAddr1"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelLocalIdAddr2"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelRemoteIdType"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelRemoteIdAddr1"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelRemoteIdAddr2"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelLifeTimeSecs"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelLifeTimeKBs"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelPfsGroup"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelMtu"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelInboundSpi1"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelInboundTransform1"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelInboundSpi2"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelInboundTransform2"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelInboundSpi3"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelInboundTransform3"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelInboundSpi4"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelInboundTransform4"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelOutboundSpi"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelOutboundTransform"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelRowStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juniIpsecTunnelConfigGroup = juniIpsecTunnelConfigGroup.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelConfigGroup.setDescription('A collection of objects providing configuration information of the IPsec tunnel.')
juniIpsecTunnelStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 2, 2)).setObjects(("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatInbUserRecvPkts"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatInbUserRecvOctets"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatInbAccRecvPkts"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatInbAccRecvOctets"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatInbAuthErrs"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatInbReplayErrs"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatInbPolicyErrs"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatInbOtherRecvErrs"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatInbDecryptErrs"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatInbPadErrs"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatOutbUserRecvPkts"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatOutbUserRecvOctets"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatOutbAccRecvPkts"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelStatOutbAccRecvOctets"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelOutbOtherTxErrs"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelOutbPolicyErrs"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juniIpsecTunnelStatsGroup = juniIpsecTunnelStatsGroup.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelStatsGroup.setDescription('A collection of objects providing satistics information of the IPsec tunnel.')
juniIpsecTransformSetGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 2, 3)).setObjects(("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelTransform1"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelTransform2"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelTransform3"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelTransform4"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelTransform5"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelTransform6"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelTransformSetRowStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juniIpsecTransformSetGroup = juniIpsecTransformSetGroup.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTransformSetGroup.setDescription('A collection of objects providing transform set information of the IPsec tunnel.')
juniIpsecGlobalLocalEndpointGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 2, 4)).setObjects(("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelGlobalLocalEndpoint"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecTunnelGlobalLocalEndpointRowStatus"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juniIpsecGlobalLocalEndpointGroup = juniIpsecGlobalLocalEndpointGroup.setStatus('current')
if mibBuilder.loadTexts: juniIpsecGlobalLocalEndpointGroup.setDescription('A collection of objects providing the global local endpoint for the IPsec tunnel.')
juniIpsecTunnelSystemStatsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 2, 5)).setObjects(("Juniper-IPsec-Tunnel-MIB", "juniIpsecSummaryStatsTotalTunnels"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecSummaryStatsAdminStatusEnabled"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecSummaryStatsAdminStatusDisabled"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecSummaryStatsOperStatusUp"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecSummaryStatsOperStatusDown"), ("Juniper-IPsec-Tunnel-MIB", "juniIpsecSummaryStatsOperStatusNotPresent"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juniIpsecTunnelSystemStatsGroup = juniIpsecTunnelSystemStatsGroup.setStatus('current')
if mibBuilder.loadTexts: juniIpsecTunnelSystemStatsGroup.setDescription('A collection of objects providing summary statistics information for IPsec tunnels in one system.')
mibBuilder.exportSymbols("Juniper-IPsec-Tunnel-MIB", juniIpsecTunnelInboundSpi3=juniIpsecTunnelInboundSpi3, juniIpsecTunnelTransformSetRowStatus=juniIpsecTunnelTransformSetRowStatus, juniIpsecTunnelTransform5=juniIpsecTunnelTransform5, juniIpsecSummaryStatsAdminStatusEnabled=juniIpsecSummaryStatsAdminStatusEnabled, juniIpsecTunnelStatInbAccRecvPkts=juniIpsecTunnelStatInbAccRecvPkts, juniIpsecTunnelMtu=juniIpsecTunnelMtu, juniIpsecTunnelTransformSetTable=juniIpsecTunnelTransformSetTable, juniIpsecTunnelSrcType=juniIpsecTunnelSrcType, juniIpsecTunnelInboundSpi4=juniIpsecTunnelInboundSpi4, juniIpsecTunnelOutbOtherTxErrs=juniIpsecTunnelOutbOtherTxErrs, juniIpsecTunnelSrcAddr=juniIpsecTunnelSrcAddr, juniIpsecTunnelInboundTransform3=juniIpsecTunnelInboundTransform3, PYSNMP_MODULE_ID=juniIpsecTunnelMIB, juniIpsecSummaryStatsAdminStatusDisabled=juniIpsecSummaryStatsAdminStatusDisabled, JuniIpsecIdentityType=JuniIpsecIdentityType, juniIpsecTunnelInboundSpi1=juniIpsecTunnelInboundSpi1, juniIpsecTunnelStatOutbAccRecvOctets=juniIpsecTunnelStatOutbAccRecvOctets, juniIpsecTunnelDstName=juniIpsecTunnelDstName, juniIpsecTunnelMIB=juniIpsecTunnelMIB, juniIpsecTunnelStatInbAccRecvOctets=juniIpsecTunnelStatInbAccRecvOctets, juniIpsecTunnelMIBConformance=juniIpsecTunnelMIBConformance, juniIpsecTunnelTransform2=juniIpsecTunnelTransform2, juniIpsecTunnelGlobalLocalEndpointEntry=juniIpsecTunnelGlobalLocalEndpointEntry, juniIpsecSummaryStatsTotalTunnels=juniIpsecSummaryStatsTotalTunnels, juniIpsecTunnelStatInbPolicyErrs=juniIpsecTunnelStatInbPolicyErrs, juniIpsecTunnelStatOutbUserRecvPkts=juniIpsecTunnelStatOutbUserRecvPkts, juniIpsecTunnelInterfaceTable=juniIpsecTunnelInterfaceTable, juniIpsecTunnelStatInbUserRecvPkts=juniIpsecTunnelStatInbUserRecvPkts, juniIpsecTunnelGlobalLocalEndpoint=juniIpsecTunnelGlobalLocalEndpoint, juniIpsecTunnelStatInbOtherRecvErrs=juniIpsecTunnelStatInbOtherRecvErrs, juniIpsecSummaryStatsOperStatusDown=juniIpsecSummaryStatsOperStatusDown, juniIpsecTunnelLocalEndPt=juniIpsecTunnelLocalEndPt, juniIpsecTunnelMIBGroups=juniIpsecTunnelMIBGroups, juniIpsecTunnelConfigGroup=juniIpsecTunnelConfigGroup, juniIpsecTunnelDstType=juniIpsecTunnelDstType, juniIpsecTunnelStatIfIndex=juniIpsecTunnelStatIfIndex, juniIpsecTunnelInboundSpi2=juniIpsecTunnelInboundSpi2, juniIpsecTunnelOutboundTransform=juniIpsecTunnelOutboundTransform, juniIpsecTunnelSystemStats=juniIpsecTunnelSystemStats, juniIpsecTunnelTransform3=juniIpsecTunnelTransform3, juniIpsecTunnelOutboundSpi=juniIpsecTunnelOutboundSpi, juniIpsecGlobalLocalEndpointGroup=juniIpsecGlobalLocalEndpointGroup, juniIpsecTunnelSystemStatsGroup=juniIpsecTunnelSystemStatsGroup, juniIpsecTunnelName=juniIpsecTunnelName, juniIpsecTunnelStatInbAuthErrs=juniIpsecTunnelStatInbAuthErrs, juniIpsecTunnelTransformSetName=juniIpsecTunnelTransformSetName, juniIpsecTunnelBackupDstName=juniIpsecTunnelBackupDstName, juniIpsecTunnelStatInbUserRecvOctets=juniIpsecTunnelStatInbUserRecvOctets, juniIpsecTunnelStatOutbAccRecvPkts=juniIpsecTunnelStatOutbAccRecvPkts, juniIpsecObjects=juniIpsecObjects, JuniIpsecTransformType=JuniIpsecTransformType, juniIpsecTunnelLocalIdAddr1=juniIpsecTunnelLocalIdAddr1, juniIpsecTunnelTransform6=juniIpsecTunnelTransform6, juniIpsecTunnelTransform1=juniIpsecTunnelTransform1, juniIpsecSummaryStatsOperStatusNotPresent=juniIpsecSummaryStatsOperStatusNotPresent, juniIpsecTunnelPfsGroup=juniIpsecTunnelPfsGroup, juniIpsecTunnelType=juniIpsecTunnelType, juniIpsecTunnelStatTable=juniIpsecTunnelStatTable, juniIpsecTunnelRemoteEndPt=juniIpsecTunnelRemoteEndPt, juniIpsecTunnelSrcName=juniIpsecTunnelSrcName, juniIpsecTunnelTransform4=juniIpsecTunnelTransform4, juniIpsecTunnelInboundTransform1=juniIpsecTunnelInboundTransform1, juniIpsecTunnelStatInbDecryptErrs=juniIpsecTunnelStatInbDecryptErrs, juniIpsecTunnelStatInbPadErrs=juniIpsecTunnelStatInbPadErrs, juniIpsecTunnelInterfaceEntry=juniIpsecTunnelInterfaceEntry, Spi=Spi, juniIpsecTunnelStatEntry=juniIpsecTunnelStatEntry, juniIpsecTunnelMIBCompliances=juniIpsecTunnelMIBCompliances, juniIpsecTunnelLifeTimeSecs=juniIpsecTunnelLifeTimeSecs, juniIpsecTunnelBackupDstAddr=juniIpsecTunnelBackupDstAddr, juniIpsecTunnel=juniIpsecTunnel, juniIpsecTunnelNextIfIndex=juniIpsecTunnelNextIfIndex, juniIpsecTransformSetGroup=juniIpsecTransformSetGroup, JuniIpsecPfsGroup=JuniIpsecPfsGroup, juniIpsecTunnelCompliance=juniIpsecTunnelCompliance, JuniIpsecTunnelType=JuniIpsecTunnelType, juniIpsecTunnelGlobalLocalEndpointTable=juniIpsecTunnelGlobalLocalEndpointTable, juniIpsecTunnelCompliance2=juniIpsecTunnelCompliance2, juniIpsecTunnelTransportVirtualRouter=juniIpsecTunnelTransportVirtualRouter, juniIpsecTunnelTransformSetEntry=juniIpsecTunnelTransformSetEntry, juniIpsecSystem=juniIpsecSystem, juniIpsecTunnelRemoteIdAddr1=juniIpsecTunnelRemoteIdAddr1, juniIpsecTunnelInboundTransform2=juniIpsecTunnelInboundTransform2, juniIpsecTunnelLifeTimeKBs=juniIpsecTunnelLifeTimeKBs, juniIpsecTunnelBackupDstType=juniIpsecTunnelBackupDstType, juniIpsecTunnelStatInbReplayErrs=juniIpsecTunnelStatInbReplayErrs, juniIpsecTunnelStatOutbUserRecvOctets=juniIpsecTunnelStatOutbUserRecvOctets, juniIpsecTunnelTransformSet=juniIpsecTunnelTransformSet, juniIpsecTunnelTransportVrRouterIdx=juniIpsecTunnelTransportVrRouterIdx, juniIpsecSummaryStatsOperStatusUp=juniIpsecSummaryStatsOperStatusUp, juniIpsecTunnelRemoteIdAddr2=juniIpsecTunnelRemoteIdAddr2, juniIpsecTunnelDstAddr=juniIpsecTunnelDstAddr, juniIpsecTunnelLocalIdAddr2=juniIpsecTunnelLocalIdAddr2, juniIpsecTunnelLocalIdType=juniIpsecTunnelLocalIdType, juniIpsecTunnelRemoteIdType=juniIpsecTunnelRemoteIdType, juniIpsecTunnelIfIndex=juniIpsecTunnelIfIndex, juniIpsecTunnelInboundTransform4=juniIpsecTunnelInboundTransform4, juniIpsecTunnelOutbPolicyErrs=juniIpsecTunnelOutbPolicyErrs, juniIpsecTunnelStatsGroup=juniIpsecTunnelStatsGroup, juniIpsecTunnelRowStatus=juniIpsecTunnelRowStatus, juniIpsecTunnelGlobalLocalEndpointRowStatus=juniIpsecTunnelGlobalLocalEndpointRowStatus)
| (octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(constraints_union, value_size_constraint, value_range_constraint, single_value_constraint, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ConstraintsUnion', 'ValueSizeConstraint', 'ValueRangeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection')
(interface_index,) = mibBuilder.importSymbols('IF-MIB', 'InterfaceIndex')
(juni_mibs,) = mibBuilder.importSymbols('Juniper-MIBs', 'juniMibs')
(juni_next_if_index, juni_name) = mibBuilder.importSymbols('Juniper-TC', 'JuniNextIfIndex', 'JuniName')
(module_compliance, object_group, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'ObjectGroup', 'NotificationGroup')
(ip_address, counter64, bits, object_identity, notification_type, gauge32, module_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, unsigned32, integer32, counter32, mib_identifier, time_ticks, iso) = mibBuilder.importSymbols('SNMPv2-SMI', 'IpAddress', 'Counter64', 'Bits', 'ObjectIdentity', 'NotificationType', 'Gauge32', 'ModuleIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Unsigned32', 'Integer32', 'Counter32', 'MibIdentifier', 'TimeTicks', 'iso')
(display_string, textual_convention, row_status) = mibBuilder.importSymbols('SNMPv2-TC', 'DisplayString', 'TextualConvention', 'RowStatus')
juni_ipsec_tunnel_mib = module_identity((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70))
juniIpsecTunnelMIB.setRevisions(('2004-04-06 22:26',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
juniIpsecTunnelMIB.setRevisionsDescriptions(('Initial version of this MIB module.',))
if mibBuilder.loadTexts:
juniIpsecTunnelMIB.setLastUpdated('200404062226Z')
if mibBuilder.loadTexts:
juniIpsecTunnelMIB.setOrganization('Juniper Networks, Inc.')
if mibBuilder.loadTexts:
juniIpsecTunnelMIB.setContactInfo(' Juniper Networks, Inc. Postal: 10 Technology Park Drive Westford, MA 01886-3146 USA Tel: +1 978 589 5800 Email: mib@Juniper.net')
if mibBuilder.loadTexts:
juniIpsecTunnelMIB.setDescription('The IPsec Tunnel MIB for the Juniper Networks enterprise.')
class Juniipsecidentitytype(TextualConvention, Integer32):
description = 'The type of IPsec Phase-1 identity. The Phase-1 identity may be identified by one of the ID types defined in IPSEC DOI.'
status = 'current'
display_hint = 'd'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))
named_values = named_values(('reserved', 0), ('idIpv4Addr', 1), ('idFqdn', 2), ('idUserFqdn', 3), ('idIpv4AddrSubnet', 4), ('idIpv6Addr', 5), ('idIpv6AddrSubnet', 6), ('idIpv4AddrRange', 7), ('idIpv6AddrRange', 8), ('idDn', 9), ('idDerAsn1Gn', 10), ('idKeyId', 11))
class Juniipsectransformtype(TextualConvention, Integer32):
description = 'The transform algorithm for the IPsec tunnel.'
status = 'current'
display_hint = 'd'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10))
named_values = named_values(('reserved', 0), ('ahMd5', 1), ('ahSha', 2), ('espDesMd5', 3), ('esp3DesMd5', 4), ('espDesSha', 5), ('esp3DesSha', 6), ('espNullMd5', 7), ('espNullSha', 8), ('espDesNullAuth', 9), ('esp3DesNullAuth', 10))
class Juniipsecpfsgroup(TextualConvention, Integer32):
description = 'The perfect forward secrecy group. Group1 - 768-bit DH prime modulus group. Group2 - 1024-bit DH prime modulus group. Group5 - 1536-bit DH prime modulus group.'
status = 'current'
display_hint = 'd'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1, 2, 5))
named_values = named_values(('noGroup', 0), ('group1', 1), ('group2', 2), ('group5', 5))
class Juniipsectunneltype(TextualConvention, Integer32):
description = 'The ipsec tunnel type.'
status = 'current'
display_hint = 'd'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(0, 1))
named_values = named_values(('signaledTunnel', 0), ('manualTunnel', 1))
class Spi(TextualConvention, Unsigned32):
description = 'The type of the SPI associated with IPsec Phase-2 security associations.'
status = 'current'
display_hint = 'x'
subtype_spec = Unsigned32.subtypeSpec + value_range_constraint(0, 4294967295)
juni_ipsec_objects = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1))
juni_ipsec_tunnel = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1))
juni_ipsec_system = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2))
juni_ipsec_tunnel_next_if_index = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 1), juni_next_if_index()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelNextIfIndex.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelNextIfIndex.setDescription('Coordinate ifIndex value allocation for entries in the juniIpsecTunnelIfTable. A GET of this object returns the next available ifIndex value to be used to create an entry in the associated interface table; or zero, if no valid ifIndex value is available. This object also returns a value of zero when it is the lexicographic successor of a varbind presented in an SNMP GETNEXT or GETBULK request, for which circumstance it is assumed that ifIndex allocation is unintended. Successive GETs will typically return different values, thus avoiding collisions among cooperating management clients seeking to create table entries simultaneously.')
juni_ipsec_tunnel_interface_table = mib_table((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2))
if mibBuilder.loadTexts:
juniIpsecTunnelInterfaceTable.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelInterfaceTable.setDescription('This table contains entries of IPsec Tunnel interfaces.')
juni_ipsec_tunnel_interface_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1)).setIndexNames((0, 'Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelIfIndex'))
if mibBuilder.loadTexts:
juniIpsecTunnelInterfaceEntry.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelInterfaceEntry.setDescription('Each entry describes the characteristics of a single IPsec Tunnel interface. Creating/deleting entries in this table causes corresponding entries for be created/deleted in ifTable/ifXTable/juniIfTable.')
juni_ipsec_tunnel_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 1), interface_index())
if mibBuilder.loadTexts:
juniIpsecTunnelIfIndex.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelIfIndex.setDescription('The ifIndex of the IPsec tunnel interface. When creating entries in this table, suitable values for this object are determined by reading juniIpsecTunnelNextIfIndex.')
juni_ipsec_tunnel_name = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 2), display_string().subtype(subtypeSpec=value_size_constraint(0, 80))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelName.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelName.setDescription('The administratively assigned name for this IPsec Tunnel interface. Before configuring other tunnel attributes, IPsec tunnel has to be created with minimum attributes (tunnel name and rowStatus).')
juni_ipsec_tunnel_type = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 3), juni_ipsec_tunnel_type().clone('signaledTunnel')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelType.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelType.setDescription('The configured mode for this IPsec Tunnel interface.')
juni_ipsec_tunnel_transport_virtual_router = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 4), juni_name().clone('default')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelTransportVirtualRouter.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransportVirtualRouter.setDescription('The transport virtual router associated with this IPsec tunnel interface. This object need not be set when creating row entries. Note that the default when this object is not specified is the router associated with the agent acting on the management request.')
juni_ipsec_tunnel_local_end_pt = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 5), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelLocalEndPt.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelLocalEndPt.setDescription('The tunnel local endpoint.')
juni_ipsec_tunnel_remote_end_pt = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 6), ip_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelRemoteEndPt.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelRemoteEndPt.setDescription('The tunnel remote endpoint.')
juni_ipsec_tunnel_transform_set = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 7), display_string().subtype(subtypeSpec=value_size_constraint(0, 64))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelTransformSet.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransformSet.setDescription('The transform set. It refers to a transform set that is defined in the transform set table.')
juni_ipsec_tunnel_src_type = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 8), juni_ipsec_identity_type().clone('idIpv4Addr')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelSrcType.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelSrcType.setDescription('The tunnel source type. The tunnel source may be identified by: 1. an IP(V4) address, or 2. a fully qualified domain name string, or 3. a user fully qualified domain name string.')
juni_ipsec_tunnel_src_addr = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 9), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelSrcAddr.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelSrcAddr.setDescription('The tunnel source IP(V4) address.')
juni_ipsec_tunnel_src_name = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 10), display_string().subtype(subtypeSpec=value_size_constraint(0, 80))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelSrcName.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelSrcName.setDescription('The tunnel source Name.')
juni_ipsec_tunnel_dst_type = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 11), juni_ipsec_identity_type().clone('idIpv4Addr')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelDstType.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelDstType.setDescription('The tunnel destination type. The tunnel destination may be identified by: 1. an IP(V4) address, or 2. a fully qualified domain name string, or 3. a user fully qualified domain name string.')
juni_ipsec_tunnel_dst_addr = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 12), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelDstAddr.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelDstAddr.setDescription('The tunnel destination IP(V4) address.')
juni_ipsec_tunnel_dst_name = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 13), display_string().subtype(subtypeSpec=value_size_constraint(0, 80))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelDstName.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelDstName.setDescription('The tunnel destination Name.')
juni_ipsec_tunnel_backup_dst_type = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 14), juni_ipsec_identity_type().clone('idIpv4Addr')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelBackupDstType.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelBackupDstType.setDescription('The tunnel backup destination type. The tunnel backup destination type has to be the same as the tunnel destination type The tunnel destination may be identified by: 1. an IP(V4) address, or 2. a fully qualified domain name string, 3. a user fully qualified domain name string.')
juni_ipsec_tunnel_backup_dst_addr = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 15), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelBackupDstAddr.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelBackupDstAddr.setDescription('The tunnel backup destination IP(V4) address.')
juni_ipsec_tunnel_backup_dst_name = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 16), display_string().subtype(subtypeSpec=value_size_constraint(0, 80))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelBackupDstName.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelBackupDstName.setDescription('The tunnel backup destination Name.')
juni_ipsec_tunnel_local_id_type = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 17), juni_ipsec_identity_type().clone('idIpv4Addr')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelLocalIdType.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelLocalIdType.setDescription('The tunnel phase-2 local identity type. The tunnel local identity type may be identified by: 1. an IP address, or 2. an IP address subnet, or 3. an IP address range.')
juni_ipsec_tunnel_local_id_addr1 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 18), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelLocalIdAddr1.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelLocalIdAddr1.setDescription('The tunnel local phase-2 identity IP address 1.')
juni_ipsec_tunnel_local_id_addr2 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 19), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelLocalIdAddr2.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelLocalIdAddr2.setDescription('The tunnel local phase-2 identity IP address 2 in the case the identity type is an IP address range. The tunnel local phase-2 identity netmask in the case the identity type is an IP address subnet.')
juni_ipsec_tunnel_remote_id_type = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 20), juni_ipsec_identity_type().clone('idIpv4Addr')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelRemoteIdType.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelRemoteIdType.setDescription('The tunnel phase-2 remote identity type. The tunnel remote identity type may be identified by: 1. an IP address, or 2. an IP address subnet, or 3. an IP address range.')
juni_ipsec_tunnel_remote_id_addr1 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 21), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelRemoteIdAddr1.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelRemoteIdAddr1.setDescription('The tunnel remote phase-2 identity IP address 1.')
juni_ipsec_tunnel_remote_id_addr2 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 22), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelRemoteIdAddr2.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelRemoteIdAddr2.setDescription('The tunnel remote phase-2 identity IP address 2 in the case the identity type is an IP address range. The tunnel remote phase-2 identity netmask in the case the identity type is an IP address subnet.')
juni_ipsec_tunnel_life_time_secs = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 23), unsigned32().subtype(subtypeSpec=value_range_constraint(1800, 864000))).setUnits('seconds').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelLifeTimeSecs.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelLifeTimeSecs.setDescription('The tunnel lifetime in seconds.')
juni_ipsec_tunnel_life_time_k_bs = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 24), unsigned32().subtype(subtypeSpec=value_range_constraint(102400, 4294967295))).setUnits('kilobytes').setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelLifeTimeKBs.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelLifeTimeKBs.setDescription('The tunnel lifetime in kilobytes.')
juni_ipsec_tunnel_pfs_group = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 25), juni_ipsec_pfs_group()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelPfsGroup.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelPfsGroup.setDescription('The tunnel perfect forward secrecty group.')
juni_ipsec_tunnel_mtu = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 26), unsigned32().subtype(subtypeSpec=value_range_constraint(160, 9000))).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelMtu.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelMtu.setDescription('The tunnel MTU.')
juni_ipsec_tunnel_inbound_spi1 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 27), spi()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundSpi1.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundSpi1.setDescription('The tunnel inbound SPI 1.')
juni_ipsec_tunnel_inbound_transform1 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 28), juni_ipsec_transform_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundTransform1.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundTransform1.setDescription('The tunnel inbound transform 1.')
juni_ipsec_tunnel_inbound_spi2 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 29), spi()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundSpi2.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundSpi2.setDescription('The tunnel inbound SPI 2.')
juni_ipsec_tunnel_inbound_transform2 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 30), juni_ipsec_transform_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundTransform2.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundTransform2.setDescription('The tunnel inbound transform 2.')
juni_ipsec_tunnel_inbound_spi3 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 31), spi()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundSpi3.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundSpi3.setDescription('The tunnel inbound SPI 3.')
juni_ipsec_tunnel_inbound_transform3 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 32), juni_ipsec_transform_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundTransform3.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundTransform3.setDescription('The tunnel inbound transform 3.')
juni_ipsec_tunnel_inbound_spi4 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 33), spi()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundSpi4.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundSpi4.setDescription('The tunnel inbound SPI 4.')
juni_ipsec_tunnel_inbound_transform4 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 34), juni_ipsec_transform_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundTransform4.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelInboundTransform4.setDescription('The tunnel inbound transform 4.')
juni_ipsec_tunnel_outbound_spi = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 35), spi()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelOutboundSpi.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelOutboundSpi.setDescription('The tunnel outbound SPI.')
juni_ipsec_tunnel_outbound_transform = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 36), juni_ipsec_transform_type()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelOutboundTransform.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelOutboundTransform.setDescription('The tunnel outbound transform.')
juni_ipsec_tunnel_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 2, 1, 37), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelRowStatus.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelRowStatus.setDescription('Controls creation/deletion of entries in this table according to the RowStatus textual convention, constrained to support the following values only: createAndGo destroy To create an entry in this table, the following entry objects MUST be explicitly configured: juniIpsecTunnelIfRowStatus juniIpsecTunnelName In addition, when creating an entry the following condition must hold: A value for juniIpsecTunnelIfIndex must have been determined previously, typically by reading juniIpsecTunnelNextIfIndex. Once created, the following objects may not be modified: juniIpsecTunnelName juniIpsecTunnelVirtualRouter A corresponding entry in ifTable/ifXTable/juniIfTable is created/ destroyed as a result of creating/destroying an entry in this table.')
juni_ipsec_tunnel_stat_table = mib_table((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3))
if mibBuilder.loadTexts:
juniIpsecTunnelStatTable.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatTable.setDescription('The IPsec tunnel interface statistics table. Describes the IPsec tunnel inbound/outbound statistics on IPsec de/encapsulation, de/encryption, and related error statistics.')
juni_ipsec_tunnel_stat_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1)).setIndexNames((0, 'Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatIfIndex'))
if mibBuilder.loadTexts:
juniIpsecTunnelStatEntry.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatEntry.setDescription('Describes the ipsec traffic statistics of the ipsec tunnel interface.')
juni_ipsec_tunnel_stat_if_index = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 1), interface_index())
if mibBuilder.loadTexts:
juniIpsecTunnelStatIfIndex.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatIfIndex.setDescription('Same value as ifIndex for the corresponding entry in Interfaces MIB ifTable.')
juni_ipsec_tunnel_stat_inb_user_recv_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 2), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbUserRecvPkts.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbUserRecvPkts.setDescription('The total number of inbound user packets (non-error) received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_inb_user_recv_octets = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 3), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbUserRecvOctets.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbUserRecvOctets.setDescription('The total number of inbound user octets (non-error) received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_inb_acc_recv_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 4), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbAccRecvPkts.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbAccRecvPkts.setDescription('The total number of inbound encapsulated packets received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_inb_acc_recv_octets = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 5), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbAccRecvOctets.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbAccRecvOctets.setDescription('The total number of inbound encapsulated octets received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_inb_auth_errs = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbAuthErrs.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbAuthErrs.setDescription('The total number of inbound packets with authentication errors received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_inb_replay_errs = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbReplayErrs.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbReplayErrs.setDescription('The total number of inbound packets with replay errors received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_inb_policy_errs = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbPolicyErrs.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbPolicyErrs.setDescription('The total number of inbound packets with inbound policy errors received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_inb_other_recv_errs = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbOtherRecvErrs.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbOtherRecvErrs.setDescription('The total number of inbound packets with other Rx errors received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_inb_decrypt_errs = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbDecryptErrs.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbDecryptErrs.setDescription('The total number of inbound packets with decryption errors received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_inb_pad_errs = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbPadErrs.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatInbPadErrs.setDescription('The total number of inbound packets with pad errors received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_outb_user_recv_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 12), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatOutbUserRecvPkts.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatOutbUserRecvPkts.setDescription('The total number of outbound user packets received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_outb_user_recv_octets = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 13), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatOutbUserRecvOctets.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatOutbUserRecvOctets.setDescription('The total number of outbound user octets received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_outb_acc_recv_pkts = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 14), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatOutbAccRecvPkts.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatOutbAccRecvPkts.setDescription('The total number of encapsulated outbound packets received for this IPsec tunnel.')
juni_ipsec_tunnel_stat_outb_acc_recv_octets = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 15), counter64()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelStatOutbAccRecvOctets.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatOutbAccRecvOctets.setDescription('The total number of encapsulated outbound octets received for this IPsec tunnel.')
juni_ipsec_tunnel_outb_other_tx_errs = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 16), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelOutbOtherTxErrs.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelOutbOtherTxErrs.setDescription('The total number of outbound packets with other TX errors for this IPsec tunnel.')
juni_ipsec_tunnel_outb_policy_errs = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 3, 1, 17), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecTunnelOutbPolicyErrs.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelOutbPolicyErrs.setDescription('The total number of outbound packets with outbound policy errors for this IPsec tunnel.')
juni_ipsec_tunnel_transform_set_table = mib_table((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4))
if mibBuilder.loadTexts:
juniIpsecTunnelTransformSetTable.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransformSetTable.setDescription('This table contains entries of IPsec transform sets defined for this router.')
juni_ipsec_tunnel_transform_set_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1)).setIndexNames((0, 'Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelTransformSetName'))
if mibBuilder.loadTexts:
juniIpsecTunnelTransformSetEntry.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransformSetEntry.setDescription('Each entry describes a transform set that contains up to 6 IPsec transforms. The transform set name is referenced by the IPsec tunnel as its local IPsec policy.')
juni_ipsec_tunnel_transform_set_name = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 1), display_string().subtype(subtypeSpec=value_size_constraint(0, 64)))
if mibBuilder.loadTexts:
juniIpsecTunnelTransformSetName.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransformSetName.setDescription('The name of the IPsec tunnel transform set.')
juni_ipsec_tunnel_transform1 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 2), juni_ipsec_transform_type().clone('reserved')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelTransform1.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransform1.setDescription('The first IPsec transform in the transform set.')
juni_ipsec_tunnel_transform2 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 3), juni_ipsec_transform_type().clone('reserved')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelTransform2.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransform2.setDescription('The second IPsec transform in the transform set.')
juni_ipsec_tunnel_transform3 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 4), juni_ipsec_transform_type().clone('reserved')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelTransform3.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransform3.setDescription('The third IPsec transform in the transform set.')
juni_ipsec_tunnel_transform4 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 5), juni_ipsec_transform_type()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelTransform4.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransform4.setDescription('The fourth IPsec transform in the transform set.')
juni_ipsec_tunnel_transform5 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 6), juni_ipsec_transform_type().clone('reserved')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelTransform5.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransform5.setDescription('The fifth IPsec transform in the transform set.')
juni_ipsec_tunnel_transform6 = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 7), juni_ipsec_transform_type().clone('reserved')).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelTransform6.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransform6.setDescription('The sixth IPsec transform in the transform set.')
juni_ipsec_tunnel_transform_set_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 4, 1, 8), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelTransformSetRowStatus.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransformSetRowStatus.setDescription('Controls creation/deletion of entries in this table according to the RowStatus textual convention, constrained to support the following values only: createAndGo destroy To create an entry in this table, the following entry objects MUST be explicitly configured: juniIpsecTunnelTransformSetRowStatus juniIpsecTunnelTransformSetName juniIpsecTunnelTransform1.')
juni_ipsec_tunnel_global_local_endpoint_table = mib_table((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 5))
if mibBuilder.loadTexts:
juniIpsecTunnelGlobalLocalEndpointTable.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelGlobalLocalEndpointTable.setDescription('This table contains entries of global local endpoint for the IPsec tunnel. There is one global local endpoint for each transport virtual router if configured.')
juni_ipsec_tunnel_global_local_endpoint_entry = mib_table_row((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 5, 1)).setIndexNames((0, 'Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelTransportVrRouterIdx'))
if mibBuilder.loadTexts:
juniIpsecTunnelGlobalLocalEndpointEntry.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelGlobalLocalEndpointEntry.setDescription('Each entry defines the global local endpoint for the transport virtual router.')
juni_ipsec_tunnel_transport_vr_router_idx = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 5, 1, 1), unsigned32())
if mibBuilder.loadTexts:
juniIpsecTunnelTransportVrRouterIdx.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelTransportVrRouterIdx.setDescription('The transport virtual router for the global local endpoint.')
juni_ipsec_tunnel_global_local_endpoint = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 5, 1, 2), ip_address()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelGlobalLocalEndpoint.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelGlobalLocalEndpoint.setDescription('The global local endpoint for the transport virtual router.')
juni_ipsec_tunnel_global_local_endpoint_row_status = mib_table_column((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 1, 5, 1, 3), row_status()).setMaxAccess('readcreate')
if mibBuilder.loadTexts:
juniIpsecTunnelGlobalLocalEndpointRowStatus.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelGlobalLocalEndpointRowStatus.setDescription('Controls creation/deletion of entries in this table according to the RowStatus textual convention, constrained to support the following values only: createAndGo destroy To create an entry in this table, the following entry objects MUST be explicitly configured: juniIpsecTunnelGlobalLocalEndpoint juniIpsecTunnelTransportVrRouterIdx Once created, the global local endpoint can not be changed unless there is no IPsec tunnel references to the local endpoint.')
juni_ipsec_tunnel_system_stats = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1))
juni_ipsec_summary_stats_total_tunnels = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1, 1), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecSummaryStatsTotalTunnels.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecSummaryStatsTotalTunnels.setDescription('The total number of tunnels')
juni_ipsec_summary_stats_admin_status_enabled = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1, 2), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecSummaryStatsAdminStatusEnabled.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecSummaryStatsAdminStatusEnabled.setDescription('The total number of tunnels with administrative status enabled')
juni_ipsec_summary_stats_admin_status_disabled = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1, 3), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecSummaryStatsAdminStatusDisabled.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecSummaryStatsAdminStatusDisabled.setDescription('The total number of tunnels with administrative status disabled')
juni_ipsec_summary_stats_oper_status_up = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1, 4), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecSummaryStatsOperStatusUp.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecSummaryStatsOperStatusUp.setDescription('The total number of tunnels with operational status up')
juni_ipsec_summary_stats_oper_status_down = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1, 5), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecSummaryStatsOperStatusDown.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecSummaryStatsOperStatusDown.setDescription('The total number of tunnels with operational status down')
juni_ipsec_summary_stats_oper_status_not_present = mib_scalar((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 1, 2, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
juniIpsecSummaryStatsOperStatusNotPresent.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecSummaryStatsOperStatusNotPresent.setDescription('The total number of tunnels with operational status not-present')
juni_ipsec_tunnel_mib_conformance = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2))
juni_ipsec_tunnel_mib_compliances = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 1))
juni_ipsec_tunnel_mib_groups = mib_identifier((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 2))
juni_ipsec_tunnel_compliance = module_compliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 1, 1)).setObjects(('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelConfigGroup'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatsGroup'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTransformSetGroup'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecGlobalLocalEndpointGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juni_ipsec_tunnel_compliance = juniIpsecTunnelCompliance.setStatus('obsolete')
if mibBuilder.loadTexts:
juniIpsecTunnelCompliance.setDescription('The compliance statement for SNMPv2 entities which implement the IPsec Tunnel MIB.')
juni_ipsec_tunnel_compliance2 = module_compliance((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 1, 2)).setObjects(('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelConfigGroup'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatsGroup'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTransformSetGroup'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecGlobalLocalEndpointGroup'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelSystemStatsGroup'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juni_ipsec_tunnel_compliance2 = juniIpsecTunnelCompliance2.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelCompliance2.setDescription('The compliance statement for SNMPv2 entities which implement the IPsec Tunnel MIB.')
juni_ipsec_tunnel_config_group = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 2, 1)).setObjects(('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelNextIfIndex'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelName'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelType'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelTransportVirtualRouter'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelLocalEndPt'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelRemoteEndPt'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelTransformSet'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelSrcType'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelSrcAddr'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelSrcName'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelDstType'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelDstAddr'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelDstName'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelBackupDstType'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelBackupDstAddr'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelBackupDstName'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelLocalIdType'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelLocalIdAddr1'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelLocalIdAddr2'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelRemoteIdType'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelRemoteIdAddr1'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelRemoteIdAddr2'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelLifeTimeSecs'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelLifeTimeKBs'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelPfsGroup'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelMtu'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelInboundSpi1'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelInboundTransform1'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelInboundSpi2'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelInboundTransform2'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelInboundSpi3'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelInboundTransform3'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelInboundSpi4'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelInboundTransform4'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelOutboundSpi'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelOutboundTransform'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelRowStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juni_ipsec_tunnel_config_group = juniIpsecTunnelConfigGroup.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelConfigGroup.setDescription('A collection of objects providing configuration information of the IPsec tunnel.')
juni_ipsec_tunnel_stats_group = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 2, 2)).setObjects(('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatInbUserRecvPkts'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatInbUserRecvOctets'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatInbAccRecvPkts'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatInbAccRecvOctets'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatInbAuthErrs'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatInbReplayErrs'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatInbPolicyErrs'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatInbOtherRecvErrs'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatInbDecryptErrs'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatInbPadErrs'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatOutbUserRecvPkts'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatOutbUserRecvOctets'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatOutbAccRecvPkts'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelStatOutbAccRecvOctets'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelOutbOtherTxErrs'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelOutbPolicyErrs'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juni_ipsec_tunnel_stats_group = juniIpsecTunnelStatsGroup.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelStatsGroup.setDescription('A collection of objects providing satistics information of the IPsec tunnel.')
juni_ipsec_transform_set_group = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 2, 3)).setObjects(('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelTransform1'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelTransform2'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelTransform3'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelTransform4'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelTransform5'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelTransform6'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelTransformSetRowStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juni_ipsec_transform_set_group = juniIpsecTransformSetGroup.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTransformSetGroup.setDescription('A collection of objects providing transform set information of the IPsec tunnel.')
juni_ipsec_global_local_endpoint_group = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 2, 4)).setObjects(('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelGlobalLocalEndpoint'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecTunnelGlobalLocalEndpointRowStatus'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juni_ipsec_global_local_endpoint_group = juniIpsecGlobalLocalEndpointGroup.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecGlobalLocalEndpointGroup.setDescription('A collection of objects providing the global local endpoint for the IPsec tunnel.')
juni_ipsec_tunnel_system_stats_group = object_group((1, 3, 6, 1, 4, 1, 4874, 2, 2, 70, 2, 2, 5)).setObjects(('Juniper-IPsec-Tunnel-MIB', 'juniIpsecSummaryStatsTotalTunnels'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecSummaryStatsAdminStatusEnabled'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecSummaryStatsAdminStatusDisabled'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecSummaryStatsOperStatusUp'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecSummaryStatsOperStatusDown'), ('Juniper-IPsec-Tunnel-MIB', 'juniIpsecSummaryStatsOperStatusNotPresent'))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
juni_ipsec_tunnel_system_stats_group = juniIpsecTunnelSystemStatsGroup.setStatus('current')
if mibBuilder.loadTexts:
juniIpsecTunnelSystemStatsGroup.setDescription('A collection of objects providing summary statistics information for IPsec tunnels in one system.')
mibBuilder.exportSymbols('Juniper-IPsec-Tunnel-MIB', juniIpsecTunnelInboundSpi3=juniIpsecTunnelInboundSpi3, juniIpsecTunnelTransformSetRowStatus=juniIpsecTunnelTransformSetRowStatus, juniIpsecTunnelTransform5=juniIpsecTunnelTransform5, juniIpsecSummaryStatsAdminStatusEnabled=juniIpsecSummaryStatsAdminStatusEnabled, juniIpsecTunnelStatInbAccRecvPkts=juniIpsecTunnelStatInbAccRecvPkts, juniIpsecTunnelMtu=juniIpsecTunnelMtu, juniIpsecTunnelTransformSetTable=juniIpsecTunnelTransformSetTable, juniIpsecTunnelSrcType=juniIpsecTunnelSrcType, juniIpsecTunnelInboundSpi4=juniIpsecTunnelInboundSpi4, juniIpsecTunnelOutbOtherTxErrs=juniIpsecTunnelOutbOtherTxErrs, juniIpsecTunnelSrcAddr=juniIpsecTunnelSrcAddr, juniIpsecTunnelInboundTransform3=juniIpsecTunnelInboundTransform3, PYSNMP_MODULE_ID=juniIpsecTunnelMIB, juniIpsecSummaryStatsAdminStatusDisabled=juniIpsecSummaryStatsAdminStatusDisabled, JuniIpsecIdentityType=JuniIpsecIdentityType, juniIpsecTunnelInboundSpi1=juniIpsecTunnelInboundSpi1, juniIpsecTunnelStatOutbAccRecvOctets=juniIpsecTunnelStatOutbAccRecvOctets, juniIpsecTunnelDstName=juniIpsecTunnelDstName, juniIpsecTunnelMIB=juniIpsecTunnelMIB, juniIpsecTunnelStatInbAccRecvOctets=juniIpsecTunnelStatInbAccRecvOctets, juniIpsecTunnelMIBConformance=juniIpsecTunnelMIBConformance, juniIpsecTunnelTransform2=juniIpsecTunnelTransform2, juniIpsecTunnelGlobalLocalEndpointEntry=juniIpsecTunnelGlobalLocalEndpointEntry, juniIpsecSummaryStatsTotalTunnels=juniIpsecSummaryStatsTotalTunnels, juniIpsecTunnelStatInbPolicyErrs=juniIpsecTunnelStatInbPolicyErrs, juniIpsecTunnelStatOutbUserRecvPkts=juniIpsecTunnelStatOutbUserRecvPkts, juniIpsecTunnelInterfaceTable=juniIpsecTunnelInterfaceTable, juniIpsecTunnelStatInbUserRecvPkts=juniIpsecTunnelStatInbUserRecvPkts, juniIpsecTunnelGlobalLocalEndpoint=juniIpsecTunnelGlobalLocalEndpoint, juniIpsecTunnelStatInbOtherRecvErrs=juniIpsecTunnelStatInbOtherRecvErrs, juniIpsecSummaryStatsOperStatusDown=juniIpsecSummaryStatsOperStatusDown, juniIpsecTunnelLocalEndPt=juniIpsecTunnelLocalEndPt, juniIpsecTunnelMIBGroups=juniIpsecTunnelMIBGroups, juniIpsecTunnelConfigGroup=juniIpsecTunnelConfigGroup, juniIpsecTunnelDstType=juniIpsecTunnelDstType, juniIpsecTunnelStatIfIndex=juniIpsecTunnelStatIfIndex, juniIpsecTunnelInboundSpi2=juniIpsecTunnelInboundSpi2, juniIpsecTunnelOutboundTransform=juniIpsecTunnelOutboundTransform, juniIpsecTunnelSystemStats=juniIpsecTunnelSystemStats, juniIpsecTunnelTransform3=juniIpsecTunnelTransform3, juniIpsecTunnelOutboundSpi=juniIpsecTunnelOutboundSpi, juniIpsecGlobalLocalEndpointGroup=juniIpsecGlobalLocalEndpointGroup, juniIpsecTunnelSystemStatsGroup=juniIpsecTunnelSystemStatsGroup, juniIpsecTunnelName=juniIpsecTunnelName, juniIpsecTunnelStatInbAuthErrs=juniIpsecTunnelStatInbAuthErrs, juniIpsecTunnelTransformSetName=juniIpsecTunnelTransformSetName, juniIpsecTunnelBackupDstName=juniIpsecTunnelBackupDstName, juniIpsecTunnelStatInbUserRecvOctets=juniIpsecTunnelStatInbUserRecvOctets, juniIpsecTunnelStatOutbAccRecvPkts=juniIpsecTunnelStatOutbAccRecvPkts, juniIpsecObjects=juniIpsecObjects, JuniIpsecTransformType=JuniIpsecTransformType, juniIpsecTunnelLocalIdAddr1=juniIpsecTunnelLocalIdAddr1, juniIpsecTunnelTransform6=juniIpsecTunnelTransform6, juniIpsecTunnelTransform1=juniIpsecTunnelTransform1, juniIpsecSummaryStatsOperStatusNotPresent=juniIpsecSummaryStatsOperStatusNotPresent, juniIpsecTunnelPfsGroup=juniIpsecTunnelPfsGroup, juniIpsecTunnelType=juniIpsecTunnelType, juniIpsecTunnelStatTable=juniIpsecTunnelStatTable, juniIpsecTunnelRemoteEndPt=juniIpsecTunnelRemoteEndPt, juniIpsecTunnelSrcName=juniIpsecTunnelSrcName, juniIpsecTunnelTransform4=juniIpsecTunnelTransform4, juniIpsecTunnelInboundTransform1=juniIpsecTunnelInboundTransform1, juniIpsecTunnelStatInbDecryptErrs=juniIpsecTunnelStatInbDecryptErrs, juniIpsecTunnelStatInbPadErrs=juniIpsecTunnelStatInbPadErrs, juniIpsecTunnelInterfaceEntry=juniIpsecTunnelInterfaceEntry, Spi=Spi, juniIpsecTunnelStatEntry=juniIpsecTunnelStatEntry, juniIpsecTunnelMIBCompliances=juniIpsecTunnelMIBCompliances, juniIpsecTunnelLifeTimeSecs=juniIpsecTunnelLifeTimeSecs, juniIpsecTunnelBackupDstAddr=juniIpsecTunnelBackupDstAddr, juniIpsecTunnel=juniIpsecTunnel, juniIpsecTunnelNextIfIndex=juniIpsecTunnelNextIfIndex, juniIpsecTransformSetGroup=juniIpsecTransformSetGroup, JuniIpsecPfsGroup=JuniIpsecPfsGroup, juniIpsecTunnelCompliance=juniIpsecTunnelCompliance, JuniIpsecTunnelType=JuniIpsecTunnelType, juniIpsecTunnelGlobalLocalEndpointTable=juniIpsecTunnelGlobalLocalEndpointTable, juniIpsecTunnelCompliance2=juniIpsecTunnelCompliance2, juniIpsecTunnelTransportVirtualRouter=juniIpsecTunnelTransportVirtualRouter, juniIpsecTunnelTransformSetEntry=juniIpsecTunnelTransformSetEntry, juniIpsecSystem=juniIpsecSystem, juniIpsecTunnelRemoteIdAddr1=juniIpsecTunnelRemoteIdAddr1, juniIpsecTunnelInboundTransform2=juniIpsecTunnelInboundTransform2, juniIpsecTunnelLifeTimeKBs=juniIpsecTunnelLifeTimeKBs, juniIpsecTunnelBackupDstType=juniIpsecTunnelBackupDstType, juniIpsecTunnelStatInbReplayErrs=juniIpsecTunnelStatInbReplayErrs, juniIpsecTunnelStatOutbUserRecvOctets=juniIpsecTunnelStatOutbUserRecvOctets, juniIpsecTunnelTransformSet=juniIpsecTunnelTransformSet, juniIpsecTunnelTransportVrRouterIdx=juniIpsecTunnelTransportVrRouterIdx, juniIpsecSummaryStatsOperStatusUp=juniIpsecSummaryStatsOperStatusUp, juniIpsecTunnelRemoteIdAddr2=juniIpsecTunnelRemoteIdAddr2, juniIpsecTunnelDstAddr=juniIpsecTunnelDstAddr, juniIpsecTunnelLocalIdAddr2=juniIpsecTunnelLocalIdAddr2, juniIpsecTunnelLocalIdType=juniIpsecTunnelLocalIdType, juniIpsecTunnelRemoteIdType=juniIpsecTunnelRemoteIdType, juniIpsecTunnelIfIndex=juniIpsecTunnelIfIndex, juniIpsecTunnelInboundTransform4=juniIpsecTunnelInboundTransform4, juniIpsecTunnelOutbPolicyErrs=juniIpsecTunnelOutbPolicyErrs, juniIpsecTunnelStatsGroup=juniIpsecTunnelStatsGroup, juniIpsecTunnelRowStatus=juniIpsecTunnelRowStatus, juniIpsecTunnelGlobalLocalEndpointRowStatus=juniIpsecTunnelGlobalLocalEndpointRowStatus) |
# -*- coding: utf-8 -*-
"""
OCR Utility Functions
@author: Shiv Deepak <idlecool@gmail.com>
"""
# Store ocr metadata into the database
#def shn_ocr_store_metadata(source, filename, comment):
# module = "doc"
# resourcename = "document"
# tablename = "%s_%s" % (module, resourcename)
# stream = StringIO(source)
# db[tablename].insert(name=filename,\
# file=db[tablename].file.store(stream,\
# filename),\
# comments=comment,\
# )
# stream.close()
def shn_ocr_downloadpdf(tablename):
""" Generate 'Print PDF' button in the view """
try:
formelements = []
pdfenable = 1 # enable downloadpdf button if xform is available
directprint = 0 # create prompt for multi-language selection
# Get the list of languages
# Function currently fails with tablename = project_project or project_activity
#formelementsls = s3base.s3ocr_get_languages("%s/%s/xforms/create/%s" % (deployment_settings.base.public_url,
# request.application,
# tablename))
#try:
# formelementsls.remove("eng") # avoid duplicating stuff
#except(ValueError):
# pass
# Hard-code list for now
formelementsls = ["en", "es"]
if len(formelementsls) == 0:
pdfenable = 0
if len(formelementsls) == 1:
directprint = 1
if not directprint:
for eachelement in formelementsls:
eachelement = str(eachelement)
l10nlang = s3.l10n_languages[eachelement].read()
formelements.append(DIV(LABEL(l10nlang,
_class="x-form-item-label"),
DIV(INPUT(_name="pdfLangRadio",
_value=eachelement,
_type="radio",
_class="x-form-text x-form-field"),
_class="x-form-element"),
_class="x-form-item",
_tabindex="-1",
_style="height: 25px;"))
htmlform = DIV(DIV(T("Select Language"),
_id="formheader",
_class="x-panel-header"),
FORM(formelements,
_id="download-pdf-form",
_class="x-panel-body x-form",
_action=URL("ocr",
"getpdf/%s" % tablename),
_method="GET",
_name="pdfLangForm"),
_id="download-pdf-form-div",
_class="x-panel")
# download pdf button / ext x-window -----------------------
downloadpdfbtn = DIV(A(IMG(_src="/%s/static/img/pdficon_small.gif" % request.application,
_alt=T("Download PDF")),
_id="download-pdf-btn",
_title=T("Download PDF")),
_style="height: 10px; text-align: right;")
xwindowtitle = DIV(T("Download PDF"),
_class="x-hidden",
_id="download-pdf-window-title")
xwindowscript = SCRIPT(_type="text/javascript",
_src=URL(request.application,
"static",
"scripts/S3/s3.ocr.downloadpdf.js"))
# multiplexing the output ----------------------------------
output = DIV(downloadpdfbtn,
DIV(xwindowtitle,
htmlform,
_class="x-hidden"),
xwindowscript,
_id="s3ocr-printpdf")
if not pdfenable:
output = ""
if directprint:
output = DIV(A(IMG(_src="/%s/static/img/pdficon_small.gif" % request.application,
_alt=T("Download PDF")),
_id="download-pdf-btn",
_title=T("Download PDF"),
_href=URL("ocr", "getpdf/%s" % tablename)),
_style="height: 10px; text-align: right;")
except(AttributeError):
output = ""
return output
| """
OCR Utility Functions
@author: Shiv Deepak <idlecool@gmail.com>
"""
def shn_ocr_downloadpdf(tablename):
""" Generate 'Print PDF' button in the view """
try:
formelements = []
pdfenable = 1
directprint = 0
formelementsls = ['en', 'es']
if len(formelementsls) == 0:
pdfenable = 0
if len(formelementsls) == 1:
directprint = 1
if not directprint:
for eachelement in formelementsls:
eachelement = str(eachelement)
l10nlang = s3.l10n_languages[eachelement].read()
formelements.append(div(label(l10nlang, _class='x-form-item-label'), div(input(_name='pdfLangRadio', _value=eachelement, _type='radio', _class='x-form-text x-form-field'), _class='x-form-element'), _class='x-form-item', _tabindex='-1', _style='height: 25px;'))
htmlform = div(div(t('Select Language'), _id='formheader', _class='x-panel-header'), form(formelements, _id='download-pdf-form', _class='x-panel-body x-form', _action=url('ocr', 'getpdf/%s' % tablename), _method='GET', _name='pdfLangForm'), _id='download-pdf-form-div', _class='x-panel')
downloadpdfbtn = div(a(img(_src='/%s/static/img/pdficon_small.gif' % request.application, _alt=t('Download PDF')), _id='download-pdf-btn', _title=t('Download PDF')), _style='height: 10px; text-align: right;')
xwindowtitle = div(t('Download PDF'), _class='x-hidden', _id='download-pdf-window-title')
xwindowscript = script(_type='text/javascript', _src=url(request.application, 'static', 'scripts/S3/s3.ocr.downloadpdf.js'))
output = div(downloadpdfbtn, div(xwindowtitle, htmlform, _class='x-hidden'), xwindowscript, _id='s3ocr-printpdf')
if not pdfenable:
output = ''
if directprint:
output = div(a(img(_src='/%s/static/img/pdficon_small.gif' % request.application, _alt=t('Download PDF')), _id='download-pdf-btn', _title=t('Download PDF'), _href=url('ocr', 'getpdf/%s' % tablename)), _style='height: 10px; text-align: right;')
except AttributeError:
output = ''
return output |
"""Print all the multiplication tables with numbers from 1 to 10"""
def solution() -> None:
for n in range(11):
multiplicand = n
for i in range(11):
multiplier = i
print(f'{multiplicand} x {multiplier} = {multiplicand * multiplier}')
print()
solution()
| """Print all the multiplication tables with numbers from 1 to 10"""
def solution() -> None:
for n in range(11):
multiplicand = n
for i in range(11):
multiplier = i
print(f'{multiplicand} x {multiplier} = {multiplicand * multiplier}')
print()
solution() |
# coding:utf-8
"""
Name : __init__.py.py
Author : blu
Time : 2022/3/7 17:39
Desc :
"""
| """
Name : __init__.py.py
Author : blu
Time : 2022/3/7 17:39
Desc :
""" |
n = int(input())
give = list(map(int, input().split()))
take = [0]*n
for i in range(n):
take[i] = give.index(i+1) + 1
print(*take, sep = " ") | n = int(input())
give = list(map(int, input().split()))
take = [0] * n
for i in range(n):
take[i] = give.index(i + 1) + 1
print(*take, sep=' ') |
"""Sphinx configuration."""
project = "example-package-lth"
author = "Le Tuan Hai"
copyright = f"2022, {author}"
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx_autodoc_typehints",
]
| """Sphinx configuration."""
project = 'example-package-lth'
author = 'Le Tuan Hai'
copyright = f'2022, {author}'
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.napoleon', 'sphinx_autodoc_typehints'] |
class FailedToSendMessage(Exception):
""""""
class CannotSendMessages(Exception):
""""""
class Forbidden(Exception):
""""""
class RedisNotConnected(RuntimeError):
""""""
| class Failedtosendmessage(Exception):
""""""
class Cannotsendmessages(Exception):
""""""
class Forbidden(Exception):
""""""
class Redisnotconnected(RuntimeError):
"""""" |
count = 0
while True:
index = int(input())
if index == 0: break
aldo, beto = 0, 0
count += 1
for i in range(index):
x, y = map(int, input().split(' '))
beto += y
aldo += x
print("Teste %d" % count)
if beto > aldo:
print("Beto\n")
else:
print("Aldo\n") | count = 0
while True:
index = int(input())
if index == 0:
break
(aldo, beto) = (0, 0)
count += 1
for i in range(index):
(x, y) = map(int, input().split(' '))
beto += y
aldo += x
print('Teste %d' % count)
if beto > aldo:
print('Beto\n')
else:
print('Aldo\n') |
#
# Copyright (c) 2017-2018 Joy Diamond. All rights reserved.
#
@gem('Pearl.Atom')
def gem():
require_gem('Pearl.ClassOrder')
require_gem('Pearl.Method')
require_gem('Pearl.Nub')
lookup_atom = lookup_normal_token
provide_atom = provide_normal_token
def count_newlines__zero(t):
assert (t.ends_in_newline is t.line_marker is false) and (t.newlines is 0)
assert (t.s is intern_string(t.s))
return 0
@export
class PearlToken(Object):
__slots__ = ((
's',
))
ends_in_newline = false
herd_estimate = 0
is_comma = false
is_comment_line = false
is_comment__or__empty_line = false
is_empty_line = false
is_end_of_data = false
is_end_of_data__or__unknown_line = false
is_herd = false
is_identifier = false
is_indentation = false
is_keyword = false
is_keyword_return = false
is_right_parenthesis = false
is_right_square_bracket = false
line_marker = false
newlines = 0
def __init__(t, s):
t.s = s
def __repr__(t):
return arrange('<%s %r>', t.__class__.__name__, t.s)
count_newlines = count_newlines__zero
def display_short_token(t):
return arrange('{%s}', portray_string(t.s)[1:-1])
def display_full_token(t):
return arrange('<%s %s>', t.display_name, portray_string(t.s))
def dump_token(t, f, newline = true):
if t.ends_in_newline:
if t.newlines is 1:
f.partial('{%s}', portray_string(t.s)[1:-1])
else:
many = t.s.splitlines(true)
f.partial('{')
for s in many[:-1]:
f.line(portray_string(s)[1:-1])
f.partial('%s}', portray_string(many[-1])[1:-1])
if newline:
f.line()
return false
return true
if t.newlines is 0:
f.partial('{%s}', portray_string(t.s)[1:-1])
return
many = t.s.splitlines(true)
f.partial('{')
for s in many[:-1]:
f.line(portray_string(s)[1:-1])
f.partial('%s}', portray_string(many[-1])[1:-1])
display_token = __repr__
is_name = is_name__0
nub = static_conjure_nub
order = order__s
def write(t, w):
w(t.s)
@export
class Identifier(PearlToken):
__slots__ = (())
class_order = CLASS_ORDER__NORMAL_TOKEN
display_name = 'Identifier'
is__atom__or__special_operator = true
is_atom = true
is_colon = false
is_identifier = true
is_right_brace = false
is_special_operator = false
def add_parameters(t, art):
art.add_parameter(t)
def display_token(t):
return t.s
find_identifier = return_self
def is_name(t, s):
return t.s == s
mutate = mutate__self
scout_default_values = scout_default_values__0
def scout_variables(t, art):
art.fetch_variable(t)
transform = transform__self
def write_variables(t, art):
art.write_variable(t)
write_import = write_variables
@export
def produce_conjure_atom(name, Meta):
assert type(name) is String
assert type(Meta) is Type
@rename('conjure_%s', name)
def conjure_atom(s):
r = lookup_atom(s)
if r is not none:
return r
assert s.count('\n') is 0
s = intern_string(s)
return provide_atom(s, Meta(s))
return conjure_atom
conjure_name = produce_conjure_atom('name', Identifier)
export(
'conjure_name', conjure_name,
)
| @gem('Pearl.Atom')
def gem():
require_gem('Pearl.ClassOrder')
require_gem('Pearl.Method')
require_gem('Pearl.Nub')
lookup_atom = lookup_normal_token
provide_atom = provide_normal_token
def count_newlines__zero(t):
assert t.ends_in_newline is t.line_marker is false and t.newlines is 0
assert t.s is intern_string(t.s)
return 0
@export
class Pearltoken(Object):
__slots__ = ('s',)
ends_in_newline = false
herd_estimate = 0
is_comma = false
is_comment_line = false
is_comment__or__empty_line = false
is_empty_line = false
is_end_of_data = false
is_end_of_data__or__unknown_line = false
is_herd = false
is_identifier = false
is_indentation = false
is_keyword = false
is_keyword_return = false
is_right_parenthesis = false
is_right_square_bracket = false
line_marker = false
newlines = 0
def __init__(t, s):
t.s = s
def __repr__(t):
return arrange('<%s %r>', t.__class__.__name__, t.s)
count_newlines = count_newlines__zero
def display_short_token(t):
return arrange('{%s}', portray_string(t.s)[1:-1])
def display_full_token(t):
return arrange('<%s %s>', t.display_name, portray_string(t.s))
def dump_token(t, f, newline=true):
if t.ends_in_newline:
if t.newlines is 1:
f.partial('{%s}', portray_string(t.s)[1:-1])
else:
many = t.s.splitlines(true)
f.partial('{')
for s in many[:-1]:
f.line(portray_string(s)[1:-1])
f.partial('%s}', portray_string(many[-1])[1:-1])
if newline:
f.line()
return false
return true
if t.newlines is 0:
f.partial('{%s}', portray_string(t.s)[1:-1])
return
many = t.s.splitlines(true)
f.partial('{')
for s in many[:-1]:
f.line(portray_string(s)[1:-1])
f.partial('%s}', portray_string(many[-1])[1:-1])
display_token = __repr__
is_name = is_name__0
nub = static_conjure_nub
order = order__s
def write(t, w):
w(t.s)
@export
class Identifier(PearlToken):
__slots__ = ()
class_order = CLASS_ORDER__NORMAL_TOKEN
display_name = 'Identifier'
is__atom__or__special_operator = true
is_atom = true
is_colon = false
is_identifier = true
is_right_brace = false
is_special_operator = false
def add_parameters(t, art):
art.add_parameter(t)
def display_token(t):
return t.s
find_identifier = return_self
def is_name(t, s):
return t.s == s
mutate = mutate__self
scout_default_values = scout_default_values__0
def scout_variables(t, art):
art.fetch_variable(t)
transform = transform__self
def write_variables(t, art):
art.write_variable(t)
write_import = write_variables
@export
def produce_conjure_atom(name, Meta):
assert type(name) is String
assert type(Meta) is Type
@rename('conjure_%s', name)
def conjure_atom(s):
r = lookup_atom(s)
if r is not none:
return r
assert s.count('\n') is 0
s = intern_string(s)
return provide_atom(s, meta(s))
return conjure_atom
conjure_name = produce_conjure_atom('name', Identifier)
export('conjure_name', conjure_name) |
class Nanote():
"""Implementation of some Nanote logic in python for server-side validation"""
sikrit = 895175784877
charsets = [" etaoinsrhl"," 1234567890"," 1234567890'"," etaoinsrhl'"," 1234567890'"," etaoinsrhl'"," 1234567890'"," etaoinsrhl'"," 1234567890]"," etaoinsrhl]"," 1234567890["," etaoinsrhl["," 1234567890:"," etaoinsrhl:"," 1234567890;"," etaoinsrhl;"," 1234567890>"," etaoinsrhld"," 1234567890<"," etaoinsrhl<"," 1234567890/"," etaoinsrhl/"," 1234567890?"," etaoinsrhl?"," etaoinsrhl>"," etaoinsrhl~"," 1234567890."," etaoinsrhl."," 1234567890,"," etaoinsrhl,"," 1234567890="," etaoinsrhl="," 1234567890+"," etaoinsrhl+"," 1234567890_"," etaoinsrhl_"," 1234567890-"," etaoinsrhl-"," 1234567890)"," etaoinsrhl)"," 1234567890("," etaoinsrhl("," 1234567890*"," etaoinsrhl*"," 1234567890&"," etaoinsrhl&"," 1234567890%"," etaoinsrhl%"," 1234567890$"," 1234567890~"," etaoinsrhl!"," etaoinsrhl$"," 1234567890#"," etaoinsrhl#"," 1234567890@"," etaoinsrhl@"," 1234567890!"," etaoinsrhld$"," etaoinsrhld_"," etaoinsrhld'"," etaoinsrhld@"," etaoinsrhld-"," etaoinsrhld="," etaoinsrhld'"," etaoinsrhld,"," etaoinsrhld#"," etaoinsrhld)"," etaoinsrhld."," etaoinsrhld~"," etaoinsrhld?"," etaoinsrhld!"," etaoinsrhld+"," etaoinsrhld("," etaoinsrhld/"," etaoinsrhld<"," etaoinsrhld>"," etaoinsrhld*"," etaoinsrhld%"," etaoinsrhld;"," etaoinsrhld:"," etaoinsrhld'"," etaoinsrhld["," etaoinsrhldc"," etaoinsrhld]"," etaoinsrhld&"," etaoinsrhldc_"," etaoinsrhldc'"," etaoinsrhldc+"," etaoinsrhldc$"," etaoinsrhldc'"," etaoinsrhldc,"," etaoinsrhldc/"," etaoinsrhldc)"," etaoinsrhldc<"," etaoinsrhldc@"," etaoinsrhldc>"," etaoinsrhldc*"," etaoinsrhldc#"," etaoinsrhldc-"," etaoinsrhldc%"," etaoinsrhldc~"," etaoinsrhldc;"," etaoinsrhldc["," etaoinsrhldc'"," etaoinsrhldc."," etaoinsrhldc:"," etaoinsrhldcu"," etaoinsrhldc="," etaoinsrhldc]"," etaoinsrhldc?"," etaoinsrhldc&"," etaoinsrhldc("," etaoinsrhldc!"," etaoinsrhldcu$"," etaoinsrhldcu!"," etaoinsrhldcu;"," etaoinsrhldcu'"," etaoinsrhl()-_"," 1234567890$%&*"," etaoinsrhldcu/"," etaoinsrhldcu#"," etaoinsrhldcu="," etaoinsrhl$%&*"," 1234567890~!@#"," etaoinsrhldcu<"," etaoinsrhldcu~"," etaoinsrhldcu'"," etaoinsrhl~!@#"," etaoinsrhldcu>"," etaoinsrhldcu*"," etaoinsrhldcu@"," etaoinsrhldcu-"," etaoinsrhldcu."," etaoinsrhl?/<>"," etaoinsrhldcu%"," 1234567890+=,."," etaoinsrhldcu_"," 1234567890;:[]"," etaoinsrhldcu'"," etaoinsrhldcu+"," etaoinsrhl+=,."," 1234567890()-_"," etaoinsrhldcu:"," etaoinsrhldcu?"," etaoinsrhldcu("," etaoinsrhldcu]"," etaoinsrhldcu,"," etaoinsrhldcu)"," etaoinsrhldcu&"," etaoinsrhl;:[]"," 1234567890?/<>"," etaoinsrhldcu["," etaoinsrhldcum"," etaoinsrhldcum["," etaoinsrhldcum&"," etaoinsrhldcum_"," etaoinsrhldcum]"," etaoinsrhldcum'"," etaoinsrhldcum+"," etaoinsrhldcum-"," etaoinsrhldcum@"," etaoinsrhldcum'"," etaoinsrhldcum:"," etaoinsrhldcum="," etaoinsrhldcum~"," etaoinsrhldcumf"," etaoinsrhldcum,"," etaoinsrhldcum)"," etaoinsrhldcum;"," etaoinsrhld;:[]"," etaoinsrhldcum%"," etaoinsrhldcum!"," etaoinsrhldcum#"," etaoinsrhldcum>"," etaoinsrhldcum'"," etaoinsrhld?/<>"," etaoinsrhldcum."," etaoinsrhldcum*"," etaoinsrhld+=,."," etaoinsrhldcum?"," etaoinsrhldcum("," etaoinsrhld~!@#"," etaoinsrhld()-_"," etaoinsrhldcum$"," etaoinsrhldcum/"," etaoinsrhldcum<"," etaoinsrhld$%&*"," etaoinsrhldcumf%"," etaoinsrhldcumf)"," etaoinsrhldcumf<"," etaoinsrhldcumf$"," etaoinsrhldc~!@#"," etaoinsrhldc()-_"," etaoinsrhldcumfp"," etaoinsrhldcumf("," etaoinsrhldcumf?"," etaoinsrhldcumf["," etaoinsrhldcumf*"," etaoinsrhldc+=,."," etaoinsrhldcumf."," etaoinsrhldcumf'"," etaoinsrhldc?/<>"," etaoinsrhldcumf#"," etaoinsrhldcumf>"," etaoinsrhldcumf/"," etaoinsrhldcumf;"," etaoinsrhldc$%&*"," etaoinsrhldcumf,"," etaoinsrhldc;:[]"," etaoinsrhldcumf~"," etaoinsrhldcumf="," etaoinsrhldcumf:"," etaoinsrhldcumf'"," etaoinsrhldcumf@"," etaoinsrhldcumf]"," etaoinsrhldcumf-"," etaoinsrhldcumf+"," etaoinsrhldcumf!"," etaoinsrhldcumf&"," etaoinsrhldcumf_"," etaoinsrhldcumf'"," etaoinsrhldcumfp$"," etaoinsrhldcumfp)"," etaoinsrhldcu+=,."," etaoinsrhldcumfp;"," etaoinsrhldcumfp."," etaoinsrhldcu;:[]"," etaoinsrhldcumfp%"," etaoinsrhldcumfpg"," etaoinsrhldcu~!@#"," etaoinsrhldcumfp="," etaoinsrhldcumfp'"," etaoinsrhldcumfp]"," etaoinsrhldcumfp("," etaoinsrhldcumfp?"," etaoinsrhldcumfp'"," etaoinsrhldcumfp~"," etaoinsrhldcumfp+"," etaoinsrhldcumfp@"," etaoinsrhldcu?/<>"," etaoinsrhldcumfp:"," etaoinsrhldcumfp#"," etaoinsrhldcumfp<"," etaoinsrhldcumfp-"," etaoinsrhldcumfp,"," etaoinsrhldcumfp&"," etaoinsrhldcumfp*"," etaoinsrhldcumfp!"," etaoinsrhldcumfp>"," etaoinsrhldcumfp_"," etaoinsrhldcumfp/"," etaoinsrhldcumfp["," etaoinsrhldcu$%&*"," etaoinsrhldcumfp'"," etaoinsrhldcu()-_"," etaoinsrhldcumfpg;"," etaoinsrhl?/<>;:[]"," etaoinsrhldcumfpg)"," 1234567890()-_+=,."," etaoinsrhl()-_+=,."," etaoinsrhldcumfpg?"," etaoinsrhldcumfpg'"," etaoinsrhldcumfpg["," etaoinsrhldcumfpg>"," etaoinsrhldcum+=,."," etaoinsrhldcumfpg="," 1234567890~!@#$%&*"," etaoinsrhl~!@#$%&*"," etaoinsrhldcumfpg("," etaoinsrhldcumfpg$"," etaoinsrhldcumfpg@"," etaoinsrhldcum;:[]"," etaoinsrhldcum$%&*"," etaoinsrhldcumfpg~"," etaoinsrhldcumfpg+"," etaoinsrhldcumfpg'"," etaoinsrhldcum()-_"," etaoinsrhldcumfpg*"," etaoinsrhldcumfpg."," etaoinsrhldcumfpg%"," etaoinsrhldcumfpg'"," etaoinsrhldcumfpg&"," etaoinsrhldcumfpg-"," etaoinsrhldcumfpg<"," etaoinsrhldcumfpg#"," etaoinsrhldcumfpg:"," etaoinsrhldcum?/<>"," etaoinsrhldcum~!@#"," etaoinsrhldcumfpg_"," etaoinsrhldcumfpg,"," etaoinsrhldcumfpgw"," etaoinsrhldcumfpg]"," etaoinsrhldcumfpg/"," etaoinsrhldcumfpg!"," 1234567890?/<>;:[]"," etaoinsrhldcumfpgw'"," etaoinsrhldcumfpgw<"," etaoinsrhldcumfpgw_"," etaoinsrhldcumf?/<>"," etaoinsrhldcumfpgw#"," 1234567890?/<>;:[]'"," etaoinsrhldcumfpgw~"," etaoinsrhldcumf+=,."," etaoinsrhldcumfpgw-"," etaoinsrhldcumfpgw+"," etaoinsrhldcumf()-_"," etaoinsrhldcumfpgw$"," etaoinsrhldcumfpgw'"," etaoinsrhldcumf$%&*"," etaoinsrhldcumfpgw="," etaoinsrhldcumf~!@#"," etaoinsrhld?/<>;:[]"," etaoinsrhldcumfpgw)"," etaoinsrhldcumfpgw'"," etaoinsrhldcumfpgw,"," etaoinsrhldcumf;:[]"," etaoinsrhldcumfpgw%"," etaoinsrhldcumfpgw@"," etaoinsrhld~!@#$%&*"," etaoinsrhldcumfpgw."," etaoinsrhldcumfpgw]"," etaoinsrhldcumfpgwy"," etaoinsrhl?/<>;:[]'"," etaoinsrhldcumfpgw["," etaoinsrhldcumfpgw("," etaoinsrhldcumfpgw?"," etaoinsrhldcumfpgw&"," etaoinsrhldcumfpgw:"," etaoinsrhld()-_+=,."," etaoinsrhldcumfpgw/"," etaoinsrhldcumfpgw;"," etaoinsrhldcumfpgw!"," etaoinsrhldcumfpgw>"," etaoinsrhldcumfpgw*"," etaoinsrhldcumfpgwy,"," etaoinsrhldcumfp;:[]"," etaoinsrhldcumfpgwy_"," etaoinsrhldcumfp+=,."," etaoinsrhldcumfpgwy%"," etaoinsrhldcumfpgwy$"," etaoinsrhldcumfpgwy!"," etaoinsrhldcumfpgwy]"," etaoinsrhldcumfpgwy@"," etaoinsrhldcumfpgwy."," etaoinsrhldcumfpgwy~"," etaoinsrhldc~!@#$%&*"," etaoinsrhldc?/<>;:[]"," etaoinsrhldcumfpgwyb"," etaoinsrhldcumfp$%&*"," etaoinsrhldcumfpgwy["," etaoinsrhldcumfp?/<>"," etaoinsrhld?/<>;:[]'"," etaoinsrhldcumfpgwy("," etaoinsrhldcumfpgwy<"," etaoinsrhldcumfpgwy="," etaoinsrhldcumfpgwy?"," etaoinsrhldcumfpgwy'"," etaoinsrhldcumfpgwy:"," etaoinsrhldcumfp~!@#"," etaoinsrhldcumfpgwy&"," tnsrhldcmfpgwbvkxjqz"," etaoinsrhldc()-_+=,."," etaoinsrhldcumfpgwy-"," etaoinsrhldcumfpgwy#"," etaoinsrhldcumfpgwy/"," etaoinsrhldcumfpgwy;"," etaoinsrhldcumfpgwy'"," etaoinsrhldcumfpgwy)"," etaoinsrhldcumfpgwy>"," etaoinsrhldcumfpgwy'"," etaoinsrhldcumfpgwy+"," etaoinsrhldcumfpgwy*"," etaoinsrhl1234567890"," etaoinsrhldcumfp()-_"," etaoinsrhl1234567890;"," etaoinsrhldcumfpgwyb,"," etaoinsrhldcumfpg+=,."," tnsrhldcmfpgwbvkxjqz'"," tnsrhldcmfpgwbvkxjqz~"," tnsrhldcmfpgwbvkxjqz'"," etaoinsrhl1234567890+"," etaoinsrhldcumfpgwyb%"," etaoinsrhl1234567890,"," tnsrhldcmfpgwbvkxjqz_"," tnsrhldcmfpgwbvkxjqz]"," tnsrhldcmfpgwbvkxjqz,"," etaoinsrhl1234567890!"," tnsrhldcmfpgwbvkxjqz("," etaoinsrhldcumfpgwyb@"," etaoinsrhl1234567890]"," etaoinsrhl1234567890("," etaoinsrhldcumfpgwyb]"," etaoinsrhl1234567890-"," tnsrhldcmfpgwbvkxjqz+"," etaoinsrhldcumfpgwyb_"," etaoinsrhldcumfpgwyb."," etaoinsrhldcu?/<>;:[]"," etaoinsrhl1234567890%"," tnsrhldcmfpgwbvkxjqz)"," etaoinsrhldcumfpgwyb~"," etaoinsrhldcumfpg$%&*"," tnsrhldcmfpgwbvkxjqz-"," etaoinsrhl1234567890."," tnsrhldcmfpgwbvkxjqz["," etaoinsrhl1234567890)"," etaoinsrhldcu~!@#$%&*"," tnsrhldcmfpgwbvkxjqz."," etaoinsrhl1234567890["," etaoinsrhldcumfpgwyb["," tnsrhldcmfpgwbvkxjqz@"," etaoinsrhl1234567890#"," etaoinsrhldcumfpgwyb-"," tnsrhldcmfpgwbvkxjqz%"," etaoinsrhldcumfpgwyb("," etaoinsrhldcumfpg?/<>"," etaoinsrhldcumfpgwyb="," etaoinsrhldc?/<>;:[]'"," etaoinsrhldcumfpgwyb$"," etaoinsrhldcumfpgwyb#"," etaoinsrhldcumfpgwyb?"," etaoinsrhldcumfpgwyb'"," etaoinsrhldcumfpgwybv"," tnsrhldcmfpgwbvkxjqz:"," etaoinsrhl1234567890:"," etaoinsrhldcumfpgwyb:"," etaoinsrhldcumfpg~!@#"," etaoinsrhl1234567890?"," etaoinsrhl1234567890@"," tnsrhldcmfpgwbvkxjqz'"," etaoinsrhldcumfpgwyb&"," tnsrhldcmfpgwbvkxjqz?"," etaoinsrhldcu()-_+=,."," etaoinsrhl1234567890="," etaoinsrhl1234567890$"," etaoinsrhl1234567890~"," etaoinsrhl1234567890'"," tnsrhldcmfpgwbvkxjqz*"," tnsrhldcmfpgwbvkxjqz;"," etaoinsrhldcumfpgwyb;"," tnsrhldcmfpgwbvkxjqz="," etaoinsrhl1234567890'"," etaoinsrhldcumfpgwyb/"," etaoinsrhl1234567890'"," etaoinsrhldcumfpgwyb'"," etaoinsrhl1234567890&"," etaoinsrhldcumfpgwyb'"," tnsrhldcmfpgwbvkxjqz>"," etaoinsrhldcumfpgwyb!"," etaoinsrhl1234567890/"," etaoinsrhl1234567890>"," tnsrhldcmfpgwbvkxjqz!"," etaoinsrhldcumfpgwyb>"," tnsrhldcmfpgwbvkxjqz/"," etaoinsrhldcumfpgwyb)"," etaoinsrhl1234567890*"," etaoinsrhldcumfpgwyb+"," tnsrhldcmfpgwbvkxjqz&"," etaoinsrhldcumfpg()-_"," etaoinsrhl1234567890_"," etaoinsrhldcumfpgwyb*"," tnsrhldcmfpgwbvkxjqz$"," etaoinsrhldcumfpg;:[]"," tnsrhldcmfpgwbvkxjqz#"," etaoinsrhldcumfpgwyb<"," tnsrhldcmfpgwbvkxjqz<"," etaoinsrhl1234567890<"," etaoinsrhldcumfpgwybv)"," etaoinsrhldcumfpgwybv%"," etaoinsrhldcumfpgwybv,"," etaoinsrhldcumfpgw;:[]"," etaoinsrhldcumfpgwybv'"," etaoinsrhldcumfpgwybv<"," etaoinsrhldcumfpgw~!@#"," etaoinsrhldcumfpgwybv*"," etaoinsrhldcumfpgwybv]"," etaoinsrhldcumfpgwybv!"," etaoinsrhldcumfpgwybv'"," etaoinsrhldcumfpgwybv>"," etaoinsrhldcumfpgwybv."," etaoinsrhldcumfpgwybv'"," etaoinsrhldcumfpgw?/<>"," etaoinsrhldcumfpgwybv_"," etaoinsrhldcumfpgwybv$"," etaoinsrhldcumfpgwybv#"," etaoinsrhldcumfpgwybv="," etaoinsrhldcumfpgw$%&*"," etaoinsrhldcum?/<>;:[]"," etaoinsrhldcumfpgwybv/"," etaoinsrhldcumfpgw+=,."," etaoinsrhldcumfpgwybv;"," etaoinsrhldcumfpgwybv["," etaoinsrhldcumfpgwybv("," etaoinsrhldcumfpgwybv-"," etaoinsrhldcum~!@#$%&*"," etaoinsrhldcumfpgwybv~"," etaoinsrhldcumfpgwybv?"," etaoinsrhldcumfpgwybvk"," etaoinsrhldcu?/<>;:[]'"," etaoinsrhldcumfpgwybv@"," etaoinsrhldcumfpgwybv&"," etaoinsrhldcum()-_+=,."," etaoinsrhldcumfpgwybv:"," etaoinsrhldcumfpgw()-_"," etaoinsrhldcumfpgwybv+"," etaoinsrhldcumfpgwybvk#"," etaoinsrhldcumfpgwy;:[]"," etaoinsrhldcumfpgwybvk:"," etaoinsrhldcumfpgwybvk@"," etaoinsrhldcumfpgwybvk&"," etaoinsrhldcumfpgwy()-_"," etaoinsrhldcumf~!@#$%&*"," etaoinsrhldcumfpgwybvkx"," etaoinsrhldcumfpgwybvk?"," etaoinsrhldcum?/<>;:[]'"," etaoinsrhldcumfpgwybvk~"," etaoinsrhldcumfpgwybvk-"," etaoinsrhldcumfpgwybvk("," etaoinsrhldcumf?/<>;:[]"," etaoinsrhldcumfpgwybvk;"," etaoinsrhldcumfpgwybvk["," etaoinsrhldcumfpgwybvk/"," etaoinsrhldcumfpgwy$%&*"," etaoinsrhldcumfpgwy+=,."," etaoinsrhldcumf()-_+=,."," etaoinsrhldcumfpgwybvk_"," etaoinsrhldcumfpgwybvk$"," etaoinsrhldcumfpgwybvk="," etaoinsrhldcumfpgwy?/<>"," etaoinsrhldcumfpgwybvk."," etaoinsrhldcumfpgwybvk'"," etaoinsrhldcumfpgwybvk>"," etaoinsrhldcumfpgwy~!@#"," etaoinsrhldcumfpgwybvk*"," etaoinsrhldcumfpgwybvk]"," etaoinsrhldcumfpgwybvk!"," etaoinsrhldcumfpgwybvk'"," etaoinsrhldcumfpgwybvk'"," etaoinsrhldcumfpgwybvk)"," etaoinsrhldcumfpgwybvk<"," etaoinsrhldcumfpgwybvk,"," etaoinsrhldcumfpgwybvk%"," etaoinsrhldcumfpgwybvk+"," etaoinsrhldcumfpgwybvkx>"," etaoinsrhldcumfpgwybvkx?"," etaoinsrhldcumfpgwybvkx*"," etaoinsrhldcumfpgwybvkx;"," etaoinsrhldcumfpgwybvkx'"," etaoinsrhldcumfpgwybvkx-"," etaoinsrhl1234567890$%&*"," tnsrhldcmfpgwbvkxjqz?/<>"," etaoinsrhldcumfpgwybvkx!"," tnsrhldcmfpgwbvkxjqz()-_"," etaoinsrhldcumfpgwybvkx("," etaoinsrhldcumfp()-_+=,."," etaoinsrhldcumfpgwybvkx~"," etaoinsrhldcumfpgwybvkx_"," etaoinsrhl1234567890()-_"," etaoinsrhldcumfpgwybvkx["," etaoinsrhldcumfpgwybvkx@"," etaoinsrhldcumfpgwyb$%&*"," etaoinsrhldcumfpgwybvkxj"," etaoinsrhl1234567890;:[]"," etaoinsrhldcumfpgwyb()-_"," etaoinsrhl1234567890?/<>"," etaoinsrhldcumfpgwybvkx&"," etaoinsrhldcumfpgwybvkx$"," tnsrhldcmfpgwbvkxjqz~!@#"," etaoinsrhldcumfpgwybvkx#"," etaoinsrhldcumfpgwybvkx="," etaoinsrhldcumfpgwybvkx."," tnsrhldcmfpgwbvkxjqz+=,."," etaoinsrhldcumf?/<>;:[]'"," etaoinsrhl1234567890~!@#"," etaoinsrhl1234567890+=,."," etaoinsrhldcumfpgwybvkx'"," etaoinsrhldcumfpgwybvkx%"," tnsrhldcmfpgwbvkxjqz;:[]"," etaoinsrhldcumfpgwyb~!@#"," etaoinsrhldcumfpgwyb+=,."," etaoinsrhldcumfpgwybvkx/"," etaoinsrhldcum1234567890"," etaoinsrhldcumfpgwybvkx]"," etaoinsrhldcumfpgwyb?/<>"," etaoinsrhldcumfpgwybvkx)"," etaoinsrhldcumfpgwybvkx'"," etaoinsrhldcumfpgwybvkx:"," etaoinsrhldcumfpgwybvkx+"," etaoinsrhldcumfpgwyb;:[]"," etaoinsrhldcumfpgwybvkx<"," tnsrhldcmfpgwbvkxjqz$%&*"," etaoinsrhldcumfpgwybvkx,"," etaoinsrhldcumfp?/<>;:[]"," etaoinsrhldcumfp~!@#$%&*"," etaoinsrhldcumfpgwybvkxj!"," etaoinsrhldcum1234567890'"," etaoinsrhldcum1234567890,"," etaoinsrhldcum1234567890!"," etaoinsrhldcumfpgwybvkxj~"," etaoinsrhldcumfpgwybvkxj<"," etaoinsrhldcumfpgwybv;:[]"," etaoinsrhldcum1234567890]"," etaoinsrhldcum1234567890("," etaoinsrhldcumfpgwybvkxj'"," etaoinsrhldcum1234567890<"," etaoinsrhldcum1234567890'"," etaoinsrhldcum1234567890'"," etaoinsrhldcumfpgwybvkxj)"," etaoinsrhldcum1234567890-"," etaoinsrhldcumfpgwybvkxj'"," etaoinsrhldcum1234567890$"," etaoinsrhldcum1234567890="," etaoinsrhldcum1234567890@"," etaoinsrhldcumfpgwybvkxj="," etaoinsrhldcumfpgwybvkxj]"," etaoinsrhldcumfpgwybv~!@#"," etaoinsrhldcumfpgwybvkxj*"," etaoinsrhldcumfpgwybvkxj%"," etaoinsrhldcum1234567890~"," etaoinsrhldcum1234567890%"," etaoinsrhldcumfpgwybvkxj."," etaoinsrhldcumfpgwybvkxj'"," etaoinsrhldcumfpgwybvkxj$"," etaoinsrhldcum1234567890."," etaoinsrhldcum1234567890["," etaoinsrhldcum1234567890)"," etaoinsrhldcumfpg()-_+=,."," etaoinsrhldcumfpgwybvkxj,"," etaoinsrhldcumfpgwybv$%&*"," etaoinsrhldcumfpgwybvkxj["," etaoinsrhldcumfpgwybvkxj("," etaoinsrhldcumfpgwybv?/<>"," etaoinsrhldcum1234567890:"," etaoinsrhldcumfpgwybvkxj>"," etaoinsrhldcumfpgwybvkxj?"," etaoinsrhldcum1234567890+"," etaoinsrhldcumfpgwybvkxj-"," etaoinsrhldcumfpgwybvkxj+"," etaoinsrhldcumfpgwybvkxj:"," etaoinsrhldcum1234567890/"," etaoinsrhldcum1234567890?"," etaoinsrhldcumfpgwybvkxj&"," etaoinsrhldcumfpgwybv()-_"," etaoinsrhldcum1234567890>"," etaoinsrhldcumfpg~!@#$%&*"," etaoinsrhldcumfpgwybvkxj@"," etaoinsrhldcum1234567890;"," etaoinsrhldcumfpgwybvkxj_"," etaoinsrhldcumfp?/<>;:[]'"," etaoinsrhldcum1234567890#"," etaoinsrhldcumfpgwybvkxj#"," etaoinsrhldcumfpgwybvkxj;"," etaoinsrhldcumfpg?/<>;:[]"," etaoinsrhldcum1234567890*"," etaoinsrhldcum1234567890&"," etaoinsrhldcumfpgwybv+=,."," etaoinsrhldcumfpgwybvkxjq"," etaoinsrhldcum1234567890_"," etaoinsrhldcumfpgwybvkxj/"," etaoinsrhldcumfpgwybvkxjq?"," etaoinsrhldcumfpgwybvkxjq+"," etaoinsrhldcumfpgwybvkxjq$"," etaoinsrhldcumfpgwybvkxjq~"," etaoinsrhldcumfpgwybvkxjq:"," etaoinsrhldcumfpgwybvkxjq'"," etaoinsrhldcumfpgwybvkxjq,"," etaoinsrhldcumfpgwybvkxjq'"," etaoinsrhldcumfpgw()-_+=,."," etaoinsrhldcumfpgwybvkxjq-"," etaoinsrhldcumfpgwybvkxjq&"," etaoinsrhldcumfpgwybvkxjq)"," etaoinsrhldcumfpgwybvk()-_"," etaoinsrhldcumfpgwybvkxjq*"," etaoinsrhldcumfpgwybvkxjq("," etaoinsrhldcumfpgwybvkxjq'"," etaoinsrhldcumfpgwybvkxjq!"," etaoinsrhldcumfpgwybvkxjq@"," etaoinsrhldcumfpgw~!@#$%&*"," etaoinsrhldcumfpgwybvk~!@#"," etaoinsrhldcumfpgwybvkxjq["," etaoinsrhldcumfpgwybvk;:[]"," etaoinsrhldcumfpgwybvk$%&*"," etaoinsrhldcumfpgwybvkxjq;"," etaoinsrhldcumfpgwybvkxjq/"," etaoinsrhldcumfpgwybvkxjq#"," etaoinsrhldcumfpgwybvk?/<>"," etaoinsrhldcumfpgwybvkxjq]"," etaoinsrhldcumfpgwybvkxjq%"," etaoinsrhldcumfpgw?/<>;:[]"," 1234567890~!@#$%&*()-_+=,."," etaoinsrhldcumfpgwybvkxjqz"," etaoinsrhldcumfpgwybvkxjq<"," etaoinsrhldcumfpg?/<>;:[]'"," etaoinsrhldcumfpgwybvk+=,."," etaoinsrhl~!@#$%&*()-_+=,."," etaoinsrhldcumfpgwybvkxjq."," etaoinsrhldcumfpgwybvkxjq_"," etaoinsrhldcumfpgwybvkxjq="," etaoinsrhldcumfpgwybvkxjq>"," etaoinsrhldcumfpgwybvkxjqz["," etaoinsrhldcumfpgwybvkxjqz_"," etaoinsrhldcumfpgwybvkx+=,."," etaoinsrhldcumfpgwybvkxjqz'"," etaoinsrhldcumfpgwybvkxjqz&"," etaoinsrhldcumfpgwybvkxjqz#"," etaoinsrhldcumfpgwybvkxjqz;"," etaoinsrhldcumfpgwybvkxjqz@"," etaoinsrhldcumfpgwybvkxjqz/"," etaoinsrhldcumfpgwybvkx()-_"," etaoinsrhldcumfpgwybvkxjqz?"," etaoinsrhldcumfpgwybvkxjqz>"," etaoinsrhldcumfpgwybvkxjqz:"," etaoinsrhldcumfpgwybvkxjqz+"," etaoinsrhld~!@#$%&*()-_+=,."," etaoinsrhldcumfpgw?/<>;:[]'"," etaoinsrhldcumfpgwybvkxjqz~"," etaoinsrhldcumfpgwybvkx$%&*"," etaoinsrhldcumfpgwybvkx?/<>"," etaoinsrhldcumfpgwy~!@#$%&*"," etaoinsrhldcumfpgwybvkxjqz*"," etaoinsrhldcumfpgwybvkxjqz)"," etaoinsrhldcumfpgwy()-_+=,."," etaoinsrhldcumfpgwybvkxjqz."," etaoinsrhldcumfpgwybvkxjqz%"," etaoinsrhldcumfpgwybvkx~!@#"," etaoinsrhldcumfpgwybvkxjqz("," etaoinsrhldcumfpgwybvkxjqz="," etaoinsrhldcumfpgwybvkx;:[]"," etaoinsrhldcumfpgwybvkxjqz$"," etaoinsrhldcumfpgwybvkxjqz-"," etaoinsrhldcumfpgwybvkxjqz'"," etaoinsrhldcumfpgwy?/<>;:[]"," etaoinsrhldcumfpgwybvkxjqz'"," etaoinsrhldcumfpgwybvkxjqz<"," etaoinsrhldcumfpgwybvkxjqz]"," etaoinsrhldcumfpgwybvkxjqz!"," etaoinsrhldcumfpgwybvkxjqz,"," etaoinsrhldcum1234567890+=,."," etaoinsrhldcumfpgwybvkxj?/<>"," etaoinsrhldcumfpgwyb()-_+=,."," etaoinsrhldcum1234567890;:[]"," etaoinsrhldcumfpgwybvkxj$%&*"," etaoinsrhldcum1234567890?/<>"," etaoinsrhldcumfpgwy?/<>;:[]'"," tnsrhldcmfpgwbvkxjqz()-_+=,."," etaoinsrhldcumfpgwyb?/<>;:[]"," etaoinsrhldcum1234567890$%&*"," etaoinsrhldcumfpgwybvkxj~!@#"," etaoinsrhldcumfpgwybvkxj;:[]"," etaoinsrhl1234567890()-_+=,."," etaoinsrhldcumfpgwyb~!@#$%&*"," etaoinsrhldcumfpgwybvkxj()-_"," tnsrhldcmfpgwbvkxjqz~!@#$%&*"," etaoinsrhldcum1234567890~!@#"," etaoinsrhldcumfpgw1234567890"," etaoinsrhldcum1234567890()-_"," tnsrhldcmfpgwbvkxjqz?/<>;:[]"," etaoinsrhldcumfpgwybvkxj+=,."," etaoinsrhl1234567890?/<>;:[]"," etaoinsrhl1234567890~!@#$%&*"," etaoinsrhldc~!@#$%&*()-_+=,."," etaoinsrhldcumfpgw1234567890["," etaoinsrhldcumfpgw1234567890@"," etaoinsrhl1234567890?/<>;:[]'"," etaoinsrhldcumfpgw1234567890,"," etaoinsrhldcumfpgw1234567890="," etaoinsrhldcumfpgwybvkxjq?/<>"," etaoinsrhldcumfpgwybv?/<>;:[]"," etaoinsrhldcumfpgw1234567890)"," etaoinsrhldcumfpgwybvkxjq+=,."," etaoinsrhldcumfpgw1234567890#"," etaoinsrhldcumfpgw1234567890'"," etaoinsrhldcumfpgwybv()-_+=,."," etaoinsrhldcumfpgwybvkxjq()-_"," etaoinsrhldcumfpgw1234567890-"," etaoinsrhldcumfpgw1234567890("," etaoinsrhldcumfpgwybvkxjq$%&*"," etaoinsrhldcu~!@#$%&*()-_+=,."," etaoinsrhldcumfpgw1234567890."," etaoinsrhldcumfpgw1234567890_"," etaoinsrhldcumfpgw1234567890?"," etaoinsrhldcumfpgwybvkxjq~!@#"," etaoinsrhldcumfpgw1234567890$"," etaoinsrhldcumfpgw1234567890'"," etaoinsrhldcumfpgw1234567890'"," etaoinsrhldcumfpgw1234567890]"," etaoinsrhldcumfpgw1234567890%"," etaoinsrhldcumfpgwybvkxjq;:[]"," etaoinsrhldcumfpgw1234567890:"," etaoinsrhldcumfpgw1234567890;"," etaoinsrhldcumfpgw1234567890&"," etaoinsrhldcumfpgwybv~!@#$%&*"," etaoinsrhldcumfpgwyb?/<>;:[]'"," etaoinsrhldcumfpgw1234567890+"," etaoinsrhldcumfpgw1234567890>"," tnsrhldcmfpgwbvkxjqz?/<>;:[]'"," etaoinsrhldcumfpgw1234567890~"," etaoinsrhldcumfpgw1234567890<"," etaoinsrhldcumfpgw1234567890/"," etaoinsrhldcumfpgw1234567890*"," etaoinsrhldcumfpgw1234567890!"," etaoinsrhldcumfpgwybvk~!@#$%&*"," etaoinsrhldcumfpgwybvkxjqz~!@#"," tnsrhldcmfpgwbvkxjqz1234567890"," etaoinsrhldcum~!@#$%&*()-_+=,."," etaoinsrhldcumfpgwybvkxjqz$%&*"," etaoinsrhldcumfpgwybv?/<>;:[]'"," etaoinsrhldcumfpgwybvk()-_+=,."," etaoinsrhldcumfpgwybvkxjqz+=,."," etaoinsrhldcumfpgwybvk?/<>;:[]"," etaoinsrhldcumfpgwybvkxjqz?/<>"," etaoinsrhldcumfpgwybvkxjqz;:[]"," etaoinsrhldcumfpgwybvkxjqz()-_"," tnsrhldcmfpgwbvkxjqz1234567890&"," tnsrhldcmfpgwbvkxjqz1234567890'"," tnsrhldcmfpgwbvkxjqz1234567890]"," tnsrhldcmfpgwbvkxjqz1234567890<"," tnsrhldcmfpgwbvkxjqz1234567890!"," tnsrhldcmfpgwbvkxjqz1234567890+"," tnsrhldcmfpgwbvkxjqz1234567890/"," tnsrhldcmfpgwbvkxjqz1234567890["," etaoinsrhldcumfpgwybvkx?/<>;:[]"," tnsrhldcmfpgwbvkxjqz1234567890*"," tnsrhldcmfpgwbvkxjqz1234567890'"," tnsrhldcmfpgwbvkxjqz1234567890?"," tnsrhldcmfpgwbvkxjqz1234567890%"," tnsrhldcmfpgwbvkxjqz1234567890:"," etaoinsrhldcumf~!@#$%&*()-_+=,."," tnsrhldcmfpgwbvkxjqz1234567890."," etaoinsrhldcumfpgwybvk?/<>;:[]'"," tnsrhldcmfpgwbvkxjqz1234567890;"," tnsrhldcmfpgwbvkxjqz1234567890'"," tnsrhldcmfpgwbvkxjqz1234567890_"," tnsrhldcmfpgwbvkxjqz1234567890>"," etaoinsrhldcumfpgwybvkx()-_+=,."," tnsrhldcmfpgwbvkxjqz1234567890)"," tnsrhldcmfpgwbvkxjqz1234567890#"," tnsrhldcmfpgwbvkxjqz1234567890("," tnsrhldcmfpgwbvkxjqz1234567890-"," tnsrhldcmfpgwbvkxjqz1234567890,"," tnsrhldcmfpgwbvkxjqz1234567890@"," tnsrhldcmfpgwbvkxjqz1234567890="," tnsrhldcmfpgwbvkxjqz1234567890$"," tnsrhldcmfpgwbvkxjqz1234567890~"," etaoinsrhldcumfpgwybvkx~!@#$%&*"," etaoinsrhldcum1234567890?/<>;:[]"," etaoinsrhldcumfpgwybvkx?/<>;:[]'"," etaoinsrhldcumfpgwybvkxj()-_+=,."," etaoinsrhldcumfpgwybvk1234567890"," etaoinsrhldcum1234567890~!@#$%&*"," etaoinsrhldcumfpgwybvkxj~!@#$%&*"," etaoinsrhldcumfp~!@#$%&*()-_+=,."," etaoinsrhldcum1234567890()-_+=,."," etaoinsrhldcumfpgw1234567890$%&*"," etaoinsrhldcumfpgw1234567890()-_"," etaoinsrhldcumfpgw1234567890+=,."," etaoinsrhldcumfpgw1234567890;:[]"," etaoinsrhldcumfpgw1234567890?/<>"," etaoinsrhldcumfpgwybvkxj?/<>;:[]"," etaoinsrhldcumfpgw1234567890~!@#"," etaoinsrhldcumfpgwybvk1234567890]"," etaoinsrhldcumfpgwybvk1234567890/"," etaoinsrhldcumfpgwybvk1234567890&"," etaoinsrhldcumfpgwybvk1234567890'"," etaoinsrhldcumfpgwybvk1234567890'"," etaoinsrhldcumfpgwybvk1234567890@"," etaoinsrhldcumfpgwybvkxjq()-_+=,."," etaoinsrhldcumfpg~!@#$%&*()-_+=,."," etaoinsrhldcumfpgwybvk1234567890_"," etaoinsrhldcumfpgwybvk1234567890;"," etaoinsrhldcumfpgwybvk1234567890%"," etaoinsrhldcumfpgwybvk1234567890$"," etaoinsrhldcumfpgwybvkxjq~!@#$%&*"," etaoinsrhldcum1234567890?/<>;:[]'"," etaoinsrhldcumfpgwybvk1234567890)"," etaoinsrhldcumfpgwybvk1234567890!"," etaoinsrhldcumfpgwybvk1234567890+"," etaoinsrhldcumfpgwybvk1234567890#"," etaoinsrhldcumfpgwybvk1234567890-"," etaoinsrhldcumfpgwybvk1234567890."," etaoinsrhldcumfpgwybvk1234567890("," etaoinsrhldcumfpgwybvk1234567890="," etaoinsrhldcumfpgwybvk1234567890:"," etaoinsrhldcumfpgwybvk1234567890'"," etaoinsrhldcumfpgwybvk1234567890>"," etaoinsrhldcumfpgwybvk1234567890,"," etaoinsrhldcumfpgwybvk1234567890*"," etaoinsrhldcumfpgwybvkxj?/<>;:[]'"," etaoinsrhldcumfpgwybvk1234567890["," etaoinsrhldcumfpgwybvk1234567890<"," etaoinsrhldcumfpgwybvk1234567890?"," etaoinsrhldcumfpgwybvkxjq?/<>;:[]"," etaoinsrhldcumfpgwybvk1234567890~"," etaoinsrhldcumfpgwybvkxjqz()-_+=,."," etaoinsrhldcumfpgwybvkxjqz?/<>;:[]"," etaoinsrhldcumfpgw~!@#$%&*()-_+=,."," tnsrhldcmfpgwbvkxjqz1234567890~!@#"," tnsrhldcmfpgwbvkxjqz1234567890$%&*"," etaoinsrhldcumfpgwybvkxjq?/<>;:[]'"," tnsrhldcmfpgwbvkxjqz1234567890()-_"," tnsrhldcmfpgwbvkxjqz1234567890+=,."," tnsrhldcmfpgwbvkxjqz1234567890?/<>"," tnsrhldcmfpgwbvkxjqz1234567890;:[]"," etaoinsrhldcumfpgwybvkxjqz~!@#$%&*"," etaoinsrhldcumfpgwybvkxjqz?/<>;:[]'"," 1234567890~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwy~!@#$%&*()-_+=,."," etaoinsrhl~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgw1234567890()-_+=,."," etaoinsrhldcumfpgw1234567890~!@#$%&*"," etaoinsrhldcumfpgwybvk1234567890;:[]"," etaoinsrhldcumfpgw1234567890?/<>;:[]"," etaoinsrhldcumfpgwybvk1234567890?/<>"," etaoinsrhldcumfpgwybvk1234567890+=,."," etaoinsrhldcumfpgwybvk1234567890()-_"," etaoinsrhld~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvk1234567890$%&*"," etaoinsrhldcumfpgwybvk1234567890~!@#"," etaoinsrhldcumfpgwyb~!@#$%&*()-_+=,."," etaoinsrhldcumfpgwybvkxjqz1234567890"," etaoinsrhl1234567890~!@#$%&*()-_+=,."," tnsrhldcmfpgwbvkxjqz~!@#$%&*()-_+=,."," etaoinsrhldcumfpgwybvkxjqz1234567890'"," etaoinsrhldcumfpgwybvkxjqz1234567890:"," etaoinsrhldcumfpgwybvkxjqz1234567890#"," etaoinsrhldcumfpgwybvkxjqz1234567890_"," etaoinsrhldcumfpgwybvkxjqz1234567890="," etaoinsrhldc~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvkxjqz1234567890,"," etaoinsrhldcumfpgwybvkxjqz1234567890("," etaoinsrhldcumfpgwybvkxjqz1234567890+"," etaoinsrhldcumfpgwybvkxjqz1234567890$"," etaoinsrhldcumfpgwybvkxjqz1234567890-"," etaoinsrhldcumfpgwybvkxjqz1234567890'"," etaoinsrhldcumfpgwybvkxjqz1234567890."," etaoinsrhldcumfpgwybvkxjqz1234567890?"," etaoinsrhldcumfpgw1234567890?/<>;:[]'"," etaoinsrhldcumfpgwybv~!@#$%&*()-_+=,."," etaoinsrhldcumfpgwybvkxjqz1234567890@"," etaoinsrhldcumfpgwybvkxjqz1234567890*"," etaoinsrhldcumfpgwybvkxjqz1234567890/"," etaoinsrhldcumfpgwybvkxjqz1234567890<"," etaoinsrhldcumfpgwybvkxjqz1234567890>"," etaoinsrhldcumfpgwybvkxjqz1234567890!"," etaoinsrhldcumfpgwybvkxjqz1234567890&"," etaoinsrhldcumfpgwybvkxjqz1234567890;"," etaoinsrhldcumfpgwybvkxjqz1234567890'"," etaoinsrhldcumfpgwybvkxjqz1234567890~"," etaoinsrhldcumfpgwybvkxjqz1234567890)"," etaoinsrhldcumfpgwybvkxjqz1234567890%"," etaoinsrhldcumfpgwybvkxjqz1234567890]"," etaoinsrhldcumfpgwybvkxjqz1234567890["," etaoinsrhldcumfpgwybvk~!@#$%&*()-_+=,."," tnsrhldcmfpgwbvkxjqz1234567890?/<>;:[]"," tnsrhldcmfpgwbvkxjqz1234567890~!@#$%&*"," tnsrhldcmfpgwbvkxjqz1234567890()-_+=,."," etaoinsrhldcu~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcum~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvkx~!@#$%&*()-_+=,."," tnsrhldcmfpgwbvkxjqz1234567890?/<>;:[]'"," etaoinsrhldcumfpgwybvkxjqz1234567890$%&*"," etaoinsrhldcumfpgwybvkxjqz1234567890()-_"," etaoinsrhldcumfpgwybvkxj~!@#$%&*()-_+=,."," etaoinsrhldcumf~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvkxjqz1234567890+=,."," etaoinsrhldcumfpgwybvkxjqz1234567890~!@#"," etaoinsrhldcumfpgwybvkxjqz1234567890?/<>"," etaoinsrhldcumfpgwybvk1234567890()-_+=,."," etaoinsrhldcumfpgwybvkxjqz1234567890;:[]"," etaoinsrhldcumfpgwybvk1234567890~!@#$%&*"," etaoinsrhldcumfpgwybvk1234567890?/<>;:[]"," etaoinsrhldcum1234567890~!@#$%&*()-_+=,."," etaoinsrhldcumfp~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvkxjq~!@#$%&*()-_+=,."," etaoinsrhldcumfpgwybvk1234567890?/<>;:[]'"," etaoinsrhldcumfpgwybvkxjqz~!@#$%&*()-_+=,."," etaoinsrhldcumfpg~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgw~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvkxjqz1234567890()-_+=,."," etaoinsrhldcumfpgwy~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvkxjqz1234567890?/<>;:[]"," etaoinsrhldcumfpgwybvkxjqz1234567890~!@#$%&*"," etaoinsrhldcumfpgw1234567890~!@#$%&*()-_+=,."," etaoinsrhldcumfpgwybvkxjqz1234567890?/<>;:[]'"," tnsrhldcmfpgwbvkxjqz~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwyb~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhl1234567890~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybv~!@#$%&*()-_+=,.?/<>;:[]'"," tnsrhldcmfpgwbvkxjqz1234567890~!@#$%&*()-_+=,."," etaoinsrhldcumfpgwybvk~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvkx~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvk1234567890~!@#$%&*()-_+=,."," etaoinsrhldcum1234567890~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvkxj~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvkxjq~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvkxjqz~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvkxjqz1234567890~!@#$%&*()-_+=,."," etaoinsrhldcumfpgw1234567890~!@#$%&*()-_+=,.?/<>;:[]'"," tnsrhldcmfpgwbvkxjqz1234567890~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvk1234567890~!@#$%&*()-_+=,.?/<>;:[]'"," etaoinsrhldcumfpgwybvkxjqz1234567890~!@#$%&*()-_+=,.?/<>;:[]'"]
def shortest_charset(self, input_str : str) -> int:
"""Find shortest suitable charset for input"""
unique = "".join(set(input_str)) # Remove duplicates
for index,charset in enumerate(self.charsets):
good_charset = True
for char in unique:
if char not in charset:
good_charset = False
break
if good_charset:
return index
return -1
def calculate_checksum(self, digits : int) -> int:
sum = 0
for d in str(digits):
sum += int(d)
sum+=1
return sum % 10
def validate_checksum(self, digits : int, expected : int) -> bool:
try:
int(digits)
int(expected)
except ValueError:
return False
if self.calculate_checksum(digits) == expected:
return True
return False
def validate_message(self, message : str) -> bool:
if len(message) > 29:
message = message[-29:]
shortest = self.shortest_charset(message)
if shortest == -1:
return False
try:
message = str(int(message) ^ self.sikrit)
except Exception:
return False
expected = int(message[-1:])
charset_index = int(message[-4:-1])
return self.validate_checksum(charset_index, expected) | class Nanote:
"""Implementation of some Nanote logic in python for server-side validation"""
sikrit = 895175784877
charsets = [' etaoinsrhl', ' 1234567890', " 1234567890'", " etaoinsrhl'", " 1234567890'", " etaoinsrhl'", " 1234567890'", " etaoinsrhl'", ' 1234567890]', ' etaoinsrhl]', ' 1234567890[', ' etaoinsrhl[', ' 1234567890:', ' etaoinsrhl:', ' 1234567890;', ' etaoinsrhl;', ' 1234567890>', ' etaoinsrhld', ' 1234567890<', ' etaoinsrhl<', ' 1234567890/', ' etaoinsrhl/', ' 1234567890?', ' etaoinsrhl?', ' etaoinsrhl>', ' etaoinsrhl~', ' 1234567890.', ' etaoinsrhl.', ' 1234567890,', ' etaoinsrhl,', ' 1234567890=', ' etaoinsrhl=', ' 1234567890+', ' etaoinsrhl+', ' 1234567890_', ' etaoinsrhl_', ' 1234567890-', ' etaoinsrhl-', ' 1234567890)', ' etaoinsrhl)', ' 1234567890(', ' etaoinsrhl(', ' 1234567890*', ' etaoinsrhl*', ' 1234567890&', ' etaoinsrhl&', ' 1234567890%', ' etaoinsrhl%', ' 1234567890$', ' 1234567890~', ' etaoinsrhl!', ' etaoinsrhl$', ' 1234567890#', ' etaoinsrhl#', ' 1234567890@', ' etaoinsrhl@', ' 1234567890!', ' etaoinsrhld$', ' etaoinsrhld_', " etaoinsrhld'", ' etaoinsrhld@', ' etaoinsrhld-', ' etaoinsrhld=', " etaoinsrhld'", ' etaoinsrhld,', ' etaoinsrhld#', ' etaoinsrhld)', ' etaoinsrhld.', ' etaoinsrhld~', ' etaoinsrhld?', ' etaoinsrhld!', ' etaoinsrhld+', ' etaoinsrhld(', ' etaoinsrhld/', ' etaoinsrhld<', ' etaoinsrhld>', ' etaoinsrhld*', ' etaoinsrhld%', ' etaoinsrhld;', ' etaoinsrhld:', " etaoinsrhld'", ' etaoinsrhld[', ' etaoinsrhldc', ' etaoinsrhld]', ' etaoinsrhld&', ' etaoinsrhldc_', " etaoinsrhldc'", ' etaoinsrhldc+', ' etaoinsrhldc$', " etaoinsrhldc'", ' etaoinsrhldc,', ' etaoinsrhldc/', ' etaoinsrhldc)', ' etaoinsrhldc<', ' etaoinsrhldc@', ' etaoinsrhldc>', ' etaoinsrhldc*', ' etaoinsrhldc#', ' etaoinsrhldc-', ' etaoinsrhldc%', ' etaoinsrhldc~', ' etaoinsrhldc;', ' etaoinsrhldc[', " etaoinsrhldc'", ' etaoinsrhldc.', ' etaoinsrhldc:', ' etaoinsrhldcu', ' etaoinsrhldc=', ' etaoinsrhldc]', ' etaoinsrhldc?', ' etaoinsrhldc&', ' etaoinsrhldc(', ' etaoinsrhldc!', ' etaoinsrhldcu$', ' etaoinsrhldcu!', ' etaoinsrhldcu;', " etaoinsrhldcu'", ' etaoinsrhl()-_', ' 1234567890$%&*', ' etaoinsrhldcu/', ' etaoinsrhldcu#', ' etaoinsrhldcu=', ' etaoinsrhl$%&*', ' 1234567890~!@#', ' etaoinsrhldcu<', ' etaoinsrhldcu~', " etaoinsrhldcu'", ' etaoinsrhl~!@#', ' etaoinsrhldcu>', ' etaoinsrhldcu*', ' etaoinsrhldcu@', ' etaoinsrhldcu-', ' etaoinsrhldcu.', ' etaoinsrhl?/<>', ' etaoinsrhldcu%', ' 1234567890+=,.', ' etaoinsrhldcu_', ' 1234567890;:[]', " etaoinsrhldcu'", ' etaoinsrhldcu+', ' etaoinsrhl+=,.', ' 1234567890()-_', ' etaoinsrhldcu:', ' etaoinsrhldcu?', ' etaoinsrhldcu(', ' etaoinsrhldcu]', ' etaoinsrhldcu,', ' etaoinsrhldcu)', ' etaoinsrhldcu&', ' etaoinsrhl;:[]', ' 1234567890?/<>', ' etaoinsrhldcu[', ' etaoinsrhldcum', ' etaoinsrhldcum[', ' etaoinsrhldcum&', ' etaoinsrhldcum_', ' etaoinsrhldcum]', " etaoinsrhldcum'", ' etaoinsrhldcum+', ' etaoinsrhldcum-', ' etaoinsrhldcum@', " etaoinsrhldcum'", ' etaoinsrhldcum:', ' etaoinsrhldcum=', ' etaoinsrhldcum~', ' etaoinsrhldcumf', ' etaoinsrhldcum,', ' etaoinsrhldcum)', ' etaoinsrhldcum;', ' etaoinsrhld;:[]', ' etaoinsrhldcum%', ' etaoinsrhldcum!', ' etaoinsrhldcum#', ' etaoinsrhldcum>', " etaoinsrhldcum'", ' etaoinsrhld?/<>', ' etaoinsrhldcum.', ' etaoinsrhldcum*', ' etaoinsrhld+=,.', ' etaoinsrhldcum?', ' etaoinsrhldcum(', ' etaoinsrhld~!@#', ' etaoinsrhld()-_', ' etaoinsrhldcum$', ' etaoinsrhldcum/', ' etaoinsrhldcum<', ' etaoinsrhld$%&*', ' etaoinsrhldcumf%', ' etaoinsrhldcumf)', ' etaoinsrhldcumf<', ' etaoinsrhldcumf$', ' etaoinsrhldc~!@#', ' etaoinsrhldc()-_', ' etaoinsrhldcumfp', ' etaoinsrhldcumf(', ' etaoinsrhldcumf?', ' etaoinsrhldcumf[', ' etaoinsrhldcumf*', ' etaoinsrhldc+=,.', ' etaoinsrhldcumf.', " etaoinsrhldcumf'", ' etaoinsrhldc?/<>', ' etaoinsrhldcumf#', ' etaoinsrhldcumf>', ' etaoinsrhldcumf/', ' etaoinsrhldcumf;', ' etaoinsrhldc$%&*', ' etaoinsrhldcumf,', ' etaoinsrhldc;:[]', ' etaoinsrhldcumf~', ' etaoinsrhldcumf=', ' etaoinsrhldcumf:', " etaoinsrhldcumf'", ' etaoinsrhldcumf@', ' etaoinsrhldcumf]', ' etaoinsrhldcumf-', ' etaoinsrhldcumf+', ' etaoinsrhldcumf!', ' etaoinsrhldcumf&', ' etaoinsrhldcumf_', " etaoinsrhldcumf'", ' etaoinsrhldcumfp$', ' etaoinsrhldcumfp)', ' etaoinsrhldcu+=,.', ' etaoinsrhldcumfp;', ' etaoinsrhldcumfp.', ' etaoinsrhldcu;:[]', ' etaoinsrhldcumfp%', ' etaoinsrhldcumfpg', ' etaoinsrhldcu~!@#', ' etaoinsrhldcumfp=', " etaoinsrhldcumfp'", ' etaoinsrhldcumfp]', ' etaoinsrhldcumfp(', ' etaoinsrhldcumfp?', " etaoinsrhldcumfp'", ' etaoinsrhldcumfp~', ' etaoinsrhldcumfp+', ' etaoinsrhldcumfp@', ' etaoinsrhldcu?/<>', ' etaoinsrhldcumfp:', ' etaoinsrhldcumfp#', ' etaoinsrhldcumfp<', ' etaoinsrhldcumfp-', ' etaoinsrhldcumfp,', ' etaoinsrhldcumfp&', ' etaoinsrhldcumfp*', ' etaoinsrhldcumfp!', ' etaoinsrhldcumfp>', ' etaoinsrhldcumfp_', ' etaoinsrhldcumfp/', ' etaoinsrhldcumfp[', ' etaoinsrhldcu$%&*', " etaoinsrhldcumfp'", ' etaoinsrhldcu()-_', ' etaoinsrhldcumfpg;', ' etaoinsrhl?/<>;:[]', ' etaoinsrhldcumfpg)', ' 1234567890()-_+=,.', ' etaoinsrhl()-_+=,.', ' etaoinsrhldcumfpg?', " etaoinsrhldcumfpg'", ' etaoinsrhldcumfpg[', ' etaoinsrhldcumfpg>', ' etaoinsrhldcum+=,.', ' etaoinsrhldcumfpg=', ' 1234567890~!@#$%&*', ' etaoinsrhl~!@#$%&*', ' etaoinsrhldcumfpg(', ' etaoinsrhldcumfpg$', ' etaoinsrhldcumfpg@', ' etaoinsrhldcum;:[]', ' etaoinsrhldcum$%&*', ' etaoinsrhldcumfpg~', ' etaoinsrhldcumfpg+', " etaoinsrhldcumfpg'", ' etaoinsrhldcum()-_', ' etaoinsrhldcumfpg*', ' etaoinsrhldcumfpg.', ' etaoinsrhldcumfpg%', " etaoinsrhldcumfpg'", ' etaoinsrhldcumfpg&', ' etaoinsrhldcumfpg-', ' etaoinsrhldcumfpg<', ' etaoinsrhldcumfpg#', ' etaoinsrhldcumfpg:', ' etaoinsrhldcum?/<>', ' etaoinsrhldcum~!@#', ' etaoinsrhldcumfpg_', ' etaoinsrhldcumfpg,', ' etaoinsrhldcumfpgw', ' etaoinsrhldcumfpg]', ' etaoinsrhldcumfpg/', ' etaoinsrhldcumfpg!', ' 1234567890?/<>;:[]', " etaoinsrhldcumfpgw'", ' etaoinsrhldcumfpgw<', ' etaoinsrhldcumfpgw_', ' etaoinsrhldcumf?/<>', ' etaoinsrhldcumfpgw#', " 1234567890?/<>;:[]'", ' etaoinsrhldcumfpgw~', ' etaoinsrhldcumf+=,.', ' etaoinsrhldcumfpgw-', ' etaoinsrhldcumfpgw+', ' etaoinsrhldcumf()-_', ' etaoinsrhldcumfpgw$', " etaoinsrhldcumfpgw'", ' etaoinsrhldcumf$%&*', ' etaoinsrhldcumfpgw=', ' etaoinsrhldcumf~!@#', ' etaoinsrhld?/<>;:[]', ' etaoinsrhldcumfpgw)', " etaoinsrhldcumfpgw'", ' etaoinsrhldcumfpgw,', ' etaoinsrhldcumf;:[]', ' etaoinsrhldcumfpgw%', ' etaoinsrhldcumfpgw@', ' etaoinsrhld~!@#$%&*', ' etaoinsrhldcumfpgw.', ' etaoinsrhldcumfpgw]', ' etaoinsrhldcumfpgwy', " etaoinsrhl?/<>;:[]'", ' etaoinsrhldcumfpgw[', ' etaoinsrhldcumfpgw(', ' etaoinsrhldcumfpgw?', ' etaoinsrhldcumfpgw&', ' etaoinsrhldcumfpgw:', ' etaoinsrhld()-_+=,.', ' etaoinsrhldcumfpgw/', ' etaoinsrhldcumfpgw;', ' etaoinsrhldcumfpgw!', ' etaoinsrhldcumfpgw>', ' etaoinsrhldcumfpgw*', ' etaoinsrhldcumfpgwy,', ' etaoinsrhldcumfp;:[]', ' etaoinsrhldcumfpgwy_', ' etaoinsrhldcumfp+=,.', ' etaoinsrhldcumfpgwy%', ' etaoinsrhldcumfpgwy$', ' etaoinsrhldcumfpgwy!', ' etaoinsrhldcumfpgwy]', ' etaoinsrhldcumfpgwy@', ' etaoinsrhldcumfpgwy.', ' etaoinsrhldcumfpgwy~', ' etaoinsrhldc~!@#$%&*', ' etaoinsrhldc?/<>;:[]', ' etaoinsrhldcumfpgwyb', ' etaoinsrhldcumfp$%&*', ' etaoinsrhldcumfpgwy[', ' etaoinsrhldcumfp?/<>', " etaoinsrhld?/<>;:[]'", ' etaoinsrhldcumfpgwy(', ' etaoinsrhldcumfpgwy<', ' etaoinsrhldcumfpgwy=', ' etaoinsrhldcumfpgwy?', " etaoinsrhldcumfpgwy'", ' etaoinsrhldcumfpgwy:', ' etaoinsrhldcumfp~!@#', ' etaoinsrhldcumfpgwy&', ' tnsrhldcmfpgwbvkxjqz', ' etaoinsrhldc()-_+=,.', ' etaoinsrhldcumfpgwy-', ' etaoinsrhldcumfpgwy#', ' etaoinsrhldcumfpgwy/', ' etaoinsrhldcumfpgwy;', " etaoinsrhldcumfpgwy'", ' etaoinsrhldcumfpgwy)', ' etaoinsrhldcumfpgwy>', " etaoinsrhldcumfpgwy'", ' etaoinsrhldcumfpgwy+', ' etaoinsrhldcumfpgwy*', ' etaoinsrhl1234567890', ' etaoinsrhldcumfp()-_', ' etaoinsrhl1234567890;', ' etaoinsrhldcumfpgwyb,', ' etaoinsrhldcumfpg+=,.', " tnsrhldcmfpgwbvkxjqz'", ' tnsrhldcmfpgwbvkxjqz~', " tnsrhldcmfpgwbvkxjqz'", ' etaoinsrhl1234567890+', ' etaoinsrhldcumfpgwyb%', ' etaoinsrhl1234567890,', ' tnsrhldcmfpgwbvkxjqz_', ' tnsrhldcmfpgwbvkxjqz]', ' tnsrhldcmfpgwbvkxjqz,', ' etaoinsrhl1234567890!', ' tnsrhldcmfpgwbvkxjqz(', ' etaoinsrhldcumfpgwyb@', ' etaoinsrhl1234567890]', ' etaoinsrhl1234567890(', ' etaoinsrhldcumfpgwyb]', ' etaoinsrhl1234567890-', ' tnsrhldcmfpgwbvkxjqz+', ' etaoinsrhldcumfpgwyb_', ' etaoinsrhldcumfpgwyb.', ' etaoinsrhldcu?/<>;:[]', ' etaoinsrhl1234567890%', ' tnsrhldcmfpgwbvkxjqz)', ' etaoinsrhldcumfpgwyb~', ' etaoinsrhldcumfpg$%&*', ' tnsrhldcmfpgwbvkxjqz-', ' etaoinsrhl1234567890.', ' tnsrhldcmfpgwbvkxjqz[', ' etaoinsrhl1234567890)', ' etaoinsrhldcu~!@#$%&*', ' tnsrhldcmfpgwbvkxjqz.', ' etaoinsrhl1234567890[', ' etaoinsrhldcumfpgwyb[', ' tnsrhldcmfpgwbvkxjqz@', ' etaoinsrhl1234567890#', ' etaoinsrhldcumfpgwyb-', ' tnsrhldcmfpgwbvkxjqz%', ' etaoinsrhldcumfpgwyb(', ' etaoinsrhldcumfpg?/<>', ' etaoinsrhldcumfpgwyb=', " etaoinsrhldc?/<>;:[]'", ' etaoinsrhldcumfpgwyb$', ' etaoinsrhldcumfpgwyb#', ' etaoinsrhldcumfpgwyb?', " etaoinsrhldcumfpgwyb'", ' etaoinsrhldcumfpgwybv', ' tnsrhldcmfpgwbvkxjqz:', ' etaoinsrhl1234567890:', ' etaoinsrhldcumfpgwyb:', ' etaoinsrhldcumfpg~!@#', ' etaoinsrhl1234567890?', ' etaoinsrhl1234567890@', " tnsrhldcmfpgwbvkxjqz'", ' etaoinsrhldcumfpgwyb&', ' tnsrhldcmfpgwbvkxjqz?', ' etaoinsrhldcu()-_+=,.', ' etaoinsrhl1234567890=', ' etaoinsrhl1234567890$', ' etaoinsrhl1234567890~', " etaoinsrhl1234567890'", ' tnsrhldcmfpgwbvkxjqz*', ' tnsrhldcmfpgwbvkxjqz;', ' etaoinsrhldcumfpgwyb;', ' tnsrhldcmfpgwbvkxjqz=', " etaoinsrhl1234567890'", ' etaoinsrhldcumfpgwyb/', " etaoinsrhl1234567890'", " etaoinsrhldcumfpgwyb'", ' etaoinsrhl1234567890&', " etaoinsrhldcumfpgwyb'", ' tnsrhldcmfpgwbvkxjqz>', ' etaoinsrhldcumfpgwyb!', ' etaoinsrhl1234567890/', ' etaoinsrhl1234567890>', ' tnsrhldcmfpgwbvkxjqz!', ' etaoinsrhldcumfpgwyb>', ' tnsrhldcmfpgwbvkxjqz/', ' etaoinsrhldcumfpgwyb)', ' etaoinsrhl1234567890*', ' etaoinsrhldcumfpgwyb+', ' tnsrhldcmfpgwbvkxjqz&', ' etaoinsrhldcumfpg()-_', ' etaoinsrhl1234567890_', ' etaoinsrhldcumfpgwyb*', ' tnsrhldcmfpgwbvkxjqz$', ' etaoinsrhldcumfpg;:[]', ' tnsrhldcmfpgwbvkxjqz#', ' etaoinsrhldcumfpgwyb<', ' tnsrhldcmfpgwbvkxjqz<', ' etaoinsrhl1234567890<', ' etaoinsrhldcumfpgwybv)', ' etaoinsrhldcumfpgwybv%', ' etaoinsrhldcumfpgwybv,', ' etaoinsrhldcumfpgw;:[]', " etaoinsrhldcumfpgwybv'", ' etaoinsrhldcumfpgwybv<', ' etaoinsrhldcumfpgw~!@#', ' etaoinsrhldcumfpgwybv*', ' etaoinsrhldcumfpgwybv]', ' etaoinsrhldcumfpgwybv!', " etaoinsrhldcumfpgwybv'", ' etaoinsrhldcumfpgwybv>', ' etaoinsrhldcumfpgwybv.', " etaoinsrhldcumfpgwybv'", ' etaoinsrhldcumfpgw?/<>', ' etaoinsrhldcumfpgwybv_', ' etaoinsrhldcumfpgwybv$', ' etaoinsrhldcumfpgwybv#', ' etaoinsrhldcumfpgwybv=', ' etaoinsrhldcumfpgw$%&*', ' etaoinsrhldcum?/<>;:[]', ' etaoinsrhldcumfpgwybv/', ' etaoinsrhldcumfpgw+=,.', ' etaoinsrhldcumfpgwybv;', ' etaoinsrhldcumfpgwybv[', ' etaoinsrhldcumfpgwybv(', ' etaoinsrhldcumfpgwybv-', ' etaoinsrhldcum~!@#$%&*', ' etaoinsrhldcumfpgwybv~', ' etaoinsrhldcumfpgwybv?', ' etaoinsrhldcumfpgwybvk', " etaoinsrhldcu?/<>;:[]'", ' etaoinsrhldcumfpgwybv@', ' etaoinsrhldcumfpgwybv&', ' etaoinsrhldcum()-_+=,.', ' etaoinsrhldcumfpgwybv:', ' etaoinsrhldcumfpgw()-_', ' etaoinsrhldcumfpgwybv+', ' etaoinsrhldcumfpgwybvk#', ' etaoinsrhldcumfpgwy;:[]', ' etaoinsrhldcumfpgwybvk:', ' etaoinsrhldcumfpgwybvk@', ' etaoinsrhldcumfpgwybvk&', ' etaoinsrhldcumfpgwy()-_', ' etaoinsrhldcumf~!@#$%&*', ' etaoinsrhldcumfpgwybvkx', ' etaoinsrhldcumfpgwybvk?', " etaoinsrhldcum?/<>;:[]'", ' etaoinsrhldcumfpgwybvk~', ' etaoinsrhldcumfpgwybvk-', ' etaoinsrhldcumfpgwybvk(', ' etaoinsrhldcumf?/<>;:[]', ' etaoinsrhldcumfpgwybvk;', ' etaoinsrhldcumfpgwybvk[', ' etaoinsrhldcumfpgwybvk/', ' etaoinsrhldcumfpgwy$%&*', ' etaoinsrhldcumfpgwy+=,.', ' etaoinsrhldcumf()-_+=,.', ' etaoinsrhldcumfpgwybvk_', ' etaoinsrhldcumfpgwybvk$', ' etaoinsrhldcumfpgwybvk=', ' etaoinsrhldcumfpgwy?/<>', ' etaoinsrhldcumfpgwybvk.', " etaoinsrhldcumfpgwybvk'", ' etaoinsrhldcumfpgwybvk>', ' etaoinsrhldcumfpgwy~!@#', ' etaoinsrhldcumfpgwybvk*', ' etaoinsrhldcumfpgwybvk]', ' etaoinsrhldcumfpgwybvk!', " etaoinsrhldcumfpgwybvk'", " etaoinsrhldcumfpgwybvk'", ' etaoinsrhldcumfpgwybvk)', ' etaoinsrhldcumfpgwybvk<', ' etaoinsrhldcumfpgwybvk,', ' etaoinsrhldcumfpgwybvk%', ' etaoinsrhldcumfpgwybvk+', ' etaoinsrhldcumfpgwybvkx>', ' etaoinsrhldcumfpgwybvkx?', ' etaoinsrhldcumfpgwybvkx*', ' etaoinsrhldcumfpgwybvkx;', " etaoinsrhldcumfpgwybvkx'", ' etaoinsrhldcumfpgwybvkx-', ' etaoinsrhl1234567890$%&*', ' tnsrhldcmfpgwbvkxjqz?/<>', ' etaoinsrhldcumfpgwybvkx!', ' tnsrhldcmfpgwbvkxjqz()-_', ' etaoinsrhldcumfpgwybvkx(', ' etaoinsrhldcumfp()-_+=,.', ' etaoinsrhldcumfpgwybvkx~', ' etaoinsrhldcumfpgwybvkx_', ' etaoinsrhl1234567890()-_', ' etaoinsrhldcumfpgwybvkx[', ' etaoinsrhldcumfpgwybvkx@', ' etaoinsrhldcumfpgwyb$%&*', ' etaoinsrhldcumfpgwybvkxj', ' etaoinsrhl1234567890;:[]', ' etaoinsrhldcumfpgwyb()-_', ' etaoinsrhl1234567890?/<>', ' etaoinsrhldcumfpgwybvkx&', ' etaoinsrhldcumfpgwybvkx$', ' tnsrhldcmfpgwbvkxjqz~!@#', ' etaoinsrhldcumfpgwybvkx#', ' etaoinsrhldcumfpgwybvkx=', ' etaoinsrhldcumfpgwybvkx.', ' tnsrhldcmfpgwbvkxjqz+=,.', " etaoinsrhldcumf?/<>;:[]'", ' etaoinsrhl1234567890~!@#', ' etaoinsrhl1234567890+=,.', " etaoinsrhldcumfpgwybvkx'", ' etaoinsrhldcumfpgwybvkx%', ' tnsrhldcmfpgwbvkxjqz;:[]', ' etaoinsrhldcumfpgwyb~!@#', ' etaoinsrhldcumfpgwyb+=,.', ' etaoinsrhldcumfpgwybvkx/', ' etaoinsrhldcum1234567890', ' etaoinsrhldcumfpgwybvkx]', ' etaoinsrhldcumfpgwyb?/<>', ' etaoinsrhldcumfpgwybvkx)', " etaoinsrhldcumfpgwybvkx'", ' etaoinsrhldcumfpgwybvkx:', ' etaoinsrhldcumfpgwybvkx+', ' etaoinsrhldcumfpgwyb;:[]', ' etaoinsrhldcumfpgwybvkx<', ' tnsrhldcmfpgwbvkxjqz$%&*', ' etaoinsrhldcumfpgwybvkx,', ' etaoinsrhldcumfp?/<>;:[]', ' etaoinsrhldcumfp~!@#$%&*', ' etaoinsrhldcumfpgwybvkxj!', " etaoinsrhldcum1234567890'", ' etaoinsrhldcum1234567890,', ' etaoinsrhldcum1234567890!', ' etaoinsrhldcumfpgwybvkxj~', ' etaoinsrhldcumfpgwybvkxj<', ' etaoinsrhldcumfpgwybv;:[]', ' etaoinsrhldcum1234567890]', ' etaoinsrhldcum1234567890(', " etaoinsrhldcumfpgwybvkxj'", ' etaoinsrhldcum1234567890<', " etaoinsrhldcum1234567890'", " etaoinsrhldcum1234567890'", ' etaoinsrhldcumfpgwybvkxj)', ' etaoinsrhldcum1234567890-', " etaoinsrhldcumfpgwybvkxj'", ' etaoinsrhldcum1234567890$', ' etaoinsrhldcum1234567890=', ' etaoinsrhldcum1234567890@', ' etaoinsrhldcumfpgwybvkxj=', ' etaoinsrhldcumfpgwybvkxj]', ' etaoinsrhldcumfpgwybv~!@#', ' etaoinsrhldcumfpgwybvkxj*', ' etaoinsrhldcumfpgwybvkxj%', ' etaoinsrhldcum1234567890~', ' etaoinsrhldcum1234567890%', ' etaoinsrhldcumfpgwybvkxj.', " etaoinsrhldcumfpgwybvkxj'", ' etaoinsrhldcumfpgwybvkxj$', ' etaoinsrhldcum1234567890.', ' etaoinsrhldcum1234567890[', ' etaoinsrhldcum1234567890)', ' etaoinsrhldcumfpg()-_+=,.', ' etaoinsrhldcumfpgwybvkxj,', ' etaoinsrhldcumfpgwybv$%&*', ' etaoinsrhldcumfpgwybvkxj[', ' etaoinsrhldcumfpgwybvkxj(', ' etaoinsrhldcumfpgwybv?/<>', ' etaoinsrhldcum1234567890:', ' etaoinsrhldcumfpgwybvkxj>', ' etaoinsrhldcumfpgwybvkxj?', ' etaoinsrhldcum1234567890+', ' etaoinsrhldcumfpgwybvkxj-', ' etaoinsrhldcumfpgwybvkxj+', ' etaoinsrhldcumfpgwybvkxj:', ' etaoinsrhldcum1234567890/', ' etaoinsrhldcum1234567890?', ' etaoinsrhldcumfpgwybvkxj&', ' etaoinsrhldcumfpgwybv()-_', ' etaoinsrhldcum1234567890>', ' etaoinsrhldcumfpg~!@#$%&*', ' etaoinsrhldcumfpgwybvkxj@', ' etaoinsrhldcum1234567890;', ' etaoinsrhldcumfpgwybvkxj_', " etaoinsrhldcumfp?/<>;:[]'", ' etaoinsrhldcum1234567890#', ' etaoinsrhldcumfpgwybvkxj#', ' etaoinsrhldcumfpgwybvkxj;', ' etaoinsrhldcumfpg?/<>;:[]', ' etaoinsrhldcum1234567890*', ' etaoinsrhldcum1234567890&', ' etaoinsrhldcumfpgwybv+=,.', ' etaoinsrhldcumfpgwybvkxjq', ' etaoinsrhldcum1234567890_', ' etaoinsrhldcumfpgwybvkxj/', ' etaoinsrhldcumfpgwybvkxjq?', ' etaoinsrhldcumfpgwybvkxjq+', ' etaoinsrhldcumfpgwybvkxjq$', ' etaoinsrhldcumfpgwybvkxjq~', ' etaoinsrhldcumfpgwybvkxjq:', " etaoinsrhldcumfpgwybvkxjq'", ' etaoinsrhldcumfpgwybvkxjq,', " etaoinsrhldcumfpgwybvkxjq'", ' etaoinsrhldcumfpgw()-_+=,.', ' etaoinsrhldcumfpgwybvkxjq-', ' etaoinsrhldcumfpgwybvkxjq&', ' etaoinsrhldcumfpgwybvkxjq)', ' etaoinsrhldcumfpgwybvk()-_', ' etaoinsrhldcumfpgwybvkxjq*', ' etaoinsrhldcumfpgwybvkxjq(', " etaoinsrhldcumfpgwybvkxjq'", ' etaoinsrhldcumfpgwybvkxjq!', ' etaoinsrhldcumfpgwybvkxjq@', ' etaoinsrhldcumfpgw~!@#$%&*', ' etaoinsrhldcumfpgwybvk~!@#', ' etaoinsrhldcumfpgwybvkxjq[', ' etaoinsrhldcumfpgwybvk;:[]', ' etaoinsrhldcumfpgwybvk$%&*', ' etaoinsrhldcumfpgwybvkxjq;', ' etaoinsrhldcumfpgwybvkxjq/', ' etaoinsrhldcumfpgwybvkxjq#', ' etaoinsrhldcumfpgwybvk?/<>', ' etaoinsrhldcumfpgwybvkxjq]', ' etaoinsrhldcumfpgwybvkxjq%', ' etaoinsrhldcumfpgw?/<>;:[]', ' 1234567890~!@#$%&*()-_+=,.', ' etaoinsrhldcumfpgwybvkxjqz', ' etaoinsrhldcumfpgwybvkxjq<', " etaoinsrhldcumfpg?/<>;:[]'", ' etaoinsrhldcumfpgwybvk+=,.', ' etaoinsrhl~!@#$%&*()-_+=,.', ' etaoinsrhldcumfpgwybvkxjq.', ' etaoinsrhldcumfpgwybvkxjq_', ' etaoinsrhldcumfpgwybvkxjq=', ' etaoinsrhldcumfpgwybvkxjq>', ' etaoinsrhldcumfpgwybvkxjqz[', ' etaoinsrhldcumfpgwybvkxjqz_', ' etaoinsrhldcumfpgwybvkx+=,.', " etaoinsrhldcumfpgwybvkxjqz'", ' etaoinsrhldcumfpgwybvkxjqz&', ' etaoinsrhldcumfpgwybvkxjqz#', ' etaoinsrhldcumfpgwybvkxjqz;', ' etaoinsrhldcumfpgwybvkxjqz@', ' etaoinsrhldcumfpgwybvkxjqz/', ' etaoinsrhldcumfpgwybvkx()-_', ' etaoinsrhldcumfpgwybvkxjqz?', ' etaoinsrhldcumfpgwybvkxjqz>', ' etaoinsrhldcumfpgwybvkxjqz:', ' etaoinsrhldcumfpgwybvkxjqz+', ' etaoinsrhld~!@#$%&*()-_+=,.', " etaoinsrhldcumfpgw?/<>;:[]'", ' etaoinsrhldcumfpgwybvkxjqz~', ' etaoinsrhldcumfpgwybvkx$%&*', ' etaoinsrhldcumfpgwybvkx?/<>', ' etaoinsrhldcumfpgwy~!@#$%&*', ' etaoinsrhldcumfpgwybvkxjqz*', ' etaoinsrhldcumfpgwybvkxjqz)', ' etaoinsrhldcumfpgwy()-_+=,.', ' etaoinsrhldcumfpgwybvkxjqz.', ' etaoinsrhldcumfpgwybvkxjqz%', ' etaoinsrhldcumfpgwybvkx~!@#', ' etaoinsrhldcumfpgwybvkxjqz(', ' etaoinsrhldcumfpgwybvkxjqz=', ' etaoinsrhldcumfpgwybvkx;:[]', ' etaoinsrhldcumfpgwybvkxjqz$', ' etaoinsrhldcumfpgwybvkxjqz-', " etaoinsrhldcumfpgwybvkxjqz'", ' etaoinsrhldcumfpgwy?/<>;:[]', " etaoinsrhldcumfpgwybvkxjqz'", ' etaoinsrhldcumfpgwybvkxjqz<', ' etaoinsrhldcumfpgwybvkxjqz]', ' etaoinsrhldcumfpgwybvkxjqz!', ' etaoinsrhldcumfpgwybvkxjqz,', ' etaoinsrhldcum1234567890+=,.', ' etaoinsrhldcumfpgwybvkxj?/<>', ' etaoinsrhldcumfpgwyb()-_+=,.', ' etaoinsrhldcum1234567890;:[]', ' etaoinsrhldcumfpgwybvkxj$%&*', ' etaoinsrhldcum1234567890?/<>', " etaoinsrhldcumfpgwy?/<>;:[]'", ' tnsrhldcmfpgwbvkxjqz()-_+=,.', ' etaoinsrhldcumfpgwyb?/<>;:[]', ' etaoinsrhldcum1234567890$%&*', ' etaoinsrhldcumfpgwybvkxj~!@#', ' etaoinsrhldcumfpgwybvkxj;:[]', ' etaoinsrhl1234567890()-_+=,.', ' etaoinsrhldcumfpgwyb~!@#$%&*', ' etaoinsrhldcumfpgwybvkxj()-_', ' tnsrhldcmfpgwbvkxjqz~!@#$%&*', ' etaoinsrhldcum1234567890~!@#', ' etaoinsrhldcumfpgw1234567890', ' etaoinsrhldcum1234567890()-_', ' tnsrhldcmfpgwbvkxjqz?/<>;:[]', ' etaoinsrhldcumfpgwybvkxj+=,.', ' etaoinsrhl1234567890?/<>;:[]', ' etaoinsrhl1234567890~!@#$%&*', ' etaoinsrhldc~!@#$%&*()-_+=,.', ' etaoinsrhldcumfpgw1234567890[', ' etaoinsrhldcumfpgw1234567890@', " etaoinsrhl1234567890?/<>;:[]'", ' etaoinsrhldcumfpgw1234567890,', ' etaoinsrhldcumfpgw1234567890=', ' etaoinsrhldcumfpgwybvkxjq?/<>', ' etaoinsrhldcumfpgwybv?/<>;:[]', ' etaoinsrhldcumfpgw1234567890)', ' etaoinsrhldcumfpgwybvkxjq+=,.', ' etaoinsrhldcumfpgw1234567890#', " etaoinsrhldcumfpgw1234567890'", ' etaoinsrhldcumfpgwybv()-_+=,.', ' etaoinsrhldcumfpgwybvkxjq()-_', ' etaoinsrhldcumfpgw1234567890-', ' etaoinsrhldcumfpgw1234567890(', ' etaoinsrhldcumfpgwybvkxjq$%&*', ' etaoinsrhldcu~!@#$%&*()-_+=,.', ' etaoinsrhldcumfpgw1234567890.', ' etaoinsrhldcumfpgw1234567890_', ' etaoinsrhldcumfpgw1234567890?', ' etaoinsrhldcumfpgwybvkxjq~!@#', ' etaoinsrhldcumfpgw1234567890$', " etaoinsrhldcumfpgw1234567890'", " etaoinsrhldcumfpgw1234567890'", ' etaoinsrhldcumfpgw1234567890]', ' etaoinsrhldcumfpgw1234567890%', ' etaoinsrhldcumfpgwybvkxjq;:[]', ' etaoinsrhldcumfpgw1234567890:', ' etaoinsrhldcumfpgw1234567890;', ' etaoinsrhldcumfpgw1234567890&', ' etaoinsrhldcumfpgwybv~!@#$%&*', " etaoinsrhldcumfpgwyb?/<>;:[]'", ' etaoinsrhldcumfpgw1234567890+', ' etaoinsrhldcumfpgw1234567890>', " tnsrhldcmfpgwbvkxjqz?/<>;:[]'", ' etaoinsrhldcumfpgw1234567890~', ' etaoinsrhldcumfpgw1234567890<', ' etaoinsrhldcumfpgw1234567890/', ' etaoinsrhldcumfpgw1234567890*', ' etaoinsrhldcumfpgw1234567890!', ' etaoinsrhldcumfpgwybvk~!@#$%&*', ' etaoinsrhldcumfpgwybvkxjqz~!@#', ' tnsrhldcmfpgwbvkxjqz1234567890', ' etaoinsrhldcum~!@#$%&*()-_+=,.', ' etaoinsrhldcumfpgwybvkxjqz$%&*', " etaoinsrhldcumfpgwybv?/<>;:[]'", ' etaoinsrhldcumfpgwybvk()-_+=,.', ' etaoinsrhldcumfpgwybvkxjqz+=,.', ' etaoinsrhldcumfpgwybvk?/<>;:[]', ' etaoinsrhldcumfpgwybvkxjqz?/<>', ' etaoinsrhldcumfpgwybvkxjqz;:[]', ' etaoinsrhldcumfpgwybvkxjqz()-_', ' tnsrhldcmfpgwbvkxjqz1234567890&', " tnsrhldcmfpgwbvkxjqz1234567890'", ' tnsrhldcmfpgwbvkxjqz1234567890]', ' tnsrhldcmfpgwbvkxjqz1234567890<', ' tnsrhldcmfpgwbvkxjqz1234567890!', ' tnsrhldcmfpgwbvkxjqz1234567890+', ' tnsrhldcmfpgwbvkxjqz1234567890/', ' tnsrhldcmfpgwbvkxjqz1234567890[', ' etaoinsrhldcumfpgwybvkx?/<>;:[]', ' tnsrhldcmfpgwbvkxjqz1234567890*', " tnsrhldcmfpgwbvkxjqz1234567890'", ' tnsrhldcmfpgwbvkxjqz1234567890?', ' tnsrhldcmfpgwbvkxjqz1234567890%', ' tnsrhldcmfpgwbvkxjqz1234567890:', ' etaoinsrhldcumf~!@#$%&*()-_+=,.', ' tnsrhldcmfpgwbvkxjqz1234567890.', " etaoinsrhldcumfpgwybvk?/<>;:[]'", ' tnsrhldcmfpgwbvkxjqz1234567890;', " tnsrhldcmfpgwbvkxjqz1234567890'", ' tnsrhldcmfpgwbvkxjqz1234567890_', ' tnsrhldcmfpgwbvkxjqz1234567890>', ' etaoinsrhldcumfpgwybvkx()-_+=,.', ' tnsrhldcmfpgwbvkxjqz1234567890)', ' tnsrhldcmfpgwbvkxjqz1234567890#', ' tnsrhldcmfpgwbvkxjqz1234567890(', ' tnsrhldcmfpgwbvkxjqz1234567890-', ' tnsrhldcmfpgwbvkxjqz1234567890,', ' tnsrhldcmfpgwbvkxjqz1234567890@', ' tnsrhldcmfpgwbvkxjqz1234567890=', ' tnsrhldcmfpgwbvkxjqz1234567890$', ' tnsrhldcmfpgwbvkxjqz1234567890~', ' etaoinsrhldcumfpgwybvkx~!@#$%&*', ' etaoinsrhldcum1234567890?/<>;:[]', " etaoinsrhldcumfpgwybvkx?/<>;:[]'", ' etaoinsrhldcumfpgwybvkxj()-_+=,.', ' etaoinsrhldcumfpgwybvk1234567890', ' etaoinsrhldcum1234567890~!@#$%&*', ' etaoinsrhldcumfpgwybvkxj~!@#$%&*', ' etaoinsrhldcumfp~!@#$%&*()-_+=,.', ' etaoinsrhldcum1234567890()-_+=,.', ' etaoinsrhldcumfpgw1234567890$%&*', ' etaoinsrhldcumfpgw1234567890()-_', ' etaoinsrhldcumfpgw1234567890+=,.', ' etaoinsrhldcumfpgw1234567890;:[]', ' etaoinsrhldcumfpgw1234567890?/<>', ' etaoinsrhldcumfpgwybvkxj?/<>;:[]', ' etaoinsrhldcumfpgw1234567890~!@#', ' etaoinsrhldcumfpgwybvk1234567890]', ' etaoinsrhldcumfpgwybvk1234567890/', ' etaoinsrhldcumfpgwybvk1234567890&', " etaoinsrhldcumfpgwybvk1234567890'", " etaoinsrhldcumfpgwybvk1234567890'", ' etaoinsrhldcumfpgwybvk1234567890@', ' etaoinsrhldcumfpgwybvkxjq()-_+=,.', ' etaoinsrhldcumfpg~!@#$%&*()-_+=,.', ' etaoinsrhldcumfpgwybvk1234567890_', ' etaoinsrhldcumfpgwybvk1234567890;', ' etaoinsrhldcumfpgwybvk1234567890%', ' etaoinsrhldcumfpgwybvk1234567890$', ' etaoinsrhldcumfpgwybvkxjq~!@#$%&*', " etaoinsrhldcum1234567890?/<>;:[]'", ' etaoinsrhldcumfpgwybvk1234567890)', ' etaoinsrhldcumfpgwybvk1234567890!', ' etaoinsrhldcumfpgwybvk1234567890+', ' etaoinsrhldcumfpgwybvk1234567890#', ' etaoinsrhldcumfpgwybvk1234567890-', ' etaoinsrhldcumfpgwybvk1234567890.', ' etaoinsrhldcumfpgwybvk1234567890(', ' etaoinsrhldcumfpgwybvk1234567890=', ' etaoinsrhldcumfpgwybvk1234567890:', " etaoinsrhldcumfpgwybvk1234567890'", ' etaoinsrhldcumfpgwybvk1234567890>', ' etaoinsrhldcumfpgwybvk1234567890,', ' etaoinsrhldcumfpgwybvk1234567890*', " etaoinsrhldcumfpgwybvkxj?/<>;:[]'", ' etaoinsrhldcumfpgwybvk1234567890[', ' etaoinsrhldcumfpgwybvk1234567890<', ' etaoinsrhldcumfpgwybvk1234567890?', ' etaoinsrhldcumfpgwybvkxjq?/<>;:[]', ' etaoinsrhldcumfpgwybvk1234567890~', ' etaoinsrhldcumfpgwybvkxjqz()-_+=,.', ' etaoinsrhldcumfpgwybvkxjqz?/<>;:[]', ' etaoinsrhldcumfpgw~!@#$%&*()-_+=,.', ' tnsrhldcmfpgwbvkxjqz1234567890~!@#', ' tnsrhldcmfpgwbvkxjqz1234567890$%&*', " etaoinsrhldcumfpgwybvkxjq?/<>;:[]'", ' tnsrhldcmfpgwbvkxjqz1234567890()-_', ' tnsrhldcmfpgwbvkxjqz1234567890+=,.', ' tnsrhldcmfpgwbvkxjqz1234567890?/<>', ' tnsrhldcmfpgwbvkxjqz1234567890;:[]', ' etaoinsrhldcumfpgwybvkxjqz~!@#$%&*', " etaoinsrhldcumfpgwybvkxjqz?/<>;:[]'", " 1234567890~!@#$%&*()-_+=,.?/<>;:[]'", ' etaoinsrhldcumfpgwy~!@#$%&*()-_+=,.', " etaoinsrhl~!@#$%&*()-_+=,.?/<>;:[]'", ' etaoinsrhldcumfpgw1234567890()-_+=,.', ' etaoinsrhldcumfpgw1234567890~!@#$%&*', ' etaoinsrhldcumfpgwybvk1234567890;:[]', ' etaoinsrhldcumfpgw1234567890?/<>;:[]', ' etaoinsrhldcumfpgwybvk1234567890?/<>', ' etaoinsrhldcumfpgwybvk1234567890+=,.', ' etaoinsrhldcumfpgwybvk1234567890()-_', " etaoinsrhld~!@#$%&*()-_+=,.?/<>;:[]'", ' etaoinsrhldcumfpgwybvk1234567890$%&*', ' etaoinsrhldcumfpgwybvk1234567890~!@#', ' etaoinsrhldcumfpgwyb~!@#$%&*()-_+=,.', ' etaoinsrhldcumfpgwybvkxjqz1234567890', ' etaoinsrhl1234567890~!@#$%&*()-_+=,.', ' tnsrhldcmfpgwbvkxjqz~!@#$%&*()-_+=,.', " etaoinsrhldcumfpgwybvkxjqz1234567890'", ' etaoinsrhldcumfpgwybvkxjqz1234567890:', ' etaoinsrhldcumfpgwybvkxjqz1234567890#', ' etaoinsrhldcumfpgwybvkxjqz1234567890_', ' etaoinsrhldcumfpgwybvkxjqz1234567890=', " etaoinsrhldc~!@#$%&*()-_+=,.?/<>;:[]'", ' etaoinsrhldcumfpgwybvkxjqz1234567890,', ' etaoinsrhldcumfpgwybvkxjqz1234567890(', ' etaoinsrhldcumfpgwybvkxjqz1234567890+', ' etaoinsrhldcumfpgwybvkxjqz1234567890$', ' etaoinsrhldcumfpgwybvkxjqz1234567890-', " etaoinsrhldcumfpgwybvkxjqz1234567890'", ' etaoinsrhldcumfpgwybvkxjqz1234567890.', ' etaoinsrhldcumfpgwybvkxjqz1234567890?', " etaoinsrhldcumfpgw1234567890?/<>;:[]'", ' etaoinsrhldcumfpgwybv~!@#$%&*()-_+=,.', ' etaoinsrhldcumfpgwybvkxjqz1234567890@', ' etaoinsrhldcumfpgwybvkxjqz1234567890*', ' etaoinsrhldcumfpgwybvkxjqz1234567890/', ' etaoinsrhldcumfpgwybvkxjqz1234567890<', ' etaoinsrhldcumfpgwybvkxjqz1234567890>', ' etaoinsrhldcumfpgwybvkxjqz1234567890!', ' etaoinsrhldcumfpgwybvkxjqz1234567890&', ' etaoinsrhldcumfpgwybvkxjqz1234567890;', " etaoinsrhldcumfpgwybvkxjqz1234567890'", ' etaoinsrhldcumfpgwybvkxjqz1234567890~', ' etaoinsrhldcumfpgwybvkxjqz1234567890)', ' etaoinsrhldcumfpgwybvkxjqz1234567890%', ' etaoinsrhldcumfpgwybvkxjqz1234567890]', ' etaoinsrhldcumfpgwybvkxjqz1234567890[', ' etaoinsrhldcumfpgwybvk~!@#$%&*()-_+=,.', ' tnsrhldcmfpgwbvkxjqz1234567890?/<>;:[]', ' tnsrhldcmfpgwbvkxjqz1234567890~!@#$%&*', ' tnsrhldcmfpgwbvkxjqz1234567890()-_+=,.', " etaoinsrhldcu~!@#$%&*()-_+=,.?/<>;:[]'", " etaoinsrhldcum~!@#$%&*()-_+=,.?/<>;:[]'", ' etaoinsrhldcumfpgwybvkx~!@#$%&*()-_+=,.', " tnsrhldcmfpgwbvkxjqz1234567890?/<>;:[]'", ' etaoinsrhldcumfpgwybvkxjqz1234567890$%&*', ' etaoinsrhldcumfpgwybvkxjqz1234567890()-_', ' etaoinsrhldcumfpgwybvkxj~!@#$%&*()-_+=,.', " etaoinsrhldcumf~!@#$%&*()-_+=,.?/<>;:[]'", ' etaoinsrhldcumfpgwybvkxjqz1234567890+=,.', ' etaoinsrhldcumfpgwybvkxjqz1234567890~!@#', ' etaoinsrhldcumfpgwybvkxjqz1234567890?/<>', ' etaoinsrhldcumfpgwybvk1234567890()-_+=,.', ' etaoinsrhldcumfpgwybvkxjqz1234567890;:[]', ' etaoinsrhldcumfpgwybvk1234567890~!@#$%&*', ' etaoinsrhldcumfpgwybvk1234567890?/<>;:[]', ' etaoinsrhldcum1234567890~!@#$%&*()-_+=,.', " etaoinsrhldcumfp~!@#$%&*()-_+=,.?/<>;:[]'", ' etaoinsrhldcumfpgwybvkxjq~!@#$%&*()-_+=,.', " etaoinsrhldcumfpgwybvk1234567890?/<>;:[]'", ' etaoinsrhldcumfpgwybvkxjqz~!@#$%&*()-_+=,.', " etaoinsrhldcumfpg~!@#$%&*()-_+=,.?/<>;:[]'", " etaoinsrhldcumfpgw~!@#$%&*()-_+=,.?/<>;:[]'", ' etaoinsrhldcumfpgwybvkxjqz1234567890()-_+=,.', " etaoinsrhldcumfpgwy~!@#$%&*()-_+=,.?/<>;:[]'", ' etaoinsrhldcumfpgwybvkxjqz1234567890?/<>;:[]', ' etaoinsrhldcumfpgwybvkxjqz1234567890~!@#$%&*', ' etaoinsrhldcumfpgw1234567890~!@#$%&*()-_+=,.', " etaoinsrhldcumfpgwybvkxjqz1234567890?/<>;:[]'", " tnsrhldcmfpgwbvkxjqz~!@#$%&*()-_+=,.?/<>;:[]'", " etaoinsrhldcumfpgwyb~!@#$%&*()-_+=,.?/<>;:[]'", " etaoinsrhl1234567890~!@#$%&*()-_+=,.?/<>;:[]'", " etaoinsrhldcumfpgwybv~!@#$%&*()-_+=,.?/<>;:[]'", ' tnsrhldcmfpgwbvkxjqz1234567890~!@#$%&*()-_+=,.', " etaoinsrhldcumfpgwybvk~!@#$%&*()-_+=,.?/<>;:[]'", " etaoinsrhldcumfpgwybvkx~!@#$%&*()-_+=,.?/<>;:[]'", ' etaoinsrhldcumfpgwybvk1234567890~!@#$%&*()-_+=,.', " etaoinsrhldcum1234567890~!@#$%&*()-_+=,.?/<>;:[]'", " etaoinsrhldcumfpgwybvkxj~!@#$%&*()-_+=,.?/<>;:[]'", " etaoinsrhldcumfpgwybvkxjq~!@#$%&*()-_+=,.?/<>;:[]'", " etaoinsrhldcumfpgwybvkxjqz~!@#$%&*()-_+=,.?/<>;:[]'", ' etaoinsrhldcumfpgwybvkxjqz1234567890~!@#$%&*()-_+=,.', " etaoinsrhldcumfpgw1234567890~!@#$%&*()-_+=,.?/<>;:[]'", " tnsrhldcmfpgwbvkxjqz1234567890~!@#$%&*()-_+=,.?/<>;:[]'", " etaoinsrhldcumfpgwybvk1234567890~!@#$%&*()-_+=,.?/<>;:[]'", " etaoinsrhldcumfpgwybvkxjqz1234567890~!@#$%&*()-_+=,.?/<>;:[]'"]
def shortest_charset(self, input_str: str) -> int:
"""Find shortest suitable charset for input"""
unique = ''.join(set(input_str))
for (index, charset) in enumerate(self.charsets):
good_charset = True
for char in unique:
if char not in charset:
good_charset = False
break
if good_charset:
return index
return -1
def calculate_checksum(self, digits: int) -> int:
sum = 0
for d in str(digits):
sum += int(d)
sum += 1
return sum % 10
def validate_checksum(self, digits: int, expected: int) -> bool:
try:
int(digits)
int(expected)
except ValueError:
return False
if self.calculate_checksum(digits) == expected:
return True
return False
def validate_message(self, message: str) -> bool:
if len(message) > 29:
message = message[-29:]
shortest = self.shortest_charset(message)
if shortest == -1:
return False
try:
message = str(int(message) ^ self.sikrit)
except Exception:
return False
expected = int(message[-1:])
charset_index = int(message[-4:-1])
return self.validate_checksum(charset_index, expected) |
def gaussianQuadrature(function, a, b):
"""
Perform a Gaussian quadrature approximation of the integral of a function
from a to b.
"""
# Coefficient values can be found at pomax.github.io/bezierinfo/legendre-gauss.html
A = (b - a)/2
B = (b + a)/2
return A * (
0.2955242247147529*function(-A*0.1488743389816312 + B) + \
0.2955242247147529*function(+A*0.1488743389816312 + B) + \
0.2692667193099963*function(-A*0.4333953941292472 + B) + \
0.2692667193099963*function(+A*0.4333953941292472 + B) + \
0.2190863625159820*function(-A*0.6794095682990244 + B) + \
0.2190863625159820*function(+A*0.6794095682990244 + B) + \
0.1494513491505806*function(-A*0.8650633666889845 + B) + \
0.1494513491505806*function(+A*0.8650633666889845 + B) + \
0.0666713443086881*function(-A*0.9739065285171717 + B) + \
0.0666713443086881*function(+A*0.9739065285171717 + B)
) | def gaussian_quadrature(function, a, b):
"""
Perform a Gaussian quadrature approximation of the integral of a function
from a to b.
"""
a = (b - a) / 2
b = (b + a) / 2
return A * (0.2955242247147529 * function(-A * 0.1488743389816312 + B) + 0.2955242247147529 * function(+A * 0.1488743389816312 + B) + 0.2692667193099963 * function(-A * 0.4333953941292472 + B) + 0.2692667193099963 * function(+A * 0.4333953941292472 + B) + 0.219086362515982 * function(-A * 0.6794095682990244 + B) + 0.219086362515982 * function(+A * 0.6794095682990244 + B) + 0.1494513491505806 * function(-A * 0.8650633666889845 + B) + 0.1494513491505806 * function(+A * 0.8650633666889845 + B) + 0.0666713443086881 * function(-A * 0.9739065285171717 + B) + 0.0666713443086881 * function(+A * 0.9739065285171717 + B)) |
routes = []
def list_gizmos():
return 'Listing Gizmos'
routes.append(dict(
rule='/gizmos',
view_func=list_gizmos))
def add_gizmo():
return 'Add Gizmo'
routes.append(dict(
rule='/gizmo',
view_func=add_gizmo,
options=dict(methods=['POST'])))
def update_gizmo():
return 'Update Gizmo'
routes.append(dict(
rule='/gizmo',
view_func=update_gizmo,
options=dict(methods=['PUT'])))
def delete_gizmo():
return 'Delete Gadget'
routes.append(dict(
rule='/gadget',
view_func=delete_gizmo,
options=dict(methods=['DELETE'])))
| routes = []
def list_gizmos():
return 'Listing Gizmos'
routes.append(dict(rule='/gizmos', view_func=list_gizmos))
def add_gizmo():
return 'Add Gizmo'
routes.append(dict(rule='/gizmo', view_func=add_gizmo, options=dict(methods=['POST'])))
def update_gizmo():
return 'Update Gizmo'
routes.append(dict(rule='/gizmo', view_func=update_gizmo, options=dict(methods=['PUT'])))
def delete_gizmo():
return 'Delete Gadget'
routes.append(dict(rule='/gadget', view_func=delete_gizmo, options=dict(methods=['DELETE']))) |
SOFTWARE_DEVELOPMENT = "Software Development"
ELECTRICAL_ENGINEERING = "Electrical Engineering"
IT_OPERATIONS = "IT Operations & Helpdesk"
INFORMATION_DESIGN_AND_DOCUMENTATION = "Information Design & Documentation"
PROJECT_MANAGEMENT = "Project Management"
| software_development = 'Software Development'
electrical_engineering = 'Electrical Engineering'
it_operations = 'IT Operations & Helpdesk'
information_design_and_documentation = 'Information Design & Documentation'
project_management = 'Project Management' |
N, *p = map(int, open(0).read().split())
for x in p:
if x == 2:
print(2)
else:
print((x - 1) * (x - 1))
| (n, *p) = map(int, open(0).read().split())
for x in p:
if x == 2:
print(2)
else:
print((x - 1) * (x - 1)) |
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 14 16:20:05 2020
@author: Ashish
"""
friends = ["Rolf", "Bob", "Jen"]
print("Jen" in friends)
# --
movies_watched = {"The Matrix", "Green Book", "Her"}
user_movie = input("Enter something you've watched recently: ")
print(user_movie in movies_watched)
# The `in` keyword works in most sequences like lists, tuples, and sets. | """
Created on Tue Jul 14 16:20:05 2020
@author: Ashish
"""
friends = ['Rolf', 'Bob', 'Jen']
print('Jen' in friends)
movies_watched = {'The Matrix', 'Green Book', 'Her'}
user_movie = input("Enter something you've watched recently: ")
print(user_movie in movies_watched) |
# (c) Copyright 2021 Aaron Kimball
"""
Version info for Arduino Debugger.
"""
# This module **must not** import anything else!
DBG_VERSION = [0, 3, 0]
DBG_VERSION_STR = '.'.join(map(str, DBG_VERSION))
FULL_DBG_VERSION_STR = f'Arduino Debugger (adbg) version {DBG_VERSION_STR}'
LICENSE = """Copyright 2022 Aaron Kimball
Redistribution and use in source and binary forms, with or without modification, are
permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of
conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list
of conditions and the following disclaimer in the documentation and/or other materials
provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be
used to endorse or promote products derived from this software without specific prior
written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
if __name__ == '__main__':
print(FULL_DBG_VERSION_STR)
print('')
print(LICENSE)
| """
Version info for Arduino Debugger.
"""
dbg_version = [0, 3, 0]
dbg_version_str = '.'.join(map(str, DBG_VERSION))
full_dbg_version_str = f'Arduino Debugger (adbg) version {DBG_VERSION_STR}'
license = 'Copyright 2022 Aaron Kimball\n\nRedistribution and use in source and binary forms, with or without modification, are\npermitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice, this list of\n conditions and the following disclaimer.\n 2. Redistributions in binary form must reproduce the above copyright notice, this list\n of conditions and the following disclaimer in the documentation and/or other materials\n provided with the distribution.\n 3. Neither the name of the copyright holder nor the names of its contributors may be\n used to endorse or promote products derived from this software without specific prior\n written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY\nEXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\nCOPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\nEXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\nHOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR\nTORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n'
if __name__ == '__main__':
print(FULL_DBG_VERSION_STR)
print('')
print(LICENSE) |
def parse_cds_header(header_str):
data = header_str.split('|')
data_count = len(data)
data_dict = dict(zip(data[0:data_count:2], data[1:data_count:2]))
return data_dict
def parse_nt_header(header_str):
data = header_str.split('|')
data_dict = {}
data_dict['gi'] = int(data[1])
data_dict['accession'] = data[3]
data_dict['description'] = data[4].strip()
return data_dict
def parse_genome_header(header_str):
hdata = header_str.split()
data = parse_cds_header(hdata[0])
if len(hdata) == 2:
data['description'] = hdata[1]
else:
data['description'] = ''
return data
def get_cds_id(cds_header_data):
return '{0}_{1}'.format(cds_header_data['gb'], cds_header_data['cds'])
| def parse_cds_header(header_str):
data = header_str.split('|')
data_count = len(data)
data_dict = dict(zip(data[0:data_count:2], data[1:data_count:2]))
return data_dict
def parse_nt_header(header_str):
data = header_str.split('|')
data_dict = {}
data_dict['gi'] = int(data[1])
data_dict['accession'] = data[3]
data_dict['description'] = data[4].strip()
return data_dict
def parse_genome_header(header_str):
hdata = header_str.split()
data = parse_cds_header(hdata[0])
if len(hdata) == 2:
data['description'] = hdata[1]
else:
data['description'] = ''
return data
def get_cds_id(cds_header_data):
return '{0}_{1}'.format(cds_header_data['gb'], cds_header_data['cds']) |
"""
https://leetcode.com/problems/4sum-ii
"""
# define an input for testing purposes
A = [1, 2]
B = [-2, -1]
C = [-1, 2]
D = [0, 2]
# actual code to submit
tracker = {}
solution = 0
for i in range(len(A)):
for z in range(len(B)):
num = A[i] + B[z]
if num in tracker:
tracker[num] = tracker[num] + 1
else:
tracker[num] = 1
for y in range(len(C)):
for x in range(len(D)):
num = C[y] + D[x]
if -num in tracker:
solution += tracker[-num]
# use print statement to check if it works
print(solution)
# My Submission: https://leetcode.com/submissions/detail/431625337/
| """
https://leetcode.com/problems/4sum-ii
"""
a = [1, 2]
b = [-2, -1]
c = [-1, 2]
d = [0, 2]
tracker = {}
solution = 0
for i in range(len(A)):
for z in range(len(B)):
num = A[i] + B[z]
if num in tracker:
tracker[num] = tracker[num] + 1
else:
tracker[num] = 1
for y in range(len(C)):
for x in range(len(D)):
num = C[y] + D[x]
if -num in tracker:
solution += tracker[-num]
print(solution) |
# Count Binary Substrings: https://leetcode.com/problems/count-binary-substrings/
# Give a binary string s, return the number of non-empty substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in these substrings are grouped consecutively.
# Substrings that occur multiple times are counted the number of times they occur.
# We can move across the array and keep track off the number of values before that are the same and every time we switch check how many were before and take that as our count
class Solution:
def countBinarySubstrings(self, s: str) -> int:
prevCount, result, curCount = 0, 0, 1
for index in range(1, len(s)):
if s[index-1] != s[index]:
result += min(curCount, prevCount)
prevCount, curCount = curCount, 1
else:
curCount += 1
return result + min(curCount, prevCount)
# The above actually works really well and is actually the most optimal as it runs in o(n) and o(1). My initial thought was exactly on.
# This problem was actually a lot easier when I thought of it as a dynamic programming problem even though it really is more of a
# slidding window problem where you reset your count by alternating the counts
# Score Card
# Did I need hints? N
# Did you finish within 30 min? 13 min
# Was the solution optimal? See the above
# Were there any bugs? I accidently started my curcount at 0 when it should have been at 1 because we always
# start where it switches
# 5 5 5 3 = 4.5
| class Solution:
def count_binary_substrings(self, s: str) -> int:
(prev_count, result, cur_count) = (0, 0, 1)
for index in range(1, len(s)):
if s[index - 1] != s[index]:
result += min(curCount, prevCount)
(prev_count, cur_count) = (curCount, 1)
else:
cur_count += 1
return result + min(curCount, prevCount) |
#!/usr/bin/python
"""
Copyright (c) 2014 tilt (https://github.com/AeonDave/sir)
See the file 'LICENSE' for copying permission
"""
pass
| """
Copyright (c) 2014 tilt (https://github.com/AeonDave/sir)
See the file 'LICENSE' for copying permission
"""
pass |
# create he following pattern
# ['h']
# ['h', 'e']
# ['h', 'e', 'l']
# ['h', 'e', 'l', 'l']
# ['h', 'e', 'l', 'l', 'o']
text='hello'
my_list=[]
for char in text:
my_list.append(char)
print(my_list) | text = 'hello'
my_list = []
for char in text:
my_list.append(char)
print(my_list) |
class Input(object):
"""This class represents inputs. Mainly, this class used to be able to distinguish between inputs and outputs."""
def __init__(self, value):
super(Input, self).__init__()
self.value = value
def __str__(self):
return 'in(' + str(self.value) + ')'
def __repr__(self):
return str(self) | class Input(object):
"""This class represents inputs. Mainly, this class used to be able to distinguish between inputs and outputs."""
def __init__(self, value):
super(Input, self).__init__()
self.value = value
def __str__(self):
return 'in(' + str(self.value) + ')'
def __repr__(self):
return str(self) |
age = input("Enter birthdate in dd/mm/yyyy format? ")
age_year = age[-4:]
age_in_2021 = 2021-int(age_year)
last_character=age_in_2021 % 10
c=" "*7+"_"*(5-int(last_character/2))+"i"*last_character+"_"*(5-int(last_character/2))+" "*7
print(c)
a=""" |:H:a:p:p:y:|
__|___________|__
|^^^^^^^^^^^^^^^^^|
|:B:i:r:t:h:d:a:y:|
| |
~~~~~~~~~~~~~~~~~~~
"""
print(a)
'''
___iiiii___
|:H:a:p:p:y:|
__|___________|__
|^^^^^^^^^^^^^^^^^|
|:B:i:r:t:h:d:a:y:|
| |
~~~~~~~~~~~~~~~~~~~
''' | age = input('Enter birthdate in dd/mm/yyyy format? ')
age_year = age[-4:]
age_in_2021 = 2021 - int(age_year)
last_character = age_in_2021 % 10
c = ' ' * 7 + '_' * (5 - int(last_character / 2)) + 'i' * last_character + '_' * (5 - int(last_character / 2)) + ' ' * 7
print(c)
a = ' |:H:a:p:p:y:|\n __|___________|__\n |^^^^^^^^^^^^^^^^^|\n |:B:i:r:t:h:d:a:y:|\n | |\n ~~~~~~~~~~~~~~~~~~~\n'
print(a)
'\n\n ___iiiii___\n |:H:a:p:p:y:|\n __|___________|__\n |^^^^^^^^^^^^^^^^^|\n |:B:i:r:t:h:d:a:y:|\n | |\n ~~~~~~~~~~~~~~~~~~~\n\n' |
class AllianzeAccountCreator:
"""
Allianze Account Creator
"""
def __init__(self, allanze_account_command):
self.allanze_account_command = allanze_account_command
def __call__(self):
self.__repo.update_or_create()
allianze_serializer = AllianzeAccountSerializer(data=request.data)
if not allianze_serializer.is_valid():
exception = Exception(f"Not valid")
exception.errors = allianze_serializer.errors
raise exception
allizance_data = allianze_serializer.data
allianze_account_creator = AllianzeAccountCreator(**allizance_data)
allianze_account_creator()
| class Allianzeaccountcreator:
"""
Allianze Account Creator
"""
def __init__(self, allanze_account_command):
self.allanze_account_command = allanze_account_command
def __call__(self):
self.__repo.update_or_create()
allianze_serializer = allianze_account_serializer(data=request.data)
if not allianze_serializer.is_valid():
exception = exception(f'Not valid')
exception.errors = allianze_serializer.errors
raise exception
allizance_data = allianze_serializer.data
allianze_account_creator = allianze_account_creator(**allizance_data)
allianze_account_creator() |
# Basic Addition Calculator Program
# Takes input from the user and outputs the sum of those two numbers.
num1 = input("Enter a number: ")
num2 = input("Enter another number: ")
# Python by default converts inputs into strings a function is used to convert them into numbers.
# Float is used to allow the use of decimals.
result = float(num1) + float(num2)
print(result)
| num1 = input('Enter a number: ')
num2 = input('Enter another number: ')
result = float(num1) + float(num2)
print(result) |
def append_file(password, file_path):
try:
password_file = open(file_path, "a+")
password_file.write(password + "\r\n")
password_file.close()
except PermissionError as Err:
print("Error creating file: {}".format(Err))
| def append_file(password, file_path):
try:
password_file = open(file_path, 'a+')
password_file.write(password + '\r\n')
password_file.close()
except PermissionError as Err:
print('Error creating file: {}'.format(Err)) |
def mean(interactions, _):
"""Computes the mean interaction of the user (if user_based == true) or the mean
interaction of the item (item user_based == false). It simply sums the interaction
values of the neighbours and divides by the total number of neighbours."""
count, interaction_sum = 0, 0
for interaction in interactions:
interaction_sum += interaction
count += 1
return interaction_sum / count if count > 0 else None
def weighted_mean(interactions, similarities):
"""Computes the mean interaction of the user (if user_based == true) or the mean
interaction of the item (item user_based == false). It computes the sum of the similarities
multiplied by the interactions of each neighbour, and then divides this sum by the sum of
the similarities of the neighbours."""
sim_sum, interaction_sum = 0, 0
for interaction, similarity in zip(interactions, similarities):
interaction_sum += similarity * interaction
sim_sum += similarity
return interaction_sum / sim_sum if sim_sum > 0 else None
| def mean(interactions, _):
"""Computes the mean interaction of the user (if user_based == true) or the mean
interaction of the item (item user_based == false). It simply sums the interaction
values of the neighbours and divides by the total number of neighbours."""
(count, interaction_sum) = (0, 0)
for interaction in interactions:
interaction_sum += interaction
count += 1
return interaction_sum / count if count > 0 else None
def weighted_mean(interactions, similarities):
"""Computes the mean interaction of the user (if user_based == true) or the mean
interaction of the item (item user_based == false). It computes the sum of the similarities
multiplied by the interactions of each neighbour, and then divides this sum by the sum of
the similarities of the neighbours."""
(sim_sum, interaction_sum) = (0, 0)
for (interaction, similarity) in zip(interactions, similarities):
interaction_sum += similarity * interaction
sim_sum += similarity
return interaction_sum / sim_sum if sim_sum > 0 else None |
LANGUAGES = ['cs', 'da', 'de', 'en', 'es', 'et', 'fi',
'fr', 'it', 'nl', 'ro', 'pt', 'el', 'lt', 'lv']
LANGUAGE_DICTIONARY = {'cs' : 'Czech',
'da' : 'Danish',
'de' : 'German',
'en' : 'English',
'es' : 'Spanish',
'et' : 'Estonian',
'fi' : 'Finnish',
'fr' : 'French',
'it' : 'Italian',
'nl' : 'Dutch',
'ro' : 'Romanian',
'pt' : 'Portuguese',
'el' : 'Greek',
'lt' : 'Lithuanian',
'lv' : 'Latvian'} | languages = ['cs', 'da', 'de', 'en', 'es', 'et', 'fi', 'fr', 'it', 'nl', 'ro', 'pt', 'el', 'lt', 'lv']
language_dictionary = {'cs': 'Czech', 'da': 'Danish', 'de': 'German', 'en': 'English', 'es': 'Spanish', 'et': 'Estonian', 'fi': 'Finnish', 'fr': 'French', 'it': 'Italian', 'nl': 'Dutch', 'ro': 'Romanian', 'pt': 'Portuguese', 'el': 'Greek', 'lt': 'Lithuanian', 'lv': 'Latvian'} |
class MacOsJob:
def __init__(self, os_version, is_build=False, is_test=False, extra_props=tuple()):
# extra_props is tuple type, because mutable data structures for argument defaults
# is not recommended.
self.os_version = os_version
self.is_build = is_build
self.is_test = is_test
self.extra_props = dict(extra_props)
def gen_tree(self):
non_phase_parts = ["pytorch", "macos", self.os_version, "py3"]
extra_name_list = [name for name, exist in self.extra_props.items() if exist]
full_job_name_list = non_phase_parts + extra_name_list + [
'build' if self.is_build else None,
'test' if self.is_test else None,
]
full_job_name = "_".join(list(filter(None, full_job_name_list)))
test_build_dependency = "_".join(non_phase_parts + ["build"])
extra_dependencies = [test_build_dependency] if self.is_test else []
job_dependencies = extra_dependencies
# Yes we name the job after itself, it needs a non-empty value in here
# for the YAML output to work.
props_dict = {"requires": job_dependencies, "name": full_job_name}
return [{full_job_name: props_dict}]
WORKFLOW_DATA = [
MacOsJob("10_15", is_build=True),
MacOsJob("10_13", is_build=True),
MacOsJob(
"10_13",
is_build=False,
is_test=True,
),
MacOsJob(
"10_13",
is_build=True,
is_test=True,
extra_props=tuple({
"lite_interpreter": True
}.items()),
)
]
def get_workflow_jobs():
return [item.gen_tree() for item in WORKFLOW_DATA]
| class Macosjob:
def __init__(self, os_version, is_build=False, is_test=False, extra_props=tuple()):
self.os_version = os_version
self.is_build = is_build
self.is_test = is_test
self.extra_props = dict(extra_props)
def gen_tree(self):
non_phase_parts = ['pytorch', 'macos', self.os_version, 'py3']
extra_name_list = [name for (name, exist) in self.extra_props.items() if exist]
full_job_name_list = non_phase_parts + extra_name_list + ['build' if self.is_build else None, 'test' if self.is_test else None]
full_job_name = '_'.join(list(filter(None, full_job_name_list)))
test_build_dependency = '_'.join(non_phase_parts + ['build'])
extra_dependencies = [test_build_dependency] if self.is_test else []
job_dependencies = extra_dependencies
props_dict = {'requires': job_dependencies, 'name': full_job_name}
return [{full_job_name: props_dict}]
workflow_data = [mac_os_job('10_15', is_build=True), mac_os_job('10_13', is_build=True), mac_os_job('10_13', is_build=False, is_test=True), mac_os_job('10_13', is_build=True, is_test=True, extra_props=tuple({'lite_interpreter': True}.items()))]
def get_workflow_jobs():
return [item.gen_tree() for item in WORKFLOW_DATA] |
# Problem: Longest Palindrome
# Difficulty: Easy
# Category: String
# Leetcode 409: https://leetcode.com/problems/longest-palindrome/description/
# Description:
"""
Given a string which consists of lowercase or uppercase letters,
find the length of the longest palindromes that can be built with those letters.
This is case sensitive, for example "Aa" is not considered a palindrome here.
Note:
Assume the length of given string will not exceed 1,010.
Example:
Input:
"abccccdd"
Output:
7
Explanation:
One longest palindrome that can be built is "dccaccd", whose length is 7.
"""
class Solution(object):
# two-pass solution
def longestPalindrome(self, s):
if not s or len(s) == 0:
return 0
table = [0 for _ in range(58)]
count = 0
for c in s:
table[ord(c) - ord('A')] += 1
for num in table:
count += num // 2
return 2*count + min(1, len(s)-2*count)
# one-pass solution
def palindromeLength(self, s):
if not s or len(s) == 0:
return 0
table = [0 for _ in range(58)]
count = 0
for c in s:
if table[ord(c) - ord('A')] == 1:
table[ord(c) - ord('A')] -= 1
count += 2
elif table[ord(c) - ord('A')] == 0:
table[ord(c) - ord('A')] += 1
return count + min(1, len(s) - count)
obj = Solution()
s1 = "abccccdd"
s2 = 'a'
s3 = 'ABabedDDAD'
s4 = 'aabbccddeeffgggwerrtuimn'
print(obj.longestPalindrome(s1), obj.longestPalindrome(s2), obj.longestPalindrome(s3))
print(obj.palindromeLength(s1), obj.palindromeLength(s2), obj.palindromeLength(s3))
| """
Given a string which consists of lowercase or uppercase letters,
find the length of the longest palindromes that can be built with those letters.
This is case sensitive, for example "Aa" is not considered a palindrome here.
Note:
Assume the length of given string will not exceed 1,010.
Example:
Input:
"abccccdd"
Output:
7
Explanation:
One longest palindrome that can be built is "dccaccd", whose length is 7.
"""
class Solution(object):
def longest_palindrome(self, s):
if not s or len(s) == 0:
return 0
table = [0 for _ in range(58)]
count = 0
for c in s:
table[ord(c) - ord('A')] += 1
for num in table:
count += num // 2
return 2 * count + min(1, len(s) - 2 * count)
def palindrome_length(self, s):
if not s or len(s) == 0:
return 0
table = [0 for _ in range(58)]
count = 0
for c in s:
if table[ord(c) - ord('A')] == 1:
table[ord(c) - ord('A')] -= 1
count += 2
elif table[ord(c) - ord('A')] == 0:
table[ord(c) - ord('A')] += 1
return count + min(1, len(s) - count)
obj = solution()
s1 = 'abccccdd'
s2 = 'a'
s3 = 'ABabedDDAD'
s4 = 'aabbccddeeffgggwerrtuimn'
print(obj.longestPalindrome(s1), obj.longestPalindrome(s2), obj.longestPalindrome(s3))
print(obj.palindromeLength(s1), obj.palindromeLength(s2), obj.palindromeLength(s3)) |
__all__ = [
"job_poll",
"single_job",
]
| __all__ = ['job_poll', 'single_job'] |
"""
Module: 'flowlib.faces._calc' on M5 FlowUI v1.4.0-beta
"""
# MCU: (sysname='esp32', nodename='esp32', release='1.11.0', version='v1.11-284-g5d8e1c867 on 2019-08-30', machine='ESP32 module with ESP32')
# Stubber: 1.3.1
class Calc:
''
def _available():
pass
def _update():
pass
def clearStr():
pass
def deinit():
pass
def deleteStrLast():
pass
def isNewKeyPress():
pass
def readKey():
pass
def readStr():
pass
i2c_bus = None
| """
Module: 'flowlib.faces._calc' on M5 FlowUI v1.4.0-beta
"""
class Calc:
""""""
def _available():
pass
def _update():
pass
def clear_str():
pass
def deinit():
pass
def delete_str_last():
pass
def is_new_key_press():
pass
def read_key():
pass
def read_str():
pass
i2c_bus = None |
class Solution:
def generateTheString(self, n):
ans=[]
if n%2==0:
ans=['a' for i in range(n-1)]
ans.append('b')
else:
ans=['a' for i in range(n)]
return ans | class Solution:
def generate_the_string(self, n):
ans = []
if n % 2 == 0:
ans = ['a' for i in range(n - 1)]
ans.append('b')
else:
ans = ['a' for i in range(n)]
return ans |
"""
As the original oauth2_provider models are overwritten and users are forced to inherit from
the new models here in drf_integrations, every migration in oauth2_provider must be
replicated here, and it has to be added as a dependency to the migration.
For example, migration 0002 here has as a dependency the migration 0001 here and
the migration 0002 from oauth2_provider.
"""
| """
As the original oauth2_provider models are overwritten and users are forced to inherit from
the new models here in drf_integrations, every migration in oauth2_provider must be
replicated here, and it has to be added as a dependency to the migration.
For example, migration 0002 here has as a dependency the migration 0001 here and
the migration 0002 from oauth2_provider.
""" |
# singleton tuple <- singleton tuple
x, = 0,
print(x)
# singleton tuple <- singleton list
x, = [-1]
print(x)
# binary tuple <- binary tuple
x,y = 1,2
print(x,y)
# binary tuple swap
x,y = y,x
print(x,y)
# ternary tuple <- ternary tuple
x,y,z = 3,4,5
print(x,y,z)
# singleton list <- singleton list
[x] = [42]
print(x)
# singleton list <- singleton tuple
[x] = 43,
print(x)
# binary list <- binary list
[x,y] = [6,7]
# binary list <- binary tuple
[x,y] = [44,45]
print(x,y)
# binary tuple (parens) <- binary list
(x,y) = [7,8]
print(x,y)
# binary tuple <- result of function call
(x,y) = (lambda: (9,10))()
print(x,y)
# nested binary tuple (parens) <- nested binary tuple (parens)
((x,y),z) = ((11,12),13)
print(x,y,z)
# nested binary tuple <- nested binary tuple
(x,y),z = (14,15),16
print(x,y,z)
| (x,) = (0,)
print(x)
(x,) = [-1]
print(x)
(x, y) = (1, 2)
print(x, y)
(x, y) = (y, x)
print(x, y)
(x, y, z) = (3, 4, 5)
print(x, y, z)
[x] = [42]
print(x)
[x] = (43,)
print(x)
[x, y] = [6, 7]
[x, y] = [44, 45]
print(x, y)
(x, y) = [7, 8]
print(x, y)
(x, y) = (lambda : (9, 10))()
print(x, y)
((x, y), z) = ((11, 12), 13)
print(x, y, z)
((x, y), z) = ((14, 15), 16)
print(x, y, z) |
def f1():
pass
def f2():
pass
def f3():
def f35():
pass
| def f1():
pass
def f2():
pass
def f3():
def f35():
pass |
n = int(input())
print('*'*n)
for _ in range(n-2):
print(f'*{" " * (n - 2)}*')
print('*'*n)
| n = int(input())
print('*' * n)
for _ in range(n - 2):
print(f"*{' ' * (n - 2)}*")
print('*' * n) |
# Copyright (c) 2010 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [
{
'target_name': 'ceee_ie_all',
'type': 'none',
'dependencies': [
'common/common.gyp:*',
'broker/broker.gyp:*',
'plugin/bho/bho.gyp:*',
'plugin/scripting/scripting.gyp:*',
'plugin/toolband/toolband.gyp:*',
'ie_unittests',
'mediumtest_ie',
]
},
{
'target_name': 'testing_invoke_executor',
'type': 'executable',
'sources': [
'plugin/bho/testing_invoke_executor.cc',
],
'dependencies': [
'../../base/base.gyp:base',
'../common/common.gyp:ceee_common',
'common/common.gyp:ie_guids',
'plugin/toolband/toolband.gyp:toolband_idl',
'plugin/toolband/toolband.gyp:toolband_proxy_lib',
],
'libraries': [
'rpcrt4.lib',
],
},
{
'target_name': 'ie_unittests',
'type': 'executable',
'sources': [
'broker/api_dispatcher_unittest.cc',
'broker/broker_rpc_unittest.cc',
'broker/broker_unittest.cc',
'broker/cookie_api_module_unittest.cc',
'broker/executors_manager_unittest.cc',
'broker/infobar_api_module_unittest.cc',
'broker/tab_api_module_unittest.cc',
'broker/window_api_module_unittest.cc',
'broker/window_events_funnel_unittest.cc',
'common/ceee_module_util_unittest.cc',
'common/ceee_util_unittest.cc',
'common/chrome_frame_host_unittest.cc',
'common/crash_reporter_unittest.cc',
'common/extension_manifest_unittest.cc',
'common/ie_util_unittest.cc',
'common/metrics_util_unittest.cc',
'plugin/bho/browser_helper_object_unittest.cc',
'plugin/bho/cookie_accountant_unittest.cc',
'plugin/bho/cookie_events_funnel_unittest.cc',
'plugin/bho/dom_utils_unittest.cc',
'plugin/bho/events_funnel_unittest.cc',
'plugin/bho/executor_unittest.cc',
'plugin/bho/executor_com_unittest.cc',
'plugin/bho/extension_port_manager.cc',
'plugin/bho/frame_event_handler_unittest.cc',
'plugin/bho/infobar_events_funnel_unittest.cc',
'plugin/bho/infobar_manager_unittest.cc',
'plugin/bho/infobar_window_unittest.cc',
'plugin/bho/tab_events_funnel_unittest.cc',
'plugin/bho/tool_band_visibility_unittest.cc',
'plugin/bho/webnavigation_events_funnel_unittest.cc',
'plugin/bho/webrequest_events_funnel_unittest.cc',
'plugin/bho/webrequest_notifier_unittest.cc',
'plugin/bho/web_progress_notifier_unittest.cc',
'plugin/scripting/content_script_manager.rc',
'plugin/scripting/content_script_manager_unittest.cc',
'plugin/scripting/content_script_native_api_unittest.cc',
'plugin/scripting/renderer_extension_bindings_unittest.cc',
'plugin/scripting/renderer_extension_bindings_unittest.rc',
'plugin/scripting/script_host_unittest.cc',
'plugin/scripting/userscripts_librarian_unittest.cc',
'plugin/toolband/tool_band_unittest.cc',
'plugin/toolband/toolband_module_reporting_unittest.cc',
'testing/ie_unittest_main.cc',
'testing/mock_broker_and_friends.h',
'testing/mock_chrome_frame_host.h',
'testing/mock_browser_and_friends.h',
],
'msvs_settings': {
'VCCLCompilerTool': {
# Many symbols generated by GMock and GTest,
# we need /bigobj to cope.
'AdditionalOptions': ['/bigobj'],
},
},
'dependencies': [
'testing_invoke_executor',
'common/common.gyp:ie_common',
'common/common.gyp:ie_common_settings',
'common/common.gyp:ie_guids',
'broker/broker.gyp:broker',
'broker/broker.gyp:broker_rpc_lib',
'plugin/bho/bho.gyp:bho',
'plugin/scripting/scripting.gyp:javascript_bindings',
'plugin/scripting/scripting.gyp:scripting',
'plugin/toolband/toolband.gyp:ceee_ie_lib',
'plugin/toolband/toolband.gyp:ie_toolband_common',
'plugin/toolband/toolband.gyp:toolband_idl',
'plugin/toolband/toolband.gyp:toolband_proxy_lib',
'../../base/base.gyp:base',
'../../breakpad/breakpad.gyp:breakpad_handler',
'../testing/sidestep/sidestep.gyp:sidestep',
'../testing/utils/test_utils.gyp:test_utils',
'../../testing/gmock.gyp:gmock',
'../../testing/gtest.gyp:gtest',
],
'libraries': [
'oleacc.lib',
'iepmapi.lib',
'rpcrt4.lib',
],
},
{
'target_name': 'mediumtest_ie',
'type': 'executable',
'sources': [
'plugin/bho/mediumtest_browser_event.cc',
'plugin/bho/mediumtest_browser_helper_object.cc',
'testing/mediumtest_ie_common.cc',
'testing/mediumtest_ie_common.h',
'testing/mediumtest_ie_main.cc',
],
'msvs_settings': {
'VCCLCompilerTool': {
# Many symbols generated by GMock and GTest,
# we need /bigobj to cope.
'AdditionalOptions': ['/bigobj'],
},
},
'dependencies': [
'broker/broker.gyp:broker_rpc_lib',
'common/common.gyp:ie_common',
'common/common.gyp:ie_common_settings',
'common/common.gyp:ie_guids',
'plugin/bho/bho.gyp:bho',
'plugin/scripting/scripting.gyp:scripting',
'plugin/toolband/toolband.gyp:toolband_idl',
'plugin/toolband/toolband.gyp:toolband_proxy_lib',
'../../base/base.gyp:base',
'../../testing/gmock.gyp:gmock',
'../../testing/gtest.gyp:gtest',
'../testing/sidestep/sidestep.gyp:sidestep',
'../testing/utils/test_utils.gyp:test_utils',
],
'libraries': [
'oleacc.lib',
'iepmapi.lib',
'rpcrt4.lib',
],
},
]
}
| {'targets': [{'target_name': 'ceee_ie_all', 'type': 'none', 'dependencies': ['common/common.gyp:*', 'broker/broker.gyp:*', 'plugin/bho/bho.gyp:*', 'plugin/scripting/scripting.gyp:*', 'plugin/toolband/toolband.gyp:*', 'ie_unittests', 'mediumtest_ie']}, {'target_name': 'testing_invoke_executor', 'type': 'executable', 'sources': ['plugin/bho/testing_invoke_executor.cc'], 'dependencies': ['../../base/base.gyp:base', '../common/common.gyp:ceee_common', 'common/common.gyp:ie_guids', 'plugin/toolband/toolband.gyp:toolband_idl', 'plugin/toolband/toolband.gyp:toolband_proxy_lib'], 'libraries': ['rpcrt4.lib']}, {'target_name': 'ie_unittests', 'type': 'executable', 'sources': ['broker/api_dispatcher_unittest.cc', 'broker/broker_rpc_unittest.cc', 'broker/broker_unittest.cc', 'broker/cookie_api_module_unittest.cc', 'broker/executors_manager_unittest.cc', 'broker/infobar_api_module_unittest.cc', 'broker/tab_api_module_unittest.cc', 'broker/window_api_module_unittest.cc', 'broker/window_events_funnel_unittest.cc', 'common/ceee_module_util_unittest.cc', 'common/ceee_util_unittest.cc', 'common/chrome_frame_host_unittest.cc', 'common/crash_reporter_unittest.cc', 'common/extension_manifest_unittest.cc', 'common/ie_util_unittest.cc', 'common/metrics_util_unittest.cc', 'plugin/bho/browser_helper_object_unittest.cc', 'plugin/bho/cookie_accountant_unittest.cc', 'plugin/bho/cookie_events_funnel_unittest.cc', 'plugin/bho/dom_utils_unittest.cc', 'plugin/bho/events_funnel_unittest.cc', 'plugin/bho/executor_unittest.cc', 'plugin/bho/executor_com_unittest.cc', 'plugin/bho/extension_port_manager.cc', 'plugin/bho/frame_event_handler_unittest.cc', 'plugin/bho/infobar_events_funnel_unittest.cc', 'plugin/bho/infobar_manager_unittest.cc', 'plugin/bho/infobar_window_unittest.cc', 'plugin/bho/tab_events_funnel_unittest.cc', 'plugin/bho/tool_band_visibility_unittest.cc', 'plugin/bho/webnavigation_events_funnel_unittest.cc', 'plugin/bho/webrequest_events_funnel_unittest.cc', 'plugin/bho/webrequest_notifier_unittest.cc', 'plugin/bho/web_progress_notifier_unittest.cc', 'plugin/scripting/content_script_manager.rc', 'plugin/scripting/content_script_manager_unittest.cc', 'plugin/scripting/content_script_native_api_unittest.cc', 'plugin/scripting/renderer_extension_bindings_unittest.cc', 'plugin/scripting/renderer_extension_bindings_unittest.rc', 'plugin/scripting/script_host_unittest.cc', 'plugin/scripting/userscripts_librarian_unittest.cc', 'plugin/toolband/tool_band_unittest.cc', 'plugin/toolband/toolband_module_reporting_unittest.cc', 'testing/ie_unittest_main.cc', 'testing/mock_broker_and_friends.h', 'testing/mock_chrome_frame_host.h', 'testing/mock_browser_and_friends.h'], 'msvs_settings': {'VCCLCompilerTool': {'AdditionalOptions': ['/bigobj']}}, 'dependencies': ['testing_invoke_executor', 'common/common.gyp:ie_common', 'common/common.gyp:ie_common_settings', 'common/common.gyp:ie_guids', 'broker/broker.gyp:broker', 'broker/broker.gyp:broker_rpc_lib', 'plugin/bho/bho.gyp:bho', 'plugin/scripting/scripting.gyp:javascript_bindings', 'plugin/scripting/scripting.gyp:scripting', 'plugin/toolband/toolband.gyp:ceee_ie_lib', 'plugin/toolband/toolband.gyp:ie_toolband_common', 'plugin/toolband/toolband.gyp:toolband_idl', 'plugin/toolband/toolband.gyp:toolband_proxy_lib', '../../base/base.gyp:base', '../../breakpad/breakpad.gyp:breakpad_handler', '../testing/sidestep/sidestep.gyp:sidestep', '../testing/utils/test_utils.gyp:test_utils', '../../testing/gmock.gyp:gmock', '../../testing/gtest.gyp:gtest'], 'libraries': ['oleacc.lib', 'iepmapi.lib', 'rpcrt4.lib']}, {'target_name': 'mediumtest_ie', 'type': 'executable', 'sources': ['plugin/bho/mediumtest_browser_event.cc', 'plugin/bho/mediumtest_browser_helper_object.cc', 'testing/mediumtest_ie_common.cc', 'testing/mediumtest_ie_common.h', 'testing/mediumtest_ie_main.cc'], 'msvs_settings': {'VCCLCompilerTool': {'AdditionalOptions': ['/bigobj']}}, 'dependencies': ['broker/broker.gyp:broker_rpc_lib', 'common/common.gyp:ie_common', 'common/common.gyp:ie_common_settings', 'common/common.gyp:ie_guids', 'plugin/bho/bho.gyp:bho', 'plugin/scripting/scripting.gyp:scripting', 'plugin/toolband/toolband.gyp:toolband_idl', 'plugin/toolband/toolband.gyp:toolband_proxy_lib', '../../base/base.gyp:base', '../../testing/gmock.gyp:gmock', '../../testing/gtest.gyp:gtest', '../testing/sidestep/sidestep.gyp:sidestep', '../testing/utils/test_utils.gyp:test_utils'], 'libraries': ['oleacc.lib', 'iepmapi.lib', 'rpcrt4.lib']}]} |
expected_output = {
"fsol_packet_drop": 0,
"cac_status": "Not Dropping",
"cac_state": "ACTIVE",
"total_call_session_charges": 0,
"cac_duration": 372898,
"calls_accepted": 48667,
"current_actual_cpu": 3,
"call_limit": 350,
"cpu_limit": 80,
"calls_rejected": 3381,
"cac_events": {
"reject_reason": {
"low_platform_resources": {
"duration_of_activation": 0,
"times_of_activation": 0,
"rejected_calls": 0
},
"session_charges": {
"duration_of_activation": 0,
"times_of_activation": 27,
"rejected_calls": 27
},
"session_limit": {
"duration_of_activation": 0,
"times_of_activation": 9876543,
"rejected_calls": 0
},
"cpu_limit": {
"duration_of_activation": 116,
"times_of_activation": 3354,
"rejected_calls": 33541234
}
}
}
}
| expected_output = {'fsol_packet_drop': 0, 'cac_status': 'Not Dropping', 'cac_state': 'ACTIVE', 'total_call_session_charges': 0, 'cac_duration': 372898, 'calls_accepted': 48667, 'current_actual_cpu': 3, 'call_limit': 350, 'cpu_limit': 80, 'calls_rejected': 3381, 'cac_events': {'reject_reason': {'low_platform_resources': {'duration_of_activation': 0, 'times_of_activation': 0, 'rejected_calls': 0}, 'session_charges': {'duration_of_activation': 0, 'times_of_activation': 27, 'rejected_calls': 27}, 'session_limit': {'duration_of_activation': 0, 'times_of_activation': 9876543, 'rejected_calls': 0}, 'cpu_limit': {'duration_of_activation': 116, 'times_of_activation': 3354, 'rejected_calls': 33541234}}}} |
# TODO Introduce DesignViolation escalation system
class DictAttrs(object):
def __init__(self, **dic):
self.__dict__.update(dic)
def __iter__(self):
return self.__dict__.__iter__()
def __getitem__(self, item):
return self.__dict__.__getitem__(item)
def __getattr__(self, item):
if not item in self.__dict__:
raise LookupError
def __setitem__(self, key, value):
self.__dict__.__setitem__(key, value)
def __str__(self):
return self.__dict__.__str__()
class DictAttrBuilder:
def _on_new_attr_val(self, key, val):
raise NotImplementedError
def _new_attr_val(self, key, val):
self._on_new_attr_val(key, val)
return self
def __getattr__(self, item):
return lambda val: self._new_attr_val(item, val)
class DictAttrBuilderFactory(object):
def __init__(self, attr_builder_class):
self.cls = attr_builder_class
def __getattr__(self, item):
if item == 'cls':
return self.cls
return self.cls().__getattr__(item)
class ShapeMismatchError(TypeError):
pass
| class Dictattrs(object):
def __init__(self, **dic):
self.__dict__.update(dic)
def __iter__(self):
return self.__dict__.__iter__()
def __getitem__(self, item):
return self.__dict__.__getitem__(item)
def __getattr__(self, item):
if not item in self.__dict__:
raise LookupError
def __setitem__(self, key, value):
self.__dict__.__setitem__(key, value)
def __str__(self):
return self.__dict__.__str__()
class Dictattrbuilder:
def _on_new_attr_val(self, key, val):
raise NotImplementedError
def _new_attr_val(self, key, val):
self._on_new_attr_val(key, val)
return self
def __getattr__(self, item):
return lambda val: self._new_attr_val(item, val)
class Dictattrbuilderfactory(object):
def __init__(self, attr_builder_class):
self.cls = attr_builder_class
def __getattr__(self, item):
if item == 'cls':
return self.cls
return self.cls().__getattr__(item)
class Shapemismatcherror(TypeError):
pass |
class Solution:
def uniqueOccurrences(self, arr: List[int]) -> bool:
occ = {}
for num in arr:
if num not in occ:
occ[num] = 1
else:
occ[num] += 1
x = list(occ.values())
return len(set(x)) == len(x) | class Solution:
def unique_occurrences(self, arr: List[int]) -> bool:
occ = {}
for num in arr:
if num not in occ:
occ[num] = 1
else:
occ[num] += 1
x = list(occ.values())
return len(set(x)) == len(x) |
n = int(input())
class Tree:
left_node = None
right_node = None
node_dict = dict([])
for i in range(n):
root, left, right = input().split()
node_dict[root] = Tree()
node_dict[root].left_node = left
node_dict[root].right_node = right
def prefix(root):
left = node_dict[root].left_node
right = node_dict[root].right_node
if left == '.' and right == '.':
return root
elif left != '.' and right == '.':
return root + prefix(left)
elif left == '.' and right != '.':
return root + prefix(right)
else:
return root + prefix(left) + prefix(right)
def infix(root):
left = node_dict[root].left_node
right = node_dict[root].right_node
if left == '.' and right == '.':
return root
elif left != '.' and right == '.':
return infix(left) + root
elif left == '.' and right != '.':
return root + infix(right)
else:
return infix(left) + root + infix(right)
def postfix(root):
left = node_dict[root].left_node
right = node_dict[root].right_node
if left == '.' and right == '.':
return root
elif left != '.' and right == '.':
return postfix(left) + root
elif left == '.' and right != '.':
return postfix(right) + root
else:
return postfix(left) + postfix(right) + root
print(prefix('A'))
print(infix('A'))
print(postfix('A')) | n = int(input())
class Tree:
left_node = None
right_node = None
node_dict = dict([])
for i in range(n):
(root, left, right) = input().split()
node_dict[root] = tree()
node_dict[root].left_node = left
node_dict[root].right_node = right
def prefix(root):
left = node_dict[root].left_node
right = node_dict[root].right_node
if left == '.' and right == '.':
return root
elif left != '.' and right == '.':
return root + prefix(left)
elif left == '.' and right != '.':
return root + prefix(right)
else:
return root + prefix(left) + prefix(right)
def infix(root):
left = node_dict[root].left_node
right = node_dict[root].right_node
if left == '.' and right == '.':
return root
elif left != '.' and right == '.':
return infix(left) + root
elif left == '.' and right != '.':
return root + infix(right)
else:
return infix(left) + root + infix(right)
def postfix(root):
left = node_dict[root].left_node
right = node_dict[root].right_node
if left == '.' and right == '.':
return root
elif left != '.' and right == '.':
return postfix(left) + root
elif left == '.' and right != '.':
return postfix(right) + root
else:
return postfix(left) + postfix(right) + root
print(prefix('A'))
print(infix('A'))
print(postfix('A')) |
class Solution:
def rob(self, nums: List[int]) -> int:
if len(nums) == 0:
return 0
if len(nums) <= 2:
return max(nums)
cache = [0] * len(nums)
cache[0] = nums[0]
cache[1] = max(nums[1], nums[0])
for i in range(2, len(nums) - 1):
cache[i] = max(cache[i-2] + nums[i], cache[i-1])
ans = cache[len(nums) - 2]
cache = [0] * len(nums)
nums = nums[1:]
cache[0] = nums[0]
cache[1] = max(nums[1], nums[0])
for i in range(2, len(nums)):
cache[i] = max(cache[i-2] + nums[i], cache[i-1])
ans = max(ans, cache[len(nums) - 1])
return ans
| class Solution:
def rob(self, nums: List[int]) -> int:
if len(nums) == 0:
return 0
if len(nums) <= 2:
return max(nums)
cache = [0] * len(nums)
cache[0] = nums[0]
cache[1] = max(nums[1], nums[0])
for i in range(2, len(nums) - 1):
cache[i] = max(cache[i - 2] + nums[i], cache[i - 1])
ans = cache[len(nums) - 2]
cache = [0] * len(nums)
nums = nums[1:]
cache[0] = nums[0]
cache[1] = max(nums[1], nums[0])
for i in range(2, len(nums)):
cache[i] = max(cache[i - 2] + nums[i], cache[i - 1])
ans = max(ans, cache[len(nums) - 1])
return ans |
class Solution:
def maxLengthBetweenEqualCharacters(self, s: str) -> int:
char_dict = {}
max = 0
for i in range(len(s)):
t = char_dict.get(s[i],-1)
if t==-1:
char_dict[s[i]] = i
else:
if i-t>max:
max = i-t
return max-1 | class Solution:
def max_length_between_equal_characters(self, s: str) -> int:
char_dict = {}
max = 0
for i in range(len(s)):
t = char_dict.get(s[i], -1)
if t == -1:
char_dict[s[i]] = i
elif i - t > max:
max = i - t
return max - 1 |
def make_car(manufacturer, model_name, **arguments):
new_car = {
'manufacturer': manufacturer,
'model_name': model_name,
}
for key, value in arguments.items():
new_car[key] = value
return new_car
car = make_car('subaru', 'outback', color='blue', tow_package=True)
print(car) | def make_car(manufacturer, model_name, **arguments):
new_car = {'manufacturer': manufacturer, 'model_name': model_name}
for (key, value) in arguments.items():
new_car[key] = value
return new_car
car = make_car('subaru', 'outback', color='blue', tow_package=True)
print(car) |
class Node:
"""node class for linked list"""
def __init__(self, data):
self.data = data # Node data
self.next = None # Reference for next node
class LinkedList:
"""Linked List Class"""
def __init__(self):
self.head = None # the first node(head node)
self.tail = None # the last node(tail node)
def append(self, data):
"""Append new node to linked list"""
new_node = Node(data)
# when linked list is empty
if self.head is None:
self.head = new_node
self.tail = new_node
# when linked list is not empty
else:
self.tail.next = new_node # add new node after the last node
self.tail = new_node # let new node as tail node
def prepend(self, data):
"""Append new node before head"""
new_node = Node(data)
if self.head is not None:
new_node.next = self.head
self.head = new_node
else:
self.head = new_node
self.tail = new_node
def pop_left(self):
"""Delete head node"""
data = self.head.data
self.head = self.head.next
if self.head == self.tail:
self.tail = None
return data
def __str__(self):
"""print linked list"""
res_str = "|"
iterator = self.head
# for all node
while iterator is not None:
# str +
res_str += f" {iterator.data} |"
iterator = iterator.next # next node
return res_str
def find_node_with_data(self, data):
"""Find node with data(input), if there is no"""
iterator = self.head
while True:
if iterator.data == data:
return iterator
elif iterator.next is None:
return None
else:
iterator = iterator.next
def find_node_at(self, index):
"""fidn node with index"""
iterator = self.head
for _ in range(index):
iterator = iterator.next
return iterator
class DoublyLinkedList:
""" Linked List with data, prev, next"""
def __init__(self):
self.head = None # the first node(head node)
self.tail = None # the last node(tail node)
def insert_after(self, previous_node, data):
"""Append new node to linked list"""
new_node = Node(data)
if previous_node != self.tail:
previous_node.next.prev = new_node
new_node.prev = previous_node
new_node.next = previous_node.next
previous_node.next = new_node
else:
new_node.prev = previous_node
previous_node.next = new_node
self.tail = new_node
def prepend(self, data):
"""Append new node before head"""
new_node = Node(data)
if self.tail == None and self.head == None:
self.tail = new_node
self.head = new_node
else:
self.head.prev = new_node
new_node.next = self.head
self.head = new_node
def delete(self, node_to_delete):
if node_to_delete == self.head and node_to_delete == self.tail:
self.head = None
self.tail = None
elif node_to_delete == self.head:
self.head = node_to_delete.next
self.head.prev = None
elif node_to_delete == self.tail:
self.tail = node_to_delete.prev
self.tail.next = None
else:
node_to_delete.prev.next = node_to_delete.next
node_to_delete.next.prev = node_to_delete.prev
return node_to_delete.data
def __str__(self):
"""print linked list"""
res_str = "|"
iterator = self.head
# for all node
while iterator is not None:
# str +
res_str += f" {iterator.data} |"
iterator = iterator.next # next node
def find_node_with_data(self, data):
"""Find node with data(input), if there is no"""
iterator = self.head
while True:
if iterator.data == data:
return iterator
elif iterator.next is None:
return None
else:
iterator = iterator.next
def find_node_at(self, index):
"""fidn node with index"""
iterator = self.head
for _ in range(index):
iterator = iterator.next
return iterator
| class Node:
"""node class for linked list"""
def __init__(self, data):
self.data = data
self.next = None
class Linkedlist:
"""Linked List Class"""
def __init__(self):
self.head = None
self.tail = None
def append(self, data):
"""Append new node to linked list"""
new_node = node(data)
if self.head is None:
self.head = new_node
self.tail = new_node
else:
self.tail.next = new_node
self.tail = new_node
def prepend(self, data):
"""Append new node before head"""
new_node = node(data)
if self.head is not None:
new_node.next = self.head
self.head = new_node
else:
self.head = new_node
self.tail = new_node
def pop_left(self):
"""Delete head node"""
data = self.head.data
self.head = self.head.next
if self.head == self.tail:
self.tail = None
return data
def __str__(self):
"""print linked list"""
res_str = '|'
iterator = self.head
while iterator is not None:
res_str += f' {iterator.data} |'
iterator = iterator.next
return res_str
def find_node_with_data(self, data):
"""Find node with data(input), if there is no"""
iterator = self.head
while True:
if iterator.data == data:
return iterator
elif iterator.next is None:
return None
else:
iterator = iterator.next
def find_node_at(self, index):
"""fidn node with index"""
iterator = self.head
for _ in range(index):
iterator = iterator.next
return iterator
class Doublylinkedlist:
""" Linked List with data, prev, next"""
def __init__(self):
self.head = None
self.tail = None
def insert_after(self, previous_node, data):
"""Append new node to linked list"""
new_node = node(data)
if previous_node != self.tail:
previous_node.next.prev = new_node
new_node.prev = previous_node
new_node.next = previous_node.next
previous_node.next = new_node
else:
new_node.prev = previous_node
previous_node.next = new_node
self.tail = new_node
def prepend(self, data):
"""Append new node before head"""
new_node = node(data)
if self.tail == None and self.head == None:
self.tail = new_node
self.head = new_node
else:
self.head.prev = new_node
new_node.next = self.head
self.head = new_node
def delete(self, node_to_delete):
if node_to_delete == self.head and node_to_delete == self.tail:
self.head = None
self.tail = None
elif node_to_delete == self.head:
self.head = node_to_delete.next
self.head.prev = None
elif node_to_delete == self.tail:
self.tail = node_to_delete.prev
self.tail.next = None
else:
node_to_delete.prev.next = node_to_delete.next
node_to_delete.next.prev = node_to_delete.prev
return node_to_delete.data
def __str__(self):
"""print linked list"""
res_str = '|'
iterator = self.head
while iterator is not None:
res_str += f' {iterator.data} |'
iterator = iterator.next
def find_node_with_data(self, data):
"""Find node with data(input), if there is no"""
iterator = self.head
while True:
if iterator.data == data:
return iterator
elif iterator.next is None:
return None
else:
iterator = iterator.next
def find_node_at(self, index):
"""fidn node with index"""
iterator = self.head
for _ in range(index):
iterator = iterator.next
return iterator |
################################################################################
# Design Automation #
################################################################################
'''
Author: Sean Lam
Contact: seanlm@student.ubc.ca
''' | """
Author: Sean Lam
Contact: seanlm@student.ubc.ca
""" |
# # below is Okceg v0.1
#
# def is_num(jerry):
# try:
# int(jerry)
# except:
# try:
# float(jerry)
# except:
# return False
# else:
# return True
# else:
# return True
#
# print('\nInteractive Okceg Shell!\npowered by python\n')
#
# while(True):
# i = input('>')
#
# if i.lower() == 'exit()':
# break
#
# elif i[:6] == 'class(' and i[-1] == ')':
# c = i[6:-1]
# if is_num(c):
# print('number')
# elif c == 'true' or c == 'false':
# print('boolean')
# else:
# print('string')
#
# elif i[:5] == 'math(' and i[-1] == ')':
# c = i[5:-1].split(' ')
# o = c[0]
# l = c[1]
# t = c[2]
# if l == '+':
# print(int(o) + int(t))
# elif l == '-':
# print(int(o) - int(t))
# elif l == '*':
# print(int(o) * int(t))
# elif l == '/':
# print(int(o) / int(t))
#
# else:
# print('nonsense')
#below is Okceg v.2
__author__ = "Vibius Vibidius Zosimus"
__version__ = ".2"
print('\n')
print("Okceg IS: interactive shell of Okceg, based on python\n")
print("now i am going to say 'hello_world!'.\nhello_world!\n")
print("help:\n\tinput anything and hit 'enter';\n\tinput '1' and hit 'enter' to quit;\n")
while 1:
user_input = input(">>> ")
#first-character identifier
print("the first character of your input is:", user_input[0])
#input division
components = []
#step 1: get all numbers
numbers = ""
for jerry in user_input:
if isinstance(jerry, int):
numbers += jerry
#outputting all numbers
print("the numbers are:", numbers)
#quitting
if user_input is '1':
break
print('\n')
| __author__ = 'Vibius Vibidius Zosimus'
__version__ = '.2'
print('\n')
print('Okceg IS: interactive shell of Okceg, based on python\n')
print("now i am going to say 'hello_world!'.\nhello_world!\n")
print("help:\n\tinput anything and hit 'enter';\n\tinput '1' and hit 'enter' to quit;\n")
while 1:
user_input = input('>>> ')
print('the first character of your input is:', user_input[0])
components = []
numbers = ''
for jerry in user_input:
if isinstance(jerry, int):
numbers += jerry
print('the numbers are:', numbers)
if user_input is '1':
break
print('\n') |
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
def oddEvenList(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
if head is None or head.next is None:
return head
odd = head
even_head = head.next
even = head.next
cur = head.next
index = 2
while cur.next is not None:
index += 1
if index % 2 == 1:
odd.next = cur.next
odd = odd.next
else:
even.next = cur.next
even = even.next
cur = cur.next
even.next = None
odd.next = even_head
return head
| class Solution:
def odd_even_list(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
if head is None or head.next is None:
return head
odd = head
even_head = head.next
even = head.next
cur = head.next
index = 2
while cur.next is not None:
index += 1
if index % 2 == 1:
odd.next = cur.next
odd = odd.next
else:
even.next = cur.next
even = even.next
cur = cur.next
even.next = None
odd.next = even_head
return head |
c.Authenticator.admin_users = {'jupyterhub'}
c.JupyterHub.services = [
{
'command': [
'/opt/conda/bin/comsoljupyter', 'web',
'-s', '/srv/jupyterhub',
'12345', 'http://jupyter.radiasoft.org:8000',
],
'name': 'comsol',
'url': 'http://127.0.0.1:12345',
},
]
| c.Authenticator.admin_users = {'jupyterhub'}
c.JupyterHub.services = [{'command': ['/opt/conda/bin/comsoljupyter', 'web', '-s', '/srv/jupyterhub', '12345', 'http://jupyter.radiasoft.org:8000'], 'name': 'comsol', 'url': 'http://127.0.0.1:12345'}] |
'''
Aim: Given a base-10 integer, n, convert it to binary (base-2). Then find and print the
base-10 integer denoting the maximum number of consecutive 1's in n's binary representation.
'''
n = int(input()) # getting input
remainder = []
while n > 0:
rm = n % 2
n = n//2 # whenever decimal to binary conversion is done, the number is repeatedly divided by 2 until it could not be divided any further
remainder.append(rm) # appending the remainder that is obtained each time in a list
count,result = 0,0
for i in range(0,len(remainder)):
if remainder[i] == 0:
count = 0 # as soon as '0' is encountered, the counter is set to 0
else:
count += 1 # the counter increases every time consecutive ones are encountered
result = max(result,count) # maximum streak of 1's is chosen
print(result)
'''
Sample Test Case:
Input:
13
Output:
2
Explaination:
The binary representation of 13 is 1101, so the maximum number of consecutive 1's is 2.
''' | """
Aim: Given a base-10 integer, n, convert it to binary (base-2). Then find and print the
base-10 integer denoting the maximum number of consecutive 1's in n's binary representation.
"""
n = int(input())
remainder = []
while n > 0:
rm = n % 2
n = n // 2
remainder.append(rm)
(count, result) = (0, 0)
for i in range(0, len(remainder)):
if remainder[i] == 0:
count = 0
else:
count += 1
result = max(result, count)
print(result)
"\nSample Test Case:\nInput: \n13\nOutput: \n2\nExplaination:\nThe binary representation of 13 is 1101, so the maximum number of consecutive 1's is 2.\n\n" |
class node:
def __init__(self,key):
self.left=self.right=None
self.val=key
def printlevel(root,level):
if root==None:
return
if level==0:
print(root.val,end=' ')
else:
printlevel(root.left,level-1)
printlevel(root.right,level-1)
root=node(1)
root.left=node(2)
root.right=node(3)
root.left.left=node(4)
root.left.right=node(5)
printlevel(root,2)
| class Node:
def __init__(self, key):
self.left = self.right = None
self.val = key
def printlevel(root, level):
if root == None:
return
if level == 0:
print(root.val, end=' ')
else:
printlevel(root.left, level - 1)
printlevel(root.right, level - 1)
root = node(1)
root.left = node(2)
root.right = node(3)
root.left.left = node(4)
root.left.right = node(5)
printlevel(root, 2) |
"""This file contains custom Exceptions for pysradb
"""
class MissingQueryException(Exception):
"""Exception raised when the user did not supply any query fields.
Attributes:
message: string
Error message for this Exception
"""
def __init__(self):
self.message = (
"No valid query has been supplied. \n"
"A query must be supplied to one of the following fields:\n"
"[--query, --accession, --organism, --layout, --mbases, --publication-date,"
" --platform, --selection, --source, --strategy, --title]"
)
super().__init__(self.message)
class IncorrectFieldException(Exception):
"""Exception raised when the user enters incorrect inputs for a flag."""
pass
| """This file contains custom Exceptions for pysradb
"""
class Missingqueryexception(Exception):
"""Exception raised when the user did not supply any query fields.
Attributes:
message: string
Error message for this Exception
"""
def __init__(self):
self.message = 'No valid query has been supplied. \nA query must be supplied to one of the following fields:\n[--query, --accession, --organism, --layout, --mbases, --publication-date, --platform, --selection, --source, --strategy, --title]'
super().__init__(self.message)
class Incorrectfieldexception(Exception):
"""Exception raised when the user enters incorrect inputs for a flag."""
pass |
n=int(input())
for i in range(n):
x=input()
l=len(x);li=[]
for i in range(l):
li.append(x[i])
j=0
sum=0
while j<len(li):
if li[j]=='4':
sum+=1
else:
pass
j+=1
print(sum)
| n = int(input())
for i in range(n):
x = input()
l = len(x)
li = []
for i in range(l):
li.append(x[i])
j = 0
sum = 0
while j < len(li):
if li[j] == '4':
sum += 1
else:
pass
j += 1
print(sum) |
__title__ = 'aiolo'
__version__ = '4.1.1'
__description__ = 'asyncio-friendly Python bindings for liblo'
__url__ = 'https://github.com/elijahr/aiolo'
__author__ = 'Elijah Shaw-Rutschman'
__author_email__ = 'elijahr+aiolo@gmail.com'
| __title__ = 'aiolo'
__version__ = '4.1.1'
__description__ = 'asyncio-friendly Python bindings for liblo'
__url__ = 'https://github.com/elijahr/aiolo'
__author__ = 'Elijah Shaw-Rutschman'
__author_email__ = 'elijahr+aiolo@gmail.com' |
"""
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
"""
class Solution:
def twoSum(self, nums: List[int], target: int) -> List[int]:
return self.dictionary(nums, target)
# return self.brute_force(nums,target)
def dictionary(self, nums, target):
"""O(n)"""
complement_nums = dict()
for index, num in enumerate(nums):
complement = target - num
if num in complement_nums:
return index, complement_nums[num]
else:
complement_nums[complement] = indexc
def brute_force(self, nums, target):
""" O(n^2)"""
for i in range(len(nums)):
for j in range(i+1, len(nums)):
sum = nums[i] + nums[j]
if sum == target:
return i,j
| """
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
"""
class Solution:
def two_sum(self, nums: List[int], target: int) -> List[int]:
return self.dictionary(nums, target)
def dictionary(self, nums, target):
"""O(n)"""
complement_nums = dict()
for (index, num) in enumerate(nums):
complement = target - num
if num in complement_nums:
return (index, complement_nums[num])
else:
complement_nums[complement] = indexc
def brute_force(self, nums, target):
""" O(n^2)"""
for i in range(len(nums)):
for j in range(i + 1, len(nums)):
sum = nums[i] + nums[j]
if sum == target:
return (i, j) |
customers = {
"name": "Taen Ahammed",
"age": 20,
"is_verified": True
}
print(customers["name"])
# print(customers["birthdate"])
# print(customers["Name"])
customers["name"] = "Taen"
print(customers.get("name"))
print(customers.get("birthdate"))
print(customers.get("birthdate", "Dec 12 1998"))
customers["isMarried"] = False
print(customers["isMarried"])
| customers = {'name': 'Taen Ahammed', 'age': 20, 'is_verified': True}
print(customers['name'])
customers['name'] = 'Taen'
print(customers.get('name'))
print(customers.get('birthdate'))
print(customers.get('birthdate', 'Dec 12 1998'))
customers['isMarried'] = False
print(customers['isMarried']) |
class Scrapable():
def __parse(self, html=None):
"""todo: documentation"""
pass
async def scrap(self):
"""todo: documentation"""
pass
| class Scrapable:
def __parse(self, html=None):
"""todo: documentation"""
pass
async def scrap(self):
"""todo: documentation"""
pass |
def correct_sentence(text):
'''
For the input of your function, you will be given one sentence. You have to return a corrected version, that starts with a capital letter and ends with a period (dot).
Pay attention to the fact that not all of the fixes are necessary. If a sentence already ends with a period (dot), then adding another one will be a mistake.
Input: A string.
Output: A string.
Precondition: No leading and trailing spaces, text contains only spaces, a-z A-Z , and .
'''
text = text.strip()
if text[-1]!='.':
text=text+'.'
text = text.split()
text[0] =text[0].capitalize()
text = ' '.join(text)
#text = text.replace(text[0], text[0].upper())
return text
if __name__ == '__main__':
print("Example:")
print(correct_sentence("greetings, friends"))
print(correct_sentence("Greetings, friends"))
print(correct_sentence("Greetings, friends."))
print(correct_sentence(" hi "))
print(correct_sentence("welcome to New York")) | def correct_sentence(text):
"""
For the input of your function, you will be given one sentence. You have to return a corrected version, that starts with a capital letter and ends with a period (dot).
Pay attention to the fact that not all of the fixes are necessary. If a sentence already ends with a period (dot), then adding another one will be a mistake.
Input: A string.
Output: A string.
Precondition: No leading and trailing spaces, text contains only spaces, a-z A-Z , and .
"""
text = text.strip()
if text[-1] != '.':
text = text + '.'
text = text.split()
text[0] = text[0].capitalize()
text = ' '.join(text)
return text
if __name__ == '__main__':
print('Example:')
print(correct_sentence('greetings, friends'))
print(correct_sentence('Greetings, friends'))
print(correct_sentence('Greetings, friends.'))
print(correct_sentence(' hi '))
print(correct_sentence('welcome to New York')) |
def get_arrangement_count(free_spaces):
if not free_spaces:
return 1
elif free_spaces < 2:
return 0
arrangements = 0
if free_spaces >= 3:
arrangements += (2 + get_arrangement_count(free_spaces - 3))
arrangements += (2 + get_arrangement_count(free_spaces - 2))
return arrangements
def count_arragements(columns):
return get_arrangement_count(columns * 2)
# Tests
assert count_arragements(4) == 32
| def get_arrangement_count(free_spaces):
if not free_spaces:
return 1
elif free_spaces < 2:
return 0
arrangements = 0
if free_spaces >= 3:
arrangements += 2 + get_arrangement_count(free_spaces - 3)
arrangements += 2 + get_arrangement_count(free_spaces - 2)
return arrangements
def count_arragements(columns):
return get_arrangement_count(columns * 2)
assert count_arragements(4) == 32 |
# ------------------------------
# 397. Integer Replacement
#
# Description:
# Given a positive integer n and you can do operations as follow:
#
# If n is even, replace n with n/2.
# If n is odd, you can replace n with either n + 1 or n - 1.
# What is the minimum number of replacements needed for n to become 1?
#
# Example 1:
# Input:
# 8
# Output:
# 3
# Explanation:
# 8 -> 4 -> 2 -> 1
#
# Example 2:
# Input:
# 7
# Output:
# 4
# Explanation:
# 7 -> 8 -> 4 -> 2 -> 1
# or
# 7 -> 6 -> 3 -> 2 -> 1
#
# Version: 1.0
# 10/09/19 by Jianfa
# ------------------------------
class Solution:
def integerReplacement(self, n: int) -> int:
if n == 1:
return 0
replaceCount = {1:0}
def dp(n: int) -> int:
if n in replaceCount:
return replaceCount[n]
if n % 2 == 0:
res = dp(n / 2) + 1
else:
res = min(dp(n + 1), dp(n - 1)) + 1
replaceCount[n] = res
return res
return dp(n)
# Used for testing
if __name__ == "__main__":
test = Solution()
# ------------------------------
# Summary:
# Dynamic programming solution.
# While there is another smart math solution idea from: https://leetcode.com/problems/integer-replacement/discuss/87928/Java-12-line-4(5)ms-iterative-solution-with-explanations.-No-other-data-structures.
# When n is even, the operation is fixed. The procedure is unknown when it is odd. When n is
# odd it can be written into the form n = 2k+1 (k is a non-negative integer.). That is,
# n+1 = 2k+2 and n-1 = 2k. Then, (n+1)/2 = k+1 and (n-1)/2 = k. So one of (n+1)/2 and (n-1)/2
# is even, the other is odd. And the "best" case of this problem is to divide as much as
# possible. Because of that, always pick n+1 or n-1 based on if it can be divided by 4. The
# only special case of that is when n=3 you would like to pick n-1 rather than n+1.
| class Solution:
def integer_replacement(self, n: int) -> int:
if n == 1:
return 0
replace_count = {1: 0}
def dp(n: int) -> int:
if n in replaceCount:
return replaceCount[n]
if n % 2 == 0:
res = dp(n / 2) + 1
else:
res = min(dp(n + 1), dp(n - 1)) + 1
replaceCount[n] = res
return res
return dp(n)
if __name__ == '__main__':
test = solution() |
class Solution:
def judgePoint24(self, cards: List[int]) -> bool:
"""Backtracking.
"""
if len(cards) == 1 and abs(cards[0] - 24.0) < 0.0001:
return True
for i in range(1, len(cards)):
for j in range(0, i):
copy = cards[:]
a, b = copy[i], copy[j]
copy.pop(i)
copy.pop(j)
nxt = [a + b, a - b, b - a, a * b]
if a != 0.0:
nxt.append(b / a)
if b != 0.0:
nxt.append(a / b)
for n in nxt:
if self.judgePoint24(copy + [n]):
return True
return False
| class Solution:
def judge_point24(self, cards: List[int]) -> bool:
"""Backtracking.
"""
if len(cards) == 1 and abs(cards[0] - 24.0) < 0.0001:
return True
for i in range(1, len(cards)):
for j in range(0, i):
copy = cards[:]
(a, b) = (copy[i], copy[j])
copy.pop(i)
copy.pop(j)
nxt = [a + b, a - b, b - a, a * b]
if a != 0.0:
nxt.append(b / a)
if b != 0.0:
nxt.append(a / b)
for n in nxt:
if self.judgePoint24(copy + [n]):
return True
return False |
__copyright__ = "Copyright (C) 2020 shimakaze-git"
__version__ = "0.0.1"
__license__ = "MIT"
__author__ = "shimakaze-git"
__author_email__ = "shimakaze.soft+github@googlemail.com"
__url__ = "http://github.com/shimakaze-git/django-jp-birthday"
__all__ = ["fields", "managers", "models"]
| __copyright__ = 'Copyright (C) 2020 shimakaze-git'
__version__ = '0.0.1'
__license__ = 'MIT'
__author__ = 'shimakaze-git'
__author_email__ = 'shimakaze.soft+github@googlemail.com'
__url__ = 'http://github.com/shimakaze-git/django-jp-birthday'
__all__ = ['fields', 'managers', 'models'] |
"""termination: A library for first-order term-rewriting."""
__version__ = '0.0.2'
__author__ = 'Chris Bouchard <chris@upliftinglemma.net>'
| """termination: A library for first-order term-rewriting."""
__version__ = '0.0.2'
__author__ = 'Chris Bouchard <chris@upliftinglemma.net>' |
#Manifest example.
{
'author':'Campo y Tierra del Jerte S.A.',
'name':'Test Module',
'depends':[
'base',
'account',
],
'summary':'Module for testing odooo',
'description':"""
This is an *extended description* for the module that is testing our
skills developing in **odoo**. With this we learn:
* Basic module
* How to install modules
* Types of
""",
'license':'AGPL-3',
'website':'https://www.campoytierra.com',
'version':'11.0.1.0.0',
'category':'Tools',
'data':[
'views/example_view.xml',
]
}
| {'author': 'Campo y Tierra del Jerte S.A.', 'name': 'Test Module', 'depends': ['base', 'account'], 'summary': 'Module for testing odooo', 'description': '\n This is an *extended description* for the module that is testing our\n skills developing in **odoo**. With this we learn:\n \n * Basic module\n * How to install modules\n * Types of \n ', 'license': 'AGPL-3', 'website': 'https://www.campoytierra.com', 'version': '11.0.1.0.0', 'category': 'Tools', 'data': ['views/example_view.xml']} |
blist = [ 1, 2, 3, 255 ]
# byte is immutable
the_bytes = bytes( blist )
# b'\x01\x02\x03\xff'
print( the_bytes )
the_byte_array = bytearray( blist )
# bytearray(b'\x01\x02\x03\xff')
print( the_byte_array )
# bytearray is mutable
the_byte_array = bytearray( blist )
print( the_byte_array )
the_byte_array[0] = 127
print( the_byte_array )
the_bytes = bytes( range(0, 256) )
the_byte_array = bytearray( range(0, 256) )
'''
b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff'
'''
print( the_bytes )
'''
bytearray(b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff')
'''
print( the_byte_array ) | blist = [1, 2, 3, 255]
the_bytes = bytes(blist)
print(the_bytes)
the_byte_array = bytearray(blist)
print(the_byte_array)
the_byte_array = bytearray(blist)
print(the_byte_array)
the_byte_array[0] = 127
print(the_byte_array)
the_bytes = bytes(range(0, 256))
the_byte_array = bytearray(range(0, 256))
'\nb\'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0¡¢£¤¥¦§¨©ª«¬\xad®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ\'\n'
print(the_bytes)
'\nbytearray(b\'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0¡¢£¤¥¦§¨©ª«¬\xad®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ\')\n'
print(the_byte_array) |
"""
CFG has many blocks
blocks has many nodes
nodes may jump into blocks (if else)
"""
class CFG(object):
def __init__(self):
self.startingBlockIndex = 0
self.blocks = []
self.arguments = []
self.vars = set()
self.name = None
self.returnVariables = []
def setName(self,name):
self.name = name
def addBlock(self,block):
self.blocks.append(block)
def addVars(self,var):
self.vars.add(var)
def addArgument(self,argument):
self.arguments.append(argument)
def __str__(self):
return self.printCFG()
def __eq__(self, other):
if not self.arguments.__eq__(other.arguments):
return False
if not self.vars.__eq__(other.vars):
return False
if self.name != other.name:
return False
if not self.blocks.__eq__(other.blocks):
return False
return True
def printCFG(self):
output = ""
for block in self.blocks:
output += str(block)
return output
def generateGraphViz(self,debug=False):
block_formatting = ""
block_formatting += "\"%s_header\" -> \"%s_block_1\" [\r\n]\r\n"%(self.name,self.name)
block_formatting += "\"%s_header\" [\r\nlabel=\"Function %s:\"\r\nshape=\"rect\"\r\n]\r\n"%(self.name,self.name)
for block in self.blocks:
block_formatting += block.generateGraphViz(debug,self.name)
output = "%s"%block_formatting
return output | """
CFG has many blocks
blocks has many nodes
nodes may jump into blocks (if else)
"""
class Cfg(object):
def __init__(self):
self.startingBlockIndex = 0
self.blocks = []
self.arguments = []
self.vars = set()
self.name = None
self.returnVariables = []
def set_name(self, name):
self.name = name
def add_block(self, block):
self.blocks.append(block)
def add_vars(self, var):
self.vars.add(var)
def add_argument(self, argument):
self.arguments.append(argument)
def __str__(self):
return self.printCFG()
def __eq__(self, other):
if not self.arguments.__eq__(other.arguments):
return False
if not self.vars.__eq__(other.vars):
return False
if self.name != other.name:
return False
if not self.blocks.__eq__(other.blocks):
return False
return True
def print_cfg(self):
output = ''
for block in self.blocks:
output += str(block)
return output
def generate_graph_viz(self, debug=False):
block_formatting = ''
block_formatting += '"%s_header" -> "%s_block_1" [\r\n]\r\n' % (self.name, self.name)
block_formatting += '"%s_header" [\r\nlabel="Function %s:"\r\nshape="rect"\r\n]\r\n' % (self.name, self.name)
for block in self.blocks:
block_formatting += block.generateGraphViz(debug, self.name)
output = '%s' % block_formatting
return output |
total=0
n=int(input())
for i in range(9):
t=int(input())
total+=t
print(n-total) | total = 0
n = int(input())
for i in range(9):
t = int(input())
total += t
print(n - total) |
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 26 15:47:44 2020
@author: alexi
"""
| """
Created on Wed Feb 26 15:47:44 2020
@author: alexi
""" |
class ImeMode(Enum,IComparable,IFormattable,IConvertible):
"""
Specifies a value that determines the Input Method Editor (IME) status of an object when the object is selected.
enum ImeMode,values: Alpha (8),AlphaFull (7),Close (11),Disable (3),Hangul (10),HangulFull (9),Hiragana (4),Inherit (-1),Katakana (5),KatakanaHalf (6),NoControl (0),Off (2),On (1),OnHalf (12)
"""
def Instance(self):
""" This function has been arbitrarily put into the stubs"""
return ImeMode()
def __eq__(self,*args):
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
def __format__(self,*args):
""" __format__(formattable: IFormattable,format: str) -> str """
pass
def __ge__(self,*args):
pass
def __gt__(self,*args):
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self,*args):
pass
def __lt__(self,*args):
pass
def __ne__(self,*args):
pass
def __reduce_ex__(self,*args):
pass
def __str__(self,*args):
pass
Alpha=None
AlphaFull=None
Close=None
Disable=None
Hangul=None
HangulFull=None
Hiragana=None
Inherit=None
Katakana=None
KatakanaHalf=None
NoControl=None
Off=None
On=None
OnHalf=None
value__=None
| class Imemode(Enum, IComparable, IFormattable, IConvertible):
"""
Specifies a value that determines the Input Method Editor (IME) status of an object when the object is selected.
enum ImeMode,values: Alpha (8),AlphaFull (7),Close (11),Disable (3),Hangul (10),HangulFull (9),Hiragana (4),Inherit (-1),Katakana (5),KatakanaHalf (6),NoControl (0),Off (2),On (1),OnHalf (12)
"""
def instance(self):
""" This function has been arbitrarily put into the stubs"""
return ime_mode()
def __eq__(self, *args):
""" x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """
pass
def __format__(self, *args):
""" __format__(formattable: IFormattable,format: str) -> str """
pass
def __ge__(self, *args):
pass
def __gt__(self, *args):
pass
def __init__(self, *args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """
pass
def __le__(self, *args):
pass
def __lt__(self, *args):
pass
def __ne__(self, *args):
pass
def __reduce_ex__(self, *args):
pass
def __str__(self, *args):
pass
alpha = None
alpha_full = None
close = None
disable = None
hangul = None
hangul_full = None
hiragana = None
inherit = None
katakana = None
katakana_half = None
no_control = None
off = None
on = None
on_half = None
value__ = None |
matrix_line_color = '#fff'
matrix_background_color = '#eee'
matrix_border_color = '#888'
matrix_border_width = 0.18
cc = { # cycle colors
'axis': 'ff0000',
'maindiag': '00438a',
'bigcyc': 'ba1000',
'with0': 'ff5500',
'without0': 'e23287',
'lighttetra': 'da691e',
'darktetra': '7b2e13'
}
id_colors_dict = {
'white': '#ffffff',
'yellow': '#ffff7f',
'green': '#33d42a',
'blue': '#3375ff',
'orange': '#ffa200',
'red': '#ef2500',
}
cube_grays_dict = {
'light': '#ddd',
'dark': '#888'
}
arrow_cube_svg_coordinates = [(0, 3), (2, 3), (.6, 2.2), (2.6, 2.2), (0, 1), (2, 1), (.6, .2), (2.6, .2)]
gray_cube_svg_coordinates = [(0, 3), (2, 3), (1, 2), (3, 2), (0, 1), (2, 1), (1, 0), (3, 0)]
cube_edges = [(0,1), (2,3), (4,5), (6,7), (0,2), (1,3), (4,6), (5,7), (0,4), (1,5), (2,6), (3,7)]
JF_sides_and_manipulations = {(7, 3): ('top', 'asc'), (1, 3): ('bottom', 'desc'), (3, 0): ('J back', 'fix'), (5, 4): ('F back', 'left'), (2, 1): ('F front', 'fix'), (6, 2): ('top', 'vert'), (5, 1): ('F back', 'vert'), (2, 5): ('J back', 'right'), (0, 3): ('bottom', 'left'), (7, 2): ('top', 'cross'), (4, 0): ('J front', 'vert'), (1, 2): ('bottom', 'cross'), (5, 5): ('J front', 'asc'), (4, 4): ('F back', 'desc'), (6, 3): ('top', 'right'), (1, 5): ('J front', 'left'), (5, 0): ('J front', 'cross'), (0, 4): ('F back', 'right'), (3, 3): ('top', 'left'), (5, 3): ('bottom', 'right'), (4, 1): ('F back', 'cross'), (1, 1): ('F back', 'fix'), (6, 4): ('F front', 'right'), (3, 2): ('top', 'horz'), (0, 0): ('J front', 'fix'), (7, 1): ('F front', 'cross'), (4, 5): ('J front', 'right'), (2, 2): ('top', 'fix'), (6, 0): ('J back', 'cross'), (1, 4): ('F back', 'asc'), (7, 5): ('J back', 'left'), (0, 5): ('J front', 'desc'), (4, 2): ('bottom', 'fix'), (1, 0): ('J front', 'horz'), (6, 5): ('J back', 'desc'), (3, 5): ('J back', 'asc'), (0, 1): ('F back', 'horz'), (7, 0): ('J back', 'vert'), (5, 2): ('bottom', 'horz'), (6, 1): ('F front', 'vert'), (3, 1): ('F front', 'horz'), (2, 4): ('F front', 'desc'), (7, 4): ('F front', 'asc'), (2, 0): ('J back', 'horz'), (4, 3): ('bottom', 'asc'), (2, 3): ('top', 'desc'), (3, 4): ('F front', 'left'), (0, 2): ('bottom', 'vert')}
| matrix_line_color = '#fff'
matrix_background_color = '#eee'
matrix_border_color = '#888'
matrix_border_width = 0.18
cc = {'axis': 'ff0000', 'maindiag': '00438a', 'bigcyc': 'ba1000', 'with0': 'ff5500', 'without0': 'e23287', 'lighttetra': 'da691e', 'darktetra': '7b2e13'}
id_colors_dict = {'white': '#ffffff', 'yellow': '#ffff7f', 'green': '#33d42a', 'blue': '#3375ff', 'orange': '#ffa200', 'red': '#ef2500'}
cube_grays_dict = {'light': '#ddd', 'dark': '#888'}
arrow_cube_svg_coordinates = [(0, 3), (2, 3), (0.6, 2.2), (2.6, 2.2), (0, 1), (2, 1), (0.6, 0.2), (2.6, 0.2)]
gray_cube_svg_coordinates = [(0, 3), (2, 3), (1, 2), (3, 2), (0, 1), (2, 1), (1, 0), (3, 0)]
cube_edges = [(0, 1), (2, 3), (4, 5), (6, 7), (0, 2), (1, 3), (4, 6), (5, 7), (0, 4), (1, 5), (2, 6), (3, 7)]
jf_sides_and_manipulations = {(7, 3): ('top', 'asc'), (1, 3): ('bottom', 'desc'), (3, 0): ('J back', 'fix'), (5, 4): ('F back', 'left'), (2, 1): ('F front', 'fix'), (6, 2): ('top', 'vert'), (5, 1): ('F back', 'vert'), (2, 5): ('J back', 'right'), (0, 3): ('bottom', 'left'), (7, 2): ('top', 'cross'), (4, 0): ('J front', 'vert'), (1, 2): ('bottom', 'cross'), (5, 5): ('J front', 'asc'), (4, 4): ('F back', 'desc'), (6, 3): ('top', 'right'), (1, 5): ('J front', 'left'), (5, 0): ('J front', 'cross'), (0, 4): ('F back', 'right'), (3, 3): ('top', 'left'), (5, 3): ('bottom', 'right'), (4, 1): ('F back', 'cross'), (1, 1): ('F back', 'fix'), (6, 4): ('F front', 'right'), (3, 2): ('top', 'horz'), (0, 0): ('J front', 'fix'), (7, 1): ('F front', 'cross'), (4, 5): ('J front', 'right'), (2, 2): ('top', 'fix'), (6, 0): ('J back', 'cross'), (1, 4): ('F back', 'asc'), (7, 5): ('J back', 'left'), (0, 5): ('J front', 'desc'), (4, 2): ('bottom', 'fix'), (1, 0): ('J front', 'horz'), (6, 5): ('J back', 'desc'), (3, 5): ('J back', 'asc'), (0, 1): ('F back', 'horz'), (7, 0): ('J back', 'vert'), (5, 2): ('bottom', 'horz'), (6, 1): ('F front', 'vert'), (3, 1): ('F front', 'horz'), (2, 4): ('F front', 'desc'), (7, 4): ('F front', 'asc'), (2, 0): ('J back', 'horz'), (4, 3): ('bottom', 'asc'), (2, 3): ('top', 'desc'), (3, 4): ('F front', 'left'), (0, 2): ('bottom', 'vert')} |
# http://59.23.150.58/30stair/q_r/q_r.php?pname=q_r
a, b = map(int, input().split())
print(int(a/b), a%b) | (a, b) = map(int, input().split())
print(int(a / b), a % b) |
# -*- coding: utf-8 -*-
"""Release information for Python Package."""
# Consider change to: ska-tangods-sdpsubarray ?
NAME = "ska-sdp-subarray"
# For version names see: https://www.python.org/dev/peps/pep-0440/
VERSION = "0.7.0"
VERSION_INFO = VERSION.split(".")
AUTHOR = "ORCA team, Sim Team"
LICENSE = 'License :: OSI Approved :: BSD License'
COPYRIGHT = "BSD-3-Clause"
| """Release information for Python Package."""
name = 'ska-sdp-subarray'
version = '0.7.0'
version_info = VERSION.split('.')
author = 'ORCA team, Sim Team'
license = 'License :: OSI Approved :: BSD License'
copyright = 'BSD-3-Clause' |
#
# PySNMP MIB module HPN-ICF-LswRSTP-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HPN-ICF-LswRSTP-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:40:01 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, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ConstraintsIntersection")
dot1dStpPort, dot1dStpPortEntry = mibBuilder.importSymbols("BRIDGE-MIB", "dot1dStpPort", "dot1dStpPortEntry")
hpnicflswCommon, = mibBuilder.importSymbols("HPN-ICF-OID-MIB", "hpnicflswCommon")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
IpAddress, ModuleIdentity, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32, Bits, Gauge32, Unsigned32, ObjectIdentity, TimeTicks, Counter64, Integer32, NotificationType, iso = mibBuilder.importSymbols("SNMPv2-SMI", "IpAddress", "ModuleIdentity", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32", "Bits", "Gauge32", "Unsigned32", "ObjectIdentity", "TimeTicks", "Counter64", "Integer32", "NotificationType", "iso")
MacAddress, TruthValue, TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "MacAddress", "TruthValue", "TextualConvention", "DisplayString")
hpnicfLswRstpMib = ModuleIdentity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6))
hpnicfLswRstpMib.setRevisions(('2001-06-29 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: hpnicfLswRstpMib.setRevisionsDescriptions(('',))
if mibBuilder.loadTexts: hpnicfLswRstpMib.setLastUpdated('200106290000Z')
if mibBuilder.loadTexts: hpnicfLswRstpMib.setOrganization('')
if mibBuilder.loadTexts: hpnicfLswRstpMib.setContactInfo('')
if mibBuilder.loadTexts: hpnicfLswRstpMib.setDescription('')
class EnabledStatus(TextualConvention, Integer32):
description = 'A simple status value for the object.'
status = 'current'
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("enabled", 1), ("disabled", 2))
hpnicfLswRstpMibObject = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1))
hpnicfdot1dStpStatus = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 1), EnabledStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dStpStatus.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpStatus.setDescription(' Bridge STP enabled/disabled state')
hpnicfdot1dStpForceVersion = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 2))).clone(namedValues=NamedValues(("stp", 0), ("rstp", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dStpForceVersion.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpForceVersion.setDescription(' Running mode of the bridge RSTP state machine')
hpnicfdot1dStpDiameter = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 7))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dStpDiameter.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpDiameter.setDescription(' Permitted amount of bridges between any two ends on the network.')
hpnicfdot1dStpRootBridgeAddress = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 4), MacAddress()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfdot1dStpRootBridgeAddress.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpRootBridgeAddress.setDescription(' MAC address of the root bridge')
hpnicfDot1dStpBpduGuard = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 6), EnabledStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfDot1dStpBpduGuard.setStatus('current')
if mibBuilder.loadTexts: hpnicfDot1dStpBpduGuard.setDescription(' If BPDU guard enabled. The edge port will discard illegal BPDU when enabled')
hpnicfDot1dStpRootType = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("normal", 1), ("primary", 2), ("secondary", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfDot1dStpRootType.setStatus('current')
if mibBuilder.loadTexts: hpnicfDot1dStpRootType.setDescription(' Root type of the bridge')
hpnicfDot1dTimeOutFactor = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(3, 7))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfDot1dTimeOutFactor.setStatus('current')
if mibBuilder.loadTexts: hpnicfDot1dTimeOutFactor.setDescription(' Time Out Factor of the bridge.')
hpnicfDot1dStpPathCostStandard = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("dot1d-1998", 1), ("dot1t", 2), ("legacy", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfDot1dStpPathCostStandard.setStatus('current')
if mibBuilder.loadTexts: hpnicfDot1dStpPathCostStandard.setDescription(" Path Cost Standard of the bridge. Value 'dot1d-1998' is IEEE 802.1d standard in 1998, value 'dot1t' is IEEE 802.1t standard, and value 'legacy' is a private legacy standard.")
hpnicfdot1dStpPortXTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5), )
if mibBuilder.loadTexts: hpnicfdot1dStpPortXTable.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpPortXTable.setDescription('RSTP extended information of the port ')
hpnicfdot1dStpPortXEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1), )
dot1dStpPortEntry.registerAugmentions(("HPN-ICF-LswRSTP-MIB", "hpnicfdot1dStpPortXEntry"))
hpnicfdot1dStpPortXEntry.setIndexNames(*dot1dStpPortEntry.getIndexNames())
if mibBuilder.loadTexts: hpnicfdot1dStpPortXEntry.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpPortXEntry.setDescription(' RSTP extended information of the port ')
hpnicfdot1dStpPortStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 1), EnabledStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dStpPortStatus.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpPortStatus.setDescription(' RSTP status of the port')
hpnicfdot1dStpPortEdgeport = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 2), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dStpPortEdgeport.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpPortEdgeport.setDescription(' Whether the port can be an edge port')
hpnicfdot1dStpPortPointToPoint = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("forceTrue", 1), ("forceFalse", 2), ("auto", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dStpPortPointToPoint.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpPortPointToPoint.setDescription(" It is the administrative value indicates whether the port can be connected to a point-to-point link or not. If the value is 'auto', the operative value of a point-to-point link state is determined by device itself, and can be read from hpnicfdot1dStpOperPortPointToPoint.")
hpnicfdot1dStpMcheck = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 4), TruthValue()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dStpMcheck.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpMcheck.setDescription(' Check if the port transfer state machine enters')
hpnicfdot1dStpTransLimit = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 255))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dStpTransLimit.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpTransLimit.setDescription(' Packet transmission limit of the bridge in a duration of Hello Time.')
hpnicfdot1dStpRXStpBPDU = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 6), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfdot1dStpRXStpBPDU.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpRXStpBPDU.setDescription(' Number of STP BPDU received ')
hpnicfdot1dStpTXStpBPDU = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 7), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfdot1dStpTXStpBPDU.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpTXStpBPDU.setDescription(' Number of STP BPDU transmitted ')
hpnicfdot1dStpRXTCNBPDU = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 8), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfdot1dStpRXTCNBPDU.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpRXTCNBPDU.setDescription(' Number of TCN BPDU received ')
hpnicfdot1dStpTXTCNBPDU = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 9), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfdot1dStpTXTCNBPDU.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpTXTCNBPDU.setDescription(' Number of TCN BPDU transmitted ')
hpnicfdot1dStpRXRSTPBPDU = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 10), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfdot1dStpRXRSTPBPDU.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpRXRSTPBPDU.setDescription('Number of RSTP BPDU received')
hpnicfdot1dStpTXRSTPBPDU = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 11), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfdot1dStpTXRSTPBPDU.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpTXRSTPBPDU.setDescription(' Number of RSTP BPDU transmitted ')
hpnicfdot1dStpClearStatistics = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("clear", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dStpClearStatistics.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpClearStatistics.setDescription('Clear RSTP statistics. Read operation not supported. ')
hpnicfdot1dSetStpDefaultPortCost = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("enable", 1)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dSetStpDefaultPortCost.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dSetStpDefaultPortCost.setDescription('Set PathCost back to the default setting. Read operation not supported.')
hpnicfdot1dStpRootGuard = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 14), EnabledStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dStpRootGuard.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpRootGuard.setDescription(' If the port guard root bridge. Other bridge which want to be root can not become root through this port if enabled. ')
hpnicfdot1dStpLoopGuard = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 15), EnabledStatus()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dStpLoopGuard.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpLoopGuard.setDescription(' Loop guard function that keep a root port or an alternate port in discarding state while the information on the port is aged out.')
hpnicfdot1dStpPortBlockedReason = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 16), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))).clone(namedValues=NamedValues(("notBlock", 1), ("blockForProtocol", 2), ("blockForRootGuard", 3), ("blockForBPDUGuard", 4), ("blockForLoopGuard", 5)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfdot1dStpPortBlockedReason.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpPortBlockedReason.setDescription(' Record the block reason of the port. notBlock (1) means that the port is not in block state,. blockForProtocol (2) means that the port is blocked by stp protocol to avoid loop. blockForRootGuard(3) means that the root guard flag of bridge is set and a better message received from the port,and the port is blocked. blockForBPDUGuard(4) means that the port has been configured as an edge port and receive a BPDU and thus blocked. blockForLoopGuard(5) means that the port is blocked for loopguarded. ')
hpnicfdot1dStpRXTCBPDU = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 17), Counter32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfdot1dStpRXTCBPDU.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpRXTCBPDU.setDescription(' The number of received TC BPDUs ')
hpnicfdot1dStpPortSendingBPDUType = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 18), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(0, 2))).clone(namedValues=NamedValues(("stp", 0), ("rstp", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfdot1dStpPortSendingBPDUType.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpPortSendingBPDUType.setDescription(' Type of BPDU which the port is sending. ')
hpnicfdot1dStpOperPortPointToPoint = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 19), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("true", 1), ("false", 2)))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfdot1dStpOperPortPointToPoint.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpOperPortPointToPoint.setDescription(' This object indicates whether the port has connected to a point-to-point link or not. The administrative value should be read from hpnicfdot1dStpPortPointToPoint. ')
hpnicfRstpEventsV2 = ObjectIdentity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 0))
if mibBuilder.loadTexts: hpnicfRstpEventsV2.setStatus('current')
if mibBuilder.loadTexts: hpnicfRstpEventsV2.setDescription('Definition point for RSTP notifications.')
hpnicfRstpBpduGuarded = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 0, 1)).setObjects(("BRIDGE-MIB", "dot1dStpPort"))
if mibBuilder.loadTexts: hpnicfRstpBpduGuarded.setStatus('current')
if mibBuilder.loadTexts: hpnicfRstpBpduGuarded.setDescription('The SNMP trap that is generated when an edged port of the BPDU-guard switch recevies BPDU packets.')
hpnicfRstpRootGuarded = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 0, 2)).setObjects(("BRIDGE-MIB", "dot1dStpPort"))
if mibBuilder.loadTexts: hpnicfRstpRootGuarded.setStatus('current')
if mibBuilder.loadTexts: hpnicfRstpRootGuarded.setDescription('The SNMP trap that is generated when a root-guard port receives a superior bpdu.')
hpnicfRstpBridgeLostRootPrimary = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 0, 3))
if mibBuilder.loadTexts: hpnicfRstpBridgeLostRootPrimary.setStatus('current')
if mibBuilder.loadTexts: hpnicfRstpBridgeLostRootPrimary.setDescription('The SNMP trap that is generated when the bridge is no longer the root bridge of the spanning tree. Another switch with higher priority has already been the root bridge. ')
hpnicfRstpLoopGuarded = NotificationType((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 0, 4)).setObjects(("BRIDGE-MIB", "dot1dStpPort"))
if mibBuilder.loadTexts: hpnicfRstpLoopGuarded.setStatus('current')
if mibBuilder.loadTexts: hpnicfRstpLoopGuarded.setDescription('The SNMP trap that is generated when a loop-guard port is aged out .')
hpnicfdot1dStpIgnoredVlanTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 10), )
if mibBuilder.loadTexts: hpnicfdot1dStpIgnoredVlanTable.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpIgnoredVlanTable.setDescription('RSTP extended information of vlan ')
hpnicfdot1dStpIgnoredVlanEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 10, 1), ).setIndexNames((0, "HPN-ICF-LswRSTP-MIB", "hpnicfdot1dVlan"))
if mibBuilder.loadTexts: hpnicfdot1dStpIgnoredVlanEntry.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpIgnoredVlanEntry.setDescription(' RSTP extended information of the vlan ')
hpnicfdot1dVlan = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 10, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 4094))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpnicfdot1dVlan.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dVlan.setDescription(' Vlan id supported')
hpnicfdot1dStpIgnore = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 10, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpnicfdot1dStpIgnore.setStatus('current')
if mibBuilder.loadTexts: hpnicfdot1dStpIgnore.setDescription(' Whether the vlan is stp Ignored')
mibBuilder.exportSymbols("HPN-ICF-LswRSTP-MIB", hpnicfdot1dStpRXStpBPDU=hpnicfdot1dStpRXStpBPDU, hpnicfRstpBridgeLostRootPrimary=hpnicfRstpBridgeLostRootPrimary, PYSNMP_MODULE_ID=hpnicfLswRstpMib, hpnicfdot1dStpRXRSTPBPDU=hpnicfdot1dStpRXRSTPBPDU, hpnicfdot1dSetStpDefaultPortCost=hpnicfdot1dSetStpDefaultPortCost, hpnicfdot1dStpPortSendingBPDUType=hpnicfdot1dStpPortSendingBPDUType, hpnicfRstpRootGuarded=hpnicfRstpRootGuarded, hpnicfLswRstpMibObject=hpnicfLswRstpMibObject, hpnicfdot1dStpForceVersion=hpnicfdot1dStpForceVersion, hpnicfRstpLoopGuarded=hpnicfRstpLoopGuarded, hpnicfDot1dTimeOutFactor=hpnicfDot1dTimeOutFactor, hpnicfDot1dStpBpduGuard=hpnicfDot1dStpBpduGuard, hpnicfdot1dStpDiameter=hpnicfdot1dStpDiameter, hpnicfdot1dStpTXRSTPBPDU=hpnicfdot1dStpTXRSTPBPDU, hpnicfdot1dStpOperPortPointToPoint=hpnicfdot1dStpOperPortPointToPoint, hpnicfRstpEventsV2=hpnicfRstpEventsV2, EnabledStatus=EnabledStatus, hpnicfDot1dStpRootType=hpnicfDot1dStpRootType, hpnicfDot1dStpPathCostStandard=hpnicfDot1dStpPathCostStandard, hpnicfdot1dStpTXTCNBPDU=hpnicfdot1dStpTXTCNBPDU, hpnicfdot1dStpClearStatistics=hpnicfdot1dStpClearStatistics, hpnicfdot1dVlan=hpnicfdot1dVlan, hpnicfLswRstpMib=hpnicfLswRstpMib, hpnicfRstpBpduGuarded=hpnicfRstpBpduGuarded, hpnicfdot1dStpPortXEntry=hpnicfdot1dStpPortXEntry, hpnicfdot1dStpStatus=hpnicfdot1dStpStatus, hpnicfdot1dStpPortPointToPoint=hpnicfdot1dStpPortPointToPoint, hpnicfdot1dStpRootBridgeAddress=hpnicfdot1dStpRootBridgeAddress, hpnicfdot1dStpPortEdgeport=hpnicfdot1dStpPortEdgeport, hpnicfdot1dStpIgnoredVlanTable=hpnicfdot1dStpIgnoredVlanTable, hpnicfdot1dStpRootGuard=hpnicfdot1dStpRootGuard, hpnicfdot1dStpRXTCNBPDU=hpnicfdot1dStpRXTCNBPDU, hpnicfdot1dStpTXStpBPDU=hpnicfdot1dStpTXStpBPDU, hpnicfdot1dStpIgnore=hpnicfdot1dStpIgnore, hpnicfdot1dStpPortStatus=hpnicfdot1dStpPortStatus, hpnicfdot1dStpPortBlockedReason=hpnicfdot1dStpPortBlockedReason, hpnicfdot1dStpPortXTable=hpnicfdot1dStpPortXTable, hpnicfdot1dStpRXTCBPDU=hpnicfdot1dStpRXTCBPDU, hpnicfdot1dStpMcheck=hpnicfdot1dStpMcheck, hpnicfdot1dStpLoopGuard=hpnicfdot1dStpLoopGuard, hpnicfdot1dStpTransLimit=hpnicfdot1dStpTransLimit, hpnicfdot1dStpIgnoredVlanEntry=hpnicfdot1dStpIgnoredVlanEntry)
| (octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, single_value_constraint, value_range_constraint, constraints_union, constraints_intersection) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'SingleValueConstraint', 'ValueRangeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection')
(dot1d_stp_port, dot1d_stp_port_entry) = mibBuilder.importSymbols('BRIDGE-MIB', 'dot1dStpPort', 'dot1dStpPortEntry')
(hpnicflsw_common,) = mibBuilder.importSymbols('HPN-ICF-OID-MIB', 'hpnicflswCommon')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(ip_address, module_identity, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column, counter32, bits, gauge32, unsigned32, object_identity, time_ticks, counter64, integer32, notification_type, iso) = mibBuilder.importSymbols('SNMPv2-SMI', 'IpAddress', 'ModuleIdentity', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'Counter32', 'Bits', 'Gauge32', 'Unsigned32', 'ObjectIdentity', 'TimeTicks', 'Counter64', 'Integer32', 'NotificationType', 'iso')
(mac_address, truth_value, textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'MacAddress', 'TruthValue', 'TextualConvention', 'DisplayString')
hpnicf_lsw_rstp_mib = module_identity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6))
hpnicfLswRstpMib.setRevisions(('2001-06-29 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts:
hpnicfLswRstpMib.setRevisionsDescriptions(('',))
if mibBuilder.loadTexts:
hpnicfLswRstpMib.setLastUpdated('200106290000Z')
if mibBuilder.loadTexts:
hpnicfLswRstpMib.setOrganization('')
if mibBuilder.loadTexts:
hpnicfLswRstpMib.setContactInfo('')
if mibBuilder.loadTexts:
hpnicfLswRstpMib.setDescription('')
class Enabledstatus(TextualConvention, Integer32):
description = 'A simple status value for the object.'
status = 'current'
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('enabled', 1), ('disabled', 2))
hpnicf_lsw_rstp_mib_object = mib_identifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1))
hpnicfdot1d_stp_status = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 1), enabled_status()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dStpStatus.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpStatus.setDescription(' Bridge STP enabled/disabled state')
hpnicfdot1d_stp_force_version = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 2))).clone(namedValues=named_values(('stp', 0), ('rstp', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dStpForceVersion.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpForceVersion.setDescription(' Running mode of the bridge RSTP state machine')
hpnicfdot1d_stp_diameter = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 3), integer32().subtype(subtypeSpec=value_range_constraint(1, 7))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dStpDiameter.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpDiameter.setDescription(' Permitted amount of bridges between any two ends on the network.')
hpnicfdot1d_stp_root_bridge_address = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 4), mac_address()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfdot1dStpRootBridgeAddress.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpRootBridgeAddress.setDescription(' MAC address of the root bridge')
hpnicf_dot1d_stp_bpdu_guard = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 6), enabled_status()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfDot1dStpBpduGuard.setStatus('current')
if mibBuilder.loadTexts:
hpnicfDot1dStpBpduGuard.setDescription(' If BPDU guard enabled. The edge port will discard illegal BPDU when enabled')
hpnicf_dot1d_stp_root_type = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 7), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('normal', 1), ('primary', 2), ('secondary', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfDot1dStpRootType.setStatus('current')
if mibBuilder.loadTexts:
hpnicfDot1dStpRootType.setDescription(' Root type of the bridge')
hpnicf_dot1d_time_out_factor = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 8), integer32().subtype(subtypeSpec=value_range_constraint(3, 7))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfDot1dTimeOutFactor.setStatus('current')
if mibBuilder.loadTexts:
hpnicfDot1dTimeOutFactor.setDescription(' Time Out Factor of the bridge.')
hpnicf_dot1d_stp_path_cost_standard = mib_scalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 9), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('dot1d-1998', 1), ('dot1t', 2), ('legacy', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfDot1dStpPathCostStandard.setStatus('current')
if mibBuilder.loadTexts:
hpnicfDot1dStpPathCostStandard.setDescription(" Path Cost Standard of the bridge. Value 'dot1d-1998' is IEEE 802.1d standard in 1998, value 'dot1t' is IEEE 802.1t standard, and value 'legacy' is a private legacy standard.")
hpnicfdot1d_stp_port_x_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5))
if mibBuilder.loadTexts:
hpnicfdot1dStpPortXTable.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpPortXTable.setDescription('RSTP extended information of the port ')
hpnicfdot1d_stp_port_x_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1))
dot1dStpPortEntry.registerAugmentions(('HPN-ICF-LswRSTP-MIB', 'hpnicfdot1dStpPortXEntry'))
hpnicfdot1dStpPortXEntry.setIndexNames(*dot1dStpPortEntry.getIndexNames())
if mibBuilder.loadTexts:
hpnicfdot1dStpPortXEntry.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpPortXEntry.setDescription(' RSTP extended information of the port ')
hpnicfdot1d_stp_port_status = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 1), enabled_status()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dStpPortStatus.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpPortStatus.setDescription(' RSTP status of the port')
hpnicfdot1d_stp_port_edgeport = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 2), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dStpPortEdgeport.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpPortEdgeport.setDescription(' Whether the port can be an edge port')
hpnicfdot1d_stp_port_point_to_point = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 3), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('forceTrue', 1), ('forceFalse', 2), ('auto', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dStpPortPointToPoint.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpPortPointToPoint.setDescription(" It is the administrative value indicates whether the port can be connected to a point-to-point link or not. If the value is 'auto', the operative value of a point-to-point link state is determined by device itself, and can be read from hpnicfdot1dStpOperPortPointToPoint.")
hpnicfdot1d_stp_mcheck = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 4), truth_value()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dStpMcheck.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpMcheck.setDescription(' Check if the port transfer state machine enters')
hpnicfdot1d_stp_trans_limit = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 5), integer32().subtype(subtypeSpec=value_range_constraint(1, 255))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dStpTransLimit.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpTransLimit.setDescription(' Packet transmission limit of the bridge in a duration of Hello Time.')
hpnicfdot1d_stp_rx_stp_bpdu = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 6), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfdot1dStpRXStpBPDU.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpRXStpBPDU.setDescription(' Number of STP BPDU received ')
hpnicfdot1d_stp_tx_stp_bpdu = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 7), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfdot1dStpTXStpBPDU.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpTXStpBPDU.setDescription(' Number of STP BPDU transmitted ')
hpnicfdot1d_stp_rxtcnbpdu = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 8), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfdot1dStpRXTCNBPDU.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpRXTCNBPDU.setDescription(' Number of TCN BPDU received ')
hpnicfdot1d_stp_txtcnbpdu = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 9), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfdot1dStpTXTCNBPDU.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpTXTCNBPDU.setDescription(' Number of TCN BPDU transmitted ')
hpnicfdot1d_stp_rxrstpbpdu = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 10), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfdot1dStpRXRSTPBPDU.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpRXRSTPBPDU.setDescription('Number of RSTP BPDU received')
hpnicfdot1d_stp_txrstpbpdu = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 11), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfdot1dStpTXRSTPBPDU.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpTXRSTPBPDU.setDescription(' Number of RSTP BPDU transmitted ')
hpnicfdot1d_stp_clear_statistics = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 12), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1))).clone(namedValues=named_values(('clear', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dStpClearStatistics.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpClearStatistics.setDescription('Clear RSTP statistics. Read operation not supported. ')
hpnicfdot1d_set_stp_default_port_cost = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 13), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1))).clone(namedValues=named_values(('enable', 1)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dSetStpDefaultPortCost.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dSetStpDefaultPortCost.setDescription('Set PathCost back to the default setting. Read operation not supported.')
hpnicfdot1d_stp_root_guard = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 14), enabled_status()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dStpRootGuard.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpRootGuard.setDescription(' If the port guard root bridge. Other bridge which want to be root can not become root through this port if enabled. ')
hpnicfdot1d_stp_loop_guard = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 15), enabled_status()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dStpLoopGuard.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpLoopGuard.setDescription(' Loop guard function that keep a root port or an alternate port in discarding state while the information on the port is aged out.')
hpnicfdot1d_stp_port_blocked_reason = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 16), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3, 4, 5))).clone(namedValues=named_values(('notBlock', 1), ('blockForProtocol', 2), ('blockForRootGuard', 3), ('blockForBPDUGuard', 4), ('blockForLoopGuard', 5)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfdot1dStpPortBlockedReason.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpPortBlockedReason.setDescription(' Record the block reason of the port. notBlock (1) means that the port is not in block state,. blockForProtocol (2) means that the port is blocked by stp protocol to avoid loop. blockForRootGuard(3) means that the root guard flag of bridge is set and a better message received from the port,and the port is blocked. blockForBPDUGuard(4) means that the port has been configured as an edge port and receive a BPDU and thus blocked. blockForLoopGuard(5) means that the port is blocked for loopguarded. ')
hpnicfdot1d_stp_rxtcbpdu = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 17), counter32()).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfdot1dStpRXTCBPDU.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpRXTCBPDU.setDescription(' The number of received TC BPDUs ')
hpnicfdot1d_stp_port_sending_bpdu_type = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 18), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(0, 2))).clone(namedValues=named_values(('stp', 0), ('rstp', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfdot1dStpPortSendingBPDUType.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpPortSendingBPDUType.setDescription(' Type of BPDU which the port is sending. ')
hpnicfdot1d_stp_oper_port_point_to_point = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 5, 1, 19), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('true', 1), ('false', 2)))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfdot1dStpOperPortPointToPoint.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpOperPortPointToPoint.setDescription(' This object indicates whether the port has connected to a point-to-point link or not. The administrative value should be read from hpnicfdot1dStpPortPointToPoint. ')
hpnicf_rstp_events_v2 = object_identity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 0))
if mibBuilder.loadTexts:
hpnicfRstpEventsV2.setStatus('current')
if mibBuilder.loadTexts:
hpnicfRstpEventsV2.setDescription('Definition point for RSTP notifications.')
hpnicf_rstp_bpdu_guarded = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 0, 1)).setObjects(('BRIDGE-MIB', 'dot1dStpPort'))
if mibBuilder.loadTexts:
hpnicfRstpBpduGuarded.setStatus('current')
if mibBuilder.loadTexts:
hpnicfRstpBpduGuarded.setDescription('The SNMP trap that is generated when an edged port of the BPDU-guard switch recevies BPDU packets.')
hpnicf_rstp_root_guarded = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 0, 2)).setObjects(('BRIDGE-MIB', 'dot1dStpPort'))
if mibBuilder.loadTexts:
hpnicfRstpRootGuarded.setStatus('current')
if mibBuilder.loadTexts:
hpnicfRstpRootGuarded.setDescription('The SNMP trap that is generated when a root-guard port receives a superior bpdu.')
hpnicf_rstp_bridge_lost_root_primary = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 0, 3))
if mibBuilder.loadTexts:
hpnicfRstpBridgeLostRootPrimary.setStatus('current')
if mibBuilder.loadTexts:
hpnicfRstpBridgeLostRootPrimary.setDescription('The SNMP trap that is generated when the bridge is no longer the root bridge of the spanning tree. Another switch with higher priority has already been the root bridge. ')
hpnicf_rstp_loop_guarded = notification_type((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 0, 4)).setObjects(('BRIDGE-MIB', 'dot1dStpPort'))
if mibBuilder.loadTexts:
hpnicfRstpLoopGuarded.setStatus('current')
if mibBuilder.loadTexts:
hpnicfRstpLoopGuarded.setDescription('The SNMP trap that is generated when a loop-guard port is aged out .')
hpnicfdot1d_stp_ignored_vlan_table = mib_table((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 10))
if mibBuilder.loadTexts:
hpnicfdot1dStpIgnoredVlanTable.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpIgnoredVlanTable.setDescription('RSTP extended information of vlan ')
hpnicfdot1d_stp_ignored_vlan_entry = mib_table_row((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 10, 1)).setIndexNames((0, 'HPN-ICF-LswRSTP-MIB', 'hpnicfdot1dVlan'))
if mibBuilder.loadTexts:
hpnicfdot1dStpIgnoredVlanEntry.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpIgnoredVlanEntry.setDescription(' RSTP extended information of the vlan ')
hpnicfdot1d_vlan = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 10, 1, 1), integer32().subtype(subtypeSpec=value_range_constraint(1, 4094))).setMaxAccess('readonly')
if mibBuilder.loadTexts:
hpnicfdot1dVlan.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dVlan.setDescription(' Vlan id supported')
hpnicfdot1d_stp_ignore = mib_table_column((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 15, 8, 35, 6, 1, 10, 1, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2))).clone(namedValues=named_values(('enable', 1), ('disable', 2)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
hpnicfdot1dStpIgnore.setStatus('current')
if mibBuilder.loadTexts:
hpnicfdot1dStpIgnore.setDescription(' Whether the vlan is stp Ignored')
mibBuilder.exportSymbols('HPN-ICF-LswRSTP-MIB', hpnicfdot1dStpRXStpBPDU=hpnicfdot1dStpRXStpBPDU, hpnicfRstpBridgeLostRootPrimary=hpnicfRstpBridgeLostRootPrimary, PYSNMP_MODULE_ID=hpnicfLswRstpMib, hpnicfdot1dStpRXRSTPBPDU=hpnicfdot1dStpRXRSTPBPDU, hpnicfdot1dSetStpDefaultPortCost=hpnicfdot1dSetStpDefaultPortCost, hpnicfdot1dStpPortSendingBPDUType=hpnicfdot1dStpPortSendingBPDUType, hpnicfRstpRootGuarded=hpnicfRstpRootGuarded, hpnicfLswRstpMibObject=hpnicfLswRstpMibObject, hpnicfdot1dStpForceVersion=hpnicfdot1dStpForceVersion, hpnicfRstpLoopGuarded=hpnicfRstpLoopGuarded, hpnicfDot1dTimeOutFactor=hpnicfDot1dTimeOutFactor, hpnicfDot1dStpBpduGuard=hpnicfDot1dStpBpduGuard, hpnicfdot1dStpDiameter=hpnicfdot1dStpDiameter, hpnicfdot1dStpTXRSTPBPDU=hpnicfdot1dStpTXRSTPBPDU, hpnicfdot1dStpOperPortPointToPoint=hpnicfdot1dStpOperPortPointToPoint, hpnicfRstpEventsV2=hpnicfRstpEventsV2, EnabledStatus=EnabledStatus, hpnicfDot1dStpRootType=hpnicfDot1dStpRootType, hpnicfDot1dStpPathCostStandard=hpnicfDot1dStpPathCostStandard, hpnicfdot1dStpTXTCNBPDU=hpnicfdot1dStpTXTCNBPDU, hpnicfdot1dStpClearStatistics=hpnicfdot1dStpClearStatistics, hpnicfdot1dVlan=hpnicfdot1dVlan, hpnicfLswRstpMib=hpnicfLswRstpMib, hpnicfRstpBpduGuarded=hpnicfRstpBpduGuarded, hpnicfdot1dStpPortXEntry=hpnicfdot1dStpPortXEntry, hpnicfdot1dStpStatus=hpnicfdot1dStpStatus, hpnicfdot1dStpPortPointToPoint=hpnicfdot1dStpPortPointToPoint, hpnicfdot1dStpRootBridgeAddress=hpnicfdot1dStpRootBridgeAddress, hpnicfdot1dStpPortEdgeport=hpnicfdot1dStpPortEdgeport, hpnicfdot1dStpIgnoredVlanTable=hpnicfdot1dStpIgnoredVlanTable, hpnicfdot1dStpRootGuard=hpnicfdot1dStpRootGuard, hpnicfdot1dStpRXTCNBPDU=hpnicfdot1dStpRXTCNBPDU, hpnicfdot1dStpTXStpBPDU=hpnicfdot1dStpTXStpBPDU, hpnicfdot1dStpIgnore=hpnicfdot1dStpIgnore, hpnicfdot1dStpPortStatus=hpnicfdot1dStpPortStatus, hpnicfdot1dStpPortBlockedReason=hpnicfdot1dStpPortBlockedReason, hpnicfdot1dStpPortXTable=hpnicfdot1dStpPortXTable, hpnicfdot1dStpRXTCBPDU=hpnicfdot1dStpRXTCBPDU, hpnicfdot1dStpMcheck=hpnicfdot1dStpMcheck, hpnicfdot1dStpLoopGuard=hpnicfdot1dStpLoopGuard, hpnicfdot1dStpTransLimit=hpnicfdot1dStpTransLimit, hpnicfdot1dStpIgnoredVlanEntry=hpnicfdot1dStpIgnoredVlanEntry) |
"""
A number is strobogrammatic if the number looks the same, when rotate by 180 degrees,
upside down
"""
def is_strobogrammatic(num):
"""
:type num: str
:rtype: bool
It has to be palindromic stylish and we should also be able to swap / interchange.
That's the intuition
Args:
num:
Returns:
"""
comb = "00 11 88 69 96"
i = 0
j = len(num) - 1
while i <= j:
x = comb.find(num[i] + num[j])
print(x)
if x == -1:
return False
i += 1
j -= 1
return True
if __name__ == "__main__":
s = "11"
res = is_strobogrammatic(s)
print(res)
| """
A number is strobogrammatic if the number looks the same, when rotate by 180 degrees,
upside down
"""
def is_strobogrammatic(num):
"""
:type num: str
:rtype: bool
It has to be palindromic stylish and we should also be able to swap / interchange.
That's the intuition
Args:
num:
Returns:
"""
comb = '00 11 88 69 96'
i = 0
j = len(num) - 1
while i <= j:
x = comb.find(num[i] + num[j])
print(x)
if x == -1:
return False
i += 1
j -= 1
return True
if __name__ == '__main__':
s = '11'
res = is_strobogrammatic(s)
print(res) |
"""
Advent of Code Day 1
https://adventofcode.com/2021/day/1
(c) JAnxO, 2021
"""
| """
Advent of Code Day 1
https://adventofcode.com/2021/day/1
(c) JAnxO, 2021
""" |
class Track:
def __init__(self, _id, data: dict):
self.id = _id
self.data = data
self.title = data.get("title")
self.author = data.get("author")
self.length = data.get("length")
self.yt_id = data.get("identifier")
self.uri = data.get("uri")
self.is_stream = data.get("isStream")
self.is_seekable = data.get("isSeekable")
self.position = data.get("position")
def __str__(self):
return self.title
def __repr__(self):
return "<Track length={0.length} is_stream={0.is_stream}>".format(self)
class Playlist:
"""Playlist Object.
data - A dict returned from andesite
tracks - list of andesite.Track
"""
def __init__(self, data: dict):
self.data = data
self.name = data['playlistInfo']['name']
self.tracks = [Track(_id = track['track'], data = track['info']) for track in data['tracks']]
def __str__(self):
return self.name
def __repr__(self):
return "<Playlist name={0.name}>".format(self)
| class Track:
def __init__(self, _id, data: dict):
self.id = _id
self.data = data
self.title = data.get('title')
self.author = data.get('author')
self.length = data.get('length')
self.yt_id = data.get('identifier')
self.uri = data.get('uri')
self.is_stream = data.get('isStream')
self.is_seekable = data.get('isSeekable')
self.position = data.get('position')
def __str__(self):
return self.title
def __repr__(self):
return '<Track length={0.length} is_stream={0.is_stream}>'.format(self)
class Playlist:
"""Playlist Object.
data - A dict returned from andesite
tracks - list of andesite.Track
"""
def __init__(self, data: dict):
self.data = data
self.name = data['playlistInfo']['name']
self.tracks = [track(_id=track['track'], data=track['info']) for track in data['tracks']]
def __str__(self):
return self.name
def __repr__(self):
return '<Playlist name={0.name}>'.format(self) |
{
"variables": {
"base_path": "C:/msys64/mingw64"
},
"targets": [
{
"target_name": "expand",
"sources": [
"src/expand.cc"
],
"libraries": ["-llibpostal"],
"library_dirs": ["<(base_path)/bin"],
"include_dirs": [
"<!(node -e \"require('nan')\")",
"<(base_path)/include"
]
},
{
"target_name": "parser",
"sources": [
"src/parser.cc"
],
"libraries": ["-llibpostal"],
"library_dirs": ["<(base_path)/bin"],
"include_dirs": [
"<!(node -e \"require('nan')\")",
"<(base_path)/include"
]
}
]
}
| {'variables': {'base_path': 'C:/msys64/mingw64'}, 'targets': [{'target_name': 'expand', 'sources': ['src/expand.cc'], 'libraries': ['-llibpostal'], 'library_dirs': ['<(base_path)/bin'], 'include_dirs': ['<!(node -e "require(\'nan\')")', '<(base_path)/include']}, {'target_name': 'parser', 'sources': ['src/parser.cc'], 'libraries': ['-llibpostal'], 'library_dirs': ['<(base_path)/bin'], 'include_dirs': ['<!(node -e "require(\'nan\')")', '<(base_path)/include']}]} |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
if __name__ == '__main__':
name = input('please input your name:')
print('hello,', name)
| if __name__ == '__main__':
name = input('please input your name:')
print('hello,', name) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.